echo "
Gallery
";
if ($data = $mysqli->prepare("SELECT name, short_desc FROM addon_gallery WHERE del=0")) {
$data->execute();
$data->bind_result($name, $short_desc);
while ($data->fetch()) {
//XSS Prenvention.
$name = test_input($name);
$short_desc = test_input($short_desc);
$img_pre = preg_replace("/[^A-Za-z0-9]/", "", $name);
$specialChars = array(" ");
$replaceChars = array("");
$img_pre = str_replace($specialChars, $replaceChars, $img_pre);
$CWD = getcwd();
chdir('cms/addons/gallery/upload/');
foreach (glob($img_pre . "_*" . '*') as $filename) {
echo '';
}
chdir($CWD);
}
$data->close();
}
?>