本文整理汇总了PHP中mysql_squid_builder::WebsiteStrip方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::WebsiteStrip方法的具体用法?PHP mysql_squid_builder::WebsiteStrip怎么用?PHP mysql_squid_builder::WebsiteStrip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql_squid_builder
的用法示例。
在下文中一共展示了mysql_squid_builder::WebsiteStrip方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WEBTESTS
function WEBTESTS(){
$www=$_REQUEST["WEBTESTS"];
$q=new mysql_squid_builder();
$www=$q->WebsiteStrip($www);
if($www==null){echo "corrupted\n";return;}
$catz=str_replace(",", "\n- ", $q->GET_CATEGORIES($www,true));
echo "\nFinal:\n\"".$q->GET_CATEGORIES($www,true)."\"\n";
}
示例2: test
function test()
{
$tpl = new templates();
$www = $_GET["test"];
$q = new mysql_squid_builder();
$www = $q->WebsiteStrip($www);
if ($www == null) {
echo "<p class=text-error>corrupted</p>";
return;
}
$catz = $q->GET_FULL_CATEGORIES($www);
if (trim($catz) == null) {
echo $tpl->_ENGINE_parse_body("<p class=text-error>{not_categorized}</p>");
return;
}
if (strpos(" {$catz}", ",") == 0) {
$CATEGORIES[] = $catz;
} else {
$CATEGORIES = explode(",", $catz);
}
$dans = new dansguardian_rules();
$cats = $dans->LoadBlackListes();
$html = "\n\t<div style='width:95%;margin-top:15px' class=form>\t\t\n\t<table style='width:99%'>\n\t\t<tr>\n\t\t\t\n\t\t\t<td style='vertical-align:top' colspan=2><div style='font-size:18px;font-weight:bolder;letter-spacing:2px'>\n\t\t\t«{$www}»</td>\t\t\n\t\t</tr>\t\t\n\t\t\t\n\t";
while (list($num, $categoryF) = each($CATEGORIES)) {
if (isset($ALREADY_PARSED[$categoryF])) {
continue;
}
$ALREADY_PARSED[$categoryF] = true;
$categoryF = trim($categoryF);
if (!isset($cats[$categoryF])) {
$cats[$categoryF] = null;
}
if ($cats[$categoryF] == null) {
$sql = "SELECT category_description FROM personal_categories WHERE category='{$categoryF}'";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql));
$content = $ligne["category_description"];
} else {
$content = $cats[$categoryF];
}
$pic = "<img src='img/20-categories-personnal.png'>";
if (isset($dans->array_pics[$categoryF])) {
$pic = "<img src='img/{$dans->array_pics[$categoryF]}'>";
}
$html = $html . "\n\t\t<tr>\n\t\t\t<td style='width:22px;vertical-align:top'>{$pic}</td>\n\t\t\t<td style='vertical-align:top'><div style='font-size:18px;font-weight:bolder;letter-spacing:2px'>«{$categoryF}»</td>\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<i style='font-size:16px;font-weight:normal'>{$content}</i>\n\t\t\t</td>\n\t\t</tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\t\n\t\t";
}
$html = $html . "</table></div>";
echo $html;
}
示例3: test_category_perform
function test_category_perform(){
$www=$_REQUEST["WEBTESTS"];
$tpl=new templates();
$q=new mysql_squid_builder();
$www=$q->WebsiteStrip($www);
if($www==null){
echo $tpl->_ENGINE_parse_body("<p class=text-error>{corrupted_request}: «{$_REQUEST["WEBTESTS"]}»</p>");
return;
}
$dans=new dansguardian_rules();
$dans->LoadBlackListes();
$catz=$q->GET_CATEGORIES($www,true);
if($catz==null){
echo $tpl->_ENGINE_parse_body("<p class=text-error>{unknown}: «{$_REQUEST["WEBTESTS"]}»</p>");
return;
}
if(strpos(" $catz", ",")>0){$CATs=explode(",", $catz);}else{$CATs[]=$catz;}
$sql="SELECT * FROM personal_categories";
if(!$q->TABLE_EXISTS("personal_categories")){json_error_show("personal_categories no such table!",1);}
$results=$q->QUERY_SQL($sql);
if(!$q->ok){json_error_show("Mysql Error [".__LINE__."]: $q->mysql_error",1);}
while($ligne=mysql_fetch_array($results,MYSQL_ASSOC)){$PERSONALSCATS[$ligne["category"]]=$ligne["category_description"];}
while (list ($num, $categoryname) = each ($CATs) ){
if(!isset($dans->array_blacksites[$categoryname])){
if(isset($dans->array_blacksites[str_replace("_","-",$categoryname)])){$categoryname=str_replace("_","-",$categoryname);}
if(isset($dans->array_blacksites[str_replace("_","/",$categoryname)])){$categoryname=str_replace("_","/",$categoryname);}
}
if($dans->array_pics[$categoryname]<>null){$pic="<img src='img/{$dans->array_pics[$categoryname]}'>";}else{$pic=" ";}
$text_category=$dans->array_blacksites[$categoryname];
if(isset($PERSONALSCATS[$categoryname])){
$text_category=utf8_encode($PERSONALSCATS[$categoryname]);
if($pic==" "){$pic="<img src='img/20-categories-personnal.png'>";}
}
$js="javascript:Loadjs('squid.categories.php?category=$categoryname&t=$t')";
$categoryText[]=$tpl->_ENGINE_parse_body("
<tr>
<td width=1% nowrap>$pic</td>
<td valign='top'>
<div style='font-size:18px';font-weight:bold'>
<a href=\"javascript:blur();\" OnClick=\"$js\" style='text-decoration:underline'>$categoryname</a>:</div>
<div style='font-size:16px;width:100%;font-weight:normal'>{$text_category}</div>
</td>
</tr>
");
}
$found=$tpl->_ENGINE_parse_body("{found}");
echo "<div style='width:95%:padding-left:50px;padding-top:20px' class=text-info><div style='font-size:18px'>$found</div><table>".@implode("\n", $categoryText)."</table></div>";
}
示例4: save
function save(){
$tpl=new templates();
$www=$_POST["www"];
$category=$_POST["category"];
$q=new mysql_squid_builder();
$sql="CREATE TABLE IF NOT EXISTS `catztickets` (
`sitename` varchar(128) NOT NULL,
`category` varchar(90) NOT NULL,
`zDate` datetime NOT NULL,
`zDate2` datetime NOT NULL,
`status` smallint(1) NOT NULL,
KEY `sitename` (`sitename`),
KEY `category` (`category`),
KEY `status` (`status`),
KEY `zDate` (`zDate`),
KEY `zDate2` (`zDate2`)
) ENGINE=MYISAM;";
$q->QUERY_SQL($sql);
$TR=explode("\n",$www);
while (list ($none, $ww) = each ($TR) ){
$www=$q->WebsiteStrip($ww);
if($www==null){continue;}
$date=date("Y-m-d H:i:s");
$q->QUERY_SQL("INSERT INTO catztickets (sitename,zDate,status,category,zDate2) VALUES ('$www','$date','0','$category','$date')");
$z[]=$www;
if(!$q->ok){echo $q->mysql_error;return;}
}
if(count($z)>0){
echo $tpl->javascript_parse_text("{succes}")."\n".@implode("\n", $z);
$sock=new sockets();
$sock->getFrameWork("squid.php?export-category-tickets=yes");
}
}