".$locale['401']."";
} elseif ($status == "upn") {
$title = $locale['420'];
$message = "".$locale['425']."";
} elseif ($status == "upy") {
$title = $locale['420'];
$message = "
\n".$locale['426']."";
}
opentable($title);
echo "
".$message."
\n";
closetable();
tablebreak();
}
if (isset($del)) {
unlink($afolder."$del");
if ($settings['tinymce_enabled'] == 1) include INCLUDES."buildlist.php";
redirect(FUSION_SELF.$aidlink."&status=del&ifolder=$ifolder");
} else if (isset($_POST['uploadimage'])) {
$error = "";
$image_types = array(
".gif",
".GIF",
".jpeg",
".JPEG",
".jpg",
".JPG",
".png",
".PNG"
);
$imgext = strrchr($_FILES['myfile']['name'], ".");
$imgname = $_FILES['myfile']['name'];
$imgsize = $_FILES['myfile']['size'];
$imgtemp = $_FILES['myfile']['tmp_name'];
if (!in_array($imgext, $image_types)) {
redirect(FUSION_SELF.$aidlink."&status=upn&ifolder=$ifolder");
} elseif (is_uploaded_file($imgtemp)){
move_uploaded_file($imgtemp, $afolder.$imgname);
chmod($afolder.$imgname,0644);
if ($settings['tinymce_enabled'] == 1) include INCLUDES."buildlist.php";
redirect(FUSION_SELF.$aidlink."&status=upy&ifolder=$ifolder&img=$imgname");
}
} else {
opentable($locale['420']);
echo "\n";
closetable();
tablebreak();
if (isset($view)) {
opentable($locale['440']);
echo "
\n";
$image_ext = strrchr($afolder.$view,".");
if (in_array($image_ext, array(".gif",".GIF",".jpg",".JPG",".jpeg",".JPEG",".png",".PNG"))) {
echo "
\n";
} else {
echo $locale['441']."
\n";
}
echo "".$locale['442']."
\n".$locale['402']."
\n\n";
closetable();
} else {
$image_list = makefilelist($afolder, ".|..|imagelist.js|index.php", true);
if ($image_list) { $image_count = count($image_list); }
opentable($locale['460']);
echo "\n";
closetable();
}
}
echo "\n";
require_once BASEDIR."footer.php";
?>