TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Mods & hacks Mods In Progress Present on christmas
Page 1 2

Present on christmas

2007-06-27 21:43:00
Group: Member
Posts: 449
Topics participated: 234
Topics started: 62
First post: 2006-05-23 23:18:00
Last post: 2008-06-20 20:33:00
SQL:
ALTER TABLE `users` ADD `preset_given` ENUM('yes','no') NOT NULL default 'no';


code for cleanup.php:
// give all confirmed users 3 gb upload
$date = 2006-12-24 00:01:00;
$msg = sqlesc("". $SITENAME ." wish you a merry christmas. You get a present of 3 gb upload.");
$time = ". get_date_time() .";
if ($time >= $date) {
$res = mysql_query("SELECT id FROM user WHERE present_given ='no' AND status = 'confirmed'") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res)) {
mysql_query("UPDATE users SET uploaded = uploaded + 3221225472 AND present_given = 'yes'
 
2007-06-28 15:11:00
Group: Member
Posts: 1701
Topics participated: 760
Topics started: 199
First post: 2007-04-06 23:17:00
Last post: 2009-01-04 00:36:00
nice work cue they will be happy :)
 
2007-06-28 16:43:00
Group: Member
Posts: 351
Topics participated: 233
Topics started: 17
First post: 2006-06-06 17:18:00
Last post: 2008-12-28 14:00:00
looks gr8 mod...but getting a white page on it as soon as i uploaded cleanup
 
2007-06-28 23:47:00
Group: Member
Posts: 105
Topics participated: 50
Topics started: 8
First post: 2007-01-03 19:24:00
Last post: 2008-10-18 15:31:00
looks gr8 mod...but getting a white page on it as soon as i uploaded cleanup



I think that would be a simple spelling error :)

Change
ALTER TABLE `users` ADD `preset_given` ENUM('yes','no') NOT NULL default 'no';


to
ALTER TABLE `users` ADD `present_given` ENUM('yes','no') NOT NULL default 'no';


;)
 
2007-06-29 07:40:00
Group: Member
Posts: 122
Topics participated: 39
Topics started: 5
First post: 2006-12-01 18:58:00
Last post: 2007-09-29 19:19:00
this line
gives me an error

$date = 2006-12-05 00:01:00;

Parse error: parse error, unexpected T_LNUMBER in
 
2007-06-29 11:48:00
Group: Member
Posts: 27
Topics participated: 13
Topics started: 1
First post: 2007-01-25 20:02:00
Last post: 2008-09-03 16:23:00
remove 00:01:00 an it will work!
 
2007-06-29 00:13:00
Group: Member
Posts: 351
Topics participated: 233
Topics started: 17
First post: 2006-06-06 17:18:00
Last post: 2008-12-28 14:00:00
perfect...thanks 4 the fix...i should of noticed it really...lmao
 
2007-06-29 15:04:00
Group: Member
Posts: 122
Topics participated: 39
Topics started: 5
First post: 2006-12-01 18:58:00
Last post: 2007-09-29 19:19:00
thanks for the help that did it

works now i hope it will work on the date

thanks nice mod Ceu
 
2007-07-01 14:50:00
Group: Member
Posts: 408
Topics participated: 196
Topics started: 62
First post: 2007-02-09 20:22:00
Last post: 2008-12-05 15:57:00
would it not be

$date = ("2006-12-24") . ":01:00";

or something around the lines of that




tested: got no errors...didnt work


testing another way.... ill update soon
 
2007-07-04 00:22:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
$date = "2006-12-24 01:00:00";


basic of date time in php
 

Similar threads

Topic Posts Last post
Birthday present 21 2007-07-20 02:10:00
CHRISTMAS IS HERE!!! 5 2006-07-25 12:23:00
Christmas Stylesheet 12 2006-07-02 02:11:00
Merry Christmas all at TBDEV 8 2008-07-24 12:41:00
Countdown to Christmas or New Year!! 9 2008-07-06 20:21:00