Ejemplo n.º 1
0
    exit;
}
if (isset($_GET["add-select"])) {
    add_select_popup();
    exit;
}
if (isset($_POST["Params"])) {
    add_select_sql();
    exit;
}
if (isset($_GET["iScsiClientDelete"])) {
    delete_client();
    exit;
}
if (isset($_GET["iScsciReconnect"])) {
    iScsciReconnect();
    exit;
}
function add_js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body("{add_iscsi_disk}");
    $html = "YahooWin2('850','{$page}?add-popup=yes','{$title}');";
    echo $html;
}
function add_popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "<div class=explain style='font-size:18px'>{add_iscsi_explain}</div>\n\t<hr>\n\t<center style='width:98%' class=form>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:22px'>{addr}:</td>\n\t\t\t<td>" . Field_text("iscsi_search", null, "font-size:22px;font-weight:bold;width:350px", null, null, null, false, "SearchIscsiCheck(event)") . "</td>\n\t\t\t<td width=1%>" . button("{search}", "SearchIscsi()", 22) . "</td>\n\t\t</tr>\n\t\t</table>\t\n\t\n\t\t<div style='text-align:right;margin-bottom:10px;margin-top:10px'>" . imgtootltip("32-refresh.png", "{refresh}", "SearchIscsi()") . "</td>\n\t\t<div id='iscsi-search-list' style='width:100%;height:250px;overflow:auto;margin-top:15px'></div>\n\t\t\n\t\t\n\t\t<script>\n\t\t\tfunction SearchIscsiCheck(e){\n\t\t\t\tif(checkEnter(e)){SearchIscsi();}\n\t\t\t}\n\t\t\n\t\t\tfunction SearchIscsi(){\n\t\t\t\tLoadAjax('iscsi-search-list','{$page}?iscsi-search='+document.getElementById('iscsi_search').value);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\tvar x_iScsiClientDelete=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);return;}\n\t\t\tSearchIscsi();\n\t\t}\t\t\n\t\t\n\t\tfunction iScsiClientDelete(ID){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('iScsiClientDelete',ID);\t\t\t\t\t\n    \t\tXHR.sendAndLoad('{$page}', 'GET',x_iScsiClientDelete);\t\t\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t\n\t\tSearchIscsi();\n\t</script>\n\t";
Ejemplo n.º 2
0
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once("ressources/class.os.system.inc");
	include_once("ressources/class.lvm.org.inc");
	if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);}
	$user=new usersMenus();
	if(!$user->AsSystemAdministrator){echo "alert('no privileges');";die();}
	
	
	if(isset($_GET["add"])){add_js();exit;}
	if(isset($_GET["add-popup"])){add_popup();exit;}
	if(isset($_GET["iscsi-search"])){add_search();exit;}
	if(isset($_GET["add-select"])){add_select_popup();exit;}
	if(isset($_POST["Params"])){add_select_sql();exit;}
	if(isset($_GET["iScsiClientDelete"])){delete_client();exit;}
	if(isset($_GET["iScsciReconnect"])){iScsciReconnect();exit;}
	
function add_js(){
	
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{add_iscsi_disk}");
	
	$html="YahooWin2('850','$page?add-popup=yes','$title');";
	echo $html;
	
}

function add_popup(){
	$page=CurrentPageName();
	$tpl=new templates();