Jump to content

morbidangel2012

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

morbidangel2012's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I was wondering how I could set up a time mod to set time 3 times per hour. DROP TABLE IF EXISTS og_updateattacks; CREATE TABLE og_updateattacks ( lasttime int(20) default NULL, id int(11) NOT NULL auto_increment, PRIMARY KEY (id) ) TYPE=MyISAM; That is what I got, but I want it so users can attack at random times per hour.
  2. Apparently not! Anything you guys could do to make this work?
  3. ha probably not this was written by a friend of mine. I think he is sloppy lol.
  4. <? require('inc.header.php'); ?> <? $chhkstate = $myrow[state]; $sql3bc3 = "SELECT count(*) from og_userinfo where networth > $networth AND state=$chhkstate"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $result3bc3 = @mysql_query($sql3bc3); $myrow3bc3 = @mysql_fetch_array($result3bc3); $rank2 = $myrow3bc3[0] + 1; ?> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="82%" valign="TOP"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="17%" valign="TOP"> <table border="0" cellpadding="0" cellspacing="0" width="129"> <tr> <td colspan="2"><img src="options.gif" width="129" height="17" align="BOTTOM" border="0"></td> </tr> <tr> <td width="115" valign="TOP" bgcolor="#00254C"> <p> <center> <p> <table border="0" cellpadding="0" cellspacing="0" width="90%"> <tr> <td width="100%"> <? require('inc.sideoptions.php'); ?> </td> </tr> </table> </center> <p> </td> <td width="14"><img src="side.gif" width="14" height="484" align="BOTTOM" border="0"></td> </tr> <tr> <td colspan="2"><img src="side.bottom.gif" width="128" height="11" align="BOTTOM" border="0"></td> </tr> </table> </td> <td width="83%" valign="TOP"> <br> <center> <? ?> <? $pcrankings = $cityrankings; if ($cityrankings == "") { $cityrankings = $myrow[state]; $pcrankings = $cityrankings; if ($limit == "") { $c_rank = $rank2 - 1; $chk_rank = floor($c_rank / 20); $limit = $chk_rank * 20; } } ?> <? if ($cityrankings == "all") { $pcrankings = $cityrankings; $cityrankings = ""; } ?> <? $sqltrav = "SELECT state, continent, id from og_state order by continent, state"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resulttrav = @mysql_query($sqltrav); $myrowtrav = @mysql_fetch_array($resulttrav); ?> <? $sqltrav2 = "SELECT state from og_state where id=$cityrankings"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resulttrav2 = @mysql_query($sqltrav2); $myrowtrav2 = @mysql_fetch_array($resulttrav2); ?> <b><font size="1" face="Verdana, Arial, Helvetica">MOST WANTED:<br><? if (!$cityrankings) { ?>SHOWING WORLD'S MOST WANTED<? } else { ?><? echo strtoupper($myrowtrav2[state]) ?><? } ?><br><br> <form action="rankings.php?uid=<? echo $uid ?>&secid=<? echo $secid ?>" method="POST" enctype="application/x-www-form-urlencoded"> <select name="cityrankings" style="Font-Family : Verdana, Arial, Helvetica ; Font-Size : 7pt"> <? if ($cityrankings) {?><option value="<? echo $cityrankings ?>"><? echo $myrowtrav2[state] ?></option><? } ?> <? do { ?> <option value="<? echo $myrowtrav[id] ?>"><? echo $myrowtrav[state] ?></option> <? } while ($myrowtrav = @mysql_fetch_array($resulttrav)); ?> <option value="all">World's Most Wanted</option> </select><br><br><input type="submit" name="go" value="show most wanted" style="Font-Family : Verdana, Arial, Helvetica ; Font-Size : 7pt"> </form> <? if ($cityrankings != "") { if (($limit == "0") || ($limit == "")) { $sqld = "SELECT username, prostitutes, thugs, networth, id, uid from og_userinfo where networth > 0 AND state=$cityrankings order by networth DESC limit 0,20"; $countquery = "SELECT count(*) from og_userinfo where networth > 0 AND state=$cityrankings"; } if ($limit > "0") { $sqld = "SELECT username, prostitutes, thugs, networth, id, uid from og_userinfo where networth > 0 AND state=$cityrankings order by networth DESC limit $limit,20"; $countquery = "SELECT count(*) from og_userinfo where networth > 0 AND state=$cityrankings"; } } else { if (($limit == "") || ($limit == 0)) { $sqld = "SELECT username, prostitutes, thugs, networth, id, uid from og_userinfo where networth > 0 order by networth DESC limit 0,20"; $countquery = "SELECT count(*) from og_userinfo where networth > 0"; } if ($limit > "0") { $sqld = "SELECT username, prostitutes, thugs, networth, id, uid from og_userinfo where networth > 0 order by networth DESC limit $limit,20"; $countquery = "SELECT count(*) from og_userinfo where networth > 0"; } } @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resultd = @mysql_query($sqld); $myrowd = @mysql_fetch_array($resultd); @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $cresult = @mysql_query($countquery); $countresults = @mysql_fetch_array($cresult); $numresults = $countresults[0]; if ($numresults <= 20) { $upper = $numresults; } if ($numresults > 20) { $upper = $limit + 20; if ($upper > $numresults) { $upper = $numresults; } } ?> <table border="0" width="100%"> <tr> <td width="5%"><b><font size="1" face="Verdana, Arial, Helvetica">RANK</font></b></td> <td width="25%"><b><font size="1" face="Verdana, Arial, Helvetica">NAME</font></b></td> <td width="20%"><b><font size="1" face="Verdana, Arial, Helvetica">PROS.</font></b></td> <td width="20%"><b><font size="1" face="Verdana, Arial, Helvetica">THUGZ</font></b></td> <td width="25%"><p align="RIGHT"><b><font size="1" face="Verdana, Arial, Helvetica">NETWORTH</font></b></td> </tr> <? $i = $limit + 1; do { if ($myrowd[username] != "") { if ($myrowd[username] == $myrow[username]) { $trbgcolor = "bgcolor=\"#272727\""; } $rankchkid = $myrowd[uid]; $sqlae = "SELECT count(*) from og_session where uid='$rankchkid'"; @mysql_connect($dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resultae = @mysql_query($sqlae); $myrowae = @mysql_fetch_array($resultae); if ($myrowae[0] == 0) { $fcolor = "color=\"#666666\""; $fcase = 1;} ?> <tr <? echo $trbgcolor; ?>> <td width="5%" valign="top"><b><font size="1" face="Verdana, Arial, Helvetica" <? if ($fcase) { echo $fcolor; } ?>>#<? echo $i ?></font></b></td> <td width="25%" valign="top"><b><font size="1" face="Verdana, Arial, Helvetica" <? if ($fcase) { echo $fcolor; } ?>><a href="memberinfo.php?uid=<? echo $uid ?>&secid=<? echo $secid ?>&playerid=<? echo $myrowd[id] ?>"><? echo $myrowd[username] ?></a> (#<? echo $myrowd[id] ?>)</font></b></td> <td width="20%" valign="top"><b><font size="1" face="Verdana, Arial, Helvetica" <? if ($fcase) { echo $fcolor; } ?>><? echo number_format($myrowd[prostitutes]) ?></font></b></td> <td width="20%" valign="top"><b><font size="1" face="Verdana, Arial, Helvetica" <? if ($fcase) { echo $fcolor; } ?>><? if (strlen($myrowd[thugs]) > 12) { echo "too many"; } else { echo number_format($myrowd[thugs]); }?></font></b></td> <td width="25%" valign="top"><p align="RIGHT"><b><font size="1" face="Verdana, Arial, Helvetica" <? if ($fcase) { echo $fcolor; } ?>><? if (strlen($myrowd[networth]) > 18) { echo "a ridiculous amt"; } else { echo "$" . number_format($myrowd[networth]); }?></font></b></td> </tr> <? $i = $i + 1; } $trbgcolor = ""; $fcase = ""; } while (($myrowd = @mysql_fetch_array($resultd)) && ($myrowd[username] != "")); ?> <? if ($numresults >= ($limit + 21)) { $nlimit = $limit + 20;} if ($limit) { $plimit = $limit - 20; if ($plimit < 0) { $plimit = 0; } $alink = "<a href='rankings.php?uid=$uid&secid=$secid&limit=$plimit&cityrankings=$pcrankings'><< previous</a>"; } if (($limit) && ($nlimit)) { $alink .= "<img src='../invisible.gif' width=20 height=10 border=0 alt=''>"; } if ($nlimit) { $alink .= "<a href='rankings.php?uid=$uid&secid=$secid&limit=$nlimit&cityrankings=$pcrankings'>next >></a>"; } ?> <tr> <td colspan="5"> <br> <? if (($pcrankings != "") && ($pcrankings != "all")) { ?> <center> <font size="1" face="Verdana, Arial, Helvetica"> <b>[ <? $numpages = $numresults / 20; $startpages = 0; do { if (($startpages != 0) && ($startpages != $numpages)) { ?> | <? } $chkpage = ($startpages * 20); if ($limit == $chkpage) { ?> <? echo (($startpages * 20) + 1); ?> - <? echo (($startpages * 20) + 20); ?> <? } else { ?> <a href="rankings.php?uid=<? echo $uid ?>&secid=<? echo $secid ?>&cityrankings=<? echo $pcrankings ?>&limit=<? echo ($startpages * 20); ?>"><? echo (($startpages * 20) + 1); ?> - <? echo (($startpages * 20) + 20); ?></a> <? } $startpages = $startpages + 1; } while ($startpages <= $numpages); ?> ]</b> </font> </center> <? } ?> <br> <center><font size="1" face="Verdana, Arial, Helvetica"><b><? echo $alink ?></b></font></center><br> </td> </tr> </table> </td> </tr> </table> </td> <td width="18%" valign="TOP"> <p><img src="newside.gif" width="177" height="407" align="BOTTOM" border="0"></p> <div align="RIGHT"> <p> <? require('inc.head.php'); ?> </div> </td> </tr> </table> </body> </html> <? //foot start } else { $goto = "index.php"; require( 'inc.forward.php' ); } //foot end ?> THERE that's all the code. MOD EDIT: . . . tags added . . .
  5. <tr> <td colspan="5"> <br> <?} if (($pcrankings != "") && ($pcrankings != "all")) { ?> <center> <font size="1" face="Verdana, Arial, Helvetica"> <b> <? $numpages = $numresults / 20; $startpages = 0; do { if (($startpages != 0) && ($startpages != $numpages)) } ?> <? { $chkpage = ($startpages * 20); if ($limit == $chkpage) { ?> <? echo (($startpages * 20) + 1); ?> - <? echo (($startpages * 20) + 20); ?> <? } else { ?> <a href="rankings.php?uid=<? echo $uid ?>&secid=<? echo $secid ?>&cityrankings=<? echo $pcrankings ?>&limit=<? echo ($startpages * 20); ?>"><? echo (($startpages * 20) + 1); ?> - <? echo (($startpages * 20) + 20); ?></a> <? } $startpages = $startpages + 1; { while ($startpages <= $numpages); ?> }</b> </font> </center> <? { ?> <br> <center><font size="1" face="Verdana, Arial, Helvetica"><b><? echo $alink ?></b></font></center><br> </td> </tr> </table> </td> </tr> </table> </td> <td width="18%" valign="TOP"> <p><img src="newside.gif" width="177" height="407" align="BOTTOM" border="0"></p> <div align="RIGHT"> <p> <? require('inc.head.php'); ?> </div> </td> </tr> </table> </body> </html> <? //foot start } else { $goto = "index.php"; require('inc.forward.php'); } //foot end ?>
  6. Parse error: syntax error, unexpected '}' in /home/mintcity/public_html/v1/rankings.php on line 261 <? //foot start } else { $goto = "index.php"; require('inc.forward.php'); //foot end ?>
  7. Hi my friend and I are making a text based thug game and we are in a root. We have all the coding done and our database set up only problem we are having is when you go to our page and try to register is always says "Error opening database" It's so frustrating because I don't know what else I have to setup to to connect to my database. If someone could take a look at our site mintcitymarine.com or if someone is interested in setting up our config.inc.php I would be willing to pay please get ahold of me I know it's something simple and our game has great potential to be a money maker. Thanks, Dale. P.S Here is a copy of my Inc.settings.php which is required for every page. <? //set defaults: //site home dir ie: 174.121.33.189/mintcitymarine $sitedir = "www.mintcitymarine.com"; //session home dir $homedir = "www.mintcitymarine.com/"; // database settings $dbhost = "Localhost"; $dbuser = "mintcity@localhost"; $dbpass = "*****; $dbname = "mintcity_thugz"; $sqlcz = "SELECT lasttime from og_updatefl"; @mysql_connect( $dbhost, $dbuser, $dbpass); @mysql_select_db($dbname) or die("Error opening database"); $resultcz = @mysql_query($sqlcz); $myrowcz = @mysql_fetch_array($resultcz); echo $myrowcz[lasttime]; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.