<?

if ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) {
    //header( 'Content-type: text/html; charset=windows-1251' );
    include_once ROOT_DIR . '/engine/config.php';
    include_once ROOT_DIR . '/engine/function.php';
} else {
    if ( !defined( 'MISOFT' ) ) { exit(); }
}

if ( !isset( $_SESSION['iduser'] ) ) exit();

$get_viptask = mysql_query( "SELECT id, title, price, t_goods, t_bad FROM tasks WHERE vip = 1 and paused = 1 ORDER BY RAND() LIMIT 5" );
if ( mysql_num_rows( $get_viptask ) > 0 ) {
    ?>
    <div class="menu_title">V.I.P Задания</div>
    <?
    while ( $get_viptask_row = mysql_fetch_array( $get_viptask ) ) {
        ?>
        <a href="/tasksview=<?=$get_viptask_row['id']?>" class="wrap_klink" onclick="Page.Go(this.href);return false;">
            <div class="title_klink"><?=wraptitle( $get_viptask_row['title'], 33 )?></div>
            <div class="wrap_klink_info"><span class="img_click"><?=$get_viptask_row['price'] . ' ' . $config['valutaname']?></span>&nbsp;&nbsp;&nbsp;<span class="task_good"><?=$get_viptask_row['t_goods']?></span>&nbsp;&nbsp;&nbsp;<span class="task_bad"><?=$get_viptask_row['t_bad']?></span></div>
        </a>
        <?
    }
}

?>