File size: 2.37Kb
<?
require_once ( "../includes/start.php" );
require_once ( "../includes/functions.php" );
require_once ( "../includes/header.php" );
include_once ( "../themes/" . $config['themes'] . "/index.php" );
if ( is_user() )
{
show_title( 'partners.gif', 'Получение заказа.' );
include_once ( "../includes/db.php" );
if ( isset( $_GET['d'] ) )
{
$total = mysql_num_rows( mysql_query( "SELECT `id` FROM `stol` WHERE `status` = '2'" ) );
$q = mysql_query( "SELECT * FROM `stol` WHERE `id` = '" . ( int )$_GET['d'] .
"' && `status` = '2'" );
if ( $total <= '0' )
show_error( 'Произошла ошибка. Нет готовых заказов.' );
if ( $start < 0 || $start >= $total )
{
$start = 0;
}
if ( $total < $start + $config['chatpost'] )
{
$end = $total;
}
else
{
$end = $start + $config['chatpost'];
}
for ( $i = $start; $i < $end; $i++ )
{
while ( $post = mysql_fetch_array( $q ) )
{
$done = mysql_fetch_array( mysql_query( "SELECT * FROM `stol` WHERE `id` = '" . ( int )$_GET['d'] .
"' LIMIT 1" ) );
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 "Выполнил: <a href='".BASEDIR."pages/anketa.php?uz=" . $post[user] . "&".SID."'>" . $post[user] . "</a><br />";
echo "URL: " . $post[url] . "<br />";
}
}
page_jumpnavigation( 'done.php?', $config['chatpost'], $start, $total );
page_strnavigation( 'done.php?', $config['chatpost'], $start, $total );
}
echo '<br />«<a href="index.php?'.SID.'">Назад</a>';
}
else
echo 'Чтобы добавить свой заказ в наш стол заказов, вам надо зарегистрироваться или авторизироваться!';
include_once ( "../themes/" . $config['themes'] . "/foot.php" );
?>