Exemplo n.º 1
0
         exit;
     }
 }
 $arcRow = GetOneArchive($aid);
 if (empty($arcRow['aid'])) {
     echo '<font color="red">无法查看未知文档的评论!</font>';
     exit;
 }
 if (isset($arcRow['notpost']) && $arcRow['notpost'] == 1) {
     echo '<font color="red">这篇文档禁止评论!</font>';
     exit;
 }
 if ($cfg_soft_lang != 'utf8') {
     $msg = UnicodeUrl2Gbk($msg);
     if (!empty($username)) {
         $username = UnicodeUrl2Gbk($username);
     }
 }
 //词汇过滤检查
 if ($cfg_notallowstr != '') {
     if (eregi($cfg_notallowstr, $msg)) {
         echo "<font color='red'>评论内容含有禁用词汇!</font>";
         exit;
     }
 }
 if ($cfg_replacestr != '') {
     $msg = eregi_replace($cfg_replacestr, '***', $msg);
 }
 if (empty($msg)) {
     echo "<font color='red'>评论内容可能不合法或为空!</font>";
     exit;
Exemplo n.º 2
0
<?php

require_once dirname(__FILE__) . "/config.php";
AjaxHead();
$myhtml = UnicodeUrl2Gbk(stripslashes($myhtml));
echo "<div class='coolbg61'>[<a href='#' onclick='javascript:HideObj(\"_myhtml\")'>关闭</a>]</div>\r\n";
preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\\/\\/(.*)\\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array);
$img_array = array_unique($img_array[2]);
echo "<div class='coolbg62'><xmp>";
echo "捕获的图片:\r\n";
print_r($img_array);
echo "</xmp></div>\r\n";