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


PHP iaLanguage::get方法代码示例

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


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

示例1: _t

function _t($key = '', $default = null)
{
    if (!class_exists('iaLanguage') || empty($key)) {
        return false;
    }
    iaDebug::debug($key, 'Deprecated language phrase obtaining');
    return iaLanguage::get($key, $default);
}
开发者ID:kamilklkn,项目名称:subrion,代码行数:8,代码来源:function.php

示例2: _deleteFile

 private function _deleteFile($params)
 {
     $result = array('error' => true, 'message' => iaLanguage::get('invalid_parameters'));
     $item = isset($params['item']) ? iaSanitize::sql($params['item']) : null;
     $field = isset($params['field']) ? iaSanitize::sql($params['field']) : null;
     $path = isset($params['path']) ? iaSanitize::sql($params['path']) : null;
     $itemId = isset($params['itemid']) ? (int) $params['itemid'] : null;
     if ($itemId && $item && $field && $path) {
         $tableName = $this->_iaCore->factory('item')->getItemTable($item);
         $itemValue = $this->_iaDb->one($field, iaDb::convertIds($itemId), $tableName);
         $iaAcl = $this->_iaCore->factory('acl');
         if ($iaAcl->isAdmin() && $itemValue) {
             $pictures = $itemValue[1] == ':' ? unserialize($itemValue) : $itemValue;
             $key = null;
             if (is_array($pictures)) {
                 if ($primitive = !is_array($pictures[key($pictures)])) {
                     $pictures = array($pictures);
                 }
                 foreach ($pictures as $k => $v) {
                     if ($path == $v['path']) {
                         $key = $k;
                         break;
                     }
                 }
                 if (!is_null($key)) {
                     unset($pictures[$key]);
                 }
                 $newItemValue = $primitive ? '' : serialize($pictures);
             } else {
                 // single image
                 $newItemValue = '';
                 if ($pictures == $path) {
                     $key = true;
                 }
             }
             if (!is_null($key)) {
                 if ($this->_iaCore->factory('picture')->delete($path)) {
                     if ($this->_iaDb->update(array($field => $newItemValue), iaDb::convertIds($itemId), null, $tableName)) {
                         if (iaUsers::getItemName() == $item) {
                             // update current profile data
                             if ($itemId == iaUsers::getIdentity()->id) {
                                 iaUsers::reloadIdentity();
                             }
                         }
                     }
                     $result['error'] = false;
                     $result['message'] = iaLanguage::get('deleted');
                 } else {
                     $result['message'] = iaLanguage::get('error');
                 }
             }
         }
     }
     return $result;
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:55,代码来源:actions.php

示例3: getDashboardStatistics

 public function getDashboardStatistics()
 {
     $statuses = array(iaCore::STATUS_ACTIVE, iaCore::STATUS_INACTIVE);
     $rows = $this->iaDb->keyvalue('`status`, COUNT(*)', '1 GROUP BY `status`', self::getTable());
     $total = 0;
     foreach ($statuses as $status) {
         isset($rows[$status]) || ($rows[$status] = 0);
         $total += $rows[$status];
     }
     return array('icon' => 'quill', 'item' => iaLanguage::get('blogposts'), 'rows' => $rows, 'total' => $total, 'url' => 'blog/');
 }
开发者ID:kreativmind,项目名称:subrion,代码行数:11,代码来源:ia.admin.blog.php

示例4: _launch

 protected function _launch($id)
 {
     //$this->getHelper()->run($id);
     // implemented via remote request because potentially some package's cron task
     // may use front classes which will cause conflicts if executed from backend side.
     // otherwise, the only call of iaCore::run() would be enough
     $cronUrl = IA_CLEAR_URL . 'cron/?_t&t=' . (int) $id;
     iaUtil::getPageContent($cronUrl, 300);
     //
     $this->_iaCore->iaView->setMessages(iaLanguage::get('scheduled_task_ran'), iaView::SUCCESS);
     iaUtil::go_to($this->getPath());
 }
开发者ID:rentpad,项目名称:subrion,代码行数:12,代码来源:scheduled-tasks.php

示例5: getById

 /**
  * Return plan information
  *
  * @param integer $planId plan id
  *
  * @return null|array
  */
 public function getById($planId)
 {
     $plan = null;
     if (!is_array($planId)) {
         $plan = $this->iaDb->row_bind(iaDb::ALL_COLUMNS_SELECTION, '`status` = :status AND `id` = :id', array('status' => iaCore::STATUS_ACTIVE, 'id' => (int) $planId), self::getTable());
         if ($plan) {
             $plan['title'] = iaLanguage::get('plan_title_' . $plan['id']);
             $plan['description'] = iaLanguage::get('plan_description_' . $plan['id']);
         }
     }
     return $plan;
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:19,代码来源:ia.core.plan.php

示例6: smarty_function_ia_html_file

function smarty_function_ia_html_file($params, &$smarty)
{
    $browse = iaLanguage::get('browse');
    $title = iaLanguage::get('title');
    $placeholder = isset($params['value']) && $params['value'] ? $params['value'] : iaLanguage::get('file_click_to_upload');
    $id = isset($params['id']) ? $params['id'] : $params['name'];
    $multiple = isset($params['multiple']) ? $params['multiple'] : false;
    if (!$multiple) {
        $result = <<<OUT
<div class="upload-group">
\t<div class="input-group file-upload">
\t\t<input type="hidden" name="v[{$params['name']}]">
\t\t<input type="file" name="{$params['name']}" id="{$id}">
\t\t<input type="text" class="disabled" placeholder="{$placeholder}" disabled>
\t\t<span class="input-group-btn">
\t\t\t<a class="btn btn-primary js-file-browse" href="#">{$browse}</a>
\t\t</span>
\t</div>
</div>
OUT;
    } else {
        $max_num = isset($params['max_num']) ? $params['max_num'] : 0;
        $hidden = $max_num < 1 ? ' style="display: none;"' : '';
        $title_html = '';
        if (isset($params['title'])) {
            $title_html = <<<TITLE
<div class="input-group">
\t<span class="input-group-addon">{$title}:</span>
\t<input type="text" name="{$params['name']}_title[]" class="file-title">
</div>
TITLE;
        }
        $result = <<<OUT
<div class="upload-group" id="upload-group-{$id}">
\t<div class="file-upload"{$hidden}>
\t\t{$title_html}
\t\t<div class="input-group">
\t\t\t<input type="file" name="{$params['name']}[]">
\t\t\t<input type="text" class="disabled" disabled="disabled" placeholder="{$placeholder}">
\t\t\t<span class="input-group-btn">
\t\t\t\t<a class="btn btn-primary js-file-browse" href="#">{$browse}</a>
\t\t\t\t<a class="btn btn-primary js-file-add" href="#"><i class="i-plus-alt"></i></a>
\t\t\t\t<a class="btn btn-primary js-file-remove" href="#"><i class="i-minus-alt"></i></a>
\t\t\t</span>
\t\t</div>
\t</div>
\t<input type="hidden" value="{$max_num}" id="{$id}">
</div>
OUT;
    }
    return $result;
}
开发者ID:kamilklkn,项目名称:subrion,代码行数:52,代码来源:function.ia_html_file.php

示例7: _viewPage

 private function _viewPage(&$iaView, $id)
 {
     $item = $this->getById($id);
     if (!$item) {
         return iaView::errorPage(iaView::ERROR_NOT_FOUND);
     }
     $iaUsers = $this->_iaCore->factory('users');
     $iaView->assign('item', $item);
     $iaView->assign('initiator', $iaUsers->getInfo($item['member_id']));
     iaBreadcrumb::toEnd(iaLanguage::get('claim_details'));
     $iaView->title(iaLanguage::get('claim_details'));
     $iaView->display('view');
 }
开发者ID:intelliants,项目名称:subrion-plugin-claim_listing,代码行数:13,代码来源:index.php

示例8: gridDelete

 public function gridDelete($params, $languagePhraseKey = 'deleted')
 {
     $result = array('result' => false, 'message' => iaLanguage::get('invalid_parameters'));
     if (isset($params['id']) && is_array($params['id']) && $params['id']) {
         $total = count($params['id']);
         $affected = $this->_iaDb->delete('`id` IN (' . implode(',', $params['id']) . ')');
         if (1 == $total) {
             $result['result'] = 1 == $affected;
             $result['message'] = $result['result'] ? iaLanguage::get($languagePhraseKey) : iaLanguage::get('db_error');
         } else {
             $result['result'] = $affected == $total;
             $result['message'] = $result['result'] ? iaLanguage::getf('items_deleted', array('num' => $affected)) : iaLanguage::getf('items_deleted_of', array('num' => $affected, 'total' => $total));
         }
     }
     return $result;
 }
开发者ID:kamilklkn,项目名称:subrion,代码行数:16,代码来源:ia.admin.grid.php

示例9: _gridRead

 protected function _gridRead($params)
 {
     if (isset($_POST['action'])) {
         $output = array();
         switch ($_POST['action']) {
             case 'get':
                 $output['code'] = $this->_iaDb->one_bind('`code`', iaDb::convertIds((int) $_POST['id']));
                 break;
             case 'set':
                 $output['result'] = (bool) $this->_iaDb->update(array('code' => $_POST['code']), iaDb::convertIds($_POST['id']));
                 $output['message'] = iaLanguage::get($output['result'] ? 'saved' : 'db_error');
         }
         return $output;
     }
     return parent::_gridRead($params);
 }
开发者ID:nicefirework,项目名称:subrion,代码行数:16,代码来源:hooks.php

示例10: _gridRead

 protected function _gridRead($params)
 {
     $output = array();
     switch ($this->_iaCore->requestPath[0]) {
         case 'get':
             $output['code'] = $this->_iaDb->one_bind('`code`', iaDb::convertIds((int) $_GET['id']));
             break;
         case 'set':
             $this->_iaDb->update(array('code' => $_POST['code']), iaDb::convertIds($_POST['id']));
             $output['result'] = 0 == $this->_iaDb->getErrorNumber();
             $output['message'] = iaLanguage::get($output['result'] ? 'saved' : 'db_error');
             break;
         default:
             $output = parent::_gridRead($params);
     }
     return $output;
 }
开发者ID:rentpad,项目名称:subrion,代码行数:17,代码来源:hooks.php

示例11: createQueue

 public function createQueue($fromName, $fromMail, $subject, $body, $html, $groups, $status)
 {
     $error = false;
     $rcptsPerRun = 15;
     $messages = array();
     $data = array();
     $data['from_name'] = $fromName;
     $data['subj'] = $subject;
     $data['html'] = $html;
     if (empty($fromMail) || !iaValidate::isEmail($fromMail)) {
         $error = true;
         $messages[] = iaLanguage::get('from_email_err');
     } else {
         $data['from_mail'] = $fromMail;
     }
     if (empty($body)) {
         $error = true;
         $messages[] = iaLanguage::get('err_message');
     } else {
         $data['body'] = $body;
     }
     $usergrp = empty($groups) ? 0 : array_sum($groups);
     $status = empty($status) ? array() : $status;
     $status = implode("','", $status);
     $rcpt = $this->iaDb->onefield('email', "`usergroup_id` & {$usergrp} AND `status` IN ('{$status}')", 0, 0, 'members');
     if (empty($rcpt)) {
         $error = true;
         $messages[] = iaLanguage::get('no_rcpt');
     }
     if (!$error) {
         $data['total'] = count($rcpt);
         $messageId = $this->iaDb->insert($data, null, self::getTableMessages());
         foreach ($rcpt as $index => $addr) {
             $rcptCart[] = $addr;
             if (($index + 1) % $rcptsPerRun == 0 || $index + 1 == $data['total']) {
                 $this->iaDb->insert(array('message_id' => $messageId, 'recipients' => implode(',', $rcptCart)), null, self::getTableRecipients());
                 $rcptCart = array();
             }
         }
         $messages[] = iaLanguage::get('queue_added');
     }
     return array($error, $messages);
 }
开发者ID:intelliants,项目名称:subrion-plugin-mailer,代码行数:43,代码来源:ia.admin.mailerplugin.php

示例12: getList

 public function getList()
 {
     $templates = array();
     $path = IA_FRONT_TEMPLATES;
     $directory = opendir($path);
     while ($file = readdir($directory)) {
         if (substr($file, 0, 1) != '.') {
             if (is_dir($path . $file)) {
                 $infoXmlFile = $path . $file . IA_DS . self::INSTALL_FILE_NAME;
                 if (file_exists($infoXmlFile)) {
                     $this->getFromPath($infoXmlFile);
                     $this->parse();
                     $this->check();
                     if (!$this->error && $file == $this->name) {
                         $buttons = false;
                         if (!$this->getNotes()) {
                             $version = explode('-', $this->compatibility);
                             if (!isset($version[1])) {
                                 $buttons = (bool) version_compare($version[0], IA_VERSION, '<=');
                             } else {
                                 if (version_compare($version[0], IA_VERSION, '<=') && version_compare($version[1], IA_VERSION, '>=')) {
                                     $buttons = true;
                                 }
                             }
                             if ($buttons === false) {
                                 $this->compatibility = '<span style="color:red;font-weight:bold;">' . $this->compatibility . ' ' . iaLanguage::get('incompatible') . '</span>';
                             }
                         }
                         $templates[$this->name] = array('name' => $this->name, 'title' => $this->title, 'author' => $this->author, 'contributor' => $this->contributor, 'date' => $this->date, 'description' => $this->summary, 'version' => $this->version, 'compatibility' => $this->compatibility, 'buttons' => $buttons, 'screenshots' => $this->_screenshots, 'notes' => $this->getNotes(), 'config' => $this->_config, 'config_groups' => $this->_configGroups, 'url' => 'http://www.subrion.org/template/' . $this->name . '.html');
                         $templates[$this->name]['logo'] = file_exists(IA_FRONT_TEMPLATES . $this->name . '/docs/img/icon.png') ? $this->iaView->assetsUrl . 'templates/' . $this->name . '/docs/img/icon.png' : $this->iaView->assetsUrl . 'admin/templates/default/img/not_available.png';
                     } elseif ($file != $this->name) {
                         $this->iaView->setMessages('One of your templates has an incorrect template name. Template name used in the descriptor (' . $path . $file . ') should have the same name as the template folder.');
                     } else {
                         $this->iaView->setMessages($this->getMessage());
                     }
                 }
             }
         }
     }
     closedir($directory);
     return $templates;
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:42,代码来源:ia.admin.template.php

示例13: httpCheckFile

 function httpCheckFile($url)
 {
     $curl = curl_init($url);
     curl_setopt($curl, CURLOPT_NOBODY, true);
     curl_setopt($curl, CURLOPT_HEADER, true);
     curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
     curl_exec($curl);
     $info = curl_getinfo($curl);
     curl_close($curl);
     if (200 !== $info['http_code']) {
         return array(false, iaLanguage::getf('http_status_error', array('code' => $info['http_code'])));
     } elseif (0 !== $info['redirect_count']) {
         return array(false, iaLanguage::get('extra_redirects_error'));
     } elseif (0 !== $info['download_content_length'] && -1 != $info['download_content_length']) {
         return array(false, iaLanguage::getf('remote_file_is_not_empty', array('bytes' => $info['download_content_length'])));
     } else {
         return array(true, iaLanguage::get('remote_file_validation_success'));
     }
 }
开发者ID:intelliants,项目名称:subrion-plugin-claim_listing,代码行数:21,代码来源:index.php

示例14: getGroups

 public function getGroups(array $exclusions = array())
 {
     $stmt = '`status` = :status AND `service` = 0';
     if ($exclusions) {
         $stmt .= " AND `name` NOT IN ('" . implode("','", array_map(array('iaSanitize', 'sql'), $exclusions)) . "')";
     }
     $this->iaDb->bind($stmt, array('status' => iaCore::STATUS_ACTIVE));
     $pages = array();
     $result = array();
     $rows = $this->iaDb->all(array('id', 'name', 'group'), $stmt, null, null, self::getTable());
     foreach ($rows as $page) {
         $page['group'] || ($page['group'] = 1);
         $pages[$page['group']][$page['id']] = iaLanguage::get('page_title_' . $page['name']);
     }
     $rows = $this->iaDb->all(array('title', 'id', 'name'), null, null, null, self::getAdminGroupsTable());
     foreach ($rows as $row) {
         if (isset($pages[$row['id']])) {
             $result[$row['id']] = array('title' => $row['title'], 'children' => $pages[$row['id']]);
         }
     }
     return $result;
 }
开发者ID:kamilklkn,项目名称:subrion,代码行数:22,代码来源:ia.admin.page.php

示例15: gridDelete

 public function gridDelete($params, $languagePhraseKey = 'deleted')
 {
     $result = array('result' => false, 'message' => iaLanguage::get('invalid_parameters'));
     if (isset($params['id']) && is_array($params['id']) && $params['id']) {
         $total = count($params['id']);
         $affected = 0;
         foreach ($params['id'] as $id) {
             if ($this->delete($id)) {
                 $affected++;
             }
         }
         if ($affected) {
             $result['result'] = true;
             if (1 == $total) {
                 $result['message'] = iaLanguage::get($languagePhraseKey);
             } else {
                 $result['message'] = $affected == $total ? iaLanguage::getf('items_deleted', array('num' => $affected)) : iaLanguage::getf('items_deleted_of', array('num' => $affected, 'total' => $total));
             }
         } else {
             $result['message'] = iaLanguage::get('db_error');
         }
     }
     return $result;
 }
开发者ID:rentpad,项目名称:subrion,代码行数:24,代码来源:ia.base.plugin.php


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