本文整理汇总了PHP中charset函数的典型用法代码示例。如果您正苦于以下问题:PHP charset函数的具体用法?PHP charset怎么用?PHP charset使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了charset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: where
/** Create SQL condition from parsed query string
* @param array parsed query string
* @param array
* @return string
*/
function where($where, $fields = array())
{
global $connection, $jush;
$return = array();
foreach ((array) $where["where"] as $key => $val) {
$key = bracket_escape($key, 1);
// 1 - back
$column = escape_key($key);
$return[] = $column . ($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val) || $jush == "mssql" ? " LIKE " . q(addcslashes($val, "%_\\")) : " = " . unconvert_field($fields[$key], q($val)));
//! enum and set
if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) {
// not just [a-z] to catch non-ASCII characters
$return[] = "{$column} = " . q($val) . " COLLATE " . charset($connection) . "_bin";
}
}
foreach ((array) $where["null"] as $key) {
$return[] = escape_key($key) . " IS NULL";
}
return implode(" AND ", $return);
}
示例2: selectSearchProcess
/** Process search box in select
* @param array
* @param array
* @return array expressions to join by AND
*/
function selectSearchProcess($fields, $indexes)
{
global $connection, $jush;
$return = array();
foreach ($indexes as $i => $index) {
if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
$return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
}
}
foreach ((array) $_GET["where"] as $val) {
if ("{$val['col']}{$val['val']}" != "" && in_array($val["op"], $this->operators)) {
$cond = " {$val['op']}";
if (preg_match('~IN$~', $val["op"])) {
$in = process_length($val["val"]);
$cond .= " " . ($in != "" ? $in : "(NULL)");
} elseif ($val["op"] == "SQL") {
$cond = " {$val['val']}";
// SQL injection
} elseif ($val["op"] == "LIKE %%") {
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%{$val['val']}%");
} elseif ($val["op"] == "ILIKE %%") {
$cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%{$val['val']}%");
} elseif (!preg_match('~NULL$~', $val["op"])) {
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
}
if ($val["col"] != "") {
$return[] = idf_escape($val["col"]) . $cond;
} else {
// find anywhere
$cols = array();
foreach ($fields as $name => $field) {
$is_text = preg_match('~char|text|enum|set~', $field["type"]);
if ((is_numeric($val["val"]) || !preg_match('~(^|[^o])int|float|double|decimal|bit~', $field["type"])) && (!preg_match("~[€-ÿ]~", $val["val"]) || $is_text)) {
$name = idf_escape($name);
$cols[] = $jush == "sql" && $is_text && !preg_match("~^utf8_~", $field["collation"]) ? "CONVERT({$name} USING " . charset($connection) . ")" : $name;
}
}
$return[] = $cols ? "(" . implode("{$cond} OR ", $cols) . "{$cond})" : "0";
}
}
}
return $return;
}
示例3: format_comment_no_bbcode
function format_comment_no_bbcode($text, $strip_html = true)
{
global $INSTALLER09;
$s = $text;
if ($strip_html) {
//$s = htmlsafechars($s);
$s = htmlsafechars($s, ENT_QUOTES, charset());
}
// BBCode to find...
//=== basically will change this into a sort of strip tags but of bbcode shor of the code tag
$bb_code_in = array('/\\[b\\]\\s*((\\s|.)+?)\\s*\\[\\/b\\]/i', '/\\[i\\]\\s*((\\s|.)+?)\\s*\\[\\/i\\]/i', '/\\[u\\]\\s*((\\s|.)+?)\\s*\\[\\/u\\]/i', '#\\[img\\](.+?)\\[/img\\]#ie', '#\\[img=(.+?)\\]#ie', '/\\[email\\](.*?)\\[\\/email\\]/i', '/\\[align=([a-zA-Z]+)\\]((\\s|.)+?)\\[\\/align\\]/i', '/\\[blockquote\\]\\s*((\\s|.)+?)\\s*\\[\\/blockquote\\]/i', '/\\[strike\\]\\s*((\\s|.)+?)\\s*\\[\\/strike\\]/i', '/\\[s\\]\\s*((\\s|.)+?)\\s*\\[\\/s\\]/i', '/\\[pre\\]\\s*((\\s|.)+?)\\s*\\[\\/pre\\]/i', '/\\[marquee\\](.*?)\\[\\/marquee\\]/i', '/\\[url\\="?(.*?)"?\\]\\s*((\\s|.)+?)\\s*\\[\\/url\\]/i', '/\\[url\\]\\s*((\\s|.)+?)\\s*\\[\\/url\\]/i', '/\\[collapse=(.*?)\\]\\s*((\\s|.)+?)\\s*\\[\\/collapse\\]/i', '/\\[size=([1-7])\\]\\s*((\\s|.)+?)\\s*\\[\\/size\\]/i', '/\\[color=([a-zA-Z]+)\\]\\s*((\\s|.)+?)\\s*\\[\\/color\\]/i', '/\\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\\]\\s*((\\s|.)+?)\\s*\\[\\/color\\]/i', '/\\[font=([a-zA-Z ,]+)\\]((\\s|.)+?)\\[\\/font\\]/i', '/\\[quote\\]\\s*((\\s|.)+?)\\s*\\[\\/quote\\]\\s*/i', '/\\[quote=(.+?)\\]\\s*((\\s|.)+?)\\s*\\[\\/quote\\]\\s*/i', '/\\[spoiler\\]\\s*((\\s|.)+?)\\s*\\[\\/spoiler\\]\\s*/i', '/\\[video=[^\\s\'"<>]*youtube.com.*v=([^\\s\'"<>]+)\\]/ims', "/\\[video=[^\\s'\"<>]*video.google.com.*docid=(-?[0-9]+).*\\]/ims", '/\\[audio\\](http:\\/\\/[^\\s\'"<>]+(\\.(mp3|aiff|wav)))\\[\\/audio\\]/i', '/\\[list=([0-9]+)\\]((\\s|.)+?)\\[\\/list\\]/i', '/\\[list\\]((\\s|.)+?)\\[\\/list\\]/i', '/\\[\\*\\]\\s?(.*?)\\n/i', '/\\[hr\\]\\s?(.*?)\\n/i');
// And replace them by...
$bb_code_out = array('\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\2', '\\2', '\\2', '\\2', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1', '\\1');
$s = preg_replace($bb_code_in, $bb_code_out, $s);
// Linebreaks
$s = nl2br($s);
// Maintain spacing
$s = str_replace(' ', ' ', $s);
return $s;
}
示例4: set_utf8mb4
/** Print SET NAMES if utf8mb4 might be needed
* @param string
* @return null
*/
function set_utf8mb4($create)
{
global $connection;
static $set = false;
if (!$set && preg_match('~\\butf8mb4~i', $create)) {
// possible false positive
$set = true;
echo "SET NAMES " . charset($connection) . ";\n\n";
}
}
示例5: unique_array
$unique_array = unique_array($rows[$n], $indexes);
if (!$unique_array) {
$unique_array = array();
foreach ($rows[$n] as $key => $val) {
if (!preg_match('~^(COUNT\\((\\*|(DISTINCT )?`(?:[^`]|``)+`)\\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\\(`(?:[^`]|``)+`\\))$~', $key)) {
//! columns looking like functions
$unique_array[$key] = $val;
}
}
}
$unique_idf = "";
foreach ($unique_array as $key => $val) {
if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) {
$key = strpos($key, '(') ? $key : idf_escape($key);
//! columns looking like functions
$key = "MD5(" . ($jush == 'sql' && preg_match("~^utf8_~", $fields[$key]["collation"]) ? $key : "CONVERT({$key} USING " . charset($connection) . ")") . ")";
$val = md5($val);
}
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
}
echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>" . adminer_checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "'>" . lang('edit') . "</a>"));
foreach ($row as $key => $val) {
if (isset($names[$key])) {
$field = $fields[$key];
if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) {
$email_fields[$key] = is_adminer_mail($val) ? $names[$key] : "";
//! filled e-mails can be contained on other pages
}
$link = "";
if (preg_match('~blob|bytea|raw|file~', $field["type"]) && $val != "") {
$link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf;
示例6: charset
<tr>
<td>db-User Name</td>
<td colspan="2"><input type="text" name="ERPuser" size="15" value="<?= $ERPuser ?>"></td>
<td><input type="text" name="SHOPuser" size="15" value="<?= $SHOPuser ?>"></td>
</tr>
<tr>
<td>db-User PWD</td>
<td colspan="2"><input type="text" name="ERPpass" size="15" value="<?= $ERPpass ?>"></td>
<td><input type="text" name="SHOPpass" size="15" value="<?= $SHOPpass ?>"></td>
</tr>
<tr>
<td>User-ID</td>
<td colspan="2"><input type="text" name="ERPusrN" size="10" value="<?= $ERPusr["Name"] ?>">
<input type="checkbox" name="a1" <?= (empty($ERPusr["ID"])?"":"checked") ?> onFocus="blur();"> Charset Shop:</td>
<td><select name="SHOPchar">
<? charset($SHOPchar); ?>
</select></td>
</tr>
<tr>
<td>CSV-Dir</td>
<td colspan="2"><input type="text" name="ERPdir" size="30" value="<?= $ERPdir ?>"></td>
<td><input type="text" name="SHOPdir" size="30" value="<?= $SHOPdir ?>"></td>
</tr>
<tr>
<td>Image-Dir</td>
<td colspan="2"><input type="text" name="ERPimgdir" size="30" value="<?= $ERPimgdir ?>"></td>
<td><input type="text" name="SHOPimgdir" size="30" value="<?= $SHOPimgdir ?>"></td>
</tr>
<tr>
<td>FTP-Host</td>
<td colspan="2"><input type="text" name="ERPftphost" size="20" value="<?= $ERPftphost ?>"></td>
示例7: foreach
<?php
$TABLE = $_GET["dump"];
if ($_POST && !$error) {
$cookie = "";
foreach (array("output", "format", "db_style", "routines", "events", "table_style", "auto_increment", "triggers", "data_style") as $key) {
$cookie .= "&{$key}=" . urlencode($_POST[$key]);
}
cookie("adminer_export", substr($cookie, 1));
$tables = array_flip((array) $_POST["tables"]) + array_flip((array) $_POST["data"]);
$ext = dump_headers(count($tables) == 1 ? key($tables) : DB, DB == "" || count($tables) > 1);
$is_sql = preg_match('~sql~', $_POST["format"]);
if ($is_sql) {
echo "-- Adminer {$VERSION} " . $drivers[DRIVER] . " dump\n\n";
if ($jush == "sql") {
echo "SET NAMES " . charset($connection) . ";\nSET time_zone = '+00:00';\n" . ($_POST["data_style"] ? "SET foreign_key_checks = 0;\nSET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';\n" : "") . "\n";
$connection->query("SET time_zone = '+00:00';");
}
}
$style = $_POST["db_style"];
$databases = array(DB);
if (DB == "") {
$databases = $_POST["databases"];
if (is_string($databases)) {
$databases = explode("\n", rtrim(str_replace("\r", "", $databases), "\n"));
}
}
foreach ((array) $databases as $db) {
$adminer->dumpDatabase($db);
if ($connection->select_db($db)) {
if ($is_sql && preg_match('~CREATE~', $style) && ($create = $connection->result("SHOW CREATE DATABASE " . idf_escape($db), 1))) {
示例8: connect
/** Connect to the database
* @return mixed Min_DB or string for error
*/
function connect()
{
global $adminer;
$connection = new Min_DB();
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->set_charset(charset($connection));
// available in MySQLi since PHP 5.0.5
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
return $connection;
}
$return = $connection->error;
if (function_exists('iconv') && !is_utf8($return) && strlen($s = iconv("windows-1250", "utf-8", $return)) > strlen($return)) {
// windows-1250 - most common Windows encoding
$return = $s;
}
return $return;
}
示例9: e
<!DOCTYPE html>
<!-- saved from url=(0040)http://getbootstrap.com/examples/signin/ -->
<html lang="<?php
e(locale());
?>
">
<head>
<meta charset="<?php
e(charset());
?>
">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="">
<title><?php
e(trans('messages.auth.reset'));
?>
</title>
<!-- Bootstrap core CSS -->
<link href="<?php
e(component('bootstrap/dist/css/bootstrap.min.css'));
?>
" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="<?php
示例10: dbconn
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+------------------------------------------------
| $Memcached shoutbox
| $Author$ Bigjoos, pdq, putyn, snuggs
+------------------------------------------------
*/
require_once __DIR__ . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php';
require_once INCL_DIR . 'user_functions.php';
require_once INCL_DIR . 'bbcode_functions.php';
require_once CLASS_DIR . 'class_check.php';
require_once CLASS_DIR . 'class_user_options_2.php';
dbconn(false);
loggedinorreturn();
class_check(UC_STAFF);
$HTMLOUT = $query = $dellall = $dtcolor = $fontcolor = $bg = $pm = $reply = '';
header('Content-Type: text/html; charset=' . charset());
// === added turn on / off shoutbox - snuggs/ updates by stillapunk
if (isset($_GET['show_staffshout']) && ($show_shout = htmlsafechars($_GET['show_staff']))) {
$setbits = $clrbits = 0;
if ($show_shout == 'yes' && !($CURUSER['opt2'] & user_options_2::SHOW_STAFFSHOUT)) {
$setbits |= user_options_2::SHOW_STAFFSHOUT;
// staff shout on
} elseif ($show_shout == 'no' && $CURUSER['opt2'] & user_options_2::SHOW_STAFFSHOUT) {
$clrbits |= user_options_2::SHOW_STAFFSHOUT;
//staff shout off
}
if ($setbits || $clrbits) {
sql_query('UPDATE users SET opt2 = ((opt2 | ' . sqlesc($setbits) . ') & ~' . sqlesc($clrbits) . ')
WHERE id = ' . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
}
$res = sql_query('SELECT id, username, opt2 FROM users
示例11: format_comment
function format_comment($text, $strip_html = true, $urls = true, $images = true)
{
global $smilies, $staff_smilies, $customsmilies, $INSTALLER09, $CURUSER;
$s = $text;
unset($text);
$s = validate_imgs($s);
$INSTALLER09['url'] = str_replace(array('http://', 'www', 'http://www', 'https://', 'https://www'), '', $INSTALLER09['baseurl']);
if (isset($_SERVER['HTTPS']) && (bool) $_SERVER['HTTPS'] == true) {
$s = preg_replace('/http:\\/\\/((?:www\\.)?' . $INSTALLER09['url'] . ')/i', 'https://$1', $s);
} else {
$s = preg_replace('/https:\\/\\/((?:www\\.)?' . $INSTALLER09['url'] . ')/i', 'http://$1', $s);
}
// This fixes the extraneous ;) smilies problem. When there was an html escaped
// char before a closing bracket - like >), "), ... - this would be encoded
// to &xxx;), hence all the extra smilies. I created a new :wink: label, removed
// the ;) one, and replace all genuine ;) by :wink: before escaping the body.
// (What took us so long? :blush:)- wyz
$s = str_replace(';)', ':wink:', $s);
// fix messed up links
$s = str_replace('&', '&', $s);
if ($strip_html) {
$s = htmlsafechars($s, ENT_QUOTES, charset());
}
if (preg_match("#function\\s*\\((.*?)\\|\\|#is", $s)) {
$s = str_replace(":", ":", $s);
$s = str_replace("[", "[", $s);
$s = str_replace("]", "]", $s);
$s = str_replace(")", ")", $s);
$s = str_replace("(", "(", $s);
$s = str_replace("{", "{", $s);
$s = str_replace("}", "}", $s);
$s = str_replace("\$", "$", $s);
}
// BBCode to find...
$bb_code_in = array('/\\[b\\]\\s*((\\s|.)+?)\\s*\\[\\/b\\]/i', '/\\[i\\]\\s*((\\s|.)+?)\\s*\\[\\/i\\]/i', '/\\[u\\]\\s*((\\s|.)+?)\\s*\\[\\/u\\]/i', '/\\[email\\](.*?)\\[\\/email\\]/i', '/\\[align=([a-zA-Z]+)\\]((\\s|.)+?)\\[\\/align\\]/i', '/\\[blockquote\\]\\s*((\\s|.)+?)\\s*\\[\\/blockquote\\]/i', '/\\[strike\\]\\s*((\\s|.)+?)\\s*\\[\\/strike\\]/i', '/\\[s\\]\\s*((\\s|.)+?)\\s*\\[\\/s\\]/i', '/\\[marquee\\](.*?)\\[\\/marquee\\]/i', '/\\[collapse=(.*?)\\]\\s*((\\s|.)+?)\\s*\\[\\/collapse\\]/i', '/\\[size=([1-7])\\]\\s*((\\s|.)+?)\\s*\\[\\/size\\]/i', '/\\[color=([a-zA-Z]+)\\]\\s*((\\s|.)+?)\\s*\\[\\/color\\]/i', '/\\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\\]\\s*((\\s|.)+?)\\s*\\[\\/color\\]/i', '/\\[font=([a-zA-Z ,]+)\\]((\\s|.)+?)\\[\\/font\\]/i', '/\\[spoiler\\]\\s*((\\s|.)+?)\\s*\\[\\/spoiler\\]/i', '/\\[video=[^\\s\'"<>]*youtube.com.*v=([^\\s\'"<>]+)\\]/ims', "/\\[video=[^\\s'\"<>]*video.google.com.*docid=(-?[0-9]+).*\\]/ims", '/\\[audio\\](http:\\/\\/[^\\s\'"<>]+(\\.(mp3|aiff|wav)))\\[\\/audio\\]/i', '/\\[list=([0-9]+)\\]((\\s|.)+?)\\[\\/list\\]/i', '/\\[list\\]((\\s|.)+?)\\[\\/list\\]/i', '/\\[\\*\\]\\s?(.*?)\\n/i', '/\\[li\\]\\s?(.*?)\\n/i', '/\\[hr\\]/');
// And replace them by...
$bb_code_out = array('<span style="font-weight: bold;">\\1</span>', '<span style="font-style: italic;">\\1</span>', '<span style="text-decoration: underline;">\\1</span>', '<a class="altlink" href="mailto:\\1">\\1</a>', '<div style="text-align: \\1;">\\2</div>', '<blockquote class="style"><span>\\1</span></blockquote>', '<span style="text-decoration: line-through;">\\1</span>', '<span style="text-decoration: line-through;">\\1</span>', '<marquee class="style">\\1</marquee>', '<div style="padding-top: 2px; white-space: nowrap"><span style="cursor: hand; cursor: pointer; border-bottom: 1px dotted" onclick="if (document.getElementById(\'collapseobj\\1\').style.display==\'block\') {document.getElementById(\'collapseobj\\1\').style.display=\'none\' } else { document.getElementById(\'collapseobj\\1\').style.display=\'block\' }">\\1</span></div><div id="collapseobj\\1" style="display:none; padding-top: 2px; padding-left: 14px; margin-bottom:10px; padding-bottom: 2px; background-color: #FEFEF4;">\\2</div>', '<span class="size\\1">\\2</span>', '<span style="color:\\1;">\\2</span>', '<span style="color:\\1;">\\2</span>', '<span style="font-family:\'\\1\';">\\2</span>', '<table cellspacing="0" cellpadding="10"><tr><td class="forum_head_dark" style="padding:5px">Spoiler! to view, roll over the spoiler box.</td></tr><tr><td class="spoiler"><a href="#">\\1</a></td></tr></table><br />', '<object width="500" height="410"><param name="movie" value="http://www.youtube.com/v/\\1"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" width="500" height="410"></embed></object>', "<embed style=\"width:500px; height:410px;\" id=\"VideoPlayback\" align=\"middle\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=\\1\" allowScriptAccess=\"sameDomain\" quality=\"best\" bgcolor=\"#ffffff\" scale=\"noScale\" wmode=\"window\" salign=\"TL\" FlashVars=\"playerMode=embedded\"> </embed>", '<span style="text-align: center;"><p>Audio From: \\1</p><embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=\\1" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" /></span>', '<ol class="style" start="\\1">\\2</ol>', '<ul class="style">\\1</ul>', '<li>\\1</li>', '<li>\\1</li>', '<hr />');
$s = preg_replace($bb_code_in, $bb_code_out, $s);
if ($urls) {
$s = format_urls($s);
}
if (stripos($s, '[url') !== false && $urls) {
$s = preg_replace_callback("/\\[url=([^()<>\\s]+?)\\](.+?)\\[\\/url\\]/is", "islocal", $s);
// [url]http://www.example.com[/url]
$s = preg_replace_callback("/\\[url\\]([^()<>\\s]+?)\\[\\/url\\]/is", "islocal", $s);
}
// Linebreaks
$s = nl2br($s);
// Dynamic Vars
$s = dynamic_user_vars($s);
// [pre]Preformatted[/pre]
if (stripos($s, '[pre]') !== false) {
$s = preg_replace("/\\[pre\\]((\\s|.)+?)\\[\\/pre\\]/i", "<tt><span style=\"white-space: nowrap;\">\\1</span></tt>", $s);
}
// [nfo]NFO-preformatted[/nfo]
if (stripos($s, '[nfo]') !== false) {
$s = preg_replace("/\\[nfo\\]((\\s|.)+?)\\[\\/nfo\\]/i", "<tt><span style=\"white-space: nowrap;\"><font face='MS Linedraw' size='2' style='font-size: 10pt; line-height:" . "10pt'>\\1</font></span></tt>", $s);
}
//==Media tag
if (stripos($s, '[media=') !== false) {
$s = preg_replace_callback("#\\[media=(youtube|liveleak|GameTrailers|vimeo|imdb)\\](.+?)\\[/media\\]#is", function ($media_tag) {
return _MediaTag($media_tag[2], $media_tag[1]);
}, $s);
}
if (stripos($s, '[img') !== false && $images) {
// [img=http://www/image.gif]
$s = preg_replace("/\\[img\\]((http|https):\\/\\/[^\\s'\"<>]+(\\.(jpg|gif|png|bmp)))\\[\\/img\\]/i", "<a href=\"\\1\" rel=\"lightbox\"><img src=\"\\1\" border=\"0\" alt=\"\" style=\"max-width: 150px;\" /></a>", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\\[img=((http|https):\\/\\/[^\\s'\"<>]+(\\.(gif|jpg|png|bmp)))\\]/i", "<a href=\"\\1\" rel=\"lightbox\"><img src=\"\\1\" border=\"0\" alt=\"\" style=\"max-width: 150px;\" /></a>", $s);
}
// [mcom]Text[/mcom]
if (stripos($s, '[mcom]') !== false) {
$s = preg_replace("/\\[mcom\\](.+?)\\[\\/mcom\\]/is", "<div style=\"font-size: 18pt; line-height: 50%;\">\n <div style=\"border-color: red; background-color: red; color: white; text-align: center; font-weight: bold; font-size: large;\"><b>\\1</b></div></div>", $s);
}
// the [you] tag
if (stripos($s, '[you]') !== false) {
$s = preg_replace("/https?:\\/\\/[^\\s'\"<>]*\\[you\\][^\\s'\"<>]*/i", " ", $s);
$s = preg_replace("/\\[you\\]/i", $CURUSER['username'], $s);
}
// [php]code[/php]
if (stripos($s, '[php]') !== false) {
$s = preg_replace_callback("#\\[(php|sql|html)\\](.+?)\\[\\/\\1\\]#is", function ($source_highlight) {
return source_highlighter($source_highlight[2], $source_highlight[1]);
}, $s);
}
// Maintain spacing
$s = str_replace(' ', ' ', $s);
if (isset($smilies)) {
foreach ($smilies as $code => $url) {
$s = str_replace($code, "<img border='0' src=\"{$INSTALLER09['pic_base_url']}smilies/{$url}\" alt=\"\" />", $s);
//$s = str_replace($code, '<span id="'.$attr.'"></span>', $s);
}
}
if (isset($staff_smilies)) {
foreach ($staff_smilies as $code => $url) {
$s = str_replace($code, "<img border='0' src=\"{$INSTALLER09['pic_base_url']}smilies/{$url}\" alt=\"\" />", $s);
//$s = str_replace($code, '<span id="'.$attr.'"></span>', $s);
}
}
if (isset($customsmilies)) {
//.........这里部分代码省略.........
示例12: stdhead
function stdhead($title = "", $msgalert = true, $stdhead = false)
{
global $CURUSER, $INSTALLER09, $lang, $free, $_NO_COMPRESS, $query_stat, $querytime, $mc1, $BLOCKS, $CURBLOCK, $mood;
if (!$INSTALLER09['site_online']) {
die("Site is down for maintenance, please check back again later... thanks<br />");
}
if ($title == "") {
$title = $INSTALLER09['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '');
} else {
$title = $INSTALLER09['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '') . " :: " . htmlsafechars($title);
}
if ($CURUSER) {
$INSTALLER09['stylesheet'] = isset($CURUSER['stylesheet']) ? "{$CURUSER['stylesheet']}.css" : $INSTALLER09['stylesheet'];
$INSTALLER09['categorie_icon'] = isset($CURUSER['categorie_icon']) ? "{$CURUSER['categorie_icon']}" : $INSTALLER09['categorie_icon'];
$INSTALLER09['language'] = isset($CURUSER['language']) ? "{$CURUSER['language']}" : $INSTALLER09['language'];
}
/** ZZZZZZZZZZZZZZZZZZZZZZZZZZip it! */
if (!isset($_NO_COMPRESS)) {
if (!ob_start('ob_gzhandler')) {
ob_start();
}
}
//== Include js files needed only for the page being used by pdq
$js_incl = '';
$js_incl .= '<!-- javascript goes here or in footer -->';
if (!empty($stdhead['js'])) {
foreach ($stdhead['js'] as $JS) {
$js_incl .= "<script type='text/javascript' src='{$INSTALLER09['baseurl']}/scripts/" . $JS . ".js'></script>";
}
}
//== Include css files needed only for the page being used by pdq
$css_incl = '';
$css_incl .= '<!-- css goes here -->';
$salty = md5("Th15T3xtis5add3dto66uddy6he@water..." . $CURUSER['username'] . "");
if (!empty($stdhead['css'])) {
foreach ($stdhead['css'] as $CSS) {
$css_incl .= "<link type='text/css' rel='stylesheet' href='{$INSTALLER09['baseurl']}/templates/{$CURUSER['stylesheet']}/css/" . $CSS . ".css' />";
}
}
if (isset($INSTALLER09['xhtml_strict'])) {
//== Use strict mime type/doctype
//== Only if browser/user agent supports xhtml
if (isset($_SERVER['HTTP_ACCEPT']) && stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') && ($INSTALLER09['xhtml_strict'] === 1 || $INSTALLER09['xhtml_strict'] == $CURUSER['username'])) {
header('Content-type:application/xhtml+xml; charset=' . charset());
$doctype = '<?xml version="1.0" encoding="' . charset() . '"?>' . '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' . '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
}
}
if (!isset($doctype)) {
header('Content-type:text/html; charset=' . charset());
$doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' . '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . '<html xmlns="http://www.w3.org/1999/xhtml">';
}
$body_class = isset($_COOKIE['theme']) ? htmlsafechars($_COOKIE['theme']) : 'background-15 h-style-1 text-1 skin-1';
$htmlout = $doctype . "<head>\n <meta http-equiv='Content-Language' content='en-us' />\n <!-- ####################################################### -->\n <!-- # This website is powered by U-232 V3 # -->\n <!-- # Download and support at: https://u-232.com # -->\n <!-- # This Template was Modded by RogueSurfer\t # -->\n <!-- ####################################################### -->\n <title>{$title}</title>\n <link rel='alternate' type='application/rss+xml' title='Latest Torrents' href='./rss.php?passkey={$CURUSER['passkey']}' />\n <link rel='stylesheet' href='./templates/1/1.css' type='text/css' />\n <link rel='stylesheet' href='./templates/1/themeChanger/css/colorpicker.css' type='text/css' />\n <link rel='stylesheet' href='./templates/1/themeChanger/css/themeChanger.css' type='text/css' />\n <link rel='shortcut icon' href='favicon.ico' />\n <script type='text/javascript' src='./scripts/jquery.js'></script>\n <script type='text/javascript' src='./scripts/jquery.status.js'></script>\n <script type='text/javascript' src='./scripts/jquery.cookie.js'></script>\n <script type='text/javascript' src='./templates/1/themeChanger/js/colorpicker.js'></script>\n <script type='text/javascript' src='./templates/1/themeChanger/js/themeChanger.js'></script>\n <script type='text/javascript' src='./templates/1/js/jquery.smoothmenu.js'></script>\n <script type='text/javascript' src='./templates/1/js/core.js'></script>\n <script type='text/javascript'>\n /*<![CDATA[*/\n function themes() {\n window.open('take_theme.php','My themes','height=150,width=200,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n }\n function radio() {\n window.open('radio_popup.php','My Radio','height=700,width=800,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n }\n /*]]>*/\n </script>\n {$js_incl}{$css_incl}\n <!--[if lt IE 9]>\n <script type='text/javascript' src='./templates/1/js/modernizr.custom.js'></script>\n\t <script type='text/javascript' src='http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js'></script>\n\t <script type='text/javascript' src='./templates/1/js/ie.js'></script>\n <![endif]-->\n </head>\n <body class='{$body_class}'>\n <!-- ***************** - Wrapper - ******************* -->\n <div id='wrapper'>\n\t <div class='clearfix'>\n <!--<header class='clearfix'>-->\n\t\t <!-- ***************** - Main Navigation - ***************** -->";
if ($CURUSER) {
$active_users_cache = $last24_cache = 0;
$keys['last24'] = 'last24';
$last24_cache = $mc1->get_value($keys['last24']);
$keys['activeusers'] = 'activeusers';
$active_users_cache = $mc1->get_value($keys['activeusers']);
$htmlout .= "<div id='navigation' class='navigation'>\n \t\t\t<ul>\n\t\t\t\t<li><a href='#'>Torrent</a>\n\t\t\t\t\t<ul class='sub-menu'>\n\t\t\t\t\t\t<li><a href='browse.php'>Torrents</a></li>\n\t\t\t\t\t\t<li><a href='requests.php'>Requests</a></li>\n\t\t\t\t\t\t<li><a href='offers.php'>Offers</a></li>\n\t\t\t\t\t\t<li><a href='./needseed.php?needed=seeders'>Need Seeds</a></li>\n\t\t\t\t\t\t" . (isset($CURUSER) && $CURUSER['class'] <= UC_VIP ? "<li><a href='./uploadapp.php'>Upload Appt</a> </li>" : "<li><a href='upload.php'>Upload</a></li>") . "\n <li><a href='bookmarks.php'>Bookmarks</a></li>\n\t\t\t\t\t</ul><!--/ .sub-menu-->\n\t\t\t\t</li>\n\t\t\t\t<li><a href='#'>General</a>\n\t\t\t\t\t<ul class='sub-menu'>\n <li><a href='announcement.php'>Site Announcements</a></li>\n <li><a href='topten.php'>Statistics</a></li>\n <li><a href='faq.php'>FAQ</a></li>\n \t\t\t\t<li><a href='chat.php'>IRC</a></li>\n <li><a href='staff.php'>Staff</a></li>\n <li><a href='./wiki.php'>Wiki</a></li>\n\t\t\t\t\t\t<li><a href='#' onclick='radio();'>Radio</a></li>\n\t\t\t\t\t\t<li><a href='./rsstfreak.php'>Torrent Freak</a></li>\n\t\t\t\t\t</ul><!--/ .sub-menu-->\n\t\t\t\t</li>\n\t\t\t\t<li><a href='#'>Games</a>\n\t\t\t\t\t<ul class='sub-menu'>\n " . (isset($CURUSER) && $CURUSER['class'] >= UC_POWER_USER ? "\n <li><a href='casino.php'>Casino</a></li>" : "") . "\n " . (isset($CURUSER) && $CURUSER['class'] >= UC_POWER_USER ? "\n <li><a href='blackjack.php'>Blackjack</a></li>" : "") . "\n <li><a href='arcade.php'>Arcade</a></li>\n </ul><!--/ .sub-menu-->\n\t\t\t\t</li>\n\t\t\t\t<li><a href='./donate.php'>Donate</a></li>\n\t\t\t\t<li><a href='#'>Forums</a>\n\t\t\t\t\t<ul class='sub-menu'>\n <li><a href='forums.php'>Tracker Forums</a></li>\n <li><a href='http://forum.u-232.com/index.php'>SMF Support</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n <li> " . (isset($CURUSER) && $CURUSER['class'] < UC_STAFF ? "<a class='brand' href='./bugs.php?action=add'> Bug Report</a>" : "<a class='brand' href='./bugs.php?action=bugs'> Bug Respond</a>") . "</li>\n <li>" . (isset($CURUSER) && $CURUSER['class'] < UC_STAFF ? "<a class='brand' href='./contactstaff.php'> Contact Staff</a>" : "<a class='brand' href='./staffbox.php'>Staff Messages</a>") . "</li>\n\t\t\t</ul>\n <small>\n <strong>\n " . $last24_cache['totalonline24'] . " Member" . $last24_cache['ss24'] . " in last 24 hours<br />";
if (!empty($active_users_cache)) {
$htmlout .= " Active User's [" . $active_users_cache['actcount'] . "]";
}
$htmlout .= "</strong>\n </small>\n </div>";
}
$htmlout .= "<!--/ #navigation-->\n\t\t <!-- ***************** - END Main Navigation - ******************* -->\n\t\t <!-- ***************** - Logo - ******************* -->\n\t\t <!-- U-232 Source - Print Logo (CSS Controled) -->\n\t\t <div class='cl'> </div>\n\t\t <!-- Logo -->\n <div id='logo'>\n\t\t <h1>U-232<span> Code</span></h1>\n\t\t <p class='description'> your source</p>\n\t\t </div>\n\t\t <!-- / Logo -->\n <!-- ***************** - END Logo - ******************* -->\n </div>\n <!--</header>-->\n\t <!-- ***************** - END Header - ***************** -->\n\t <!-- *************** - Container - *************** -->\n\t <div class='container'>\n <!-- ************** - Search - ************** -->\n\t\t <!-- *************** - END Search - *************** -->\n\t\t <!-- ************** - Platform Navigation - ************** -->";
if ($CURUSER) {
$htmlout .= "<div id='platform-menu' class='platform-menu'>\n\t\t \t <a href='index.php' class='home'>Home</a>\n <ul>\n <li><a href='pm_system.php'>Messages</a></li>\n <li><a href='usercp.php?action=default'>Usercp</a></li>\n " . (isset($CURUSER) && $CURUSER['class'] >= UC_STAFF ? "\n <li><a href='staffpanel.php'>Admincp</a>\n </li>" : "") . "\n <li><a href='#' onclick='themes();'>Theme</a></li>\n <li><a href='friends.php'>Friends</a></li>\n <li><a href='logout.php?hash_please={$salty}'>Logout</a></li>\n </ul>\n\t\t <!--/ .platform-menu-->\n\t\t <div class='statusbar-container'>\n <!--/ statusbar start-->";
if ($CURUSER) {
$htmlout .= StatusBar() . "<!--/ statusbar end-->\n <!--/ #searchForm-->\n\t<!-- U-232 Source - Print Global Messages Start -->\n </div><div id='base_globelmessage'>\n <div id='gm_taps'>\n <ul class='gm_taps'>\n <li><b>Current Site Alerts:</b></li>";
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_REPORTS && $BLOCKS['global_staff_report_on']) {
require_once BLOCK_DIR . 'global/report.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_UPLOADAPP && $BLOCKS['global_staff_uploadapp_on']) {
require_once BLOCK_DIR . 'global/uploadapp.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_HAPPYHOUR && $BLOCKS['global_happyhour_on']) {
require_once BLOCK_DIR . 'global/happyhour.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_STAFF_MESSAGE && $BLOCKS['global_staff_warn_on']) {
require_once BLOCK_DIR . 'global/staffmessages.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_NEWPM && $BLOCKS['global_message_on']) {
require_once BLOCK_DIR . 'global/message.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_DEMOTION && $BLOCKS['global_demotion_on']) {
require_once BLOCK_DIR . 'global/demotion.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_FREELEECH && $BLOCKS['global_freeleech_on']) {
require_once BLOCK_DIR . 'global/freeleech.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_CRAZYHOUR && $BLOCKS['global_crazyhour_on']) {
require_once BLOCK_DIR . 'global/crazyhour.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_BUG_MESSAGE && $BLOCKS['global_bug_message_on']) {
require_once BLOCK_DIR . 'global/bugmessages.php';
}
$htmlout .= "</ul></div></div><!-- U-232 Source - Print Global Messages End -->";
}
//.........这里部分代码省略.........
示例13: charset
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
*/
/****
* Bleach Forums
* Rev u-232v5
* Credits - Retro-Alex2005-Putyn-pdq-sir_snugglebunny-Bigjoos
* Bigjoos 2015
******
*/
if (!defined('IN_INSTALLER09_FORUM')) {
$HTMLOUT = '';
$HTMLOUT .= '<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="' . charset() . '" />
<title>ERROR</title>
</head><body>
<h1 style="text-align:center;">Error</h1>
<p style="text-align:center;">How did you get here? silly rabbit Trix are for kids!.</p>
</body></html>';
echo $HTMLOUT;
exit;
}
//== Putyns post icons
function post_icons($s = 0)
{
global $INSTALLER09;
$body = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"8\" >\n\t\t\t\t <tr><td width=\"20%\" valign=\"top\" align=\"right\"><strong>Post Icons</strong> <br/>\n\t\t\t\t <font class=\"small\">(Optional)</font></td>\n";
$body .= "<td width=\"80%\" align=\"left\">\n";
for ($i = 1; $i < 15; $i++) {
示例14: stdhead
function stdhead($title = "", $msgalert = true, $stdhead = false)
{
global $CURUSER, $INSTALLER09, $lang, $free, $_NO_COMPRESS, $query_stat, $querytime, $mc1, $BLOCKS, $CURBLOCK, $mood, $blocks;
if (!$INSTALLER09['site_online']) {
die("Site is down for maintenance, please check back again later... thanks<br />");
}
if ($title == "") {
$title = $INSTALLER09['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '');
} else {
$title = $INSTALLER09['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '') . " :: " . htmlsafechars($title);
}
if ($CURUSER) {
$INSTALLER09['stylesheet'] = isset($CURUSER['stylesheet']) ? "{$CURUSER['stylesheet']}.css" : $INSTALLER09['stylesheet'];
$INSTALLER09['categorie_icon'] = isset($CURUSER['categorie_icon']) ? "{$CURUSER['categorie_icon']}" : $INSTALLER09['categorie_icon'];
$INSTALLER09['language'] = isset($CURUSER['language']) ? "{$CURUSER['language']}" : $INSTALLER09['language'];
}
$salty = md5("Th15T3xtis5add3dto66uddy6he@water..." . $CURUSER['username'] . "");
/** ZZZZZZZZZZZZZZZZZZZZZZZZZZip it! */
if (!isset($_NO_COMPRESS)) {
if (!ob_start('ob_gzhandler')) {
ob_start();
}
}
$htmlout = '';
//== Include js files needed only for the page being used by pdq
$js_incl = '';
$js_incl .= '<!-- javascript goes here or in footer -->';
if (!empty($stdhead['js'])) {
foreach ($stdhead['js'] as $JS) {
$js_incl .= "<script type='text/javascript' src='{$INSTALLER09['baseurl']}/scripts/" . $JS . ".js'></script>";
}
}
//== Include css files needed only for the page being used by pdq
$stylez = $CURUSER ? "{$CURUSER['stylesheet']}" : "{$INSTALLER09['stylesheet']}";
$css_incl = '';
$css_incl .= '<!-- css goes in header -->';
if (!empty($stdhead['css'])) {
foreach ($stdhead['css'] as $CSS) {
$css_incl .= "<link type='text/css' rel='stylesheet' href='{$INSTALLER09['baseurl']}/templates/{$stylez}/css/" . $CSS . ".css' />";
}
}
$body_class = isset($_COOKIE['theme']) ? htmlsafechars($_COOKIE['theme']) : 'background-1 skin-1 nb-1 panelhead-1 bootpanel-1 btable-1 btr-1 listgrp-1 buttonS-1 text-1';
$htmlout .= '
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<!-- ####################################################### -->
<!-- # This website is powered by U-232 V5 # -->
<!-- # Download and support at: # -->
<!-- # https://forum-u-232.servebeer.com # -->
<!-- # Template Modded by U-232 Dev Team # -->
<!-- ####################################################### -->
<head>
<!--<meta charset="' . charset() . '" />-->
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=0.35, maximum-scale=1" />
<title>' . $title . '</title>
<!-- favicon -->
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="css/bootstrap.css" type="text/css">
<!-- Template CSS-->
<link rel="stylesheet" href="templates/1/1.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<script src="scripts/jquery-1.11.1.js"></script>
<script src="scripts/bootstrap.js"></script>
<!--THemechanger-->
<script type="text/javascript" src="scripts/jquery.cookie.js"></script>
<script type="text/javascript" src="scripts/help.js"></script>
<link rel="stylesheet" href="templates/1/themeChanger/css/colorpicker.css" type="text/css">
<link rel="stylesheet" href="templates/1/themeChanger/css/themeChanger.css" type="text/css">
<script type="text/javascript" src="templates/1/themeChanger/js/colorpicker.js"></script>
<script type="text/javascript" src="templates/1/themeChanger/js/themeChanger.js"></script>
<!-- Forum CSS-->
<link rel="stylesheet" href="templates/1/css/forum.css" />
<!-- global javascript-->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <![endif]-->
<!--[if lt IE 9]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]-->
<!-- <script src="scripts/html5shiv.js" async></script> -->
<script src="scripts/respond.min.js" async></script> <!-- used for IE8 and below-->
<!-- <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script> -->
<script type="application/rss+xml" title="Latest Torrents" src="/rss.php?torrent_pass=' . $CURUSER["torrent_pass"] . '"></script>';
$htmlout .= "\n <style type='text/css'>#mlike{cursor:pointer;}</style>\n <script type='text/javascript'>\n /*<![CDATA[*/\n\t\t// Like Dislike function\n\t\t//================================================== -->\n\t\t\$(function() {\t\t\t\t\t\t\t// the like js\n\t\t\$('span[id*=mlike]').like232({\n\t\ttimes : 5, \t// times checked \n\t\tdisabled : 5, \t// disabled from liking for how many seconds\n\t\ttime : 5, \t// period within check is performed\n\t\turl : '/ajax.like.php'\n\t\t});\n\t\t});\n\t// template changer function\n\t//================================================== -->\n function themes() {\n window.open('take_theme.php','My themes','height=150,width=200,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n }\n\t// language changer function\n\t//================================================== -->\n function language_select() {\n window.open('take_lang.php','My language','height=150,width=200,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n }\n\t// radio function\n\t//================================================== -->\n function radio() {\n window.open('radio_popup.php','My Radio','height=700,width=800,resizable=no,scrollbars=no,toolbar=no,menubar=no');\n }\n /*]]>*/\n </script>\n <script type='text/javascript' src='./scripts/jaxo.suggest.js'></script>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t/*<![CDATA[*/\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\$(\"input[name='search']\").search(options);\n\t\t\t\t});\n\t\t\t\t/*]]>*/\n\t\t\t\t</script>\n {$js_incl}{$css_incl}\n </head>\n <body class='{$body_class}'>";
if ($CURUSER) {
$htmlout .= "\n <nav class='cb navbar-default navbar-fixed-top' role='navigation'>\n <div class='container'>\n <!-- Brand and toggle get grouped for better mobile display -->\n <div class='navbar-header'>\n <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-exl-collapse'>\n <span class='sr-only'>Toggle navigation</span>\n <span class='icon-bar'></span>\n <span class='icon-bar'></span>\n <span class='icon-bar'></span>\n </button>\n <a class='navbar-brand' href='" . $INSTALLER09['baseurl'] . "/index.php'>{$INSTALLER09['site_name']}</a>\n </div>\n <!-- Collect the nav links, forms, and other content for toggling -->\n <div class='collapse navbar-collapse navbar-exl-collapse'>\n <ul class='nav navbar-nav navbar-right'>\n <a class='btn btn-success btn-sm' href='" . $INSTALLER09['baseurl'] . "/donate.php'>{$lang['gl_donate']}</a>\n <a class='btn btn-primary btn-sm' href='" . $INSTALLER09['baseurl'] . "/forums.php'>{$lang['gl_forums']}</a>\n\t<div class='btn-group'>\n\t\t\t\t\t <button class='btn btn-primary navbar-btn btn-sm'>{$lang['gl_general']}</button>\n\t\t\t\t\t <button class='btn dropdown-toggle navbar-btn btn-primary btn-sm' data-toggle='dropdown'>\n\t\t\t\t\t\t<span class='caret'></span>\n\t\t\t\t\t </button>\n\t\t\t\t\t <ul class='dropdown-menu pull-right'>\n\t\t\t\t\t\t<!-- dropdown menu links -->\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/topten.php'>{$lang['gl_stats']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/faq.php'>{$lang['gl_faq']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/rules.php'>{$lang['gl_rules']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/chat.php'>{$lang['gl_irc']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/staff.php'>{$lang['gl_staff']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/wiki.php'>{$lang['gl_wiki']}</a></li>\n\t\t\t<li><a href='#' onclick='radio();'>{$lang['gl_radio']}</a></li>\n\t\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/rsstfreak.php'>{$lang['gl_tfreak']}</a></li>\n <li><a href='" . $INSTALLER09['baseurl'] . "/casino.php'>{$lang['gl_casino']}</a></li>\n <li><a href='" . $INSTALLER09['baseurl'] . "/blackjack.php'>{$lang['gl_bjack']}</a></li>\n <li><a href='" . $INSTALLER09['baseurl'] . "/sitepot.php'>{$lang['gl_sitepot']}</a></li>\n \t\t\t\t\t </ul>\n\t\t\t\t\t</div>\n\t\t\t\t<div class='btn-group'>\n\t\t\t\t\t <button class='btn btn-primary navbar-btn btn-sm'>{$lang['gl_torrent']}</button>\n\t\t\t\t\t <button class='btn dropdown-toggle navbar-btn btn-primary btn-sm' data-toggle='dropdown'>\n\t\t\t\t\t\t<span class='caret'></span>\n\t\t\t\t\t </button>\n\t\t\t\t\t <ul class='dropdown-menu pull-right'>\n\t\t\t\t\t\t<!-- dropdown menu links -->\n \t <li><a href='" . $INSTALLER09['baseurl'] . "/browse.php'>{$lang['gl_torrents']}</a></li>\n\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/requests.php'>{$lang['gl_requests']}</a></li>\n\t <li><a href='" . $INSTALLER09['baseurl'] . "/offers.php'>{$lang['gl_offers']}</a></li>\n\t <li><a href='" . $INSTALLER09['baseurl'] . "/needseed.php?needed=seeders'>{$lang['gl_nseeds']}</a></li>\n\t\t" . (isset($CURUSER) && $CURUSER['class'] <= UC_VIP ? "<li><a href='" . $INSTALLER09['baseurl'] . "/uploadapp.php'>{$lang['gl_uapp']}</a> </li>" : "<li><a href='" . $INSTALLER09['baseurl'] . "/upload.php'>{$lang['gl_upload']}</a></li>") . "\n " . (isset($CURUSER) && $CURUSER['class'] <= UC_VIP ? "" : "<li><a href='" . $INSTALLER09['baseurl'] . "/multiupload.php'>{$lang['gl_mupload']}</a></li>") . "\n <li><a href='" . $INSTALLER09['baseurl'] . "/bookmarks.php'>{$lang['gl_bookmarks']}</a></li>\n\t\t\t\t\t </ul>\n\t\t\t\t\t</div>\n\t\t\t\t<!-- <div class='btn-group'>\n\t\t\t\t\t <button class='btn btn-primary navbar-btn btn-sm'>{$lang['gl_games']}</button>\n\t\t\t\t\t <button class='btn dropdown-toggle navbar-btn btn-primary btn-sm' data-toggle='dropdown'>\n\t\t\t\t\t\t<span class='caret'></span>\n\t\t\t\t\t </button>\n\t\t\t\t\t <ul class='dropdown-menu pull-right'>\n\t\t\t\t\t\t<!-- dropdown menu links -->\n\t\t<!-- " . (isset($CURUSER) && $CURUSER['class'] >= UC_POWER_USER ? "<li><a href='" . $INSTALLER09['baseurl'] . "/casino.php'>{$lang['gl_casino']}</a></li>" : "") . "\n\t\t" . (isset($CURUSER) && $CURUSER['class'] >= UC_POWER_USER ? "<li><a href='" . $INSTALLER09['baseurl'] . "/blackjack.php'>{$lang['gl_bjack']}</a></li>" : "") . "\n\t\t\t\t\t </ul>\n\t\t\t\t\t</div> -->\n\t\t\t\t<div class='btn-group'>\n\t\t\t\t\t <button class='btn btn-primary navbar-btn btn-sm'>Staff Tools</button>\n\t\t\t\t\t <button class='btn dropdown-toggle navbar-btn btn-primary btn-sm' data-toggle='dropdown'>\n\t\t\t\t\t\t<span class='caret'></span>\n\t\t\t\t\t </button>\n\t\t\t\t\t <ul class='dropdown-menu pull-right'>\n\t\t\t\t\t\t<!-- dropdown menu links -->\n\t\t\t\t\t\t <li> " . (isset($CURUSER) && $CURUSER['class'] < UC_STAFF ? "<a class='brand' href='" . $INSTALLER09['baseurl'] . "/bugs.php?action=add'>{$lang['gl_breport']}</a>" : "<a class='brand' href='" . $INSTALLER09['baseurl'] . "/bugs.php?action=bugs'>{$lang['gl_brespond']}</a>") . "</li>\n\t\t\t\t\t\t\t<li>" . (isset($CURUSER) && $CURUSER['class'] < UC_STAFF ? "<a class='brand' href='" . $INSTALLER09['baseurl'] . "/contactstaff.php'>{$lang['gl_cstaff']}</a>" : "<a class='brand' href='" . $INSTALLER09['baseurl'] . "/staffbox.php'>{$lang['gl_smessages']}</a>") . "</li>\n\t\t\t\t\t\t\t" . (isset($CURUSER) && $CURUSER['class'] >= UC_STAFF ? "<li><a href='" . $INSTALLER09['baseurl'] . "/staffpanel.php'>{$lang['gl_admin']}</a></li>" : "") . "\n\t\t\t\t\t </ul>\n\t\t\t\t\t</div>\n\t\t\t\t<div class='btn-group'>\n\t\t\t\t\t <button class='btn btn-primary navbar-btn btn-sm'>Pers Tools</button>\n\t\t\t\t\t <button class='btn dropdown-toggle navbar-btn btn-primary btn-sm' data-toggle='dropdown'>\n\t\t\t\t\t\t<span class='caret'></span>\n\t\t\t\t\t </button>\n\t\t\t\t\t <ul class='dropdown-menu pull-right'>\n\t\t\t\t\t\t<!-- dropdown menu links -->\n \t\t<li><a href='#' onclick='themes();'>{$lang['gl_theme']}</a></li>\n\t\t<li><a href='#' onclick='language_select();'>{$lang['gl_language_select']}</a></li>\n\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/pm_system.php'>{$lang['gl_pms']}</a></li>\n\t\t<li><a href='" . $INSTALLER09['baseurl'] . "/usercp.php?action=default'>{$lang['gl_usercp']}</a></li>\n \t <!-- <li><a href='" . $INSTALLER09['baseurl'] . "/friends.php'>{$lang['gl_friends']}</a></li> -->\n\t\t<li class='divider'></li>\n\t\t<li>" . (isset($CURUSER) && $CURUSER['got_blocks'] == 'yes' ? "{$lang['gl_userblocks']}<a href='./user_blocks.php'>My Blocks</a>" : "") . "</li>\n\t\t<li>" . (isset($CURUSER) && $CURUSER['got_moods'] == 'yes' ? "<a href='./user_unlocks.php'>My Unlocks</a>" : "") . "</li>\n\t\t\t\t\t </ul>\n\t\t\t\t\t</div>\n\t\t<a class='btn btn-warning btn-sm' href='" . $INSTALLER09['baseurl'] . "/logout.php?hash_please={$salty}'>{$lang['gl_logout']}</a>\n\n </ul>\n </div><!-- /.navbar-collapse -->\n</div></nav><div class='banners'></div>";
$htmlout .= '<div class="alert" style="background:rgba(0, 0, 0, 0.1);">' . StatusBar() . '</div>';
$htmlout .= "\n <!-- U-232 Source - Print Global Messages Start -->\n <div class='container'>\n <div class='sa-gm_taps_left'>";
$htmlout .= "<ul class='sa-gm_taps'><li><b>{$lang['gl_alerts']}</b></li>";
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_REPORTS && $BLOCKS['global_staff_report_on']) {
require_once BLOCK_DIR . 'global/report.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_UPLOADAPP && $BLOCKS['global_staff_uploadapp_on']) {
require_once BLOCK_DIR . 'global/uploadapp.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_HAPPYHOUR && $BLOCKS['global_happyhour_on']) {
require_once BLOCK_DIR . 'global/happyhour.php';
}
if (curuser::$blocks['global_stdhead'] & block_stdhead::STDHEAD_STAFF_MESSAGE && $BLOCKS['global_staff_warn_on']) {
//.........这里部分代码省略.........
示例15: unset
$mc1->delete_value('shoutbox_');
//$mc1->delete_value('staff_shoutbox_');
unset($text, $text_parsed);
}
// Power User+ shout edit by pdq
if (isset($_POST['text']) && isset($_POST['user']) == $CURUSER['id'] && ($CURUSER['class'] >= UC_POWER_USER && $CURUSER['class'] < UC_STAFF) && is_valid_id($_POST['id'])) {
require_once INCL_DIR . 'bbcode_functions.php';
$text = trim($_POST['text']);
$text_parsed = format_comment($text);
sql_query('UPDATE shoutbox SET text = ' . sqlesc($text) . ', text_parsed = ' . sqlesc($text_parsed) . ' WHERE userid=' . sqlesc($_POST['user']) . ' AND id=' . sqlesc($_POST['id'])) or sqlerr(__FILE__, __LINE__);
$mc1->delete_value('shoutbox_');
//$mc1->delete_value('staff_shoutbox_');
unset($text, $text_parsed);
}
//== begin main output
$HTMLOUT .= "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n<html xmlns='http://www.w3.org/1999/xhtml'>\n<head>\n<title>ShoutBox</title>\n<meta http-equiv='REFRESH' content='60; URL=./shoutbox.php' />\n<script type='text/javascript' src='./scripts/shout.js'></script>\n<meta http-equiv='Content-Type' content='text/html; charset=" . charset() . "' />\n<style type='text/css'>\nA {color: #356AA0; font-weight: bold; font-size: 9pt; }\nA:hover {color: #FF0000;}\n.small {color: #ff0000; font-size: 9pt; font-family: arial; }\n.date {color: #ff0000; font-size: 9pt;}\n.error {\n color: #990000;\n background-color: #FFF0F0;\n padding: 7px;\n margin-top: 5px;\n margin-bottom: 10px;\n border: 1px dashed #990000;\n}\nA {color: #FFFFFF; font-weight: bold; }\nA:hover {color: #FFFFFF;}\n.small {font-size: 10pt; font-family: arial; }\n.date {font-size: 8pt;}\nspan.size1 { font-size:0.75em; }\nspan.size2 { font-size:1em; }\nspan.size3 { font-size:1.25em; }\nspan.size4 { font-size:1.5em; }\nspan.size5 { font-size:1.75em; }\nspan.size6 { font-size:2em; }\nspan.size7 { font-size:2.25em; }\n</style>";
//==Background colours begin
//== White
if ($CURUSER['shoutboxbg'] == 1) {
$HTMLOUT .= "<style type='text/css'>\nA {color: #000000; font-weight: bold; }\nA:hover {color: #FF273D;}\n.small {font-size: 10pt; font-family: arial; }\n.date {font-size: 8pt;}\n</style>";
$bg = '#ffffff';
$fontcolor = '#000000';
$dtcolor = '#356AA0';
}
// == Grey
if ($CURUSER['shoutboxbg'] == 2) {
$HTMLOUT .= "<style type='text/css'>\nA {color: #ffffff; font-weight: bold; }\nA:hover {color: #FF273D;}\n.small {font-size: 10pt; font-family: arial; }\n.date {font-size: 8pt;}\n</style>";
$bg = '#777777';
$fontcolor = '#000000';
$dtcolor = '#FFFFFF';
}