Example #1
0
 public function init()
 {
     if ($this->_id !== NULL) {
         return;
     }
     $this->_id = gpcvar_str($_REQUEST[$this->name . '_id']);
     $this->_text = gpcvar_str($_REQUEST[$this->name . '_text']);
 }
Example #2
0
<?php

// Multilang example
require_once '../Quicky.class.php';
define('MICROTIME_START', microtime(TRUE));
error_reporting(E_ALL);
ini_set('display_errors', 'On');
$tpl = new Quicky();
$tpl->lang = gpcvar_str($_REQUEST['lang']);
if ($tpl->lang === '') {
    $tpl->lang = 'en';
}
function lang_getmessage($phrase)
{
    if (Quicky::$obj->lang == 'ru') {
        if ($phrase = 'HI') {
            return 'Привет';
        }
        if ($phrase = 'BYE') {
            return 'Пока';
        }
    } else {
        if ($phrase = 'HI') {
            return 'Hi';
        }
        if ($phrase = 'BYE') {
            return 'Bye';
        }
    }
}
function quicky_lang_callback($m)
Example #3
0
 public function getString()
 {
     if (!isset($this->name)) {
         return '';
     }
     return gpcvar_str($_REQUEST[$this->name]);
 }