本文整理汇总了PHP中fusion_get_locale函数的典型用法代码示例。如果您正苦于以下问题:PHP fusion_get_locale函数的具体用法?PHP fusion_get_locale怎么用?PHP fusion_get_locale使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fusion_get_locale函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_mood_message
public function get_mood_message()
{
// whether any user has reacted to this post
$locale = fusion_get_locale("", FORUM_ADMIN_LOCALE);
$locale += fusion_get_locale("", FORUM_LOCALE);
$last_datestamp = array();
$mood_description = array();
$mood_cache = $this->cache_mood();
$response_query = "SELECT pn.*, u.user_id, u.user_name, u.user_avatar, u.user_status\n FROM " . DB_POST_NOTIFY . " pn\n LEFT JOIN " . DB_USERS . " u ON pn.notify_sender = u.user_id\n WHERE post_id='" . $this->post_id . "' GROUP BY pn.notify_mood_id ORDER BY pn.notify_mood_id ASC, pn.post_id ASC";
$response_result = dbquery($response_query);
if (dbrows($response_result)) {
while ($m_data = dbarray($response_result)) {
$user_output = "<a class='mood_sender' href='" . FUSION_REQUEST . "#post_" . $this->post_id . "'>\n" . profile_link($m_data['user_id'], $m_data['user_name'], $m_data['user_status'], "", FALSE) . "</a>";
if (fusion_get_userdata('user_id') == $m_data['notify_sender']) {
$user_output = $locale['you'];
}
$reply_sender[$m_data['notify_mood_id']][] = $user_output;
// The pairing errors are when `notify_mood_id` is illegally inserted or deleted
// To code fallback on empty
$last_datestamp[$m_data['notify_mood_id']] = $m_data['notify_datestamp'];
$icon = isset($mood_cache[$m_data['notify_mood_id']]['mood_icon']) ? $mood_cache[$m_data['notify_mood_id']]['mood_icon'] : "fa fa-question fa-fw";
$mood_icon[$m_data['notify_mood_id']] = "<i class='{$icon}'></i>";
$description = isset($mood_cache[$m_data['notify_mood_id']]['mood_description']) ? $mood_cache[$m_data['notify_mood_id']]['mood_description'] : $locale['forum_0529'];
$mood_description[$m_data['notify_mood_id']] = $description;
}
$output_message = "";
foreach ($mood_description as $mood_id => $mood_output) {
$senders = implode(", ", $reply_sender[$mood_id]);
$output_message .= sprintf($locale['forum_0528'], $mood_icon[$mood_id], $senders, $mood_output, timer($last_datestamp[$mood_id])) . "\n <br/>";
}
return (string) $output_message;
}
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:33,代码来源:mood.php
示例2: setLocale
private static function setLocale()
{
self::$locale = fusion_get_locale("", FORUM_ADMIN_LOCALE);
self::$locale += fusion_get_locale("", SETTINGS_LOCALE);
self::$locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
self::$locale += fusion_get_locale("", FORUM_RANKS_LOCALE);
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:7,代码来源:admin.php
示例3: __construct
public function __construct()
{
if (empty(self::$locale)) {
$locale = fusion_get_locale('', LOCALE . LOCALESET . "admin/errors.php");
$locale += fusion_get_locale('', LOCALE . LOCALESET . "errors.php");
self::$locale += $locale;
}
$this->error_status = filter_input(INPUT_POST, 'error_status', FILTER_VALIDATE_INT, array('min_range' => 0, 'max_range' => 2));
$this->posted_error_id = filter_input(INPUT_POST, 'error_id', FILTER_VALIDATE_INT);
$this->delete_status = filter_input(INPUT_POST, 'delete_status', FILTER_VALIDATE_INT, array('min_range' => 0, 'max_range' => 2));
$this->rowstart = filter_input(INPUT_GET, 'rowstart', FILTER_VALIDATE_INT) ?: 0;
$this->error_id = filter_input(INPUT_GET, 'error_id', FILTER_VALIDATE_INT);
if (isnum($this->error_status) && $this->posted_error_id) {
dbquery("UPDATE " . DB_ERRORS . " SET error_status='" . $this->error_status . "' WHERE error_id='" . $this->posted_error_id . "'");
redirect(FUSION_REQUEST);
}
if (isset($_POST['delete_entries']) && isnum($this->delete_status)) {
dbquery("DELETE FROM " . DB_ERRORS . " WHERE error_status='" . $_POST['delete_status'] . "'");
$source_redirection_path = preg_replace("~" . fusion_get_settings("site_path") . "~", "", FUSION_REQUEST, 1);
redirect(fusion_get_settings("siteurl") . $source_redirection_path);
}
$result = dbquery("SELECT * FROM " . DB_ERRORS . " ORDER BY error_timestamp DESC LIMIT " . $this->rowstart . ",20");
while ($data = dbarray($result)) {
$this->errors[$data['error_id']] = $data;
}
$this->rows = $this->errors ? dbcount('(error_id)', DB_ERRORS) : 0;
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:27,代码来源:Errors.php
示例4: set_filterInfo
public function set_filterInfo()
{
$locale = fusion_get_locale("", FORUM_LOCALE);
$time = isset($_GET['time']) ? $_GET['time'] : '';
$type = isset($_GET['type']) ? $_GET['type'] : '';
$sort = isset($_GET['sort']) ? $_GET['sort'] : '';
$order = isset($_GET['order']) ? $_GET['order'] : '';
$timeCol = '';
$typeCol = '';
if ($time) {
$time_array = array('today' => strtotime('today'), '2days' => strtotime('-2 days'), '1week' => strtotime('-1 week'), '2week' => strtotime('-2 weeks'), '1month' => strtotime('-2 months'), '2month' => strtotime('-2 months'), '3month' => strtotime('-2 months'), '6month' => strtotime('-6 months'), '1year' => strtotime('-1 year'));
$time_stop = $time_array['today'];
foreach ($time_array as $key => $value) {
if ($time == $key) {
$time_stop = prev($time_array);
break;
}
}
if ($time !== 'today') {
$start_time = intval($time_array[$time]);
$end_time = time();
$timeCol = "AND ((p1.post_datestamp BETWEEN '{$start_time}' AND '{$end_time}') OR (t.thread_lastpost BETWEEN '{$start_time}' AND '{$end_time}'))";
} else {
$timeCol = "AND (p1.post_datestamp >= " . intval($time_array[$time]) . " OR t.thread_lastpost >= " . intval($time_stop) . " )";
}
}
if ($type) {
$type_array = array('all' => '', 'discussions' => "AND (a1.attach_name IS NULL or a1.attach_name='') AND (a2.attach_name IS NULL or a2.attach_name='') AND (forum_poll_title IS NULL or forum_poll_title='')", 'attachments' => "AND a1.attach_name !='' OR a2.attach_name !='' AND (forum_poll_title IS NULL or forum_poll_title='')", 'poll' => "AND (a1.attach_name IS NULL or a1.attach_name='') AND (a2.attach_name IS NULL or a2.attach_name='') AND forum_poll_title !=''", 'solved' => "AND t.thread_answered = '1'", 'unsolved' => "AND t.thread_answered = '0'");
$typeCol = $type_array[$type];
}
$sortCol = "ORDER BY t.thread_lastpost ";
$orderCol = 'DESC';
if ($sort) {
$sort_array = array('author' => 't.thread_author', 'time' => 't.thread_lastpost', 'subject' => 't.thread_subject', 'reply' => 't.thread_postcount', 'view' => 't.thread_views');
$sortCol = "ORDER BY " . $sort_array[$sort] . " ";
}
if ($order) {
$order_array = array('ascending' => 'ASC', 'descending' => 'DESC');
$orderCol = $order_array[$order];
}
$this->filter_sql = array('condition' => $timeCol . $typeCol, 'order' => $sortCol . $orderCol);
// Filter Links
$timeExt = isset($_GET['time']) ? "&time=" . $time : '';
$typeExt = isset($_GET['type']) ? "&type=" . $type : '';
$sortExt = isset($_GET['sort']) ? "&sort=" . $sort : '';
$orderExt = isset($_GET['order']) ? "&order=" . $order : '';
$baseLink = clean_request("", array("time", "type", "sort", "order"), FALSE);
if (isset($_GET['viewforum']) && isset($_GET['forum_id'])) {
$baseLink = INFUSIONS . 'forum/index.php?viewforum&forum_id=' . $_GET['forum_id'] . '' . (isset($_GET['parent_id']) ? '&parent_id=' . $_GET['parent_id'] . '' : '');
}
$timeLink = $baseLink . $typeExt . $sortExt . $orderExt;
$this->filter_info['time'] = array($locale['forum_3006'] => $baseLink, $locale['forum_3007'] => $timeLink . '&time=today', $locale['forum_3008'] => $timeLink . '&time=2days', $locale['forum_3009'] => $timeLink . '&time=1week', $locale['forum_3010'] => $timeLink . '&time=2week', $locale['forum_3011'] => $timeLink . '&time=1month', $locale['forum_3012'] => $timeLink . '&time=2month', $locale['forum_3013'] => $timeLink . '&time=3month', $locale['forum_3014'] => $timeLink . '&time=6month', $locale['forum_3015'] => $timeLink . '&time=1year');
$typeLink = $baseLink . $timeExt . $sortExt . $orderExt;
$this->filter_info['type'] = array($locale['forum_3000'] => $typeLink . '&type=all', $locale['forum_3001'] => $typeLink . '&type=discussions', $locale['forum_3002'] => $typeLink . '&type=attachments', $locale['forum_3003'] => $typeLink . '&type=poll', $locale['forum_3004'] => $typeLink . '&type=solved', $locale['forum_3005'] => $typeLink . '&type=unsolved');
$sortLink = $baseLink . $timeExt . $typeExt . $orderExt;
$this->filter_info['sort'] = array($locale['forum_3016'] => $sortLink . '&sort=author', $locale['forum_3017'] => $sortLink . '&sort=time', $locale['forum_3018'] => $sortLink . '&sort=subject', $locale['forum_3019'] => $sortLink . '&sort=reply', $locale['forum_3020'] => $sortLink . '&sort=view');
$orderLink = $baseLink . $timeExt . $typeExt . $sortExt;
$this->filter_info['order'] = array($locale['forum_3021'] => $orderLink . '&order=descending', $locale['forum_3022'] => $orderLink . '&order=ascending');
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:59,代码来源:filter.php
示例5: __construct
public function __construct()
{
global $admin_pages, $aidlink;
$this->admin_pages = $admin_pages;
$this->locale = fusion_get_locale('', LOCALE . LOCALESET . "admin/main.php");
$this->admin_sections = array(0 => $GLOBALS['locale']['ac00'], 1 => $GLOBALS['locale']['ac01'], 2 => $GLOBALS['locale']['ac02'], 3 => $GLOBALS['locale']['ac03'], 4 => $GLOBALS['locale']['ac04'], 5 => $GLOBALS['locale']['ac05']);
$this->current_page = self::_currentPage();
// Dashboard breadcrumb
add_breadcrumb(array('link' => ADMIN . 'index.php' . $aidlink . '&pagenum=0', 'title' => $GLOBALS['locale']['ac10']));
$acTab = isset($_GET['pagenum']) && isnum($_GET['pagenum']) ? $_GET['pagenum'] : $this->_isActive();
if ($acTab != 0 && $acTab <= 5) {
add_breadcrumb(array('link' => ADMIN . $aidlink . "&pagenum=" . $acTab, 'title' => $GLOBALS['locale']['ac0' . $acTab]));
}
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:14,代码来源:admin.php
示例6: display_error_page
function display_error_page($data)
{
$locale = fusion_get_locale();
$text = $data['title'];
$image = $data['image'];
opentable($text);
echo "<table class='table table-responsive' width='100%' style='text-center'>";
echo "<tr>";
echo "<td width='30%' align='center'><img class='img-responsive' src='" . $image . "' alt='" . $text . "' border='0'></td>";
echo "<td style='font-size:16px;color:red' align='center'>" . $text . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2' align='center'><b><a class='button' href='" . BASEDIR . "index.php'>" . $locale['errret'] . "</a></b></td>";
echo "</tr>";
echo "</table>";
closetable();
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:17,代码来源:error.php
示例7: get_Currency
static function get_Currency($currency_code = NULL)
{
$locale = fusion_get_locale("", LOCALE . LOCALESET . 'currency.php');
if (empty(self::$currency_list)) {
foreach (self::getCountryResource() as $object) {
if ($object->name->common !== 'Antarctica') {
if ($currency_code == $object->currency[0]) {
break;
}
$currency_symbol = isset($locale['currency_symbol'][$object->currency[0]]) ? $locale['currency_symbol'][$object->currency[0]] : "\$";
self::$currency_list[$object->currency[0]] = $locale['currency'][$object->currency[0]] . " (" . $currency_symbol . ")";
}
}
}
if ($currency_code !== NULL) {
return isset(self::$currency_list[$currency_code]) ? self::$currency_list[$currency_code] : $locale['na'];
} else {
return array_filter(self::$currency_list);
}
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:20,代码来源:Geomap.php
示例8: author
+--------------------------------------------------------+
| Filename: infusion.php
| Author: J.Falk (Falk)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
die("Access Denied");
}
$locale = fusion_get_locale("", LOCALE . LOCALESET . "setup.php");
// Infusion general information
$inf_title = $locale['weblinks']['title'];
$inf_description = $locale['weblinks']['description'];
$inf_version = "1.00";
$inf_developer = "PHP Fusion Development Team";
$inf_email = "[email protected]";
$inf_weburl = "https://www.php-fusion.co.uk";
$inf_folder = "weblinks";
$inf_image = "weblink.png";
// Multilanguage table for Administration
$inf_mlt[] = array("title" => $locale['weblinks']['title'], "rights" => "WL");
// Create tables
$inf_newtable[] = DB_WEBLINKS . " (\n\tweblink_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,\n\tweblink_name VARCHAR(100) NOT NULL DEFAULT '',\n\tweblink_description TEXT NOT NULL,\n\tweblink_url VARCHAR(200) NOT NULL DEFAULT '',\n\tweblink_cat MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_visibility TINYINT(4) NOT NULL DEFAULT '0',\n\tweblink_count SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',\n\tPRIMARY KEY(weblink_id),\n\tKEY weblink_datestamp (weblink_datestamp),\n\tKEY weblink_count (weblink_count)\n) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";
$inf_newtable[] = DB_WEBLINK_CATS . " (\n\tweblink_cat_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,\n\tweblink_cat_parent MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_cat_name VARCHAR(100) NOT NULL DEFAULT '',\n\tweblink_cat_description TEXT NOT NULL,\n\tweblink_cat_sorting VARCHAR(50) NOT NULL DEFAULT 'weblink_name ASC',\n\tweblink_cat_language VARCHAR(50) NOT NULL DEFAULT '" . LANGUAGE . "',\n\tPRIMARY KEY(weblink_cat_id)\n) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";
// Settings
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:infusion.php
示例9: mod_renew_thread
/**
* Moderator Action - Renew Thread
* Modal pop up confirmation of thread being `renewed`
*/
private function mod_renew_thread()
{
$locale = fusion_get_locale();
if (iMOD) {
$result = dbquery("SELECT p.post_id, p.post_author, p.post_datestamp, f.forum_id, f.forum_cat\n\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " t ON p.thread_id=t.thread_id\n\t\t\t\t\tINNER JOIN " . DB_FORUMS . " f on f.forum_id = t.forum_id\n\t\t\t\t\tWHERE p.thread_id='" . intval($this->thread_id) . "' AND t.thread_hidden=0 AND p.post_hidden=0\n\t\t\t\t\tORDER BY p.post_id DESC LIMIT 1\n\t\t\t\t\t");
if (dbrows($result) > 0) {
$data = dbarray($result);
dbquery("UPDATE " . DB_FORUM_POSTS . " SET post_datestamp='" . time() . "' WHERE post_id='" . $data['post_id'] . "'");
dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $data['post_id'] . "', thread_lastuser='" . $data['post_author'] . "' WHERE thread_id='" . intval($this->thread_id) . "'");
dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_lastuser='" . $data['post_author'] . "' WHERE forum_id='" . $this->forum_id . "'");
ob_start();
echo openmodal('renew', $locale['forum_0758'], array('class' => 'modal-center', 'static' => 1));
echo "<div style='text-align:center'><br />\n" . $locale['forum_0759'] . "<br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/index.php?viewforum&forum_id=" . $this->forum_id . "&parent_id=" . $this->parent_id . "'>" . $locale['forum_0702'] . "</a><br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/index.php'>" . $locale['forum_0703'] . "</a><br /><br /></div>\n";
echo closemodal();
add_to_footer(ob_get_contents());
ob_end_clean();
} else {
redirect(INFUSIONS . "forum/index.php");
}
}
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:27,代码来源:mods.php
示例10: display_html
/**
* @param $formname
* @param $textarea
* @param bool $html
* @param bool $colors
* @param bool $images
* @param string $folder
* @return string
*/
function display_html($formname, $textarea, $html = TRUE, $colors = FALSE, $images = FALSE, $folder = "")
{
$locale = fusion_get_locale("", LOCALE . LOCALESET . "colors.php");
$locale += fusion_get_locale("", LOCALE . LOCALESET . "admin/html_buttons.php");
$res = "";
if ($html) {
$res .= "<div class='btn-group'>\n";
$res .= "<button type='button' value='b' title='" . $locale['html_000'] . "' class='btn btn-sm btn-default m-b-10 button' style='font-weight:bold;' onclick=\"addText('" . $textarea . "', '<strong>', '</strong>', '" . $formname . "');\"><i class='glyphicon glyphicon-bold'></i></button>\n";
$res .= "<button type='button' value='i' title='" . $locale['html_001'] . "' class='btn btn-sm btn-default m-b-10 button' style='font-style:italic;' onclick=\"addText('" . $textarea . "', '<i>', '</i>', '" . $formname . "');\">I</button>\n";
$res .= "<button type='button' value='u' title='" . $locale['html_002'] . "' class='btn btn-sm btn-default m-b-10 button' style='text-decoration:underline;' onclick=\"addText('" . $textarea . "', '<u>', '</u>', '" . $formname . "');\">U</button>\n";
$res .= "<button type='button' value='strike' title='" . $locale['html_003'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<del>', '</del>', '" . $formname . "');\"><del>ABC</del></button>\n";
$res .= "<button type='button' value='blockquote' title='" . $locale['html_004'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<blockquote>', '</blockquote>', '" . $formname . "');\"><i class='fa fa-quote-left'></i></button>\n";
$res .= "<button type='button' value='hr' title='" . $locale['html_005'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<hr/>', '', '" . $formname . "');\"><i class='glyphicon glyphicon-resize-horizontal'></i></button>\n";
$res .= "</div>\n";
$res .= "<div class='btn-group'>\n";
$res .= "<button type='button' class='btn btn-sm btn-default button m-b-10' value='" . $locale['html_016'] . "' onclick=\"insertText('" . $textarea . "', '<!--PAGEBREAK-->', '" . $formname . "');\">" . $locale['html_016'] . "</button>\n";
$res .= fusion_get_settings("allow_php_exe") ? "<button type='button' class='btn btn-sm btn-default button m-b-10' value='<?php?>' onclick=\"addText('" . $textarea . "', '<?php\\n', '\\n?>', '" . $formname . "');\"><?php?></button>\n" : "";
$res .= "<button type='button' class='btn btn-sm btn-default button m-b-10' value='<p>' onclick=\"addText('" . $textarea . "', '<p>', '</p>', '" . $formname . "');\"><p></button>\n";
$res .= "<button type='button' class='btn btn-default btn-sm button m-b-10' value='<br />' onclick=\"insertText('" . $textarea . "', '<br />', '" . $formname . "');\"><br /></button>\n";
$res .= "</div>\n";
$res .= "<div class='btn-group'>\n";
$res .= "<button type='button' value='left' title='" . $locale['html_006'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<p style=\\'text-align:left;\\'>', '</p>', '" . $formname . "');\"><i class='glyphicon glyphicon-align-left'></i></button>\n";
$res .= "<button type='button' value='center' title='" . $locale['html_007'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<p style=\\'text-align:center;\\'>', '</p>', '" . $formname . "');\"><i class='glyphicon glyphicon-align-center'></i></button>\n";
$res .= "<button type='button' value='right' title='" . $locale['html_008'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<p style=\\'text-align:right;\\'>', '</p>', '" . $formname . "');\"><i class='glyphicon glyphicon-align-right'></i></button>\n";
$res .= "<button type='button' value='justify' title='" . $locale['html_009'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<p style=\\'text-align:justify;\\'>', '</p>', '" . $formname . "');\"><i class='glyphicon glyphicon-align-justify'></i></button>\n";
$res .= "</div>\n";
$res .= "<div class='btn-group'>\n";
$res .= "<button type='button' value='link' title='" . $locale['html_010'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<a href=\\'', '\\' target=\\'_blank\\'>Link</a>', '" . $formname . "');\"><i class='glyphicon glyphicon-paperclip'></i></button>\n";
//$res .= "<button type='button' value='img' title='".$locale['html_011']."' class='btn btn-sm btn-default m-b-10 dropdown-toggle button' data-toggle='dropdown' onclick=\"addText('".$textarea."', '<img src=\'".str_replace("../", "", $folder)."', '\' style=\'margin:5px\' alt=\'\' align=\'left\' />', '".$formname."');\"><i class='fa fa-picture-o'></i></button>\n";
$res .= "<div class='btn-group HTML-img'><a title='" . $locale['html_011'] . "' class='btn btn-sm btn-default dropdown dropdown-toggle button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><i class='fa fa-picture-o'></i><b class='caret'></b></a>\n";
if ($images && $folder) {
$res .= "<ul class='dropdown-menu'>\n";
$res .= "<li class='p-l-15 p-r-15'>\n";
$image_files = makefilelist($folder, ".|..|index.php", TRUE);
$image_list = makefileopts($image_files);
$res .= "<select name='insertimage' class='form-control textbox' style='margin-top:5px' onchange=\"insertText('" . $textarea . "', '<img src=\\'" . str_replace("../", "", $folder) . "' + this.options[this.selectedIndex].value + '\\' alt=\\'\\' style=\\'margin:5px\\' align=\\'left\\' />', '" . $formname . "');this.selectedIndex=0;\">\n";
$res .= "<option value=''>" . $locale['html_011'] . "</option>\n" . $image_list . "</select>\n";
$res .= "</li>\n</ul>\n";
}
$res .= "</div>\n";
$res .= "<button type='button' value='center' title='" . $locale['html_012'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<center>', '</center>', '" . $formname . "');\">center</button>\n";
$res .= "<button type='button' value='small' title='" . $locale['html_013'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<span class=\\'small\\'>', '</span>', '" . $formname . "');\">small</button>\n";
$res .= "<button type='button' value='small2' title='" . $locale['html_014'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<span class=\\'small2\\'>', '</span>', '" . $formname . "');\">small2</button>\n";
$res .= "<button type='button' value='alt' title='" . $locale['html_015'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<span class=\\'alt\\'>', '</span>', '" . $formname . "');\">alt</button>\n";
$res .= "<button type='button' value='" . $locale['html_016'] . "' title='" . $locale['html_016'] . "' class='btn btn-sm btn-default m-b-10 button' onclick=\"addText('" . $textarea . "', '<!--PAGEBREAK-->', '', '" . $formname . "');\"><i class='glyphicon glyphicon-minus'></i></button>\n";
if ($colors) {
$res .= "<div class='btn-group'>\n";
$res .= "<button title='" . $locale['html_017'] . "' class='dropdown-toggle btn btn-sm btn-default button' data-toggle='dropdown'><i class='fa fa-tint m-r-5'></i> <span class='caret'></span></button>\n";
$res .= "<ul class='dropdown-menu' role='text-color' style='width:190px;'>\n";
$res .= "<li>\n";
$res .= "<div class='display-block p-l-10 p-r-5 p-t-5 p-b-0' style='width:100%'>\n";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#000\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_8'] . "' style='background-color:#000; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#993300\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_136'] . "' style='background-color:#993300; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#333300\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_137'] . "' style='background-color:#333300; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#003300\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_138'] . "' style='background-color:#003300; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#003366\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_139'] . "' style='background-color:#003366; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#000080\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_92'] . "' style='background-color:#000080; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#333399\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_140'] . "' style='background-color:#333399; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#333333\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_141'] . "' style='background-color:#333333; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "</div>\n";
$res .= "<div class='display-block p-l-10 p-r-10 p-t-5 p-b-0' style='width:100%'>\n";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#800000\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_77'] . "' style='background-color:#800000; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FF6600\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_142'] . "' style='background-color:#FF6600; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FF6600\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_35'] . "' style='background-color:#2F4F4F; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#008000\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_51'] . "' style='background-color:#008000; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#008080\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_126'] . "' style='background-color:#008080; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#0000FF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_10'] . "' style='background-color:#0000FF; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#666699\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_143'] . "' style='background-color:#666699; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#808080\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_50'] . "' style='background-color:#808080; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "</div>\n";
$res .= "<div class='display-block p-l-10 p-r-10 p-t-5 p-b-0' style='width:100%'>\n";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FF0000\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_110'] . "' style='background-color:#FF0000; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FF9900\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_144'] . "' style='background-color:#FF9900; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#99CC00\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_145'] . "' style='background-color:#99CC00; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#339966\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_146'] . "' style='background-color:#339966; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#33CCCC\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_147'] . "' style='background-color:#33CCCC; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#3366FF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_148'] . "' style='background-color:#3366FF; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#800080\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_109'] . "' style='background-color:#800080; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#999999\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_149'] . "' style='background-color:#999999; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "</div>\n";
$res .= "<div class='display-block p-l-10 p-r-10 p-t-5 p-b-0' style='width:100%'>\n";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FF00FF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_45'] . "' style='background-color:#FF00FF; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FFCC00\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_150'] . "' style='background-color:#FFCC00; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FFFF00\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_134'] . "' style='background-color:#FFFF00; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#00FF00\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_75'] . "' style='background-color:#00FF00; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#00FFFF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_3'] . "' style='background-color:#00FFFF; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#00CCFF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_151'] . "' style='background-color:#00CCFF; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#993366\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_152'] . "' style='background-color:#993366; width:17px; margin:2px; text-decoration:none !important;'> </a>";
$res .= "<a class='display-inline-block' onclick=\"addText('" . $textarea . "', '<span style=\\'color:#FFFFFF\\'>', '</span>', '" . $formname . "');\" title='" . $locale['color_132'] . "' style='background-color:#FFFFFF; width:17px; margin:2px; text-decoration:none !important; box-shadow: 0 0 2px #a0a0a0;'> </a>";
$res .= "</div>\n";
$res .= "<div class='display-block p-l-10 p-r-10 p-t-5 p-b-0' style='width:100%'>\n";
//.........这里部分代码省略.........
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:html_buttons_include.php
示例11: author
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_DOWNLOADS)) {
redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php")) {
$locale += fusion_get_locale("", INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php");
} else {
$locale += fusion_get_locale("", INFUSIONS . "downloads/locale/English/downloads.php");
}
include INFUSIONS . "downloads/templates/downloads.php";
require_once INFUSIONS . "downloads/classes/Functions.php";
$dl_settings = get_settings("downloads");
if (!isset($_GET['download_id']) && !isset($_GET['cat_id'])) {
add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
}
add_breadcrumb(array('link' => INFUSIONS . 'downloads/downloads.php', 'title' => \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name")));
$result = NULL;
if (isset($_GET['file_id']) && isnum($_GET['file_id'])) {
$res = 0;
$data = dbarray(dbquery("SELECT download_url, download_file, download_cat, download_visibility FROM " . DB_DOWNLOADS . " WHERE download_id='" . intval($_GET['file_id']) . "'"));
if (checkgroup($data['download_visibility'])) {
$result = dbquery("UPDATE " . DB_DOWNLOADS . " SET download_count=download_count+1 WHERE download_id='" . intval($_GET['file_id']) . "'");
if (!empty($data['download_file']) && file_exists(DOWNLOADS . 'files/' . $data['download_file'])) {
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:downloads.php
示例12: __construct
public function __construct()
{
$this->addBreadCrumb(array('link' => BASEDIR . 'index.php', 'title' => fusion_get_locale('home', LOCALE . LOCALESET . "global.php"), 'class' => 'home-link crumb'));
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:4,代码来源:BreadCrumbs.php
示例13: get_forum
/**
* Get the forum structure
*
* @param bool $forum_id
* @param bool $branch_id
*
* @return array
*/
public static function get_forum($forum_id = FALSE, $branch_id = FALSE)
{
// only need to fetch child.
$forum_settings = self::get_forum_settings();
$userdata = fusion_get_userdata();
$locale = fusion_get_locale("", FORUM_LOCALE);
$index = array();
// define what a row is
$row = array('forum_new_status' => '', 'last_post' => '', 'forum_icon' => '', 'forum_icon_lg' => '', 'forum_moderators' => '', 'forum_link' => array('link' => '', 'title' => ''), 'forum_description' => '', 'forum_postcount_word' => '', 'forum_threadcount_word' => '');
$query = dbquery("\n\t\t\t\tSELECT tf.forum_id, tf.forum_cat, tf.forum_branch, tf.forum_name, tf.forum_description, tf.forum_image,\n\t\t\t\ttf.forum_type, tf.forum_mods, tf.forum_threadcount, tf.forum_postcount, tf.forum_order, tf.forum_lastuser, tf.forum_access, tf.forum_lastpost, tf.forum_lastpostid,\n\t\t\t\tt.thread_id, t.thread_lastpost, t.thread_lastpostid, t.thread_subject, p.post_message,\n\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\tFROM " . DB_FORUMS . " tf\n\t\t\t\tLEFT JOIN " . DB_FORUM_THREADS . " t ON tf.forum_lastpostid = t.thread_lastpostid\n\t\t\t\tLEFT JO
|
请发表评论