Jump to content

grlayouts

Members
  • Posts

    342
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.bofs.us

Profile Information

  • Gender
    Not Telling

grlayouts's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Got ya, It now inserts, but I get no success or failure message..
  2. If anyone could help, I'm not getting an error message and I've tried changing the code around a few times and outputting errors. The database does not update and i'm getting no error message output on submit, I assume i'm missing something? <?php session_start(); include_once 'dbconnect.php'; if (!isset($_SESSION['userSession'])) { header("Location: index.php"); } $query = $DBcon->query("SELECT * FROM tbl_users WHERE user_id=".$_SESSION['userSession']); $userRow=$query->fetch_array(); ?> <!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=utf-8" /> <title>Welcome - <?php echo $userRow['email']; ?></title> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" media="screen"> <link rel="stylesheet" href="style.css" type="text/css" /> </head> <?php include_once 'header.php'; ?> <html> <head></head> <body> <h1>Send Message:</h1> <form action='message.php' method='POST'> <table> <tbody> <tr> <td>To: </td><td><input type='text' name='to' /></td> </tr> <tr> <td>From: </td><td><input type='text' name='from' /></td> </tr> <tr> <td>Message: </td><td><input type='text' name='message' /></td> </tr> <tr> <td></td><td><input type='submit' value='Create Task' name='sendMessage' /></td> </tr> </tbody> </table> </form> </body> </html> <?php if (isSet($_POST['sendMessage'])) { if (isSet($_POST['to']) && $_POST['to'] != '' && isSet($_POST['from']) && $_POST['from'] != '' && isSet($_POST['message']) && $_POST['message'] != '') { $to = $_POST['to']; $from = $userRow['email']; $message = $_POST['message']; $q = "INSERT INTO tbl_messages(id,message,to,from) VALUES('', '$message', '$to', '$from')"; if ($DBcon->query($q)) { $msg = "<div class='alert alert-success'> <span class='glyphicon glyphicon-info-sign'></span> Message Sent ! </div>"; }else { $msg = "<div class='alert alert-danger'> <span class='glyphicon glyphicon-info-sign'></span> Message not Sent! ! </div>"; } } } $DBcon->close();?> <?php php include_once 'footer.php'; ?> </html>
  3. Hi, I really need to find a way to print the code below in php. <script> $(document).ready(function() { $.sticky('The page has loaded!'); }); </script> i tried print"<script> $(document).ready(function() { $.sticky('The page has loaded!'); });"; </script> any help would be great.
  4. Hey guys, having a small problem which is probably so simple but my login isnt working it always comes back invalid login. I've posted both the login and index form below. anyone see the problem? <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1" method="post" action="login.php"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Member Login </strong></td> </tr> <tr> <td width="78">Username</td> <td width="6">:</td> <td width="294"><input name="myusername" type="text" id="user"></td> </tr> <tr> <td>Password</td> <td>:</td> <td><input name="mypassword" type="pass" id="pass"></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Login"></td> </tr> </table> </td> </form> </tr> </table> <?php $host="localhost"; // Host name $username="thief"; // Mysql username $password="#####"; // Mysql password $db_name="thief_game"; // Database name $tbl_name="players"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form $user=$_POST['user']; $pass=$_POST['pass']; // To protect MySQL injection (more detail about MySQL injection) $user = stripslashes($user); $pass = stripslashes($pass); $user = mysql_real_escape_string($user); $pass = mysql_real_escape_string($pass); $stat = mysql_fetch_array(mysql_query("select * from players where user='$user' and pass='$pass'")); if (empty ($stat[id])) { print "Invalid login."; } ?>
  5. thanks PFMaBiSmAd and cunoodle2, litebearer im not really that good with php to understand any of the code you provided, but thanks for trying to help..
  6. i have a cell in my database like Stats 100-10-3 and i want to update that with my code $details = 100 . '-' . 10 . '-' . 3; $sql = "UPDATE usertable SET uSkillsMax=$details"; but my database updates instead of 100-10-3 it says 87? which is doing the math? any way to fix this?
  7. SOLVED!!! LYLEYBOY THANK YOU SOO MUCH FOR YOUR HELP!!
  8. if i remove the statement should i get a fight list?
  9. new if statement reamined the same..
  10. if i remove the problem code that jumps the incorrect result the error i get it Fight Its time for action! Fight with rival thieves and grab their cash. You will require 1 strength for each fight and you will gain some cash and exp if you win the fight. However you will just earn some exp if you loose!! Each fight will decrease your health so keep an eye on health level because if your health goes below zero you will die and loose everything... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 IN SELECT * FROM `usertable` WHERE `userid`= postfight php <?php include '../header.php'; if( $_POST[action] == 'dofight' ) { $player = Player::getById($_POST[user]); if( $player->stamina <= 0 ) { $str = '<div class=noticeBox><P class=failP>Failure!</P><H2>You are not strong enough to fight against <fb:name uid="'.$_POST[opid].'" linked=false />! Try back later...</H2></div>'; } else if( $player->health < 20 ) { $str = '<div class=noticeBox><P class=failP>Failure!</P><H2>You are too weak to fight <fb:name uid="'.$_POST[opid].'" linked=false />! Try back later...</H2></div>'; } else { $str = do_fight( $_POST[user], $_POST[opid] ); } } include '../statusbar.php'; echo '<div id=contentBox>'; // Show Fight Result if( !empty($_GET[action]) AND $_GET[action]=='attack' ) { echo $str; } if( $_POST[action] == 'dofight' ) { echo $str; } // Fight Lists echo '<P class=pageheader>Fight</P>'; echo '<P>Its time for action! Fight with rival thieves and grab their cash. You will require 1 strength for each fight and you will gain some cash and exp if you win the fight. However you will just earn some exp if you loose!! Each fight will decrease your health so keep an eye on health level because if your health goes below zero you will die and loose everything...</P>'; $res = query("SELECT COUNT(*) FROM `usertable` WHERE `userid`!=$user"); list($total) = mysql_fetch_array($res); if( $total>0 ) { $res = query("SELECT * FROM `usertable` WHERE `userid`!=$user LIMIT 0,20"); echo '<center>'; echo '<table class="itemTable">'; while( $row = mysql_fetch_array($res) ) { $viewplayer = Player::getById($row[userid]); echo '<tr>'; echo '<td width=120px>'; echo '<P><B>Level:</B> '.$viewplayer->level.', '.get_level_title($player->level).'</P>'; echo '</td>'; echo '<td width=120px>'; echo '<P><B>Crew:</B> '.$viewplayer->crew.'</P>'; echo '</td>'; echo '<td width=300px>'; if( $viewplayer->health > 20 ) { echo '<form id="FightForm'.$row[userid].'" method="POST" class="itemForm">'; echo '<input type=hidden name=user value="'.$user.'">'; echo '<input type=hidden name=opid value="'.$row[userid].'">'; echo '<input type=hidden name=action value="dofight">'; echo '<P><input type=button onclick="do_submit(\'FightForm'.$row[userid].'\',\'http://www.bofs.us/thief/fight/post_fight.php\', \'actionDiv\'); return false;" value="Fight Now" class="submitButton" /></P>'; echo '</form>'; } else { echo '<P class=titleP>Too Weak To Fight</P>'; } echo '</td>'; echo '</tr>'; } echo '</table>'; echo '</center>'; } else { echo '<div class=noticeBox><h2>Sorry! No available member found!</h2></div>'; } echo '</div>'; // end of contentBox ?>
  11. the app is facebook based so i cannot see what the address bar would say, but surely It would still show the results from the db and users?
  12. seems exactly the same, no output from that echo..
  13. incase it matters, this is the fightinc <?php //==================================== // Do Fight //==================================== function do_fight( $u, $op ) { global $facebook; global $appCanvasUrl; global $appCallbackUrl; global $appTitle; $player1 = Player::getById($u); $player2 = Player::getById($op); // ================================================================================ // The User Part // ================================================================================ $userTotalAttPwr = 0; $userTotalDefPwr = 0; // ======================================== // Search and Count User Attack Weapons // ======================================== $res = query("SELECT COUNT(*) FROM `items_log` WHERE `userid`=$u AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); list($total) = mysql_fetch_array($res); if( $total>0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$u AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); while( $row = mysql_fetch_array($res) ) { $userTotalWep += $row[itemAmount]; } } if( $userTotalWep > 0 ) { if( $userTotalWep >= $player1->crew ) $userWepUse = $player1->crew; else $userWepUse = $userTotalWep; } else $userWepUse = 0; // ======================================== // Collect and Sort Attack Weapon Power // ======================================== if( $userTotalWep > 0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$u AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); $rows = 0; while( $row = mysql_fetch_array($res) ) { $item = Item::getById($row[itemId]); $userWepArray[$rows][id] = $item->id; $userWepArray[$rows][img] = $item->image; $userWepArray[$rows][att] = $item->att; $userWepArray[$rows][def] = $item->def; $rows++; if( $row[itemAmount] > 1 ) { for($i=0; $i<($row[itemAmount]-1); $i++ ) { $userWepArray[$rows][id] = $item->id; $userWepArray[$rows][img] = $item->image; $userWepArray[$rows][att] = $item->att; $userWepArray[$rows][def] = $item->def; $rows++; } } } // Sort The Array for( $j=0; $j<$userTotalWep; $j++ ) { for( $i=0; $i<($userTotalWep-1); $i++ ) { if( $userWepArray[$i][att] < $userWepArray[$i+1][att] ) { $tempArray = $userWepArray[$i]; $userWepArray[$i] = $userWepArray[$i+1]; $userWepArray[$i+1] = $tempArray; } } } $userWepArray = array_slice($userWepArray,0,$userWepUse); for( $i=0; $i<$userWepUse; $i++ ) { $userTotalAttPwr += $userWepArray[$i][att]; $userTotalDefPwr += $userWepArray[$i][def]; } } // ======================================== // Search and Count User Defense Weapons // ======================================== $res = query("SELECT COUNT(*) FROM `items_log` WHERE `userid`=$u AND `itemType`=2"); list($total) = mysql_fetch_array($res); if( $total>0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$u AND `itemType`=2"); while( $row = mysql_fetch_array($res) ) { $userTotalDef += $row[itemAmount]; } } if( $userTotalDef > 0 ) { if( $userTotalDef >= $player1->crew ) $userDefUse = $player1->crew; else $userDefUse = $userTotalDef; } else $userDefUse = 0; // ======================================== // Collect and Sort Defense Weapon Power // ======================================== if( $userTotalDef > 0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$u AND `itemType`=2"); $rows = 0; while( $row = mysql_fetch_array($res) ) { $item = Item::getById($row[itemId]); $userDefArray[$rows][id] = $item->id; $userDefArray[$rows][img] = $item->image; $userDefArray[$rows][att] = $item->att; $userDefArray[$rows][def] = $item->def; $rows++; if( $row[itemAmount] > 1 ) { for($i=0; $i<($row[itemAmount]-1); $i++ ) { $userDefArray[$rows][id] = $item->id; $userDefArray[$rows][img] = $item->image; $userDefArray[$rows][att] = $item->att; $userDefArray[$rows][def] = $item->def; $rows++; } } } // Sort The Array for( $j=0; $j<$userTotalDef; $j++ ) { for( $i=0; $i<($userTotalDef-1); $i++ ) { if( $userDefArray[$i][att] < $userDefArray[$i+1][att] ) { $tempArray = $userDefArray[$i]; $userDefArray[$i] = $userDefArray[$i+1]; $userDefArray[$i+1] = $tempArray; } } } $userDefArray = array_slice($userDefArray,0,$userDefUse); for( $i=0; $i<$userDefUse; $i++ ) { $userTotalAttPwr += $userDefArray[$i][att]; $userTotalDefPwr += $userDefArray[$i][def]; } } // ================================================================================ // Now The Opponents Part // ================================================================================ $opTotalAttPwr = 0; $opTotalDefPwr = 0; // ======================================== // Search and Count Opponents Attack Weapons // ======================================== $res = query("SELECT COUNT(*) FROM `items_log` WHERE `userid`=$op AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); list($total) = mysql_fetch_array($res); if( $total>0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$op AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); while( $row = mysql_fetch_array($res) ) { $opTotalWep += $row[itemAmount]; } } if( $opTotalWep > 0 ) { if( $opTotalWep >= $player2->crew ) $opWepUse = $player2->crew; else $opWepUse = $opTotalWep; } else $opWepUse = 0; // ======================================== // Collect and Sort Attack Weapon Power // ======================================== if( $opTotalWep > 0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$op AND (`itemType`=1 OR `itemType`=4 OR `itemType`=5)"); $rows = 0; while( $row = mysql_fetch_array($res) ) { $item = Item::getById($row[itemId]); $opWepArray[$rows][id] = $item->id; $opWepArray[$rows][img] = $item->image; $opWepArray[$rows][att] = $item->att; $opWepArray[$rows][def] = $item->def; $rows++; if( $row[itemAmount] > 1 ) { for($i=0; $i<($row[itemAmount]-1); $i++ ) { $opWepArray[$rows][id] = $item->id; $opWepArray[$rows][img] = $item->image; $opWepArray[$rows][att] = $item->att; $opWepArray[$rows][def] = $item->def; $rows++; } } } // Sort The Array for( $j=0; $j<$opTotalWep; $j++ ) { for( $i=0; $i<($opTotalWep-1); $i++ ) { if( $opWepArray[$i][att] < $opWepArray[$i+1][att] ) { $tempArray = $opWepArray[$i]; $opWepArray[$i] = $opWepArray[$i+1]; $opWepArray[$i+1] = $tempArray; } } } $opWepArray = array_slice($opWepArray,0,$opWepUse); for( $i=0; $i<$opWepUse; $i++ ) { $opTotalAttPwr += $opWepArray[$i][att]; $opTotalDefPwr += $opWepArray[$i][def]; } } // ======================================== // Search and Count User Defense Weapons // ======================================== $res = query("SELECT COUNT(*) FROM `items_log` WHERE `userid`=$op AND `itemType`=2"); list($total) = mysql_fetch_array($res); if( $total>0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$op AND `itemType`=2"); while( $row = mysql_fetch_array($res) ) { $opTotalDef += $row[itemAmount]; } } if( $opTotalDef > 0 ) { if( $opTotalDef >= $player2->crew ) $opDefUse = $player2->crew; else $opDefUse = $opTotalDef; } else $opDefUse = 0; // ======================================== // Collect and Sort Defense Weapon Power // ======================================== if( $opTotalDef > 0 ) { $res = query("SELECT * FROM `items_log` WHERE `userid`=$op AND `itemType`=2"); $rows = 0; while( $row = mysql_fetch_array($res) ) { $item = Item::getById($row[itemId]); $opDefArray[$rows][id] = $item->id; $opDefArray[$rows][img] = $item->image; $opDefArray[$rows][att] = $item->att; $opDefArray[$rows][def] = $item->def; $rows++; if( $row[itemAmount] > 1 ) { for($i=0; $i<($row[itemAmount]-1); $i++ ) { $opDefArray[$rows][id] = $item->id; $opDefArray[$rows][img] = $item->image; $opDefArray[$rows][att] = $item->att; $opDefArray[$rows][def] = $item->def; $rows++; } } } // Sort The Array for( $j=0; $j<$opTotalDef; $j++ ) { for( $i=0; $i<($opTotalDef-1); $i++ ) { if( $opDefArray[$i][att] < $opDefArray[$i+1][att] ) { $tempArray = $opDefArray[$i]; $opDefArray[$i] = $opDefArray[$i+1]; $opDefArray[$i+1] = $tempArray; } } } $opDefArray = array_slice($opDefArray,0,$opDefUse); for( $i=0; $i<$userDefUse; $i++ ) { $opTotalAttPwr += $opDefArray[$i][att]; $opTotalDefPwr += $opDefArray[$i][def]; } } // ================================================================================ // Power Comparison // ================================================================================ $userTotalAttPwr += $player1->attack; $userTotalDefPwr += $player1->defense; $opTotalAttPwr += $player2->attack; $opTotalDefPwr += $player2->defense; $userPoint = ($userTotalAttPwr - $opTotalDefPwr); $oponentPoint = ($opTotalAttPwr - $userTotalDefPwr); if( $userPoint > $oponentPoint ) { $str = '<div class=noticeBox><P class=successP>You Won!</P>'; if( $player2->cash > 0 ) $userCashEarn = rand(1,$player2->cash); else $userCashEarn = 0; $userExpEarn = rand(1,5); $userHealthLoss = rand(5,10); $oponentExpEarn = rand(1,5); $oponentHealthLoss = rand(5,10); $player1->cash += $userCashEarn; $player1->exp += $userExpEarn; $player1->stamina -= 1; $player1->health -= $userHealthLoss; $player1->win += 1; $player2->cash -= $userCashEarn; $player2->exp += $oponentExpEarn; $player2->health -= $oponentHealthLoss; $player2->lose += 1; $player1->save(); $player2->save(); // Stream Publish $message = 'won a fight at '.$appTitle.' and received $'.number_format($userCashEarn,0).' and '.$userExpEarn.' exp!'; $caption = 'Are you strong enough to fight?'; $desc = 'Join Whos The Thief, Become the master thief and show your tactics...'; $picture = $appCallbackUrl.'images/logo.png'; publishMyStream($message, $appTitle, $caption, $appCanvasUrl, $desc, $picture ); $logText = 'You won a fight against <fb:name uid='.$op.' useyou=false linked=false />. You earned <B>$'.number_format($userCashEarn,0).' cash</B> and '.$userExpEarn.' exp!'; add_news( $logText, $u ); $logText = 'You lost a fight against <fb:name uid='.$u.' useyou=false linked=false />. You lost <B>$'.number_format($userCashEarn,0).' cash</B> and earned <B>'.$oponentExpEarn.' exp</B>!'; add_news( $logText, $op ); } else { $str = '<div class=noticeBox><P class=failP>You Lost!</P>'; if( $player1->cash > 0 ) $oponentCashEarn = rand(1,$player1->cash); else $oponentCashEarn = 0; $userExpEarn = rand(1,5); $userHealthLoss = rand(5,10); $oponentExpEarn = rand(1,5); $oponentHealthLoss = rand(5,10); $player1->cash -= $oponentCashEarn; $player1->exp += $userExpEarn; $player1->stamina -= 1; $player1->health -= $userHealthLoss; $player1->lose += 1; $player2->cash += $oponentCashEarn; $player2->exp += $oponentExpEarn; $player2->health -= $oponentHealthLoss; $player2->win += 1; $player1->save(); $player2->save(); // Stream Publish $message = 'lost a fight at '.$appTitle.' and lost $'.number_format($oponentCashEarn,0).'!'; $caption = 'Are you strong enough to fight?'; $desc = 'Join Whos The Thief, Become the master thief and show your tactics...'; $picture = $appCallbackUrl.'images/logo.png'; publishMyStream($message, $appTitle, $caption, $appCanvasUrl, $desc, $picture ); $logText = 'You lost a fight against <fb:name uid='.$op.' useyou=false linked=false />. You lost <B>$'.number_format($oponentCashEarn,0).' cash</B> and earned <B>'.$userExpEarn.' exp</B>!'; add_news( $logText, $u ); $logText = 'You won a fight against <fb:name uid='.$u.' useyou=false linked=false />. You earned <B>$'.number_format($oponentCashEarn,0).' cash</B> and <B>'.$oponentExpEarn.' exp</B>!'; add_news( $logText, $op ); } $str .= '<table class="fightTable">'; $str .= '<tr>'; $str .= '<td width=50% valign=top>'; $str .= '<table class="fightTable">'; $str .= '<tr>'; $str .= '<td width=60px><P><fb:profile-pic uid='.$u.' size=square linked=false /></P></td>'; $str .= '<td>'; $str .= '<P class=titleP><fb:name uid='.$u.' linked=false /></P>'; if( $player1->charname != "" ) $str .= '<P>'.$player1->charname.'</P>'; $str .= '<P>Crew: '.$player1->crew.'</P>'; $str .= '</td>'; $str .= '</tr>'; $str .= '</table>'; $str .= '<td width=50% valign=top>'; $str .= '<table class="fightTable">'; $str .= '<tr>'; $str .= '<td>'; $str .= '<P class=rightTitleP><fb:name uid='.$op.' linked=false /></P>'; if( $player2->charname != "" ) $str .= '<P class=rightP>'.$player2->charname.'</P>'; $str .= '<P class=rightP>Crew: '.$player2->crew.'</P>'; $str .= '</td>'; $str .= '<td width=60px><P><fb:profile-pic uid='.$op.' size=square linked=false /></P></td>'; $str .= '</tr>'; $str .= '</table>'; $str .= '</td>'; $str .= '</tr>'; $str .= '<tr>'; $str .= '<td width=50% valign=top>'; $str .= '<table class="fightTable">'; $str .= '<tr><td colspan=5><P class=titleP>Offensive Items</P></td></tr>'; $str .= '<tr>'; if( $userWepUse>0 ) { for( $i=0; $i<$userWepUse; $i++ ) { $item = Item::getById($userWepArray[$i][id]); $str .= '<td><img src="'.$appCallbackUrl.'images/items/'.$item->image.'" class="imgbox" width=50 height=50>'; $totalUse = 1; for( $j=$i; $j<$userWepUse; $j++ ) { if( $userWepArray[$i][id] == $userWepArray[$i+1][id] ) { $totalUse++; $i++; } } $str .= '<P>X'.$totalUse.'</P></td>'; } } else { $str .= '<td colspan=5><P>You had no offensive item and faught with empty hands!</P></td>'; } $str .= '</tr>'; $str .= '<tr><td colspan=5><P class=titleP>Defensive Items</P></td></tr>'; $str .= '<tr>'; if( $userDefUse>0 ) { for( $i=0; $i<$userDefUse; $i++ ) { $item = Item::getById($userDefArray[$i][id]); $str .= '<td><img src="'.$appCallbackUrl.'images/items/'.$item->image.'" class="imgbox" width=50 height=50>'; $totalUse = 1; for( $j=$i; $j<$userDefUse; $j++ ) { if( $userDefArray[$i][id] == $userDefArray[$i+1][id] ) { $totalUse++; $i++; } } $str .= '<P>X'.$totalUse.'</P></td>'; } } else { $str .= '<td colspan=5><P>You had no defensive item and faught with empty hands!</P></td>'; } $str .= '</tr>'; $str .= '</table>'; $str .= '</td>'; $str .= '<td valign=top align=right>'; $str .= '<table class="fightTable">'; $str .= '<tr><td colspan=5><P class=rightTitleP>Offensive Items</P></td></tr>'; $str .= '<tr>'; if( $opWepUse>0 ) { for( $i=0; $i<$opWepUse; $i++ ) { $item = Item::getById($opWepArray[$i][id]); $str .= '<td align=right><img src="'.$appCallbackUrl.'images/items/'.$item->image.'" class="imgbox" width=50 height=50>'; $totalUse = 1; for( $j=$i; $j<$opWepUse; $j++ ) { if( $opWepArray[$i][id] == $opWepArray[$i+1][id] ) { $totalUse++; $i++; } } $str .= '<P>X'.$totalUse.'</P></td>'; } } else { $str .= '<td colspan=5><P class=rightP><fb:name uid="'.$op.'" firstnameonly=true linked=false /> had no offensive item and faught with empty hands!</P></td>'; } $str .= '</tr>'; $str .= '<tr><td colspan=5><P class=rightTitleP>Defensive Items</P></td></tr>'; $str .= '<tr>'; if( $opDefUse>0 ) { for( $i=0; $i<$opDefUse; $i++ ) { $item = Item::getById($opDefArray[$i][id]); $str .= '<td align=right><img src="'.$appCallbackUrl.'images/items/'.$item->image.'" class="imgbox" width=50 height=50>'; $totalUse = 1; for( $j=$i; $j<$opDefUse; $j++ ) { if( $opDefArray[$i][id] == $opDefArray[$i+1][id] ) { $totalUse++; $i++; } } $str .= '<P>X'.$totalUse.'</P></td>'; } } else { $str .= '<td colspan=5><P class=rightP><fb:name uid="'.$op.'" firstnameonly=true linked=false /> had no defensive item and faught with empty hands!</P></td>'; } $str .= '</tr>'; $str .= '</table>'; $str .= '</td>'; $str .= '</tr>'; $str .= '<tr>'; $str .= '<td>'; $str .= '<BR><P class=successP><font size=4>Rewards!</font></P>'; if( $userPoint > $oponentPoint ) { $str .= '<P class=titleP>+ $'.number_format($userCashEarn,0).'</P>'; $str .= '<P class=titleP>+ '.number_format($userExpEarn,0).' exp</P>'; } else { $str .= '<P class=titleP>- $'.number_format($oponentCashEarn,0).'</P>'; $str .= '<P class=titleP>+ '.number_format($userExpEarn,0).' exp</P>'; } $str .= '</td>'; $str .= '<td>'; $str .= '<form id="DoFightForm" method="POST" class="itemForm">'; $str .= '<input type=hidden name=user value="'.$u.'">'; $str .= '<input type=hidden name=opid value="'.$op.'">'; $str .= '<input type=hidden name=action value="dofight">'; $str .= ' <input type=button onclick="do_submit(\'DoFightForm\',\'http://www.bofs.us/thief/fight/post_fight.php\', \'actionDiv\'); return false;" value="Fight Again" class="submitButton" /></P>'; $str .= '</form>'; $str .= '</td>'; $str .= '</tr>'; $str .= '</table>'; $str .= '</div>'; return $str; } ?>
  14. tried echoing it and it's not bringing up anything at all.. echo $_GET["action"]=='attack'; db uid userid uCash uBankCash uPoint uSkillsMax uSkills uAttr uCharName uCharType uStat 1 100000917825988 2990 0 0 100-10-3 100-10-3-10-10 1-32-1-10 1 8-0-0-0-0 6 100000180079544 570 0 0 100-10-3 100-10-3-10-10 1-2-1-10 1 1-0-0-0-0
×
×
  • 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.