
lynm77
Members-
Posts
64 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by lynm77
-
Hello Sorry i have tied the above already and it does not work I keep getting the following result from this
-
Hello I have tried the following changes now all have not worked sadly with this <img src='itmpics/{$i['itmpic']}' i get the following when i click on image the details i get are as follows http://www.xxxxxxx.com/itmpics/%7B$i[ With this <img src=itmpics/'.$i['itmpic].'' i get the following when i click on image the details i get are as follows http://www.xxxxxx.com/itmpics/ With this <img src='itmpics/{$r['itmpic']}' i get the following when i click on image the details i get are as follows http://www.xxxxxxx.com/itmpics/%7B$r[ So none are selecting the images for the item from the itmpics folder Thanks to all that has helped todate but still not working any other ideas would be appreciated
-
Hello Thank you for your help but its still not selecting the image from itmpics folder When i click on image the details i get are as follows Can you please advise how i get the shop item to select the correct image now Thanks
-
Hello All I hope someone may be able to help me with the following problem im having trying to add images to shops.php Even after uploading images and changes to script when i click on image the detaila i get our as follows http://www.xxxxxxx.com/itmpics/%7B$i[ This is my script for shop.php Hope fully someone can guide me to what im doing incorrect Thanks <?php include "globals.php"; $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops.<br />"; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); print "<table width=85% cellspacing=1 class='table'><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td><a href='shops.php?shop={$r['shopID']}'>{$r['shopNAME']}</a></td><td>{$r['shopDESCRIPTION']}</td></tr>"; } print "</table>"; } else { $sd=$db->query("SELECT * FROM shops WHERE shopID={$_GET['shop']}"); if($db->num_rows($sd)) { $shopdata=$db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing items at <b>{$shopdata['shopNAME']}...</b><br /> <table cellspacing=1 class='table'><tr style='background: gray;'><th>Image</th><th>Item</th><th>Description</th><th>Price</th><th>Sell Price</th><th>Buy</th><th>Credit Card</th></tr>"; $qtwo=$db->query("SELECT si.*,i.*,it.* FROM shopitems si LEFT JOIN items i ON si.sitemITEMID=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE si.sitemSHOP={$_GET['shop']} ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC"); $lt=""; while($r=$db->fetch_row($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=8>{$lt}</th></tr>"; } $buyprice=money_formatter($r['itmbuyprice']); $sellprice=money_formatter($r['itmsellprice']); $creditcardbuyprice=money_formatter($r['itmbuyprice']); ?><tr><td><img src='itmpics/{$i['itmpic']}' height='70px' width='70px'></td><td><? echo $r['itmname']; ?></td><td><? echo $r['itmdesc']; ?></td><td><? echo $buyprice; ?></td><td><? echo $sellprice; ?></td><td><form action='itembuy.php?ID=<? echo $r['itmid']; ?>' name="shopbuy" method='post'> Qty: <input type='text' name='qty' value='1' onkeyup="tot(<? echo $r['itmid']; ?>,<? echo $r['itmbuyprice']; ?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);" /><input type='submit' value='Buy' /></form><div id="res<? echo $r['itmid']; ?>" align="left"></div></td><td> <form action='creditcarditembuy.php?ID=<? echo $r['itmid']; ?>' name="shopbuy" method='post'> Qty: <input type='text' name='qty' value='1' onkeyup="tot(<? echo $r['itmid']; ?>,<? echo $r['itmbuyprice']; ?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);" /><input type='submit' value='Buy' /></form><div id="res<? echo $r['itmid']; ?>" align="left"></div></td> </tr> <? } print "</table>"; } else { print "You are trying to access a shop in another city!"; } } else { print "You are trying to access an invalid shop!"; } } $h->endpage(); ?>
-
items pic mod problem Can any one please help me with the following problem im having please. I'm getting the following error when trying to add the following mod on line 14 Parse error: syntax error, unexpected '[', expecting ']' in /home/swisou/public_html/iteminfo.php on line 14 Here is my iteminfo.php Thanks <?php include_once "globals.php"; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $itmid = $_GET['ID']; if ( !$itmid ) { echo 'Invalid item ID'; } else { $q = $db->query("SELECT i.`itmname`,`itmdesc`,`itmbuyprice`,`itmsellprice`,it.`itmtypename` FROM `items` i LEFT JOIN `itemtypes` it ON i.`itmtype` = it.`itmtypeid` WHERE i.`itmid` = $itmid LIMIT 1"); if ( $db->num_rows($q) == 0 ) { echo 'Invalid item ID'; } else { $id = $db->fetch_row($q); if($id['itmpic']) { $itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'>[img=itmpics/".$id[]</td></tr>"; } print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2><b>Looking up info on {$id['itmname']}</b></th></tr>$itmpic<tr bgcolor=#dfdfdf><td colspan=2>The <b>{$id['itmname']}</b> is a/an {$id['itmtypename']} Item - <b>{$id['itmdesc']}</b></th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; } else { echo ' N/A</td> </tr> </table> '; } } } $h->endpage(); ?>
-
Hello Would love to check out your latest release but the website is not sending out a verification code via email
-
Hello All Not sure if the following was posted a psd image of credit card if you wish to change. http://uploading.com/files/dda9c44m/credit.psd/ Cheers
-
Hello Sniko Yes that has worked. Thank you for your help i changed to function cmarket_index() { global $db,$ir,$c,$userid,$h; print " Viewing all listings... Cheers
-
Hello Lads Thanks for your help worked one problem out with your ideas. With the tune.php I added to top function power($num1, $num2) { return pow($num1, $num2); } session_start(); Still trying to solve the carmarket.php Cheers
-
Hello Looking for some help if possible please i have attempted to convert the following car mob v1 to v2 But as always just have problems i can't figure out how to resolve. First problem is with tune.php Fatal error: Call to undefined function power() in /home/swisou/public_html/tune.php on line 9 <?php include "globals.php"; print "<h3>Tuning Shop</h3><hr /> > <a href='garage.php'>Back To Garage</a><hr />"; if(!$_GET['id']) { die("Invalid Usage"); } $q=$db->query("SELECT cp.*,ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON ct.carID=cp.cpcCAR WHERE cp.cpcID={$_GET['id']} AND cp.cpcPLAYER=$userid", $c); if($db->num_rows($q) == 0) { die("Invalid Car"); } $r=$db->fetch_row($q); $cost['acc']=$r['carACC']*power($r['cpcACCLV']+1,4)*($r['cpcACCLV']*$r['carACC']*10); $cost['han']=$r['carHAN']*power($r['cpcHANLV']+1,4)*($r['cpcHANLV']*$r['carHAN']*10); $cost['spd']=$r['carSPD']*power($r['cpcSPDLV']+1,4)*($r['cpcSPDLV']*$r['carSPD']*10); $cost['shd']=$r['carSHD']*power($r['cpcSHDLV']+1,4)*($r['cpcSHDLV']*$r['carSHD']*10); if($_GET['buy']) { if($_GET['buy'] != "acc" && $_GET['buy'] != "han" && $_GET['buy'] != "spd" && $_GET['buy'] != "shd") { die("Abusers suck."); } $upgr_cost=$cost[$_GET['buy']]; if($ir['money'] < $upgr_cost) { die("You don't have enough money to tune this stat."); } $db->query("UPDATE users SET money=money-{$upgr_cost} WHERE userid=$userid", $c); $stat="cpc".strtoupper($_GET['buy'])."LV"; $db->query("UPDATE cars_playercars SET $stat=$stat+1 WHERE cpcID={$_GET['id']}", $c); print "Car tuned!<br /> > <a href='tune.php?id={$_GET['id']}'>Tune some more</a>"; } else { foreach($cost as $k => $v) { $costf[$k]='$'.number_format($v); } $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; print "Current Stats for your {$r['carNAME']}<br /> <table width='90%'><tr> <th>Stat</th> <th>Amount</th> <th>Cost To Tune</th> <th>Tune</th></tr> <tr> <td>Acceleration</td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>{$costf['acc']}</td> <td><a href='tune.php?id={$_GET['id']}&buy=acc'>Tune</a></td></tr> <tr><td>Speed</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>{$costf['spd']}</td> <td><a href='tune.php?id={$_GET['id']}&buy=spd'>Tune</a></td></tr> <tr> <td>Handling</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>{$costf['han']}</td> <td><a href='tune.php?id={$_GET['id']}&buy=han'>Tune</a></td></tr> <tr> <td>Shield</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td> <td>{$costf['shd']}</td> <td><a href='tune.php?id={$_GET['id']}&buy=shd'>Tune</a></td></tr> </table>"; } $h->endpage(); ?> The second problem is with carmarket.php Fatal error: Call to a member function query() on a non-object in /home/swisou/public_html/carmarket.php on line 25 <?php include "globals.php"; print "<h3>Car Market</h3><hr />"; switch($_GET['action']) { case "buy": crystal_buy(); break; case "remove": crystal_remove(); break; default: cmarket_index(); break; } function cmarket_index() { global $ir,$c,$userid,$h; print " Viewing all listings... <table width=100% border=6> <tr style='background:#cc9966'> <th>Seller</th> <th>Car</th> <th>Acceleration Level</th> <th>Handling Level</th> <th>Speed Level</th> <th>Shield Level</th> <th>Price</th> <th>Links</th> </tr>"; $q=$db->query("SELECT cm.*, u.*,ct.* FROM carmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER LEFT JOIN cars_types ct ON ct.carID=cm.cmCAR ORDER BY cmPRICE ASC",$c); while($r=$db->fetch_row($q)) { if($r['cmADDER'] == $userid) { $link = "<a href='carmarket.php?action=remove&ID={$r['cmID']}'>Remove</a>"; } else { $link = "<a href='carmarket.php?action=buy&ID={$r['cmID']}'>Buy</a>"; } print "\n<tr> <td><a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]</td> <td>{$r['carNAME']}</td> <td>{$r['cmACC']}</td> <td>{$r['cmHAN']}</td> <td>{$r['cmSPD']}</td> <td>{$r['cmSHD']} <td>\$".number_format($r['cmPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; } function crystal_remove() { global $ir,$c,$userid,$h; $q=$db->query("SELECT cm.*,c.* FROM carmarket cm LEFT JOIN cars_types c ON cm.cmCAR=c.carID WHERE cmID={$_GET['ID']} AND cmADDER=$userid",$c); if(!$db->num_rows($q)) { print "Error, either this car does not exist, or you are not the owner.<br /> <a href='carmarket.php'>> Back</a>"; $h->endpage(); exit; } $r=$db->fetch_row($q); $db->query("INSERT INTO cars_playercars VALUES('', $userid, {$r['cmCAR']}, {$r['cmACC']}, {$r['cmHAN']}, {$r['cmSPD']}, {$r['cmSHD']})", $c); $i=$db->insert_id($c); $db->query("INSERT INTO imremovelogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['carNAME']} from the car market belonging to ID {$r['cmADDER']}.')", $c); $db->query("DELETE FROM carmarket WHERE cmID={$_GET['ID']}",$c); print "Car removed from market!<br /> <a href='carmarket.php'>> Back</a>"; } function crystal_buy() { global $ir,$c,$userid,$h; $q=$db->query("SELECT cm.*,ct.* FROM carmarket cm LEFT JOIN cars_types ct ON ct.carID=cm.cmCAR WHERE cmID={$_GET['ID']}",$c); if(!$db->num_rows($q)) { print "Error, either this car does not exist, or it has already been bought.<br /> <a href='carmarket.php'>> Back</a>"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['cmPRICE'] > $ir['money']) { print "Error, you do not have the funds to buy this car.<br /> <a href='carmarket.php'>> Back</a>"; $h->endpage(); exit; } $db->query("INSERT INTO cars_playercars VALUES('', $userid, {$r['cmCAR']}, {$r['cmACC']}, {$r['cmHAN']}, {$r['cmSPD']}, {$r['cmSHD']})", $c); $i=$db->insert_id($c); $db->query("DELETE FROM carmarket WHERE cmID={$_GET['ID']}",$c); $db->query("UPDATE users SET money=money-{$r['cmPRICE']},cars_owned=cars_owned+1 where userid=$userid",$c); $db->query("UPDATE users SET money=money+{$r['cmPRICE']} where userid={$r['cmADDER']}",$c); event_add($r['cmADDER'],"<a href='viewuser.php?u=$userid'>{$ir['username']}</a> bought your {$r['carNAME']} from the market for \$".number_format($r['cmPRICE']).".",$c,'trading'); $db->query("INSERT INTO imbuylogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmPRICE']}, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['carNAME']} from the car market for \${$r['cmPRICE']} from user ID {$r['cmADDER']}')", $c); print "You bought the {$r['carNAME']} from the market for \$".number_format($r['cmPRICE'])."."; } $h->endpage(); ?> Any help we be great. Thank You
-
Hello Thank you again Octarine that has work for me. Thanks again
-
Hello All Has anyone got the cron_minute.php for the following Mod
-
Hello Thank you Octarine that worked all is working now. Thank you again
-
Hello All Has anyone managed to get the following Mod to work. I have all working but when with the cron provided i get the following error. Can someone please advise Parse error: syntax error, unexpected T_STRING in /home/swisou/public_html/cron_lottery.php on line 81