Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    738
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by peterisgb

  1. its working now but i kinda got a little problem. $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) These Lines grabs the Number from the Address bar, as its in the inteactive menu how do i get the GET to collect the link from an iframe?
  2. any help on this. once this is done i can release this mod, (free)
  3. still didnt work, maybe i am blind and cant see the problems lol would someone do a patch up so it will work and i will read it and learn my errors.
  4. ok thanks, i'll give it a go, ty.
  5. yeah, i cannot use the globals and its in the interactive menu, I have managed to get several other pages working fine within the interactive menu which are, Armoury, Shortcuts, - Basic Bank - Credit Card - Cyber Bank - Point Bank - Point Trader - Gym - Crimes (this is the one in question. Player Stats, Player Bars, Energy Refill in tab 2, Its Just this page is the one getting me lol, i just dont get why all these pages work and the crimes does not. One this is compeleted and finnished totall i might release it.
  6. ok, so what would i need to do to solve this issue, and line 23 was given to my in another post i made a while back,
  7. i have an interactivem menu in my game, most of it works, i have recently been trying to add in a Crimes page into the menu Below is what i have so far and need a pointer in the right direction its the docrime.php for the menu. the problem that is occuring is it keeps saying "You do not have enough Brave to perform this crime." Thanks   <?php $macropage="criminaldocrime.php?c={$_GET['c']}"; session_start(); if (!isset ($_SESSION['userid']) ) { echo '<p>Not logged in.</p>'; exit; } include "config.php"; global $_CONFIG,$set; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $userid = $db->query('SELECT `userid` FROM `users` WHERE (`userid` = '.$_SESSION['userid'].')'); $ir = $db->query('SELECT `userid`, `hospital`, `jail`, `level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `exp`, `hp`, `maxhp`, `gymxp`, `gexp_needed` FROM `users` WHERE (`userid` = '.$_SESSION['userid'].')'); $r = $db->query('SELECT `crimeNAME`, `crimeBRAVE`, `crimeID`, `crimePERCFORM`, `crimeITEXT`, `crimeSUCCESSMUNY`, `crimeSTEXT`, `crimeSUCCESSCRYS`, `crimeXP`, `crimeSUCCESSITEM` , `crimeFTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeJTEXT` FROM crimes'); if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print $r['crimeITEXT']; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/6); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']},crimesdone=crimesdone+1 WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } print "<br /><a href='criminaldocrime.php?c={$_GET['c']}'>Try Again</a><br /> <a href='playerbars.php'>close</a>"; } } $h->endpage(); ?>
  8. i've had a problem, the page was blank to me, displayed the header info but nothing on the actuall page worked :(
  9. to be honest the whole script needs to be reworked.
  10. this looks good, nice work, shame to see you go
  11. and check line 106 aswell
  12. can anyone do this, its only little.?
  13. well for me the whole lot just comes up as codes in the e-mail in my inbox   <center><img src=http://www.xxxxxx.com/images/title.png></center> Hello username! Test Please Do NOT Reply to this E-mail If you Want to Reply Please Login via <a href=http://www.xxxxxx.com>HERE</a>
  14. nope, running it on the server and that code failed.
  15. well after i tried them and when it e-mails me and doesnt work i put it back to default so i only have the above code now.
  16. that dont seem to be working either.
  17. follow what it said, tweeked a few tings it said and tested it,
  18. i've just read that, i tried that and it dont work for me for some reason.
  19. below is a e-mail form, the form sends e-mails fine and good but i cant get the html stuff to work in the e-mail, the section in question is in //====== //======= Can i have some help. I want the image and links to work in an e-mail, Can anyone help   <?php require "globals.php"; global $c; print "<html> <head> <title>Infamous Wars</title> </head> <body><center>"; $tt=mysql_query("SELECT * FROM users",$c) or die(mysql_error()); while($gh=mysql_fetch_array($tt)) { $to = $gh['email']; $subject = "Infamous Wars"; $headers = "From: Infamous Wars Staff"; $body = " //====== <center><img src=http://www.xxxxxx.com/images/title.png></center> <br/> <br/> Hello {$gh['username']}! Test <br/><br/><br/> Please Do NOT Reply to this E-mail<br/> If you Want to Reply Please Login via <a href=http://www.xxxxxx.com>HERE</a><br/> //====== "; mail($to, $subject, $body, $headers); print "Email sent to {$gh['username']}!<br />"; } ?>
  20. I'm looking for a mod which allows Daily Questions. Daily Question Page should include: Questions, 4 Possible Answers. Daily Cron Which Resets Questions and selects a new random question while deleting the last question used. and resets Users Question Answer back to 0 A Staff Page which allows to upload Several Questions and answers into the database. Database Sql for the questions (its own Table) Users Sql +1 for question answered.(users table) I think that covers everything, can anyone do this and if so how much are you gunna charge, I was thinking of something like $5 to $10.
  21. well i use a interactive menu system on my game which all the pages in there dont require globals
  22. some pages i put this one it needed it, removie it accourding to the pages.
  23. i'm not very good at secureing, you can secure it if you like.
  24. This is the Last Page Privacy. used in conjunction with these 2 mods http://makewebgames.io/showthread.php/41526-My-Usersonline-php http://makewebgames.io/showthread.php/41541-Last-Page-View Links Expired 😞 You can find these mods on my Mod Directory PeterisGB's Mod Directory add pageprivacy to the Users in the Database. Add this to the case section of Preferences.php case 'prichange2': do_pri_change(); break; case 'prichange': conf_pri_change(); break; Add this further down the page. function conf_pri_change() { global $ir,$c,$userid,$h; print "<h3>Page Privacy</h3><br /> <form action='preferences.php?action=prichange2' method='post'> <select name='newnameg' type='dropdown'> <option value='1'>ON</option> <option value='0'>OFF</option></select> <input type='submit' value='Change Info' /></form>"; } function conf_pri_change() { global $ir,$c,$userid,$h; print "<h3>Page Privacy</h3> <form action='preferences.php?action=prichange2' method='post'> <select name='privacy' type='dropdown'> <option value='1' ". ($ir['pageprivacy'] == 1 ? "selected" : NULL) .">ON</option> <option value='0' ". ($ir['pageprivacy'] == 0 ? "selected" : NULL) .">OFF</option></select> <input type='submit' value='Change Privacy' /></form>"; } function do_pri_change() { global $db,$ir,$c,$userid,$h; $_POST['privacy'] = 1 ? 1 : 0; $db->query("UPDATE users SET `pageprivacy`=". $_POST['privacy'] ." WHERE userid=". $userid); print "Privacy ". ($_POST['privacy'] ? "is on" : "is off"); } } open up header and find this <a href='friendslist.php'>Friends List</a> <a href='blacklist.php'>Black List</a> Add this <a href='preferences.php?action=prichange'>Page View Privacy</a>
  25. Both mods that i made have been linked to the main post, click the LINK button to get the other 2 mods. hope that helps
×
×
  • Create New...