Jump to content
MakeWebGames

CENilsen

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by CENilsen

  1. The link doesnt work.....
  2. Way better design! though you don't need this:   <html> <head> <title>Bug Report</title> </head> <style> textarea { resize: none; } table { border-collapse: collapse; } </style> </html>   Also when reporting the bug you forgot to add break lines otherwise the boxes are kinda jammed.   echo '<form method="post"> <input type="text" name="Title" placeholder="Title" title="Title" spellcheck="true" required autofocus> <textarea rows="10" cols="45" name="Description" placeholder="Detailed explanation of error, page and code if possible." title="Description" spellcheck="true" required></textarea> <input type="submit" name="report" value="Report"> </form>';   Everything else works great!
  3. Well looking forward to a update :)
  4. I already did that.... but perhaps since you cant provide the images you should update the mod with removed image tags? I might work on re-designing the mod and post the code later.
  5. I was trying to work it with another script but instead i just deleted that script. Your script stand-alone works but there are some flaws:   <?php require "globals.php"; /* Designed and developed by Magictallguy and Script47, a team effort. The code here (named "Bug Report Centre") is provided "as is" with no warranty or gurantee of safety to existing code. Bug Report Centre has been fully tested and is found to work as intended. Bug Report Centre is released freely under the GNU License. Feel free to modify as you wish, as long as this comment block remains and remains untouched. */ ?><span style='font-size:2em;'>Spotted a bug?</span><br><a href="breport.php?act=add">Report it here!</a><? if($ir['user_level'] > 1) { echo ' · <a href="breport.php?act=edit"><img src="images/bugimage.png " title="Change bug status" /></a> · <a href="breport.php?act=del"><img src="/images/deletebug.png" title="Delete bugs" /></a> · '; }   So if you look at it you have images/bugimage.png and you have images/deletebug.png. Mind adding those png's? Otherwise the options don't show up.
  6. Thats what i got for the orig source.... they have a free bug report mod in the marketplace assuming that's the source your talking about. So if i take your mod as "the report center" and combine the functions with that its what i get. Because your mod alone wont function as the other files will be missing.
  7. Critical error has occurred, and page execution has stopped. Below are the details: PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource (2) Thats what i get when i try to add a bug. This is breport.php   <?php include "globals.php"; if($ir['mailban']> 0) { die("you are banned from using this option for {$ir['mailban']} days."); } if($ir['user_level'] != 0) { $q=mysql_query("SELECT * FROM breport ORDER BY bugDATEPOST ASC",$c); print "<h3>Bug Reports</h3><br/> <hr width=50% /><b><font color=red>Please enter a real bug, not a false.</b><br /></font><hr width=50% /><br /> <a href='addbug.php'>[Add Your Bug]</a><br /><br /><table cellspacing=0 width=85% class=table border=1> <tr><th>ID</th><th>Bug Urgency</th><th>Bug Catagory</th><th>Bug Problem</th><th>Date Bug Added</th><th>Bug From</th><th>Bug Fixed?</th><th>Bug Message</th>"; if($ir['user_level']== 2) { print"<th>Delete</th><th>Edit</th>"; } while($r=$db->fetch_row($q)) { if($r['bugURGENCY']== 1) { $urgency="<font color=lightblue>Low</font>"; } if($r['bugURGENCY']== 2) { $urgency="<font color=green>Medium</font>"; } if($r['bugURGENCY']== 3) { $urgency="<font color=maroon>High</font>"; } if($r['bugURGENCY']== 4) { $urgency="<font color=red><b>Very High</b></font>"; } $sent=date('F j, Y, g:i:s a',$r['bugDATEPOST']); print "</tr> <tr><td>{$r['bugID']}</td><td>$urgency</td><td>{$r['bugTITLE']}</td><td>{$r['bugTEXT']}</td><td>$sent</td><td>{$r['bugBY']}</td><td><b>{$r['bugDONE']}</b></td><td>{$r['bugREADMSG']}</td>"; if($ir['user_level']== 2) { print "<td><a href='deletebug.php?bugid={$r['bugID']}'>Delete</a></td><td><a href='editbug.php?bugid={$r['bugID']}'>Edit</a></td>"; } print "</tr>"; } print "</tr></tr></table>"; } $h->endpage(); ?>
  8. Looking forward to it :)
  9. Grant this will help with the sale of your site: Post screenshots of traffic / revenue if any. Have the site up and running for previews. Screenshot of the license. Thanks
  10. add me CENilsen
  11. Mine posting the edit?
  12. You can thank my constant trial and error of all these mods it always seems like theirs a extra space somewhere or a line that doesn't need to be needed.....But yea ill try to see if i can get the ssi to work and hopefully i can post a finish product of what i use.
  13. boom that was the fix :) Lol i thought i was going crazy here
  14. Its all good i should have just posted it all to begin with. Pm sent. Also thanks for the reference!
  15. event_add($_POST['ref'], "For referring $username to the game, you have earned 2 valuable crystals!", $c); $e_rip = $db->escape($rem_IP); $db->query( "INSERT INTO `referals` VALUES(NULL, {$_POST['ref']}, $i, " . time() . ", '{$e_rip}', '$IP')"); } $link = mysql_connect("localhost", "test123", "test123"); mysql_select_db("test123", $link) or die(mysql_error()); $passwd = sha1(strtolower($username) . $_POST['password']); mysql_query("INSERT INTO test123.`smf_members` (`member_name`,`date_registered`,`real_name`,`emai l_address`,`passwd`) VALUES ('{$username}',unix_timestamp(),'{$username}','{$e mail}', '{$password}')"); mysql_close($link); echo "You have signed up, enjoy the game.<br /> > <a href='login.php'>Login</a>"; } } else {   Parse error: syntax error, unexpected T_STRING, expecting '}' in register.php on line 213 How would i go about using SSl? Thanks
  16. So when i add the code to the register.php   $db->query( "INSERT INTO `referals` VALUES(NULL, {$_POST['ref']}, $i, " . time() . ", '{$e_rip}', '$IP')"); } /* SMF Integration - The following ___VALUE___'s, enter the relevant details for SMF database*/ $link = mysql_connect("localhost", "test123", "test123"); mysql_select_db("test123", $link) or die(mysql_error()); $passwd = sha1(strtolower($username) . $_POST['password']); mysql_query("INSERT INTO test123.`smf_members` (`member_name`,`date_registered`,`real_name`,`emai l_address`,`passwd`) VALUES ('{$username}',unix_timestamp(),'{$username}','{$e mail}', '{$password}')"); mysql_close($link); /* SMF Integration */ echo "You have signed up, enjoy the game.<br /> > <a href='login.php'>Login</a>"; } }   Parse error: syntax error, unexpected T_STRING, expecting '}' in register.php on line 212 Am i missing code or wrong spot? Also is there a way to actually make the forum integrated into the game itself kinda like the forum.php was? Thanks again!
  17. Works :) Thanks for the help guys greatly appreciated.
  18. WrathCity - Critical Error A critical error has occurred, and page execution has stopped. Below are the details: 1146: Table 'test123.messages' doesn't exist Action taken: Attempted to execute query: insert into messages (mail_from, mail_to, mail_time, mail_subject, mail_text) values (2, 11, 1388586681, 'Welcome','Welcome to the game') Then i looked at it and notice the code says "messages" when it should say mail. So i changed it to mail and it works :) Only problem i ran into though is that it doesn't show the user that he received the mail... rather then it just is inserted into his mailbox...... So it says Mailbox(0) even though he has the welcome letter in his box.
  19. I get this message: A critical error has occurred, and page execution has stopped. Below are the details: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1388552208, 'Welcome','Welcome to the game')' at line 1 Action taken: Attempted to execute query: insert into messages (mail_from, mail_to, mail_time, mail_subject, mail_text) values (2, , 1388552208, 'Welcome','Welcome to the game') Here is the code and where i inserted your block: require_once('globals_nonauth.php'); //thx to http://www.phpit.net/code/valid-email/ for valid_email function valid_email($email) { return (filter_var($email, FILTER_VALIDATE_EMAIL) === $email); } print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{$set['game_name']}</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="{$set['jquery_location']}"></script> <script type="text/javascript" src="js/register.js"></script> <link href="css/register.css" type="text/css" rel="stylesheet" /> </head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"><img src="title.jpg" alt="Mccodes Version 2" /><br /> <!-- Begin Main Content --> EOF; $IP = str_replace(array('/', '\\', '\0'), '', $_SERVER['REMOTE_ADDR']); if (file_exists('ipbans/' . $IP)) { die( "<span style='font-weight: bold; color:red;'> Your IP has been banned, there is no way around this. </span></body></html>"); } $username = (isset($_POST['username']) && preg_match( "/^[a-z0-9_]+([\\s]{1}[a-z0-9_]|[a-z0-9_])+$/i", $_POST['username']) && ((strlen($_POST['username']) < 32) && (strlen($_POST['username']) >= 3))) ? stripslashes($_POST['username']) : ''; if (!empty($username)) { if ($set['regcap_on']) { if (!$_SESSION['captcha'] || !isset($_POST['captcha']) || $_SESSION['captcha'] != $_POST['captcha']) { unset($_SESSION['captcha']); echo "Captcha Test Failed<br /> > <a href='register.php'>Back</a>"; register_footer(); } unset($_SESSION['captcha']); } if (!isset($_POST['email']) || !valid_email(stripslashes($_POST['email']))) { echo "Sorry, the email is invalid.<br /> > <a href='register.php'>Back</a>"; register_footer(); } // Check Gender if (!isset($_POST['gender']) || ($_POST['gender'] != 'Male' && $_POST['gender'] != 'Female')) { echo "Sorry, the gender is invalid.<br /> > <a href='register.php'>Back</a>"; register_footer(); } $e_gender = $db->escape(stripslashes($_POST['gender'])); $sm = 100; if (isset($_POST['promo']) && $_POST['promo'] == "Your Promo Code Here") { $sm += 100; } $e_username = $db->escape($username); $e_email = $db->escape(stripslashes($_POST['email'])); $q = $db->query( "SELECT COUNT(`userid`) FROM `users` WHERE `username` = '{$e_username}' OR `login_name` = '{$e_username}'"); $q2 = $db->query( "SELECT COUNT(`userid`) FROM `users` WHERE `email` = '{$e_email}'"); $u_check = $db->fetch_single($q); $e_check = $db->fetch_single($q2); $db->free_result($q); $db->free_result($q2); $base_pw = (isset($_POST['password']) && is_string($_POST['password'])) ? stripslashes($_POST['password']) : ''; $check_pw = (isset($_POST['cpassword']) && is_string($_POST['cpassword'])) ? stripslashes($_POST['cpassword']) : ''; if ($u_check > 0) { echo "Username already in use. Choose another.<br /> > <a href='register.php'>Back</a>"; } else if ($e_check > 0) { echo "E-Mail already in use. Choose another.<br /> > <a href='register.php'>Back</a>"; } else if (empty($base_pw) || empty($check_pw)) { echo "You must specify your password and confirm it.<br /> > <a href='register.php'>Back</a>"; } else if ($base_pw != $check_pw) { echo "The passwords did not match, go back and try again.<br /> > <a href='register.php'>Back</a>"; } else { $_POST['ref'] = (isset($_POST['ref']) && is_numeric($_POST['ref'])) ? abs(intval($_POST['ref'])) : ''; $IP = $db->escape($_SERVER['REMOTE_ADDR']); if ($_POST['ref']) { $q = $db->query( "SELECT `lastip` FROM `users` WHERE `userid` = {$_POST['ref']}"); if ($db->num_rows($q) == 0) { $db->free_result($q); echo "Referrer does not exist.<br /> > <a href='register.php'>Back</a>"; register_footer(); } $rem_IP = $db->fetch_single($q); $db->free_result($q); if ($rem_IP == $_SERVER['REMOTE_ADDR']) { echo "No creating referral multies.<br /> > <a href='register.php'>Back</a>"; register_footer(); } } $salt = generate_pass_salt(); $e_salt = $db->escape($salt); $encpsw = encode_password($base_pw, $salt); $e_encpsw = $db->escape($encpsw); $db->query("insert into messages (mail_from, mail_to, mail_time, mail_subject, mail_text) values (2, $i, ".time().", 'Welcome','Welcome to the game')"); $db->query( "INSERT INTO `users` (`username`, `login_name`, `userpass`, `level`, `money`, `crystals`, `donatordays`, `user_level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `hp`, `maxhp`, `location`, `gender`, `signedup`, `email`, `bankmoney`, `lastip`, `lastip_signup`, `pass_salt`) VALUES('{$e_username}', '{$e_username}', '{$e_encpsw}', 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$e_gender}', " . time() . ",'{$e_email}', -1, '$IP', '$IP', '{$e_salt}')"); $i = $db->insert_id(); $db->query( "INSERT INTO `userstats` VALUES($i, 10, 10, 10, 10, 10)"); if ($_POST['ref']) { $db->query( "UPDATE `users` SET `crystals` = `crystals` + 2 WHERE `userid` = {$_POST['ref']}"); event_add($_POST['ref'], "For referring $username to the game, you have earned 2 valuable crystals!", $c); $e_rip = $db->escape($rem_IP); $db->query( "INSERT INTO `referals` VALUES(NULL, {$_POST['ref']}, $i, " . time() . ", '{$e_rip}', '$IP')"); } echo "You have signed up, enjoy the game.<br /> > <a href='login.php'>Login</a>"; } } else { if ($set['regcap_on']) { $chars = "123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!?\\/%^"; $len = strlen($chars); $_SESSION['captcha'] = ""; for ($i = 0; $i < 6; $i++) $_SESSION['captcha'] .= $chars[rand(0, $len - 1)]; } echo "<h3>{$set['game_name']} Registration</h3>"; echo "<form action=register.php method=post> <table width='75%' class='table' cellspacing='1'> <tr> <td width='30%'>Username</td> <td width='40%'> <input type='text' name='username' onkeyup='CheckUsername(this.value);' /> </td> <td width='30%'><div id='usernameresult'></div></td> </tr> <tr> <td>Password</td> <td> <input type='password' id='pw1' name='password' onkeyup='CheckPasswords(this.value);PasswordMatch();' /> </td> <td><div id='passwordresult'></div></td> </tr> <tr> <td>Confirm Password</td> <td> <input type='password' name='cpassword' id='pw2' onkeyup='PasswordMatch();' /> </td> <td><div id='cpasswordresult'></div></td> </tr> <tr> <td>Email</td> <td> <input type='text' name='email' onkeyup='CheckEmail(this.value);' /> </td> <td><div id='emailresult'></div></td> </tr> <tr> <td>Gender</td> <td> <select name='gender' type='dropdown'> <option value='Male'>Male</option> <option value='Female'>Female</option> </select> <td><div id='cpasswordresult'></div></td> </td> </tr> <tr> <td>Promo Code</td> <td><input type='text' name='promo' /></td> <td><div id='cpasswordresult'></div></td> </tr> <input type='hidden' name='ref' value='"; if (!isset($_GET['REF'])) { $_GET['REF'] = 0; } $_GET['REF'] = abs((int) $_GET['REF']); if ($_GET['REF']) { print $_GET['REF']; } echo "' />"; if ($set['regcap_on']) { echo "<tr> <td colspan='3'> <img src='captcha_verify.php?bgcolor=C3C3C3' /><br /> <input type='text' name='captcha' /> </td> </tr>"; } echo " <tr> <td colspan='3' align='center'> <input type='submit' value='Submit' /> </td> </tr> </table> </form><br /> > <a href='login.php'>Go Back</a>"; } register_footer(); function register_footer() { print <<<OUT </td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> </center> </body> </html> OUT; exit; }
  20. Thanks i still receive a error saying: A critical error has occurred, and this page cannot be displayed. Please try again later. Query failed Where exactly in the register.php does it need to go in?
  21. This is so that when you register for a game and login you have a mail message waiting for you....kinda like a welcome to my game such and such. KyleMassacre helped me by developing a npc modification.   //replace [npcs_id] with the actual id of the bot. //column names may not match so make sure you check your column names $db->query("insert into messages (from, to, subject, message, time) values ([npcs id], $i, 'subject here','message content here', ".time().")");   This is what i changed:   //replace [npcs_id] with the actual id of the bot. //column names may not match so make sure you check your column names $db->query("insert into messages (from, to, subject, message, time) values ([2], $i, 'Welcome!','Testing123', ".time().")");   The problem is I inserted the code which worked after a few tries haha but yet i get a error that says the db can not update the query when the user finishes registering. I might just be placing it wrong in the register.php file. Any guidance would be appreciated :)
  22. Yea i had to fix a few things with it to make it look better but atleast its better then the roulette they have for default lol if you ever do a update for it i would be curious to see it.
  23. Thanks great mod :)
  24. CENilsen

    .

    So have you reduced the bin at all or what is your lowest price right now?
  25. Great Mod just installed it works like a charm :)
×
×
  • Create New...