Вход Регистрация
Файл: Source/admin/requested_prizes.php
Строк: 55
<?php
/*
 * Script name: Points4Prize
 * Author: Soft Projects
 * Date created: 15/07/2015
 */
 
include "common.php";
head();
?>
<div class="body content rows scroll-y">
    <!-- Page header -->
    <div class="page-heading">
        <h1><b>Requested prizes</b> </h1>
    </div>
    <!-- End page header -->
    <!-- Begin info box -->
    <div class="row">
        <div class="col-md-12">
            <div class="box-info">
                <h2>Requested prizes waiting for review</h2>
                <table class="table">    
                    <thead>              
                        <tr>    
                            <th>#ID</th>        
                            <th>User</th>            
                            <th>Requested prize</th>
                            <th>Requested date</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $result 
mysql_query("SELECT * FROM vn_awarded WHERE `status`='0' ORDER by date DESC") or die(mysql_error());
                        for (
$i 0$i mysql_num_rows($result);  ++$i) {
                            
$row mysql_fetch_assoc($result);
                            
$rank $i 1;
                            
$date date("j F Y"$row['date']);

                            
$result2 mysql_query("SELECT * FROM vn_users WHERE id='$row[userid]'") or die(mysql_error());
                            
$row2 mysql_fetch_array($result2);

                            
$result3 mysql_query("SELECT * FROM vn_prizes WHERE id='$row[prizeid]'") or die(mysql_error());
                            
$row3 mysql_fetch_array($result3);


                            echo 
"
        <tr>
        <td>
$row[id]</td>
        <td><a href='check_user.php?id=
$row2[id]' target='_blank'>$row2[user]</a></td>    
        <td><a href='/prize-
$row3[id]' target='_blank'>$row3[title]</a></td>
        <td>
$date</td>
        <td><a href='view_prize.php?id=
$row[id]' class='btn btn-info'> View request </a></td>
        </tr>"
;
                        }
                        
?>
                    </tbody>
                </table>

            </div>
            <div class="box-info">
                <h2>All prizes</h2>
                <table class="table">    
                    <thead>              
                        <tr>    
                            <th>#ID</th>        
                            <th>User</th>            
                            <th>Requested prize</th>
                            <th>Requested date</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $result 
mysql_query("SELECT * FROM vn_awarded WHERE `status`!='0' ORDER by date DESC") or die(mysql_error());
                        for (
$i 0$i mysql_num_rows($result);  ++$i) {
                            
$row mysql_fetch_assoc($result);
                            
$rank $i 1;
                            
$date date("j F Y"$row['date']);

                            
$result2 mysql_query("SELECT * FROM vn_users WHERE id='$row[userid]'") or die(mysql_error());
                            
$row2 mysql_fetch_array($result2);

                            
$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='" $GLOBALS['site_url'] . "img/clock.png' alt='Processing' title='Processing' width='16' height='16' />";
                            } elseif (
$row['status'] == 1) {
                                
$status "<img src='" $GLOBALS['site_url'] . "img/stat/1.png' alt='Check' title='Check' width='16' height='16' />";
                            } elseif (
$row['status'] == 2) {
                                
$status "<img src='" $GLOBALS['site_url'] . "img/x.png' alt='Canceled' title='Canceled' width='16' height='16' />";
                            } elseif (
$row['status'] == 3) {
                                
$status "<img src='" $GLOBALS['site_url'] . "img/fsend.png' alt='Waiting sending' title='Waiting sending' width='16' height='16' />";
                            } elseif (
$row['status'] == 4) {
                                
$status "<img src='" $GLOBALS['site_url'] . "img/stat/4.png' alt='Sent' title='Sent' width='16' height='16' />";
                            } elseif (
$row['status'] == 5) {
                                
$status "<img src='" $GLOBALS['site_url'] . "img/stat/5.png' alt='Received' title='Received' width='16' height='16' />";
                            }


                            echo 
"
        <tr>
        <td>
$row[id]</td>
        <td><a href='check_user.php?id=
$row2[id]' target='_blank'>$row2[user]</a></td>    
        <td><a href='/prize-
$row3[id]' target='_blank'>$row3[title]</a></td>
        <td>
$date</td>
        <td>
$status</td>
        <td><a href='view_prize.php?id=
$row[id]' class='btn btn-info'> View</a></td>
        </tr>"
;
                        }
                        
?>
                    </tbody>
                </table>
            </div>
<?php
footer
();
?>
        </div> 
    </div>
Онлайн: 1
Реклама