Application Service Provider * http://www.cybergl.co.id * office@cybergl.co.id * * Wibisono Sastrodiwiryo * CEO * PT Cyber Gatra Loka * * * $Id: tool.php,v 0.1 2001/04/24 12:46:34 wibi Exp $ *********************************************************************/ include("require/config.php"); require("$reqpath/common.php"); require("$reqpath/news.php"); require("$reqpath/error.php"); $menu="$incpath/menu.php"; $action="tool.php"; $alert="Empty"; switch($_REQUEST['invoke']) { case "edit": if ($_REQUEST['news_id']) { $data=read_news($_REQUEST['news_id']); $hidden[news_id]=$_REQUEST['news_id']; $button=array("Update"); $content="$incpath/form.php"; $bartitle="Edit News $news_id"; } else {$error="80";} break; case "Update": if ($_REQUEST['news_id']) { update_news($HTTP_POST_VARS); $content="Change News Succeed.

".href("tool.php", "Back to List"); $bartitle="News Updated"; } else {$error="80";} break; case "del": if ($_REQUEST['news_id']) { $data=read_news($_REQUEST['news_id']); $hidden[news_id]=$_REQUEST['news_id']; $button=array("Sure", "Cancel"); $content="$incpath/delete.php"; $bartitle="Delete Confirmation"; } else {$error="80";} break; case "Sure": if ($_REQUEST['news_id']) { delete_news($_REQUEST['news_id']); $content="Delete News Succeed.

".href("tool.php", "Back to List"); $bartitle="News Deleted"; } else {$error="uncomplete";} break; default: $data=browse_news(); $content="$incpath/browse.php"; $bartitle="Admin Tools"; } if ($error) { $content=error_message($error); $bartitle="Error $error"; } #--------------------response include("$incpath/header.php"); include("$incpath/body.php"); include("$incpath/footer.php"); ?>