
Smokey
Members-
Posts
137 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Smokey
-
I know this has to be something simple, either I'm just not getting it or its so late that my mind isnt working properly, anyway, i am building a list of users referrals so they can keep track of the people they have referred to the game, the problem is it only adds the first person they referred (first in the table) to the list. I cannot for the life of me figure out what i am doing wrong, I'm having the same issue with listing the item (in shop) locations which i am listing on the iteminfo page so users know where the items are located, it will list only the first location in the db ( i have 10 countries with 10 cities in each so some items are available in more than 1 city) if i can figure out the referral list i'm sure i can get the latter worked out. so heres the code for the referral list: <?php include "globals.php"; print " <table cellspacing='0' width='100%' border='1'> <tr> <td style='border:1px solid #A39B83;' bgcolor='#7D7764' colspan='4'><b><center><font size=2>Your Referrals</b></td></tr> <tr> <tr> </tr><tr><th style='border:1px solid #7D7764;' bgcolor='#948D76' width='20%'>ID</th><th style='border:1px solid #7D7764;' bgcolor='#948D76' width='20%'>Referred</th><th style='border:1px solid #7D7764;' bgcolor='#948D76' width='20%'>Level</th><th style='border:1px solid #7D7764;' bgcolor='#948D76' width='20%'>Age</th></tr> "; $ref=$db->query("SELECT * FROM referals WHERE refREFER = $userid"); $rs=$db->fetch_row($ref); if(!$db->num_rows($ref) ) { $refer="No Referals"; } else { $refer="{$rs['refREFED']}"; } $qs=$db->query("SELECT * FROM users WHERE userid = {$rs['refREFED']}"); $rf=$db->fetch_row($qs); print " <tr><td style='border:1px solid #7D7764;' bgcolor='#C9C9C9'><center>{$rf['userid']}</a></td><td style='border:1px solid #7D7764;' bgcolor='#C9C9C9'><center><a href='viewuser.php?u={$rf['userid']}'>{$rf['username']}</a></td> <td style='border:1px solid #7D7764;' bgcolor='#C9C9C9'><center>{$rf['level']}</td> <td style='border:1px solid #7D7764;' bgcolor='#C9C9C9'><center>{$rf['daysold']} Days Old</td></tr> <tr><th style='border:1px solid #A39B83;' bgcolor='#7D7764'colspan=4></th></tr> </table><br> "; ?> any help would be much appreciated.
-
Ok, I'm having a bit of trouble, I am building a display case, I am almost done and all has went fair until now, but I cannot figure out how to make the info on each item displayed to run side to side, 5 in a row before moving down to the next row, instead they run downward. print"<table width=80% height=50% border='1' cellspacing='0'> <tr><th align='center' width='33%' height='100' style='border:1px solid #7D7764;' bgcolor='#FFFFFF'><font size=3>{$item['itmname']}<br><a href='iteminfo.php?ID={$item['itmid']}'><img src='itempics/{$item['itmid']}.jpg' title='{$it['quantity']} $quant on display' style='width:70px;height:70px;' alt='No Image' /></a><br>$quantity</th></tr>"; } print"</table>"; } Can anyone help with this?
-
I still read the paid section :P So if its for sale, how much is it?
-
nice little addon, one thing though, your credits wont work like that, also the <?php should be on line 1, i kept your credits but remade them, try this: <?php /////////////////////////////////// /////* Made by bennyh for MWG*///// ///// Enjoy ///// ///// Please do not sell ///// ///// This is a free mod ///// /////////////////////////////////// include "globals.php";
-
Nevermind, I figured it out.
-
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
Benny there should be a user field "rob" and a daily cron that resets that field. It isnt in the business table, it is based on how many times you have robbed a company not how many time that company has been robbed. -
I'm hoping someone can help me with this, I am trying to add a count of items in circulation to the iteminfo page. This is what I have but it only shows 1 item in circulation. $itemcount=$db->num_rows($q); $q=$db->fetch_single($db->query("SELECT COUNT(*) FROM inventory WHERE inv_itemid = $itmid")); also tried: $itemcount=$db->num_rows($q); $q=$db->fetch_single($db->query("SELECT COUNT(*) FROM inventory WHERE inv_itemid = $itemcount")); and: $itemcount=$db->num_rows($q); $q=$db->query("SELECT inv_qty FROM inventory WHERE inv_itemid = $itmid");
-
I dont have a recent backup so I'm pretty much stuck until Peter gets it sorted out...which I hope to god will be soon, i'm losing money and more than likely some players too.
-
I see your game is back up now biohazard, mine is still down...sigh lol
-
Thanks for responding Peter, hope everything gets sorted out soon, good luck :P
-
I understand your game is back up, but mine is not. I said part of w3theory is back, but not all of it. Any link on w3theory that i click it says it could not connect to the database, plus there are errors on the main page. Your game must be on a different server than mine, I have been waiting for a long time for it to come back up to no avail, and trying to contact Peter doesnt seem to help much either. EDIT: I cant get on your game now either so you were saying? :P
-
No, the w3theory site is back up, well part of it, but it seems only the main page, and my site has been down for close to a week now, and is still down. Peter told me 2 days ago it would be back up the next morning....and still nothing.
-
you'll have to change the user level permission for that link in smenu so the link will show up for that user level: if($ir['user_level']==2) { print "> <a href='staff_users.php?action=newuser'>Create New User</a><br /> > <a href='staff_users.php?action=edituser'>Edit User</a><br /> > <a href='staff_users.php?action=deluser'>Delete User</a><br />"; } print "> <a href='staff_users.php?action=invbeg'>View User Inventory</a><br /> > <a href='staff_users.php?action=creditform'>Credit User</a><br />"; to: if($ir['user_level']==2) { print "> <a href='staff_users.php?action=newuser'>Create New User</a><br /> > <a href='staff_users.php?action=edituser'>Edit User</a><br /> > <a href='staff_users.php?action=deluser'>Delete User</a><br />"; } print "> <a href='staff_users.php?action=creditform'>Credit User</a><br />"; if($ir['user_level'] > 1) { print "> <a href='staff_users.php?action=invbeg'>View User Inventory</a><br />"; } Should do it.
-
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
Yep you are correct, I learn something new everyday :P and i'm still learning too too newbie, a couple months ago I didnt even know what php code looked like lol -
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
oh duh...I dont know how i missed that, look in line 28 and remove the small bullet at the end: echo ' <tr> <td width="275" align="right">'.stripslashes($r['className']).' •</td> <<Remove Bullet To be honest there is a way you could get the bullet to show properly but i have no idea how. I think using <li> </li> but I'm not sure. -
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
I think that is this line which is line 30 in the original business_view.php: <td width="275" align="left">> <a href="http://business_view.php?page=class&id='.$r['classId'].'" target="_blank">View '.stripslashes($r['className']).' companies</a></td> Replace with: <td width="275" align="left">> <a href="business_view.php?page=class&id='.$r['classId'].'">View '.stripslashes($r['className']).' companies</a></td> -
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
You're using double quotes inside double quotes, try this: event_add($_GET['id'],"<a href='viewuser.php?u=$userid'>{$ir['username']}</a> Attempted to Rob your Business but was caught."); That should work. -
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
can you post the whole statement from the print or echo to the '; or "; -
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
try <td width="85%"><a href="business_view.php?page=profile&id='.$fb['busId'].'">'.stripslashes($fb['busName']).'</a> - <a href="viewuser.php?u='.$fb['userid'].'">'.stripslashes($fb['username']).'</a>.'$stars.'</td> -
[mccode v2] UPGRADED upload pics add pics everywhere [RECODED]
Smokey replied to Uridium's topic in Free Modifications
Try this: $itmpic = '<tr style="background: gray"><td colspan="2" style="text-align: center"><img src="itmpics/'.$id['itmid'].'"</td></tr>'; } Or $itmpic = '<tr style="background: gray"><td colspan="2" style="text-align: center"><img src="itmpics/'.$id['itmid'].'.jpg"</td></tr>'; } The 2nd should work but you'll have to make sure your pics are jpg format. -
no problem :)
-
try this and see if it works. if($ir['user_level'] > 1) { print "<a href='staff.php'>Staff Panel</a><br />\n<hr />"; } echo ($ec > 0)?'<a href="events.php"><font color="red">Events ('.$ec.')</font></a>':'<a href="events.php">Events (0)</a>'; } echo ($mc > 0)?'<a href="mailbox.php"><font color="red">Mailbox ('.$mc.')</font></a>':'<a href="mailbox.php">Mailbox (0)</a>'; } It should show a number count plus turn red.
-
It looks like you have one of the > backwards. Can you post the whole section of your mainmenu that shows mails/events?
-
you could do something like: $takestr=($r['strength']/10); $takeagil=($r['agility']/10); $takegua=($r['guard']/10); $db->query("UPDATE userstats SET strength=strength-$takestr, agility=agility-$takeagil, guard=guard-$takegua WHERE userid={$r['userid']}"); Its not tested i just wrote it up in the past couple minutes but it should take 10% from from each stat of the user that got beaten, provided it placed in the right spot.
-
Richards Business Mod--Fixed With a few Things added.
Smokey replied to Joshua's topic in Free Modifications
function new_business_banner() { global $ir, $inf, $db; if(!$_POST['banner']) { echo '<form action="business_manage.php?p=new_banner" method="post"> <p align="center"> <b>You are changing the banner of the '.stripslashes($inf['busName']).' Company.</b> Please enter a new banner image location in the input box below and click \'Change banner\' to submit the new image. <b>Current image:</b> '; if($inf['busImage']) { echo '[img='.stripslashes($inf['busImage']).']'; } else { echo '[img=dimg.jpg]'; } echo ' New image: <input type="text" name="banner" size="50" /> <input type="submit" value="Change banner" /> </p> </form>'; } else { $db->query(sprintf("UPDATE `businesses` SET `busImage` = '%s' WHERE `busId` = '%u'", stripslashes($_POST['banner']), $inf['busId'])); echo 'The Company banner was updated.'; business_alert($inf['busId'], "The Company banner has been updated."); } } If I'm not mistaken the banner image is not secure as in only being able to submit files with an image extension, I really dont know much about security, anyone know how i can do this?