会员管理 - 通信小李哥后台管理系统
<p>{/u0022title/u0022:/u0022/u4f1a/u5458/u7ba1/u7406 - /u901a/u4fe1/u5c0f/u674e/u54e5/u540e/u53f0/u7ba1/u7406/u7cfb/u7edf/u0022, /u0022description/u0022:/u0022/u901a/u4fe1/u5c0f/u674e/u54e5/u540e/u53f0/u7ba1/u7406/u7cfb/u7edf/u4f1a/u5458/u7ba1/u7406/u9875/u9762/uff0c/u7528/u4e8e/u67e5/u770b/u3001/u4fee/u6539/u3001/u5220/u9664/u4f1a/u5458/u4fe1/u606f/uff0c/u8bbe/u7f6e/u7ba1/u7406/u5458/u6743/u9650/u4ee5/u53ca/u8fc7/u671f/u65f6/u95f4/u3002/u0022, /u0022keywords/u0022:/u0022/u4f1a/u5458/u7ba1/u7406, /u540e/u53f0/u7ba1/u7406, /u901a/u4fe1/u5c0f/u674e/u54e5, /u7ba1/u7406/u7cfb/u7edf, /u7528/u6237/u7ba1/u7406, /u4f1a/u5458/u4fe1/u606f, /u8fc7/u671f/u65f6/u95f4, /u7ba1/u7406/u5458/u6743/u9650/u0022, /u0022content/u0022:/u0022/u003c?php/ninclude_once /u0027checkAdmin.php/u0027;/ninclude_once /u0027conn.php/u0027;/ninclude_once /u0027page.php/u0027;/n// /u8bbe/u7f6e/u6bcf/u9875/u663e/u793a/u591a/u5c11/u6761/u6570/u636e/n$perPage /u003d 10;/n// /u8bfb/u53d6/u5f53/u524d/u9875/u7801/n$page /u003d $_GET[/u0027page/u0027] ?? 1;/n// /u4f7f/u7528/u805a/u5408/u51fd/u6570count/u7edf/u8ba1/u8bb0/u5f55/u603b/u6570/n$sql /u003d /u0022select count(id) as total from user/u0022;/n$result/u003dmysqli_query($conn, $sql);/n$info/u003dmysqli_fetch_array($result);/n$total /u003d $info[/u0027total/u0027];/n// /u4ece/u6570/u636e/u5e93/u4e2d/u83b7/u53d6/u603b/u7684/u7ed3/u679c/u6570/u91cf/n// /u5f15/u7528/u5206/u9875/u51fd/u6570/npaging($total, $perPage);/n// /u67e5/u8be2/u6570/u636e/n$sql /u003d /u0022SELECT id, username, email, admin, registration_time, login_time, expiration_time FROM user ORDER BY id DESC LIMIT $firstCount, $displayPG/u0022;/n$result/u003dmysqli_query($conn, $sql);/n?>/n<!doctype html>/n<html lang/u003d/u0022en/u0022>/n<head>/n <meta charset/u003d/u0022UTF-8/u0022>/n <meta name/u003d/u0022viewport/u0022 content/u003d/u0022width/u003ddevice-width, user-scalable/u003dno, initial-scale/u003d1.0, maximum-scale/u003d1.0, minimum-scale/u003d1.0/u0022>/n <meta http-equiv/u003d/u0022X-UA-Compatible/u0022 content/u003d/u0022ie/u003dedge/u0022>/n <title>/u901a/u4fe1/u5c0f/u674e/u54e5/u540e/u53f0/u7ba1/u7406/u7cfb/u7edf</title>/n <style>/n .main {/n width: 80%;/n margin: 0 auto;/n text-align: center;/n }/n/n h2 {/n font-size: 20px/n }/n/n h2 a {/n color: navy;/n text-decoration: none;/n margin-right: 15px/n }/n/n h2 a:last-child {/n margin-right: 0/n }/n/n h2 a:hover {/n color: brown;/n text-decoration: underline/n }/n/n tr:hover {/n background-color: azure/n }/n/n .trClick1 {/n background-color: yellow/n }/n/n .trClick2 {/n background-color: white/n }/n </style>/n</head>/n<body>/n<div class/u003d/u0022main/u0022><?php include_once /u0027nav.php/u0027; ?>/n <table border/u003d/u00221/u0022 cellspacing/u003d/u00220/u0022 cellpadding/u003d/u002210/u0022 style/u003d/u0022border-collapse: collapse/u0022 align/u003d/u0022center/u0022 width/u003d/u002290%/u0022>/n <tr>/n <td>/u5e8f/u52f3</td>/n <td>/u7528/u6237/u540d</td>/n <td>/u90ae/u7bb1</td>/n <td>/u6ce8/u518c/u65f6/u95f4</td>/n <td>/u767b/u5f55/u65f6/u95f4</td>/n <td>/u8fc7/u671f/u65f6/u95f4</td>/n <td>/u662f/u5426/u7ba1/u7406/u5458</td>/n <td>/u64cd/u4f5c</td>/n </tr>/n <?php/n $i /u003d ($page - 1) * $perPage + 1;/n while ($info /u003d mysqli_fetch_array($result)) {/n ?>/n <tr onclick/u003d/u0022if(this.className == /u0027trClick2/u0027){this.className /u003d /u0027trClick1/u0027}else{this.className /u003d /u0027trClick2/u0027}/u0022/n class/u003d/u0022trClick2/u0022>/n <td><?php echo $i; ?></td>/n <td><?php echo $info[/u0027username/u0027]; ?></td>/n <td><?php echo $info[/u0027email/u0027]; ?></td>/n <td><?php echo $info[/u0027registration_time/u0027]; ?></td>/n <td><?php echo $info[/u0027login_time/u0027]; ?></td>/n <td><?php echo $info[/u0027expiration_time/u0027]; ?></td>/n <td><?php echo $info[/u0027admin/u0027] ? /u0027/u662f/u0027 : /u0027/u5426/u0027; ?></td>/n <td>/n <a href/u003d/u0022modify.php?id/u003d4&username/u003d<?php echo $info[/u0027username/u0027] ?>&source/u003dadmin&page/u003d<?php echo $page ?>/u0022>/u4fee/u6539/u8d44/u6599</a>/n <?php if ($info[/u0027username/u0027] <> /u0027admin/u0027) { ?><a/n href/u003d/u0022javascript:del(<?php echo $info[/u0027id/u0027]; ?>,/u0027<?php echo $info[/u0027username/u0027]; ?>/u0027);/u0022>/n /u5220/u9664/u4f1a/u5458</a>/n <?php/n } else {/n echo /u0022<span style/u003d/u0027color: gray/u0027>/u53d6/u6d88/u4f1a/u5458</span> /u0022;/n }/n if ($info[/u0027admin/u0027]) {/n if ($info[/u0027username/u0027] <> /u0027admin/u0027) {/n ?><a href/u003d/u0022setAdmin.php?action/u003d0&id/u003d<?php echo $info[/u0027id/u0027]; ?>/u0022>/u53d6/u6d88/u7ba1/u7406/u5458</a>/n <?php/n } else {/n echo /u0027<span style/u003d/u0027color: gray/u0027>/u53d6/u6d88/u7ba1/u7406/u5458</span>/u0027;/n }/n } else {/n if ($info[/u0027username/u0027] <> /u0027admin/u0027) {/n ?><a href/u003d/u0022setAdmin.php?action/u003d1&id/u003d<?php echo $info[/u0027id/u0027]; ?>/u0022>/u8bbe/u7f6e/u7ba1/u7406/u5458</a>/n <?php/n } else {/n echo /u0027<span style/u003d/u0027color: gray/u0027>/u8bbe/u7f6e/u7ba1/u7406/u5458</span>/u0027;/n }/n }/n ?>/n <a href/u003d/u0022setExpiration.php?id/u003d<?php echo $info[/u0027id/u0027]; ?>/u0022>/u8bbe/u7f6e/u8fc7/u671f/u65f6/u95f4</a>/n </td>/n </tr>/n <?php/n $i++;/n }/n ?>/n </table>/n <?php/n echo $pageNav;/n ?>/n</div>/n<script>/n function del(id, name) {/n if (confirm(/u0027/u60a8/u786e/u5b9a/u8981/u5220/u9664/u4f1a/u5458/u0027 + name + /u0027 /u5417?/u0027))/n { location.href /u003d /u0027del.php?id/u003d/u0027 + id + /u0027&username/u003d/u0027 + name; }/n } </script>/n</body>/n</html>/n<?php/n$info /u003d array(/u0027expiration_time/u0027 /u003d/u003e 7);/n/n// Assuming you have established a database connection and stored it in the $conn variable/ninclude_once /u0027conn.php/u0027;/n/nif(isset($_POST[/u0027submit/u0027])) {/n if(isset($_POST[/u0027username/u0027]) && isset($_POST[/u0027expiration_time/u0027])) {/n $username /u003d $_POST[/u0027username/u0027]; // Get the username from the form/n $expirationTime /u003d date(/u0022Y-m-d H:i:s/u0022, strtotime(/u0022+{$_POST[/u0027expiration_time/u0027]} days/u0022));/n // Get the selected expiration time and calculate the future date/n/n // Execute the SQL query to update the expiration time/n $sql /u003d /u0022UPDATE user SET expiration_time /u003d /u0027$expirationTime/u0027 WHERE username /u003d /u0027$username/u0027/u0022;/n $result /u003d mysqli_query($conn, $sql);/n/n if ($result) {/n echo /u0022Expiration time updated successfully for user: /u0022 . $username;/n } else {/n echo /u0022Error updating expiration time: /u0022 . mysqli_error($conn);/n }/n } else {/n echo /u0022Please select a username and expiration time./u0022;/n }/n}/n?>/n/n/n<!doctype html>/n<html lang/u003d/u0022en/u0022>/n<head>/n <meta charset/u003d/u0022UTF-8/u0022>/n <meta name/u003d/u0022viewport/u0022 content/u003d/u0022width/u003ddevice-width, user-scalable/u003dno, initial-scale/u003d1.0, maximum-scale/u003d1.0, minimum-scale/u003d1.0/u0022>/n <meta http-equiv/u003d/u0022X-UA-Compatible/u0022 content/u003d/u0022ie/u003dedge/u0022>/n <title>/u901a/u4fe1/u5c0f/u674e/u54e5/u540e/u53f0/u7ba1/u7406/u7cfb/u7edf</title>/n <style>/n body {/n font-family: Arial, sans-serif;/n background-color: #f2f2f2;/n margin: 0;/n padding: 0;/n }/n/n .main {/n width: 80%;/n margin: 0 auto;/n text-align: center;/n }/n/n h2 {/n font-size: 20px/n }/n/n h2 a {/n color: navy;/n text-decoration: none;/n margin-right: 15px/n }/n/n h2 a:last-child {/n margin-right: 0/n }/n/n h2 a:hover {/n color: brown;/n text-decoration: underline/n }/n/n .select-box {/n display: inline-block;/n position: relative;/n }/n/n .select-box select {/n width: 150px;/n padding: 5px;/n font-size: 16px;/n border-radius: 5px;/n border: 1px solid #ccc;/n }/n/n .select-box::after {/n content: /u0022/u0022;/n position: absolute;/n top: 50%;/n right: 10px;/n transform: translateY(-50%);/n width: 0;/n height: 0;/n border-left: 5px solid transparent;/n border-right: 5px solid transparent;/n border-top: 5px solid #000;/n }/n </style>/n</head>/n<body>/n <div class/u003d/u0022main/u0022>/n <?php include_once /u0027nav.php/u0027; ?>/n <form method/u003d/u0022POST/u0022 action/u003d/u0022/u0022>/n <h2>/u8bbe/u7f6e/u8fc7/u671f/u65f6/u95f4</h2>/n <div class/u003d/u0022select-box/u0022>/n <select name/u003d/u0022expiration_time/u0022 required>/n <option value/u003d/u0022/u0022>/u9009/u62e9/u8fc7/u671f/u65f6/u95f4</option>/n <option value/u003d/u00227/u0022 <?php if($info[/u0027expiration_time/u0027] == 7) echo /u0027selected/u0027; ?>>7/u5929</option>/n <option value/u003d/u002214/u0022 <?php if($info[/u0027expiration_time/u0027] == 14) echo /u0027selected/u0027; ?>>14/u5929</option>/n <option value/u003d/u002230/u0022 <?php if($info[/u0027expiration_time/u0027] == 30) echo /u0027selected/u0027; ?>>30/u5929</option>/n </select>/n </div>/n <input type/u003d/u0022text/u0022 name/u003d/u0022username/u0022 placeholder/u003d/u0022/u7528/u6237/u540d/u0022 required>/n <input type/u003d/u0022submit/u0022 name/u003d/u0022submit/u0022 value/u003d/u0022/u786e/u5b9a/u0022>/n </form>/n </div>/n</body>/n</html>/u002</p>
原文地址: https://www.cveoy.top/t/topic/p4xf 著作权归作者所有。请勿转载和采集!