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


PHP lang::get方法代码示例

本文整理汇总了PHP中lang::get方法的典型用法代码示例。如果您正苦于以下问题:PHP lang::get方法的具体用法?PHP lang::get怎么用?PHP lang::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lang的用法示例。


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

示例1: send

 /**
  * 发送简历
  */
 function send()
 {
     if (input::getInput("post")) {
         $back = sf::getModel("backs");
         $back->setSubject(input::getInput("post.subject"));
         $back->setUserName(input::getInput("post.user_name"));
         $back->setUserSex(input::getInput("post.user_sex"));
         $back->setUserAge(input::getInput("post.user_age"));
         $back->setUserDegree(input::getInput("post.user_degree"));
         $back->setIdcard(input::getInput("post.idcard"));
         $back->setUserPhone(input::getInput("post.user_phone"));
         $back->setUserIm(input::getInput("post.user_im"));
         $back->setUserEmail(input::getInput("post.user_email"));
         $back->setUserAddress(input::getInput("post.user_address"));
         $back->setPostCode(input::getInput("post.post_code"));
         $back->setWorkAt(input::getInput("post.work_at"));
         $back->setStudyList(input::getInput("post.study_list"));
         $back->setWorkList(input::getInput("post.work_list"));
         $back->setUpdatedAt(date("Y-m-d H:i:s"));
         $back->save();
         $this->page_debug(lang::get("Has been saved!"), site_url("job/index"));
     }
     view::set("job", sf::getModel("jobs", input::getInput("get.id")));
     view::apply("inc_body", "template/job_send");
     view::display("template/page");
 }
开发者ID:GitBeBest,项目名称:sf-framwork,代码行数:29,代码来源:Job.php

示例2: checkAddon

 public static function checkAddon($addons)
 {
     $return = '';
     foreach ($addons as $name => $version) {
         if (is_int($name)) {
             $name = $version;
             $version = false;
         }
         if (isset(rp::get('addons')[$name])) {
             $config = rp::get('addons')[$name];
         }
         if (!isset($config) || !is_array($config)) {
             $return .= sprintf(lang::get('addon_not_found'), $name);
             continue;
         }
         if (!addonConfig::isActive($name)) {
             $return .= sprintf(lang::get('addon_not_install_active'), $name);
             continue;
         }
         if (rp::checkVersion($config['version'], $version) === false) {
             $return .= sprintf(lang::get('addon_need_version'), $name, $version);
             continue;
         }
     }
     if ($return == '') {
         return true;
     } else {
         return $return;
     }
 }
开发者ID:DINKIN,项目名称:rokket,代码行数:30,代码来源:need.php

示例3: getSql

 public static function getSql($name)
 {
     if (!isset(self::$slots[$name])) {
         throw new Exception(sprintf(lang::get('slot_name_not_exist'), $name));
     }
     return self::$slots[$name];
 }
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:7,代码来源:slot.php

示例4: formBlock

 public static function formBlock($module)
 {
     $form = form::factory('module', 'id=' . $module->getModulId(), 'index.php');
     $form->setSave(false);
     $form->addFormAttribute('class', '');
     $form->setSuccessMessage(null);
     $input = $module->OutputFilter($form->get('input'), $module->getSql());
     $form->addRawField($input);
     $form->addHiddenField('structure_id', $module->getStructureId());
     if ($module->getId()) {
         $form->setMode('edit');
         $online = $module->get('online');
     } else {
         $form->setMode('add');
         $online = 1;
         $form->delButton('save-back');
     }
     $form->addHiddenField('modul', $module->getModulId());
     $form->addHiddenField('sort', $module->getSort());
     $field = $form->addRadioField('online', $online);
     $field->fieldName(lang::get('block_status'));
     $field->add(1, lang::get('online'));
     $field->add(0, lang::get('offline'));
     $form->addHiddenField('id', $module->getId());
     $form->addParam('structure_id', type::super('structure_id', 'int'));
     return $form;
 }
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:27,代码来源:html.php

示例5: __construct

 public function __construct($host, $user, $pass)
 {
     $this->sftp = new Net_SFTP($host);
     if (!$this->sftp->login($user, $pass)) {
         echo message::danger(lang::get('sftp_login_failed'), false);
     }
 }
开发者ID:DINKIN,项目名称:rokket,代码行数:7,代码来源:sftp.php

示例6: deleteFile

 public static function deleteFile($id)
 {
     $values = [];
     for ($i = 1; $i <= 10; $i++) {
         $values[] = '`media' . $i . '` = ' . $id;
     }
     for ($i = 1; $i <= 10; $i++) {
         $values[] = '`medialist' . $i . '` LIKE "%|' . $id . '|%"';
     }
     $sql = sql::factory();
     $sql->query('SELECT id FROM ' . sql::table('structure_area') . ' WHERE ' . implode(' OR ', $values))->result();
     if ($sql->num()) {
         echo message::warning(lang::get('file_in_use'));
     } else {
         $sql = sql::factory();
         $sql->setTable('media');
         $sql->setWhere('id=' . $id);
         $sql->select('filename');
         $sql->result();
         if (unlink(dir::media($sql->get('filename')))) {
             $sql->delete();
             return message::success(lang::get('file_deleted'), true);
         } else {
             return message::warning(sprintf(lang::get('file_not_deleted'), dyn::get('hp_url'), $sql->get('filename')), true);
         }
     }
 }
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:27,代码来源:mediaUtils.php

示例7: getIsHotStr

 function getIsHotStr()
 {
     if (parent::getIsHot() > 0) {
         return lang::get('Is hot');
     }
     //else return lang::get('Is normal');
 }
开发者ID:GitBeBest,项目名称:sf-framwork,代码行数:7,代码来源:Products.model.php

示例8: write

 /** 
  * 写日志 
  * 
  * @param string $s_message 日志信息 
  * @param string $s_type    日志类型 
  */
 public static function write($s_message, $s_type = 'log')
 {
     // 检查日志目录是否可写
     if (!is_dir(config::get("log_dir"))) {
         @mkdir(config::get("log_dir"));
         chmod(config::get("log_dir"), 0777);
     }
     if (!is_writable(config::get("log_dir"))) {
         throw new sfException(lang::get('LOG_PATH is not writeable !'));
     }
     $s_now_time = date('[Y-m-d H:i:s]');
     $s_now_day = date('Y_m_d');
     // 根据类型设置日志目标位置
     $s_target = config::get("log_dir");
     switch ($s_type) {
         case 'debug':
             $s_target .= '/Out_' . $s_now_day . '.log';
             break;
         case 'error':
             $s_target .= '/Err_' . $s_now_day . '.log';
             break;
         default:
             $s_target .= '/Log_' . $s_now_day . '.log';
             break;
     }
     //检测日志文件大小, 超过配置大小则重命名
     if (file_exists($s_target) && self::$max_size <= filesize($s_target)) {
         $s_file_name = substr(basename($s_target), 0, strrpos(basename($s_target), '.log')) . '_' . time() . '.log';
         rename($s_target, dirname($s_target) . '/' . $s_file_name);
     }
     clearstatcache();
     // 写日志, 返回成功与否
     return error_log("{$s_now_time} {$s_message}\n", 3, $s_target);
 }
开发者ID:meetcd,项目名称:sofast,代码行数:40,代码来源:Log.php

示例9: run

 public function run()
 {
     include main::getPluginDir() . '/libs/classes/aws-autoloader.php';
     $ad = $this->params['access_details'];
     main::log(lang::get('Start copy files to Amazon S3', false));
     $files = $this->params['files'];
     $dir = isset($ad['dir']) ? $ad['dir'] : '/';
     $credentials = new Aws\Common\Credentials\Credentials($ad['AccessKeyId'], $ad['SecretAccessKey']);
     $client = Aws\S3\S3Client::factory(array('credentials' => $credentials));
     try {
         $n = count($files);
         for ($i = 0; $i < $n; $i++) {
             $filePath = preg_replace('#[/\\\\]+#', '/', BACKUP_DIR . '/' . $dir . '/' . $files[$i]);
             $key = $dir ? $dir . '/' . basename($filePath) : basename($filePath);
             $key = ltrim(preg_replace('#[/\\\\]+#', '/', $key), '/');
             //if first will be '/', file not will be uploaded, but result will be ok
             $putRes = $client->putObject(array("Bucket" => $ad['bucket'], 'Key' => $key, 'Body' => fopen($filePath, 'r+')));
             if (isset($putRes['RequestId']) && !empty($putRes['RequestId'])) {
                 main::log(str_replace('%s', basename($filePath), lang::get("File(%s) Upload successfully to Amazon S3", false)));
             }
         }
         main::log(lang::get('End copy files to Amazon S3', false));
     } catch (Exception $e) {
         main::log('Error send to Amazon s3: ' . $e->getMessage());
         $this->setError($e->getMessage());
         return false;
     } catch (S3Exception $e) {
         main::log('Error send to Amazon s3: ' . $e->getMessage());
         $this->setError($e->getMessage());
         return false;
     }
     return true;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:33,代码来源:send-to-s3.php

示例10: get_form

 /**
  * Return the generated form output.
  * @param array $args List of parameter values passed through to the form depending on how the form has been configured.
  * This array always contains a value for language.
  * @param object $node The Drupal node object.
  * @param array $response When this form is reloading after saving a submission, contains the response from the service call.
  * Note this does not apply when redirecting (in this case the details of the saved object are in the $_GET data).
  * @return Form HTML.
  */
 public static function get_form($args, $node, $response = null)
 {
     $reloadPath = self::get_reload_path();
     $auth = data_entry_helper::get_read_write_auth($args['website_id'], $args['password']);
     $r = "<form method=\"post\" id=\"entry_form\" action=\"{$reloadPath}\">\n";
     $r .= $auth['write'];
     data_entry_helper::$entity_to_load = array();
     if (!empty($_GET['termlists_term_id'])) {
         data_entry_helper::load_existing_record($auth['read'], 'termlists_term', $_GET['termlists_term_id']);
         // map fields to their appropriate supermodels
         data_entry_helper::$entity_to_load['term:term'] = data_entry_helper::$entity_to_load['termlists_term:term'];
         data_entry_helper::$entity_to_load['term:id'] = data_entry_helper::$entity_to_load['termlists_term:term_id'];
         data_entry_helper::$entity_to_load['meaning:id'] = data_entry_helper::$entity_to_load['termlists_term:meaning_id'];
         if (function_exists('hostsite_set_page_title')) {
             hostsite_set_page_title(lang::get('Edit {1}', data_entry_helper::$entity_to_load['term:term']));
         }
     }
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'website_id', 'default' => $args['website_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:id'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:termlist_id', 'default' => $args['termlist_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:preferred', 'default' => 't'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'term:id'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'term:language_id', 'default' => $args['language_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'meaning:id'));
     // request automatic JS validation
     data_entry_helper::enable_validation('entry_form');
     $r .= data_entry_helper::text_input(array('label' => lang::get('Term'), 'fieldname' => 'term:term', 'helpText' => lang::get('Please provide the term'), 'validation' => array('required'), 'class' => 'control-width-5'));
     $r .= "<input type=\"submit\" name=\"form-submit\" id=\"delete\" value=\"Delete\" />\n";
     $r .= "<input type=\"submit\" name=\"form-submit\" value=\"Save\" />\n";
     $r .= '<form>';
     self::set_breadcrumb($args);
     return $r;
 }
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:42,代码来源:term.php

示例11: proc

 public function proc()
 {
     //reg::setKey('/users/errorCountCapcha', system::POST('errorCountCapcha'));
     reg::setKey('/users/errorCountBlock', system::POST('errorCountBlock'));
     reg::setKey('/users/reg', system::POST('reg', isBool));
     reg::setKey('/users/activation', system::POST('activation', isBool));
     reg::setKey('/users/confirm', system::POST('confirm', isBool));
     reg::setKey('/users/ask_email', system::POST('ask_email', isBool));
     //авторизация чере соц. сети
     reg::setKey('/users/twitter_bool', system::POST('twitter_bool'), isBool);
     reg::setKey('/users/twitter_id', system::POST('twitter_id'), isString);
     reg::setKey('/users/twitter_secret', system::POST('twitter_secret'), isString);
     reg::setKey('/users/vk_bool', system::POST('vk_bool'), isBool);
     reg::setKey('/users/vk_id', system::POST('vk_id'), isString);
     reg::setKey('/users/vk_secret', system::POST('vk_secret'), isString);
     reg::setKey('/users/ok_bool', system::POST('ok_bool'), isBool);
     reg::setKey('/users/ok_id', system::POST('ok_id'), isString);
     reg::setKey('/users/ok_public', system::POST('ok_public'), isString);
     reg::setKey('/users/ok_secret', system::POST('ok_secret'), isString);
     reg::setKey('/users/facebook_bool', system::POST('facebook_bool'), isBool);
     reg::setKey('/users/facebook_id', system::POST('facebook_id'), isString);
     reg::setKey('/users/facebook_secret', system::POST('facebook_secret'), isString);
     reg::setKey('/users/yandex_bool', system::POST('yandex_bool'), isBool);
     reg::setKey('/users/google_bool', system::POST('google_bool'), isBool);
     ui::MessageBox(lang::get('CONFIG_SAVE_OK'), lang::get('CONFIG_SAVE_OK_MSG'));
     reg::clearCache();
     system::log(lang::get('CONFIG_LOG_SAVE'), warning);
     system::redirect('/users/settings');
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:29,代码来源:__settings.php

示例12: defAction

 public function defAction()
 {
     // Формируем список классов для быстрого добавления
     $types = ormClasses::get('user')->getAllInheritors();
     if (count($types) > 1) {
         $class_list = '';
         while (list($id, $name) = each($types)) {
             $bclass = ormClasses::get($id);
             $class_list .= '<li><a href="' . system::au() . '/users/user_add/0/' . $bclass->getSName() . '" >' . $bclass->getName() . '</a></li>';
         }
         $java = '<script> $("#usel").parent().css("width", "150px"); </script>';
         ui::newButton(lang::get('BTN_NEW_USER'), "/users/user_add", 'class_list', '<ul id="usel">' . $class_list . '</ul>' . $java);
     } else {
         ui::newButton(lang::get('BTN_NEW_USER'), "/users/user_add");
     }
     ui::newButton(lang::get('BTN_NEW_UGROUP'), "/users/group_add");
     $sel = new ormSelect('user_group');
     $sel->orderBy('name', asc);
     $table = new uiTable($sel);
     $table->showSearch(true);
     $table->addColumn('name', lang::get('USERS_TABLE_FIELD_5'), 0, true);
     $table->addColumn('children', lang::get('USERS_TABLE_FIELD_6'), 0, true, true, 'count');
     $table->defaultRight('userlist');
     $table->addRight('userlist', 'users', single);
     $table->addRight('group_upd', 'edit', single);
     $table->addRight('group_act', 'active', multi);
     $table->addRight('group_del', 'drop', multi);
     $table->setDelMessage(lang::get('USERS_DEL_TITLE2'), lang::get('USERS_DEL_TEXT2'));
     $table->setMultiDelMessage(lang::get('USERS_DEL_TITLE_MULTI2'), lang::get('USERS_DEL_TEXT_MULTI2'));
     return $table->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:31,代码来源:__grouplist.php

示例13: checkAddon

 public static function checkAddon($addons)
 {
     $return = '';
     foreach ($addons as $name => $version) {
         if (is_int($name)) {
             $name = $version;
             $version = false;
         }
         $config = addonConfig::getConfig($name);
         // Nicht installiert
         if (!is_array($config)) {
             $return .= sprintf(lang::get('addon_not_found'), $name);
             continue;
         }
         if (!addonConfig::isActive($name)) {
             $return .= sprintf(lang::get('addon_not_install_active'), $name);
             continue;
         }
         if ($version && $config['version'] < $version) {
             $return .= sprintf(lang::get('addon_need_version'), $name, $version);
             continue;
         }
     }
     if ($return == '') {
         return true;
     } else {
         return $return;
     }
 }
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:29,代码来源:need.php

示例14: defAction

 public function defAction()
 {
     function getSubscribersCount($id, $obj)
     {
         $sel = new ormSelect('subscribe_user');
         $sel->where('parents', '=', $id);
         return $sel->getCount();
     }
     ui::newButton(lang::get('SUBSCRIBE_BTN_ADD'), '/subscription/subscribe_add');
     $sel = new ormSelect('subscription');
     $sel->where('lang', '=', languages::curId());
     $sel->where('domain', '=', domains::curId());
     $table = new uiTable($sel);
     $table->formatValues(true);
     $table->addColumn('name', lang::get('SUBSCRIBE_TT1'), 200);
     $table->addColumn('last_subscribe', lang::get('SUBSCRIBE_TT2'), 200);
     $table->addColumn('id', lang::get('SUBSCRIBE_TT3'), 200, 0, 1, 'getSubscribersCount');
     $table->defaultRight('msg');
     $table->addRight('msg', 'list', single);
     $table->addRight('user', 'users', single);
     $table->addRight('subscribe_upd', 'edit', single);
     $table->addRight('subscribe_history', 'history', single);
     $table->addRight('subscribe_del', 'drop', multi);
     $table->addRight('subscribe_act', 'active', multi);
     $table->setDelMessage(lang::get('SUBSCRIBE_DEL_TITLE2'), lang::get('SUBSCRIBE_DEL_TEXT2'));
     $table->setMultiDelMessage(lang::get('SUBSCRIBE_DEL_TITLE_MULTI2'), lang::get('SUBSCRIBE_DEL_TEXT_MULTI2'));
     return $table->getHTML();
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:28,代码来源:__list.php

示例15: group_authorise_form

/**
 * List of methods that assist with handling recording groups.
 * @package Client
 * @subpackage PrebuiltForms.
 */
function group_authorise_form($args, $readAuth)
{
    if (!empty($args['limit_to_group_id']) && $args['limit_to_group_id'] !== (empty($_GET['group_id']) ? '' : $_GET['group_id'])) {
        // page owned by a different group, so throw them out
        hostsite_show_message(lang::get('This page is a private recording group page which you cannot access.'), 'alert');
        hostsite_goto_page('<front>');
    }
    if (!empty($_GET['group_id'])) {
        // loading data into a recording group. Are they a member or is the page public?
        // @todo: consider performance - 2 web services hits required to check permissions.
        if (hostsite_get_user_field('indicia_user_id')) {
            $gu = data_entry_helper::get_population_data(array('table' => 'groups_user', 'extraParams' => $readAuth + array('group_id' => $_GET['group_id'], 'user_id' => hostsite_get_user_field('indicia_user_id')), 'nocache' => true));
        } else {
            $gu = array();
        }
        $gp = data_entry_helper::get_population_data(array('table' => 'group_page', 'extraParams' => $readAuth + array('group_id' => $_GET['group_id'], 'path' => drupal_get_path_alias($_GET['q']))));
        if (count($gp) === 0) {
            hostsite_show_message(lang::get('You are trying to access a page which is not available for this group.'), 'alert');
            hostsite_goto_page('<front>');
        } elseif (count($gu) === 0 && $gp[0]['administrator'] !== NULL) {
            // not a group member, so throw them out
            hostsite_show_message(lang::get('You are trying to access a page for a group you do not belong to.'), 'alert');
            hostsite_goto_page('<front>');
        }
    }
}
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:groups.php


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