Вход Регистрация
Файл: Source/admin/view_prize.php
Строк: 96
<?php
/*
 * Script name: Points4Prize
 * Author: Soft Projects
 * Date created: 15/07/2015
 */
 
$ID = (int) htmlspecialchars($_GET['id']);
include 
"common.php";
head();
?>
<div class="body content rows scroll-y">
    <!-- Page header -->
    <div class="page-heading">
        <h1><b>Requested prize #<?php echo $ID?></b> </h1>
    </div>
    <!-- End page header -->
    <!-- Begin info box -->
    <div class="row">
        <div class="col-md-12">
            <div class="box-info">
                <h2>Requested prize #<?php echo $ID?></h2>
                <div class="row">
                    <div class="col-md-4">
                        <?php
                        
if (isset($_POST['update_zn'])) {

                            
$status_zn = (int) $_POST['status_zn'];

                            
mysql_query("UPDATE `vn_awarded` SET `status` = '{$status_zn}' WHERE `id` = {$ID}");
                        }


                        
$result mysql_query("SELECT * FROM vn_awarded WHERE `id`='$ID'") or die(mysql_error());

                        
$row mysql_fetch_assoc($result);

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


                        
$query31 mysql_query("SELECT count(id) as sms from `vn_sms` WHERE `userid` = '" $row2['id'] . "'");
                        
$row1 mysql_fetch_array($query31);
                        
$xaxa $row1['sms'];


                        echo 
"
    Username: 
$row2[user] [<a href='check_user.php?id=$row2[id]' target='_blank'>check user</a>]
    <br >    
    <br >    
    UserID: 
$row2[id] 
    <br /> 
    <br /> 
    Sended SMS: 
$xaxa
    <br > 
    <br > 
    Requested prize: 
$row3[title]    
    <br />
    <br />
    
    Requested date: 
$date    
    <br />
    <br />
  Status: 
$status    
  <br />
  <br />"
;
                        
?>

                        <form method='post'>
                            <select name='status_zn'>
                                <option value='1'>Processing</option>
                                <option value='2'>Canceled</option>
                                <option value='3'>Waiting sending</option>
                                <option value='4'>Sent</option>
                                <option value='5'>Received</option>
                            </select> 
                            <br />
                            <br />
                            <input type='submit' value='Update' name='update_zn' class='btn btn-success'/>
                        </form>
                    </div>
                    <div class="col-md-6">

                        Personal information
                        <hr />

                        First name: <?php echo $row['f_name']; ?><br />
                        Second name: <?php echo $row['m_name']; ?><br />
                        Last name: <?php echo $row['l_name']; ?><br />
                        Phone: <?php echo $row['phone']; ?><br />
                        City: <?php echo $row['city']; ?><br />
                        Address: <?php echo $row['address']; ?><br />
                        Requested IP: <?php echo $row['ip']; ?><br />

                    </div>
                </div>
<?php
footer
();
?>
            </div> 
        </div>
Онлайн: 2
Реклама