Jump to content
MakeWebGames

JamesRage

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by JamesRage

  1. Thanks, I'll play around with that, if I get any errors or need advice, I'll post here. Thanks again.
  2. Another reason why I want the one in my original Post, just to give me a peace of mind knowing when a user who is familiar with MCCodes registers on my game and looks on the donator.php thinks 'Hmmm...Never seen this one before.' ;)
  3. I have both, well one bought, and one I've used (friends mod). I'm looking for something different like the one described on my Original Post. But thanks. :)
  4. I like Daves, but I'm looking for something different, and less advanced.
  5. Hey, I wanted this specific Donate Mod...Was hoping the community will help make one... :) Files I think are needed. - Donator.php - Staff_donator.php - ipn_donator.php What does the module do? It allows staff to create Donator Packs, with unlimited items (so theres no limit). And another thing is staff can set up a limited stock on any DP if they want. This mod should also credit Players instantly after Payment. Thanks MWG! :)
  6. Good idea DJK, I will now. :)
  7. Yep, if you do, let me know, I wanted something like this for long now, thanks! :)
  8. Thanks. And what i wanted was something like Daves Mod but different in its own ways. So no cart system like Daves, No ajax, etc etc. Just a simple auto crediting dp system with the acess for staff to create dp's with unlimted item and set some dp's with a limited stock. :)
  9. Hey, heres one, this one quite nifty and big, and you don't need to do it at all MTG. :) A new Donator System with IPN. Features: - Staff Side to create DP's (no limit to amount of items used in DP's) - Admins can also set a limited stock on whatever DP... E.g = Special Donator Pack [10 Left]. - An IPN so after purchase, the user is automatically given the item. If its possible, that would be an awesome mod. :)
  10. Wow thanks! Very fast service, thanks again man! :)
  11. I'll message you bro. :) :P
  12. Thanks bro, love you lol. I get an error here: Parse error: syntax error, unexpected T_STRING, expecting T_CASE or T_DEFAULT or '}' in /home/chaosc52/public_html/userimages.php on line 7 I think the code works great, just the forum might be messing around with the code, you know my cpanel if you want to edit it bro, thanks again, I actually gave up on this mod. :)
  13. I've used this and converted it to work for V2, enjoy: Header.php   <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: header.php * Signature: 52c201ce2e8c549ae70d2936473022f0 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ class headers { function startheaders() { global $ir, $set; echo <<<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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #CCCCCC; font-family:Geneva, Arial, Helvetica, sans-serif; } #container { width:900px; margin:auto !important; } #logoarea { width:900px; height:170px; margin-top:25px; background-color:#1e1e1e; border-radius: 15px 15px 0px 0px; -moz-border-radius: 15px 15px 0px 0px; -khtml-border-radius: 15px 15px 0px 0px; -webkit-border-radius: 15px 15px 0px 0px; } #logo{ font-size:105px; width:550px; height:120px; padding:25px; color:#FFFFFF; float:left; } #stats{ text-align:center; color:#CCCCCC; font-size:14px; float:right; width:300px; margin-top:8px; } .underbar{ height:10px; width:200px; background-color:#333; padding:2px; margin:auto !important; border-radius: 7px 7px 7px 7px; -moz-border-radius: 7px 7px 7px 7px; -khtml-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; } .overbar{ height:10px; border-radius: 7px 7px 7px 7px; -moz-border-radius: 7px 7px 7px 7px; -khtml-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; background-color:#000000; } .topbar{ font-size:10px; color:#bbb; position:relative; left:0; right:0; top:-11px; } #menu1 { width:900px; } .menu1item{ width:180px; padding-top:10px; padding-bottom:10px; font-size:18px; color:#666666; float:left; background-color:#1e1e1e; text-align:center; } .menu1item:hover { background-color:#333; color:#CCCCCC; } #main { width:898px; border:1px solid #1e1e1e; background-color:#FFFFFF; border-radius: 0px 0px 15px 15px; -moz-border-radius: 0px 0px 15px 15px; -khtml-border-radius: 0px 0px 15px 15px; -webkit-border-radius: 0px 0px 15px 15px; } #menu2{ width:200px; float:left; margin-top:10px; text-align:center; } #maincontent{ width:690px; float:right; margin-top:10px; text-align:center; } a{ color:inherit; text-decoration:none; } a:hover { text-decoration:underline; } --> </style> </head> <body> <div id="container"> <div id="logoarea"> <div id="logo"> {$set['game_name']} </div> EOF; } function userdata($ir, $lv, $fm, $cm, $dosessh = 1) { global $db, $c, $userid, $set; $IP = $db->escape($_SERVER['REMOTE_ADDR']); $db->query( "UPDATE `users` SET `laston` = {$_SERVER['REQUEST_TIME']}, `lastip` = '$IP' WHERE `userid` = $userid"); if (!$ir['email']) { global $domain; die( "<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if (!isset($_SESSION['attacking'])) { $_SESSION['attacking'] = 0; } if ($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { echo "You lost all your EXP for running from the fight."; $db->query( "UPDATE `users` SET `exp` = 0, `attacking` = 0 WHERE `userid` = $userid"); $_SESSION['attacking'] = 0; } $enperc = min((int) ($ir['energy'] / $ir['maxenergy'] * 100), 100); $wiperc = min((int) ($ir['will'] / $ir['maxwill'] * 100), 100); $experc = min((int) ($ir['exp'] / $ir['exp_needed'] * 100), 100); $brperc = min((int) ($ir['brave'] / $ir['maxbrave'] * 100), 100); $hpperc = min((int) ($ir['hp'] / $ir['maxhp'] * 100), 100); $enopp = 100 - $enperc; $wiopp = 100 - $wiperc; $exopp = 100 - $experc; $bropp = 100 - $brperc; $hpopp = 100 - $hpperc; $d = ""; $u = $ir['username']; if ($ir['donatordays']) { $u = "<span style='color: red;'>{$ir['username']}</span>"; $d = "<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; } echo '<div id="stats"> Energy <div class="underbar"> <div class="overbar" style="width:'.$enperc.'px;"></div> <div class="topbar">'.$ir['energy'].'/'.$ir['maxenergy'].'</div> </div> Will <div class="underbar"> <div class="overbar" style="width:'.$wiperc.'px;"></div> <div class="topbar">'.$ir['will'].'/'.$ir['maxwill'].'</div> </div> Brave <div class="underbar"> <div class="overbar" style="width:'.$brperc.'px;"></div> <div class="topbar">'.$ir['brave'].'/'.$ir['maxbrave'].'</div> </div> EXP <div class="underbar"> <div class="overbar" style="width:'.$experc.'px;"></div> <div class="topbar">'.($experc/2).'%</div> </div> Health <div class="underbar"> <div class="overbar" style="width:'.$hpperc.'px;"></div> <div class="topbar">'.$ir['hp'].'/'.$ir['maxhp'].'</div> </div> </div> <div style="clear:both"></div> </div>'; $gn = ""; global $staffpage; print <<<OUT OUT; if ($ir['fedjail'] > 0) { $q = $db->query( "SELECT * FROM `fedjail` WHERE `fed_userid` = $userid"); $r = $db->fetch_row($q); die( "<span style='font-weight: bold; color:red;'> You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).<br /> Reason: {$r['fed_reason']} </span></body></html>"); } if (file_exists('ipbans/' . $IP)) { die( "<span style='font-weight: bold; color:red;'> Your IP has been banned from {$set['game_name']}, there is no way around this. </span></body></html>"); } } function menuarea() { define('jdsf45tji', true, true); echo ' <div id="menu1"> <div class="menu1item"> Donate </div> <div class="menu1item"> Vote </div> <div class="menu1item"> Help </div> <div class="menu1item"> Settings </div> <div class="menu1item"> Logout </div> </div> <div id="main"> <div id="menu2">'; include 'mainmenu.php'; global $ir, $c; print '</div><div id="maincontent"><div align="center">'; if ($ir['hospital']) { echo "<b>NB:</b> You are currently in hospital for {$ir['hospital']} minutes.<br />"; } if ($ir['jail']) { echo "<b>NB:</b> You are currently in jail for {$ir['jail']} minutes.<br />"; } echo "<a href='donator.php'><b>Donate to {$set['game_name']} now for game benefits!</b></a><br />"; } function smenuarea() { define('jdsf45tji', true, true); include 'smenu.php'; global $ir, $c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#' . $bgcolor . '"> </td><td width="80%" bgcolor="#' . $bgcolor . '" valign="top"><center>'; } function endpage() { global $db, $ir, $set; $query_extra = ''; if (isset($_GET['mysqldebug']) && $ir['user_level'] == 2) { $query_extra = '<br />' . implode('<br />', $db->queries); } print <<<OUT <div style="clear:both;"></div></div></div> <div style="clear:both"></div> </div> <div align="center">Powered by codes made by Dabomstew. Copyright © $year {$set['game_name']}.<a href="http://www.cdcoding.com" target="_blank">Theme By CDCoding.</a></div> </div> </body> </html> OUT; } }   Mainmenu.php   <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: mainmenu.php * Signature: 3bcf67b27090c7472d474029e2007a07 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ if (!defined('jdsf45tji')) { echo 'This file cannot be accessed directly.'; die; } global $db, $c, $ir, $set; $u = $ir['username']; if ($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>"; $d = "<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; } print "<div align='left' style='padding-left:2px;'><strong>Name:</strong> {$u} [{$ir['userid']}] $d<br /> <strong>Money:</strong> ".money_formatter($ir['money'])."<br /> <strong>Level:</strong> {$ir['level']}<br /> <strong>Crystals:</strong> {$ir['crystals']}<br /> </div><hr />"; $hc = $set['hospital_count']; $jc = $set['jail_count']; $ec = $ir['new_events']; $mc = $ir['new_mail']; if ($ir['hospital']) { echo " <a href='hospital.php'>Hospital ($hc)</a><br /> <a href='inventory.php'>Inventory</a><br /> "; } elseif ($ir['jail']) { echo "<a href='jail.php'>Jail ($jc)</a><br />"; } else { echo "<a href='index.php'>Home</a><br /> <a href='inventory.php'>Inventory</a><br />"; } echo ($ec > 0) ? '<a href="events.php" style="font-weight: bold;">Events (' . $ec . ')</a><br />' : '<a href="events.php">Events (0)</a><br />'; echo ($mc > 0) ? '<a href="mailbox.php" style="font-weight: bold;">Mailbox (' . $mc . ')</a><br />' : '<a href="mailbox.php">Mailbox (0)</a><br />'; if ($ir['jail'] and !$ir['hospital']) { echo " <a href='gym.php'>Jail Gym</a><br /> <a href='hospital.php'>Hospital ($hc)</a><br /> "; } else if (!$ir['hospital']) { echo " <a href='explore.php'>Explore</a><br /> <a href='gym.php'>Gym</a><br /> <a href='criminal.php'>Crimes</a><br /> <a href='job.php'>Your Job</a><br /> <a href='education.php'>Local School</a><br /> <a href='hospital.php'>Hospital ($hc)</a><br /> <a href='jail.php'>Jail ($jc)</a><br /> "; } else { echo "<a href='jail.php'>Jail ($jc)</a><br />"; } echo "<a href='forums.php'>Forums</a><br />"; echo ($ir['new_announcements']) ? '<a href="announcements.php" style="font-weight: bold;">Announcements (' . $ir['new_announcements'] . ')</a><br />' : '<a href="announcements.php">Announcements (0)</a><br />'; echo " <a href='newspaper.php'>Newspaper</a><br /> <a href='search.php'>Search</a><br /> "; if (!$ir['jail'] && $ir['gang']) { echo "<a href='yourgang.php'>Your Gang</a><br />"; } if ($ir['user_level'] > 1) { echo " <hr /> <a href='staff.php'>Staff Panel</a><br /> <hr /> <b>Staff Online:</b><br /> "; $online_cutoff = time() - 900; $q = $db->query( "SELECT `userid`, `username`, `laston` FROM `users` WHERE `laston` > ({$online_cutoff}) AND `user_level` > 1 ORDER BY `userid` ASC"); while ($r = $db->fetch_row($q)) { echo '<a href="viewuser.php?u=' . $r['userid'] . '">' . $r['username'] . '</a> (' . DateTime_Parse($r['laston']) . ')<br />'; } $db->free_result($q); } if ($ir['donatordays']) { echo " <hr /> <b>Donators Only</b><br /> <a href='friendslist.php'>Friends List</a><br /> <a href='blacklist.php'>Black List</a> "; } echo " <hr /> <a href='preferences.php'>Preferences</a><br /> <a href='preport.php'>Player Report</a><br /> <a href='helptutorial.php'>Help Tutorial</a><br /> <a href='gamerules.php'>Game Rules</a><br /> <a href='viewuser.php?u={$ir['userid']}'>My Profile</a><br /> <a href='logout.php'>Logout</a><br /><br /> Time is now<br /> " . date('F j, Y') . "<br />" . date('g:i:s a');   Again, enjoy. :)
  14. Thanks man, this great. Cheers mate. :)
  15. This game might the best if not one of the best games ever made on MWG. :)
  16. Was wondering to...Try message Cronus.
  17. Thanks alot, received it. :)
  18. Hey, nice and simple layout, I like it. Can you send me a copy please? :)
  19. Lets say someone accidentally killed someone, what should i do?!
  20. Nice, thanks for sharing. :)
  21. Hey guys, I posted a while back a viewuser, and it didn't function well. Reason being was my coding skill was pretty poor back then, still is haha, but I know how to correct my mistakes this time around. Here's one thats fixed and in greater quality, there are no modifications installed for obvious reasons, fresh to fit a default MCCodes V2 game (out-the-box). Whats been edited? Not much really, just a better look in my personal opinion, edited the tables etc. Anyhow, enjoy. :) <?php /* Edited by JamesRage, enjoy. :) */ require_once('globals.php'); $_GET['u'] = (isset($_GET['u']) && is_numeric($_GET['u'])) ? abs(intval($_GET['u'])) : ''; if (!$_GET['u']) { echo 'Invalid use of file'; } else { $q = $db->query( "SELECT `userid`, `user_level`, `laston`, `last_login`, `signedup`, `duties`, `donatordays`, `username`, `gender`, `daysold`, `money`, `crystals`, `level`, `friend_count`, `enemy_count`, `display_pic`, `hp`, `maxhp`, `gang`, `fedjail`, `hospital`, `hospreason`, `jail`, `jail_reason`, `bankmoney`, `cybermoney`, `lastip`, `lastip`, `lastip_login`, `lastip_signup`, `staffnotes`, `cityname`, `hNAME`, `gangNAME`, `fed_days`, `fed_reason` FROM `users` `u` INNER JOIN `cities` AS `c` ON `u`.`location` = `c`.`cityid` INNER JOIN `houses` AS `h` ON `u`.`maxwill` = h.`hWILL` LEFT JOIN `gangs` AS `g` ON `g`.`gangID` = `u`.`gang` LEFT JOIN `fedjail` AS `f` ON `f`.`fed_userid` = `u`.`userid` WHERE `u`.`userid` = {$_GET['u']}"); if ($db->num_rows($q) == 0) { $db->free_result($q); echo 'Sorry, we could not find a user with that ID, check your source.'; } else { $r = $db->fetch_row($q); $db->free_result($q); $checkulevel = array(0 => 'NPC', 1 => 'Member', 2 => 'Owner', 3 => 'Secretary', 5 => 'Assistant'); $userl = $checkulevel[$r['user_level']]; $lon = ($r['laston'] > 0) ? date('F j, Y g:i:s a', $r['laston']) : "Never"; $ula = ($r['laston'] == 0) ? 'Never' : DateTime_Parse($r['laston']); $ull = ($r['last_login'] == 0) ? 'Never' : DateTime_Parse($r['last_login']); $sup = date('F j, Y g:i:s a', $r['signedup']); $u_duties = ($r['user_level'] > 1) ? 'Duties: ' . $r['duties'] . '<br />' : ''; $user_name = ($r['donatordays']) ? '<span style="color:red; font-weight:bold;">' . $r['username'] . '</span> [' . $r['userid'] . '] <img src="donator.gif" alt="Donator: ' . $r['donatordays'] . ' Days Left" title="Donator: ' . $r['donatordays'] . ' Days Left" />' : $r['username'] . ' [' . $r['userid'] . ']'; $on = ($r['laston'] >= $_SERVER['REQUEST_TIME'] - 15 * 60) ? '<font color="green"><b>Online</b></font>' : '<font color="red"><b>Offline</b></font>'; $ref_q = $db->query( "SELECT COUNT(`refID`) FROM `referals` WHERE `refREFER` = {$r['userid']}"); $ref = $db->fetch_single($ref_q); $db->free_result($ref_q); if ($r['fedjail']) { echo " <br /> <span style='font-weight: bold; color: blue;'> In federal jail for {$r['fed_days']} day(s) - {$r['fed_reason']} </span> "; } if ($r['hospital']) { echo " <br /> <span style='font-weight: bold; color: red;'> In hospital for {$r['hospital']} minutes - {$r['hospreason']} </span> "; } if ($r['jail']) { echo " <br /> <span style='font-weight: bold; color: green;'> In jail for {$r['jail']} minutes - {$r['jail_reason']} </span> "; } echo " <table width='95%' cellspacing='1' class='table'> <tr> <th colspan='5'>General Information</th> <tr> <td width='47.5%'> "; echo ($r['display_pic']) ? '<img src="' . $r['display_pic'] . '" width="150px" height="150px" alt="User Display Pic" title="User Display Pic" />' : '<img src=default2.jpg width="150px" height="150px" alt="No Display Pic" title="No Display Pic" />'; echo "</td><td width='47.5%'>Status: $on</td> </tr><tr><td>Name: $user_name</td><td>Money: ".money_formatter($r['money'])." </tr><tr><td>User Level: $userl</td><td>Property: {$r['hNAME']}</td> </tr><tr><td>Gender: {$r['gender']}</td><td>Referrals: {$ref}</td> </tr><tr><td>Crystals: {$r['crystals']}</td><td>Duties: {$r['duties']}</td></tr> <tr><th colspan='5'>Additional Information</th></tr> <tr><td>Level: {$r['level']}</td><td>Last Active: $lon</td></tr> <tr><td>Last Action: $ula</td><td>Last Login: $ull</td> </tr><tr><td>Days Old: {$r['daysold']}</td><td> "; echo ($r['gang']) ? 'Gang: <a href="gangs.php?action=view&ID=' . $r['gang'] . '">' . $r['gangNAME'] . '</a>' : 'Gang: N/A'; echo "</td></tr><tr><td>Location: {$r['cityname']}</td><td>Health: {$r['hp']}/{$r['maxhp']}</td> </tr><tr><td>Friends: {$r['friend_count']}</td><td>Enemies: {$r['enemy_count']}</td></tr> <tr><td>Signed Up: $sup</td><td>N/A</td></tr> <tr><th colspan='5'>Actions</th></tr> <tr><td>[<a href='mailbox.php?action=compose&ID={$r['userid']}'>Send Mail</a>]</td><td>[<a href='sendcash.php?ID={$r['userid']}'>Send Cash</a>]</td></tr><tr><td>[<a href='sendcrys.php?ID={$r['userid']}'>Send Crystals</a>]</td><td> [<a href='sendbank.php?ID={$r['userid']}'>Bank Xfer</a>]</td></tr><tr><td>[<a href='sendcyber.php?ID={$r['userid']}'>CyberBank Xfer</a>]</td><td>[<a href='attack.php?ID={$r['userid']}'>Attack</a>]</td></tr> <tr><td>[<a href='contactlist.php?action=add&ID={$r['userid']}'>Add Contact</a>]</td><td>N/A</td></tr><tr><td>[<a href='friendslist.php?action=add&ID={$r['userid']}'>Add Friends</a>]</td><td>[<a href='blacklist.php?action=add&ID={$r['userid']}'>Add Enemies</a>]</td></tr></table>"; if (in_array($ir['user_level'], array(2, 3, 5))) { $r['lastiph'] = @gethostbyaddr($r['lastip']); $r['lastiph'] = ($r['lastiph']); $r['lastip_loginh'] = @gethostbyaddr($r['lastip_login']); $r['lastip_loginh'] = ($r['lastip_loginh']); $r['lastip_signuph'] = @gethostbyaddr($r['lastip_signup']); $r['lastip_signuph'] = ($r['lastip_signuph']); echo "<br /><table width='95%' cellspacing='1' class='table'> <tr><th colspan=5>Staff Information</th><tr> <td></td> <td class='h'>IP</td> <td class='h'>Hostname</td> </tr> <tr> <td class='h'>Last Hit</td> <td>$r[lastip]</td> <td>$r[lastiph]</td> </tr> <tr> <td class='h'>Last Login</td> <td>$r[lastip_login]</td> <td>$r[lastip_loginh]</td> </tr> <tr> <td class='h'>Signup</td> <td>$r[lastip_signup]</td> <td>$r[lastip_signuph]</td> </tr><tr><td width='47.5%'> [<a href='jailuser.php?userid={$r['userid']}'>Jail</a>] </td><td width='47.5%'> [<a href='mailban.php?userid={$r['userid']}'>Mailban</a>]</td><td></td></tr> <tr><td colspan='5'><form action='staffnotes.php' method='post'> Staff Notes: <br /> <textarea rows=7 cols=40 name='staffnotes'>" . htmlentities($r['staffnotes'], ENT_QUOTES, 'ISO-8859-1') . "</textarea> <br /> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /> </form></tr></td> </table>"; } } } $h->endpage(); You will also need this: [ATTACH]854[/ATTACH] Save the image as "default2". Screenshots? Was hoping someone could do that for me, if they like. :rolleyes: Done, enjoy again. :)
  22. Okay guys, heres what I managed to edit (removed BBcodes, and edit line 97 needed to take " from the link, but I a query error: InfamousWars - Critical Error A critical error has occurred, and this page cannot be displayed. Please try again later. Query failed   <?php include "globals.php"; print "<center><font size='4' face='Arial, Helvetica, sans-serif'>User images</font> <hr width=90%>"; switch($_GET['action']) { case 'view': view_image(); break; default: user_images(); break; } function user_images() { global $db,$ir,$c,$userid,$h; $_GET['delete'] = abs((int) $_GET['delete']); if($_GET['delete']) { $db->query("DELETE FROM userimages WHERE imgID={$_GET['delete']} AND imgUSER=$userid"); print " Image deleted from gallery. <hr width=90%>"; } $_GET['set'] = abs((int) $_GET['set']); if($_GET['set']) { $image=$db->query("SELECT * FROM userimages WHERE imgID={$_GET['set']}",$c); $imgs=$db->fetch_row($image); $db->query("UPDATE users SET display_pic='{$imgs['imgURL']}' WHERE userid=$userid"); print " New display image set. <hr width=90%>"; } $_GET['XID'] = abs((int) $_GET['XID']); if(!$_GET['XID']) { print "No userID submitted<hr width=90%>> <a href='explore.php'>Back to city</a><hr width=90%>"; } else { $q=$db->query("SELECT * FROM userimages WHERE imgUSER={$_GET['XID']}",$c); $x=$db->query("SELECT * FROM users WHERE userid={$_GET['XID']}",$c); $y=$db->fetch_row($x); if($db->num_rows($x) == 0) { die (" There is no user with this ID. <hr width=90%>> <a href='explore.php'>Back to city</a><hr width=90%>"); } print "<b>{$y['userid']}'username']}'s uploaded images</b> "; if($db->num_rows($q) == 0) { print "<table width=90% bgcolor=#DFDFDF><tr><td><center>This user has no uploaded images</center></td></tr></table><hr width=90%>> <a href='viewuser.php?u={$y['userid']}'userid']}>Back to profile</a><hr width=90%>"; } else { print "<table width=90% bgcolor=#DFDFDF cellpadding='3'><tr>"; while($r=$db->fetch_row($q)) { $br++; if ($br == 3) { $div="</tr><tr>"; $br=0; } else { $div=""; } $cn++; print "<td align='center'><b>#$cn Profile image</b> <a href='userimages.php?action=view&ID={$r['userid']}'><img src={$r['userid']} /></a>"; if($_GET['XID'] == $userid) { print " [<a href='userimages.php?XID={$r['userid']}'>Delete</a>] [<a href='userimages.php?XID={$r['userid']}'>Set Image</a>]"; } print " </td>"; print "$div"; } print "</tr></table> <hr width=90%>> <a href='viewuser.php?u={$y['userid']}'>Back to profile</a><hr width=90%>"; } } } function view_image() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $e=$db->query("SELECT * FROM userimages WHERE imgID={$_GET['ID']}",$c); $gh=$db->fetch_row($e); print "<img src='.$gh.' /> <hr width=90%>> <a href=userimages.php?XID='.$gh.'>Back to images</a><hr width=90%>"; } $h->endpage(); ?>   Any suggestions guys? :)
  23. Hey bud, get a error on line 97: Parse error: syntax error, unexpected T_STRING in /home/shahcp1/public_html/userimages.php on line 97 (:
  24. YESSS, thanks man, SQL all working now, just got the big userimages.php file left, thanks man :D
  25. Thanks man (: I really appreciate, I gave up with this mod quite some time regardless that I wanted it so much. Thanks again man. :D
×
×
  • Create New...