当前位置: 首页>>代码示例>>PHP>>正文


PHP Lang函数代码示例

本文整理汇总了PHP中Lang函数的典型用法代码示例。如果您正苦于以下问题:PHP Lang函数的具体用法?PHP Lang怎么用?PHP Lang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Lang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: assign_global

 public function assign_global($config = array())
 {
     $cfg = Model('app')->get_cfg();
     if (isset($config['c'])) {
         foreach ($config['c'] as $k => $v) {
             if (isset($cfg[$k])) {
                 $cfg[$k] = $v;
             }
         }
     }
     C($cfg);
     C('lang', DEFAULT_LANG);
     //样式路径
     $path = SUBDIR . "/Mobile/Webroot/" . C('home_tpl') . '/';
     $this->set_tpl_dir('', C('home_tpl'));
     C('hy_path', $path);
     if ($_GET['m'] != 'index' && $_GET['a'] != 'index') {
         if (empty($_SESSION['wxid'])) {
             $this->check_member();
         }
     }
     //配置
     $this->assign("web_title", Model('app')->get_cfg('site_name'));
     $this->assign('_GET', $_GET);
     $this->assign('_C', C());
     $this->assign('_L', Lang());
 }
开发者ID:gzwyufei,项目名称:sr,代码行数:27,代码来源:appController.php

示例2: TStat

 function TStat()
 {
     global $str, $actions;
     TTable::TTable();
     $this->selector = false;
     // активируем менюшку слева для окна stat
     $GLOBALS['_elems'] = true;
     // Общие слова для всех файлов статистики
     $actions['tstat'] = array('view_table' => array('Таблица', 'Table', 'link' => 'cnt.ViewIn(\'table\')', 'img' => 'icon.table.gif', 'display' => 'block'), 'view_grapf' => array('График', 'Graph', 'link' => 'cnt.ViewIn(\'graph\')', 'img' => 'icon.graph.gif', 'display' => 'block'), 'view_bargrapf' => array('Гистограмма', 'Bar graph', 'link' => 'cnt.ViewIn(\'bargraph\')', 'img' => 'icon.bargraph.gif', 'display' => 'block'), 'view_diag' => array('Диаграмма', 'Diagram', 'link' => 'cnt.ViewIn(\'diag\')', 'img' => 'icon.diag.gif', 'display' => 'block'), 'view_csv' => array('Экспорт в CSV', 'Export in CSV', 'link' => 'cnt.ViewIn(\'csv\')', 'img' => 'xls.gif', 'display' => 'block'));
     $str['tstat'] = array('stat' => array('Статистика', 'Statistics'), 't_from_server' => array('пользователи с сервера "%s"', 'visitors from server "%s"'), 't_from_search_ph' => array('пользователи по поисковой фразе "%s"', 'visitors from search phrase "%s"'), 't_points' => array('пользователи с входом со страницы "%s"', 'visitors from enter page "%s"'), 't_outs' => array('пользователи с последней страницей "%s"', 'visitors with last page "%s"'), 't_ip' => array('посетители с ip "%s"', 'visitors with ip "%s"'), 't_robot' => array('поисковая машина: "%s"', 'search machine: "%s"'), 't_client' => array('пользователь "#%u"', 'client "#%u"'), 't_country' => array('пользователи из страны "%s"', 'visitors from country "%s"'), 't_path' => array('путь "%s"', 'path "%s"'), 't_ref_page' => array('пользователи, пришедшие со страницы "%s"', 'visitors from reference page "%s"'), 't_see_page' => array('пользователи, просмотревшие страниц "%s"', 'visitors who viewed pages "%s"'), 't_reklama' => array('рекламная кампания "%s"', 'advertising campaign "%s"'), 'no_data' => array('Нет данных', 'No data'), 'total_period' => array('Всего за данный период', 'Summary for this period'), 'csv_file' => array('Скачать CSV файл', 'Download CSV file'), 'percent' => array('Процент от всех', 'Percent from all'), 'amount' => array('Кол-во', 'Amount'), 'more' => array('подробнее...', 'more...'), 'compare' => array('сравнить...', 'compare...'), 'reports' => array('Отчеты', 'Reports'), 'settings' => array('Настройки', 'Settings'), 'others' => array('Остальные', 'Others'), 'count_rows' => array('Всего', 'Count rows'), 'show_from' => array('C', 'From'), 'show_to' => array('по', 'to'), 'nav_period' => array('Период', 'Period'), 'nav_more' => array('Дополнительно', 'More'), 'nav_select_period' => array('Выбор периода', 'Select period'), 'nav_today' => array('за сегодня', 'today'), 'nav_today_title' => array('Смотреть статистику за сегодня по часам', 'View statistic for today by hours'), 'nav_yesterday' => array('вчера', 'yesterday'), 'nav_yesterday_title' => array('Смотреть статистику за вчера по часам', 'View statistic for yesterday by hours'), 'nav_week' => array('за неделю', 'last week'), 'nav_week_title' => array('Смотреть статистику за прошедшую неделю по дням', 'View statistic for the last week by days'), 'nav_month' => array('за месяц', 'last month'), 'nav_month_title' => array('Смотреть статистику за прошедший месяц по дням', 'View statistic for the last month by days'), 'nav_all' => array('за все время', 'all time'), 'nav_all_title' => array('Смотреть статистику за все время по месяцам', 'View statistic for all time by months'), 'nav_analyze_page' => array('Просмотры выбранной страницы', 'Analyzing page'), 'select_date' => array('Выбрать дату', 'Select date'), 'nav_use_filter' => array('использовать фильтр', 'use filter'), 'nav_edit_filter' => array('настроить', 'edit'), 'nav_show' => array('показать', 'show'), 'dayweek_0' => array('Понедельник', 'Monday'), 'dayweek_1' => array('Вторник', 'Tuesday'), 'dayweek_2' => array('Среда', 'Wednesday'), 'dayweek_3' => array('Четверг', 'Thursday'), 'dayweek_4' => array('Пятница', 'Friday'), 'dayweek_5' => array('Суббота', 'Saturday'), 'dayweek_6' => array('Воскресенье', 'Sunday'), 'sm_dayweek_0' => array('Пон', 'Mon'), 'sm_dayweek_1' => array('Вт', 'Tue'), 'sm_dayweek_2' => array('Ср', 'Wed'), 'sm_dayweek_3' => array('Чет', 'Thu'), 'sm_dayweek_4' => array('Пят', 'Fri'), 'sm_dayweek_5' => array('Суб', 'Sat'), 'sm_dayweek_6' => array('Вос', 'Sun'), 'month_1' => array('Январь', 'January'), 'month_2' => array('Февраль', 'February'), 'month_3' => array('Март', 'March'), 'month_4' => array('Апрель', 'April'), 'month_5' => array('Май', 'May'), 'month_6' => array('Июнь', 'June'), 'month_7' => array('Июль', 'July'), 'month_8' => array('Август', 'August'), 'month_9' => array('Сентябрь', 'September'), 'month_10' => array('Октябрь', 'October'), 'month_11' => array('Ноябрь', 'November'), 'month_12' => array('Декабрь', 'December'), 'sm_month_1' => array('Янв', 'Jan'), 'sm_month_2' => array('Фев', 'Feb'), 'sm_month_3' => array('Мар', 'Mar'), 'sm_month_4' => array('Апр', 'Apr'), 'sm_month_5' => array('Май', 'May'), 'sm_month_6' => array('Июн', 'Jun'), 'sm_month_7' => array('Июл', 'Jul'), 'sm_month_8' => array('Авг', 'Aug'), 'sm_month_9' => array('Сен', 'Sep'), 'sm_month_10' => array('Окт', 'Oct'), 'sm_month_11' => array('Ноя', 'Nov'), 'sm_month_12' => array('Дек', 'Dec'), 'ok' => array('  OK  ', '  OK  '), 'reset' => array('Сброс', 'Reset'), 'find' => array('Найти', 'Find'), 'search' => array('Поиск', 'Search'), 'help' => array('Поиск ведется по шаблону для выражения LIKE', 'Search by the template for LIKE statement'), 'count_find' => array('Всего найдено', 'Find sum total'), 'not_find' => array('По Вашему запросу ничего не найдено', 'Nothing was found'), 'all' => array('-- все --', '-- all --'), 'alias_for' => array('алиас для', 'alias for'), 'site_selection' => array('Выбор сайта', 'Site selection'), 'site' => array('Сайт', 'Site'));
     // Определяем дополнительные отчеты:
     $reklama_str = "";
     if (isset($_GET['adv']['reklama'])) {
         $identifiers = explode(', ', $_GET['adv']['reklama']);
         $reklama_str = " (";
         foreach ($identifiers as $k2 => $v2) {
             $reklama_str .= "page.uri like '***from=" . $v2 . "'";
             if ($k2 < count($identifiers) - 1) {
                 $reklama_str .= " OR ";
             }
         }
         $reklama_str .= ")";
     }
     $advanced = array('server' => array('title' => 't_from_server', 'exclude' => array('stat/stat_ref_server', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => "", 'where' => "sess.host='%s'"), 'search_ph' => array('title' => 't_from_search_ph', 'exclude' => array('stat/stat_search_ph', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => "LEFT JOIN " . STAT_PAGES_TABLE . " AS pag ON pag.id=sess.ref_id", 'where' => "pag.search_ph='%s'"), 'points' => array('title' => 't_points', 't_name' => "SELECT CONCAT('http://', host, uri) FROM " . STAT_PAGES_TABLE . " WHERE id=%u", 'exclude' => array('stat/stat_points', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "sess.first_page='%u'"), 'outs' => array('title' => 't_outs', 't_name' => "SELECT CONCAT('http://', host, uri) FROM " . STAT_PAGES_TABLE . " WHERE id=%u", 'exclude' => array('stat/stat_outs', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "sess.last_page='%u'"), 'ip' => array('title' => 't_ip', 'exclude' => array('stat/stat_ip', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "IF(ip<0, INET_NTOA(ip+4294967296), INET_NTOA(ip))='%s'"), 'robot' => array('title' => 't_robot', 'exclude' => array(), 'join' => '', 'where' => ''), 'client' => array('title' => 't_client', 'exclude' => array('stat/stat_clients', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "sess.client_id='%u'"), 'country' => array('title' => 't_country', 't_name' => "SELECT name_" . (Lang() == 'ru' ? 'ru' : 'en') . " FROM " . STAT_COUNTRIES_TABLE . " WHERE country_id='%s'", 'exclude' => array('stat/stat_geography', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "sess.country='%s'"), 'robots' => array('title' => 't_robots', 't_name' => "SELECT name_" . (Lang() == 'ru' ? 'ru' : 'en') . " FROM " . STAT_COUNTRIES_TABLE . " WHERE country_id='%s'", 'exclude' => array('stat/stat_geography', 'stat/stat_robots', 'stat/stat_settings', 'stat/stat_now'), 'join' => '', 'where' => "sess.country='%s'"), 'path' => array('title' => 't_path', 'exclude' => array('stat/stat_popular', 'stat/stat_pathes', 'stat/stat_points', 'stat/stat_outs', 'stat/stat_robots', 'stat/stat_now'), 'join' => "", 'where' => "sess.path = '%s'"), 'ref_page' => array('title' => 't_ref_page', 'exclude' => array('stat/stat_ref_server', 'stat/stat_ref_pages', 'stat/stat_popular', 'stat/stat_robots', 'stat/stat_now'), 'join' => "LEFT JOIN " . STAT_PAGES_TABLE . " AS pag ON pag.id=sess.ref_id", 'where' => "sess.ref_id <> 0 AND CONCAT(pag.host,pag.uri) = '%s'"), 'see_page' => array('title' => 't_see_page', 'exclude' => array(), 'join' => "", 'where' => "LENGTH(sess.path)-LENGTH(REPLACE(sess.path,' ',''))+1 %s"), 'reklama' => array('title' => 't_reklama', 'exclude' => array('stat/stat_reklama', 'stat/stat_robots', 'stat/stat_error', 'stat/stat_popular'), 'join' => "LEFT JOIN " . STAT_PAGES_TABLE . " AS page ON page.id=sess.first_page", 'where' => $reklama_str));
     // Если есть дополнительный отчет
     $this->MakeAdvanced($advanced);
 }
开发者ID:romlg,项目名称:cms36,代码行数:27,代码来源:stat.php

示例3: TCities

 function TCities()
 {
     global $str, $actions;
     TStat::TStat();
     $actions[str_replace('/', '__', $this->name)] = array('view_table' => &$actions['tstat']['view_table']);
     $str[get_class_name($this)] = $str['tstat'] + array('unknown_city' => array('Город неопределен', 'Uknown city'), 'city' => array('Город (Область)', 'Cities (Region)'), 'visitors' => array('Посетители', 'Visitors'), 'tip' => array('Отчет расскажет вам, в каких городах интересно то, о чем вы хотите рассказать на вашем сайте.', ''));
     // На каком языке писать название страны
     $this->country_lang = Lang() == 'ru' ? 'ru' : 'en';
 }
开发者ID:romlg,项目名称:cms36,代码行数:9,代码来源:stat_cities.php

示例4: TGeography

 function TGeography()
 {
     global $str, $actions;
     TStat::TStat();
     $actions[str_replace('/', '__', $this->name)] = array('view_table' => &$actions['tstat']['view_table'], 'view_diag' => &$actions['tstat']['view_diag'], 'view_csv' => &$actions['tstat']['view_csv']);
     $str[get_class_name($this)] = $str['tstat'] + array('countries' => array('Страны', 'Countries'), 'country' => array('Страна', 'Country'), 'visitors' => array('Посетители', 'Visitors'), 'tip' => array('Отчет расскажет вам, в каких странах интересно то, о чем вы хотите рассказать на вашем сайте.', ''));
     // На каком языке писать название страны
     $this->country_lang = Lang() == 'ru' ? 'ru' : 'en';
 }
开发者ID:romlg,项目名称:cms36,代码行数:9,代码来源:stat_geography.php

示例5: create_key

 /**
  * 创建关键字或绑定
  * @param unknown $info
  * @return multitype:number string Ambigous <boolean, void, multitype:, string>
  */
 public function create_key($info)
 {
     $result = array('error' => 0, 'content' => '');
     $data = yf_set_insert($info);
     $sql = "INSERT INTO " . $this->table('wxkeyword') . " (" . $data['key'] . ") VALUES(" . $data['val'] . ")";
     if (!($res = $this->query($sql))) {
         $result['error'] = 1;
         $result['content'] = Lang('SQL_ERROR');
     }
     return $result;
 }
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:16,代码来源:wxkeyModel.php

示例6: delsql

 /**
  * 删除已备份的数据库文件
  */
 public function delsql()
 {
     $file_name = empty($_GET['file_name']) ? '' : trim($_GET['file_name']);
     $filename = TEMP_PATH . '/sqldata/' . $file_name;
     $result = array('error' => 1, 'content' => Lang('INVALID_OPERATION'));
     if (is_file($filename)) {
         @unlink($filename);
         $result['error'] = 0;
         $result['content'] = Lang('VALID_OPERATION');
     }
     $this->showMsg($result);
 }
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:15,代码来源:sysController.php

示例7: sumbit

 public function sumbit()
 {
     $info['name'] = isset($_POST['name']) ? $_POST['name'] : '';
     $info['phone'] = isset($_POST['phone']) ? $_POST['phone'] : '';
     $info['email'] = isset($_POST['email']) ? $_POST['email'] : '';
     $info['content'] = isset($_POST['content']) ? $_POST['content'] : '';
     if (Model('msg')->insert_msg($info)) {
         $this->showMsg(Lang('VALID_OPERATION'), 'index.php');
     } else {
         $this->showMsg(Lang('INVALID_OPERATION'));
     }
 }
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:12,代码来源:msgController.php

示例8: assign_global

 public function assign_global($config = array())
 {
     $cfg = Model('app')->get_cfg();
     if (isset($config['c'])) {
         foreach ($config['c'] as $k => $v) {
             if (isset($cfg[$k])) {
                 $cfg[$k] = $v;
             }
         }
     }
     C($cfg);
     C('lang', DEFAULT_LANG);
     //样式路径
     $path = SUBDIR . "/Home/Webroot/" . C('home_tpl') . '/';
     $this->set_tpl_dir('', C('home_tpl'));
     C('hy_path', $path);
     //配置
     $this->assign('_GET', $_GET);
     $this->assign('_C', C());
     $this->assign('_L', Lang());
 }
开发者ID:gzwyufei,项目名称:wxqiaqia,代码行数:21,代码来源:appController.php

示例9: admin_priv

 /**
  *  权限管理
  * @access public
  * @param $action 权限名
  *  @param $type 消息类型
  * @return void
  */
 public function admin_priv($action, $type = 1)
 {
     $priv_id = Model('app')->get_action_id($action);
     if ($_SESSION['admin_action'] == '-1') {
         return true;
     }
     $admin_mod = explode(",", $_SESSION['admin_mod']);
     if (!in_array($priv_id, $admin_mod)) {
         if ($_POST) {
             $result = array('error' => 1, 'content' => Lang('PERMISSION_DENIED'));
             $this->showMsg($result);
         } else {
             if (strpos($_GET['a'], 'del') !== false) {
                 $result = array('error' => 1, 'content' => Lang('PERMISSION_DENIED'));
                 $this->showMsg($result);
             }
             echo "你没有操作的权限";
             exit;
         }
         return false;
     } else {
         return true;
     }
 }
开发者ID:gzwyufei,项目名称:wxqiaqia,代码行数:31,代码来源:appController.php

示例10: backup

 /**
  * 备份数据库数据
  * @return 
  */
 public function backup()
 {
     $db = $this->db;
     global $prefix;
     $path = ROOT_PATH . '/Temp/sqldata';
     $mask = file_exists($path);
     $result = array('error' => 1, 'content' => '');
     if ($mask === false) {
         $warning = sprintf(Lang('dir_not_exist'), $path);
         $result['content'] = $warning;
         return $result;
     } elseif ($mask != 15) {
         $warning = sprintf(Lang('dir_priv'), $path);
         if (($mask & 1) < 1) {
             $warning .= Lang('cannot_read');
         }
         if (($mask & 2) < 1) {
             $warning .= Lang('cannot_write');
         }
         if (($mask & 4) < 1) {
             $warning .= Lang('cannot_add');
         }
         if (($mask & 8) < 1) {
             $warning .= Lang('cannot_modify');
         }
         $result['content'] = $warning;
         return $result;
     }
     /* 设置最长执行时间为5分钟 */
     @set_time_limit(300);
     /* 初始化 */
     $dump = new sql_dumpDB($db);
     $run_log = ROOT_PATH . '/Temp/sqldata/run.log';
     /* 初始化输入变量 */
     if (empty($_REQUEST['sql_file_name'])) {
         $sql_file_name = $dump->get_random_name();
     } else {
         $sql_file_name = str_replace("0xa", '', trim($_REQUEST['sql_file_name']));
         // 过滤 0xa 非法字符
         $pos = strpos($sql_file_name, '.sql');
         if ($pos !== false) {
             $sql_file_name = substr($sql_file_name, 0, $pos);
         }
     }
     $max_size = empty($_REQUEST['vol_size']) ? 0 : intval($_REQUEST['vol_size']);
     $vol = empty($_REQUEST['vol']) ? 1 : intval($_REQUEST['vol']);
     $is_short = empty($_REQUEST['ext_insert']) ? false : true;
     $dump->is_short = $is_short;
     /* 变量验证 */
     $allow_max_size = intval(@ini_get('upload_max_filesize'));
     //单位M
     if ($allow_max_size > 0 && $max_size > $allow_max_size * 1024) {
         $max_size = $allow_max_size * 1024;
         //单位K
     }
     if ($max_size > 0) {
         $dump->max_size = $max_size * 1024;
     }
     /* 获取要备份数据列表 */
     $type = empty($_POST['type']) ? 'full' : trim($_POST['type']);
     $tables = array();
     switch ($type) {
         case 'full':
             $except = array($prefix . 'sessions', $prefix . 'sessions_data');
             $temp = $db->GetCol("SHOW TABLES LIKE '" . mysql_like_quote($prefix) . "%'");
             foreach ($temp as $table) {
                 if (in_array($table, $except)) {
                     continue;
                 }
                 $tables[$table] = -1;
             }
             $dump->put_tables_list($run_log, $tables);
             break;
         case 'stand':
             $temp = array('admin_user', 'area_region', 'article', 'article_cat', 'attribute', 'brand', 'cart', 'category', 'comment', 'goods', 'goods_attr', 'goods_cat', 'goods_gallery', 'goods_type', 'group_goods', 'link_goods', 'member_price', 'order_action', 'order_goods', 'order_info', 'payment', 'region', 'shipping', 'shipping_area', 'shop_config', 'user_address', 'user_bonus', 'user_rank', 'users', 'virtual_card');
             foreach ($temp as $table) {
                 $tables[$ecs->prefix . $table] = -1;
             }
             $dump->put_tables_list($run_log, $tables);
             break;
         case 'min':
             $temp = array('attribute', 'brand', 'cart', 'category', 'goods', 'goods_attr', 'goods_cat', 'goods_gallery', 'goods_type', 'group_goods', 'link_goods', 'member_price', 'order_action', 'order_goods', 'order_info', 'shop_config', 'user_address', 'user_bonus', 'user_rank', 'users', 'virtual_card');
             foreach ($temp as $table) {
                 $tables[$ecs->prefix . $table] = -1;
             }
             $dump->put_tables_list($run_log, $tables);
             break;
         case 'custom':
             foreach ($_POST['customtables'] as $table) {
                 $tables[$table] = -1;
             }
             $dump->put_tables_list($run_log, $tables);
             break;
     }
     /* 开始备份 */
     $tables = $dump->dump_table($run_log, $vol);
//.........这里部分代码省略.........
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:101,代码来源:sysModel.php

示例11: DrawFooter

 function DrawFooter()
 {
     $aString = explode("_", str_replace("]", "]_", str_replace("[", "_[", Lang("Powered by [AWSTART]AWStats[END]. Made beautiful by [JAWSTART]JAWStats Web Statistics and Analytics[END]."))));
     for ($i = 0; $i < count($aString); $i++) {
         if (strlen(trim($aString[$i])) > 0 && substr($aString[$i], 0, 1) != "[" && substr($aString[$i + 1], 0, 5) != "[END]") {
             $aString[$i] = "<span>" . $aString[$i] . "</span>";
         } else {
             switch ($aString[$i]) {
                 case "[AWSTART]":
                     $aString[$i] = "<a href=\"http://www.awstats.org/\" target=\"_blank\">";
                     break;
                 case "[END]":
                     $aString[$i] = "</a>";
                     break;
                 case "[JAWSTART]":
                     $aString[$i] = "<a href=\"http://jawstats.com/\" target=\"_blank\">";
                     break;
             }
         }
     }
     return implode($aString);
 }
开发者ID:renzg,项目名称:JAWStats,代码行数:22,代码来源:clsPage.php

示例12: Error

function Error($sReason, $sExtra = "")
{
    // echo "ERROR!<br />" . $sReason;
    switch ($sReason) {
        case "BadConfig":
            $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("There is an error in [FILENAME]"));
            $sResolution = "<p>" . str_replace("[VARIABLE]", "<i>" . $sExtra . "</i>", Lang("The variable [VARIABLE] is missing or invalid.")) . "</p>";
            break;
        case "BadConfigNoSites":
            $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("There is an error in [FILENAME]"));
            $sResolution = "<p>" . Lang("No individual AWStats configurations have been defined.") . "</p>";
            break;
        case "CannotLoadClass":
            $sProblem = str_replace("[FILENAME]", "\"clsAWStats.php\"", Lang("Cannot find required file [FILENAME]"));
            $sResolution = "<p>" . Lang("At least one file required by JAWStats has been deleted, renamed or corrupted.") . "</p>";
            break;
        case "CannotLoadConfig":
            $sProblem = str_replace("[FILENAME]", "\"config.php\"", Lang("Cannot find required file [FILENAME]"));
            $sResolution = "<p>" . str_replace("[CONFIGDIST]", "<i>config.dist.php</i>", str_replace("[CONFIG]", "<i>config.php</i>", Lang("JAWStats cannot find it's configuration file, [CONFIG]. Did you successfully copy and rename the [CONFIGDIST] file?"))) . "</p>";
            break;
        case "CannotLoadLanguage":
            $sProblem = str_replace("[FILENAME]", "\"languages/translations.php\"", Lang("Cannot find required file [FILENAME]"));
            $sResolution = "<p>" . Lang("At least one file required by JAWStats has been deleted, renamed or corrupted.") . "</p>";
            break;
        case "CannotOpenLog":
            $aConfig = $GLOBALS["aConfig"][$GLOBALS["g_sConfig"]];
            $sStatsPath = $aConfig["statspath"];
            /* 	$aConfig = $GLOBALS["aConfig"][$GLOBALS["g_sConfig"]];
                 $sStatsPath = $aConfig["statspath"];
                 $sStatsName = "awstats" . date("mY") . "." . $GLOBALS["g_sConfig"];
                 $parts = array_key_exists("parts", $aConfig)?$aConfig["parts"]:NULL;
                 if (strlen($parts) > 0) {
                 $arr=explode(",",$parts);
                 $sStatsName.=".".$arr[0];
                 }
                 $sStatsName.=".txt";
                 if ($GLOBALS["bUTF8LogFiles"])
                 $sStatsName .= ".utf8";
                */
            $sProblem = Lang("JAWStats could not open an AWStats log file");
            $sResolution = "<p>" . Lang("Is the specified AWStats log file directory correct? Does it have a trailing slash?") . "<br />" . str_replace("[VARIABLE]", "<strong>\"statspath\"</strong>", str_replace("[CONFIG]", "<i>config.php</i>", Lang("The problem may be the variable [VARIABLE] in your [CONFIG] file."))) . "</p>" . "<p>" . str_replace("[FOLDER]", "<strong>" . $sStatsPath . "</strong>\n", str_replace("[FILE]", "<strong>" . $sExtra . "</strong>", Lang("The data file being looked for is [FILE] in folder [FOLDER]")));
            if (substr($sStatsPath, -1) != "/") {
                $sResolution .= "<br />" . str_replace("[FOLDER]", "<strong>" . $sStatsPath . "/</strong>", Lang("Try changing the folder to [FOLDER]"));
            }
            $sResolution .= "</p>";
            $sResolution .= "<p> Last PHP Error Message : " . $GLOBALS["errstr"] . "</p>";
            break;
        case "NoLogsFound":
            $sStatsPath = $GLOBALS["aConfig"][$GLOBALS["g_sConfig"]]["statspath"];
            $sProblem = Lang("No AWStats Log Files Found");
            $sResolution = "<p>JAWStats cannot find any AWStats log files in the specified directory: <strong>" . $sStatsPath . "</strong><br />" . "Is this the correct folder? Is your config name, <i>" . $GLOBALS["g_sConfig"] . "</i>, correct?</p>\n";
            if ($GLOBALS["bUTF8LogFiles"]) {
                $sResolution .= "<p> Note : I was looking for files with '.utf8' extension, as specified in the configuration file</p>";
            }
            break;
        case "Unknown":
            $sProblem = "";
            $sResolution = "<p>" . $sExtra . "</p>\n";
            break;
    }
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " . "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" . "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" . "<head>\n" . "<title>JAWStats</title>\n" . "<style type=\"text/css\">\n" . "html, body { background: #33332d; border: 0; color: #eee; font-family: arial, helvetica, sans-serif; font-size: 15px; margin: 20px; padding: 0; }\n" . "a { color: #9fb4cc; text-decoration: none; }\n" . "a:hover { color: #fff; text-decoration: underline; }\n" . "h1 { border-bottom: 1px solid #cccc9f; color: #eee; font-size: 22px; font-weight: normal; } \n" . "h1 span { color: #cccc9f !important; font-size: 16px; } \n" . "p { margin: 20px 30px; }\n" . "</style>\n" . "</head>\n<body>\n" . "<h1><span>" . Lang("An error has occured") . ":</span><br />" . $sProblem . "</h1>\n" . $sResolution . "<p>" . str_replace("[LINKSTART]", "<a href=\"http://www.jawstats.com/documentation\" target=\"_blank\">", str_replace("[LINKEND]", "</a>", Lang("Please refer to the [LINKSTART]installation instructions[LINKEND] for more information."))) . "</p>\n" . "</body>\n</html>";
    exit;
}
开发者ID:renzg,项目名称:JAWStats,代码行数:63,代码来源:index.php

示例13: ToolUpdateSite

function ToolUpdateSite()
{
    if ($GLOBALS["bConfigUpdateSites"] != true) {
        return "";
    }
    // create html
    $aHTML = array();
    $aHTML[] = "<div id=\"toolUpdate\" class=\"tool\">\n<div>";
    $aHTML[] = "<h1>" . Lang("Please enter the password to update this site") . "<span onclick=\"ShowTools('toolUpdate')\">(" . Lang("Cancel") . ")</span></h1>\n<div id=\"siteupdate\">";
    $aHTML[] = "<input type=\"password\" id=\"password\" onkeyup=\"UpdateSiteKeyUp(event)\" />";
    $aHTML[] = "<input type=\"button\" onclick=\"UpdateSite()\" value=\"" . Lang("Update") . "\" />";
    $aHTML[] = "</div>\n</div>\n</div>";
    return implode($aHTML, "\n");
}
开发者ID:holandacz,项目名称:nb4,代码行数:14,代码来源:clsAWStats.php

示例14: saveInfo

 /**
  * 保存用户资料
  * @param array $info
  * @return boolean
  */
 function saveInfo($info = array())
 {
     $where = '';
     $update_pwd = false;
     foreach ($info as $k => $v) {
         if ($v != '') {
             if ($k == 'password') {
                 $where .= " {$k}='" . md5($v) . "',";
                 $update_pwd = true;
             } else {
                 $where .= " {$k}='{$v}',";
             }
         }
     }
     $where .= "modified=" . $_SERVER['REQUEST_TIME'];
     $result == array('error' => 0, 'content' => '');
     $sql = "UPDATE " . $this->table('admin') . " SET " . $where . " WHERE id='" . session('admin_id') . "'";
     if ($res = $this->query($sql)) {
         if ($update_pwd) {
             $result['error'] = -1;
         }
     } else {
         $result['error'] = 1;
         $result['content'] = Lang('SQL_ERROR');
     }
     return $result;
     //invalid_operation
 }
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:33,代码来源:adminModel.php

示例15: update_menu

 /**
  * 更新菜单信息
  */
 public function update_menu()
 {
     $this->admin_priv('edit_wx_menu');
     $menu = isset($_POST) ? $_POST : '';
     $result = array('error' => 1, 'content' => '');
     $wm = Model('wxmenu');
     if (empty($menu['name'])) {
         $result['content'] = Lang('NAME_EMPTY');
         $this->showMsg($result);
     }
     $old_pid = $menu['old_pid'];
     unset($menu['old_pid']);
     if ($old_pid != $menu['parent_id']) {
         if ($menu['parent_id'] == 0) {
             if (count($wm->get_parent_menu()) > 2) {
                 $result['content'] = '根目录菜单不能超过三个';
                 $this->showMsg($result);
             }
         } else {
             if (count($wm->get_child_menu($menu['parent_id'])) > 4) {
                 $result['content'] = '子目录菜单不能超过五个';
                 $this->showMsg($result);
             }
         }
     }
     if ($menu['type'] == 1) {
         unset($menu['rule']);
     } else {
         unset($menu['url']);
     }
     $id = $menu['id'];
     unset($menu['id']);
     $res = $wm->update($menu, array('id' => $id, 'table' => 'wxmenu'));
     if ($res) {
         $result['error'] = 0;
         $result['content'] = Lang('SUCCESS_edit');
     } else {
         $result['content'] = Lang('INVALID_OPERATION');
     }
     $this->showMsg($result);
 }
开发者ID:gzwyufei,项目名称:yfqiaqia,代码行数:44,代码来源:wxmenuController.php


注:本文中的Lang函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。