function doInstall() { // step 1: install the admin database; // step 2: install the user App; // step 3: redirect the Admin/Index/index; // check if the Admin app had install if (!is_app_installed('Admin')) { // TODO : install it self first $res = install_app('Admin'); //TODO : push the Admin data into Admin $res = regist_app('Admin'); $res = install_app('User'); $res = regist_app('User'); $res = install_app('Attach'); $res = regist_app('Attach'); $res = $this->_registAdminUser(); // TODO : redirect to the login html //exit('Admin install finish'); $this->success(L('install_app_success'), U('Admin/Public/index')); } else { exit(L('err_install_app_fail')); } }
exit; } if (isset($_GET["mysqlenable"])) { echo mysql_enable(); exit; } if ($_GET["script"] == "mysql_enabled") { echo js_mysql_enabled(); exit; } if ($_GET["script"] == "mysql_save_account") { echo js_mysql_save_account(); exit; } if (isset($_GET["install_app"])) { install_app(); exit; } if (isset($_GET["InstallLogs"])) { GetLogsStatus(); exit; } if (isset($_GET["TestConnection-js"])) { TestConnection_js(); exit; } if (isset($_GET["testConnection"])) { testConnection(); exit; } if (isset($_GET["remove"])) {
if(isset($_GET["popup"])){popup();exit;} if($_GET["main"]=="softwares-available"){software_available();exit;} if($_GET["main"]=="samba-stables"){samba_stables_available();exit;} if(isset($_GET["software-list-by-family"])){software_available_family();exit;} if(isset($_GET["software-list"])){software_list_by_family();exit;} if(isset($_GET["main-start"])){echo popup_main();exit;} if(isset($_GET["mysqlstatus"])){echo mysql_status();exit;} if(isset($_GET["main"])){echo mysql_main_switch();exit;} if(isset($_GET["mysqlenable"])){echo mysql_enable();exit;} if($_GET["script"]=="mysql_enabled"){echo js_mysql_enabled();exit;} if($_GET["script"]=="mysql_save_account"){echo js_mysql_save_account();exit;} if(isset($_GET["install_app"])){install_app();exit;} if(isset($_GET["InstallLogs"])){GetLogsStatus();exit;} if(isset($_GET["TestConnection-js"])){TestConnection_js();exit;} if(isset($_GET["testConnection"])){testConnection();exit;} if(isset($_GET["remove"])){remove();exit;} if(isset($_GET["uninstall_app"])){remove_perform();exit;} if(isset($_GET["remove-refresh"])){remove_refresh();exit;} if(isset($_GET["ui-samba"])){install_remove_services();exit;} if(isset($_GET["clear"])){clear();exit;} if(isset($_GET["SynSysPackages"])){SynSysPackages();exit;} if(isset($_GET["softwares-available"])){software_available();exit;} if(isset($_GET["remove-app-js"])){remove_app_js();exit;} if(isset($_POST["remove-app-perform"])){remove_app_perform();exit;} if(isset($_GET["RefreshMysqlSetup"])){RefreshMysqlSetup();exit;} if(posix_getuid()<>0){main_page();}
<?php include_once(dirname(__FILE__) . '/ressources/class.main_cf.inc'); include_once(dirname(__FILE__) . '/ressources/class.ldap.inc'); include_once(dirname(__FILE__) . "/ressources/class.sockets.inc"); include_once(dirname(__FILE__) . "/ressources/class.mysql.inc"); if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["statusof"])){statusof();exit;} if(isset($_GET["logsof"])){logsof();exit;} if(isset($_GET["launch"])){install_app();exit;} $user=new usersMenus(); if(!$user->AsSystemAdministrator){ $tpl=new templates(); echo $tpl->javascript_parse_text("alert('{ERROR_NO_PRIVS}');"); exit(); } js(); function js(){ $page=CurrentPageName(); $prefix=str_replace('.','_',$page);
private function _doInstallApp($name) { if (isset($name) && !is_app_installed($name)) { $res = install_app($name); $res = regist_app($name); if ($res) { $this->success(L('install_app_success'), U('Admin/Admin/dispApps')); } else { $this->error(L('err_install_app_fail')); } } }