Jump to content
MakeWebGames

fahy

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

fahy's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Title: Gangsters Union Site URL: http://www.Gangsters-union.com Site Description: Description You're a loner looking for the thing that makes you rich. But you have to fight your way to the top by selling drugs, weapons, cars, houses and changing jobs the more money means more power. (base site on login pag called fahy designs) Buck up to be the biggest and most powerful in Gangsters Union.
  2. Re: Manage gang problem need really good help nope it dosent work
  3. Re: Manage gang problem need really good help hey the error is Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gangster/public_html/manage-business.php on line 542 this is line 541,542,543 please tell me whats wrong.   } else if ($bappdata['business'] != 0); {
  4. Re: Manage gang problem need really good help here is the other half of the code thank you $sql10 = sprintf("SELECT * businesses WHERE (bID = %u)", $ir['business']); $tmq = $db->query($sql10); $tm = $db->num_rows($tmq); echo ("[b]Here you may send a mass mail to your Business.[/b] "); echo sprintf("You have a total of [b]%s[/b] Members in this Business. ", number_format($tm)); echo ("<form action='manage-business.php?change=mmail' method='post'>"); echo ("Message :<textarea name='message' cols='30' rows='8'>Dear Members Of The Business,"); echo ("</textarea> "); echo ("<input type='submit' value='Submit'> "); echo ("</form>"); } } function logo() { global $db, $ir, $userid, $h, $bdata; if($_POST['newlogo']) { $sql11 = sprintf("UPDATE businesses SET bLOGO = '%s' WHERE (bID = %u)", $db->escape($_POST['newlogo']), $ir['business']); $db->query($sql11); echo "Logo Successfully Changed! "; } else { echo ("Please Paste Your Picture URL for Your New Business Logo "); echo ("<form action='manage-business.php?change=logo' method='post'>"); echo sprintf("New Logo: <input type='text' name='newlogo' value='%s'> ", $bdata['bLOGO']); echo ("<input type='submit' value='Change Pic'> "); echo ("</form>"); } } function flm() { global $db, $ir, $userid, $h, $bdata; if($_POST['business']) { if($_POST['business'] == $bdata['bID']) { die ("You cannot add your own business...Haha!"); } $sql12 = sprintf("SELECT * FROM bf WHERE ((bfFROM = %u) AND (bfTO = %u))", $ir['business'], $_POST['business']); $cq = $db->query($sql12); if($db->num_rows($cq)) { die("You have already added this business."); } $sql13 = sprintf("INSERT INTO bf VALUES (%u, %u)", $ir['business'], $_POST['business']); $sql14 = sprintf("UPDATE businesses SET bPOPULATION = bPOPULATION + %u WHERE (bID = %u)", 50, $_POST['business']); $db->query($sql13); $db->query($sql14); echo "You have added a business as your friend.. "; } else { $sql15 = sprintf("SELECT * FROM businesses"); $sql16 = sprintf("SELECT * FROM bf WHERE (bfFROM = %u)", $ir['business']); $sb = $db->query($sql15); $rem = $db->query($sql16); echo "Remove an friend <form action='friendremove.php' method='post> Friend (By Business ID) :<select name='fri'>"; while($fo=$db->fetch_row($rem)) { echo sprintf("<option value='%u'>%u</option>", $fo['bfTO'], $fo['bfTO']); } echo "</select> <input type='submit' value='Remove!'> </form> "; echo "Add a friend: <form action='manage-business.php?change=flm' method='post'> Business : <select name='business'>"; while($b=$db->fetch_row($sb)) { echo sprintf("<option value='%u'>%s</option>", $b['bID'], $b['bNAME']); } echo "</select> <input type='submit' value='Add'></form> "; } } function elm() { global $db, $ir, $userid, $h, $bdata; if($_POST['business']) { if($_POST['business'] == $bdata['bID']) { die ("You cannot add your own business as a Enemy!!"); } $sql17 = sprintf("SELECT * FROM be WHERE ((beFROM = %u) AND (beTO = %u))", $ir['business'], $_POST['business']); $cq = $db->query($sql17); if($db->num_rows($cq)) { die ("You have already added this business as a enemy."); } $sql18 = sprintf("INSERT INTO be VALUES (%u, %u)", $ir['business'], $_POST['business']); $sql19 = sprintf("UPDATE businesses SET bPOPULATION = bPOPULATION - %u WHERE (bID = %u)", 50, $_POST['business']); $db->query($sql18); $db->query($sql19); echo "You have added a business as your enemy.. "; } else { $sql20 = sprintf("SELECT * FROM businesses"); $sql21 = sprintf("SELECT * FROM be WHERE (beFROM = %u)", $ir['business']); $sb = $db->query($sql20); $rem = $db->query($sql21); echo "Remove an enemy <form action='enemyremove.php' method='post> Enemy (By Business ID) :<select name='eny'>"; while($mo=$db->fetch_row($rem)) { echo sprintf("<option value='%u'>%u</option>", $mo['beTO'], $mo['beTO']); } echo "</select> <input type='submit' value='Remove!'> </form> "; echo "Add a enemy: <form action='manage-business.php?change=elm' method='post'> Business : <select name='business'>"; while($b=$db->fetch_row($sb)) { echo sprintf("<option value='%u'>%s</option>", $b['bID'], $b['bNAME']); } echo "</select> <input type='submit' value='Add'></form> "; } } function prov() { global $db, $ir, $userid, $h, $bdata; if($_GET['insert']== 'bank') { $profit = abs(@intval($bdata['bPROFIT'])); $sql22 = sprintf("UPDATE businesses SET bBANKMONEY = bBANKMONEY - %u, bPROFIT = %u WHERE (bID = %u)", $profit, 0, $ir['business']); $db->query($sql22); event_add($ir['userid'], "You emptied the Businesses Profit to the Banks Cash."); } else { echo sprintf("Your business has £%s Cash. ", number_format($bdata['bPROFIT'])); echo ("[url='manage-business.php?change=prov&insert=bank']Add Profit to Business Cash Bank[/url] "); echo ("[url='manage-business.php']>Back[/url] "); } } function members_list() { global $db, $ir, $userid,$bdata; echo " <center>[b]<u>[url='manage-business.php?change=add']<font color='red'>Check Applications</font>[/url]</u>[/b]</center> <center> <table border=1 width=75% class='table'> <tr> <th>User</th> <th>Level</th> <th>Days In Business</th> <th>Action</th> </tr>"; $sql23 = sprintf("SELECT * FROM users WHERE (business = %u)", $bdata['bID']); $q = $db->query("={}"); while($r=$db->fetch_row($q)) { echo ("<tr>"); echo sprintf ("<td>[url='viewuser.php?u=%u']%s[/url]</td>", $r['userid'], $r['username']); echo sprintf("<td>%s</td>", number_format($r['level'])); echo sprintf("<td>%s</td>", number_format($ir['dib'])); echo sprintf("<td>"); if($bdata['bOWNER'] == $userid || $userid == 1 || $userid == 4) { echo sprintf("[url='manage-business.php?action=kick&ID=%u']Kick[/url]", $r['userid']); } else { echo (" "); } echo ("</td> </tr>"); } echo ("</table> </center> [url='manage-business.php']> Back to your business home[/url]"); } function member_apps() { global $db, $ir, $userid,$bdata,$h; $_GET['bapp'] = abs(@intval($_GET['bapp'])); if($_GET['bapp']) { $sql24 = sprintf(" SELECT b.*, u.* FROM bapps b LEFT JOIN users u ON (b.bappFROM = u.userid) WHERE ((b.bappID = %u) AND (b.bappBUSINESS = %u)) ", $_GET['bapp'], $bdata['bID'] ); $aq=$db->query($sql24); if ($db->num_rows($aq)) { $bappdata = $db->fetch_row($aq); if($_GET['what'] == 'decline') { $sql25 = sprintf("DELETE FROM bapps WHERE (bappID = %u)", $_GET['bapp']); $db->query($sql25); { $eventappdecline = sprintf("Your application to join the %s Business was declined", htmlentities($bdata['bNAME'])); event_add($bappdata['bappFROM'], $eventappdecline,'business'); { $sql26 = sprintf("INSERT INTO busevents VALUES ('', %u, unix_timestamp(), '[url='viewuser.php?u=%u']%s[/url] has declined [url='viewuser.php?u=%u']%s[/url]'s application to join the Business.' ", $bdata['bID'], $userid, $ir['username'], $bappdata['bappFROM'], $bappdata['username'] ); $db->query($sql26); { echo sprintf("You have declined the application by %s.<br } else if ($bappdata['business'] != 0); { die ("That person is already in a Business."); } $sql27 = sprintf("DELETE FROM bapps WHERE (bappID = %u)", $_GET['bapp']); $db->query($sql27); { $eventappaccept = sprintf("Your application to join the %s Business was accepted, Congrats!", $bdata['bNAME']); event_add($bappdata['bappFROM'], $eventappaccept,'business'); { $sql28 = sprintf("INSERT INTO busevents VALUES ('', %u, unix_timestamp(), '[url='viewuser.php?u=']{}[/url] has accepted [url='viewuser.php?u={]}']{}[/url]'s application to join the Business.' ", $bdata['bID'], $userid, $ir['username'], $bappdata['bappFROM'], $bappdata['username']); $db->query($sql28); } $sql29 = sprintf("UPDATE users SET business = %u, dib = %u WHERE (userid = %u)", $bdata['bID'], 0, $bappdata['userid']) $db->query($sql29); { echo sprintf("You have accepted the application by %s. [url='manage-business.php?action=apps']> Back[/url]", $bappdata['username']); } } echo ("[b]Applications[/b] "); echo ("<table width='85%' border='2' class='table'>"); echo ("<tr>"); echo ("<th>User</th>"); echo ("<th>Level</th>"); echo ("<th>Money</th>"); echo ("<th>Reason</th>"); echo ("<th>Action</th>"); echo ("</tr>"); { $sql30 = sprintf("SELECT b.*, u.* FROM bapps b LEFT JOIN users u ON (b.bappFROM = u.userid) WHERE (b.bappBUSINESS = %u) ", $bdata['bID']); } $q = $db->query($sql30); while($r=$db->fetch_row($q)) { echo ("<tr>"); echo sprintf("<td>[url='viewuser.php?u=%u']%s [%u][/url]</td>", $r['userid'], $r['username'], $r['userid']); echo sprintf("<td>%s</td>", number_format($r['level'])); echo sprintf("<td>£%s</td>", number_format($r['money'])); echo sprintf("<td>%s</td>", $r['bappTEXT']); echo ("<td>"); echo sprintf("[url='bapplications.php?action=apps&app=%u&what=accept']Accept[/url]", $r['bappID']); echo (" "); echo sprintf("[url='bapplications.php?action=apps&app=%u&what=decline']Decline[/url]", $r['bappID']); echo ("</td>"); echo ("</tr>"); } echo "</table>"; } function delete() { global $db, $ir, $userid, $h, $bdata; if($_POST['yesorno']== 'yes') { $sql31 = sprintf("UPDATE users SET business = %u WHERE (business = %u)", 0, $bdata['bID']); $db->query($sql31); $sql32 = sprintf("DELETE FROM businesses WHERE (bID = %u)", $bdata['bID']) $db->query($sql32); echo "Business deleted. [url='index.php']Home[/url] "; exit; } else { echo "Are you 100% sure you want to delete this business <form action='manage-business.php?change=delete' method='post'> <input type='submit' name='yesorno' value='Yes'> </form> <form action='index.php' method='link'> <input type='submit' value='No'> </form>"; } } $h->endpage(); ?>   thank you please have a look over it and repaste the working code.
  5. it says when i click on manage bussnes . Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gangster/public_html/manage-business.php on line 542 here is the manage_business.php file please help me .   <?php include "globals.php"; if($ir['business']== 0) { die("You are not in a business."); } if($bdata['bOWNER'] != $userid) { die("You don't own this business!"); } switch($_GET['change']) { case "name": name(); break; case "bank": bank(); break; case "msgs": msgs(); break; case "pday": pday(); break; case "mmail": mmail(); break; case "logo": logo(); break; case "flm": flm(); break; case "elm": elm(); break; case "prov": prov(); break; case "apps": member_apps(); break; case "kick": kick(); break; case "members": members_list(); break; case "delete": delete(); break; default: index(); break; } function index() { global $db, $ir, $userid, $h, $bdata; echo ("<center><font color='green'><h2>"); echo sprintf("[b]Welcome to your managers panel for %s.[/b]</h2></font></center> ", $bdata['bNAME']); echo ("<center>"); echo ("<table width=75% border=1>"); echo ("<tr>"); echo ("<th>Part of business</th>"); echo ("<th>Manage?</th></tr>"); echo ("<tr>"); echo ("<td>Name</td>"); echo ("<td>[url='manage-business.php?change=name']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Applications</td>"); echo ("<td>[url='manage-business.php?change=apps']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Members</td>"); echo ("<td>[url='manage-business.php?change=members']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Bank</td>"); echo ("<td>[url='manage-business.php?change=bank']Manage[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Messages</td>"); echo ("<td>[url='manage-business.php?change=msgs']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Payment Day</td>"); echo ("<td>[url='manage-business.php?change=pday']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Mass Mail</td>"); echo ("<td>[url='manage-business.php?change=mmail']Do[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Logo</td>"); echo ("<td>[url='manage-business.php?change=logo']Change[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Friends</td>"); echo ("<td>[url='manage-business.php?change=flm']Manage[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Enemies</td>"); echo ("<td>[url='manage-business.php?change=elm']Manage[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Profit</td>"); echo ("<td>[url='manage-business.php?change=prov']View[/url]</td>"); echo ("</tr>"); echo ("<tr>"); echo ("<td>Delete Business</td>"); echo ("<td>[url='manage-business.php?change=delete']Delete[/url]</td>"); echo ("</tr>"); echo ("</table></center>"); } function name() { global $db, $ir, $userid, $h, $bdata; if($_POST['newname']) { $sql1 = sprintf("UPDATE `businesses` SET `bNAME` = '%s', `bDESCRIPTION` = '%s' WHERE (`bID` = %u)", $db->escape($_POST['newname']), $db->escape($_POST['description']), $bdata['bID']); $db->query($sql1); echo "Name and Description Changed [url='manage-business.php']>Back[/url] "; exit; } else { echo ("[b]Enter your new business name / description[/b] "); echo ("<form action='manage-business.php?change=name' method='post'>"); echo ("Name: <input type='text' name='newname'> "); echo sprintf("Description : <textarea name='description' cols=30 rows=8>%s</textarea> ", $bdata['bDESCRIPTION']); echo ("<input type='submit' value='Change'></form>"); } } function bank() { global $db, $ir, $userid, $h, $bdata; if($_POST['user']) { $sql2 = sprintf("SELECT * FROM users WHERE ((business = %u) AND (userid = %u))", $ir['business'], $_POST['user']); $ck=$db->query($sql2); if($db->num_rows($ck)== 0) { die ("ERROR! Either this user does not exist or they are not in your business."); } $user = abs(@intval($_POST['user'])); $cash = abs(@intval($_POST['cash'])); $crys = abs(@intval($_POST['crystals'])); $sql3 = sprintf("UPDATE `users` SET `money` = `money` + %u, `crystals` = `crystals` + %u WHERE (`userid` = %u)", $cash, $crystals, $user); $sql4 = sprintf("UPDATE `businesses` SET `bBANKMONEY` = `bBANKMONEY` - %u, `bBANKCRYSTALS` = `bBANKCRYSTALS` - %u WHERE (`bID` = %u)", $cash, $crys, $bdata['bID']); $db->query($sql3); $db->query($sql4); echo sprintf("£%s and %s Crystals Given to User %u: . [url='manage-business.php']>Back[/url] ", number_format($cash), number_format($crys), $user); } else { echo ("<center>Your Business bank currently has... "); echo sprintf("[b]£%s[/b] Cash, ", number_format($bdata['bBANKMONEY'])); echo sprintf("[b][/b] Crystals. ", number_format($bdata['bBANKCRYSTALS'])); echo ("<hr />"); echo ("<form action='manage-business.php?change=bank' method='post'>"); echo sprintf("[b]Give Cash/Crystals to Userid :[/b] <input type='text' name='user' value='%u'> ", $userid); echo ("<table width=75% border=0>"); echo ("<tr>"); echo ("<td height=10 width=50% align=center valign=top>"); echo sprintf("Bank Money: <input type='text' name='cash' value='%u'>", $bdata['bBANKMONEY']); echo ("</td>"); echo ("<td height=10 width=50% align=center valign=top>"); echo sprintf("Bank Crystals: <input type='text' name='crystals' value='%u'>",$bdata['bBANKCRYSTALS'] ); echo ("</td>"); echo ("</tr>"); echo ("</table>"); echo ("</form> "); echo ("</center>"); } } function msgs() { global $db, $ir, $userid, $h, $bdata; if($_POST['newmsg']) { $sql5 = sprintf("UPDATE businesses SET bMESSAGES = '%s' WHERE (bID = %u)", $db->escape($_POST['newmsg']), $bdata['bID']); $db->query($sql5); } else { echo ("Here You May Change Your Business Message. "); echo ("<form action='manage-business.php?change=msgs' method='post'>"); echo sprintf("Message :<textarea name='newmsg' cols=30 rows=8>%s</textarea> ", $bdata['bMESSAGES']); echo ("<input type='submit' value='Change!'> </form>"); } } function pday() { global $db, $ir, $userid, $h, $bdata; if($_POST['submq']) { if($_POST['monday']== 'Yes') { $monday="<font color=green>[b]Yes[/b]</font>"; } else { $monday="<font color=red>[b]No[/b]</font>"; } if($_POST['tuesday']== 'Yes') { $tuesday="<font color=green>[b]Yes[/b]</font>"; } else { $tuesday="<font color=red>[b]No[/b]</font>"; } if($_POST['wednesday']== 'Yes') { $wednesday="<font color=green>[b]Yes[/b]</font>"; } else { $wednesday="<font color=red>[b]No[/b]</font>"; } if($_POST['thursday']== 'Yes') { $thursday="<font color=green>[b]Yes[/b]</font>"; } else { $thursday="<font color=red>[b]No[/b]</font>"; } if($_POST['friday']== 'Yes') { $friday="<font color=green>[b]Yes[/b]</font>"; } else { $friday="<font color=red>[b]No[/b]</font>"; } if($_POST['saturday']== 'Yes') { $saturday="<font color=green>[b]Yes[/b]</font>"; } else { $saturday="<font color=red>[b]No[/b]</font>"; } if($_POST['sunday']== 'Yes') { $sunday="<font color=green>[b]Yes[/b]</font>"; } else { $sunday="<font color=red>[b]No[/b]</font>"; } $totaltext = sprintf("[b]Days of Payments[/b] Monday: %s Tuesday: %s Wednesday: %s Thursday: %s Friday: %s Saturday: %s Sunday: %s ", $monday, $tuesday, $wednesday, $thursday, $friday, $saturday, $sunday); $sql6 = sprintf("UPDATE businesses SET bpDAY = '%s' WHERE (bID = %u)", $db->escape($totaltext), $bdata['bID']); $db->query($sql6); echo ("Days Of Payments is now as follows "); echo ("<hr />"); echo ("[b]Days of Payments[/b] "); echo sprintf("Monday: %s ", $monday); echo sprintf("Tuesday: %s ", $tuesday); echo sprintf("Wednesday: %s ", $wednesday); echo sprintf("Thursday: %s ", $thursday); echo sprintf("Friday: %s ", $friday); echo sprintf("Saturday: %s ", $saturday); echo sprintf("Sunday: %s ", $sunday); echo ("<hr />"); } else { echo "Please tick the days which you want your Payments to be. <form action='manage-business.php?change=pday' method='post'> <input type='hidden' name='submq' value='abc123'> Monday :<input type='checkbox' name='monday' value='Yes'> Tuesday :<input type='checkbox' name='tuesday' value='Yes'> Wednesday :<input type='checkbox' name='wednesday' value='Yes'> Thursday :<input type='checkbox' name='thursday' value='Yes'> Friday :<input type='checkbox' name='friday' value='Yes'> Saturday :<input type='checkbox' name='saturday' value='Yes'> Sunday :<input type='checkbox' name='sunday' value='Yes'> <input type='submit' value='Change'> </form> "; } } function mmail() { global $db, $ir, $userid, $h, $bdata; if($_POST['message']) { $subj = "This is a Mass Mail from Your Business"; $sql8 = sprintf("SELECT * FROM users WHERE (business = %u)", $ir['business']); $mmq = $db->query($sql8); while($o=$db->fetch_row($mmq)) { $sql9 = sprintf(" INSERT INTO mail VALUES ('', %u, %u, %u, unix_timestamp(), '%s', '%s') ", 0, $ir['userid'], $o['userid'], $subj, $db->escape($_POST['message'])); $db->query($sql9); echo sprintf("Mass mail sent to %s. ", $o['username']); } echo "Mass Mail Sent!"; } else {   sorry theres more on other postit exseded maximum character's lol
  6. Re: Help With A Error thats it dont hack or nothing lol   <?php function money_formatter($muny,$symb='£') { return $symb.number_format($muny); } function itemtype_dropdown($connection,$ddname="item_type",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM itemtypes ORDER BY itmtypename ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmtypeid']}'"; if ($selected == $r['itmtypeid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmtypename']}</option>"; } $ret.="\n</select>"; return $ret; } function item_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM items ORDER BY itmname ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmname']}</option>"; } $ret.="\n</select>"; return $ret; } function item2_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM items ORDER BY itmname ASC"); if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmname']}</option>"; } $ret.="\n</select>"; return $ret; } function location_dropdown($connection,$ddname="location",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM cities ORDER BY cityname ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['cityid']}'"; if ($selected == $r['cityid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['cityname']}</option>"; } $ret.="\n</select>"; return $ret; } function shop_dropdown($connection,$ddname="shop",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM shops ORDER BY shopNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['shopID']}'"; if ($selected == $r['shopID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['shopNAME']}</option>"; } $ret.="\n</select>"; return $ret; function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } } ("NOTE You will need to add the gang feature above, it isn't a typing function" user_dropdown($connection,$ddname='user',$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function challengebot_dropdown($connection,$ddname="bot",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT cb.*,u.* FROM challengebots AS cb LEFT JOIN users AS u ON cb.cb_npcid=u.userid ORDER BY u.username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function fed_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE fedjail=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function mailb_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE mailban > 0 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function forumb_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE forumban > 0 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function job_dropdown($connection,$ddname="job",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM jobs ORDER BY jNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['jID']}'"; if ($selected == $r['jID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['jNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function jobrank_dropdown($connection,$ddname="jobrank",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT jr.*,j.* FROM jobranks jr LEFT JOIN jobs j ON jr.jrJOB=j.jID ORDER BY j.jNAME ASC, jr.jrNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['jrID']}'"; if ($selected == $r['jrID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['jNAME']} - {$r['jrNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function house_dropdown($connection,$ddname="house",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['hID']}'"; if ($selected == $r['hID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['hNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function house2_dropdown($connection,$ddname="house",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['hWILL']}'"; if ($selected == $r['hWILL'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['hNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function course_dropdown($connection,$ddname="course",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM courses ORDER BY crNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['crID']}'"; if ($selected == $r['crID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['crNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function crime_dropdown($connection,$ddname="crime",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM crimes ORDER BY crimeNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['crimeID']}'"; if ($selected == $r['crimeID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['crimeNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function crimegroup_dropdown($connection,$ddname="crimegroup",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM crimegroups ORDER BY cgNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['cgID']}'"; if ($selected == $r['cgID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['cgNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function event_add($userid,$text,$connection=0) { global $db; $text=mysql_escape($text); $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$userid}"); return 1; } function mysql_escape($str) { return str_replace("'","''",$str); } function check_level() { global $db; global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query("UPDATE users SET level=level+1,exp=$expu,energy=energy+2,brave=brave+2,maxenergy=maxenergy+2,maxbrave=maxbrave+2, hp=hp+50,maxhp=maxhp+50 where userid=$userid"); } } function get_rank($stat, $mykey) { global $db; global $ir,$userid,$c; $q=$db->query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0") ; return $db->fetch_single($q)+1; } function item_add($user, $itemid, $qty, $notid=0) { global $db; if($notid > 0) { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid} AND inv_id != {$notid}"); } else { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid}"); } if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); $db->query("UPDATE inventory SET inv_qty=inv_qty+{$qty} WHERE inv_id={$r['inv_id']}"); } else { $db->query("INSERT INTO inventory (inv_itemid, inv_userid, inv_qty) VALUES ({$itemid}, {$user}, {$qty})"); } } function item_remove($user, $itemid, $qty) { global $db; $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} AND inv_itemid={$itemid}"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); if($r['inv_qty']>$qty) { $db->query("UPDATE inventory SET inv_qty=inv_qty-{$qty} WHERE inv_id={$r['inv_id']}"); } else { $db->query("DELETE FROM inventory WHERE inv_id={$r['inv_id']}"); } } } function forum_dropdown($connection,$ddname="forum",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM forum_forums ORDER BY ff_name ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ff_id']}'"; if ($selected == $r['ff_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['ff_name']}</option>"; } $ret.="\n</select>"; return $ret; } function make_bigint($str, $positive=1) { $str = (string) $str; $ret = ""; for($i=0;$i<strlen($str);$i++) { if((ord($str[$i]) > 47 && ord($str[$i]) < 58) or ($str[$i]=="-" && $positive == 0)) { $ret.=$str[$i]; } } if(strlen($ret) == 0) { return "0"; } return $ret; } function stafflog_add($text) { global $db, $ir; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $text=$db->escape($text); $db->query("INSERT INTO stafflog VALUES(NULL, {$ir['userid']}, unix_timestamp(), '$text', '$IP')"); } ?>
  7. Re: Help With A Error www.gangsters-union.com
  8. on my game now i have kind of messed it up because i tryed to add a new mod in to global_func lol and it says this on all pages of game now Parse error: syntax error, unexpected T_STRING in /home/gangster/public_html/global_func.php on line 98. Here is line 97-100 please tell me whats wrong } ("NOTE You will need to add the gang feature above, it isn't a typing function" user_dropdown($connection,$ddname="user",$selected=-1) { global $db;   thank you so much .
  9. Re: Help with makeing mods W3schools and php.net iv learned but how do i make a mod lol iv red html xhtml php css but i just dont get it to be honest needa few exsamples or links to the parts i need to look at
  10. Re: Help with makeing mods W3schools and php.net iv learned but how do i make a mod thank's zero but i mean like after that because i dont know what to type in haha. I havent got a firm grasp of coding yet haha .
  11. :mrgreen: hello i own a site but iv not had eny experance with makeing mode could some one help me and tell me the basics of makeing mode iv only usend other peoples mods and fixed them so please help me with a few exsamples and the basics/whats what my game is gangsters-union.com thank you .
×
×
  • Create New...