📄 character.php
字号:
</tr>
<tr>
<td></td>
<td align=right>
<b><? echo $lang_traps; ?>:  </b>
</td>
<td>
<b><? print $character->traps; ?>  </b>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td align=center colspan=3>
<b><big><? echo $lang_char["eq_ce"]; ?></big></b>
<table align=center border=0 cellspacing=2 cellpadding=2>
<tr>
<td align=center>
<img src='<? print $character->get_eq_item_pic("weapons"); ?>' title='<? echo $lang_char["eq_wep"]; ?>: <? print $character->get_eq_item_name("weapon"); ?>'>
</td>
<td align=center>
<img src='<? print $character->get_eq_item_pic("helms"); ?>' title='<? echo $lang_char["eq_helm"]; ?>: <? print $character->get_eq_item_name("helm"); ?>'>
</td>
<td align=center>
<img src='<? print $character->get_eq_item_pic("shields"); ?>' title='<? echo $lang_char["eq_shld"]; ?>: <? print $character->get_eq_item_name("shield"); ?>'>
</td>
</tr>
<tr>
<td align=center></td>
<td align=center>
<img src='<? print $character->get_eq_item_pic("armor"); ?>' title='<? echo $lang_char["eq_armor"]; ?>: <? print $character->get_eq_item_name("armor"); ?>'>
</td>
<td align=center>
<img src='<? print $character->get_eq_item_pic("gloves"); ?>' title='<? echo $lang_char["eq_glvs"]; ?>: <? print $character->get_eq_item_name("gloves"); ?>'>
</td>
</tr>
<tr>
<td align=center></td>
<td align=center>
<img src='<? print $character->get_eq_item_pic("boots"); ?>' title='<? echo $lang_char["eq_boot"]; ?>: <? print $character->get_eq_item_name("boots"); ?>'>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
</td>
</tr>
<tr>
<td align=center colspan=2>
<big><b><? echo $lang_char["rep"]; ?></b></big>
<br>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td align=right><? echo $lang_char["help"]; ?>:  </td>
<td><? print $character->rep_helpfull; ?>  </td>
</tr>
<tr>
<td align=right><? echo $lang_char["gen"]; ?>:  </td>
<td><? print $character->rep_generious; ?>  </td>
</tr>
<tr>
<td align=right><? echo $lang_char["com"]; ?>:  </td>
<td><? print $character->rep_combat; ?>  </td>
</tr>
<tr>
<td align=right><hr><? echo $lang_char["total"]; ?>:  </td>
<td><hr><? print ($character->rep_helpfull+$character->rep_generious+$character->rep_combat); ?>  </td>
</tr>
<tr><td align=right><hr> </td><td><hr> </td></tr>
</table>
<?
if($character->rep_points > 0) {
?>
<tr><td align=center><? echo " ".$lang_char["hav_rep1"]." ".$character->rep_points." ".$lang_char["hav_rep2"]; ?></td></tr>
<tr><td align=center><? echo $lang_char["dist"]; ?></td></tr>
<tr>
<td align=center>
<form method="post" action="player_info.php" target="_blank">
<Input type='text' name='char_name'>
<input type='submit' value='<? echo $lang_char["dis"]; ?>'>
</form>
</td>
</tr>
<?
}
?>
</td>
</tr>
<?
}
?>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr>
<td align=center colspan=2>
<big><b><? echo $lang_char["invent"]; ?></b></big>
<br>
<br><a name="inventory"><font color="#FFFFFF">排序</font></a>
<br>
<a href="character.php">所有</a>
| <a href="character.php?act=weapon#inventory">武器</a>
| <a href="character.php?act=armor#inventory">护甲</a>
| <a href="character.php?act=boots#inventory">靴子</a>
| <a href="character.php?act=gloves#inventory">手套</a>
| <a href="character.php?act=helm#inventory">头盔</a>
| <a href="character.php?act=shield#inventory">盾牌</a>
| <a href="character.php?act=potion#inventory">药水</a>
| <a href="character.php?act=spell_items#inventory">魔法物品</a>
<table border=0 cellspacing=0 cellpadding=0>
<?php
$wheretype= "";
$item_type= @$_GET['act'];
if(isItemType($item_type)){
$wheretype= " AND type = '$item_type' ";
}
//!PS: be careful with this code, it took some time to write
$items= array();
//$list_inventory = mysql_query("SELECT * FROM phaos_char_inventory WHERE username = '$_COOKIE[PHP_PHAOS_USER]' $wheretype ORDER BY item_id ASC");
$list_inventory = mysql_query("SELECT * FROM phaos_char_inventory WHERE username = '$_COOKIE[PHP_PHAOS_USER]' $wheretype ORDER BY type ASC, item_id ASC");
if($list_inventory) {
while ($row = mysql_fetch_assoc($list_inventory)) {
$items[]= $row;
}
$items[]= null;// add an extra empty row to trigger routput
}
if(count($items)>1) {
?>
<tr style="background:#004400;">
<td align=center valign=top><b><? echo $lang_char["amount"]; ?>  </b></td>
<td> </td>
<td valign=top><b><? echo $lang_char["desc"]; ?>  </b></td>
<td align=center valign=top><b><? echo $lang_char["eff"]; ?>  </b></td>
<td align=center valign=top colspan=3><b><? echo $lang_char["Act"]; ?>  </b></td>
</tr>
<?
}
//end if show header
// begin output loop
$lastrow= null;
$output= null;
foreach($items as $row) {
if($row) {
$id = $row["id"];
$equiped = $row["equiped"];
$item_type = $row["type"];
$item_id = $row["item_id"];
$sell_to_name = $row["sell_to"];
$ask_price = $row["asking_price"];
if(!@$_GET['act'] || $_GET['act'] == $item_type || $_GET['act'] == $item_type.'s' || $_GET['act'].'s' == $item_type) {
if($lastrow && $row['item_id'] == $lastrow['item_id'] && $row['equiped'] == $lastrow['equiped'] && $row['type'] == $lastrow['type'] && $row['sell_to'] == $lastrow['sell_to'] && $row['asking_price'] == $lastrow['asking_price']) {
++$lastrow['itemcount'];
$output= null;
} else {
$output= $lastrow;
$lastrow= $row;
$lastrow['itemcount']= 1;
}
} else {
//ignore item
}
} else {
$output= $lastrow;
}
if(!$output){
//no output
continue;
} else {
$id = $output["id"];
$equiped = $output["equiped"];
$item_type = $output["type"];
$item_id = $output["item_id"];
$sell_to_name = $output["sell_to"];
$ask_price = $output["asking_price"];
$info= fetch_item_additional_info(array('id'=>$item_id,'type'=>$item_type,'number'=>1),&$character);
$description = $info['description'];
$sell_price = $info['sell_price'];
$image_path= $info['image_path'];
$skill_req= $info['skill_req'];
$damage_mess= @$info['damage_mess'];
$skill_need= $info['skill_need'];
$effect= $info['effect'];
$skill_type= $info['skill_type'];
// start outputting a row
print ("<tr>");
print ("<td align=center valign=top><b>$output[itemcount]</b>x</td>");
?><td align=center valign=top><?= makeImg($image_path) ?></td><?php
print "<td>".ucwords($description)." <br>";
if($item_type != "potion") {
print ("<font color=$skill_need>".$lang_shop["req"].$skill_req." ".$skill_type."</font>");
}
print "</td><td align=center valign=top>$effect </td>";
if($item_type == "potion") {
print "<td valign=top><input type='button' onClick=\"parent.location='character.php?item_id=$item_id&id=$id&drink_potion=Y'\" value='$lang_char[drink]'></td>";
//print "<td valign=top> <a href='character.php?item_id=$item_id&id=$id&drink_potion=Y'>".$lang_char["drink"]."</a> </td>";
} elseif($item_type == "spell_items") {
print "<td valign=top> </td>";
} else {
print "<td align=center valign=top> ";
if(!$character->equipped($item_type,$item_id)){
print ("<input type='button' onClick=\"parent.location='character.php?item_id=$item_id&item_type=$item_type&id=$id&equip_id=Y'\" value='$lang_char[eq]'>");
}
if($character->equipped($item_type,$item_id)) {
print ("<input type='button' onClick=\"parent.location='character.php?item_id=$item_id&item_type=$item_type&id=$id&equip_id=N'\" value='$lang_char[uneq]'>");
}
print "</td>";
}
if($item_type == "weapon" OR $item_type == "armor" OR $item_type == "boots" OR $item_type == "potion" OR $item_type == "gloves" OR $item_type == "helm" OR $item_type == "shield" OR $item_type == "spell_items") {
print "<td align=center valign=top>";
if($shopForItemtype[$item_type]) {
print "<input type='button' title=\"$lang_char[sell_pr] $sell_price gold\" onClick=\"parent.location='character.php?item_id=$item_id&item_type=$item_type&id=$id&sell_id=Y'\" value='$lang_char[sell]'";
} else {
print " ";
}
?> </td><td align=center valign=top> <?
actionButton($lang_char['dropitem'],$_SERVER['PHP_SELF'],
array(
'drop_id[]'=> $item_id,
'drop_type[]'=> $item_type,
'drop_number[]'=> 1
)
);
print "</td></tr>";
}
print ("<p>
<td align=center colspan=7 valign=top>
<form method=\"post\" action=\"character.php\">
<input type=\"hidden\" name=\"market_item\" value=\"yes\">
<input type=\"hidden\" name=\"char_inv_id\" value=\"$id\">
卖给:<input type=\"text\" name=\"sell_to\" value=\"$sell_to_name\" size=10>
定价:<input type=\"text\" name=\"asking_price\" value=\"$ask_price\" size=10>
<input type=\"submit\" value=\"$lang_char[setsellprice]\">
</form>
</td>");
?></tr><?php
?><tr><td colspan="8"><hr width=50%></td></tr><?php
}
// end out put a row
}
// end loop
if(!$output) {
print "<tr><td align=center colspan=4><b>".$lang_char["noitem"].($wheretype?" ($_GET[act])":'')."</b></td></tr>";
}
?>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<form action="create_character.php">
<td align=center>
<br>
<br>
<input type="submit" value="<? echo $lang_char["create"]; ?>">
</td>
</form>
<form method=post action="character.php" onSubmit="return confirm('<? echo $lang_char["msg"]; ?>')">
<td align=center>
<br>
<br>
<input type="hidden" name="delete" value="yes">
<input type="submit" value="<? echo $lang_char["delete"]; ?>">
</td>
</form>
</tr>
</table>
<? include "footer.php"; ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -