当前位置: 首页>>代码示例>>PHP>>正文


PHP mysql::CheckTable_dansguardian方法代码示例

本文整理汇总了PHP中mysql::CheckTable_dansguardian方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql::CheckTable_dansguardian方法的具体用法?PHP mysql::CheckTable_dansguardian怎么用?PHP mysql::CheckTable_dansguardian使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql的用法示例。


在下文中一共展示了mysql::CheckTable_dansguardian方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mysql_rebuild

function mysql_rebuild()
{
    $q = new mysql();
    if (!$q->CheckTable_dansguardian()) {
        echo $q->mysql_error;
    }
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: free_catgorized_save

function free_catgorized_save(){
	
	$sock=new sockets();
	$uuid=base64_decode($sock->getFrameWork("cmd.php?system-unique-id=yes"));
	
	if(!preg_match_all("#http.*?:\/\/(.+?)[\/\s]+#",$_POST["textToParseCats"]."\n",$re)){echo "No webistes\n";}
	
		while (list ($num, $www) = each ($re[1]) ){
			$www=strtolower($www);
			$www=replace_accents($www);
			if(preg_match("#^www\.(.+?)$#i",$www,$ri)){$www=$ri[1];}
			
			$sites[$www]=$www;
		}
		
	
	$q=new mysql();
	$q->CheckTable_dansguardian();
	
	if(count($sites)==0){echo "NO websites\n";return;}
	$category=$_POST["category"];
	echo "analyze ".count($sites)." websites into $category\n";
	while (list ($num, $www) = each ($sites) ){
		$md5=md5($www.$category);
		$sql="SELECT zmd5 FROM dansguardian_community_categories WHERE pattern='$www' AND category='$category'";
		$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
		$sql_add="INSERT INTO dansguardian_community_categories (zmd5,zDate,category,pattern,uuid) VALUES('$md5',NOW(),'$category','$www','$uuid')";
		if($ligne["zmd5"]<>null){continue;}		
		echo "Added $www\n";
		$q->QUERY_SQL($sql_add,"artica_backup");
		if(!$q->ok){echo $q->mysql_error;return;}
		$cats=GetCategory($www);
		$sql="UPDATE dansguardian_sitesinfos SET category='$cats', dbpath='$cats' WHERE website='$www'";
		writelogs("$sql",__FUNCTION__,__FILE__,__LINE__);
		$q->QUERY_SQL($sql,"artica_backup");
		if(!$q->ok){echo $q->mysql_error."\n";echo $sql;}
		$sql="UPDATE squid_events_sites SET category='$cats' WHERE website='$www'";
		writelogs("$sql",__FUNCTION__,__FILE__,__LINE__);
		$q->QUERY_SQL($sql,"artica_events");
		if(!$q->ok){echo $q->mysql_error."\n";echo $sql;}
		
	}		
		
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?export-community-categories=yes");
	
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:48,代码来源:squid.visited.php

示例3: ComputersList

function ComputersList(){
$q=new mysql();
$sock=new sockets();
	$sql="SELECT ID,pattern,uid FROM dansguardian_files WHERE filename='bannediplist' AND RuleID=1 ORDER BY ID DESC";
	$results=$q->QUERY_SQL($sql,"artica_backup");
	if(!$q->ok){
		$mysql_error="::$q->mysql_error";
		if(preg_match("#doesn't exist#",$q->mysql_error)){
			$q->CheckTable_dansguardian();
			if(!$q->ok){$mysql_error=$mysql_error."::$q->mysql_error";}else{$mysql_error=null;}
		}
	}
	
	$style=CellRollOver();
	$html="<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>
<thead class='thead'>
	<tr>
		<th colspan=4>{black_ip_group}$mysql_error</th>
	</tr>
</thead>
<tbody class='tbody'>";	
	
	while($ligne=@mysql_fetch_array($results,MYSQL_ASSOC)){	
		if($classtr=="oddRow"){$classtr=null;}else{$classtr="oddRow";}
		$MAC=null;$uid=null;
		if($ligne["uid"]<>null){
			$cmp=new computers($ligne["uid"]);
			$MAC=$cmp->ComputerMacAddress;
			$uid="<br><i style='font-size:9px'>$cmp->ComputerRealName</i>";
		}
		
		if(!IsPhysicalAddress($MAC)){
			$MAC=$sock->getFrameWork("cmd.php?ip-to-mac={$ligne["pattern"]}");
		}
		
		if(!IsPhysicalAddress($MAC)){$MAC=null;}
		
		$html=$html."
		<tr class=$classtr>
			<td width=1% ><img src='img/computer-32.png'></td>
			<td  nowrap><strong style='font-size:14px'>{$ligne["pattern"]}$uid</strong></td>
			<td  nowrap><strong style='font-size:14px'>&nbsp;$MAC</strong></td>
			<td ><strong>". imgtootltip("delete-24.png","{delete}","DelDansGuardianExceptionipList('{$ligne["ID"]}');")."</strong></td>
		</tr>
	";
	}
	$html=$html . "
		</tbody>
	</table>";	
	$html="<center><div style='height:450px;overflow:auto'>$html</div></center>";		
	$tpl=new templates();
	return  $tpl->_ENGINE_parse_body($html);		
	
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:55,代码来源:dansguardian.bannediplist.php

示例4: CleanDB

    die;
}
if ($argv[1] == "--clean-db") {
    CleanDB();
    echo "\n";
    die;
}
//exec.dansguardian.compile.php --patterns
echo "\n";
echo "Starting......: Dansguardian reconfigure settings\n";
$q = new mysql();
if (!$q->test_mysql_connection()) {
    echo "Starting......: Dansguardian Mysql error\n";
    die;
}
$q->CheckTable_dansguardian();
LoadGlobal_exceptionsitelist();
$dans = new dansguardian();
$dans->SaveSettings();
$cmd = LOCATE_PHP5_BIN2() . " " . dirname(__FILE__) . "/exec.web-community-filter.php --patterns{$GLOBALS["cmdlineadd"]}";
events("MAIN:: {$cmd}");
system($cmd);
HtmlTemplate();
BuildPersonalCategories();
bannedsitelist_userdefined();
weightedphraselist_userdefined();
BuildRules();
BuildWhiteIpList();
BuildBannedIPList();
FixMissingGroupsFiles();
FixMissingFiles();
开发者ID:brucewu16899,项目名称:artica,代码行数:31,代码来源:exec.dansguardian.compile.php

示例5: SQUID_TEMPLATES

function SQUID_TEMPLATES()
{
    if (system_is_overloaded(__FILE__)) {
        return null;
    }
    $unix = new unix();
    $EXEC_PID_FILE = "/etc/artica-postfix/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    if ($unix->process_exists(@file_get_contents($EXEC_PID_FILE))) {
        print "Starting......: Checking squid Already executed pid " . @file_get_contents($EXEC_PID_FILE) . "...\n";
        die;
    }
    $childpid = posix_getpid();
    @file_put_contents($EXEC_PID_FILE, $childpid);
    if ($GLOBALS["VERBOSE"]) {
        echo "Search DataDir from compiled environments\n";
    }
    $document_root = $unix->SQUID_GET_DATADIR();
    echo "Starting......: squid DataDir: {$document_root}\n";
    if (!is_dir("{$document_root}/errors/English")) {
        echo "Starting......: squid DataDir: {$document_root}/errors/English no such directory\n";
        return;
    }
    $q = new mysql();
    $q->CheckTable_dansguardian();
    foreach (glob("{$document_root}/errors/English/*") as $filename) {
        $file = basename($filename);
        $sql = "SELECT TEMPLATE_DATA,TEMPLATE_DATA_SOURCE FROM squid_templates WHERE TEMPLATE_NAME='{$file}'";
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
        if ($ligne["TEMPLATE_DATA_SOURCE"] == null) {
            echo "Starting......: squid importing template {$file}\n";
            $datas = addslashes(@file_get_contents($filename));
            $sql = "INSERT INTO squid_templates (`TEMPLATE_DATA`,`TEMPLATE_DATA_SOURCE`,`TEMPLATE_NAME`) \n\t\t\tVALUES ('{$datas}','{$datas}','{$file}')";
            $q->QUERY_SQL($sql, "artica_backup");
            if (!$q->ok) {
                echo "Starting......: squid failed {$q->mysql_error}\n";
            }
            $TEMPLATES[$file]["MODIFIED"] = $datas;
            $TEMPLATES[$file]["SRC"] = $datas;
        } else {
            $TEMPLATES[$file]["MODIFIED"] = $ligne["TEMPLATE_DATA"];
            $TEMPLATES[$file]["SRC"] = $ligne["TEMPLATE_DATA_SOURCE"];
        }
    }
    if (!is_array($TEMPLATES)) {
        echo "Starting......: squid no templates found...\n";
        return;
    }
    $langsDirs = array('Armenian', 'Azerbaijani', 'Bulgarian', 'Catalan', 'Danish', 'Dutch', 'English', 'Estonian', 'Finnish', 'French', 'German', 'Greek', 'Hebrew', 'Hungarian', 'Italian', 'Japanese', 'Korean', 'Lithuanian', 'Portuguese', 'Romanian', 'Russian-1251', 'Russian-koi8-r', 'Serbian', 'Simplify_Chinese', 'Slovak', 'Spanish', 'Swedish', 'Traditional_Chinese', 'Turkish', 'Ukrainian-1251', 'Ukrainian-koi8-u', 'Ukrainian-utf8', 'af', 'ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg', 'ar-iq', 'ar-jo', 'ar-kw', 'ar-lb', 'ar-ly', 'ar-ma', 'ar-om', 'ar-qa', 'ar-sa', 'ar-sy', 'ar-tn', 'ar-ye', 'az', 'az-az', 'bg', 'bg-bg', 'ca', 'cs', 'cs-cz', 'da', 'da-dk', 'de', 'de-at', 'de-ch', 'de-de', 'de-li', 'de-lu', 'el', 'el-gr', 'en', 'en-au', 'en-bz', 'en-ca', 'en-gb', 'en-ie', 'en-in', 'en-jm', 'en-nz', 'en-ph', 'en-sg', 'en-tt', 'en-uk', 'en-us', 'en-za', 'en-zw', 'es', 'es-ar', 'es-bo', 'es-cl', 'es-co', 'es-cr', 'es-do', 'es-ec', 'es-es', 'es-gt', 'es-hn', 'es-mx', 'es-ni', 'es-pa', 'es-pe', 'es-pr', 'es-py', 'es-sv', 'es-uy', 'es-ve', 'et', 'et-ee', 'fa', 'fa-fa', 'fa-ir', 'fi', 'fi-fi', 'fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu', 'fr-mc', 'he', 'he-il', 'hu', 'hu-hu', 'hy', 'hy-am', 'id', 'id-id', 'it', 'it-ch', 'it-it', 'ja', 'ja-jp', 'ko', 'ko-kp', 'ko-kr', 'lt', 'lt-lt', 'lv', 'lv-lv', 'ms', 'ms-my', 'nl', 'nl-nl', 'pl', 'pl-pl', 'pt', 'pt-br', 'pt-pt', 'ro', 'ro-md', 'ro-ro', 'ru', 'ru-ru', 'sk', 'sk-sk', 'sr', 'sr-latn', 'sr-latn-cs', 'sr-sp', 'sv', 'sv-fi', 'sv-se', 'templates', 'th', 'th-th', 'tr', 'tr-tr', 'uk', 'uk-ua', 'uz', 'zh-cn', 'zh-hk', 'zh-mo', 'zh-sg', 'zh-tw');
    $css = SQUID_TEMPLATES_COMPILING_CSS();
    while (list($template_name, $content) = each($TEMPLATES)) {
        if (preg_match("#<title>(.+?)</title>#is", $content["SRC"], $re)) {
            $title = $re[1];
        }
        if (preg_match("#<body>(.+?)</body>#is", $content["MODIFIED"], $re)) {
            $body = $re[1];
        } else {
            $body = $content["MODIFIED"];
        }
        $html = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\t\t<html>\n\t\t<head>\n\t\t<title>{$title}</title>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> \n\t\t<style type=\"text/css\">\n\t\t<!--\n\t\t{$css}\n\t\t-->\n\t\t</style>\n\t\t</head>\n\t\t<body>\n\t\t\t{$body}\n\t\t</body>\n\t\t</html>\n\t\t";
        $TEMPLATES_NEW[$template_name] = $html;
    }
    reset($langsDirs);
    echo "Starting......: squid building templates...\n";
    while (list($index, $subdir) = each($langsDirs)) {
        reset($TEMPLATES_NEW);
        @mkdir("{$document_root}/errors/{$subdir}", 0755, true);
        while (list($template_name, $template_data) = each($TEMPLATES_NEW)) {
            if ($template_name == "error-details.txt") {
                continue;
            }
            if (!@file_put_contents("{$document_root}/errors/{$subdir}/{$template_name}", $template_data)) {
                echo "Starting......: squid {$document_root}/errors/{$subdir}/{$template_name} permission denied\n";
            }
        }
    }
    errors_details_txt();
    echo "Starting......: squid replace " . count($TEMPLATES) . " templates in " . count($langsDirs) . " languages done..\n";
}
开发者ID:,项目名称:,代码行数:78,代码来源:

示例6: save_category

function save_category(){
	$www=trim(strtolower(base64_decode($_GET["website"])));
	if(preg_match("#^www\.(.+?)$#i",$www,$re)){$www=$re[1];}
	$category=$_GET["category"];
	$md5=md5($www.$category);
	$sock=new sockets();
	$uuid=base64_decode($sock->getFrameWork("cmd.php?system-unique-id=yes"));
	$enabled=$_GET["enabled"];
	$sql="SELECT zmd5 FROM dansguardian_community_categories WHERE pattern='$www' AND category='$category'";
	
	
	
	$q=new mysql();
	$q->CheckTable_dansguardian();
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	$sql_add="INSERT INTO dansguardian_community_categories (zmd5,zDate,category,pattern,uuid) VALUES('$md5',NOW(),'$category','$www','$uuid')";
	$sql_edit="UPDATE dansguardian_community_categories SET enabled='$enabled' WHERE category='$category' AND pattern='$www'";
	
	writelogs("$www/$category = {$ligne["zmd5"]}",__FUNCTION__,__FILE__,__LINE__);
	
	if($ligne["zmd5"]==null){$q->QUERY_SQL($sql_add,"artica_backup");}
	else{
		writelogs("$sql_edit",__FUNCTION__,__FILE__,__LINE__);
		$q->QUERY_SQL($sql_edit,"artica_backup");
	}
	if(!$q->ok){
		echo $q->mysql_error;
		return;
	}
	
	$cats=GetCategory($www);
	
	$sql="UPDATE dansguardian_sitesinfos SET category='$cats', dbpath='$cats' WHERE website='$www'";
	writelogs("$sql",__FUNCTION__,__FILE__,__LINE__);
	$q->QUERY_SQL($sql,"artica_backup");
	if(!$q->ok){
		echo $q->mysql_error."\n";
		echo $sql;
		
	}

	
	$sql="UPDATE squid_events_sites SET category='$cats' WHERE website='$www'";
	writelogs("$sql",__FUNCTION__,__FILE__,__LINE__);
	$q->QUERY_SQL($sql,"artica_events");
	if(!$q->ok){
		echo $q->mysql_error."\n";
		echo $sql;
		
	}	
	
	
	
	$sock=new sockets();
	$sock->getFrameWork("cmd.php?export-community-categories=yes");
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:57,代码来源:squid.categorize.php


注:本文中的mysql::CheckTable_dansguardian方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。