File size: 2.21Kb
<?
require_once ( "../includes/start.php" );
require_once ( "../includes/functions.php" );
require_once ( "../includes/header.php" );
include_once ( "../themes/" . $config['themes'] . "/index.php" );
if ( is_admin( array( 101, 102, 103, 105 ) ) )
{
include_once ( "../includes/db.php" );
show_title( 'partners.gif', 'Стол заказов.' );
if ( isset( $_GET['del'] ) && $_GET['del'] != null )
{
mysql_query( "DELETE FROM `stol` WHERE `id` = '" . ( int )$_GET['del'] ."'");
header( 'Location:index.php?del_ok&' . SID );
exit;
} elseif ( isset( $_GET['done'] ) )
{
if ( isset( $_POST['url'] ) && $_POST[url] != null )
{
$url = mysql_escape_string( $_POST['url'] );
mysql_query( "UPDATE `stol` SET `user2` = '" . $log . "', `time` ='" . SITETIME .
"', `url` = '" . $url . "',
`status` = '1' WHERE `id` = '" . ( int )$_GET['done']."'" );
header( 'Location:index.php?done_ok&' . SID );
exit;
}
$done = mysql_fetch_array( mysql_query( "SELECT * FROM `stol` WHERE `id` = '" . ( int )$_GET['done'] .
"' LIMIT 1" ) );
echo 'ID: ' . $done['id'] . '<br />';
echo 'Тема: ' . $done['them'] . '<br />';
echo 'Подробно: ' . $done['text'] . '<br />';
echo 'Срочность: ';
if ( $done['sroch'] == 1 )
echo 'Не срочный<br />';
if ( $done['sroch'] == 2 )
echo 'Не тороплю, но не затягивайте<br />';
if ( $done['sroch'] == 3 )
echo 'Срочно, но могу подождать<br />';
if ( $done['sroch'] == 4 )
echo 'Срочно<br />';
if ( $done['sroch'] == 5 )
echo 'Очень срочно<br />';
echo '<form method="post" action="set.php?done=' . $done['id'] . '&'.SID.'">';
echo 'Введите ссылку на выполненный заказ:<br /><input name="url" type="text"/><br />';
echo '<input value="Выполнить" type="submit"/>';
echo '</form>';
}
echo '<br />«<a href="index.php?'.SID.'">Назад</a>';
}
else
echo "Вам тут делать нехуй!!!";
include_once ( "../themes/" . $config['themes'] . "/foot.php" );
?>