Показать сообщение отдельно
Непрочитано 08.06.2008, 16:48   #1
Пользователь

Автор темы (Топик Стартер) Скрипт на просмотр предметов персонажа

<html>
<head>
<body>
<TITLE>lalall</TITLE>
</head>

<?
//connect base
$db_user = "root"; //your sql username goes here
$db_pass = "root"; //your sql password goes here
$db_name = "BASE"; //your database name goes here
$db_serv = "localhost"; //the address of the database goes here

$db = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]");
mysql_select_db ( $db_name );
//connect base



$name = $_GET["name"];
if (!$name) {echo "Palevo by Roksvel";}

$query_char=mysql_query("SELECT level,char_name,obj_Id FROM characters WHERE char_name='$name'");
//$online= mysql_num_rows($query_raidbosses);

echo "<table border=\"1\">";


///////////////////////////// 268480132

while ($res=mysql_fetch_array($query_char))
{
$lvl=$res['level'];
$charname=$res['char_name'];
$obj=$res['obj_Id'];

}
echo "$charname";

$predmet_chara7=mysql_query("SELECT item_id,loc_data FROM items WHERE owner_id='$obj'");


while ($resk=mysql_fetch_array($predmet_chara7)) {
$itka=$resk['item_id'];
$loca=$resk['loc_data'];
if ($loca==7) { $it7 = $itka; } //else $it7="noicon";
if ($loca==8) { $it8 = $itka; } //else $it8="noicon";
if ($loca==11) { $it11 = $itka; } //else $it11="noicon";
if ($loca==10) { $it10 = $itka; } //else $it10="noicon";
if ($loca==12) { $it12 = $itka; } //else $it10="noicon";
if ($loca==17) { $it17 = $itka; } //else $it10="noicon";
if ($loca==9) { $it9 = $itka; } //else $it10="noicon";
if ($loca==6) { $it6 = $itka; } //else $it10="noicon";
if ($loca==18) { $it18 = $itka; } //else $it10="noicon";


if ($loca==5) { $it5 = $itka; } //else $it10="noicon";
if ($loca==4) { $it4 = $itka; } //else $it10="noicon";
if ($loca==3) { $it3 = $itka; } //else $it10="noicon";
if ($loca==2) { $it2 = $itka; } //else $it10="noicon";
if ($loca==1) { $it1 = $itka; } //else $it10="noicon";

}


?>

<form action="lom.php" method="get">
Name: <input type="text" name="name" />
<input type="submit" />
</form>

<table >
<tr>
<td><table border=1 >
<tr>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it17"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it6"; ?>.png)"><td></td></table></td>
<td><? echo "<img src=images/item_$it18.jpg />"; ?></td>
</tr>
<tr>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it7"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it10"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it8"; ?>.png)"><td></td></table></td>
</tr>
<tr>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it9"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it11"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it12"; ?>.png)"><td></td></table></td>
</tr>
</table>
</td>
<td><table border="1">
<tr>
<td>&nbsp;</td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it3"; ?>.png)"><td></td></table></td>
</tr>
<tr>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it1"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it2"; ?>.png)"><td></td></table></td>
</tr>
<tr>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it4"; ?>.png)"><td></td></table></td>
<td><table width="32" height="32" style="background-image:url(http://www.l2wh.com/updrop/__genpics__/<? echo "$it5"; ?>.png)"><td></td></table></td>
</tr>
</table></td>
</tr>
</table>
<?
///////////////////

echo "</tr></td>";


echo "</table>";

mysql_close();
?>
Welcome <?php echo $_REQUEST["name"]; ?>.<br />
Invoker вне форума Ответить с цитированием