Moved cached images to database
BIN
Banned.jpg
Before Width: | Height: | Size: 4.7 KiB |
15
Database.sql
|
@ -284,13 +284,14 @@ CREATE TABLE IF NOT EXISTS `ip_timezones` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Gecachte Zeitzonen und Landinfos zu IPs (gehashed) für Besucherboards';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `userdata` (
|
||||
`id` varchar(36) NOT NULL DEFAULT '',
|
||||
`userdata` varchar(8192) NOT NULL,
|
||||
`lastreq` bigint(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `lastreq` (`lastreq`),
|
||||
KEY `Idx_id` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Userdaten Cache für Besucherboards';
|
||||
`id` VARCHAR(36) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
|
||||
`userdata` VARCHAR(8192) NOT NULL COLLATE 'utf8mb4_general_ci',
|
||||
`image` MEDIUMBLOB NOT NULL,
|
||||
`lastreq` BIGINT(255) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `lastreq` (`lastreq`) USING BTREE,
|
||||
INDEX `Idx_id` (`id`) USING BTREE
|
||||
) COMMENT='Userdaten Cache für Besucherboards' COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `_datastore` (
|
||||
`id` varchar(64) NOT NULL,
|
||||
|
|
BIN
NoImage.jpg
Before Width: | Height: | Size: 4.6 KiB |
BIN
Update.jpg
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 13 KiB |
|
@ -69,7 +69,7 @@
|
|||
}
|
||||
}
|
||||
$Query = str_ireplace($ReplaceData[0], $ReplaceData[1], $Query);
|
||||
$MysqlRes = new MySqlResult(mysqli_query($this->Connection, $Query), $Query);
|
||||
$MysqlRes = new MySqlResult(mysqli_query($this->Connection, $Query), $Query, $this->Connection);
|
||||
return $MysqlRes;
|
||||
}
|
||||
|
||||
|
@ -98,10 +98,10 @@
|
|||
private $Error;
|
||||
private $QueryString;
|
||||
|
||||
public function __construct($QueryRes, $QueryStr)
|
||||
public function __construct($QueryRes, $QueryStr, $Connection)
|
||||
{
|
||||
$this->MySqlRes = $QueryRes;
|
||||
$this->Error = mysqli_error($this->Connection);
|
||||
$this->Error = mysqli_error($Connection);
|
||||
$this->QueryString = $QueryStr;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
if (!empty($SingleUser[0]) && !empty($SingleUser[1]))
|
||||
{
|
||||
//The magic is done here
|
||||
$UserInfo = new GridUser($SingleUser[0], $SingleUser[1], realpath(dirname(__FILE__)));
|
||||
$UserInfo = new GridUser($SingleUser[0], $SingleUser[1]);
|
||||
$Info = $UserInfo->ToArray();
|
||||
if ($Info !== false)
|
||||
{
|
||||
|
@ -80,6 +80,7 @@
|
|||
"name" => $Info["firstname"]." ".$Info["lastname"],
|
||||
"grid" => $Info["homegrid"],
|
||||
"title" => $Info["title"],
|
||||
"img" => $Info["img"],
|
||||
"unix" => date("d.m.Y H:i", (int)$SingleUser[2]));
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +135,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
$UserImage = MakeBorderOnImage(imagecreatefromjpeg("UserImage/".$UserMem[$i]["uuid"].".jpg"), "ChalkBorder");
|
||||
$UserImage = MakeBorderOnImage(imagecreatefromstring($UserMem[$i]["img"]), "ChalkBorder");
|
||||
imagecopyresampled($Image, $UserImage, $x, $y, 0, 0, $ImgSize, $ImgSize, imagesx($UserImage), imagesy($UserImage));
|
||||
|
||||
if ($i < 2)
|
||||
|
|