Не могу сделать переключатель страниц!
Вот код!
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<body>
<?php
if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}
include('shopconfig.php');
$link;
mysql_select_db($db_base);
mysql_query('set NAMES cp1251');
/////////////////////////действия кнопок и формулы/////////////////////////
$addid = $_POST['block_id'];
$nazvanie = $_POST['name'];
if(isset($_POST['addgood']))
{
mysql_query("INSERT INTO shop_blocks (id, name, block_id, amount, price, server, image) VALUES (NULL, '".$_POST['name']."', '$addid', '".$_POST['amount']."', '".$_POST['price']."', 's".$_POST['server']."', '".$_POST['image'].".png')")or die(mysql_error());
$mes = "$nazvanie успешно добавлен!";
}
{
mysql_query("DELETE FROM shop_blocks WHERE id='".$_POST['del']."'");
$mes = "Товар $nazvanie успешно удален!";
}
/*
if($username == $admin1 || $username == $admin2 | $username == $admin3){
*/
?>
<html>
<body>
<center>
<hr>
<b><u>Добавить товар</u></b><br><hr>
<form action="<?php $faction ?>" method="post" enctype="multipart/form-data" name="addgoods">
Название
<input name="name" type="text" />
ID товара
<input name="block_id" type="text" size="5" /><br>
Цена
<input name="price" type="text" size="4" maxlength="6" />
За сколько шт
<input name="amount" type="text" size="4" maxlength="4" /><br>
Сервер
<input name="server" type="text" size="4" maxlength="2" />
Картинка
<input name="image" type="text" size="4" maxlength="7" /><br>
<input name="addgood" type="submit" value="Добавить" />
</form>
</center>
<?php
$result1 = mysql_query("SELECT * FROM shop_blocks");
print '<center>
<center>
<hr>
<b><u>Удаление товара</u></b><br><hr>
<table class="features-table">
<tr>
<td class="green"><center><strong>Картинка</strong></center></td& gt;
<td class="green"><center><strong>Название</strong></center></td& gt;
<td class="green"><center><strong>ID предмета</strong></center></td>
<td class="green"><center><strong>Цена</strong></center></td>
<td class="green"><center><strong>кол-во</strong></center></td> ;
<td class="green"><center><strong>Сервер</strong></center></td> ;
<td class="green"><center><strong>Действие</strong></center></td& gt;
</center></tr>';
while($row2 = mysql_fetch_assoc($result1)) {
print '<tr align="center">
<td class="grey"><center><strong><img src="/images_item/' . $row2["image"] . '"></strong></center></td>
<td class="green"><center><strong>' . $row2["name"] . '</strong></center></td>
<td class="grey"><center><strong>' . $row2["block_id"] . '</strong></center></td>
<td class="green"><center><strong>' . $row2["price"] . '</strong></center></td>
<td class="grey"><center><strong>' . $row2["amount"] . '</strong></center></td>
<td class="green"><center><strong>' . $row2["server"] . '</strong></center></td>
<td class="grey"><center><strong>
<form action=" '.$faction.'" method="post">
<p><button value="'. $row2["id"] .'," name="del" type="submit">Удалить</button></p>';
print'</form></strong></center></td>
</tr>';
}
print "</table></center>";
?>
<?php
/*
}else{}
*/
mysql_free_result($sql);
mysql_close($link);
?>
</body>
</html>
</body>
</HEAD>
</HTML>
<style>
.features-table
{
width: 100%;
margin: 0 auto;
border-collapse: separate;
border-spacing: 0;
text-shadow: 0 1px 0 #fff;
color: #2a2a2a;
background: #fafafa;
background-image: -moz-linear-gradient(top, #fff, #eaeaea, #fff); /* Firefox 3.6 */
background-image: -webkit-gradient(linear,center bottom,center top,from(#fff),color-stop(0.5, #eaeaea),to(#fff));
margin-top:20px;
margin-bottom:20px;
}
.features-table td
{
height: 50px;
padding: 0 20px;
border-bottom: 1px solid #cdcdcd;
box-shadow: 0 1px 0 white;
-moz-box-shadow: 0 1px 0 white;
-webkit-box-shadow: 0 1px 0 white;
text-align: center;
vertical-align: middle;
display: table-cell;
}
.features-table tbody td
{
text-align: center;
width: 150px;
}
.features-table td.grey
{
background: #efefef;
background: rgba(144,144,144,0.15);
border-right: 1px solid white;
}
.features-table td.green
{
background: #e7f3d4;
background: rgba(184,243,85,0.3);
}
.features-table td:nowrap
{
white-space: nowrap;
}
.features-table thead td
{
font-size: 120%;
font-weight: bold;
-moz-border-radius-topright: 10px;
-moz-border-radius-topleft: 10px;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
border-top: 1px solid #eaeaea;
}
.features-table tfoot td
{
font-size: 120%;
font-weight: bold;
-moz-border-radius-bottomright: 10px;
-moz-border-radius-bottomleft: 10px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
border-bottom: 1px solid #dadada;
}
</style>
Очень надо переключатель!