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]"; } }
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);