本文整理汇总了PHP中ParseFilter::clear_url方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseFilter::clear_url方法的具体用法?PHP ParseFilter::clear_url怎么用?PHP ParseFilter::clear_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParseFilter
的用法示例。
在下文中一共展示了ParseFilter::clear_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_thumb
protected function build_thumb($gurl = "", $url = "", $align = "")
{
$this->_init_parse();
$url = trim($url);
$gurl = trim($gurl);
$option = explode("|", trim($align));
$align = $option[0];
if ($align != "left" and $align != "right") {
$align = '';
}
$url = $this->_parse->clear_url(urldecode($url));
$gurl = $this->_parse->clear_url(urldecode($gurl));
if ($gurl == "" or $url == "") {
return;
}
if ($align != '') {
return "[{$align}][url=\"{$gurl}\"][img]{$url}[/img][/url][/{$align}]";
} else {
return "[url=\"{$gurl}\"][img]{$url}[/img][/url]";
}
}
示例2: values
if ($db->num_rows()) {
echo $lang['error_complaint_1'];
die;
}
$text = $db->safesql($text);
$db->query("INSERT INTO " . PREFIX . "_complaint (`p_id`, `c_id`, `n_id`, `text`, `from`, `to`, `date`) values ('0', '0', '{$row['id']}', '{$text}', '{$member_id['name']}', '', '{$_TIME}')");
if ($config['allow_complaint_mail']) {
$mail->send($config['admin_mail'], $lang['mail_complaint'], $lang['mail_complaint_1']);
}
} elseif ($_POST['action'] == "orfo") {
if (!$text) {
die("error");
}
$seltext = convert_unicode($_POST['seltext'], $config['charset']);
$seltext = htmlspecialchars($parse->process(trim($seltext)), ENT_QUOTES, $config['charset']);
$url = $db->safesql(htmlspecialchars($parse->clear_url(trim($_POST['url'])), ENT_QUOTES, $config['charset']));
if (!$seltext) {
die("error");
}
if (!$is_logged) {
$author = $_IP;
} else {
$author = $db->safesql($member_id['name']);
}
$row = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_complaint WHERE p_id='0' AND c_id='0' AND n_id='0' AND `from`='{$author}'");
if ($row['count'] > 2) {
echo $lang['error_complaint_1'];
die;
}
$seltext = "<div class=\"quote\">" . stripslashes($seltext) . "</div>";
$text = $db->safesql($seltext . $text);