<?
/*
VMLMAT: VM Linux Management and Archival Tool.
Copyright (c) 2007, Ronnie Michael, BMC Software Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the BMC Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#
# main error display module with message texts and return link required.
#
#function errmsg($result,$msg) {
#$result="";
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Wed, 29 Jul 1997 10:00:00 GMT");
session_start();
$msg=$_SESSION['errmsg'];
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
print "<html><head><title>VMLMAT VM Linux Management and Archival Tool</title>";
print '<link rel="stylesheet" type="text/css" href="/templates/astyle.css" title="standard"/>';
print "</head><body>";
$nl="\n";
#
#the user should not see this default message so please code new message if new functions are added.
$message="VMLMAT - goodbye. No message given.";
$return="index.html";
#
if ($msg == "aerr") {$message = "You must specify a Hostname and a co-owner (userid) and Function to modify. Please re-specify."; $return="sbkupa.php";}
if ($msg == "aperr") {$message = "You must specify a Hostname and a co-owner (userid) and Email to modify a Profile. Please re-specify."; $return="sbkupa.php";}
if ($msg == "anerr") {$message = "The specified Hostname was not found. Please re-specify."; $return="sbkupa.php";}
if ($msg == "aok") {$message = "Okay you have successfully modified the Hostname Owners."; $return="sbkupa.php";}
if ($msg == "cancel") {$message = "Okay you have requested to cancel."; $return="index.php";}
if ($msg == "autherr") {$message = "ERROR, you must fill out the form correctly. You are required to fill out your userid and password for authentication."; $return="index.html";}
if ($msg == "ddel") {$message = "Okay you have successfully deleted the hostname backup."; $return="dbkup.php";}
if ($msg == "error") {$message = "ERROR, you must fill out the form correctly. You are required to fill out email, hostname, etc."; $return="sbkupa.php";}
if ($msg == "uperror") {$message = "ERROR, you must fill out the form correctly. You must specify either Y or N for the question to bring up after backup is done."; $return="sbkup.php";}
if ($msg == "gerr") {$message = "Incorrect values for Autobackup. Please re-specify."; $return="gbkup.php";}
if ($msg == "gherr") {$message = "Please specify a Hostname."; $return="gbkup.php";}
if ($msg == "gnerr") {$message = "No Hostname for Autobackup was deleted or updated. You may need to add it first."; $return="gbkup.php";}
if ($msg == "gnherr") {$message = "Hostname was not found. Check your spelling or contact support."; $return="gbkup.php";}
if ($msg == "gok") {$message = "Autobackup maintenance task for the specified hostname is completed."; $return="gbkup.php";}
if ($msg == "mdel") {$message = "Okay you have successfully deleted the Hostname machine."; $return="sbkupm.php";}
if ($msg == "mnok") {$message = "The Hostname machine was not found."; $return="sbkupm.php";}
if ($msg == "mok") {$message = "Okay you have successfully added the hostname machine."; $return="sbkupm.php";}
if ($msg == "noip") {$message = "No valid IP Address could be found."; $return="index.php";}
if ($msg == "nouser") {$message = "No valid User/Group directory was found."; $return="index.php";}
if ($msg == "perr") {$message = "You must specify the Email address and answer Y or N to the question to modify. Please re-specify."; $return="sbkupp.php";}
if ($msg == "pok") {$message = "Okay you have successfully modified your profile."; $return="admin.php";}
if ($msg == "sok") {$message = "Okay you have successfully added your Standard Image."; $return="sbkups.php";}
if ($msg == "sdel") {$message = "Okay you have successfully deleted your Standard Image."; $return="sbkups.php";}
if ($msg == "snok") {$message = "The Standard Image file could not be found."; $return="sbkups.php";}
if ($msg == "serr") {$message = "You can not use white spaces. Please re-specify."; $return="admin.php";}
if ($msg == "ferr") {$message = "You must specify the correct function: (A)dmin,(B)ackup, or (U)p. Please re-specify."; $return="admin.php";}
if ($msg == "serror") {$message = "You can not use white spaces. Please re-specify."; $return="index.php";}
if ($msg == "snherr") {$message = "Hostname was not found. Check your spelling or contact support."; $return="index.php";}
if ($msg == "unauth") {$message = "You are not authorized to perform this function on this resource. You need to be an owner with the correct function privilege. To bring up/down you need at least UP privilege. To backup/restore you need at least BACKUP privilege."; $return="index.php";}
if ($msg == "unauths") {$message = "You are not authorized to perform this function on this resource. You need Zadmin or Zbackup authority."; $return="admin.php";}
if ($msg == "unauthm") {$message = "You are not authorized to perform this function on this resource. You need Zadmin or Zmachine authority."; $return="admin.php";}
if ($msg == "unauthd") {$message = "You are not authorized to delete this backup. You need to be an owner of the original backup source with Admin or Backup function privilege."; $return="sbkupu.php";}
if ($msg == "unautha") {$message = "You are not authorized to perform this function on this resource. You need to be an owner with Admin function privilege."; $return="admin.php";}
if ($msg == "unauthg") {$message = "You are not authorized to perform this function on this resource. You need to be an owner with at least Backup or Admin function privilege."; $return="gbkup.php";}
#
#lets finish up
#
print "<div id=banner><a name=top></a><h1><a href=".$return."> VMLMAT </a></h1><h2> Linux Management System </h2>".$nl;
print "</div>".$nl;
print "<div id=commentcontent>".$nl;
print "<p> next entry: <a href=".$return." target='_self'>Return</a>".$nl;
print "<h1>".$message."</h1>".$nl;
print "<p>Press the Return or Title link to return. <br />".$nl;
print "<br />";
#print 'msg ='.$msg;
print "<br />";
print "<br />";
print "<br />";
print "</p>";
print "</div>";
print "</body>";
print "</html>";
#return $result;
#}
?>