• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP language类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: run

 public function run()
 {
     $tpl = new template();
     $language = new language();
     $language->setModule('leads');
     $language->readIni();
     if (isset($_POST['save'])) {
         if (isset($_POST['name']) && isset($_POST['money']) && isset($_POST['referralSource'])) {
             $refValue = '';
             if ($_POST['referralValueOther'] != '') {
                 $refValue = $_POST['referralValueOther'];
             } else {
                 if ($_POST['referralSource'] == 5 && $_POST['referralValueClient'] > 0) {
                     $refValue = $_POST['referralValueClient'];
                 }
             }
             $values = array('name' => $_POST['name'], 'refSource' => $_POST['referralSource'], 'refValue' => $refValue, 'potentialMoney' => $_POST['money'], 'creatorId' => $_SESSION['userdata']['id']);
             $contact = array('name' => $_POST['clientName'], 'street' => $_POST['street'], 'zip' => $_POST['zip'], 'city' => $_POST['city'], 'state' => $_POST['state'], 'country' => $_POST['country'], 'phone' => $_POST['phone'], 'email' => $_POST['email'], 'internet' => $_POST['internet']);
             if ($this->isLead($values['name']) !== true) {
                 $leadId = $this->addLead($values);
                 $this->addLeadContact($contact, $leadId);
                 $tpl->setNotification('EDIT_SUCCESS', 'success');
             } else {
                 $tpl->setNotification('LEAD_EXISTS', 'error');
             }
         } else {
             $tpl->setNotification('MISSING_FIELDS', 'error');
         }
     }
     $client = new clients();
     $tpl->assign('referralSources', $this->getReferralSources());
     $tpl->assign('clients', $client->getAll());
     $tpl->display('leads.addLead');
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:34,代码来源:class.addLead.php


示例2: getAll

 public function getAll($notifyId = 0)
 {
     if ($notifyId == 0) {
         $notifyId = $this->getMaxId();
         $notifyId++;
     }
     $notifications = array("error" => false, "error_code" => ERROR_SUCCESS, "notifyId" => $notifyId, "notifications" => array());
     $stmt = $this->db->prepare("SELECT * FROM notifications WHERE notifyToId = (:notifyToId) AND id < (:notifyId) ORDER BY id DESC LIMIT 20");
     $stmt->bindParam(':notifyToId', $this->requestFrom, PDO::PARAM_INT);
     $stmt->bindParam(':notifyId', $notifyId, PDO::PARAM_INT);
     if ($stmt->execute()) {
         if ($stmt->rowCount() > 0) {
             while ($row = $stmt->fetch()) {
                 $time = new language($this->db, $this->language);
                 if ($row['notifyFromId'] == 0) {
                     $profileInfo = array("id" => 0, "state" => 0, "username" => "", "fullname" => "", "lowPhotoUrl" => "/img/profile_default_photo.png");
                 } else {
                     $profile = new profile($this->db, $row['notifyFromId']);
                     $profileInfo = $profile->get();
                     unset($profile);
                 }
                 $data = array("id" => $row['id'], "type" => $row['notifyType'], "itemId" => $row['itemId'], "fromUserId" => $profileInfo['id'], "fromUserState" => $profileInfo['state'], "fromUserUsername" => $profileInfo['username'], "fromUserFullname" => $profileInfo['fullname'], "fromUserPhotoUrl" => $profileInfo['lowPhotoUrl'], "createAt" => $row['createAt'], "timeAgo" => $time->timeAgo($row['createAt']));
                 array_push($notifications['notifications'], $data);
                 $notifications['notifyId'] = $row['id'];
                 unset($data);
             }
         }
     }
     return $notifications;
 }
开发者ID:JohnWilliamsMSU,项目名称:Steady,代码行数:30,代码来源:class.notify.inc.php


示例3: fetchProduct

 /**
  * Fetches the product and adds it as an article to the klarna class. No need to return any data.
  * Articles need to be set for fraud purpose, incorrect article means no_risk invoice. Hereby klarna will not take any risks.
  *
  * @param mixed $mProductId The product identified. Either int or string. Adapted according shop functionality
  * @param Klarna $oKlarna The Klarna class object. Used to set any articles
  * @return void
  */
 protected function fetchProduct($mProductId)
 {
     global $currencies, $currency;
     include DIR_WS_CLASSES . 'language.php';
     $lng = new language();
     if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
         $lng->set_language($HTTP_GET_VARS['language']);
     } else {
         $lng->get_browser_language();
     }
     $language = $lng->language['directory'];
     $languages_id = $lng->language['id'];
     $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int) $mProductId . "' and pd.products_id = p.products_id and pd.language_id = '" . (int) $languages_id . "'");
     $aProduct_info = tep_db_fetch_array($product_info_query);
     $sArtNo = MODULE_PAYMENT_KLARNA_ARTNO == 'id' || MODULE_PAYMENT_KLARNA_ARTNO == '' ? $aProduct_info['id'] : $aProduct_info['name'];
     $iTax = tep_get_tax_rate($aProduct_info['products_tax_class_id']);
     if (DISPLAY_PRICE_WITH_TAX == 'true') {
         $iPrice_with_tax = $currencies->get_value($currency) * $aProduct_info['products_price'];
     } else {
         $iPrice_with_tax = $currencies->get_value($currency) * $aProduct_info['products_price'] * ($iTax / 100 + 1);
     }
     // Add goods
     $this->oKlarna->addArticle(1, $sArtNo, $aProduct_info['products_name'], $iPrice_with_tax, $iTax, 0, KlarnaFlags::INC_VAT);
     $this->iSum += $iPrice_with_tax;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:33,代码来源:klarnamobile.php


示例4: getRightListSub

 private static function getRightListSub($rights, $setRights, $rid, $modul, $modul_name, $template, $RIGHT)
 {
     $str = '';
     reset($rights);
     while (list($key, $val) = each($rights)) {
         if ($val['mr_parent_id'] == $rid && $val['mr_mod_id'] == $modul) {
             $tmp = self::getRightListSub($rights, $setRights, $val['mr_id'], $modul, $modul_name, $template, $RIGHT);
             if (!empty($setRights) && array_key_exists($val['mr_id'], $setRights)) {
                 $checked = 'checked';
                 $value = $setRights[$val['mr_id']];
             } else {
                 $checked = '';
                 $value = 0;
             }
             page::assign("subright", $tmp);
             page::assign("right", $val['mr_name']);
             page::assign("right_id", $val['mr_id']);
             page::assign("checked", $checked);
             page::assign("value", $value);
             $pos = strpos($val['mr_name'], ' ');
             if ($pos) {
                 $lang_id = substr($val['mr_name'], 0, $pos);
                 $domain_id = substr($val['mr_name'], $pos + 1, strlen($val['mr_name']) - $pos);
                 $domain = new domain($domain_id);
                 $lang = new language($lang_id);
                 page::assign("right_name", $domain->getName() . ' (' . $lang->getName() . ')');
             } else {
                 $right_name = isset($RIGHT[$modul_name][$val['mr_name']]) ? $RIGHT[$modul_name][$val['mr_name']] : $val['mr_name'];
                 page::assign("right_name", $right_name);
             }
             $str .= page::parse($template);
         }
     }
     return $str;
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:35,代码来源:rights.php


示例5: listAvailableOrderingsForAdmin

 function listAvailableOrderingsForAdmin(&$config)
 {
     $this->init();
     $this->lang->init($GLOBALS['BE_USER']->uc['lang']);
     // get orderings
     $fieldLabel = $this->lang->sL('LLL:EXT:ke_search/locallang_db.php:tx_kesearch_index.relevance');
     $notAllowedFields = 'uid,pid,tstamp,crdate,cruser_id,starttime,endtime,fe_group,targetpid,content,params,type,tags,abstract,language,orig_uid,orig_pid,hash';
     if (!$config['config']['relevanceNotAllowed']) {
         $config['items'][] = array($fieldLabel . ' UP', 'score asc');
         $config['items'][] = array($fieldLabel . ' DOWN', 'score desc');
     }
     $res = $GLOBALS['TYPO3_DB']->sql_query('SHOW COLUMNS FROM tx_kesearch_index');
     while ($col = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
         if (TYPO3_VERSION_INTEGER >= 7000000) {
             $isInList = TYPO3\CMS\Core\Utility\GeneralUtility::inList($notAllowedFields, $col['Field']);
         } else {
             $isInList = t3lib_div::inList($notAllowedFields, $col['Field']);
         }
         if (!$isInList) {
             $file = $GLOBALS['TCA']['tx_kesearch_index']['columns'][$col['Field']]['label'];
             $fieldLabel = $this->lang->sL($file);
             $config['items'][] = array($fieldLabel . ' UP', $col['Field'] . ' asc');
             $config['items'][] = array($fieldLabel . ' DOWN', $col['Field'] . ' desc');
         }
     }
 }
开发者ID:brainformatik,项目名称:ke_search,代码行数:26,代码来源:class.tx_kesearch_classes_flexform.php


示例6: getSiteLanguage

function getSiteLanguage($get = null)
{
    $default = array('dir' => 'dutch', 'id' => '1', 'code' => 'nl');
    if (!tep_session_is_registered('language') || isset($_GET['language'])) {
        if (!tep_session_is_registered('language')) {
            tep_session_register('language');
            tep_session_register('languages_id');
            tep_session_register('languages_code');
        }
        include DIR_WS_CLASSES . 'language.php';
        $lng = new language();
        if (isset($_GET['language']) && tep_not_null($_GET['language'])) {
            $lng->set_language($_GET['language']);
        } else {
            $lng->get_browser_language();
            if (empty($lng)) {
                $lng->set_language(DEFAULT_LANGUAGE);
            }
        }
        $default = array('dir' => $lng->language['directory'], 'id' => $lng->language['id'], 'code' => $lng->language['code']);
    }
    if ($get && isset($default[$get])) {
        return $default[$get];
    }
    return $default;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:26,代码来源:functions.php


示例7: __construct

 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'Membre.php';
     $this->lng = language::getinstance()->GetLngBlock('membre');
     parent::__construct();
     $this->page_title = $this->lng['page_title'];
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:7,代码来源:membre.tpl.php


示例8: __construct

 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'pillage.php';
     $this->ress = DataEngine::a_ressources();
     $this->lng = language::getinstance()->GetLngBlock('pillage');
     parent::__construct();
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:7,代码来源:troops.tpl.php


示例9: process

 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $containers = array();
     $containerClassFiles = scandir(\base_config::$baseDir . '/inc/dashcontainers/');
     foreach ($containerClassFiles as $containerClassFile) {
         if (strpos($containerClassFile, '.php') === false) {
             continue;
         }
         $containerClassFile = str_replace('.php', '', $containerClassFile);
         $containerObject = new $containerClassFile($this);
         if (is_a($containerObject, '\\interfaces\\dashcontainer')) {
             $containerPosition = $containerObject->getPosition();
             if (isset($containers[$containerPosition])) {
                 $containerPosition++;
             }
             $containers[$containerPosition] = new \model\dashboard_container($containerObject->getBoxName(), $containerObject->getBoxHeadline(), $containerObject->getBoxContent(), $containerObject->getSize(), $containerObject->getHeight());
         } else {
             $message = \language::replaceLanguageConstant(\language::returnLanguageConstant('DASH_CONTAINER_INSTANCE'), array('{{dashcontainer}}' => $containerClassFile));
             \messages::registerError($message);
         }
     }
     if (count($containers) >= 1) {
         ksort($containers);
     }
     $view = new \model\view_acp('dashboard');
     $view->assign('statsContainers', $containers);
     $view->render();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:31,代码来源:dashboard.php


示例10: process

 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     if (!is_null($this->getRequestVar('affiliateDelList'))) {
         $affiliateIds = $this->getRequestVar('affiliateDelList');
         foreach ($affiliateIds as $affiliateId) {
             $affiliate = new \model\affiliate($this->getDbconnection(), $this->filterRequest($affiliateId, array(1, 4, 7)));
             $affiliate->delete();
         }
         $this->redirect('affiliate/list', array('affiliatedeleted=yes'));
     }
     $affiliateList = new \model\affiliate_list($this->getDbconnection());
     $affiliateList->setGroupByCategory(true);
     if (!is_null($this->getRequestVar('affiliateadded'))) {
         \messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_ADDAFFILIATE'));
     }
     if (!is_null($this->getRequestVar('affiliateedited'))) {
         \messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_EDITAFFILIATE'));
     }
     if (!is_null($this->getRequestVar('affiliatedeleted'))) {
         \messages::registerMessage(\language::returnLanguageConstant('DELETE_SUCCESS_AFFILIATES'));
     }
     $view = new \model\view_acp('affiliate_list');
     $view->assign('theList', $affiliateList->getAffiliates());
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->render();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:29,代码来源:lists.php


示例11: process

 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $category = new \model\category($this->getDbconnection());
     if (!is_null($this->getRequestVar('submupload'))) {
         $newFile = new \model\file();
         $icon = $newFile->uploadFile();
         $category->setIconPath($icon);
     }
     if (!is_null($this->getRequestVar('category'))) {
         $data = $this->getRequestVar('category');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $category->setName($data['name']);
         $category->setIconPath($data['iconPath']);
         $category->setIsPrivate($data['isPrivate']);
         if ($category->save()) {
             $this->redirect('category/list', array('categoryadded=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_CATEGORY'));
         }
     } else {
         $category->setIsPrivate(0);
     }
     $view = new \model\view_acp('category_editor');
     $view->assign('category', $category);
     $view->assign('editormode', 0);
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_CATEGORIES_ADD'));
     $view->render();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:33,代码来源:add.php


示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $lng = language::getinstance()->GetLngBlock('dataengine');
     $this->CronPattern = $lng['wormholes_cron'];
     $this->lastrun = DataEngine::config_key('wormhole_cleaning', 'lastrun');
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:7,代码来源:crontab.php


示例13: process

 public function process()
 {
     if (!parent::process()) {
         $this->redirectNoSession();
     }
     $categoryId = $this->getRequestVar('categoryid', array(1, 4, 7));
     if (is_null($categoryId)) {
         $this->redirect('category/list');
     }
     $category = new \model\category($this->getDbconnection(), $categoryId);
     if (!is_null($this->getRequestVar('category'))) {
         $data = $this->getRequestVar('category');
         foreach ($data as $key => $value) {
             $data[$key] = $this->filterRequest($value, array(1, 4, 7));
         }
         $category->setName($data['name']);
         $category->setIconPath($data['iconPath']);
         $category->setIsPrivate($data['isPrivate']);
         if ($category->update()) {
             $this->redirect('category/list', array('categoryedited=yes'));
         } else {
             \messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_CATEGORY'));
         }
     }
     $view = new \model\view_acp('category_editor');
     $view->assign('category', $category);
     $view->assign('editormode', 1);
     $view->assign('systemmode', $this->getSysconfig()->getSystemMode());
     $view->assign('headlinetext', \language::returnLanguageConstant('HL_CATEGORIES_EDIT'));
     $view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
     $view->render();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:32,代码来源:edit.php


示例14: __construct

 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . "Carte.php";
     $this->map = map::getinstance();
     $this->lng = language::getinstance()->GetLngBlock('carte');
     parent::__construct();
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:7,代码来源:carte.tpl.php


示例15: runUpdate

 public function runUpdate($fileList = array())
 {
     $view = new \model\view_installer('updater');
     $view->assign('version', $this->sysconfig->getSysVersion());
     include \base_config::$baseDir . '/version.php';
     $this->updateConfigKey('sysVersion', $afltrVersion);
     if (file_exists(\base_config::$updateCache)) {
         @unlink(\base_config::$updateCache);
     }
     $fileDeleteList = array('/inc/model/model_base.php', '/inc/model/dashcontainerbox.php', '/inc/lib/jquery/jquery-1.10.2.min.js');
     foreach ($fileDeleteList as $fileDelete) {
         if (file_exists(\base_config::$baseDir . $fileDelete)) {
             @unlink(\base_config::$baseDir . $fileDelete);
         }
     }
     $file = new \model\file();
     if (is_dir(base_config::$baseDir . '/inc/lib/lightbox')) {
         $file->deleteRecursive(base_config::$baseDir . '/inc/lib/lightbox');
     }
     if (is_dir(base_config::$baseDir . '/inc/lib/jquery_ui')) {
         $file->deleteRecursive(base_config::$baseDir . '/inc/lib/jquery_ui');
     }
     if (!file_exists(base_config::$uploadDir . '/banners')) {
         mkdir(base_config::$uploadDir . '/banners');
     }
     $this->createConfigKey('timeZone', 'Europe/Berlin');
     $newVersion = $this->dbconnection->select("config", "config_value", "config_key LIKE 'sysVersion'");
     \messages::registerMessage(\language::returnLanguageConstant('UPDATE_SUCCESS'), true);
     $view->assign('newVersion', $newVersion[0]['config_value']);
     $view->assign('fileList', $fileList);
     $view->render();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:32,代码来源:updateclass.php


示例16: getinstance

 /**
  * @return language
  */
 public static function getinstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:10,代码来源:language.class.php


示例17: GetCustomPerms

 public function GetCustomPerms()
 {
     $lng = language::getinstance()->GetLngBlock(LNG_CODE, SCANNER_PATH);
     $value = array();
     $value[1000] = $lng['conf_perms'];
     $value['ADVANCED_SCANNER'] = $lng['conf_perms_global'];
     return $value;
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:8,代码来源:advanced_scanner.conf.php


示例18: __construct

 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'cartographie.php';
     $this->BASE_GET = Get_string();
     $this->lng = language::getinstance()->GetLngBlock('cartographie');
     $this->SetheaderInput();
     parent::__construct();
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:8,代码来源:cartographie.tpl.php


示例19: __construct

 public function __construct()
 {
     $this->lng = language::getinstance()->GetLngBlock('ownuniverse');
     foreach (DataEngine::a_ressources() as $v) {
         $this->ressourcesnames[$v['Field']] = $v['Nom'];
     }
     $this->BatimentsName = DataEngine::a_batiments();
     $this->parser = parser::getinstance();
 }
开发者ID:google-code-backups,项目名称:eude,代码行数:9,代码来源:ownuniverse.class.php


示例20: run

 public function run()
 {
     $tpl = new template();
     $id = (int) $_GET['id'];
     $language = new language();
     $language->setModule('leads');
     $language->readIni();
     if ($id > 0) {
         if (isset($_POST['delete'])) {
             $this->deleteLead($id);
             $tpl->setNotification($language->lang_echo('LEAD_DELETED'), 'success');
         }
         $tpl->assign('lead', $this->getLead($id));
     } else {
         $tpl->display('general.error');
     }
     $tpl->display('leads.deleteLead');
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:18,代码来源:class.deleteLead.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP lastfmApi类代码示例发布时间:2022-05-23
下一篇:
PHP lang_string类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap