Jump to content
MakeWebGames

Oracle

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by Oracle

  1. I keep getting this error. Installer Error A critical error has occurred, and installation has stopped. Below are the details: PHP Warning: mysql_connect(): No such file or directory (2) Action taken: Line executed: /srv/disk22/4182841/www/demonsandangels.royalwebhosting.net/class/class_db_mysql.php:82 please help 😃
  2. None of the Similar Threads below help. Can someone please help me with this?
  3. I have Redux: When trying to upload a new display picture or a picture for forum signatures: A person will get sent to a "500" Page that says the website may be under costruction or the website has a programming error. The 500 page is picchange2: here is the code: ,   function do_pic_change() { global $db, $ir, $c, $userid, $h; if (!isset($_POST['verf']) || !verify_csrf_code('prefs_picchange', stripslashes($_POST['verf']))) { csrf_error('picchange'); } $_POST['newpic'] = (isset($_POST['newpic']) && is_string($_POST['newpic'])) ? $_POST['newpic'] : ''; if (empty($_POST['newpic'])) { echo ' You did not enter a new pic.<br /> > <a href="' . gen_url('preferences', true) . '&action=picchange">Back</a> '; } else { if (strlen($_POST['newpic']) < 8 || !(substr($_POST['newpic'], 0, 7) == 'http://' || substr($_POST['newpic'], 0, 8 == 'https://'))) { echo 'Invalid Image.<br />> <a href="' . gen_url('preferences', true) . '&action=picchange">Go Back</a>'; die($h->endpage()); } $image = (@getimagesize($_POST['newpic'])); if (!is_array($image)) { echo 'Invalid Image.<br />> <a href="' . gen_url('preferences', true) . '&action=picchange">Go Back</a>'; die($h->endpage()); } $db->query( 'UPDATE `users` SET `display_pic` = "' . $_POST['newpic'] . '" WHERE `userid` = ' . $userid); echo htmlentities($_POST['newpic'], ENT_QUOTES, 'ISO-8859-1') . '<br /> Pic changed! <br /> > <a href="' . gen_url('index', true) . '">Go Home</a> '; } } function forum_change() { global $ir, $c, $userid, $h; $code = request_csrf_code('prefs_forumchange'); echo " <h3>Forum Info Change</h3> Please note that the avatar must be externally hosted, <a href='http://www.photobucket.com'>Photobucket</a> is our recommendation. <br /> Any avatars that are not 150x150 will be automatically resized <form action='" . gen_url('preferences', true) . "&action=forumchange2' method='post'> Avatar: <input type='text' name='forums_avatar' value='{$ir['forums_avatar']}' /> <br /> Signature (you may use BBcode): <textarea rows=10 cols=50 name='forums_signature'>{$ir['forums_signature']}</textarea> <br /> <input type='hidden' name='verf' value='{$code}' /> <input type='submit' value='Change Info' /> </form> "; } function do_forum_change() { global $db, $ir, $c, $userid, $h; if (!isset($_POST['verf']) || !verify_csrf_code('prefs_forumchange', stripslashes($_POST['verf']))) { csrf_error('forumchange'); } $_POST['forums_avatar'] = (isset($_POST['forums_avatar']) && is_string($_POST['forums_avatar']) && !empty($_POST['forums_avatar'])) ? $_POST['forums_avatar'] : 'http://thmb.it/img/150x150/example.jpg'; $image = (@getimagesize($_POST['forums_avatar'])) ; $_POST['forums_signature'] = strip_tags($db->escape($_POST['forums_signature'])); if (strlen($_POST['forums_avatar']) < 8 || !(substr($_POST['forums_avatar'], 0, 7) == 'http://' || substr($_POST['forums_avatar'], 0, 8 == 'https://'))) { echo 'Invalid Image.<br />> <a href="' . gen_url('preferences', true) . '&action=forumchange">Go Back</a>'; die($h->endpage()); } if (!is_array($image)) { echo 'Invalid Image.<br />> <a href="' . gen_url('preferences', true) . '&action=forumchange">Go Back</a>'; die($h->endpage()); } if (strlen($_POST['forums_signature']) > 250) { echo 'You may only have a forums signature consisting of 250 characters or less.<br />> <a href="' . gen_url('preferences', true) . '&action=forumchange">Go Back</a>'; die($h->endpage()); } $db->query( "UPDATE `users` SET `forums_avatar` = '{$_POST['forums_avatar']}', `forums_signature` = '{$_POST['forums_signature']}' WHERE `userid` = $userid"); echo 'Forum Info changed!<br />> <a href="' . gen_url('index', true) . '">Go Home</a>'; } $h->endpage();   I have no idea where the problem is. Thanks for all your help ahead of time. !
  4. This is awesome Sniko Two thumbs up ~ !
  5. I know this thread is about a year. but yes Here is the code. //-- Finding items query $fia=(int) rand(1,2); $fib=(int) rand(2,3); if($fia == $fib) { $iq=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1",$c); $r=$db->fetch_row($iq); $item=$r['itmid']; $userid=$ir['userid']; $db->query("INSERT INTO inventory VALUES ('', $item, $userid, 1)",$c); event_add($userid,"While passing through (INSERT NAME OF YOUR GAME HERE) You Found A {$r['itmname']} HAPPY FRIDAY!.",$c); } This should work
  6.   My son has the version of Minecraft with procreation lol lord help the animals !
  7. thumbs up!
  8. Games which one's do I Not play ? lol WoW EQ , wizzard 101 with the teens. Darkness-Realm Immortal-Night Forbidden-Treasures ArcaneCircle ForsakenClans Rogue Vampires CrimsonMoon mine ;)
  9. add an item to the auction ., then I took out all the !ctype_digit($_GET['ID'])) and replaced with !is_numeric($_GET['ID'])) no change.... so I took out all the !ctype not equals commands and get .... You have zero items to add.. etc. that message.
  10. I have tried Everything from all 11 pages. I have been reading php&Sql for dynamic websites, security for php, and a few others ... for some reason I cannot find the errors, but I am getting a ' please try again " msg can someone please help me with this.   <?php //Made by zeddicus, do NOT re-distribute. //Copyright 2010 include(DIRNAME(__FILE__).'/globals.php'); $_GET['page'] = isset($_GET['page']) ? trim($_GET['page']) : 'index'; switch($_GET['page']) { case 'index' : index(); break; case 'Bid' : Bid(); break; case 'Add' : Add(); break; default : index(); break; } function index() { global $h; $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`Time`,g.`Current Bid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`)") or die(mysql_error()); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Auction House</span> <hr width = "90%"> <table border = "0" class = "table" align = "center" width = "90%" style = "text-align:center" cellspacing = "1"> <tr> <th>Seller</th> <th>Item</th> <th>Time Left</th> <th>Current Bid</th> <th>Links</th> </tr>'); if(!mysql_num_rows($Data)) { echo ('<tr> <td colspan = "5">There are no auction being held at the present time.</td> </tr> </table>'); exit($h->endpage()); }else{ while($aData = mysql_fetch_array($Data)) { $time = $aData['Time'] - time() + $aData['TimeLeft']; echo (' <tr> <td>'.$aData['SellerID'].'</td> <td>'.stripslashes(htmlentities($aData['itmname'])).'</td> <td>'.time_format($time).'</td> <td width = "15%">$'.number_format($aData['CurrentBid']).'</td> <td width = "15%" align = "center"><a href = "Auction.php?page=Bid&ID='.$aData['ID'].'"><span style = "color:#8B0000">Bid</span></a>|| <a href = "iteminfo.php?ID='.$aData['ItemID'].'"><span style = "color:#8B0000">Info</span></a></td>'); } echo ('</tr> </table> '); } $h->endpage(); } function Bid() { global $h,$ir; echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Bidding on Item</span> <hr width = "90%">'); $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`) WHERE (g.`ID` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !is_numeric($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); if((isset($_POST['bid']))) { if(!is_numeric($_POST['bid'])) { echo ('An error has occurred, please try again.'); exit($h->endpage()); } if($_POST['bid'] < $Data['CurrentBid'] || $ir['money'] < $_POST['bid']) { echo ('You\'ve bidded below the current bid, or you don\'t have enough cash to bid. <a href = "/Auction.php"><span style = "color:#8B0000">Go Back</span></a>'); exit($h->endpage()); } if($_POST['bid'] >= $Data['BuyNow'] && $Data['BuyNow'] > 0) { mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); //Auction Delete mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user mysql_query("INSERT INTO `inventory` VALUES ('',".$Data['ItemID'].",".$_SESSION['userid'].",1)"); // Credit winner item event_add($Data['SellerID'],''.mysql_real_escape_string($ir['username']).' bought your item of the auction using your "Buy It Now Price" ($'.number_format($Data['BuyNow']).')'); mysql_query("UPDATE `users` SET `money` = `money` + ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$Data['SellerID'].")"); //Give cash to user echo ('You\'ve successfully purchased the item from the Auction using the "Buy It Now" price!. <a href = "/index.php"><span style = "color:#8B0000">Go Home</span></a>'); }else{ mysql_query("UPDATE `gAuction` SET `CurrentBid` = ".abs(intval($_POST['bid']))." WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); // mysql_query("INSERT INTO `gAuctionBids` VALUES ('',".$Data['ID'].",".$_SESSION['userid'].",".abs(intval($_POST['bid'])).")"); //insert bid mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user echo ('Your bid has been confirmed. <a href = "/Auction.php"><span style = "color:#8B0000">Back to Auction</span></a>'); } } if($Data['BuyNow'] == 0) { $Buy = 'Disabled by user'; }else{ $Buy = number_format($Data['BuyNow']); } if($Data['BuyNow'] == 0) { $Sign = ''; }else{ $Sign = '$'; } echo (' <table class = "table" cellspacing = "1" width = "35%" align = "center" style = "text-align:center"> <form action = "Auction.php?page=Bid&ID='.$_GET['ID'].'" method = "post"> <tr> <td width = "25%">Item Name:</td> <td><span style = "color:#8B0000">'.htmlentities($Data['itmname']).'</span></td> </tr> <tr> <td width = "25%">Current Bid:</td> <td>'.number_format($Data['CurrentBid']).'</td> </tr> <tr> <td width = "25%">Buy Now Price:</td> <td>'.$Sign.''.$Buy.'</td> </tr> <tr> <td width = "25%">Enter Bid:</td> <td><input type = "text" name = "bid" value = "0" /></td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Place Bid" /></td> </tr> </form> </table> <a href = "/Auction.php"><span style = "color:#8B0000">Go Back</a>'); $h->endpage(); } function Add() { global $h; $Data = mysql_query("SELECT i.`inv_itemid`,i.`inv_userid`,i.`inv_qty`,it.`itmid`,it.`itmname` FROM `inventory` i LEFT JOIN `items` it ON (i.`inv_itemid` = it.`itmid`) WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !is_numeric($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Adding Item To Auction</span> <hr width = "90%"> You have <span style = "color:#8B0000"><i>'.number_format($Data['inv_qty']).'</i></span> - <span style = "color:#8B0000"><i>'.htmlentities($Data['itmname']).'</i></span> <hr width = "90%">'); if((isset($_POST['time']))) { $One = mysql_query("SELECT `ID` FROM `gAuction` WHERE (`SellerID` = ".$_SESSION['userid'].")"); if(mysql_num_rows($One)) { echo ('Only one item at the auction please.'); exit($h->endpage()); } if(!in_array($_POST['time'], array('1Hour','6Hours','1Day','2Days'))) { echo ('An error has occured please go back and try again.'); exit($h->endpage()); } if($Data['inv_qty'] < 1) { echo ('It seems you don\'t have enough of this item to send it to auction.'); exit($h->endpage()); } if($_POST['time'] === '1Hour') { $time = '3600'; } elseif($_POST['time'] === '6Hours') { $time = '21600'; } elseif($_POST['time'] === '1Day') { $time = '86400'; } elseif($_POST['time'] === '2Days') { $time = '172800'; } mysql_query("INSERT INTO `gAuction` VALUES ('',".$_SESSION['userid'].",".$Data['itmid'].",".abs(intval($_POST['sbid'])).",".abs(intval($_POST['buy'])).",".$time.",unix_timestamp(), '')") or die(mysql_error()); if($Data['inv_qty'] > 1) { mysql_query("UPDATE `inventory` SET `inv_qty` = `inv_qty` - 1 WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")") OR DIE(MYSQL_ERROR()); }else{ mysql_query("DELETE FROM `inventory` WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")")OR DIE(MYSQL_ERROR()); } echo ('You\'ve successfully add the item to the auction. <a href = "/Auction.php"><span style = "color:#8B0000">Click here to View</span></a>'); }else{ echo (' <table border = "0" class = "table" cellspacing = "1" width = "60%" align = "center" style = "text-align:center"> <form action = "Auction.php?page=Add&ID='.$_GET['ID'].'" method = "post"> <tr> <td colspan = "2">Select the amount off time you wish your auction to last.</td> </tr> <tr> <td colspan = "2">1 Hour<input type = "radio" name = "time" value = "1Hour" /> 6 Hours<input type = "radio" name = "time" value = "6Hours" /> 24 Hours<input type = "radio" name = "time" value = "1Day" /> 48 Hours<input type = "radio" name = "time" value = "2Days" /></td> </tr> <tr> <td>Starting Bid</td> <td><input type = "text" name = "sbid" value = "0" /></td> </tr> <tr> <td>Buy It Now Price:</td> <td><input type = "text" name = "buy" value = "0" />(Enter 0 to disable)</td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Add item to auction" /></td> </tr> </form> </table> <a href = "/inventory.php"><span style = "color:#8B0000">Go Back</span></a>'); } $h->endpage(); } ?>   Thanks, Oracle (mom of teenagers ) =)
  11. RE: :D Very Awesome my testers absolutely love this, I have edited it a bit so that there is only 2 very important items in the game, and I only use this on Random Fridays! Great Work ! Thank you ! :cool:
  12. 2 Thumbs up !
×
×
  • Create New...