Jump to content

Recommended Posts

Alright, so I have easyban installed on my board (2.1), and I'm modifying it a little. I want to input a time function so that I set the amount of time the user is banned for, and when the time is up it places them into their old group. I have it so that when the user gets banned, it takes mgroup2=mgroup, so that it saves the old group, and it works fine.

Now i'm on to the time part... which I can't figure out.

[code]<td class="row1" colspan=2 width="40%" valign="top">
For how long?

<td class="row2" colspan=2 width="40%" valign="top">

<input type="text" name="banamount">[/code]
There is what I have in the template html for easy ban

[code] // For how long?
if($ibforums->input['banamount']!=0)
{
  $bantime = $ibforums->input['banamount'];
  $unbantime = strtotime($bantime);
  $this->ipsclass->DB->query("UPDATE ibf_members SET bantime=$unbantime WHERE id=".$id);
}[/code]
Thats the little snippet of code I have for the time.

Right now the problem is that the banamount isn't seeming to go through. I echo'd the banamount before $bantime etc, and it came up with a blank page, and I can't figure out why.

EDIT: Sorry, I forgot to mention that it gives me the same timestamp in ibf_members under bantime, of 1153717200, which is interesting.

Is this even the best way to do this? Is my coding all wrong anyway?

Thanks for the help!
Link to comment
https://forums.phpfreaks.com/topic/15558-invision-board-modify-help-timemysql/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.