$rule = "where id=$id"; /* THAT IS THE GENERAL RULE */ @mysql_connect("localhost","wwwuser","$dbpassword") or die("Connection died or wrong database password!"); mysql_select_db("e136") ; if ($action=="passwd"): /* CHANGE PASSWD */ # $result = mysql_query("select passwd $db $rule"); $pagetitle = "Change Password"; $pageheadline = "Change Password for $id $db database"; include "../e136header.phtml"?>
include "../e136footer.phtml"; exit; endif; if ($action=="makepasswd"): /* MAKE NEW PASSWD */ $pagetitle = "New Password"; $pageheadline = "New Password for $id $db database"; include "../e136header.phtml"; if ($db=="from publication"): $subdb="publication"; endif; mysql_query("update $subdb set passwd=password('$passwd') $rule")?> Password changed! include "../e136footer.phtml"; exit; endif; if ($action=="delete"): /* DELETE ENTRY */ $pagetitle = "Delete Entry"; $pageheadline = "Delete Entry $id $db database"; include "../e136header.phtml"; $result = mysql_query("select type $db $rule"); if (mysql_result($result,0,"type")=="J"): $subdb = "journal"; endif; if (mysql_result($result,0,"type")=="B"): $subdb = "book"; endif; if (mysql_result($result,0,"type")=="V"): $subdb = "vortrag"; endif; if (mysql_result($result,0,"type")=="D"): $subdb = "diplom"; endif; mysql_query("delete from $subdb $rule") or die("Failure to delete from $subdb $rule"); mysql_query("delete $db $rule") or die("Failure to delete $db $rule")?> Entry echo $id?> echo $db?> and from echo $subdb?> database successfully deleted. include "../e136footer.phtml"; exit; endif; if ($action=="edit"): /* EDIT ENTRY */ $pagetitle = "Edit Entry"; $pageheadline = "Edit Entry $id $db database"; include "../e136header.phtml"; #echo "select * $db $rule"; $result = mysql_query("select * $db $rule"); if (mysql_result($result,0,"type")=="J"): $subdb = "journal"; $art = "J"; endif; if (mysql_result($result,0,"type")=="B"): $subdb = "book"; $art = "B"; endif; if (mysql_result($result,0,"type")=="V"): $subdb = "vortrag"; $art = "V"; endif; if (mysql_result($result,0,"type")=="D"): $subdb = "diplom"; $art = "D"; endif ?> include "../e136footer.phtml"; exit; endif; /* NOT ALLOWED */ ?>