Beispiel #1
0
 public static function view($_view_file, $_view_vars = array(), $_view_type = null, $_view_show = null)
 {
     $map = self::_get_map();
     $_view_vars['lang'] = get_lang();
     $_view_vars['charset'] = CHARSET;
     $_view_vars['done'] = self::$_done;
     $_view_vars['doing'] = self::$_doing;
     $_view_vars['step_num'] = array_search(self::$_doing, $map) + 1;
     $_view_vars['step_name'] = get_lang(self::$_doing . "_title");
     $_view_vars['step_desc'] = get_lang(self::$_doing . "_desc");
     $_view_vars['hiddens'] = self::$_hiddens;
     $_view_vars['map'] = $map;
     parent::view($_view_file, $_view_vars, $_view_type, $_view_show);
 }
Beispiel #2
0
 /**
  * 默认首页
  */
 public static final function index()
 {
     core::view(__CLASS__ . '/' . __FUNCTION__ . '.tpl');
 }
Beispiel #3
0
 /**
  * hello world
  */
 public static final function world()
 {
     core::view(__CLASS__ . '/' . __FUNCTION__ . '.tpl', array('world' => $_GET['do']));
 }
Beispiel #4
0
 public static function view2($_view_file_global = null, $_view_vars = null, $_view_type = null, $_view_show = null)
 {
     //$config = parent::init('config');
     if (is_string($_view_file_global) && strstr($_view_file_global, '.')) {
         $str = parent::view($_view_file_global, $_view_vars, $_view_type, false);
         if ($config['siteRewrite'] == false) {
             $array = array('@([\\w\\d\\-]+)_([\\d]+).html@isU' => '?go=news&do=detail&news_id=$2');
             $a1 = array_keys($array);
             $a2 = array_values($array);
             if ($_view_show === false) {
                 return preg_replace($a1, $a2, $str);
             }
             $html = preg_replace($a1, $a2, $str);
         } else {
             $array = array('@\\?go=user@isU' => 'My-Account.html');
             $a1 = array_keys($array);
             $a2 = array_values($array);
             if ($_view_show === false) {
                 return preg_replace($a1, $a2, $str);
             }
             $html = preg_replace($a1, $a2, $str);
         }
         //$html =  strip_tags($html,'<p><a><b><html><body><!DOCTYPE><div><table><tr><td><th><input><select><option>');
         if (IN_WAP) {
             $array = array('@<\\!DOCTYPE[^>]+>@isU' => '', '@<html[^>]+>@isU' => '<html>', '@<link[^>]+>@isU' => '', '@<script[^>]*?>[^<]+?</script>@isU' => '', '@<script[^>]*?></script>@isU' => '', '@&nbsp;@isU' => ' ');
             $a1 = array_keys($array);
             $a2 = array_values($array);
             $html = preg_replace($a1, $a2, $html);
         }
         echo $html;
     } else {
         return parent::view($_view_file_global, $_view_vars, $_view_type, $_view_show);
     }
 }