Jump to content


Photo

Invision board modify help, time+mysql


  • Please log in to reply
No replies to this topic

#1 Lumbergh

Lumbergh
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 July 2006 - 04:45 AM

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.

<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">
There is what I have in the template html for easy ban

// 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);
		}
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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users