-
Posts
579 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Everything posted by Seker
-
Cheap Medieval Header/Login/Register .PSD[$10]
Seker replied to DylanTimby1's topic in Art and Content
I don't think you're actually reading. I give up. Please continue to use the grammar and spelling of a third grader. -
Cheap Medieval Header/Login/Register .PSD[$10]
Seker replied to DylanTimby1's topic in Art and Content
Your fail logic failed miserably. The definition on that page has nothing to do with how you used it. You used the word as a contraction. 'ere = here ere' = Not a thing. -
Cheap Medieval Header/Login/Register .PSD[$10]
Seker replied to DylanTimby1's topic in Art and Content
It's not right if you use it in the wrong spot. Uh oh. Here comes the post edit. Anyway. Just saying. -
Cheap Medieval Header/Login/Register .PSD[$10]
Seker replied to DylanTimby1's topic in Art and Content
If you're going to try and insult, and then try to sit on a high horse and use proper punctuation, make sure it's CORRECT. -
Okay, I'm not sure if I did this right. I was assuming you meant run the line as a query. When I do that, what I get back is this: EXPLAIN SELECT * FROM `proposals` WHERE ( `proID` = '' ) AND ( `proPROPOSED` = '7' ) What jumps out at me is that the proID is blank. Is that where my problem is? It's not picking up the proposer's ID?
-
Okay, spoke too soon, again. Everything works fine until someone goes to accept the proposal. Then this shows up: "You've clicked an invalid link, please report to an administrator."
-
EDIT: lucky reminded me I probably deleted 'married' from the users table. Added it back in, and all works smoothly. Thanks a ton, everyone. You guys are rockstars.
-
Negative, but there was an extra "<" in front of it. Probably from when I pasted. Removing that removed the warning at the top of the page, but actually sending a proposal still produces this: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/district/public_html/marriage.php on line 102 Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in /home/district/public_html/global_func.php on line 220 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/district/public_html/global_func.php on line 223 Though, if you try again, it does say you already proposed to someone.
-
Works now with the addition of a missing ";" after line 115. Except for one problem. There's always on more, isn't there? :P When you go to the marriage page, it doesn't exactly throw an error, but on top of the page, it says this: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/district/public_html/marriage.php:1) in /home/district/public_html/marriage.php on line 2 EDIT: Also shows this when actually sending a proposal: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/district/public_html/marriage.php on line 102 Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in /home/district/public_html/global_func.php on line 220 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/district/public_html/global_func.php on line 223
-
Cheap Medieval Header/Login/Register .PSD[$10]
Seker replied to DylanTimby1's topic in Art and Content
Don't believe that top image will fly, but very nice, none the less! -
While you're definitely correct in all your statements, with that I get this: Parse error: syntax error, unexpected T_CASE in /home/district/public_html/marriage.php on line 29
-
Good lord, you did it! Thank you! Been ripping my scalp out over this. Major lifesaver sent me right there. :)
-
And now: Parse error: syntax error, unexpected T_VARIABLE in /home/district/public_html/marriage.php on line 135 Line 135: Proposer: <a href='viewuser.php?u="$ir['userid']."'>".abs(intval(htmlentities($r['username'])))."</a>
-
Same error. Can this really be that hard? Hah Super sorry for the headache this is causing everyone.
-
Now I get this: Parse error: syntax error, unexpected ':' in /home/district/public_html/marriage.php on line 28 @SRB - I don't blame you at all. Thanks for trying.
-
Done and no go. Now I get this: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/district/public_html/marriage.php on line 136
-
Okay, here's the whole code as I have it right now: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_GET['pro'])).""); $r=mysql_fetch_array($m); $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case "accept"; accept(); break; case "decline"; decline(); break; case "decision"; decision(); break; case "proposeform"; proposeform(); break; case "proposesubmit"; proposesubmit(); break; default: index(); break; } if (!in_array($_GET['action'], array('propose', 'proposesubmit', 'proposeform', 'decision', 'decline', 'accept'))) { print "Action Not Understood!"; $h->endpage(); exit; } function index() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { echo "You are already married"; exit($h->endpage()); } else { print"<h1>Proposal Center</h1> Do you want to propose to someone? <form action='marriage.php?action=proposeform' method='post'> <input type='submit' class='submit' value='Yes.'> </form> <form action='index.php' method='get'> <input type='submit' class='submit' value='No.'> </form>"; } } function proposeform() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { echo"You are already married"; exit($h->endpage()); } else { print"<h1>Proposal Center</h1> <form action='marriage.php?action=proposesubmit' method='post'> Please enter the user id of the user you want to propose to: User ID: <input type='text' name='propose' /> Message: <input type='text' name='message' /> <input type='submit' value='Propose' /></form>"; } } function proposesubmit() { global $db,$r,$ir,$c,$h,$userid; $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=mysql_fetch_array($m); if ($r['married'] != 0) { echo "This person is already married. Sorry. Try someone else."; exit($h->endpage()); } if ($ir['married'] != 0) { echo "You are already married"; exit($h->endpage()); } if ($ir['userid'] == $_POST['propose']) { echo "You cannot marry yourself"; exit($h->endpage()); } if ($_POST['propose'] <= 0) { echo"Invalid user, Try someone else."; exit($h->endpage()); } else { $ch=mysql_query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($_POST['propose'])).""); if (mysql_num_rows($ch)!=0) { echo "This user already has a pending proposal, please try again later <a href=index.php>> Back</a>"; exit($h->endpage()); } else { $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=mysql_fetch_array($m); mysql_query("INSERT INTO proposals VALUES('', '{$ir['userid']}', '".abs(intval($_POST['propose']))."', '".mysql_real_escape_string($_POST['message'])."')"); event_add(abs(intval($_POST['propose'])),"<a href='viewuser.php?u=$userid'>".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."]</a> proposed to you click <a href='marriage.php?action=decision'><u>HERE</u></a> to make your mind up.</a> ",$c); print"<h3>Proposal Center</h3> You proposed to ".htmlentities($r['username'])." [".abs(intval($r['userid']))."], please wait for their decision "; } } } function decision() { global $ir,$db,$h,$userid; $m=mysql_query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($ir['userid'])).""); if (mysql_num_rows($m)==0) { echo"Nobody has proposed to you! <a href=index.php>> Back</a>"; exit($h->endpage()); } else { $pro=mysql_fetch_array($m); $f=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $r=mysql_fetch_array($f); print"<h3>Decision Center</h3> <center><table width=90% cellspacing=1 class=table border=1 bordercolor=#636363></center><tr><td> Proposer: <a href='viewuser.php?u=".abs(intval.htmlentities($r['username'])."</a> </td> <td>Message: ".htmlentities($pro['proMESSAGE'])." </td> <td>Decision: <a href='marriage.php?action=accept&pro=".abs(intval($pro['userid']))."'><font color='#666666'>Accept</font></a> <font color='#666666'>or</font> <a href='marriage.php?action=decline&pro=".abs(intval($pro['userid']))."'><font color='#666666'>Decline</font></a></td></tr></table>"; } } function accept() { global $ir,$userid,$db,$h; if ($r['married'] != 0) { echo"This person is already married. Sorry. Try someone else."; exit($h->endpage()); } if($ir['married'] != 0) { print "You are already married"; $h->endpage(); exit(); } $m=mysql_query("SELECT * FROM proposals WHERE (`proID` = ".abs(intval($_GET['pro'])).") AND (`proPROPOSED` = $userid)"); if(!mysql_num_rows($m)) { echo ('You\'ve clicked an invalid link, please report to an administrator.'); $h->endpage(); exit(); } else { $m=mysql_query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); $pro=mysql_fetch_array($m); mysql_query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSER']))." WHERE (`userid` = $userid)"); mysql_query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSED']))." WHERE (`userid` = ".abs(intval($pro['proPROPOSER'])).")"); mysql_query("DELETE FROM proposals WHERE (proID=".abs(intval($pro['proID'])).")"); $mr=mysql_query("SELECT * FROM `users` WHERE (`userid` =".abs(intval($pro['proPROPOSER'])).")"); $par=mysql_fetch_array($mr); event_add($par['userid'],"Your proposal for <a href='viewuser.php?u=".abs(intval($ir['userid']}'>".htmlentities($ir['username'])."</a> was accepted",$c); print "You married ".htmlentities($par['username'])." !!! "; } } function decline() { global $ir,$userid,$db,$h; $_GET['pro'] = isset($_GET['pro']) && is_numeric($_GET['pro']) ? abs(@intval($_GET['pro'])) : false; if(!$_GET['pro']) { echo "Stop abusing our marriage system!"; exit($h->endpage()); } $m=mysql_query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); if (mysql_num_rows($m) == 0) { print "Invalid proposal or this is not your proposal"; } else { $pro=mysql_fetch_array($m); mysql_query("DELETE FROM proposals WHERE proID=".abs(intval($pro['proID'])).""); $mr=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $par=mysql_fetch_array($mr); event_add($par['userid'],"".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."] has declined your proposal",$c); print"You declined the proposal from ".htmlentities($par['username'])."! "; } } $h->endpage(); ?>
-
Still the same error. Parse error: syntax error, unexpected ';' in /home/district/public_html/marriage.php on line 143 Here are lines 140-145: <td>Decision: <a href='marriage.php?action=accept&pro=".abs(intval( $pro['userid']))."'><font color='#666666'>Accept</font></a> <font color='#666666'>or</font> <a href='marriage.php?action=decline&pro=".abs(intval($pro['userid']))." '><font color='#666666'>Decline</font></a></td></tr></table>"; } } Again, thanks for trying to help, though. Still figuring this all out.
-
Could Be A Very Stupid Question (Not Specific Mod Question)
Seker replied to Seker's topic in Modification Support
The simplest ideas always come from someone else. That sounds way easier than pulling my hair out. Thanks for that. -
I played on a network which had both round-based and continuous versions of almost all of their games. Rounds gave a cash prize + game credit to the winner at the end of each reset. Runners up also received some "points/crystals" for the new round. Personally, I always hated restarting. Once I'm at the top, I'd rather have people trying to catch up, rather than sending me down to join them. From what I've seen, though, the players who will play more than one round usually love it and will continue to play for many rounds. At least, until they can no longer afford it. I think it's pretty hit-or-miss with a round-based game. With a super large player-base, I could see the advantages. New players everyday would love to not feel like they're automatically in the dust just because they found the game after everyone else. Not to mention, game economy is a non-issue with round-based games.
-
Could Be A Very Stupid Question (Not Specific Mod Question)
Seker replied to Seker's topic in Modification Support
Ah, my bad. What I meant was, in a lot of V1 mods around the forum, there are instructions to change something in "admin.php." The thing I'm wondering is, is this something that was removed when V1.1.1 was patched? Or have they, for some reason, kept it out of the download? -
Have made both of the changes, and still getting this: Parse error: syntax error, unexpected T_STRING in /home/district/public_html/marriage.php on line 143 Definitely appreciate the help. Starting to think this is just more trouble than it's worth, though.
-
Okay, now I get Parse error: syntax error, unexpected T_STRING in /home/district/public_html/marriage.php on line 141
-
Alright, so I'm trying to use this, converted to V1. The problem is, the forum added so many "target=_blank"'s, that I'm completely lost. I've tried to fix them, but I obviously am not correcting it in the right way. I'm wondering if anyone can help me. I'm getting this error: Parse error: syntax error, unexpected ';' in /home/district/public_html/marriage.php on line 143 Here's the code as I have it after "attempting" to fix it: <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_GET['pro'])).""); $r=mysql_fetch_array($m); $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case "accept"; accept(); break; case "decline"; decline(); break; case "decision"; decision(); break; case "proposeform"; proposeform(); break; case "proposesubmit"; proposesubmit(); break; default: index(); break; } if (!in_array($_GET['action'], array('propose', 'proposesubmit', 'proposeform', 'decision', 'decline', 'accept'))) { print "Action Not Understood!"; $h->endpage(); exit; } function index() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { echo "You are already married"; exit($h->endpage()); } else { print"<h1>Proposal Center</h1> Do you want to propose to someone? <form action='marriage.php?action=proposeform' method='post'> <input type='submit' class='submit' value='Yes.'> </form> <form action='index.php' method='get'> <input type='submit' class='submit' value='No.'> </form>"; } } function proposeform() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { echo"You are already married"; exit($h->endpage()); } else { print"<h1>Proposal Center</h1> <form action='marriage.php?action=proposesubmit' method='post'> Please enter the user id of the user you want to propose to: User ID: <input type='text' name='propose' /> Message: <input type='text' name='message' /> <input type='submit' value='Propose' /></form>"; } } function proposesubmit() { global $db,$r,$ir,$c,$h,$userid; $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=mysql_fetch_array($m); if ($r['married'] != 0) { echo "This person is already married. Sorry. Try someone else."; exit($h->endpage()); } if ($ir['married'] != 0) { echo "You are already married"; exit($h->endpage()); } if ($ir['userid'] == $_POST['propose']) { echo "You cannot marry yourself"; exit($h->endpage()); } if ($_POST['propose'] <= 0) { echo"Invalid user, Try someone else."; exit($h->endpage()); } else { $ch=mysql_query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($_POST['propose'])).""); if (mysql_num_rows($ch)!=0) { echo "This user already has a pending proposal, please try again later <a href=index.php>> Back</a>"; exit($h->endpage()); } else { $m=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=mysql_fetch_array($m); mysql_query("INSERT INTO proposals VALUES('', '{$ir['userid']}', '".abs(intval($_POST['propose']))."', '".mysql_real_escape_string($_POST['message'])."')"); event_add(abs(intval($_POST['propose'])),"<a href='viewuser.php?u=$userid'>".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."]</a> proposed to you click <a href='marriage.php?action=decision'><u>HERE</u></a> to make your mind up.</a> ",$c); print"<h3>Proposal Center</h3> You proposed to ".htmlentities($r['username'])." [".abs(intval($r['userid']))."], please wait for their decision "; } } } function decision() { global $ir,$db,$h,$userid; $m=mysql_query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($ir['userid'])).""); if (mysql_num_rows($m)==0) { echo"Nobody has proposed to you! <a href=index.php>> Back</a>"; exit($h->endpage()); } else { $pro=mysql_fetch_array($m); $f=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $r=mysql_fetch_array($f); print"<h3>Decision Center</h3> <center><table width=90% cellspacing=1 class=table border=1 bordercolor=#636363></center><tr><td> Proposer: <a href='viewuser.php?u=".abs(intval.htmlentities($r['username'])."</a> </td> <td>Message: ".htmlentities($pro['proMESSAGE'])." </td> <td>Decision: <a href='marriage.php?action=accept&pro=".abs(intval($pro['userid']))."><font color=green>Accept</font></a> or <a href='marriage.php?action=decline&pro=".abs(intval($pro['userid']))."><font color=red>Decline</font></a></td></tr></table>"; } } function accept() { global $ir,$userid,$db,$h; if ($r['married'] != 0) { echo"This person is already married. Sorry. Try someone else."; exit($h->endpage()); } if($ir['married'] != 0) { print "You are already married"; $h->endpage(); exit(); } $m=mysql_query("SELECT * FROM proposals WHERE (`proID` = ".abs(intval($_GET['pro'])).") AND (`proPROPOSED` = $userid)"); if(!mysql_num_rows($m)) { echo ('You\'ve clicked an invalid link, please report to an administrator.'); $h->endpage(); exit(); } else { $m=mysql_query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); $pro=mysql_fetch_array($m); mysql_query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSER']))." WHERE (`userid` = $userid)"); mysql_query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSED']))." WHERE (`userid` = ".abs(intval($pro['proPROPOSER'])).")"); mysql_query("DELETE FROM proposals WHERE (proID=".abs(intval($pro['proID'])).")"); $mr=mysql_query("SELECT * FROM `users` WHERE (`userid` =".abs(intval($pro['proPROPOSER'])).")"); $par=mysql_fetch_array($mr); event_add($par['userid'],"Your proposal for <a href='viewuser.php?u=".abs(intval($ir['userid']}'>".htmlentities($ir['username'])."</a> was accepted",$c); print "You married ".htmlentities($par['username'])." !!! "; } } function decline() { global $ir,$userid,$db,$h; $_GET['pro'] = isset($_GET['pro']) && is_numeric($_GET['pro']) ? abs(@intval($_GET['pro'])) : false; if(!$_GET['pro']) { echo "Stop abusing our marriage system!"; exit($h->endpage()); } $m=mysql_query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); if (mysql_num_rows($m) == 0) { print "Invalid proposal or this is not your proposal"; } else { $pro=mysql_fetch_array($m); mysql_query("DELETE FROM proposals WHERE proID=".abs(intval($pro['proID'])).""); $mr=mysql_query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $par=mysql_fetch_array($mr); event_add($par['userid'],"".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."] has declined your proposal",$c); print"You declined the proposal from ".htmlentities($par['username'])."! "; } } $h->endpage(); ?>