Jump to content


This topic is now archived and is closed to further replies.


Invision board modify help, time+mysql

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?
  $bantime = $ibforums->input['banamount'];
  $unbantime = strtotime($bantime);
  $this->ipsclass->DB->query("UPDATE ibf_members SET bantime=$unbantime WHERE id=".$id);
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!

Share this post

Link to post
Share on other sites


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.