Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD]Give user a gift
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-10-17 23:18:44
Great...It's running...;)
Unknown User
2009-12-17 15:27:48
***DELETED***
Unknown User
2010-11-05 11:18:39
sorry to bring this one up again peeps , but i thought about adding it again this xmas , but just re-introduced the block , and reset gifts , but it allows me to open the gift today lmao .......any ideas to set date correctly to xmas day , many thanks in advance

found this

$xmasday= mktime(24,01,01,12,24,2007);

$today = mktime(date("G"), date("i"), date("s"), date("m"),date("d"),date("Y"));


but needs porting to tt (thanks to tbdev)
Unknown User
2010-11-05 20:44:32
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
Unknown User
2010-12-26 11:05:24
Is there a way to make this one reset itself everyday at a certain time. Lets say at 12.00.
Unknown User
2010-12-27 22:53:03
yes freeinfo that is possible, to make it easy i would use a database table and there is one already that would fit nicely. well you could use the tasks table and do it like the automatic_cleanup function but make it for time + 86400 which is 24hours or to be specific to  a set date set it manually to trigger it and then use that next time ur on msn il give u a hand
Unknown User
2011-03-12 14:05:02
it's possible to change this mod for automaticly gift for users birthday, and admin panel choose different gift?

thx
Unknown User
2011-06-04 00:35:42
why receiving

MySQL error occured.

Query: /home/daany/public_html/gift.php

Error: (0)

anyone have any ideas?

in database:

Your SQL query has been executed successfully ( Query took 0.0283 sec )

ALTER TABLE `users` ADD `gift` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';
Unknown User
2011-06-04 00:49:56
"loredan mihai, post: 72923":
why receiving
MySQL error occured.

Query: /home/daany/public_html/gift.php

Error: (0)

anyone have any ideas?

in database:

Your SQL query has been executed successfully ( Query took 0.0283 sec )

ALTER TABLE `users` ADD `gift` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';



ah ..it work:)

After 5 min

You just got 7 GB upload.

rnThanks for Joining us!

Enjoy ur stay from the staff at LS.File '
Unknown User
2011-08-26 01:21:23
"Majestic, post: 71286":
it's possible to change this mod for automaticly gift for users birthday, and admin panel choose different gift?thx

Hi Majestic,

I am in the same way of majestic.  I would like to give a GIFT to a member that has is birthday.  I've had a hard time to find a BIRTHDAY MOD that works.   I think the gift MOD is easier than having the FREELEECH DAY!  Why?  Because you never know if the member will connect that day.  Or maybe I am wrong and someone as already develop a MOD that would let the member who has received a FREELEECH DAY GIFT to choose the DAY he wants to use it!  This could be amazing too!

Thanx. Regards.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728