Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    785
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by peterisgb

  1. $0. 😞 It's what I get I suppose for not using he main used engine and using mccodes.
  2. I have this dongle thing that allows me to plug my mouse and keyboard into my phone. I can hook anything with USB upto my phone. The ps3 controller has been the most oddest thing to hook up to the phone lol. 😄
  3. I didn't think of looking at the play store. I tried to use cpanel file manager on the Web browser (opera for me) and trying to edit files is impossible.
  4. I tried working on my site when my pc broke earlier this year, It was REALLY hard to do anything on a mobile.
  5. It's a shame because if I remember correctly they had made most of the game and I remember seeing a demo. Shame. Also this topic happens to be the 127,000 topic created 🙂
  6. Is there anyone still working on this, like is there anyone left on the team or has this been abandoned now?
  7. Heh, I still got the fles and data for infamous-wars.net, i would bring it back but its to much hassle updating everything.
  8. Oh, Nope sorry, Its all inhouse to my mods only. Welcome to take the idea and build your own. I may in the future once my system is set up fully to allow users to use it, but that wont be till new year at the Earliest.
  9. Yup. Update checker is available across all my mods.
  10. The avatar system is ready. Due to the time and work done both by me and my I've released it on the paid market place. With my update checker to check version.
  11. Me and magictallguy have been working on the mccodes avataaar for most of today. V1.0.1 will hopefully be on the market place later tonight once the final touches are done.
  12. I have this so far. Working on the Download part atm which is getting me for the moment. I might have it just update the display_pic in users settings or both.
  13. It use tables too, i know i shouldn't and should use divs.
  14. I'm on my phone so can't do much but head to that line and take out the trade_ part and have it just as function add()
  15. I use round star bars myself :D. There is an image that's my header pic on my profile currently
  16. All Done, I've also updated the buttons and the edit reward with a dropdown to make it easier and included my version checker in the staff panel too.
  17. Should check out gravatar.com It is used alot on a few different sites so i though why not 😄
  18. This isn't a big mod if a mod at all. This mod/snippit allows you to replace your in game profile_pic with your Gravatar image. It will display a gravatar image if user doesn't have a profile pic. Place this Snippit into where you wish to display. Change $r to $ir where necessary. if ('Male' == $r['gender']) { $gender = 'images/male.png'; } else { $gender = 'images/female.png'; } $email = $r['email']; $default = $gender; $size = 40; $grav_url = "https://www.gravatar.com/avatar/" . md5( strtolower( trim( $email ) ) ) . "?d=" . urlencode( $default ) . "&s=" . $size; if ($r['display_pic']) { echo '<img src="'.$r['display_pic'].'" width="40" height="40" class="avatar">'; } else { echo '<img src="'.$grav_url.'" class="avatar">'; } Upload images to images/ directory. The comments gave me the idea to make avataaars mod. Which is on the market place. Thanks.
  19. This Mod was Created by Illusions and HAUNTED DAWG in 2009. I have since updated it and made it look nicer and made sure it works with the latest version of mccodes. Place this into your phomyadmin INSERT INTO `settings` (`conf_id`, `conf_name`, `conf_value`) VALUES ('18', 'editpage', 'explore.php'); Add these links to smenu.php <a href='fileeditor.php?action=startfile'>Create PHP Page</a> <a href='fileeditor.php?action=edit'>Edit PHP Page</a> Create php file and name it fileeditor.php and dump this into it. <style type="text/css" media="screen"> .button { background-color: #4CAF50; border-radius: 10px; border: none; color: white; padding: 8px 25px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 2px 1px; cursor: pointer; } input[type='text'] { width: 221px; color : #423232; height:25px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } textarea[name='filetext'] { width: 500px; color : #423232; height: 250px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } body { background-color: #cdcdcd; } </style> <?php // CREATED FOR MCCODES V2 BY ILLUSIONS AND HAUNTED DAWG 2009 // // AS I USUALLY DONT CARE ABOUT NOTICES STAYING INTACT I WOULD LIKE THIS ONE TO STAY IS ITS A JOINT EFFORT THANKS ALL // // Updated by PeterisGB 2020 // require "sglobals.php"; switch($_GET['action']) { case "startfile": startfile(); break; case "startprocess": startprocess(); break; case 'edit': editpage(); break; default: echo 'Error: This script requires an action.'; break; } function startfile() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { echo 'ACCESS DENIED'; $h->endpage(); exit; } echo '<br /><br /><h2>Create File</h2> Always make a backup of any copy before using this system.<br /> <hr /> The file name and Data you create on here will also be Created on your FTP.<br /> You can use any file Format for EXAMPLE test.php, test.html, test.css.<br /> You can overwrite a file simply by giving it the same file name.[i] <hr/ > <form action="fileeditor.php?action=startprocess" method="_POST"> Create File Name: <input type="text" name="name" placeholder="example: explore.php"> <hr>Copy and Paste Data Below or Create New Data<hr> <textarea name="filetext" placeholder="Place PHP script HERE"></textarea><br /> <input type="submit" value="Create New File" class="button"></form> <hr> '; } { $h->endpage(); exit; } // We use isset so we dont get the undefined index blah blah errors // We check if they have hit the submit button function startprocess() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die('ACCESS DENIED'); $h->endpage(); exit; } $name = $_POST['name']; if( isset($_POST['name']) ) { //We open the name as w since w stands as wright. <a href="http://www.php.net/fopen" target="_blank">http://www.php.net/fopen</a> is a good tutorial chmod($name, 0755); $fo = fopen($filetext."$name", "w"); fwrite($fo, $pick); //Since we stripped the </textarea> to <+textarea+> we need to convert back to </textarea> //Since this is editing a name, we can not really put in any security only that ID 1 can edit it // GET FILE VIEW FOR FTP TRANSFER $conv = stripslashes(($_POST['filetext'])); if(fwrite($fo, $conv)) { echo '<h2>If you see an error message above regards CHMOD just ignore it.<br /> It just means that the file never exsisted in the first place once its on your FTP the error message will not be displayed.</h2> <font color="green"> <h1>File Name</h1></font> <font color="red"><h1>'.$name.'</font></h1> <font color="green"><h1> Created and Saved to FTP</h1></font> <font color="green"><h1> File is now Available for Use in Game</h1></font>'; } else { echo '<font color="red"><h1>File '.$name.' Could not be Written Please Try Again</h1></font>'; } fclose($fo); } else { //Bellow we fetch name contents using name_get_contents. <a href='www.php.net/name_get_contents'>http://www.php.net/name_get_contents</a> is a good tutorial $tup = file_get_contents($name); //Since if the name has </textarea> in it, it will screw up this code. Convert it out to <+textarea+> $tup = stripslashes(($_POST['filetext'])); //Bellow you should understand what it does. echo '<form action="'.$_SERVER['PHP_SELF'].'?action=startfile" method="post"> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="'.$name.'"></iframe> <input type="submit" value="Create Another File"> </form>'; } } function editpage() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); $h->endpage(); exit; } if($_POST['submit']) { unset($_POST['submit']); foreach($_POST as $k => $v) { $db->query("UPDATE `settings` SET conf_value='$v' WHERE conf_name='$k'"); } echo '<br /><br /><br /><br />Page Loaded.<br /><br /> <a href="filedata.php"><h2>Continue</h2></a>'; stafflog_add("Editing Page {$_POST['editpage']}"); } else { $page = $set['editpage']; echo " <h3>Edit Page</h3><hr /> <form action='filedata.php?action=edit' method='POST'> <input type='hidden' name='submit' value='1'> Edit Page Url: <input type='text' name='editpage' value='$page'><br /> E.g = explore.php<br /> <input type='submit' value='Edit' class='button'></form>"; } } ?> and create a php file called filedata.php and dump this. <style type="text/css" media="screen"> .button { background-color: #4CAF50; border-radius: 10px; border: none; color: white; padding: 8px 25px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 2px 1px; cursor: pointer; } input[type='text'] { width: 221px; color : #423232; height:25px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } textarea[name='filetext'] { width: 500px; color : #423232; height: 250px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } body { background-color: #cdcdcd; } </style> <?php // CREATED FOR MCCODES V2 BY ILLUSIONS AND HAUNTED DAWG 2009 // // AS I USUALLY DONT CARE ABOUT NOTICES STAYING INTACT I WOULD LIKE THIS ONE TO STAY IS ITS A JOINT EFFORT THANKS ALL // // Updated by PeterisGB 2020 // require "sglobals.php"; global $db,$ir,$r,$set; if($ir['user_level'] != 2) { die('ACCESS DENIED'); $h->endpage(); exit; } $file = ''.$set['editpage'].''; //changing this name will also change the REAL VIEW MODE to the correct file // THE CONTENTS OF $file CAN BE OF ANY METHOD EXAMPLE HTML, CSS, PHP, ASX /////////////////////////////////////////////////////////////////////////////////////////////////////// // REMEMBER YOU CAN ALSO AMEND THIS FILE TO ALTER THE NAME OF THE $FILE NAME YOUR EDITING /// ////////////////////////////////////////////////////////////////////////////////////////////////////// //We use isset so we dont get the undefined index blah blah errors //We check if they have hit the submit button if( isset($_POST['file']) ) { //We open the file as w since w stands as write. <a href='www.php.net/fopen'>http://www.php.net/fopen</a> is a good tutorial chmod($file, 0755); $fo = fopen($file, 'w'); //Since we stripped the <+textarea+> to <+textarea+> we need to convert back to <+textarea+> //Since this is editing a file, we can not really put in any security only that ID 1 can edit it // I USED STRIPSLASHES INSTEAD OF PREG_REPLACE COS IT ****ED THINGS UP $conv = stripslashes($_POST['file']); if(fwrite($fo, $conv)) { echo '<font color="green"><h1>File Ammended And Saved</h1></font> <h1>New file view Below Check for errors if any</h1> <table width="100%" border="10" cellpadding="4" cellspacing="0"><td> <textarea name="file" cols="150" rows="15">'.$conv.'<+textarea+></td></table> <body bgcolor="#000000"> <a href="fileeditor.php?action=startfile" class="button">[>>> Create New File <<<]</a> <a href="filedata.php" class"button">[>>> RETURN TO EDIT '.$file.' <<<]</a> <hr><h1>REAL VIEW OF AMMENDED FILE BELOW</h1> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="'.$file.'"></iframe> </body> </html>'; } else { echo '<font color="red">Could not save file.</font>'; } fclose($fo); } else { //Below we fetch file contents using name_get_contents. <a href='www.php.net/name_get_contents'>http://www.php.net/name_get_contents</a> is a good tutorial //FOOTNOTE i changed name_get to file_get as the textarea wasnt working right and kept adding back slashes to the script. //so i suppose php.net dont know everything he he he he $tup = file_get_contents($file); //Since if the file has <+textarea+> in it, it will screw up this code. Convert it out to <+textarea+> $tup = preg_replace('~<+textarea+>~is','<textarea>',$tup); //Bellow you should understand what it does. echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post"> <h1>Editing File '.$file.'</h1> <table width="100%" border="10" cellpadding="4" cellspacing="0"><td> <textarea name="file" cols="150" rows="15">'.$tup.'</textarea></td></table> <input type="submit" value="Save And Ammend File" class="button"><br /> <a href="filededitor.php?action=startfile" class="button">[>>> GOTO FILE CREATOR <<<]</a><br /> <a href="filedata.php" class="button">[>>> REFRESH CURRENT PAGE DATA <<<]</a><br /> <hr><h1>UNEDITED FILE BELOW REAL VIEW</h1> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="'.$file.'"></iframe> <input type="submit" value="Save And Ammend File" class="button"> </form>'; } $h->endpage(); ?> Screenshots below.
  20. I remember using this at the time, was pretty good. Shame
  21. Nice Design. I kept mine simple and different. This is My header.
  22. One of the main reasons i did it the way i did was as once it hits 28 it need to go back down to 1 and i wasn't sure how to do that. I tried to give this a go but as the X has moved i don't know how i would change the switch case :S
  23. I decided to make a Daily Rewards System. It has a built in staff panel. Sql's for the Rewards CREATE TABLE `dailyrewards` ( `id` int(11) NOT NULL, `day` int(11) DEFAULT NULL, `week` int(11) DEFAULT NULL, `image` varchar(255) DEFAULT NULL, `prize` varchar(255) DEFAULT NULL, `textcolour` varchar(255) DEFAULT NULL, `prizedisplay` varchar(255) DEFAULT NULL, `amount` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Sql's for the User ALTER TABLE users ADD dailytoken INT NOT NULL DEFAULT 1, ADD daily INT NOT NULL DEFAULT 0; And finally the Page dailyrewards.php <?php include_once('globals.php'); ?> <style type="text/css" media="screen"> table.greenTable { font-family: Georgia, serif; border: 6px solid #9ACD32; background-color: #709624; width: 100%; text-align: center; } table.greenTable td, table.greenTable th { border: 1px solid #9ACD32; padding: 3px 2px; } table.greenTable tbody td { font-size: 13px; } table.greenTable tr:nth-child(even) { background: #9ACD32; } table.greenTable thead { background: #9ACD32; background: -moz-linear-gradient(top, #b3d965 0%, #a4d246 66%, #9ACD32 100%); background: -webkit-linear-gradient(top, #b3d965 0%, #a4d246 66%, #9ACD32 100%); background: linear-gradient(to bottom, #b3d965 0%, #a4d246 66%, #9ACD32 100%); border-bottom: 0px solid #444444; } table.greenTable thead th { font-size: 19px; font-weight: bold; color: #F0F0F0; text-align: left; border-left: 2px solid #9ACD32; } table.greenTable thead th:first-child { border-left: none; } table.greenTable tfoot { font-size: 13px; font-weight: bold; color: #F0F0F0; background: #24943A; background: -moz-linear-gradient(top, #5baf6b 0%, #3a9e4d 66%, #24943A 100%); background: -webkit-linear-gradient(top, #5baf6b 0%, #3a9e4d 66%, #24943A 100%); background: linear-gradient(to bottom, #5baf6b 0%, #3a9e4d 66%, #24943A 100%); border-top: 1px solid #24943A; } table.greenTable tfoot td { font-size: 13px; } table.greenTable tfoot .links { text-align: right; } table.greenTable tfoot .links a{ display: inline-block; background: #FFFFFF; color: #24943A; padding: 2px 8px; border-radius: 5px; } .button { background-color: #787878; border-radius: 10px; border: none; color: white; padding: 8px 25px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 2px 1px; cursor: pointer; } input[type='text'] { width: 221px; background: transparent url('images/bg.jpg') no-repeat; color : #423232; height:20px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } .dropdown { width: 200px; background: transparent url('images/bg.jpg') no-repeat; color : #423232; height:30px; border:1; padding:4px 8px; margin-bottom:0px; border-radius: 10px; } </style> <?php echo '<h2>Daily Rewards</h2><hr />'; $_GET['staff'] = !empty($_GET['staff']) ? $_GET['staff'] : ''; switch($_GET['staff']) { case 'staff': staff_panel(); break; case 'add': add(); break; case 'addreward': add_go(); break; case 'edit': edit(); break; case 'delete': delete(); break; } function staff_panel() { global $db,$ir,$userid,$h; $version='1.4.8'; echo '<h2 class="fontface">Staff Panel</h2> <br /><br /> <a href="?staff=add" class="button">Add Reward</a><br /> <a href="?staff=edit" class="button">Edit Reward</a><br /> <a href="?staff=delete" class="button">Delete Reward</a><br /> <br /><a href="dailyrewards.php" class="button">Back</a><br /> <iframe src="https://www.arcadiagames.tk/update/update_check.php?v='.$version.'&mod=daily-rewards" width="250" height="60" scrolling="no" frameborder="1"></iframe> '; $h->endpage(); exit; } function add() { global $db, $h, $userid; echo '<h2 class="fontface">Add Daily Reward</h2><hr /> <form action="?staff=addreward" method="POST"> Day: <input type="text" name="dayz" placeholder="Day of the Week"><br /> Week: <input type="text" name="week" placeholder="Which Week?"><br /> Icon <input type="text" name="image" placeholder="icons/"><br /> DB reward: <input type="text" name="prize" placeholder="Reward Type (money, donatordays etc)"><br /> Prize Text Colour: <input type="text" name="textcolour" placeholder="red"><br /> Prize Text Disply: <input type="text" name="prizedisplay" placeholder="Money, Days etc"><br /> Reward: <input type="text" name="amount" placeholder="1000"><br /> <input type="submit" class="button" value="Add Reward"></form> <br /><a href="?staff=staff" class="button">Back</a>'; $h->endpage(); exit; } function add_go() { global $db, $h, $userid; $day = array_key_exists('day', $_POST) && ctype_digit($_POST['day']) && $_POST['day'] > 0 ? $_POST['day'] : null; $week = array_key_exists('week', $_POST) && ctype_digit($_POST['week']) && $_POST['week'] > 0 ? $_POST['week'] : null; $image = array_key_exists('image', $_POST) && is_string($_POST['image']) ? stripslashes(htmlspecialchars($_POST['image'])) : null; $prize = array_key_exists('prize', $_POST) && ctype_digit($_POST['prize']) && $_POST['prize'] > 0 ? $_POST['prize'] : null; $textc = array_key_exists('textcolour', $_POST) && is_string($_POST['textcolour']) && ctype_alnum($_POST['textcolour']) ? strip_tags($_POST['textcolour']) : null; $prized = array_key_exists('prizedisplay', $_POST) && is_string($_POST['prizedisplay']) && ctype_alnum($_POST['prizedisplay']) ? strip_tags($_POST['prizedisplay']) : null; $amount = array_key_exists('amount', $_POST) && ctype_digit($_POST['amount']) && $_POST['amount'] > 0 ? $_POST['amount'] : null; $db->query("INSERT INTO dailyrewards VALUES(NULL, '$day', '$week', '$image', '$prize', '$textc', '$prized','$amount')"); echo 'Reward Day '.$day.', Week '.$week.' added to the game. <br /><a href="dailyrewards.php" class="button">Back</a>'; stafflog_add("Made Daily Reward for $day day and $week week."); $h->endpage(); exit; } function edit() { global $db, $ir, $c, $h, $userid; $_POST['step'] = !empty($_POST['step']) ? $_POST['step'] : ''; switch($_POST['step']) { case "2": $day = array_key_exists('day', $_POST) && ctype_digit($_POST['day']) && $_POST['day'] > 0 ? $_POST['day'] : null; $week = array_key_exists('week', $_POST) && ctype_digit($_POST['week']) && $_POST['week'] > 0 ? $_POST['week'] : null; $image = array_key_exists('image', $_POST) && is_string($_POST['image']) ? stripslashes(htmlspecialchars($_POST['image'])) : null; $prize = array_key_exists('prize', $_POST) && ctype_digit($_POST['prize']) && $_POST['prize'] > 0 ? $_POST['prize'] : null; $textc = array_key_exists('textcolour', $_POST) && is_string($_POST['textcolour']) && ctype_alnum($_POST['textcolour']) ? strip_tags($_POST['textcolour']) : null; $prized = array_key_exists('prizedisplay', $_POST) && is_string($_POST['prizedisplay']) && ctype_alnum($_POST['prizedisplay']) ? strip_tags($_POST['prizedisplay']) : null; $amount = array_key_exists('amount', $_POST) && ctype_digit($_POST['amount']) && $_POST['amount'] > 0 ? $_POST['amount'] : null; $dail=$db->query("SELECT * FROM dailyrewards WHERE day='{$day}'"); $day=$_POST['day']; $dail=$db->query("SELECT * FROM dailyrewards WHERE day={$_POST['day']}"); $old=$db->fetch_row($dail); $db->query("UPDATE dailyrewards SET day=$day, week='$week', image='$image', prize='$prize', textcolour='$textc', prizedisplay='$prized', amount='$amount' WHERE day={$_POST['day']}"); echo 'Daily Reward day '.$day.' was edited successfully.'; stafflog_add("Edited reward day $day"); $h->endpage(); exit; break; case "1": $dr=$db->query("SELECT * FROM dailyrewards WHERE day={$_POST['day']}"); $old=$db->fetch_row($dr); echo '<h2 class="fontface">Editing a reward</h2><hr /> <form action="?staff=edit" method="POST"> <input type="hidden" name="step" value="2"> <input type="hidden" name="day" value="'.$_POST['day'].'"> Day: <input type="text" name="day" value="'.$old['day'].'"><br /> Week: <input type="text" name="week" value="'.$old['week'].'"><br /> Icon <input type="text" name="image" value="'.$old['image'].'"><br /> DB reward: <input type="text" name="prize" value="'.$old['prize'].'"><br /> Prize Text Colour: <input type="text" name="textcolour" value="'.$old['textcolour'].'"><br /> Prize Text Disply: <input type="text" name="prizedisplay" value="'.$old['prizedisplay'].'"><br /> Reward: <input type="text" name="amount" value="'.$old['amount'].'"><br /> <input type="submit" value="Edit Reward" class="button"></form>'; $h->endpage(); exit; break; default: echo '<h2 class="fontface">Editing a Reward</h2><hr /> <form action="?staff=edit" method="POST"> <input type="hidden" name="step" value="1"> Select voting site: '; function day_dropdown($connection, $ddname = "day", $selected = -1) { global $db; $ret = "<select name='$ddname' type='dropdown' class='dropdown'>"; $q = $db->query("SELECT `day`, `week` FROM `dailyrewards` ORDER BY `day` ASC"); if ($selected == -1) { $first = 0; } else { $first = 1; } while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['day']}'"; if ($selected == $r['day'] || $first == 0) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['day']}</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } echo ''.day_dropdown(NULL, 'day').'<br /> <input type="submit" value="Edit Reward" class="button"></form>'; $h->endpage(); exit; break; } } function delete() { global $db,$c,$h,$userid; $_POST['day'] = !empty($_POST['day']) ? $_POST['day'] : ''; if($_POST['day']) { $day = $_POST['day']; $dr=$db->query("SELECT * FROM dailyrewards WHERE day=$day"); $old=$db->fetch_row($dr); $db->query("DELETE FROM dailyrewards WHERE day=$day"); echo 'Day '.$day.' deleted.'; stafflog_add("Deleted Reward Day $day"); $h->endpage(); exit; } else { echo '<h2 class="fontface">Delete Day</h2><hr /> Deleting a Reward. <form action="?staff=delete" method="POST"> Select Day: '; function day_dropdown($connection, $ddname = "day", $selected = -1) { global $db; $ret = "<select name='$ddname' type='dropdown' class='dropdown'>"; $q = $db->query("SELECT `day`, `week` FROM `dailyrewards` ORDER BY `day` ASC"); if ($selected == -1) { $first = 0; } else { $first = 1; } while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['day']}'"; if ($selected == $r['day'] || $first == 0) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['day']}</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } echo ''.day_dropdown(NULL, 'day').'<br /> <input type="submit" value="Delete Reward" class="button"></form>'; $h->endpage(); exit; } } $_GET['claim'] = array_key_exists('claim', $_GET) && is_numeric($_GET['claim']) ? (int)$_GET['claim'] : null; switch($_GET['claim']) { case '1': day1(); break; case '2': day2(); break; case '3': day3(); break; case '4': day4(); break; case '5': day5(); break; case '6': day6(); break; case '7': day7(); break; case '8': day8(); break; case '9': day9(); break; case '10': day10(); break; case '11': day11(); break; case '12': day12(); break; case '13': day13(); break; case '14': day14(); break; case '15': day15(); break; case '16': day16(); break; case '17': day17(); break; case '18': day18(); break; case '19': day19(); break; case '20': day20(); break; case '21': day21(); break; case '22': day22(); break; case '23': day23(); break; case '24': day24(); break; case '25': day25(); break; case '26': day26(); break; case '27': day27(); break; case '28': day28(); break; default: index(); break; } function index() { global $db,$ir,$c,$userid,$h; $daily = $ir['daily']; $token = $ir['dailytoken']; echo ' You are on day <span class="brightred">'.$daily.'</span>.<br /> '; if ($token >= 1) { echo 'You have a Token for today.'; } else { echo 'You Don\'t have a token for today.'; } echo '<hr /><br />'; if ($ir['user_level'] == 2) { echo '<a href="?staff=staff" class="button">Staff Panel</a>'; } echo ' <table class="greenTable" style="height: 396px;" width="615"><tbody> <tr><td>WEEK 1</td>'; $reward = $db->query("SELECT * FROM dailyrewards WHERE week=1 ORDER BY day"); while ($dr = $db->fetch_row($reward)) { echo '<td>DAY: '.$dr['day'].'<br /><img src="'.$dr['image'].'" alt="'.$dr['prizedisplay'].'" width="30px" height="30px"><br /><span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).' '.$dr['prizedisplay'].'</b></span></td>'; } echo '</tr> <tr> <td></td> <td>'; if ($daily <= '1') { echo '<a href="?claim=1"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '2') { echo '<a href="?claim=2"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '3') { echo '<a href="?claim=3"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '4') { echo '<a href="?claim=4"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '5') { echo '<a href="?claim=5"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '6') { echo '<a href="?claim=6"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '7') { echo '<a href="?claim=7"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> </tr> <tr><td>WEEK 2</td>'; $reward = $db->query("SELECT * FROM dailyrewards WHERE week=2 ORDER BY day"); while ($dr = $db->fetch_row($reward)) { echo '<td>DAY: '.$dr['day'].'<br /><img src="'.$dr['image'].'" alt="'.$dr['prizedisplay'].'" width="30px" height="30px"><br /><span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).' '.$dr['prizedisplay'].'</b></span></td>'; } echo '</tr> <tr> <td></td> <td>'; if ($daily == '8') { echo '<a href="?claim=8"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '9') { echo '<a href="?claim=9"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '10') { echo '<a href="?claim=10"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '11') { echo '<a href="?claim=11"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '12') { echo '<a href="?claim=12"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '13') { echo '<a href="?claim=13"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '14') { echo '<a href="?claim=14"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> </tr> <tr><td>WEEK 3</td>'; $reward = $db->query("SELECT * FROM dailyrewards WHERE week=3 ORDER BY day"); while ($dr = $db->fetch_row($reward)) { echo '<td>DAY: '.$dr['day'].'<br /><img src="'.$dr['image'].'" alt="'.$dr['prizedisplay'].'" width="30px" height="30px"><br /><span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).' '.$dr['prizedisplay'].'</b></span></td>'; } echo '</tr> <tr> <td></td> <td>'; if ($daily == '15') { echo '<a href="?claim=15"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '16') { echo '<a href="?claim=16"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '17') { echo '<a href="?claim=17"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '18') { echo '<a href="?claim=18"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '19') { echo '<a href="?claim=19"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '20') { echo '<a href="?claim=20"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '21') { echo '<a href="?claim=21"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> </tr> <tr><td>WEEK 4</td>'; $reward = $db->query("SELECT * FROM dailyrewards WHERE week=4 ORDER BY day"); while ($dr = $db->fetch_row($reward)) { echo '<td>DAY: '.$dr['day'].'<br /><img src="'.$dr['image'].'" alt="'.$dr['prizedisplay'].'" width="30px" height="30px"><br /><span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).' '.$dr['prizedisplay'].'</b></span></td>'; } echo '</tr> <tr> <td></td> <td>'; if ($daily == '22') { echo '<a href="?claim=22"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '23') { echo '<a href="?claim=23"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '24') { echo '<a href="?claim=24"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '25') { echo '<a href="?claim=25"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '26') { echo '<a href="?claim=26"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '27') { echo '<a href="?claim=27"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> <td>'; if ($daily == '28') { echo '<a href="?claim=28"><span class="brightred"><b>Claim</b></span></a>'; } echo '</td> </tr> </tbody> </table>'; } function day1() { global $db,$ir,$c,$userid,$h; $day = 1; $daily = 2; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day2() { global $db,$ir,$c,$userid,$h; $day = 2; $daily = 3; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day3() { global $db,$ir,$c,$userid,$h; $day = 3; $daily = 4; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day4() { global $db,$ir,$c,$userid,$h; $day = 4; $daily = 5; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day5() { global $db,$ir,$c,$userid,$h; $day = 5; $daily = 6; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day6() { global $db,$ir,$c,$userid,$h; $day = 6; $daily = 7; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day7() { global $db,$ir,$c,$userid,$h; $day = 7; $daily = 8; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day8() { global $db,$ir,$c,$userid,$h; $day = 8; $daily = 9; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day9() { global $db,$ir,$c,$userid,$h; $day = 9; $daily = 10; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day10() { global $db,$ir,$c,$userid,$h; $day = 10; $daily = 11; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day11() { global $db,$ir,$c,$userid,$h; $day = 11; $daily = 12; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day12() { global $db,$ir,$c,$userid,$h; $day = 12; $daily = 13; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day13() { global $db,$ir,$c,$userid,$h; $day = 13; $daily = 14; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day14() { global $db,$ir,$c,$userid,$h; $day = 14; $daily = 15; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day15() { global $db,$ir,$c,$userid,$h; $day = 15; $daily = 16; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day16() { global $db,$ir,$c,$userid,$h; $day = 16; $daily = 17; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day17() { global $db,$ir,$c,$userid,$h; $day = 17; $daily = 18; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day18() { global $db,$ir,$c,$userid,$h; $day = 18; $daily = 19; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day19() { global $db,$ir,$c,$userid,$h; $day = 19; $daily = 20; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day20() { global $db,$ir,$c,$userid,$h; $day = 20; $daily = 21; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day21() { global $db,$ir,$c,$userid,$h; $day = 21; $daily = 22; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day22() { global $db,$ir,$c,$userid,$h; $day = 22; $daily = 23; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day23() { global $db,$ir,$c,$userid,$h; $day = 23; $daily = 24; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day24() { global $db,$ir,$c,$userid,$h; $day = 24; $daily = 25; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day25() { global $db,$ir,$c,$userid,$h; $day = 25; $daily = 26; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day26() { global $db,$ir,$c,$userid,$h; $day = 26; $daily = 27; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day27() { global $db,$ir,$c,$userid,$h; $day = 27; $daily = 28; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } function day28() { global $db,$ir,$c,$userid,$h; $day = 28; $daily = 1; $token = $ir['dailytoken']; $reward = $db->query("SELECT * FROM dailyrewards WHERE day=$day ORDER BY day"); $dr = $db->fetch_row($reward); $prize = $dr['prize']; $amount = $dr['amount']; if($token <= 0) { die('You have no tokens to Trade.<br /> Come back Tomorrow.<br /><a href="dailyrewards.php">Back</a>'); $h->endpage(); } if($token >= 0) { echo '<br />Welcome to Day <span class="brightred">'.$dr['day'].'</span><br /> You have been rewared with <span class="'.$dr['textcolour'].'"><b>'.number_format($dr['amount']).'</b></span> '.$dr['prizedisplay'].'.<br /> <a href="dailyrewards.php">Back</a>'; $db->query("UPDATE users SET $prize=$prize+$amount, daily=$daily, dailytoken=dailytoken-1 WHERE userid=$userid"); } else { echo 'You cannot Claim this.<br /><a href="dailyrewards.php">Back</a>'; } $h->endpage(); } echo '<br /><hr /></center> <h5>Info</h5><small> 1. You can Claim 1 Reward a day.<br /> 2. You will only get 1 token at a time.<br /> 3. You will get your token at 5pm Each day and you have to be active in the last 24 hours to Get one.<br /> 4. Reward Payouts May change without notice. </small><center> '; $h->endpage(); ?> Add this to your Daily Cron. $db->query('UPDATE users SET dailytoken=1 WHERE dailytoken=0 AND laston>unix_timestamp()-1440*60'); I'm not the best or tidiest, but it works. Feedback welcome, NOT DIGS tho. A postback of this code if you make it better below would be great. Enjoy.
  24. I run a texted based game, Dont get much help from people, Dedicated and never done it for the money, (not that its ever made much)
  25. yup from his website and a pm on skype from someone who knows him in real life. He was in the middle of working on my site with me just before his passing so i have his last few mods he ever made. ?
×
×
  • Create New...