本文整理汇总了PHP中smartquote函数的典型用法代码示例。如果您正苦于以下问题:PHP smartquote函数的具体用法?PHP smartquote怎么用?PHP smartquote使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smartquote函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smartquote
<?php
include "head.php";
if ($logged_in) {
if (!$stat['id']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> If you are logged on then this message was generated due to session timeout!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if (!isset($_POST['id'])) {
$id = $_GET['id'];
} else {
$id = $_POST['id'];
}
$id = smartquote($id);
$find = mysql_fetch_array(mysql_query("select * from tradepropose where tradeid={$id} and active='Y'")) or die("Can not find trade information");
/* Check if you have trade already proposed with this person */
if (!$find) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Trade isn't there!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
/* End */
$stat1 = mysql_fetch_array(mysql_query("select * from players where id='{$find['propose']}'"));
$stat2 = mysql_fetch_array(mysql_query("select * from players where id='{$find['owner']}'"));
$accept = $_POST['accept'];
if ($accept == 'Accept') {
/* Check if security pass is there or valid */
$answer = $_POST['answer'];
if (!$answer) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> No security pass typed!<br>\n </tr>\n </table>\n </center>\n</div>";
示例2: mysql_query
}
if ($answer != $stat['answer']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You need to write your security pass correctly!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$points = 15;
if ($stat['points'] < $points) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You do not have enough points!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$addna = mysql_query("select itemid,owner,name from iteminv where itemid='{$addn}'");
$addnam = mysql_fetch_array($addna);
$addname = "{$stat['username']}'s {$addnam['name']}";
$addname = smartquote($addname);
mysql_query("update iteminv set name={$addname} where itemid='{$addnam['itemid']}' and owner='{$stat['id']}'") or die("Nothing there");
mysql_query("update players set points=points-'{$points}' where id='{$stat['id']}'");
echo "<h5><b>Done!</b></h5>";
}
?>
<div align="center">
<table bgcolor="#202020" width="724">
<td><div align="center"><img width="700" src="images/blacksmith.jpg"></div></td>
<tr>
<td >
<table align=center width=724 cellpadding=0 cellspacing=0 border=1 bgcolor="#191818">
<td>
示例3: mysql_query
<td>
<img src="images/world/mobs/<?php
$mobview['pic'];
?>
" width="250" height="250">
</td>
<?php
if (isset($harvest)) {
echo "<td valign=top>" . $mobfunc->message . "</td>";
} else {
?>
<td valign="top">
<p>
<?php
$descr = mysql_query("select * from world_mobs_1 where name=" . smartquote($mobview['name']) . "");
$desc = mysql_fetch_assoc($descr);
if ($desc['desc'] > "") {
echo $desc['desc'];
} else {
echo "No profile description";
}
?>
</p>
</td>
<?php
}
?>
</tr>
</table>
</td>
示例4: mysql_num_rows
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You cannot accept this quest again!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$actcount1 = mysql_num_rows(mysql_query("select * from qactive where mob='{$mobid}' and mobqid=" . $mobq[$mobid]["qid"] . " and owner='{$stat['id']}' and complete='1'"));
if ($actcount1 >= 1) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You already completed this quest!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
mysql_query("insert into qactive (mob,mobqid,owner,type,accept,complete,start) VALUES ('{$mobid}'," . $mobq[$mobid]["qid"] . ",'{$stat['id']}'," . $mobq[$mobid]["type"] . ",'1','0',UNIX_TIMESTAMP())") or die("Something went wrong(7)");
/* All quest items */
$qzero = 0;
while ($mobq[$mobid]["questqty"] > $qzero) {
$qitemid = $qzero + 1;
mysql_query("insert into qitems (mob,name,owner,type,qty,maxqty,dropby) VALUES ({$mobid}," . smartquote($mobq[$mobid]["name"][$qitemid]) . ",'{$stat['id']}','" . $mobq[$mobid]["itype"][$qitemid] . "','0'," . $mobq[$mobid]["maxqty"][$qitemid] . ",'" . $mobq[$mobid]["droppedby"][$qitemid] . "')") or die("Something went wrong(8)");
$qzero++;
}
echo "<h3>Accepted quest.</h3>";
}
$mobquest = mysql_fetch_assoc(mysql_query("select * from qactive where mob='{$mobid}' and mobqid=" . $mobq[$mobid]["qid"] . " and owner='{$stat['id']}'"));
?>
<br>
<center>
<table cellspacing="0" cellpadding="0" width="700" height="250" bgcolor="#000000" border="1" style="border-collapse: collapse">
<tr>
<td valign="top">
<img align="right" width="250" height="250" style="margin-top:5px;margin-right:5px;margin-bottom:5px;" src="images/world/mobs/<?php
$mobview['pic'];
?>
">
示例5: smartquote
<?php
include "head.php";
if ($logged_in) {
$block = $_POST['submit'];
if ($block == 'Block User') {
$answer = $_POST['answer'];
if ($answer != $stat['answer']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You need to write your security pass correctly!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$name = smartquote($_POST['name']);
$idf = mysql_query("select * from players where username={$name}");
$id = mysql_fetch_array($idf);
$allycount = mysql_num_rows(mysql_query("select * from tempplally where owner='{$id['id']}' and propose='{$stat['id']}'"));
$allycount1 = mysql_num_rows(mysql_query("select * from tempplally where owner='{$stat['id']}' and propose='{$id['id']}'"));
$allycount2 = mysql_num_rows(mysql_query("select * from plally where ally='{$stat['id']}' and ally1='{$id['id']}'"));
$allycount3 = mysql_num_rows(mysql_query("select * from plally where ally='{$id['id']}' and ally1='{$stat['id']}'"));
$enemycount = mysql_num_rows(mysql_query("select * from prsenemy where owner='{$stat['id']}' and enemy='{$id['id']}'"));
$blockcount = mysql_num_rows(mysql_query("select * from block where blocker='{$stat['id']}' and owner='{$id['id']}'"));
$blockcount1 = mysql_num_rows(mysql_query("select * from block where blocker='{$id['id']}' and owner='{$stat['id']}'"));
if ($id['id'] == $stat['id']) {
echo "\n <br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font>You can't block yourself!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if ($allycount >= 1) {
echo "\n <br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You cannot block this player due to a proposed alliance.<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
示例6: trim
$message = trim($message);
if (strlen($message) > 4000) {
die("<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Sorry, the message is more than 4000 characters, please make it shorter!<br>\n </tr>\n </table>\n </center>\n</div>");
}
$name1 = mysql_fetch_array(mysql_query("select id from players where username='{$name}'")) or die("Cannot find player");
$name2 = mysql_fetch_array(mysql_query("select id from players where id='{$name1['id']}'"));
// redundant
if ($name2['id'] == $stat['id']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You can't send a message to yourself you fool!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
strip_tags($subject);
strip_tags($message);
$subject = smartquote($subject);
$message = smartquote($message);
mysql_query("insert into mail (owner,senderid,sender,subject,message,time,ip) values('{$name2['id']}','{$stat['id']}','{$stat['username']}',{$subject},{$message}," . time() . ",'{$ip}')") or die("Cannot send message");
echo "<font size=2><b>Message Sent!</b></font><BR><BR>";
?>
<?php
}
?>
<div align="center">
<center>
<form method="post" action="sendmessage.php">
<table border="1" cellspacing="0" width="<?php
$global_width;
?>
" gcolor="#191818" cellpadding="2" style="border-collapse: collapse">
示例7: mysql_query
exit;
}
/* Check if item is up for trade */
$check2 = mysql_query("select * from tradecenter where itemid='{$drop4['itemid']}'");
$check3 = mysql_num_rows($check2);
if ($check3 > 0) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> {$drop4['itemid']} You cannot drop an item up for trade!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
/* End */
mysql_query("delete from " . PLAYERS_ITEMS_TABLE . " where itemid='{$drop3['value']}' && owner = '{$stat['id']}'") or die("Could not drop the item");
}
}
$remove = $_GET['removeitem'];
$remove = smartquote($remove);
if ($remove > 0) {
$remove1 = mysql_fetch_assoc(mysql_query("select * from " . PLAYERS_ITEMS_TABLE . " where owner = '{$stat['id']}' and itemid={$remove}")) or die("Can not find the item to remove");
if ($remove1['owner'] != $stat['id']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> This is not your item!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if ($remove1['status'] == 'U') {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> This item has already been dequiped do not double click!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
mysql_query("update " . PLAYERS_ITEMS_TABLE . " set status='U' where slot='{$remove1['slot']}' && owner = '{$stat['id']}' && itemid='{$remove1['itemid']}'") or die("Could not remove the item");
}
}
示例8: smartquote
<?php
include "head.php";
if ($logged_in) {
if (!$_GET['id']) {
$id1 = smartquote($_POST['id']);
} else {
$id1 = smartquote($_GET['id']);
}
if (ctype_digit($id1)) {
} else {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You must type a numerical value!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$id = mysql_fetch_array(mysql_query("select * from players where id='{$id1}' and crew='{$stat['crew']}'"));
if (empty($id['id'])) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ALERT:</b></font> This player is not in your crew<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if ($id['id'] and $stat['crewrank'] <= $per['boot']) {
?>
<p> </p>
<div align="center">
<center>
<form method="POST" action="managecrew.php">
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" width="400" bgcolor="#202020">
<tr>
<td width="100%">
<p align="center"><font color="#FF0000"><b>Confirm Boot</b></font></p>
示例9: mysql_query
<?php
include "head.php";
if ($logged_in) {
if ($stat['crewrank'] <= $per['raids']) {
$raid2 = mysql_query("select * from cactive where leader='{$stat['id']}' and active='Y'");
$raid3 = mysql_num_rows($raid2);
if ($raid3 == '1') {
echo "\n\t<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You Currently Have A Raid Forming!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$form = $_POST['formraid'];
if ($form == 'Form Raid') {
$target = $_POST['target'];
$target = smartquote($target);
if (ctype_digit($target)) {
} else {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You must type a numerical value!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$raid = mysql_query("select * from crew where crewid={$target}");
$raid1 = mysql_fetch_array($raid);
if ($stat['attacks'] < 20) {
echo "\n\t<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Not enough attacks!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$time = $_POST['formtime'];
$message = $_POST['message'];
示例10: smartquote
<?php
include "head.php";
?>
<?php
$id = $_GET['pid'];
$sid = $_GET['check'];
$id = smartquote($id);
$sid = smartquote($sid);
$check = mysql_num_rows(mysql_query("select * from `confirm` where `id`={$id} and `sid`={$sid}"));
if ($check > 0) {
$sel = mysql_fetch_array(mysql_query("select `id`, `password`, `username`, `email`, `cash`, `bank`, `class` from `players`,`parent` where `id`={$id}"));
mysql_query("insert into rankings (id,username,cash,bank,class) values('{$sel['id']}',{$sel['username']},'{$sel['cash']}','{$sel['bank']}','{$sel['class']}')");
$ipcheck = mysql_num_rows(mysql_query("SELECT * FROM `iplog` WHERE ip='{$_SERVER['REMOTE_ADDR']}'"));
if ($sel['parent'] > 0 and $ipcheck == 0) {
mysql_query("INSERT INTO `ref` (`referer`,`refer`,`time`) VALUES ({$sel['parent']},{$sel['id']},UNIX_TIMESTAMP())");
mysql_query("UPDATE `players` SET `ref`=`ref`+1 WHERE `id`={$sel['parent']}");
}
mysql_query("insert into iplog (ip,pid,time) values ('{$_SERVER['REMOTE_ADDR']}',{$sel['id']}," . time() . ")");
mysql_query("delete from `confirm` where `id`={$id}");
echo "Account activated please login.";
} else {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You already confirmed this account or else you never signed up.<br>\n </tr>\n </table>\n </center>\n</div>";
}
?>
<?php
include "includes/footer.inc.php";
示例11: smartquote
<?php
include "head.php";
if ($logged_in) {
$raid = smartquote($_GET['raid']);
$craid = mysql_fetch_array(mysql_query("select * from cactive where crewrid={$raid}"));
if (!$craid['crewrid']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Either raid has ended or Invalid Raid!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
?>
<table bgcolor="#000000" width="100%">
<?php
$crew = mysql_fetch_array(mysql_query("select * from crew where crewid={$craid['crewid']}"));
$crewr1 = mysql_fetch_array(mysql_query("select * from crew where crewid='{$craid['defcrew']}'"));
function raidattack()
{
global $raid;
global $crewr1;
global $crew;
global $crewpow;
global $mess;
global $craid;
global $c2atkdmg;
global $sum2;
global $sum3;
global $sum4;
global $sum5;
global $sum6;
global $sum7;
示例12: do_itemupload
function do_itemupload()
{
global $stat;
$name = $_POST['name'];
$slot = $_POST['slot'];
// Create an array containing all valid upload file types for this script
$allowed_types = array("image/gif" => "gif", "image/pjpeg" => "jpg", "image/jpeg" => "jpg", "image/x-png" => "png");
// Check to see if the file type is in the allowed types array
if (!array_key_exists($_FILES['userfile']['type'], $allowed_types)) {
die("Invalid file type.");
}
if (!$name) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font> You must set an item name!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if (eregi('[a-z0-9]', $name)) {
} else {
echo "\n\t<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> The item name contains an invalid character(s)!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$name = smartquote($name);
$size = getimagesize(rtrim($_FILES['userfile']['tmp_name']));
if ($slot == '1') {
if ($size[0] > 62) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 62<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 50) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 50<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '2') {
if ($size[0] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 43<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 43<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '3') {
if ($size[0] > 56) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 56<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 96) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 96</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '4') {
if ($size[0] > 56) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 56</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 96) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 96</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '5') {
if ($size[0] > 56) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 56</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 96) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 96</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '6') {
if ($size[0] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 43</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 43</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
}
if ($slot == '7') {
if ($size[0] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Width = {$size['0']}<BR><BR>Image is too big Image Width Limit = 43</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
} elseif ($size[1] > 43) {
echo "<br> \n\t\t\t <div align=center>\n\t\t\t <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <center>\n <font color=#FF0000><b>ERROR:</b></font><br>Image Height = {$size['1']}<BR><BR>Image is too big Image Height Limit = 43</center><br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
//.........这里部分代码省略.........
示例13: trim
exit;
}
$name = trim($name);
if (strlen($name) < 4) {
die("<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Sorry, the name you want is shorter than 4 characters, please make it longer!<br>\n </tr>\n </table>\n </center>\n</div>");
}
$name = trim($name);
if (strlen($name) > 20) {
die("<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> Sorry, Your Name is more than 20 characters, please make it shorter!<br>\n </tr>\n </table>\n </center>\n</div>");
}
if ($stat['points'] < 50) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You Need More Points!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$name = smartquote($name);
$name = str_replace(" ", '', $name);
$name = str_replace(".", '', $name);
mysql_query("update players set username={$name} where id='{$stat['id']}'") or die("Could not change name");
mysql_query("update players set points=points-50 where id='{$stat['id']}'") or die("Could not subtract points");
echo "<h1>Name Changed</h1> READ -> You have been logged out please login again WITH YOUR NEW NAME!";
}
?>
<font size="3"><b>Please enter your desired new name</b></font>
<form method="post">
<input type="text" size="80" name="name" value="" maxlength=30><br>
<?php
$stat['question'];
?>
<br>
示例14: character
if ($_POST['pointAmt'] > $stat['points'] || $_POST['pointAmt'] <= "0") {
echo "<center>You cannot bounty that many points!</center>";
die;
}
if (ctype_alnum($_POST['bountyUser'])) {
} else {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> The Username contains an invalid character(s)!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
if ($_POST['bountyUser'] == $stat['username']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You can't bounty yourself!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
$_POST['bountyUser'] = smartquote($_POST['bountyUser']);
$array = mysql_fetch_array(mysql_query("SELECT `username`, `membership`, `bounty` FROM `players` WHERE `username` = " . $_POST['bountyUser'] . ""));
$rows = mysql_num_rows(mysql_query("SELECT `username`, `bounty` FROM `players` WHERE `username` = " . $_POST['bountyUser'] . ""));
if ($rows == "0") {
echo "<center>That player does not exist!</center>";
die;
}
if ($array['bounty'] > 0) {
echo "<center>That user already has a bounty, please wait for it to expire before bountying.</center>";
die;
}
if ($array['membership'] == '3') {
echo "<center>That user is an administrator.</center>";
die;
}
$points = $_POST['pointAmt'];
示例15: mysql_query
}
if ($don4['owner'] != $stat['id']) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> This is not your item!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
/* Check if you have trade already proposed with this person */
$check = mysql_query("select * from tradecenter where itemid='{$don3['value']}'");
$check1 = mysql_num_rows($check);
if ($check1 >= '1') {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> You cannot donate an item up for trade!<br>\n </tr>\n </table>\n </center>\n</div>";
include "includes/footer.inc.php";
exit;
}
/* End */
mysql_query("insert into `donation` (`itemid`,`name`,`slot`,`set`,`gem`,`atk`,`def`,`cph`,`aph`,`income`,`maxatk`,`atkcap`,`pic`) VALUES ({$don4['itemid']}," . smartquote($don4['name']) . ",'{$don4['slot']}',{$don4['set']},{$don4['gem']},{$don4['atk']},{$don4['def']},{$don4['cph']},{$don4['aph']},{$don4['income']},{$don4['maxatk']},{$don4['atkcap']},'{$don4['pic']}')");
mysql_query("delete from `iteminv` where `itemid`={$don3['value']}");
}
}
}
/* Withdraw */
$withdraw = $_POST['withdraw'];
if ($withdraw == 'Withdraw') {
$with[] = $_POST['with'];
foreach ($with as $with1) {
$with2 = $with1;
}
while ($with3 = each($with2)) {
$with4 = mysql_fetch_array(mysql_query("select * from iteminv where owner = '{$stat['id']}' and itemid='{$with3['value']}'")) or die(mysql_error());
if (!$with4) {
echo "<br>\n <div align=center>\n <center>\n <table border=1 cellpadding=5 cellspacing=0 style=border-collapse: collapse id=AutoNumber1 bordercolor=#FFFFFF>\n <tr>\n <td width=100% bgcolor=#666666>\n \n <font color=#FF0000><b>ERROR:</b></font> This is nothing!<br>\n </tr>\n </table>\n </center>\n</div>";