HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //www/备份的/www.linghdl.com/admin_game.php
<?PHP
set_time_limit(0);
header('Content-Type: text/html; charset=UTF-8');


#加载系统配置文件 该文件只包含各种系统配置项
require "./include/config.h";
#加载公共函数 主要是一些工具函数
require "./include/functions.php";
#开启数据库连接
$db  = tools::get_db();
$db_ = clone $db;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>抽獎活動列表</title>
<style>

body {
    margin:0px;text-align:center;
    font-family:微软雅黑;font-size:25px;color:#000000;
}

table, td{ border:1px solid #CCC; padding-top:4px; padding-bottom:4px;}
table{
    border-collapse:collapse;
}

.button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 26px;
    cursor: pointer;
}

.btn1 {
    margin:5px;
    padding: 10px 10px;
    font-size: 25px;
    font-weight:bold;
}

.btn2 {
    margin:2px;
    padding: 5px 10px 5px 10px;
    font-size: 23px;
}

h2{line-height:30px; font-size:30px;}
a,a:hover{ text-decoration:none;}
pre{font-family:'微软雅黑'}
.box{width:100px; padding:10px 20px; background-color:#fff; margin:10px auto;}
.box a{padding-right:20px;}

</style>
<script src="js/jquery-3.5.1.min.js"></script>
<script type='text/javascript'>


$(document).ready(function(){

    $("button#admin_game_add").click(function(data){
        window.location.href = "./admin_game_edit.php";
    });

    $("button#admin_game_edit").click(function(data){
        window.location.href = "./admin_game_edit.php?game_id=" + data.currentTarget.name;
    });

    $("button#admin_items").click(function(data){
        window.location.href = "./admin_items.php?game_id=" + data.currentTarget.name;
    });
    
    $("button#admin_user").click(function(data){
        window.location.href = "./admin_user.php?game_id=" + data.currentTarget.name;
    });

});

</script>

</head>
<body>

<?PHP

    #获取 比赛信息
    $sSql = "SELECT * FROM gift_game ORDER BY game_id DESC";
    $db->query( $sSql );

    $sHtml  = "<table align=center><tr><td colspan=6 style='font-size:30px;color:white;font-weight:bold;padding:10px;background-color:#4CAF50;'>抽獎活動列表</td></tr>";
    $sHtml .= "<tr><td colspan=6 style='font-size:20px;font-weight:bold;text-align:right;'><button type=button class='button btn1' id=admin_game_add>新增抽獎活動</button><div id=msg></div></td></tr>";
    $sHtml .= "<tr style='font-size:25px;font-weight:bold;'><td width=80>活動ID</td><td width=200>抽獎活動主題</td><td width=100>背景圖</td><td width=100>活動狀態</td><td width=170>創建時間</td><td width=260>操作</td></tr>";

    $num = 0;
    while( $row = $db->next_row() ) {

        $sHtml .= "<tr>";
        $sHtml .= "<td>".$row["game_id"]."</td>";
        $sHtml .= "<td><a target=_blank href=./game.php?game_id=".$row["game_id"].">".$row["game_name"]."</a></td>";
        $sHtml .= "<td>".$row["game_bgimg"]."</td>";
        $sHtml .= "<td>".($row["status"]?"<font color=green>進行中</font>":"<font color=red>已結束</font>")."</td>";
        $sHtml .= "<td>".$row["create_time"]."</td>";
        $sHtml .= "<td>
        <button type=button class='button btn2' id=admin_game_edit name=".$row["game_id"].">活動設置</button>
        <button type=button class='button btn2' id=admin_items name=".$row["game_id"].">獎品設置</button>
        <button type=button class='button btn2' id=admin_user name=".$row["game_id"].">用戶管理</button>
        </td>";
        $sHtml .= "</tr>";

    }

    $sHtml .= "</table>";
    echo $sHtml;

?>

</body>
</html>