mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-26 21:37:22 +08:00
db structure add table user_ban_logs
This commit is contained in:
@@ -2516,6 +2516,36 @@ INSERT INTO `uploadspeed` VALUES (1,'64kbps'),(2,'128kbps'),(3,'256kbps'),(4,'51
|
|||||||
/*!40000 ALTER TABLE `uploadspeed` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `uploadspeed` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `user_ban_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `user_ban_logs`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `user_ban_logs` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`uid` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`username` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`operator` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`reason` varchar(255) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_uid` (`uid`),
|
||||||
|
KEY `idx_username` (`username`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `user_ban_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `user_ban_logs` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `user_ban_logs` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `user_ban_logs` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `users`
|
-- Table structure for table `users`
|
||||||
--
|
--
|
||||||
@@ -2673,4 +2703,4 @@ UNLOCK TABLES;
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2021-05-11 11:16:24
|
-- Dump completed on 2021-05-14 0:29:10
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class ADVERTISEMENT{
|
|||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($this->userrow['noad'] == 'yes')
|
if ($this->userrow && $this->userrow['noad'] == 'yes')
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1769,7 +1769,7 @@ function get_user_row($id)
|
|||||||
global $Cache, $CURUSER;
|
global $Cache, $CURUSER;
|
||||||
static $curuserRowUpdated = false;
|
static $curuserRowUpdated = false;
|
||||||
static $neededColumns = array('id', 'noad', 'class', 'enabled', 'privacy', 'avatar', 'signature', 'uploaded', 'downloaded', 'last_access', 'username', 'donor', 'leechwarn', 'warned', 'title');
|
static $neededColumns = array('id', 'noad', 'class', 'enabled', 'privacy', 'avatar', 'signature', 'uploaded', 'downloaded', 'last_access', 'username', 'donor', 'leechwarn', 'warned', 'title');
|
||||||
if ($id == $CURUSER['id']) {
|
if ($CURUSER && $id == $CURUSER['id']) {
|
||||||
$row = array();
|
$row = array();
|
||||||
foreach($neededColumns as $column) {
|
foreach($neededColumns as $column) {
|
||||||
$row[$column] = $CURUSER[$column];
|
$row[$column] = $CURUSER[$column];
|
||||||
@@ -2198,11 +2198,13 @@ function get_css_uri($file = "")
|
|||||||
|
|
||||||
function get_font_css_uri(){
|
function get_font_css_uri(){
|
||||||
global $CURUSER;
|
global $CURUSER;
|
||||||
if ($CURUSER['fontsize'] == 'large')
|
$file = 'mediumfont.css';
|
||||||
$file = 'largefont.css';
|
if ($CURUSER && isset($CURUSER['fontsize'])) {
|
||||||
elseif ($CURUSER['fontsize'] == 'small')
|
if ($CURUSER['fontsize'] == 'large')
|
||||||
$file = 'smallfont.css';
|
$file = 'largefont.css';
|
||||||
else $file = 'mediumfont.css';
|
elseif ($CURUSER['fontsize'] == 'small')
|
||||||
|
$file = 'smallfont.css';
|
||||||
|
}
|
||||||
return "styles/".$file;
|
return "styles/".$file;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2257,7 +2259,7 @@ function stdhead($title = "", $msgalert = true, $script = "", $place = "")
|
|||||||
|
|
||||||
$Cache->setLanguage($CURLANGDIR);
|
$Cache->setLanguage($CURLANGDIR);
|
||||||
|
|
||||||
$Advertisement = new ADVERTISEMENT($CURUSER['id']);
|
$Advertisement = new ADVERTISEMENT($CURUSER['id'] ?? 0);
|
||||||
$cssupdatedate = $cssdate_tweak;
|
$cssupdatedate = $cssdate_tweak;
|
||||||
// Variable for Start Time
|
// Variable for Start Time
|
||||||
$tstart = getmicrotime(); // Start time
|
$tstart = getmicrotime(); // Start time
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ $filterForm = <<<FORM
|
|||||||
<div>
|
<div>
|
||||||
<h1 style="text-align: center">User ban log</h1>
|
<h1 style="text-align: center">User ban log</h1>
|
||||||
<form id="filterForm" action="{$_SERVER['REQUEST_URI']}" method="get">
|
<form id="filterForm" action="{$_SERVER['REQUEST_URI']}" method="get">
|
||||||
<input id="q" type="text" name="q" value="{$q}">
|
<input id="q" type="text" name="q" value="{$q}" placeholder="username">
|
||||||
<input type="submit">
|
<input type="submit">
|
||||||
<input type="reset" onclick="document.getElementById('q').value='';document.getElementById('filterForm').submit();">
|
<input type="reset" onclick="document.getElementById('q').value='';document.getElementById('filterForm').submit();">
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user