diff --git a/_db/dbstructure_v1.6.sql b/_db/dbstructure_v1.6.sql index 0397cf43..b79e90e6 100644 --- a/_db/dbstructure_v1.6.sql +++ b/_db/dbstructure_v1.6.sql @@ -2516,6 +2516,36 @@ INSERT INTO `uploadspeed` VALUES (1,'64kbps'),(2,'128kbps'),(3,'256kbps'),(4,'51 /*!40000 ALTER TABLE `uploadspeed` ENABLE KEYS */; 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` -- @@ -2673,4 +2703,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!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 diff --git a/classes/class_advertisement.php b/classes/class_advertisement.php index 571cd4dc..f848e94b 100644 --- a/classes/class_advertisement.php +++ b/classes/class_advertisement.php @@ -33,7 +33,7 @@ class ADVERTISEMENT{ return false; else { - if ($this->userrow['noad'] == 'yes') + if ($this->userrow && $this->userrow['noad'] == 'yes') return false; else return true; diff --git a/include/functions.php b/include/functions.php index 74a92339..1f4e3059 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1769,7 +1769,7 @@ function get_user_row($id) global $Cache, $CURUSER; static $curuserRowUpdated = false; 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(); foreach($neededColumns as $column) { $row[$column] = $CURUSER[$column]; @@ -2198,11 +2198,13 @@ function get_css_uri($file = "") function get_font_css_uri(){ global $CURUSER; - if ($CURUSER['fontsize'] == 'large') - $file = 'largefont.css'; - elseif ($CURUSER['fontsize'] == 'small') - $file = 'smallfont.css'; - else $file = 'mediumfont.css'; + $file = 'mediumfont.css'; + if ($CURUSER && isset($CURUSER['fontsize'])) { + if ($CURUSER['fontsize'] == 'large') + $file = 'largefont.css'; + elseif ($CURUSER['fontsize'] == 'small') + $file = 'smallfont.css'; + } return "styles/".$file; } @@ -2257,7 +2259,7 @@ function stdhead($title = "", $msgalert = true, $script = "", $place = "") $Cache->setLanguage($CURLANGDIR); - $Advertisement = new ADVERTISEMENT($CURUSER['id']); + $Advertisement = new ADVERTISEMENT($CURUSER['id'] ?? 0); $cssupdatedate = $cssdate_tweak; // Variable for Start Time $tstart = getmicrotime(); // Start time diff --git a/public/user-ban-log.php b/public/user-ban-log.php index d5ad0c55..f2776990 100644 --- a/public/user-ban-log.php +++ b/public/user-ban-log.php @@ -24,7 +24,7 @@ $filterForm = <<

User ban log

- +