With the help of DJ i got this far , could someone please test if ok
gift.php
<?
include("backend/functions.php");
dbconn();
$start = gmtime();
$end = strtotime("2010-12-24 12:00:01");
$expires = round(($end - $start))/(60*60*24);
$expre = $expires + 1;
$xmasday= mktime(24,00,01,12,24,2010);
$today = mktime(date("G"), date("i"), date("s"), date("m"),date("d"),date("Y"));
$gifts = array("upload", "bonus", "invites");
$randgift = array_rand($gifts);
$gift = $gifts[$randgift];
$userid = 0 + $CURUSER["id"];
if(!is_valid_id($userid))
stderr("Error", "Invalid ID");
$open = 0 + $_GET["open"];
if($open != 1){
show_error_msg("Error","Invalid url");
}
if($open == 1){
if($today == $xmasday){
if($CURUSER["gift"] == 'no'){
if($gift == "upload"){
mysql_query("UPDATE users SET uploaded=uploaded+1024*1024*1024*2, gift='yes' WHERE id=$userid") or sqlerr(__FILE__, __LINE__);
show_error_msg("Congratulations!","<img src=\"/images/gift-box.png\" style=\"float: left; padding-right:10px;\"><h2> You just got 2 GB upload.</h2>Thanks for joining us! <br> Enjoy ur stay from the staff at ".$site_config['SITENAME']."");
}
if($gift == "bonus"){
mysql_query("UPDATE users SET seedbonus = seedbonus + 1200, gift='yes' WHERE id=$userid") or sqlerr(__FILE__, __LINE__);
show_error_msg("Congratulations!","<img src=\"/images/gift-box.png\" style=\"float: left; padding-right:10px;\"><h2> You just got 1200 bonus points!</h2>Thanks for joining us ! <br> Enjoy ur stay from the staff at ".$site_config['SITENAME']."");
}
if($gift == "invites") {
mysql_query("UPDATE users SET invites=invites+2, seedbonus = seedbonus + 700, gift='yes' WHERE id=$userid") or sqlerr(__FILE__, __LINE__);
show_error_msg("Congratulations!","<img src=\"/images/gift-box.png\" style=\"float: left; padding-right:10px;\"><h2> You just got 2 invites and 700 bonus points!</h2>Thanks for joining us ! <br> Enjoy ur stay from the staff at ".$site_config['SITENAME']."");
}
} else {
show_error_msg("Sorry...", "You already got your gift!");
}
} else {
show_error_msg("Sorry...", "Be patient! Can't open your present until Xmas Day! <b>" . $expires . "</b> day(s) to go. <br> Today:" . date('l dS \of F Y h:i:s A', $today) . "<br>Xmas Day:" . date('l dS \of F Y h:i:s A', $xmasday));
}
}
?>
just follow fozshell instructions but add this gift.php
thanks dj m8