function getMiningStorage($user) { $storage = array(); $sql = "SELECT `item`, `quantity` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_mining_storage` " . "WHERE `m_store_user` = '" . $user . "' ORDER BY `item` ;"; $query = mysql_query($sql); if (mysql_num_rows($query)) { while ($temp = mysql_fetch_array($query)) { $storage[$temp['item']] = $temp['quantity']; } } else { echo "找不到目標儲存庫, 請到「原料採集」一遊。"; postFooter(); exit; } return $storage; }
echo "}"; echo "</script>"; echo "<input type=button value='确定' OnClick=\"sellwepform.SellWepDesired.disabled=true;this.disabled=true;cfmsell()\" name=cfmsellbutton>"; } else { echo "没有可以售出的武器。"; } echo "</form><form action=equip.php?action=sellwep2 method=post name=sellwepform2>"; echo "<input type=hidden value='process' name=actionb>"; echo "<input type=hidden value='validcode' name=actionc>"; echo "<input type=hidden value='{$Pl_Value['USERNAME']}' name=Pl_Value[USERNAME]>"; echo "<input type=hidden value='{$Pl_Value['PASSWORD']}' name=Pl_Value[PASSWORD]>"; echo "<input type=hidden name=\"TIMEAUTH\" value=\"{$CFU_Time}\">"; echo "<b>放到二手市场: </b>"; if ($SellW_Options) { echo "<select name=SellWepDesired2>"; echo $SellW_Options; echo "</select>"; echo "价格:<input type=text name='price' size=10 >"; echo "<script language=\"Javascript\">"; echo "function cfmsell2(){"; echo "if (confirm('确定要以这个价格放到二手市场吗?') == true){sellwepform2.SellWepDesired2.disabled=false;sellwepform2.submit()}else{sellwepform2.SellWepDesired2.disabled=false;sellwepform2.cfmsellbutton2.disabled=false;return false}"; echo "}"; echo "</script>"; echo "<input type=button value='确定' OnClick=\"sellwepform2.SellWepDesired2.disabled=true;this.disabled=true;cfmsell2()\" name=cfmsellbutton2>"; } else { echo "没有可以放到二手市场的武器。"; } echo "</td></tr></form></table><br>"; } postFooter();
function bloquageUser($haveToBeLogin, $message) { switch ($haveToBeLogin) { case true: //si l'utilisateur n'est pas connecté, il n'a pas le droit d'accès à l'interface membre if (!$_SESSION['login']) { printHeader('membre-panel', false, 'Boutique - Erreur - Espace Membre', false); echo '<script language="javascript">alert("Vous n\'êtes pas connecté! \\nImpossible d\'accéder à l\'interfaçe membre")</script>'; echo '<script language="javascript">window.location = "membre.php?op=login"</script>'; //dans le cas où l'utilisateur a désactivé le javascript, on affiche un message simple qui ne fait pas de redirection automatique ?> <div id="erreur-panel" class="block-middle" style="text-align:center;"> <div class="head-block">espace membre - erreur</div><br /> <strong>Erreur : </strong>Vous n'êtes pas connecté! <br /> Impossible d'accéder à l'interface membre. <br /><br /> <a href="membre.php?op=login">Connexion</a> </div> <?php postFooter(); die; } break; case false: break; } }
function AuthUser() { session_start(); $U = $_SESSION['username']; $P = $_SESSION['password']; $U = mysql_real_escape_string($U); $P = mysql_real_escape_string($P); $sql_ugnrli = "SELECT username, password, acc_status FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` WHERE username='******'"; $UsrGenrl_Qr = mysql_query($sql_ugnrli) or die('錯誤!<br>未能連接到SQL資料庫(PHPEB_ERROR: 001)' . $GLOBALS['DBPrefix'] . ':' . mysql_error()); $UsrGenrl = mysql_fetch_array($UsrGenrl_Qr); if (!$UsrGenrl['username'] || $UsrGenrl['password'] != md5($P) && $UsrGenrl['password'] != $P || $UsrGenrl['username'] != $U) { echo "<center><br><br>使用者名稱或密碼錯誤。<br><br><a href=\"index.php\" target='_top' style=\"text-decoration: none\">回到首頁</a>"; postFooter(); exit; } if ($UsrGenrl['acc_status'] == 2) { echo "<center><br><br>帳號被鎖,請與管理員聯絡!<br><br><a href=\"http://ext4.me\" target='_top' style=\"text-decoration: none\">回到論壇</a>"; postFooter(); exit; } }
function sendError($Msg) { echo $Msg; postFooter(); exit; }
$sqllogop .= "`log4` = `log3`,"; $TmpLogVar[2] = '`time4` = `time3`,'; } if ($Op_LEnt >= 3) { $sqllogop .= "`log3` = `log2`,"; $TmpLogVar[1] = '`time3` = `time2`,'; } if ($Op_LEnt >= 2) { $sqllogop .= "`log2` = `log1`,"; $TmpLogVar[0] = '`time2` = `time1`,'; } $sqllogop .= "`log1` = '" . $Pl->Player['gamename'] . "與你交戰!{$Op_Log_Tag}'," . $TmpLogVar[3] . $TmpLogVar[2] . $TmpLogVar[1] . $TmpLogVar[0]; $sqllogop .= "`time1` = '{$t_now}' WHERE `username` = '" . $Op->Player['name'] . "' LIMIT 1;"; mysql_query($sqllog) or die('<hr>MySQL 資料庫存取錯誤, 請聯絡GM, 錯誤代號 BTL-2-007<br>' . postFooter()); if ($AtkFortFlag != 1) { mysql_query($sqllogop) or die('<hr>MySQL 資料庫存取錯誤, 請聯絡GM, 錯誤代號 BTL-2-008<br>' . postFooter()); } } } //End of Write Logs // // Information Display / View Phase // //Echo Results echo "<tr align=center>"; $DisplayXp['Pl']['A'] = $Pl->Eq['A']['exp'] >= 0 ? '+' . $Pl->Eq['A']['exp'] / 100 : $Pl->Eq['A']['exp'] / 100; $DisplayXp['Pl']['D'] = $Pl->Eq['D']['exp'] >= 0 ? '+' . $Pl->Eq['D']['exp'] / 100 : $Pl->Eq['D']['exp'] / 100; $DisplayXp['Pl']['E'] = $Pl->Eq['E']['exp'] >= 0 ? '+' . $Pl->Eq['E']['exp'] / 100 : $Pl->Eq['E']['exp'] / 100; $DisOpayXp['Op']['A'] = $Op->Eq['A']['exp'] >= 0 ? '+' . $Op->Eq['A']['exp'] / 100 : $Op->Eq['A']['exp'] / 100; $DisOpayXp['Op']['D'] = $Op->Eq['D']['exp'] >= 0 ? '+' . $Op->Eq['D']['exp'] / 100 : $Op->Eq['D']['exp'] / 100; $DisOpayXp['Op']['E'] = $Op->Eq['E']['exp'] >= 0 ? '+' . $Op->Eq['E']['exp'] / 100 : $Op->Eq['E']['exp'] / 100;
function AuthUser($U, $P) { $sql_ugnrli = "SELECT username, password, acc_status FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` WHERE username='******'"; $UsrGenrl_Qr = mysql_query($sql_ugnrli) or die('错误!<br>未能连接到SQL资料库(PHPEB_ERROR: 001)' . $GLOBALS['DBPrefix'] . ':' . mysql_error()); $UsrGenrl = mysql_fetch_array($UsrGenrl_Qr); if (!$UsrGenrl['username'] || $UsrGenrl['password'] != md5($P) && $UsrGenrl['password'] != $P || $UsrGenrl['username'] != $U) { echo "<center><br><br>使用者名称或密码错误。<br><br><a href=\"index2.php\" target='_top' style=\"text-decoration: none\">回到首页</a>"; postFooter(); exit; } if ($UsrGenrl['acc_status'] == 2) { echo "<center><br><br>帐号被锁,请与管理员联络!<br><br><a href=\"index2.php\" target='_top' style=\"text-decoration: none\">回到首页</a>"; postFooter(); exit; } }