Вход Регистрация
Файл: Source/pages/winn.php
Строк: 145
<?php
/*
 * Script name: Points4Prize
 * Author: Soft Projects
 * Date created: 15/07/2015
 */

require_once 'inc/header.php';
?>
<body class="no-slider">
    <!-- <body class="has-top-menu"> -->
    <!-- BEGIN #slider-imgs -->
    <div id="slider-imgs">
        <div class="featured-img-box">
            <div id="featured-img-1" class="featured-img"></div>
            <div id="featured-img-2" class="featured-img invisible"></div>
            <div id="featured-img-3" class="featured-img invisible"></div>
            <div id="featured-img-4" class="featured-img invisible"></div>
        </div>
        <!-- END #slider-imgs -->
    </div>

    <!-- BEGIN #top-layer -->
    <div id="top-layer">
        <div id="header-top">
            <?php
            
require_once 'inc/header_top.php';
            
?>
        </div>
        <section id="content">
            <header id="header">
                <div id="menu-bottom">
                   
                     <?php
                    
require_once 'inc/menu_bottom.php';
                    
?>

                    
                </div>

                <div class="wrapper">
                    <div class="header-breadcrumbs">
                  <?php                    require_once 'inc/stats.php';                    ?>
                        <ul>
                            <li><a href="index.php">Начало</a></li>
                            <li>Печеливши</li>
                        </ul>
                    </div>
                </div>

            </header>
            <div id="main-box">

                <!-- BEGIN #main -->
                <div id="main">

                    <h2><span>Печеливши</span></h2>
                    <div class="content-padding">

                        <div class="article-full">

                            <div class="article-content">


           
<?php
$status_prize_ct 
= (int) $_GET['status'];
$status_prize_ct  sprintf("%s"mysql_real_escape_string($status_prize_ct));
if(!isset(
$status_prize_ct)){
$status_prize_ct 5;
}

$checkalln mysql_query("SELECT `id` FROM vn_awarded ORDER by `date` DESC");
$broi      mysql_num_rows($checkalln);
$pp        15;


if (
$broi 0) {
$pages ceil($broi $pp);
$page  = (int) $_GET['p'];
$page  sprintf("%s"mysql_real_escape_string($page));
if (
$page == || $page || $page == NULL) {
$page 1;
}
if (
$page $pages) {
$page $pages;
}
$begin = ($page $pp) - $pp;
echo 
"                    
    <table class='blue'>                        
    <tr>
        <thead>
        <th><center>#ID - Номер</td>        
        <th><center>Потребител</th>            
        <th><center>Взета награда</th>            
        <th><center>Дата</th>

        <th><center>Статус</th>
        <th><center>Доказателство</th>
        </thead>
    </tr>    
    "
;
    
$result mysql_query("SELECT * FROM vn_awarded ORDER by date DESC LIMIT {$begin},{$pp}") or die (mysql_error());
    for(
$i=0;$i mysql_num_rows($result);++$i) {                            
    
$row mysql_fetch_assoc($result);        
    
$rank $i+1+$begin;
    
$date date("j F Y"$row[date]);                    
    
$tr1 = array("January""February""March""April""May""June""July""August""September""October""November""December");        
    
$tr2 = array("Януари""Февруари""Март""Април""Май""Юни""Юли""Август""Септември""Октомври""Ноември""Декември");            
    
$date str_replace($tr1,$tr2,$date);                                         
    
$result2     mysql_query("SELECT user,vip FROM vn_users WHERE id='$row[userid]'") or die (mysql_error());                
    
$row2         mysql_fetch_assoc($result2);                
    if(
$row2['vip'] == 1) { $vip "<img src='img/gold.png' alt='Златен потребител' title='Златен потребител' />"; }                
    else { 
$vip ""; }                    
    
$result3     mysql_query("SELECT * FROM vn_prizes WHERE id='$row[prizeid]'") or die (mysql_error());    
    
$row3         mysql_fetch_array($result3);                
 
      if(
$row['status'] == 0) {
     
$status "<img src='img/clock.png' alt='Обработва се' title='Обработва се' width='16' height='16' />";
     } elseif(
$row['status'] == 1) {
     
$status "<img src='img/stat/1.png' alt='Проверява се' title='Проверява се' width='16' height='16' />";
     } elseif(
$row['status'] == 2) {
      
$status "<img src='img/x.png' alt='Анулирана' title='Анулирана' width='16' height='16' />";
     } elseif(
$row['status'] == 3) {
     
$status "<img src='img/fsend.png' alt='Предстои изпращане' title='Предстои изпращане' width='16' height='16' />";
     } elseif(
$row['status'] == 4) {
     
$status "<img src='img/stat/4.png' alt='Изпраетна' title='Изпраетна' width='16' height='16' />";
     } elseif(
$row['status'] == 5) {
     
$status "<img src='img/stat/5.png' alt='Получена' title='Получена' width='16' height='16' />";
     } elseif(
$row['status'] == 6) {
     
$status "<img src='img/stat/zamrazeno.png' alt='Замразена' title='Замразена' width='16' height='16' /></a>";
     }
 
    echo 
"
    <tr>                        
    <td><center>
$row[id]</td>                    
    <td><center><a href='/u:
$row2[user]' style='color:#545454;'>$row2[user]</a> $vip</td>    
    <td><center>
$row3[title] </center></td>
    <td><center>
$date</td>    
    <td><center>
$status</center></td>
    <td><center>
$row[dok]</center></td>
    </tr>"
;
                }
                
                
                
                
$next  $page 1;
                
$next2 $page 2;
                
$prev  $page 1;
                
$prev2 $page 2;
                if (
$pages >= $next) {
                                
$nexts   "<a class='page' href='/winners-$next-$status_prize_ct'>></a>";
                                
$pageup1 "<a class='page' href='/winners-$next-$status_prize_ct'>$next</a>";
                } else {
                                
$nexts "<a class='npage' disabled='disabled'>></a>";
                }
                if (
$pages >= $next2) {
                                
$pageup2 "<a class='page' href='/winners-$next2-$status_prize_ct'>$next2</a>";
                                
$last    "<a class='page' href='/winners-$pages-$status_prize_ct'>>></a>";
                } else {
                                
$last "<a class='npage' disabled='disabled'>>></a>";
                }
                if (
$page 1) {
                                
$prevs   "<a class='page' href='/winners-$prev-$status_prize_ct'>&lt;</a>";
                                
$pagedw1 "<a class='page' href='/winners-$prev-$status_prize_ct'>$prev</a>";
                } else {
                                
$prevs "<a class='npage' disabled='disabled'>&lt;</a></li>";
                }
                if (
$page 2) {
                                
$pagedw2 "<a class='page' href='/winners-$prev2-$status_prize_ct'>$prev2</a>";
                                
$first   "<a class='page' href='/winners-1-$status_prize_ct'>&lt;&lt;</a>";
                } else {
                                
$first "<a class='npage' disabled='disabled'>&lt;&lt;</a>";
                }
                if (
$page == and $pages 3) {
                                
$pageup3 "<a class='page' href='/winners-4-$status_prize_ct'>4</a>";
                }
                if (
$page == $pages and $pages 3) {
                                
$pagedw3 "<a class='page' href='/winners-1-$status_prize_ct'>1</a>";
                }
                echo 
"</table>";
                if (
$broi $pp) {
                                echo 
"
                                <br />
                                <br />
                                
$first $prevs $pagedw3 $pagedw2 $pagedw1
                                <a class='npage' disabled='disabled'>
$page</a>
                                
$pageup1 $pageup2 $pageup3 $nexts $last
                                
                                "
;
                }
                
                
                
                
} else {
    echo 
"<div class='info-message'>Няма печеливши потребители към този момент.</div>";
}
echo 
"<div style='clear:both;'></div>";

if(!isset(
$page)){$page 1;}
if(!isset(
$status_prize_ct)){$status_prize_ct 5;}
?>        

                            </div>

                        </div>

                        <!-- END .content-padding -->
                    </div>


                    <!-- END #main -->
                </div>

                <!-- BEGIN #sidebar -->
                <aside id="sidebar">

                    <!-- BEGIN .panel -->
                    <div class="panel">
                        <h2>Доъплнителна информация</h2>
                        <div class="panel-content">

                                <span class="icon-line">
                                    <i class="fa fa-skype"></i><span>play4win.net</span>                                     
                                    <br /><br />                                    
                                    <i class="fa fa-facebook-square"></i><span>Play4Win.Net</span>                                        
                                    <br /><br />                                    
                                    <i class="fa fa-envelope"></i><span>support@play4win.net</span>
                                </span>

                        </div>
                        <!-- END .panel -->
                    </div>

                    <!-- END #sidebar -->
                </aside>

                <div class="clear-float"></div>

            </div>
    </div>
</div>

<?php
require_once 'inc/footer.php';
?>
Онлайн: 0
Реклама