- Added a "Delete Logo" button if a logo exists. It just wipes out the .png and .gif logo files.

This commit is contained in:
dave 2007-01-16 19:45:12 +00:00
parent 14e8ee5ec9
commit dd247fa002

View File

@ -59,6 +59,15 @@ if($_POST['action']=="addimage")
echo error(i18n("Error uploading Logo Image").": ".$_FILES['image']['error']);
}
if($_POST['action']=="delimage") {
system("rm -f ../data/logo.gif");
system("rm -f ../data/logo.png");
system("rm -f ../data/logo*.gif");
system("rm -f ../data/logo*.png");
echo happy(i18n("Deleted any existing logo files"));
}
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"images.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"addimage\">\n";
@ -95,5 +104,13 @@ if($_POST['action']=="addimage")
echo "</table>";
echo "</form>";
if( file_exists("../data/logo.gif") || file_exists("../data/logo.png")) {
echo "<br />";
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"images.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"delimage\">\n";
echo "<input type=\"submit\" value=\"".i18n("Delete Logo")."\" />\n";
echo "</form>";
}
send_footer();
?>