Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
function showratings($rating_type, $rating_item_id, $rating_link)
{
    global $locale, $userdata;
    $settings = \fusion_get_settings();
    if ($settings['ratings_enabled'] == "1") {
        if (iMEMBER) {
            $d_rating = dbarray(dbquery("SELECT rating_vote,rating_datestamp FROM " . DB_RATINGS . " WHERE rating_item_id='" . $rating_item_id . "' AND rating_type='" . $rating_type . "' AND rating_user='******'user_id'] . "'"));
            if (isset($_POST['post_rating'])) {
                // Rate
                if (isnum($_POST['rating']) && $_POST['rating'] > 0 && $_POST['rating'] < 6 && !isset($d_rating['rating_vote'])) {
                    $result = dbquery("INSERT INTO " . DB_RATINGS . " (rating_item_id, rating_type, rating_user, rating_vote, rating_datestamp, rating_ip, rating_ip_type) VALUES ('{$rating_item_id}', '{$rating_type}', '" . $userdata['user_id'] . "', '" . $_POST['rating'] . "', '" . time() . "', '" . USER_IP . "', '" . USER_IP_TYPE . "')");
                    if ($result) {
                        defender::unset_field_session();
                    }
                }
                redirect($rating_link);
            } elseif (isset($_POST['remove_rating'])) {
                // Unrate
                $result = dbquery("DELETE FROM " . DB_RATINGS . " WHERE rating_item_id='{$rating_item_id}' AND rating_type='{$rating_type}' AND rating_user='******'user_id'] . "'");
                if ($result) {
                    defender::unset_field_session();
                }
                redirect($rating_link);
            }
        }
        $ratings = array(5 => $locale['r120'], 4 => $locale['r121'], 3 => $locale['r122'], 2 => $locale['r123'], 1 => $locale['r124']);
        if (!iMEMBER) {
            $message = str_replace("[RATING_ACTION]", "<a href='" . BASEDIR . "login.php'>" . $locale['login'] . "</a>", $locale['r104']);
            if (fusion_get_settings("enable_registration") == TRUE) {
                $message = str_replace("[RATING_ACTION]", "<a href='" . BASEDIR . "login.php'>" . $locale['login'] . "</a> " . $locale['or'] . " <a href='" . BASEDIR . "register.php'>" . $locale['register'] . "</a>", $locale['r104']);
            }
            echo "<div class='text-center'>" . $message . "</div>\n";
        } elseif (isset($d_rating['rating_vote'])) {
            echo "<div class='display-block'>\n";
            echo openform('removerating', 'post', $rating_link, array('class' => 'display-block text-center'));
            echo sprintf($locale['r105'], $ratings[$d_rating['rating_vote']], showdate("longdate", $d_rating['rating_datestamp'])) . "<br /><br />\n";
            echo form_button('remove_rating', $locale['r102'], $locale['r102'], array('class' => 'btn-default', 'icon' => 'fa fa-times m-r-10'));
            echo closeform();
            echo "</div>\n";
        } else {
            echo "<div class='display-block'>\n";
            echo openform('postrating', 'post', $rating_link, array('max_tokens' => 1, 'notice' => 0, 'class' => 'm-b-20 text-center'));
            echo form_select('rating', $locale['r106'], '', array('options' => $ratings, 'class' => 'display-block text-center'));
            echo form_button('post_rating', $locale['r103'], $locale['r103'], array('class' => 'btn-primary btn-sm', 'icon' => 'fa fa-thumbs-up m-r-10'));
            echo closeform();
            echo "</div>\n";
        }
        $rating_votes = dbarray(dbquery("\n\t\tSELECT\n\t\tSUM(IF(rating_vote='5', 1, 0)) as r120,\n\t\tSUM(IF(rating_vote='4', 1, 0)) as r121,\n\t\tSUM(IF(rating_vote='3', 1, 0)) as r122,\n\t\tSUM(IF(rating_vote='2', 1, 0)) as r123,\n\t\tSUM(IF(rating_vote='1', 1, 0)) as r124\n\t\tFROM " . DB_RATINGS . " WHERE rating_type='" . $rating_type . "' and rating_item_id='" . intval($rating_item_id) . "'\n\t\t"));
        if (!empty($rating_votes)) {
            echo "<div id='ratings' class='rating_container'>\n";
            foreach ($rating_votes as $key => $num) {
                echo progress_bar($num, $locale[$key], FALSE, '10px', TRUE, FALSE);
            }
            echo "</div>\n";
        } else {
            echo "<div class='text-center'>" . $locale['r101'] . "</div>\n";
        }
    }
}
Exemplo n.º 3
0
 function replace_url($m)
 {
     // Get input url if any, if not get the content as a url but check if has a schema, if not add one
     $this_url = !empty($m['url']) ? $m['url'] : (preg_match("#^((f|ht)tp(s)?://)#i", $m['content']) ? $m['content'] : "http://" . $m['content']);
     // Trim only the default url
     $content = empty($m['url']) ? trimlink($m['content'], 40) . (strlen($m['content']) > 40 ? substr($m['content'], strlen($m['content']) - 10, strlen($m['content'])) : '') : $m['content'];
     return (fusion_get_settings('index_url_bbcode') ? "" : "<!--noindex-->") . "<a href='{$this_url}' target='_blank' " . (fusion_get_settings('index_url_bbcode') ? "" : "rel='nofollow' ") . "title='" . urldecode($this_url) . "'>" . $content . "</a>" . (fusion_get_settings('index_url_bbcode') ? "" : "<!--/noindex-->");
 }
Exemplo n.º 4
0
 /**
  * Main Function : Handles the Output
  * This function will Handle the output by calling several functions
  * which are used in this Class.
  * @param string $output The Output from the Fusion
  * @access private
  */
 private function handleOutput()
 {
     $settings = \fusion_get_settings();
     // Buffers for Permalink - Using New Driver Pattern
     $this->handle_permalink_requests();
     // Output and Redirect 301 if NON-SEO url found
     $this->replace_output();
     // Prepend all the File/Images/CSS/JS etc Links with ROOT path
     $this->appendRootAll();
     // For Developer, to see what is happening behind
     if ($settings['debug_seo'] == "1") {
     }
 }
Exemplo n.º 5
0
 /**
  * Given a matching URL, fetch Sitelinks data
  * @param string $url - url to match (link_url) column
  * @param string $column - column data to output, blank for all
  * @return array|bool
  */
 public static function get_current_SiteLinks($url = "", $key = NULL)
 {
     $url = stripinput($url);
     static $data = array();
     if (empty($data)) {
         if (!$url) {
             $pathinfo = pathinfo($_SERVER['PHP_SELF']);
             $url = str_replace(fusion_get_settings("site_path"), "", $pathinfo['dirname']) . '/' . $pathinfo['basename'];
         }
         $result = dbquery("SELECT * FROM " . DB_SITE_LINKS . " WHERE link_url='" . $url . "' AND link_language='" . LANGUAGE . "'");
         if (dbrows($result) > 0) {
             $data = dbarray($result);
         }
     }
     return $key === NULL ? $data : (isset($data[$key]) ? $data[$key] : NULL);
 }
function showsidelinks(array $options = array(), $id = 0)
{
    global $userdata;
    static $data = array();
    $settings = fusion_get_settings();
    $acclevel = isset($userdata['user_level']) ? $userdata['user_level'] : 0;
    $res =& $res;
    if (empty($data)) {
        $data = dbquery_tree_full(DB_SITE_LINKS, "link_id", "link_cat", "WHERE link_position <= 2" . (multilang_table("SL") ? " AND link_language='" . LANGUAGE . "'" : "") . " AND " . groupaccess('link_visibility') . " ORDER BY link_cat, link_order");
    }
    if (!$id) {
        $res .= "<ul class='main-nav'>\n";
    } else {
        $res .= "<ul class='sub-nav p-l-10' style='display: none;'>\n";
    }
    foreach ($data[$id] as $link_id => $link_data) {
        $li_class = "";
        if ($link_data['link_name'] != "---" && $link_data['link_name'] != "===") {
            $link_target = $link_data['link_window'] == "1" ? " target='_blank'" : "";
            if (START_PAGE == $link_data['link_url']) {
                $li_class .= ($li_class ? " " : "") . "current-link";
            }
            if (preg_match("!^(ht|f)tp(s)?://!i", $link_data['link_url'])) {
                $item_link = $link_data['link_url'];
            } else {
                $item_link = BASEDIR . $link_data['link_url'];
            }
            $link_icon = "";
            if ($link_data['link_icon']) {
                $link_icon = "<i class='" . $link_data['link_icon'] . "'></i>";
            }
            $res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">\n";
            $res .= "<a class='display-block p-5 p-l-0 p-r-0' href='{$item_link}' {$link_target}>\n";
            $res .= $link_icon . $link_data['link_name'];
            $res .= "</a>\n";
            if (isset($data[$link_id])) {
                $res .= showsidelinks($options, $link_data['link_id']);
            }
            $res .= "</li>\n";
        } elseif ($link_data['link_cat'] > 0) {
            echo "<li class='divider'></li>";
        }
    }
    $res .= "</ul>\n";
    return $res;
}
Exemplo n.º 7
0
 /**
  * Display Login form
  * @param array $info
  */
 function display_loginform(array $info)
 {
     global $locale, $userdata, $aidlink;
     opentable($locale['global_100']);
     if (iMEMBER) {
         $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='" . $userdata['user_id'] . "' AND message_read='0' AND message_folder='0'");
         opentable($userdata['user_name']);
         echo "<div style='text-align:center'><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "edit_profile.php' class='side'>" . $locale['global_120'] . "</a><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "messages.php' class='side'>" . $locale['global_121'] . "</a><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "members.php' class='side'>" . $locale['global_122'] . "</a><br />\n";
         if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
             echo THEME_BULLET . " <a href='" . ADMIN . "index.php" . $aidlink . "' class='side'>" . $locale['global_123'] . "</a><br />\n";
         }
         echo THEME_BULLET . " <a href='" . BASEDIR . "index.php?logout=yes' class='side'>" . $locale['global_124'] . "</a>\n";
         if ($msg_count) {
             echo "<br /><br />\n";
             echo "<strong><a href='" . BASEDIR . "messages.php' class='side'>" . sprintf($locale['global_125'], $msg_count);
             echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127']) . "</a></strong>\n";
         }
         echo "<br /><br /></div>\n";
     } else {
         echo "<div id='login_form' class='panel panel-default text-center text-dark'>\n";
         if (fusion_get_settings("sitebanner")) {
             echo "<a class='display-inline-block' href='" . BASEDIR . fusion_get_settings("opening_page") . "'><img src='" . BASEDIR . fusion_get_settings("sitebanner") . "' alt='" . fusion_get_settings("sitename") . "'/></a>\n";
         } else {
             echo "<a class='display-inline-block' href='" . BASEDIR . fusion_get_settings("opening_page") . "'>" . fusion_get_settings("sitename") . "</a>\n";
         }
         echo "<div class='panel-body text-center'>\n";
         echo $info['open_form'];
         echo $info['user_name'];
         echo $info['user_pass'];
         echo $info['remember_me'];
         echo $info['login_button'];
         echo $info['registration_link'] . "<br/><br/>";
         echo $info['forgot_password_link'] . "<br/><br/>";
         echo $info['close_form'];
         echo "</div>\n";
         echo "</div>\n";
     }
     closetable();
 }
Exemplo n.º 8
0
/**
 * @param       $form_name
 * @param       $method - 'post' or 'get'
 * @param       $action_url - form current uri
 * @param array $options :
 *                          form_id = default as form_name
 *                          class = default empty
 *                          enctype = true or false , set true to allow file upload
 *                          max_tokens = store into session number of tokens , default as 1.
 * @return string
 */
function openform($form_name, $method, $action_url, array $options = array())
{
    global $defender;
    $method = strtolower($method) == 'post' ? 'post' : 'get';
    $options = array('form_id' => !empty($options['form_id']) ? $options['form_id'] : $form_name, 'class' => !empty($options['class']) ? $options['class'] : '', 'enctype' => !empty($options['enctype']) && $options['enctype'] == TRUE ? TRUE : FALSE, 'max_tokens' => !empty($options['max_tokens']) && isnum($options['max_tokens']) ? $options['max_tokens'] : 1);
    $class = "";
    if (!$defender->safe()) {
        $class .= "class='warning " . $options['class'] . "' ";
    } elseif (!empty($options['class'])) {
        $class .= "class='" . $options['class'] . "'";
    }
    $action_prefix = fusion_get_settings("site_seo") && !defined("ADMIN_PANEL") ? FUSION_ROOT : "";
    $html = "<form name='" . $form_name . "' id='" . $options['form_id'] . "' method='" . $method . "' action='" . $action_prefix . $action_url . "' " . $class . " " . ($options['enctype'] ? "enctype='multipart/form-data'" : '') . " >\n";
    if ($method == 'post') {
        $token = $defender->generate_token($options['form_id'], $options['max_tokens']);
        $html .= "<input type='hidden' name='fusion_token' value='" . $token . "' />\n";
        $html .= "<input type='hidden' name='form_id' value='" . $options['form_id'] . "' />\n";
    }
    return $html;
}
Exemplo n.º 9
0
 /**
  * Call all the functions to process rewrite detection and further actions.
  * This will call all the other functions after all the included files have been included
  * and all the patterns have been made.
  * @access public
  */
 public function rewritePage()
 {
     // Import the required Handlers
     $this->importHandlers();
     // Include the Rewrites
     $this->includeRewrite();
     // Import Patterns from DB
     $this->importPatterns();
     // Check if there is any Alias matching with current URL
     if (!$this->checkAlias()) {
         // Check if any Alias Pattern is matching with current URL
         if (!$this->checkAliasPatterns()) {
             // Check if any Pattern is matching with current URL
             $this->checkPattern();
             $this->validateURI();
         }
     }
     // If path to File is empty, set a warning
     if ($this->pathtofile == "") {
         $this->setWarning(6);
     }
     if (fusion_get_settings("debug_seo") == 1) {
         $this->displayWarnings();
         // If any Warnings to be shown, or in Debug mode
     }
 }
Exemplo n.º 10
0
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once "../maincore.php";
pageAccess('SB');
require_once THEMES . "templates/admin_header.php";
require_once INCLUDES . "html_buttons_include.php";
include LOCALE . LOCALESET . "admin/settings.php";
$settings = fusion_get_settings();
add_breadcrumb(array('link' => ADMIN . 'banners.php' . $aidlink, 'title' => $locale['850']));
$message = '';
if (isset($_GET['error'])) {
    switch ($_GET['error']) {
        case '1':
            $message = $locale['901'];
            $status = 'danger';
            $icon = "<i class='fa fa-alert fa-lg fa-fw'></i>";
            break;
        default:
            $message = $locale['900'];
            $status = 'success';
            $icon = "<i class='fa fa-check-square-o fa-lg fa-fw'></i>";
    }
    if ($message) {
Exemplo n.º 11
0
 /**
  * Plain Token Validation - executed at maincore.php through sniff_token() only.
  * Makes thorough checks of a posted token, and the token alone. It does not unset token.
  * @param int $post_time The time in seconds before a posted form is accepted,
  *                            this is used to prevent spamming post submissions
  * @return bool
  */
 private static function verify_token($post_time = 5)
 {
     global $locale, $userdata, $defender;
     $error = FALSE;
     $defender->debug = FALSE;
     $settings = fusion_get_settings();
     $token_data = explode(".", stripinput($_POST['fusion_token']));
     // check if the token has the correct format
     if (count($token_data) == 3) {
         list($tuser_id, $token_time, $hash) = $token_data;
         $user_id = iMEMBER ? $userdata['user_id'] : 0;
         $algo = $settings['password_algorithm'];
         $salt = md5(isset($userdata['user_salt']) && !isset($_POST['login']) ? $userdata['user_salt'] . SECRET_KEY_SALT : SECRET_KEY_SALT);
         // check if the logged user has the same ID as the one in token
         if ($tuser_id != $user_id) {
             $error = $locale['token_error_4'];
             // make sure the token datestamp is a number
         } elseif (!isnum($token_time)) {
             $error = $locale['token_error_5'];
             // check if the hash is valid
         } elseif ($hash != hash_hmac($algo, $user_id . $token_time . stripinput($_POST['form_id']) . SECRET_KEY, $salt)) {
             $error = $locale['token_error_7'];
             // check if a post wasn't made too fast. Set $post_time to 0 for instant. Go for System Settings later.
         } elseif (time() - $token_time < $post_time) {
             $error = $locale['token_error_6'];
         }
     } else {
         // token format is incorrect
         $error = $locale['token_error_8'];
     }
     // Check if any error was set
     if ($error !== FALSE) {
         $defender->stop();
         if ($defender->debug) {
             addNotice('danger', $error);
         }
         return FALSE;
     }
     // If we made it so far everything is good
     if ($defender->debug) {
         addNotice('info', 'The token for "' . stripinput($_POST['form_id']) . '" has been validated successfully');
     }
     return TRUE;
 }
Exemplo n.º 12
0
$locale['505'] = "Klik untuk menampilkan Mesej ini";
$locale['506'] = "Klik untuk menampilkan profil pengirim";
$locale['507'] = "Klik untuk menandai semua Mesej";
$locale['508'] = "Klik untuk tidak menandai semua Mesej";
$locale['509'] = "Klik untuk menampilkan Mesej dari semua pengirim";
$locale['510'] = "Klik untuk menampilkan Mesej dari pengirim dimulai dengan %s";
$locale['511'] = "Klik untuk memindah Mesej bertanda ke Arkib anda";
$locale['512'] = "Klik untuk memindah Mesej bertanda ke Peti Masuk anda";
$locale['513'] = "Klik untuk men-set Mesej bertanda sebagai terbaca";
$locale['514'] = "Klik untuk men-set Mesej bertanda sebagai belum terbaca";
$locale['515'] = "Klik untuk memadam Mesej bertanda";
$locale['516'] = "Klik untuk mengubah pengaturan Mesej";
$locale['520'] = "Asal";
$locale['521'] = "Jangan hubungi saya";
$locale['522'] = "Ya, sila hubungi saya";
$locale['523'] = "Jangan simpan rekod";
$locale['524'] = "Ya, simpan rekod mesej yang dihantar";
// Options
$locale['620'] = "Pengaturan";
$locale['621'] = "Beritahu saya melalui email jika saya menerima sebuah Mesej Peribadi baru:";
$locale['622'] = "Simpan Mesej yang dikirim secara automatik:";
$locale['623'] = "Simpan Konfigurasi";
$locale['624'] = "Konfigurasi Dikemaskinikan";
$locale['625'] = "Anda ada Mesej Peribadi yang menanti anda di " . fusion_get_settings('sitename');
$locale['626'] = ",\r\nAnda telah menerima Mesej Peribadi bertajuk [SUBJECT] dari [USER] di " . fusion_get_settings('sitename') . ". Anda dapat membaca Mesej anda di " . fusion_get_settings('siteurl') . "messages.php\r\n\r\nAnda dapat menon-aktifkan pemberitahuan email ini melalui panel pengaturan pada halaman Mesej Peribadi jika Anda tidak ingin menerima pemberithauan emel selanjut ini.";
$locale['627'] = "Kesalahan";
$locale['628'] = "Tidak dapat mengirim Mesej Peribadi. Peti Masuk User telah penuh.";
$locale['629'] = "Anda tidak dapat memindah Mesej terpilih ke folder ini kerana pindaan ini akan melampaui had maksimum folder Mesej tersebut.";
$locale['630'] = " Had Mesej";
$locale['631'] = "Ya";
$locale['632'] = "Tidak";
Exemplo n.º 13
0
        add_to_title($locale['global_200'] . $locale['articles_0060']);
        echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
        echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['articles_0063']) . "</div>\n";
        echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=a");
        echo form_text('article_subject', $locale['articles_0304'], $criteriaArray['article_subject'], array("required" => TRUE, "inline" => TRUE));
        if (multilang_table("AR")) {
            echo form_select('article_language', $locale['global_ML100'], $criteriaArray['article_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
        } else {
            echo form_hidden('article_language', '', $criteriaArray['article_language']);
        }
        echo form_select('article_keywords', $locale['articles_0204'], $criteriaArray['article_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['articles_0204a'], "width" => "100%", "error_text" => $locale['articles_0204a'], "tags" => TRUE, "multiple" => TRUE));
        echo form_select_tree("article_cat", $locale['articles_0201'], $criteriaArray['article_cat'], array("width" => "250px", "inline" => TRUE, "no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
        $textArea_opts = array("required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "simple", "autosize" => TRUE, "form_name" => "submit_form");
        echo form_textarea('article_snippet', $locale['articles_0202'], $criteriaArray['article_snippet'], $textArea_opts);
        $textArea_opts['required'] = $article_settings['article_extended_required'] ? TRUE : FALSE;
        echo form_textarea('article_article', $locale['articles_0203'], $criteriaArray['article_article'], $textArea_opts);
        echo fusion_get_settings("site_seo") ? "" : form_button('preview_article', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-primary m-r-10'));
        echo form_button('submit_article', $locale['articles_0060'], $locale['articles_0060'], array('class' => 'btn-primary'));
        echo closeform();
        echo "</div>\n</div>\n";
    }
} else {
    echo "<div class='well text-center'>\n";
    if (!$cat_exist) {
        echo $locale['articles_0043a'];
    } else {
        echo $locale['articles_0043'];
    }
    echo "</div>\n";
}
closetable();
Exemplo n.º 14
0
$locale['505'] = "Click to view this message";
$locale['506'] = "Click to view the senders profile";
$locale['507'] = "Click to mark all messages";
$locale['508'] = "Click to unmark all messages";
$locale['509'] = "Click to view messages from all senders";
$locale['510'] = "Click to view messages from senders beginning with %s";
$locale['511'] = "Click to move the marked messages to your savebox";
$locale['512'] = "Click to move the marked messages to your inbox";
$locale['513'] = "Click to set the marked messages as read";
$locale['514'] = "Click to set the marked messages as unread";
$locale['515'] = "Click to delete the marked messages";
$locale['516'] = "Click to make configuration changes";
$locale['520'] = "Default";
$locale['521'] = "Do not notify me";
$locale['522'] = "Yes, keep me informed";
$locale['523'] = "Do not keep a record";
$locale['524'] = "Yes, keep my sent messages";
// Options
$locale['620'] = "Settings";
$locale['621'] = "Notify me via email when I receive a new PM:";
$locale['622'] = "Automatically save sent messages:";
$locale['623'] = "Save Configuration";
$locale['624'] = "Saved Configuration";
$locale['625'] = "You have a new private message waiting at " . fusion_get_settings('sitename');
$locale['626'] = ",\r\nYou have received a new Private Message titled [SUBJECT] from [USER] at " . fusion_get_settings('sitename') . ". You can read your private message at " . fusion_get_settings('siteurl') . "messages.php\r\n\r\nYou can disable email notification through the options panel of the Private Message page if you no longer wish to be notified of new messages.";
$locale['627'] = "Error";
$locale['628'] = "Unable to send the Private Message. The recipient's inbox is full.";
$locale['629'] = "You cannot move the selected message(s) into the specified folder as it will exceed the maximum message limit.";
$locale['630'] = " Message Limit";
$locale['631'] = "Yes";
$locale['632'] = "No";
Exemplo n.º 15
0
+--------------------------------------------------------+
| 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).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . "../../../../../maincore.php";
$text = stripinput($_POST['text']);
// filter to relative path conversion
echo "<div class='preview-response clearfix p-20'>\n";
// Set get_image paths based on URI. This is ajax request file. It doesn't return a standard BASEDIR.
$prefix_ = "";
if (!fusion_get_settings("site_seo") && isset($_POST['url'])) {
    $uri = pathinfo($_POST['url']);
    $count = substr($_POST['url'], -1) == "/" ? substr_count($uri['dirname'], "/") : substr_count($uri['dirname'], "/") - 1;
    $prefix_ = str_repeat("../", $count);
    foreach (cache_smileys() as $smiley) {
        $smiley_path = "./" . $prefix_ . "images/smiley/" . $smiley['smiley_image'];
        \PHPFusion\ImageRepo::setImage("smiley_" . $smiley['smiley_text'], $smiley_path);
    }
}
if ($_POST['editor'] == 'html') {
    $text = parsesmileys(nl2br(html_entity_decode(stripslashes($text))));
    if (isset($_POST['mode']) && $_POST['mode'] == 'admin') {
        $images = str_replace('../../../', '', IMAGES);
        $text = str_replace(IMAGES, $images, $text);
        $text = str_replace(IMAGES_N, $images, $text);
        $text = parse_imageDir($text, $prefix_ . "images/");
Exemplo n.º 16
0
$locale['forum_0620'] = "Make this Thread Sticky";
$locale['forum_0621'] = "Lock this Thread";
$locale['forum_0622'] = "Disable Smileys in this Post";
$locale['forum_0623'] = "Show My Signature in this Post";
$locale['forum_0624'] = "Delete this Post";
$locale['forum_0625'] = "Delete attachment -";
$locale['forum_0626'] = "Notify me when a reply is posted";
$locale['forum_0627'] = "Hide Edit";
$locale['forum_0628'] = "Lock Post";
// Forum Post Merger
$locale['forum_0640'] = "Merged on";
// Search Forum Form
$locale['forum_0650'] = 'Flood control nice message.';
// Forum Notification Email
$locale['forum_0660'] = "Thread Reply Notification - {THREAD_SUBJECT}";
$locale['forum_0661'] = "Hello {USERNAME},\n\nA reply has been posted in the forum thread '{THREAD_SUBJECT}' which you are tracking at " . fusion_get_settings('sitename') . ". You can use the following link to view the reply:\n\n{THREAD_URL}\n\nIf you no longer wish to watch this thread you can click the 'Stop tracking this thread' link located at the top of the thread.\n\nRegards,\n" . fusion_get_settings('siteusername') . ".";
// Delete Thread
$locale['forum_0700'] = "Delete Thread";
$locale['forum_0701'] = "The Thread has been deleted.";
$locale['forum_0702'] = "Return to Forum";
$locale['forum_0703'] = "Return to Forum Index";
$locale['forum_0704'] = "Are you sure you want to delete this Thread?";
// Lock Thread
$locale['forum_0710'] = "Lock Thread";
$locale['forum_0711'] = "The Thread has been locked.";
// Unlock Thread
$locale['forum_0720'] = "Unlock Thread";
$locale['forum_0721'] = "The Thread has been unlocked.";
// Make Thread Sticky
$locale['forum_0730'] = "Make Thread Sticky";
$locale['forum_0731'] = "The Thread has been made sticky.";
Exemplo n.º 17
0
     ob_end_clean();
     echo "<div class='text-right display-block'>\n";
     echo form_button("pButton", $locale['help'], $locale['help'], array("input_id" => "pButton", "type" => "button"));
     echo form_button("savepermalinks", $locale['save_changes'], $locale['413'], array("class" => "m-l-10 btn-primary", "input_id" => "save_top"));
     echo "</div>\n";
     // Driver Rules Installed
     echo "<h4>\n" . $locale['409'] . "</h4>\n";
     $i = 1;
     foreach ($driver as $data) {
         echo "<div class='list-group-item m-b-20'>\n";
         $source = preg_replace("/%(.*?)%/i", "<kbd class='m-2'>%\$1%</kbd>", $data['pattern_source']);
         $target = preg_replace("/%(.*?)%/i", "<kbd class='m-2'>%\$1%</kbd>", $data['pattern_target']);
         echo "<p class='m-t-10 m-b-10'>\n                <label class='label' style='background:#ddd; color: #000; font-weight:normal; font-size: 1rem;'>\n                " . $target . "\n</label>\n";
         echo "</p>\n";
         // new text input
         echo form_text("permalink[" . $data['pattern_id'] . "]", "", $data['pattern_source'], array("prepend_value" => fusion_get_settings("siteurl"), "inline" => TRUE, "class" => "m-b-0"));
         echo "</div>\n";
         $i++;
     }
     echo form_button("savepermalinks", $locale['save_changes'], $locale['413'], array("class" => "btn-primary m-b-20"));
     echo closeform();
 } else {
     echo "<table class='table table-responsive table-hover table-striped m-t-20'>\n";
     if (!empty($permalink)) {
         echo "<tr>\n";
         echo "<th width='1%' style='white-space:nowrap'>" . $locale['402'] . "</th>\n";
         echo "<th style='white-space:nowrap'><strong>" . $locale['403'] . "</th>\n";
         echo "<th width='1%' style='white-space:nowrap'>" . $locale['404'] . "</th>\n";
         echo "</tr>\n";
         foreach ($permalink as $data) {
             echo "<tr>\n";
Exemplo n.º 18
0
                        if ($mime_types[$extension] != $each['type']) {
                            die('Prevented an unwanted file upload attempt!');
                        }
                    }
                }
                unset($file_info, $extension);
            }
        }
        unset($mime_types);
    }
}
$defender = new defender();
// Set admin login procedures
Authenticate::setAdminLogin();
$defender->debug_notice = FALSE;
// turn this off after beta.
$defender->sniff_token();
$dynamic = new dynamics();
$dynamic->boot();
$fusion_page_head_tags =& \PHPFusion\OutputHandler::$pageHeadTags;
$fusion_page_footer_tags =& \PHPFusion\OutputHandler::$pageFooterTags;
$fusion_jquery_tags =& \PHPFusion\OutputHandler::$jqueryTags;
// Set theme using $_GET as well.
// Set theme
if ($userdata['user_level'] == USER_LEVEL_SUPER_ADMIN && isset($_GET['themes']) && theme_exists($_GET['themes'])) {
    $newUserTheme = array("user_id" => $userdata['user_id'], "user_theme" => stripinput($_GET['themes']));
    dbquery_insert(DB_USERS, $newUserTheme, "update");
    redirect(clean_request("", array("themes"), FALSE));
}
set_theme(empty($userdata['user_theme']) ? fusion_get_settings("theme") : $userdata['user_theme']);
Exemplo n.º 19
0
<?php

$locale['400'] = "Motore di ricerca in " . fusion_get_settings('sitename');
$locale['401'] = "Cerca per:";
$locale['402'] = "Cerca";
$locale['403'] = "Cerca una di queste parole";
$locale['404'] = "I risultati devono contenere queste parole";
$locale['405'] = "Dove:";
$locale['406'] = "Opzioni";
$locale['407'] = "Tutto il sito";
$locale['408'] = "Risultati ricerca";
//addition date
$locale['420'] = "Cerca:";
$locale['421'] = "tutto";
$locale['422'] = "Ultimo giorno";
$locale['423'] = "Ultima settimana";
$locale['424'] = "Ultime due settimane";
$locale['425'] = "Ultimo mese";
$locale['426'] = "Ultimi tre mesi";
$locale['427'] = "Ultimi sei mesi";
//where
$locale['430'] = "titolo e messaggio";
$locale['431'] = "solo messaggio";
$locale['432'] = "solo titolo";
//sort by
$locale['440'] = "Ordina per:";
$locale['441'] = "data inserimento";
$locale['442'] = "titolo";
$locale['443'] = "autore";
//
$locale['450'] = "discendente";
Exemplo n.º 20
0
                    addNotice('warning', $locale['425']);
                }
            }
        } else {
            if (!sendemail($settings['siteusername'], $settings['siteemail'], $input['mailname'], $input['email'], $input['subject'], $input['message'])) {
                $defender->stop();
                addNotice('warning', $locale['425']);
            }
        }
        opentable($locale['400']);
        echo "<div class='alert alert-success' style='text-align:center'><br />\n" . $locale['440'] . "<br /><br />\n" . $locale['441'] . "</div><br />\n";
        closetable();
    }
}
opentable($locale['400']);
$message = str_replace("[SITE_EMAIL]", hide_email(fusion_get_settings('siteemail')), $locale['401']);
$message = str_replace("[PM_LINK]", "<a href='messages.php?msg_send=1'>" . $locale['global_121'] . "</a>", $message);
echo $message . "<br /><br />\n";
echo "<!--contact_pre_idx-->";
echo openform('contactform', 'post', FUSION_SELF, array('max_tokens' => 1));
echo "<div class='panel panel-default tbl-border'>\n";
echo "<div class='panel-body'>\n";
echo form_text('mailname', $locale['402'], $input['mailname'], array('required' => 1, 'error_text' => $locale['420'], 'max_length' => 64));
echo form_text('email', $locale['403'], $input['email'], array('required' => 1, 'error_text' => $locale['421'], 'type' => 'email', 'max_length' => 64));
echo form_text('subject', $locale['404'], $input['subject'], array('required' => 1, 'error_text' => $locale['422'], 'max_length' => 64));
echo form_textarea('message', $locale['405'], $input['message'], array('required' => 1, 'error_text' => $locale['423'], 'max_length' => 128));
echo "<div class='panel panel-default tbl-border'>\n";
echo "<div class='panel-body clearfix'>\n";
echo "<div class='row m-0'>\n<div class='col-xs-12 col-sm-12 col-md-6 col-lg-6 p-b-20'>\n";
include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php";
echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-6 col-lg-6'>\n";
Exemplo n.º 21
0
function form_textarea($input_name, $label = '', $input_value = '', array $options = array())
{
    global $locale, $defender, $userdata;
    // for editor
    $title = $label ? stripinput($label) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
    require_once INCLUDES . "bbcode_include.php";
    require_once INCLUDES . "html_buttons_include.php";
    include_once LOCALE . LOCALESET . "admin/html_buttons.php";
    include_once LOCALE . LOCALESET . "error.php";
    if (!empty($options['bbcode'])) {
        $options['type'] = "bbcode";
    } elseif (!empty($options['html'])) {
        $options['type'] = "html";
    }
    $options = array('input_id' => !empty($options['input_id']) ? $options['input_id'] : $input_name, "type" => !empty($options['type']) && in_array($options['type'], array("html", "bbcode", "tinymce")) ? $options['type'] : "", 'required' => !empty($options['required']) && $options['required'] == 1 ? '1' : '0', 'placeholder' => !empty($options['placeholder']) ? $options['placeholder'] : '', 'deactivate' => !empty($options['deactivate']) && $options['deactivate'] == 1 ? '1' : '', 'width' => !empty($options['width']) ? $options['width'] : '100%', 'height' => !empty($options['height']) ? $options['height'] : '80px', 'class' => !empty($options['class']) ? $options['class'] : '', 'inline' => !empty($options['inline']) && $options['inline'] == 1 ? '1' : '0', 'length' => !empty($options['length']) ? $options['length'] : '200', 'error_text' => !empty($options['error_text']) ? $options['error_text'] : $locale['error_input_default'], 'safemode' => !empty($options['safemode']) && $options['safemode'] == 1 ? '1' : '0', 'form_name' => !empty($options['form_name']) ? $options['form_name'] : 'input_form', 'tinymce' => !empty($options['tinymce']) && in_array($options['tinymce'], array(TRUE, 'simple', 'advanced')) ? $options['tinymce'] : "simple", 'no_resize' => !empty($options['no_resize']) && $options['no_resize'] == '1' ? '1' : '0', 'autosize' => !empty($options['autosize']) && $options['autosize'] == 1 ? '1' : '0', 'preview' => !empty($options['preview']) && $options['preview'] == TRUE ? TRUE : FALSE, 'path' => !empty($options['path']) && $options['path'] ? $options['path'] : IMAGES, 'maxlength' => !empty($options['maxlength']) && isnum($options['maxlength']) ? $options['maxlength'] : '', 'tip' => !empty($options['tip']) ? $options['tip'] : '');
    if ($options['type'] == "tinymce") {
        $tinymce_list = array();
        $image_list = makefilelist(IMAGES, ".|..|");
        $image_filter = array('png', 'PNG', 'bmp', 'BMP', 'jpg', 'JPG', 'jpeg', 'gif', 'GIF', 'tiff', 'TIFF');
        foreach ($image_list as $image_name) {
            $image_1 = explode('.', $image_name);
            $last_str = count($image_1) - 1;
            if (in_array($image_1[$last_str], $image_filter)) {
                $tinymce_list[] = array('title' => $image_name, 'value' => IMAGES . $image_name);
            }
        }
        $tinymce_list = json_encode($tinymce_list);
        $tinymce_smiley_vars = "";
        if (!defined('tinymce')) {
            add_to_head("<style type='text/css'>.mceIframeContainer iframe{width:100%!important; height:30px;}</style>");
            add_to_footer("<script type='text/javascript' src='" . INCLUDES . "jscripts/tinymce/tinymce.min.js'></script>");
            define('tinymce', TRUE);
            // PHP-Fusion Parse Cache Smileys
            $smileys = cache_smileys();
            $tinymce_smiley_vars = "";
            if (!empty($smileys)) {
                $tinymce_smiley_vars = "var shortcuts = {\n";
                foreach ($smileys as $params) {
                    $tinymce_smiley_vars .= "'" . strtolower($params['smiley_code']) . "' : '<img alt=\"" . $params['smiley_text'] . "\" src=\"" . IMAGES . "smiley/" . $params['smiley_image'] . "\"/>',\n";
                }
                $tinymce_smiley_vars .= "};\n";
                $tinymce_smiley_vars .= "\n\t\t\t\ted.on('keyup load', function(e){\n\t\t\t\t\tvar marker = tinymce.activeEditor.selection.getBookmark();\n\t\t\t\t\t// Store editor contents\n\t\t\t\t\tvar content = tinymce.activeEditor.getContent({'format':'raw'});\n\t\t\t\t\t// Loop through all shortcuts\n\t\t\t\t\tfor(var key in shortcuts){\n\t\t\t\t\t\t// Check if the editor html contains the looped shortcut\n\t\t\t\t\t\tif(content.toLowerCase().indexOf(key) != -1) {\n\t\t\t\t\t\t\t// Escaping special characters to be able to use the shortcuts in regular expression\n\t\t\t\t\t\t\tvar k = key.replace(/[<>*()?']/ig, \"\\\$&\");\n\t\t\t\t\t\t\ttinymce.activeEditor.setContent(content.replace(k, shortcuts[key]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Now put cursor back where it was\n\t\t\t\t\ttinymce.activeEditor.selection.moveToBookmark(marker);\n\t\t\t\t});\n\t\t\t\t";
            }
        }
        // Mode switching for TinyMCE
        switch ($options['tinymce']) {
            case 'advanced':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                entity_encoding : 'raw',\n                width: '100%',\n                height: 300,\n                plugins: [\n                    'advlist autolink autoresize link image lists charmap print preview hr anchor pagebreak spellchecker',\n                    'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n                    'save table contextmenu directionality template paste textcolor'\n                ],\n                image_list: {$tinymce_list},\n                content_css: '" . THEMES . "admin_templates/" . fusion_get_settings("admin_theme") . "/acp_styles.css',\n                toolbar1: 'insertfile undo redo | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | newdocument fullscreen preview cut copy paste pastetext spellchecker searchreplace code',\n                toolbar2: 'styleselect formatselect removeformat | fontselect fontsizeselect bold italic underline strikethrough subscript superscript blockquote | forecolor backcolor',\n                toolbar3: 'hr pagebreak insertdatetime | link unlink anchor | image media | table charmap visualchars visualblocks emoticons',\n                image_advtab: true,\n                style_formats: [\n                    {title: 'Bold text', inline: 'b'},\n                    {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},\n                    {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},\n                    {title: 'Example 1', inline: 'span', classes: 'example1'},\n                    {title: 'Example 2', inline: 'span', classes: 'example2'},\n                    {title: 'Table styles'},\n                    {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}\n                ],\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n            });\n        ");
                break;
            case 'simple':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                menubar: false,\n                statusbar: false,\n                content_css: '" . THEMES . "/templates/tinymce.css',\n                image_list: {$tinymce_list},\n                plugins: [\n                    'advlist autolink autoresize link lists charmap print preview hr anchor pagebreak spellchecker',\n                    'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n                    'contextmenu directionality template paste bbcode autoresize'\n                ],\n                height: 30,\n                image_advtab: true,\n                toolbar1: 'undo redo | bold italic underline | bullist numlist blockquote | hr media | fullscreen',\n                entity_encoding : 'raw',\n                language: '" . $locale['tinymce'] . "',\n                object_resizing: false,\n                resize: false,\n                relative_urls: false,\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n                });\n                ");
                add_to_jquery("\n\t\t\t\t\$('#inject').bind('click', function() {\n\t\t\t\t\ttinyMCE.activeEditor.execCommand(\"mceInsertContent\", true, '[b]I am injecting in stuff..[/b]');\n\t\t\t\t\t});\n\t\t\t\t");
                break;
            case 'default':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                entity_encoding : 'raw',\n                language:'" . $locale['tinymce'] . "',\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n                });\n                ");
                break;
        }
    } else {
        if (!defined('autogrow') && $options['autosize']) {
            define('autogrow', TRUE);
            add_to_footer("<script src='" . DYNAMICS . "assets/autosize/jquery.autosize.min.js'></script>");
        }
        if ($options['autosize']) {
            add_to_jquery("\n\t\t    \$('#" . $options['input_id'] . "').autosize();\n\t\t    ");
        }
    }
    if ($input_value !== '') {
        $input_value = html_entity_decode(stripslashes($input_value), ENT_QUOTES, $locale['charset']);
        $input_value = str_replace("<br />", "", $input_value);
    }
    $error_class = "";
    if ($defender->inputHasError($input_name)) {
        $error_class = "has-error ";
        if (!empty($options['error_text'])) {
            $new_error_text = $defender->getErrorText($input_name);
            if (!empty($new_error_text)) {
                $options['error_text'] = $new_error_text;
            }
            addNotice("danger", "<strong>{$title}</strong> - " . $options['error_text']);
        }
    }
    $html = "<div id='" . $options['input_id'] . "-field' class='form-group " . $error_class . $options['class'] . "' " . ($options['inline'] && $options['width'] && !$label ? "style='width: " . $options['width'] . " !important;'" : '') . ">\n";
    $html .= $label ? "<label class='control-label " . ($options['inline'] ? "col-xs-12 col-sm-3 col-md-3 col-lg-3 p-l-0" : '') . "' for='" . $options['input_id'] . "'>{$label} " . ($options['required'] == 1 ? "<span class='required'>*</span>" : '') . " " . ($options['tip'] ? "<i class='pointer fa fa-question-circle' title='" . $options['tip'] . "'></i>" : '') . "</label>\n" : '';
    $html .= $options['inline'] ? "<div class='col-xs-12 " . ($label ? "col-sm-9 col-md-9 col-lg-9 p-r-0" : "col-sm-12 p-l-0") . "'>\n" : "";
    $tab_active = 0;
    $tab_title = array();
    if ($options['preview'] && ($options['type'] == "html" || $options['type'] == "bbcode")) {
        $tab_title['title'][] = $locale['preview'];
        $tab_title['id'][] = "prw-" . $options['input_id'];
        $tab_title['icon'][] = '';
        $tab_title['title'][] = $locale['texts'];
        $tab_title['id'][] = "txt-" . $options['input_id'];
        $tab_title['icon'][] = '';
        $tab_active = tab_active($tab_title, 1);
        $html .= opentab($tab_title, $tab_active, $options['input_id'] . "-link", "", "editor-wrapper");
        $html .= opentabbody($tab_title['title'][1], "txt-" . $options['input_id'], $tab_active);
    }
    $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "<div class='panel panel-default panel-txtarea m-b-0' " . ($options['preview'] ? "style='border-top:0 !important; border-radius:0 !important;'" : '') . ">\n<div class='panel-heading clearfix' style='padding-bottom:0 !important;'>\n" : '';
    if ($options['type'] == "bbcode" && $options['form_name']) {
        $html .= display_bbcodes('90%', $input_name, $options['form_name']);
    } elseif ($options['type'] == "html" && $options['form_name']) {
        $html .= display_html($options['form_name'], $input_name, TRUE, TRUE, TRUE, $options['path']);
    }
    $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "</div>\n<div class='panel-body p-0'>\n" : '';
    $html .= "<textarea name='{$input_name}' style='width:100%; height:" . $options['height'] . "; " . ($options['no_resize'] ? 'resize: none;' : '') . "' class='form-control p-15 m-0 " . $options['class'] . " " . ($options['autosize'] ? 'animated-height' : '') . " " . ($options['type'] == "html" || $options['type'] == "bbcode" ? "no-shadow no-border" : '') . " textbox ' placeholder='" . $options['placeholder'] . "' id='" . $options['input_id'] . "' " . ($options['deactivate'] ? 'readonly' : '') . ($options['maxlength'] ? "maxlength='" . $options['maxlength'] . "'" : '') . ">" . $input_value . "</textarea>\n";
    if ($options['type'] == "html" || $options['type'] == "bbcode") {
        $html .= "</div>\n<div class='panel-footer clearfix'>\n";
        $html .= "<div class='overflow-hide'><small>" . $locale['word_count'] . ": <span id='" . $options['input_id'] . "-wordcount'></span></small></div>";
        add_to_jquery("\n\t\tvar init_str = \$('#" . $options['input_id'] . "').val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(init_str);\n\t\t\$('#" . $options['input_id'] . "').on('input propertychange paste', function() {\n\t\tvar str = \$(this).val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(str);\n\t\t});\n\t\t");
        $html .= "</div>\n</div>\n";
    }
    if ($options['preview'] && ($options['type'] == "bbcode" || $options['type'] == "html")) {
        $html .= closetabbody();
        $html .= opentabbody($tab_title['title'][0], "prw-" . $options['input_id'] . "", $tab_active);
        $html .= "No Result";
        $html .= closetabbody();
        $html .= closetab();
        add_to_jquery("\n\t\t// preview syntax\n\t\tvar form = \$('#" . $options['form_name'] . "');\n\t\t\$('#tab-prw-" . $options['input_id'] . "').bind('click',function(){\n\t\tvar text = \$('#" . $options['input_id'] . "').val();\n\t\tvar format = '" . ($options['type'] == "bbcode" ? 'bbcode' : 'html') . "';\n\t\tvar data = {\n\t\t\t" . (defined('ADMIN_PANEL') ? "'mode': 'admin', " : "") . "\n\t\t\t'text' : text,\n\t\t\t'editor' : format,\n\t\t\t'url' : '" . $_SERVER['REQUEST_URI'] . "',\n\t\t};\n\t\tvar sendData = form.serialize() + '&' + \$.param(data);\n\t\t\$.ajax({\n\t\t\turl: '" . INCLUDES . "dynamics/assets/preview/preview.ajax.php',\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'html',\n\t\t\tdata : sendData,\n\t\t\tsuccess: function(result){\n\t\t\t//console.log(result);\n\t\t\t\$('#prw-" . $options['input_id'] . "').html(result);\n\t\t\t},\n\t\t\terror: function(result) {\n\t\t\t\tnew PNotify({\n\t\t\t\t\ttitle: '" . $locale['error_preview'] . "',\n\t\t\t\t\ttext: '" . $locale['error_preview_text'] . "',\n\t\t\t\t\ticon: 'notify_icon n-attention',\n\t\t\t\t\tanimation: 'fade',\n\t\t\t\t\twidth: 'auto',\n\t\t\t\t\tdelay: '3000'\n\t\t\t\t});\n\t\t\t}\n\t\t\t});\n\t\t});\n\t\t");
    }
    $html .= $options['required'] == 1 && $defender->inputHasError($input_name) || $defender->inputHasError($input_name) ? "<div id='" . $options['input_id'] . "-help' class='label label-danger p-5 display-inline-block'>" . $options['error_text'] . "</div>" : "";
    $html .= $options['inline'] ? "</div>\n" : '';
    $html .= "</div>\n";
    $defender->add_field_session(array('input_name' => $input_name, 'type' => 'textarea', 'title' => $label, 'id' => $options['input_id'], 'required' => $options['required'], 'safemode' => $options['safemode'], 'error_text' => $options['error_text']));
    return $html;
}
Exemplo n.º 22
0
$locale['forum_0621'] = "Užrakinti šią temą";
$locale['forum_0622'] = "Išjungti šypsenėles šiame pranešime";
$locale['forum_0623'] = "Rodyti mano parašą šiame pranešime";
$locale['forum_0624'] = "Ištrinti šį pranešimą";
$locale['forum_0625'] = "Ištrinti prisegtus failus -";
$locale['forum_0626'] = "Pranešti, kai bus parašytas atsakymas";
$locale['forum_0627'] = "Paslėpti pranešimą";
$locale['forum_0628'] = "Užrakinti pranešimą";
$locale['forum_0630'] = "Apklausa bus sukurta, kai bus pridėta tema";
// Forum Post Merger
$locale['forum_0640'] = "Sujungti į";
// Search Forum Form
$locale['forum_0650'] = 'Užfiksuotas floodinimas.';
// Forum Notification Email
$locale['forum_0660'] = "Temos atsakymo pranešimas - {THREAD_SUBJECT}";
$locale['forum_0661'] = "Sveiki {USERNAME},\nForumo temoje '{THREAD_SUBJECT}', kurią Jūs sekate tinklapyje " . fusion_get_settings('sitename') . ", buvo parašytas atsakymas. Gali pasinaudoti žemiau esančia nuoroda ir pamatyti atsakymą:\n{THREAD_URL}\nJeigu daugiau nebenorite sekti šios temos, galite paspausti 'Nebesekti šios temos' nuorodą, kurią rasite temos viršuje.\nLinkėjimai,\n" . fusion_get_settings('siteusername') . ".";
// Delete Thread
$locale['forum_0700'] = "Ištrinti temą";
$locale['forum_0701'] = "Tema buvo ištrinta.";
$locale['forum_0702'] = "Grįžti į forumą";
$locale['forum_0703'] = "Grįžti į forumo pradinį";
$locale['forum_0704'] = "Ar tikrai norite ištrinti šią temą?";
// Lock Thread
$locale['forum_0710'] = "Užrakinti temą";
$locale['forum_0711'] = "Tema buvo užrakinta.";
// Unlock Thread
$locale['forum_0720'] = "Atrakinti temą";
$locale['forum_0721'] = "Tema buvo atrakinta.";
// Make Thread Sticky
$locale['forum_0730'] = "Padaryti temą svarbia";
$locale['forum_0731'] = "Tema buvo padaryta svarbia.";
Exemplo n.º 23
0
// Submit News Success
$locale['460'] = "Tak fordi du foreslog en nyhed";
$locale['461'] = "Vil du foreslå endnu en nyhed?";
$locale['460b'] = "Tak fordi du vil bidrage til vores blog";
$locale['461b'] = "Vil du foreslå endnu et blogindlæg?";
// Submit News & Blog Form
$locale['470'] = "Du skal bruge denne formular til at foreslå en nyhed. Dit forslag vil blive gennemset\naf en administrator. " . $settings['sitename'] . " reserverer sig retten til at afvise eller redigere alle forslag. Nyheder\nskal være relevante i forhold til indholdet på denne side. Forslag, som ikke er det, vil blive slettet.";
$locale['471'] = "Overskrift:";
$locale['472'] = "Nyhedstekst:";
$locale['473'] = " Slå automatiske linjeskift til";
$locale['474'] = "Se nyheden";
$locale['475'] = "Gem nyheden";
$locale['476'] = "Kategori:";
$locale['477'] = "- Ingen -";
$locale['478'] = "Nyhedsintroduktion:";
$locale['470b'] = "Brug denne formular til at foreslå et blogindlæg. Dit forslag vil blive gennemset af en administrator\npå " . fusion_get_settings('sitename') . ". Vi forbeholder os retten til at forkaste eller redigere dit forslag. Forslaget \nskal være i overensstemnmelse med indholdet her på siden. Er det ikke tilfældet, vil forslaget blive slettet.";
$locale['471b'] = "Overskrift:";
$locale['472b'] = "Blogindlæg:";
$locale['473b'] = " Slå automatiske linjeskift til";
$locale['474b'] = "Se dit forslag";
$locale['475b'] = "Gem forslag";
$locale['476b'] = "Kategori:";
$locale['477b'] = "- Ingen -";
$locale['478b'] = "Introduktion til blogindlæg:";
// Submit Article
$locale['500'] = "Foreslå en artikel";
// Submit Article Success
$locale['510'] = "Tak for dit artikelforslag";
$locale['511'] = "Ønsker du at foreslå endnu en artikel?";
// Submit Article Form
$locale['520'] = "Du skal bruge denne formular til at foreslå en artikel. Dit forslag vil blive gennemset\naf en administrator. " . $settings['sitename'] . " reserverer sig retten til at afvise eller redigere alle forslag. Artikler\nskal være relevante i forhold til indholdet på denne side. Forslag, som ikke er det, vil blive slettet.";
Exemplo n.º 24
0
<?php

// Admin Links
$locale['200'] = fusion_get_settings('sitename') . ": админпанель";
$locale['ac00'] = "Главная страница";
$locale['ac01'] = "Содержимое";
$locale['ac02'] = "Пользователи";
$locale['ac03'] = "Система";
$locale['ac04'] = "Настройки";
$locale['ac05'] = "Плагины";
$locale['ac10'] = "Админпанель";
$locale['202'] = "Настройка профиля пользователя";
$locale['AD'] = "Администраторы";
$locale['AWPR'] = "Сброс пароля администратора";
$locale['AC'] = "Категории статей";
$locale['A'] = "Статьи";
$locale['BLOG'] = "Блог";
$locale['BLC'] = "Категории блогов";
$locale['CP'] = "Страницы";
$locale['DC'] = "Категории загрузок";
$locale['D'] = "Загрузки";
$locale['ESHP'] = "eShop";
$locale['FQ'] = "ЧаВо";
$locale['F'] = "Форум";
$locale['IM'] = "Изображения";
$locale['I'] = "Плагины";
$locale['IP'] = "Панели плагинов";
$locale['M'] = "Участники";
$locale['MI'] = "Инструмент миграции";
$locale['N'] = "Новости";
$locale['P'] = "Панели";
Exemplo n.º 25
0
// Filters
$locale['download_0010'] = "Filter by:";
$locale['download_0011'] = "Filter show category by";
// Download Category titles
$locale['download_0020'] = "Current Download Categories";
$locale['download_0021'] = "Edit Download Category";
$locale['download_0022'] = "Download Category";
$locale['download_0023'] = "Download Category Editor";
// Download submissions
$locale['download_0039'] = "Return to " . fusion_get_settings('sitename');
$locale['download_0040'] = "Sorry, we currently do not accept any download submissions on this site.";
$locale['download_0041'] = "Submit Download";
// 650
$locale['download_0042'] = "Thank you for submitting your Download";
$locale['download_0043'] = "Submit another Download";
$locale['download_0044'] = "Use the following form to submit a Download. Your submission will be reviewed by an\nAdministrator. " . fusion_get_settings('sitename') . " reserves the right to amend or edit any submission. Downloads\nshould be applicable to the content of this site. Submissions deemed unsuitable will be rejected.";
$locale['download_0045'] = "Submit Download";
$locale['download_0046'] = "Download Submissions";
$locale['download_0047'] = "Required screenshot?";
$locale['download_0048'] = "Required full description?";
// Download submissions - admin
$locale['download_0049'] = "Download Submissions";
$locale['download_0050'] = "There are currently no download submissions";
$locale['download_0051'] = "There are currently %s pending for your review.";
$locale['download_0052'] = "Submission Subject for Review";
$locale['download_0053'] = "Submission Author";
$locale['download_0054'] = "Submission Time";
$locale['download_0055'] = "Submission Id";
$locale['download_0056'] = "The above download package was submitted by ";
$locale['download_0057'] = "Posted by ";
$locale['download_0060'] = "Delete Submission";
Exemplo n.º 26
0
$locale['photo_0028'] = "Cancel";
// Submissions form
$locale['gallery_0100'] = "Photo Submissions";
$locale['gallery_0101'] = "Thank you for submitting your Photo";
$locale['gallery_0102'] = "Submit another Photo";
$locale['gallery_0103'] = $locale['photo_0003'];
$locale['gallery_0104'] = $locale['photo_0001'];
$locale['gallery_0105'] = $locale['photo_0005'];
$locale['gallery_0106'] = $locale['album_0006'];
$locale['gallery_0107'] = "Use the following form to submit a Photo. Your submission will be reviewed by an\nAdministrator. " . fusion_get_settings('sitename') . " reserves the right to amend or edit any submission. Photos\nshould be applicable to the content of this site. Submissions deemed unsuitable will be rejected.";
$locale['gallery_0106'] = $locale['photo_0008'];
$locale['gallery_0109'] = $locale['photo_0004'];
$locale['gallery_0110'] = $locale['photo_0014'];
$locale['gallery_0111'] = "Submit Photo";
$locale['gallery_0112'] = "Sorry, we currently do not accept any photo submissions on this site.";
$locale['gallery_0113'] = "Return to " . fusion_get_settings("sitename");
// Submissions admin
$locale['gallery_0150'] = "There are currently no photo submissions";
$locale['gallery_0151'] = "There are currently %s pending for your review.";
$locale['gallery_0152'] = "Photo submission title for Review";
$locale['gallery_0153'] = "Submission Author";
$locale['gallery_0154'] = "Submission Time";
$locale['gallery_0155'] = "Submission ID";
$locale['gallery_0156'] = "The above photo was submitted by ";
$locale['gallery_0157'] = "Posted by ";
$locale['gallery_0158'] = "Publish Photo";
$locale['gallery_0159'] = "Delete Submission";
$locale['gallery_0160'] = "Photo Submission has been published";
$locale['gallery_0161'] = "Photo Submission deleted";
// Settings
$locale['gallery_0200'] = "Allow photo submissions?";
Exemplo n.º 27
0
$locale['photo_0028'] = "Batal";
// Submissions form
$locale['gallery_0100'] = "Penyerahah Sumbangan Gambar";
$locale['gallery_0101'] = "Terima kasih atas sumbangan gambar anda";
$locale['gallery_0102'] = "Serah gambar lain";
$locale['gallery_0103'] = $locale['photo_0003'];
$locale['gallery_0104'] = $locale['photo_0001'];
$locale['gallery_0105'] = $locale['photo_0005'];
$locale['gallery_0106'] = $locale['album_0006'];
$locale['gallery_0107'] = "Sila gunakan borang ini untuk menyerah gambar. Penyerahan anda akan dipastikan oleh Penyelia\npengurusan sistem. " . fusion_get_settings('sitename') . " memelihara semua hak untuk sunting penyerahan ini. Gambar\nperlu mamatuhi keperluan kandungan di situs ini. Penyerahan yang tidak berpatutan akan ditolak.";
$locale['gallery_0106'] = $locale['photo_0008'];
$locale['gallery_0109'] = $locale['photo_0004'];
$locale['gallery_0110'] = $locale['photo_0014'];
$locale['gallery_0111'] = "Serah Gambar";
$locale['gallery_0112'] = "Maaf, kami tidak menerima penyerahan gambar di situs ini.";
$locale['gallery_0113'] = "Kembali ke " . fusion_get_settings("sitename");
// Submissions admin
$locale['gallery_0150'] = "Tidak ada serahan gambar";
$locale['gallery_0151'] = "Kini didapati %s serahan yang diperlukan penyeliaan anda.";
$locale['gallery_0152'] = "Tajuk penyerahan untuk pemeriksaan";
$locale['gallery_0153'] = "Pengarang Serahan";
$locale['gallery_0154'] = "Masa Serahan";
$locale['gallery_0155'] = "ID Serahan";
$locale['gallery_0156'] = "Gambar diserahkan oleh ";
$locale['gallery_0157'] = "Oleh ";
$locale['gallery_0158'] = "Terbit Gambar";
$locale['gallery_0159'] = "Padam Serahan";
$locale['gallery_0160'] = "Serahan gambar telah diterbitkan";
$locale['gallery_0161'] = "Serahan gambar dipadamkan";
// Settings
$locale['gallery_0200'] = "Benarkan serahan gambar?";
Exemplo n.º 28
0
$locale['661'] = "Pateikti kitą siuntinį";
// Submit Download Error
$locale['670'] = "Jūsų siuntinys nepateiktas";
$locale['671'] = "Neteisingas failo vardas.";
$locale['671a'] = "Neteisingas nuotraukos failo vardas.";
$locale['672'] = "Siuntinys turi neviršyti %s.";
$locale['672a'] = "Nuotrauka turi neviršyti %s.";
$locale['672b'] = "Nuotrauka turi būti mažesnė nei %s.";
$locale['673'] = "Siuntinys turi atitikti viena iš šių failų tipų: %s.";
$locale['673a'] = "Nuotrauka turi atitikti viena iš šių failų tipų: %s.";
$locale['674'] = "Siuntinio pavadinimas negali būti paliktas tuščias.";
$locale['675'] = "Siuntinio ar jo adreso laukelis negali būti paliktas tuščias.";
$locale['676'] = "Siuntinio aprašymo ištrauka negali būti palikta tuščia.";
$locale['676a'] = "Nežinoma klaida";
// Submit Download Form
$locale['680'] = "Naudokite žemiau pateiktą forma pateikti siuntiniui. Jūsų pateiktas siuntinys bus peržiūrėtas administracijos. " . fusion_get_settings('sitename') . " turi teisę pašalinti ar redaguoti pateiktą siuntinį. \nSiuntinys turi atitikti puslapio taisykles, kitaip jis bus pašalintas.";
$locale['681'] = "Pavadinimas:";
$locale['682'] = "Aprašymas:";
$locale['682b'] = "Aprašymo ištrauka:";
$locale['683'] = "Adresas (nuoroda):";
$locale['684'] = "ar failas:";
$locale['685'] = "Apskaičiuoti failo dydį";
$locale['686'] = "Nuotrauka:";
$locale['687'] = "Kategorija:";
$locale['688'] = "Licenzija:";
$locale['689'] = "O/S:";
$locale['690'] = "Versija:";
$locale['691'] = "Namų puslapis:";
$locale['692'] = "Autorinės teisės:";
$locale['693'] = "Failo dydis:";
$locale['694'] = "Max. failo dydis: %s / Leidžiami failų tipai: %s";
Exemplo n.º 29
0
<?php

// Error messages
$locale['500'] = "Произошла ошибка";
$locale['501'] = "Ссылка для повторной активации, по которой Вы перешли, больше не действительна.<br /><br />\nСвяжитесь с администратором сайта по электропочте <a href='mailto:" . fusion_get_settings('siteemail') . "'>" . fusion_get_settings('siteemail') . "</a>, если вы хотите запросить ручную повторную активацию.";
$locale['502'] = "Ссылка для повторной активации, по которой Вы перешли, неверная!<br /><br />\nСвяжитесь с администратором сайта по электропочте <a href='mailto:" . fusion_get_settings('siteemail') . "'>" . fusion_get_settings('siteemail') . "</a>, если вы хотите запросить ручную повторную активацию.";
$locale['503'] = "Ссылка для повторной активации, которую Вы открыли, не сработала для активации ТВашей учётной записи.<br />\nВозможно, Ваша учётная запись уже активирована, в таком случае Вы можете <a href='" . fusion_get_settings('siteurl') . "login.php'>войти на сайт</a>.<br /><br />\nЕсли Вы не смогли войти, свяжитесь с администратором сайта по электропочте <a href='mailto:" . fusion_get_settings('siteemail') . "'>" . fusion_get_settings('siteemail') . "</a>, если вы хотите запросить ручную повторную активацию.";
// Send confirmation mail
$locale['504'] = "Учётная запись повторно активирована на сайте " . fusion_get_settings('sitename');
$locale['505'] = "Приветствую, [USER_NAME]!\n\nВаша учётная запись на сайте " . fusion_get_settings('sitename') . " была повторно активирована. Надеемся видеть Вас на сайте чаще.\n\n\nС наилучшими пожеланиями,\n\n\n" . fusion_get_settings('siteusername');
$locale['506'] = "Повторная активация выполнена пользователем.";
Exemplo n.º 30
0
 /**
  * Execute the output handlers
  *
  * @global array $locale
  * @param string $output
  * @return string
  */
 public static function handleOutput($output)
 {
     $settings = \fusion_get_settings();
     if (!empty(self::$pageHeadTags)) {
         $output = preg_replace("#</head>#", self::$pageHeadTags . "</head>", $output, 1);
     }
     if (self::$pageTitle != $settings['sitename']) {
         $output = preg_replace("#<title>.*</title>#i", "<title>" . self::$pageTitle . (self::$pageTitle ? $GLOBALS['locale']['global_200'] : '') . $settings['sitename'] . "</title>", $output, 1);
     }
     if (!empty(self::$pageMeta)) {
         foreach (self::$pageMeta as $name => $content) {
             $output = preg_replace("#<meta (http-equiv|name)='{$name}' content='.*' />#i", "<meta \\1='" . $name . "' content='" . $content . "' />", $output, 1);
         }
     }
     foreach (self::$outputHandlers as $handler) {
         $output = $handler($output);
     }
     return $output;
 }