Вход Регистрация
Файл: Source/pages/winners.php
Строк: 190
<?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">Home</a></li>
                            <li>Winners </li>
                        </ul>
                    </div>
                </div>

            </header>
            <div id="main-box" class="full-width">
                <div id="main">
                    <div class="signup-panel">
                        <div class="">
                            <h2><span>Winners</span></h2>
                            <div class="content-padding">
           
           <!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="/assets/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="/assets/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/assets/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="/assets/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/assets/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="/assets/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>

<link rel="stylesheet" href="/assets/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="/assets/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>

<script type="text/javascript">
  /* <![CDATA[ */

    (function () {

    // Fancybox selector
    $("a.prize-img").fancybox();
    $("a.inline").fancybox({
        'hideOnContentClick': true
    });
    
      })();

    /* ]]> */
</script>
           
<?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` ASC");
$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>User</th>            
        <th><center>Get Prize</th>            
        <th><center>Date</th>

        <th><center>Status</th>
        <th><center>Action</th>
        </thead>
    </tr>    
    "
;
    
$result mysql_query("SELECT * FROM vn_awarded ORDER by date ASC 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]);                    
                                    
    
$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 ""; }                
    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='assets/img/winners/processing.png' alt='Processing' title='Processing' width='16' height='16' /><br /> Processing";
                 } elseif(
$row['status'] == 1) {
                 
$status "<img src='assets/img/winners/check.png' alt='Check' title='Check' width='16' height='16' /><br /> Check";
                 } elseif(
$row['status'] == 2) {
                  
$status "<img src='assets/img/winners/canceled.png' alt='Canceled' title='Canceled' width='16' height='16' /><br /> Canceled";
                 } elseif(
$row['status'] == 3) {
                 
$status "<img src='assets/img/winners/fsend.png' alt='Processing dispatch' title='Processing dispatch' width='16' height='16' /><br /> Processing dispatch";
                 } elseif(
$row['status'] == 4) {
                 
$status "<img src='assets/img/winners/sent.png' alt='Sent' title='Sent' width='16' height='16' /><br /> Sent";
                 } elseif(
$row['status'] == 5) {
                 
$status "<img src='assets/img/winners/received.png' alt='Received' title='Received' width='16' height='16' /><br /> Received";
                 }
     
 
    echo 
"
    <tr>                        
    <td><center>
$row[id]</td>                    
    <td><center><a href='/u:
$row2[user]' style='color:#545454;'>$row2[user]</a> $vip</td>    
    <td><center><a href='/prize-
$row3[id]'>$row3[title]</а></center></td>
    <td><center>
$date</td>    
    <td><center>
$status</center></td>
    <td><center><a class='button' rel='group' style='background-color: #519623;' href='/winner-
$row[id]'>
    View
    </a></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'>No profitable customers at this time.</div>";
}
echo 
"<div style='clear:both;'></div>";

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

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

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