本文整理汇总了PHP中convert_unicode函数的典型用法代码示例。如果您正苦于以下问题:PHP convert_unicode函数的具体用法?PHP convert_unicode怎么用?PHP convert_unicode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_unicode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: msg
if (!$tag) {
msg("error", $lang['index_denied'], $lang['links_err'], "?mod=links");
}
$db->query("INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('" . $db->safesql($member_id['name']) . "', '{$_TIME}', '{$_IP}', '93', '{$tag}')");
$db->query("INSERT INTO " . PREFIX . "_links (word, link, only_one) values ('{$tag}', '{$url}', '{$onlyone}')");
@unlink(ENGINE_DIR . '/cache/system/links.php');
clear_cache();
header("Location: ?mod=links");
die;
}
if ($_GET['action'] == "edit") {
if ($_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash) {
die("Hacking attempt! User not found");
}
$tag = convert_unicode(urldecode($_GET['tag']), $config['charset']);
$url = convert_unicode(urldecode($_GET['url']), $config['charset']);
$onlyone = intval($_GET['onlyone']);
$tag = @$db->safesql(htmlspecialchars(strip_tags(stripslashes(trim($tag))), ENT_COMPAT, $config['charset']));
$url = @$db->safesql(htmlspecialchars(strip_tags(stripslashes(trim($url))), ENT_QUOTES, $config['charset']));
$url = str_ireplace("document.cookie", "document.cookie", $url);
$url = preg_replace("/javascript:/i", "javascript:", $url);
$url = preg_replace("/data:/i", "data:", $url);
$id = intval($_GET['id']);
if (!$tag) {
msg("error", $lang['index_denied'], $lang['links_err'], "?mod=links&start_from={$start_from}");
}
$db->query("INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('" . $db->safesql($member_id['name']) . "', '{$_TIME}', '{$_IP}', '94', '{$tag}')");
$db->query("UPDATE " . PREFIX . "_links SET word='{$tag}', link='{$url}', only_one='{$onlyone}' WHERE id='{$id}'");
@unlink(ENGINE_DIR . '/cache/system/links.php');
clear_cache();
header("Location: ?mod=links&start_from={$start_from}");
示例2: count
// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
// Make the week scale font smaller than the default
if (isset($gantt_title_font_family)) {
$graph->scale->week->SetFont(constant($gantt_title_font_family), FS_NORMAL, 9);
$graph->scale->month->SetFont(constant($gantt_title_font_family), FS_NORMAL, 9);
}
// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$rows = count($pt_arr);
for ($i = 0; $i < $rows; $i++) {
// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity[$i] = new GanttBar($i, convert_unicode($pt_arr[$i]->getSummary()), date('Y-m-d', $pt_arr[$i]->getStartDate()), date('Y-m-d', $pt_arr[$i]->getEndDate() - 86400));
// Yellow diagonal line pattern on a red background
$activity[$i]->SetPattern(BAND_RDIAG, "yellow");
$activity[$i]->SetFillColor("red");
$activity[$i]->progress->Set($pt_arr[$i]->getPercentComplete() ? $pt_arr[$i]->getPercentComplete() / 100 : 0);
$activity[$i]->progress->SetPattern(BAND_RDIAG, "blue");
if (isset($gantt_task_font_family)) {
$activity[$i]->title->SetFont(constant($gantt_task_font_family), constant($gantt_task_font_style), $gantt_task_font_size);
}
// Finally add the bar to the graph
$graph->Add($activity[$i]);
}
//echo $rows;
$todayline = new GanttVLine(date('Y-m-d', time()), "Today");
$todayline->SetDayOffset(0.5);
$graph->Add($todayline);
示例3: array
$newpostedxfields = array();
$filecontents = array();
foreach ($category as $cats_explode) {
foreach ($xfields as $name => $value) {
if ($value[2] != "" and !in_array($cats_explode, explode(",", $value[2]))) {
continue;
}
if ($value[5] == 0 and $postedxfields[$value[0]] == "") {
if ($add_module == "yes") {
$stop .= $lang['xfield_xerr1'];
} else {
msg("error", "error", "{$lang['xfield_xerr1']}<br /><a href=\"javascript:history.go(-1)\">{$lang['func_msg']}</a>");
}
}
if ($ajax_edit == "yes") {
$postedxfields[$value[0]] = convert_unicode($postedxfields[$value[0]], $config['charset']);
}
if ($value[3] == "select") {
$options = explode("\r\n", $value[4]);
$postedxfields[$value[0]] = $options[$_POST['xfield'][$value[0]]];
}
if (($value[3] == "text" or $value[3] == "select") and $postedxfields[$value[0]] != "") {
$newpostedxfields[$value[0]] = trim(htmlspecialchars(strip_tags(stripslashes($postedxfields[$value[0]])), ENT_QUOTES));
} elseif ($postedxfields[$value[0]] != "") {
if ($add_module == "yes") {
if ($config['allow_site_wysiwyg'] == "yes" or $allow_br != '1') {
$newpostedxfields[$value[0]] = $parse->BB_Parse($parse->process($postedxfields[$value[0]]));
} else {
$newpostedxfields[$value[0]] = $parse->BB_Parse($parse->process($postedxfields[$value[0]]), false);
}
} else {
示例4: die
die("error");
}
if ($config['allow_comments_wysiwyg']) {
$parse->wysiwyg = true;
$use_html = true;
$parse->ParseFilter(array('div', 'span', 'p', 'br', 'strong', 'em', 'ul', 'li', 'ol', 'b', 'u', 'i', 's'), array(), 0, 1);
if ($user_group[$member_id['user_group']]['allow_url']) {
$parse->tagsArray[] = 'a';
}
if ($user_group[$member_id['user_group']]['allow_image']) {
$parse->tagsArray[] = 'img';
}
} else {
$use_html = false;
}
$comm_txt = trim($parse->BB_Parse($parse->process(convert_unicode($_POST['comm_txt'], $config['charset'])), $use_html));
if ($parse->not_allowed_tags) {
die("error");
}
if ($parse->not_allowed_text) {
die("error");
}
if (dle_strlen($comm_txt, $config['charset']) > $config['comments_maxlen']) {
die("error");
}
if ($comm_txt == "") {
die("error");
}
if (intval($config['comments_minlen']) and dle_strlen($comm_txt, $config['charset']) < $config['comments_minlen']) {
die("error");
}
示例5: get_vars
}
//################# Определение групп пользователей
$user_group = get_vars("usergroup");
if (!$user_group) {
$user_group = array();
$db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
while ($row = $db->get_row()) {
$user_group[$row['id']] = array();
foreach ($row as $key => $value) {
$user_group[$row['id']][$key] = stripslashes($value);
}
}
set_vars("usergroup", $user_group);
$db->free();
}
$txt = trim(convert_unicode($_POST['txt'], $config['charset']));
if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
$txt = stripslashes($txt);
}
require_once ENGINE_DIR . '/classes/typograf.class.php';
if ($config['charset'] == "windows-1251") {
$typo = new typographus();
} else {
$typo = new typographus($config['charset']);
}
$txt = $typo->process($txt);
$find = array('/data:/i', '/about:/i', '/vbscript:/i', '/onclick/i', '/onload/i', '/onunload/i', '/onabort/i', '/onerror/i', '/onblur/i', '/onchange/i', '/onfocus/i', '/onreset/i', '/onsubmit/i', '/ondblclick/i', '/onkeydown/i', '/onkeypress/i', '/onkeyup/i', '/onmousedown/i', '/onmouseup/i', '/onmouseover/i', '/onmouseout/i', '/onselect/i', '/javascript/i', '/onmouseenter/i', '/onwheel/i', '/onshow/i');
$replace = array("data:", "about:", "vbscript<b></b>:", "onclick", "onload", "onunload", "onabort", "onerror", "onblur", "onchange", "onfocus", "onreset", "onsubmit", "ondblclick", "onkeydown", "onkeypress", "onkeyup", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onselect", "javascript", 'onmouseenter', 'onwheel', 'onshow');
$txt = preg_replace($find, $replace, $txt);
$txt = preg_replace("#<iframe#i", "<iframe", $txt);
$txt = preg_replace("#<script#i", "<script", $txt);
示例6: clear_cache
@unlink(ENGINE_DIR . '/cache/system/' . $file);
}
}
clear_cache();
$buffer = "<font color=\"green\">" . $lang['clear_cache'] . "</font>";
}
if ($_REQUEST['action'] == "clearsubscribe") {
if ($member_id['user_group'] != 1) {
die("error");
}
$db->query("TRUNCATE TABLE " . PREFIX . "_subscribe");
$buffer = "<font color=\"green\">" . $lang['clear_subscribe'] . "</font>";
}
if ($_REQUEST['action'] == "sendnotice") {
$row = $db->super_query("SELECT id FROM " . PREFIX . "_notice WHERE user_id = '{$member_id['user_id']}'");
$notice = $db->safesql(convert_unicode($_POST['notice'], $config['charset']));
if ($row['id']) {
$db->query("UPDATE " . PREFIX . "_notice SET notice='{$notice}' WHERE user_id = '{$member_id['user_id']}'");
} else {
$db->query("INSERT INTO " . PREFIX . "_notice (user_id, notice) values ('{$member_id['user_id']}', '{$notice}')");
}
$buffer = "<font color=\"green\">" . $lang['saved'] . "</font>";
}
if ($_REQUEST['action'] == "deletemodules") {
if ($member_id['user_group'] != 1) {
die("error");
}
$id = intval($_REQUEST['id']);
if ($id) {
$db->query("DELETE FROM " . PREFIX . "_admin_sections WHERE id = '{$id}'");
$buffer = 'ok';
示例7: strip_tags
$_POST['news_txt'] = strip_tags($_POST['news_txt']);
$_POST['full_txt'] = strip_tags($_POST['full_txt']);
}
$news_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['news_txt']), $use_html));
$full_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['full_txt']), $use_html));
if ($config['safe_xfield']) {
$parse->ParseFilter();
$parse->safe_mode = true;
}
$add_module = "yes";
$ajax_edit = "yes";
$stop = "";
$category = $cat_list;
$xfieldsaction = "init";
include ENGINE_DIR . '/inc/xfields.php';
$editreason = $db->safesql(htmlspecialchars(strip_tags(stripslashes(trim(convert_unicode($_POST['reason'], $config['charset'])))), ENT_QUOTES));
if ($editreason != "") {
$view_edit = 1;
} else {
$view_edit = 0;
}
$added_time = time() + $config['date_adjust'] * 60;
if (!trim($_POST['title'])) {
die($lang['add_err_7']);
}
if ($parse->not_allowed_text) {
die($lang['news_err_39']);
}
$db->query("UPDATE " . PREFIX . "_post SET title='{$_POST['title']}', short_story='{$news_txt}', full_story='{$full_txt}', xfields='{$filecontents}', approve='{$approve}', allow_br='{$allow_br}' WHERE id = '{$id}'");
$db->query("UPDATE " . PREFIX . "_post_extras SET editdate='{$added_time}', editor='{$member_id['name']}', reason='{$editreason}', view_edit='{$view_edit}' WHERE news_id = '{$id}'");
if ($user_group[$member_id['user_group']]['allow_admin']) {
示例8: get_vars
// Определение категорий и их параметры
//####################################################################################################################
$cat_info = get_vars("category");
if (!is_array($cat_info)) {
$cat_info = array();
$db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC");
while ($row = $db->get_row()) {
$cat_info[$row['id']] = array();
foreach ($row as $key => $value) {
$cat_info[$row['id']][$key] = stripslashes($value);
}
}
set_vars("category", $cat_info);
$db->free();
}
$title = $db->safesql(trim(convert_unicode($_POST['title'], $config['charset'])));
if ($title == "") {
die;
}
$buffer = "";
$id = intval($_POST['id']);
if ($id) {
$where = " AND id != '" . $id . "'";
} else {
$where = "";
}
$db->query("SELECT id, title, date, category, alt_name, MATCH (title, short_story, full_story, xfields) AGAINST ('{$title}') as score FROM " . PREFIX . "_post WHERE MATCH (title, short_story, full_story, xfields) AGAINST ('{$title}') AND approve='1'" . $where . " ORDER BY score DESC, date DESC LIMIT 5");
while ($related = $db->get_row()) {
$related['date'] = strtotime($related['date']);
$related['category'] = intval($related['category']);
$news_date = date('d-m-Y', $related['date']);
示例9: array
$empfanger = array();
$temp = explode(",", $_POST['empfanger']);
foreach ($temp as $value) {
$empfanger[] = intval($value);
}
$empfanger = implode("','", $empfanger);
$empfanger = "user_group IN ('" . $empfanger . "')";
} else {
$empfanger = false;
}
$type = $_POST['type'];
$a_mail = intval($_POST['a_mail']);
$limit = intval($_POST['limit']);
$step = 0;
$title = convert_unicode($_POST['title'], $config['charset']);
$message = convert_unicode($_POST['message'], $config['charset']);
$find = array('/data:/i', '/about:/i', '/vbscript:/i', '/onclick/i', '/onload/i', '/onunload/i', '/onabort/i', '/onerror/i', '/onblur/i', '/onchange/i', '/onfocus/i', '/onreset/i', '/onsubmit/i', '/ondblclick/i', '/onkeydown/i', '/onkeypress/i', '/onkeyup/i', '/onmousedown/i', '/onmouseup/i', '/onmouseover/i', '/onmouseout/i', '/onselect/i', '/javascript/i', '/onmouseenter/i', '/onwheel/i', '/onshow/i');
$replace = array("data:", "about:", "vbscript<b></b>:", "onclick", "onload", "onunload", "onabort", "onerror", "onblur", "onchange", "onfocus", "onreset", "onsubmit", "ondblclick", "onkeydown", "onkeypress", "onkeyup", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onselect", "javascript", 'onmouseenter', 'onwheel', 'onshow');
$message = preg_replace($find, $replace, $message);
$message = preg_replace("#<iframe#i", "<iframe", $message);
$message = preg_replace("#<script#i", "<script", $message);
$message = str_replace("<?", "<?", $message);
$message = str_replace("?>", "?>", $message);
$title = preg_replace($find, $replace, $title);
$title = preg_replace("#<iframe#i", "<iframe", $title);
$title = preg_replace("#<script#i", "<script", $title);
$title = str_replace("<", "<", $title);
$title = str_replace(">", ">", $title);
if (!$title or !$message or !$limit) {
die("error");
}
示例10: stop
if (defined('ALLOW_users_search') && ALLOW_users_search == true) {
require_once ENGINE_DIR . '/modules/users/search.php';
} else {
stop();
}
break;
case 'searchstudent':
$thispage .= ": Поиск";
if (defined('ALLOW_users_search') && ALLOW_students_search == true) {
require_once ENGINE_DIR . '/modules/users/search.student.form.php';
} else {
stop();
}
break;
case 'searchstudentpost':
$thispage .= ": Поиск " . convert_unicode($_POST['data']);
if (defined('ALLOW_users_search') && ALLOW_students_search == true) {
require_once ENGINE_DIR . '/modules/users/search.student.php';
} else {
stop();
}
break;
case 'students':
if (defined('ALLOW_students_search') && ALLOW_students_list == true) {
require_once ENGINE_DIR . '/modules/users/list_students.php';
} else {
stop();
}
break;
case 'searchcosmos':
if (defined('ALLOW_cosmos_search') && ALLOW_cosmos_search == true) {
示例11: my_unescape
function my_unescape($ar)
{
if (is_array($ar)) {
foreach ($ar as $i => $v) {
$ar[$i] = my_unescape($v);
}
} else {
$ar = convert_unicode($ar);
}
return $ar;
}
示例12: LinePlot
//$graph->SetScale( "linlog");
//$graph ->SetYScale("log");
if ($area == 'tracker') {
// Create the tracker open plot
$ydata =& $report->getTrackerOpened();
$lineplot = new LinePlot($ydata);
$lineplot->SetColor("black");
$graph->Add($lineplot);
// Create the tracker close plot
$ydata2 =& $report->getTrackerClosed();
$lineplot2 = new LinePlot($ydata2);
$lineplot2->SetColor("blue");
$graph->Add($lineplot2);
// Legends
$lineplot->SetLegend(convert_unicode(_('Tracker Items Opened')));
$lineplot2->SetLegend(convert_unicode(_('Tracker Items Closed')));
} elseif ($area == 'forum') {
// Create the forum plot
$ydata3 =& $report->getForum();
$lineplot3 = new LinePlot($ydata3);
$lineplot3->SetColor("orange");
$graph->Add($lineplot3);
// Legends
$lineplot3->SetLegend("Forum");
} elseif ($area == 'docman') {
// Create the Docman plot
$ydata4 =& $report->getDocs();
$lineplot4 = new LinePlot($ydata4);
$lineplot4->SetColor("red");
$graph->Add($lineplot4);
// Legends
示例13: int
return;
}
$db->super_query("CREATE TABLE IF NOT EXISTS `" . USERPREFIX . "_ulogin` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `user_id` int(10) unsigned NOT NULL,\n `ident` char(255) NOT NULL,\n `email` char(255) DEFAULT NULL,\n `seed` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=MyISAM;");
$ulogin_id = $db->super_query("SELECT user_id,seed FROM " . USERPREFIX . "_ulogin where ident='" . $db->safesql($user['identity']) . "'");
$member_id = FALSE;
if ($ulogin_id) {
$password = md5($user['identity'] . $ulogin_id['seed']);
$member_id = $db->super_query("SELECT user_id FROM " . USERPREFIX . "_users where user_id=" . $ulogin_id['user_id']);
}
if ($member_id) {
login_ulogin_user($member_id['user_id'], $password);
} else {
$fullname = $config['charset'] != 'utf-8' ? convert_unicode($user['first_name'] . ' ' . $user['last_name'], $config['charset']) : $user['first_name'] . ' ' . $user['last_name'];
$fullname = $db->safesql($parse->process($fullname));
$login = isset($user['nickname']) ? $user['nickname'] : $user['first_name'];
$login = $config['charset'] != 'utf-8' ? convert_unicode($login) : $login;
$login = $db->safesql($parse->process(htmlspecialchars(trim($login))));
$login = preg_replace('#\\s+#i', ' ', $login);
$not_allow_symbol = array("\"", "`", "\t", '\\n', '\\r', "\n", "\r", '\\', ",", "/", "¬", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "\$", "<", ">", "?", "!", '"', "'", " ");
$email = $user['email'];
$email = $db->safesql(trim(str_replace($not_allow_symbol, '', strip_tags(stripslashes($email)))));
if (isset($user['photo'])) {
$photo = $user['photo'];
} else {
$photo = "";
}
$idx = 0;
$email_parts = explode('@', $email);
$test_login = $login;
while ($reg_error = check_ulogin_register($test_login, $email)) {
$idx++;
示例14: convert_unicode
$name = $member_id['name'];
$email = $member_id['email'];
} else {
$_POST['name'] = convert_unicode($_POST['name'], $config['charset']);
$_POST['email'] = convert_unicode($_POST['email'], $config['charset']);
$name = $db->safesql(strip_tags($_POST['name']));
$not_allow_symbol = array("\"", "`", "\t", '\\n', '\\r', "\n", "\r", '\\', ",", "/", "¬", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "\$", "<", ">", "?", "!", '"', "'");
$email = $db->safesql(trim(str_replace($not_allow_symbol, '', strip_tags(stripslashes($_POST['email'])))));
$db->query("SELECT name FROM " . USERPREFIX . "_users WHERE name = '" . $name . "' OR email = '" . $email . "'");
if ($db->num_rows() > 0) {
$stop = $lang['news_err_7'];
}
$name = strip_tags(stripslashes($_POST['name']));
}
$subject = trim(strip_tags(stripslashes(convert_unicode($_POST['subject'], $config['charset']))));
$message = trim(stripslashes(convert_unicode($_POST['message'], $config['charset'])));
$recip = intval($_POST['recip']);
if (!$user_group[$member_id['user_group']]['allow_feed']) {
$recipient = $db->super_query("SELECT name, email, fullname FROM " . USERPREFIX . "_users WHERE user_id='" . $recip . "' AND user_group = '1'");
} else {
$recipient = $db->super_query("SELECT name, email, fullname FROM " . USERPREFIX . "_users WHERE user_id='" . $recip . "' AND allow_mail = '1'");
}
if (!$recipient['fullname']) {
$recipient['fullname'] = $recipient['name'];
}
if (!$recipient['name']) {
$stop .= $lang['feed_err_8'];
}
if ($user_group[$member_id['user_group']]['max_mail_day']) {
$this_time = time() + $config['date_adjust'] * 60 - 86400;
$db->query("DELETE FROM " . PREFIX . "_sendlog WHERE date < '{$this_time}' AND flag='2'");
示例15: get_vars
}
$banned_info = get_vars("banned");
if (!is_array($banned_info)) {
$banned_info = array();
$db->query("SELECT * FROM " . USERPREFIX . "_banned");
while ($row = $db->get_row()) {
if ($row['users_id']) {
$banned_info['users_id'][$row['users_id']] = array('users_id' => $row['users_id'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
} else {
if (count(explode(".", $row['ip'])) == 4) {
$banned_info['ip'][$row['ip']] = array('ip' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
} elseif (strpos($row['ip'], "@") !== false) {
$banned_info['email'][$row['ip']] = array('email' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
} else {
$banned_info['name'][$row['ip']] = array('name' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
}
}
}
set_vars("banned", $banned_info);
$db->free();
}
$name = $db->safesql(trim(htmlspecialchars($parse->process(convert_unicode($_POST['name'], $config['charset'])), ENT_QUOTES, $config['charset'])));
$name = preg_replace('#\\s+#i', ' ', $name);
$allow = check_name($name);
if (!$allow) {
$buffer = "<font color=\"green\">" . $lang['reg_ok_ajax'] . "</font>";
} else {
$buffer = "<font color=\"red\">" . $allow . "</font>";
}
@header("Content-type: text/html; charset=" . $config['charset']);
echo $buffer;