function do_action($action, $server, $dedi_cfg, $config) { switch ($action) { case 'start': do_start($server, $dedi_cfg, $config); break; case 'stop': do_stop($server, $dedi_cfg, $config); break; case 'restart': do_restart($server, $dedi_cfg, $config); break; case 'status': check_status($server, $dedi_cfg, $config); break; case 'show': show_config($server, $dedi_cfg, $config); break; } }
exit; } // RPC身份注册 sendrequest($rpcpbx->base_clientlogin($_SESSION['res_admin']['adminid'], $_SESSION['res_admin']['passwd']), 0); /*------------------------------------ incoming action switcher --------------------------------------*/ if (!isset($_REQUEST['action'])) { page_reload(); } switch ($_REQUEST['action']) { case "reload": do_reload(); break; case "restart": do_restart(); break; default: page_reload(); break; } /*------------------------------------ responser functions --------------------------------------*/ function page_reload() { global $smarty; global $rpcpbx; global $friconf; //基本 $smarty->assign("res_admin", $_SESSION['res_admin']);