示例#1
0
	echo "alert('$alert');";
	die();	
}
if(isset($_GET["status"])){page();exit;}
if(isset($_GET["tools"])){tools();exit;}
if(isset($_GET["blkupdates-status"])){blacklist_status();exit;}
if(isset($_GET["category-details"])){categories_details();exit;}
if(isset($_GET["category-details-md"])){categories_details_list();exit;}
if(isset($_GET["category-details-md-title"])){categories_details_title();exit;}
if(isset($_GET["pattern-database-title"])){blacklist_title();exit;}
if(isset($_GET["events"])){blacklist_events();exit;}



if(isset($_POST["reprocess"])){reprocess();exit;}
if(isset($_POST["update-now"])){update_now();exit;}


tabs();


function tools(){
	$page=CurrentPageName();
	$users=new usersMenus();
	$tpl=new templates();	
	$update=Paragraphe("folder-update.png", "{update_now}", "{blklist_update_now_text}","javascript:UpdateBLKNOW()");
	$tr[]=$update;


	
	$tables[]="<table style='width:100%'><tr>";
    exit;
}
if (isset($_GET["DelCompon"])) {
    DelCompon();
    exit;
}
if (isset($_POST["AddCompon"])) {
    AddCompon();
    exit;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["UpdateRetransloatorNow"])) {
    update_now();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body("{APP_KRETRANSLATOR}", "artica.update.php");
    $prefix = "retranslator";
    $html = "\n\tvar {$prefix}tant=0;\n\t\n\tfunction retranslatordemarre(){\n\t\t{$prefix}tant = {$prefix}tant+1;\n\t\tif(!YahooWinOpen()){return false;}\n\t\t\n\t\tif ({$prefix}tant < 25 ) {                           \n\t\t{$prefix}timerID =setTimeout(\"retranslatordemarre()\",2000);\n\t      } else {\n\t\t\t{$prefix}tant = 0;\n\t\t\t{$prefix}ChargeLogs();\n\t\t\tretranslatordemarre(); \n\t\t\t                              \n\t   }\n\t}\t\n\n\tfunction {$prefix}ChargeLogs(){\n\t\tvar selected = \$('#retranslator_main').tabs('option', 'selected');\n\t\tif(selected==0){RefreshTab('retranslator_main');}\n\t}\n\t\t\n\t\n\t\tfunction APP_KRETRANSLATOR_LOAD(){\n\t\t\tYahooWin(750,'{$page}?popup=yes','{$title}');\n\t\t\tretranslatordemarre();\n\t\t}\n\t\n\n\t\nvar X_AddCompon= function (obj) {\n\tvar tempvalue=obj.responseText;\n\talert(tempvalue);\n\tLoadAjax('retranslator_main','{$page}?main=components');\n}\n\t\nfunction AddCompon(index){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('AddCompon',index);\n\tXHR.sendAndLoad('{$page}', 'POST',X_AddCompon);\n\n}\n\nfunction DeleteComp(comp){\nvar XHR = new XHRConnection();\n\tXHR.appendData('DelCompon',comp);\n\tXHR.sendAndLoad('{$page}', 'GET',X_AddCompon);\n}\t\n\t\n\t\n\tAPP_KRETRANSLATOR_LOAD()";
    echo $html;
}
function popup()
{
    $tpl = new templates();
示例#3
0
	include_once('ressources/class.retranslator.inc');
	include_once('ressources/class.ini.inc');

	
	$user=new usersMenus();
	if($user->blkid_installed==false){header('location:users.index.php');exit();}
	if($user->AsSystemAdministrator==false){header('location:users.index.php');exit();}
	
	if(isset($_GET["main"])){main_switch();exit;}
	if(isset($_GET["script"])){main_switch_scripts();exit;}
	if(isset($_GET["save"])){save();exit;}
	if(isset($_GET["status"])){Status();exit;}
	if(isset($_GET["DelCompon"])){DelCompon();exit;}
	if(isset($_POST["AddCompon"])){AddCompon();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["UpdateRetransloatorNow"])){update_now();exit;}
	
	js();
	
	
	
function js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{APP_KRETRANSLATOR}","artica.update.php");
	$prefix="retranslator";
	$html="
	var {$prefix}tant=0;
	
	function retranslatordemarre(){
		{$prefix}tant = {$prefix}tant+1;