Beispiel #1
0
/**
 * @todo redirect to $location
 * @param string $location url to redirect
 * @param string $message notification message for get in TLanguage class
 * @param int $notification_icon notification icon id 
 * @param mixed $params params for Prints_f
 */
function RedirectNotification($location, $message, $notification_icon = 1, $params = array())
{
    $msg_id = TLanguage::GetIndex($message);
    // check passed array .
    count($params) == 0 ? $args = (APACHE_SVR ? '?' : '&') . "msg_id=" . $msg_id . '&ni=' . $notification_icon : ($args = (APACHE_SVR ? '?' : '&') . "msg_id=" . $msg_id . '&ni=' . $notification_icon . '&args=' . implode(',', $params));
    // redirect
    header("location:" . $location . $args);
}
Beispiel #2
0
 /**
  * @name _init
  * @todo load lang file if language not loaded before than
  * @return bool
  */
 private static function _init()
 {
     // check loaded or not
     if (count(self::$_lang) == 0) {
         // load
         require '../langs/' . LANG . '_CM.php';
         self::$_lang = $_LANG;
         self::$_lang_search = array_map('strtolower', $_LANG);
     } else {
         return false;
     }
 }
Beispiel #3
0
        <section id="login">
            <form action="<?php 
echo UR_MP;
?>
Access/ChangePasswd" method="post">
                <div class="logo">
                    <img src="<?php 
echo UR_MP_ASSETS;
?>
img/wlogo.png" alt="[]" />
                </div>
                <span class="notification-bar">  
                    <?php 
// if is set
if (isset($_GET['msg_id']) && isset($_GET['ni'])) {
    $msg = TLanguage::Index($_GET['msg_id']);
    $icon = explode('_', $_GET['ni']);
    ?>
                    <p class="notification <?php 
    echo strtolower($icon[1]);
    ?>
 text-center">
                            <!--<span class="fa fa-times-circle"></span>-->
                            <?php 
    // check array for show with argumans or not
    if (isset($_GET['args'])) {
        // show with argumans
        $args = explode(',', $_GET['args']);
        vprintf($msg, $args);
    } else {
        echo $msg;
/**
 * magic language get function
 * @param string $string input to get translate
 * @return string translated string
 */
function _lg($string)
{
    return TLanguage::Get($string);
}