Example #1
0
    exit;
}
if (isset($_GET["SimpleShareAddCompForm"])) {
    SimpleShareAddCompForm();
    exit;
}
if (isset($_GET["computername_add"])) {
    SimpleShareAddComputerLDAP();
    exit;
}
if (isset($_GET["SharedList"])) {
    SharedList();
    exit;
}
if (isset($_GET["add-uid"])) {
    SimpleShareAddCompToPath();
    exit;
}
if (isset($_GET["del-uid"])) {
    SimpleShareDelCompToPath();
    exit;
}
js();
function js()
{
    $tpl = new templates();
    $simple_share = $tpl->_ENGINE_parse_body("{simple_share}");
    $page = CurrentPageName();
    $html = "\n\t\n\tYahooWin2('500','{$page}?popup=yes&path={$_GET["path"]}','{$simple_share}');\n\t\n\tfunction x_SimpleSearchAddComputerPath(obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){\n\t\t\talert(tempvalue);\n\t\t\tSimpleSharePathList();\n\t\t\treturn;\n\t\t}\t\n\t\t\n\t\tif(document.getElementById('main_config_folder_properties')){\n\t\t\tRefreshTab('main_config_folder_properties');\n\t\t}\n\t\t\n\t\tSimpleSharePathList();\n\t}\t\n\t\n\tfunction SimpleSearchAddComputerPath(uid){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('path','{$_GET["path"]}');\n\t\tXHR.appendData('add-uid',uid);\n\t\tdocument.getElementById('SharedPathComputerList').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SimpleSearchAddComputerPath);\t\t\n\t\n\t}\n\t\n\tfunction SimpleSearchDeleteComputerPath(value){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('path','{$_GET["path"]}');\n\t\tXHR.appendData('del-uid',value);\n\t\tdocument.getElementById('SharedPathComputerList').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SimpleSearchAddComputerPath);\t\t\n\t}\n\t\n\tfunction SimpleSharePathList(){\n\t\tLoadAjax('SharedPathComputerList','{$page}?SharedList=yes&path={$_GET["path"]}');\n\t}\n\t\n\t\n\t";
    echo $html;
}
Example #2
0
	include_once('ressources/class.ini.inc');
	include_once('ressources/class.samba.inc');
	include_once('ressources/class.user.inc');
	include_once('ressources/class.computers.inc');
	include_once('ressources/class.pdns.inc');
	
	

	
	if(!CheckSambaRights()){die();}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["SimpleShareSearch"])){SimpleShareSearch();exit;}
	if(isset($_GET["SimpleShareAddCompForm"])){SimpleShareAddCompForm();exit;}
	if(isset($_GET["computername_add"])){SimpleShareAddComputerLDAP();exit;}
	if(isset($_GET["SharedList"])){SharedList();exit;}
	if(isset($_GET["add-uid"])){SimpleShareAddCompToPath();exit;}
	if(isset($_GET["del-uid"])){SimpleShareDelCompToPath();exit;}
	js();
	
function js(){
	$tpl=new templates();
	$simple_share=$tpl->_ENGINE_parse_body("{simple_share}");
	$page=CurrentPageName();
	$html="
	
	YahooWin2('500','$page?popup=yes&path={$_GET["path"]}','$simple_share');
	
	function x_SimpleSearchAddComputerPath(obj) {
		var tempvalue=obj.responseText;
		if(tempvalue.length>0){
			alert(tempvalue);