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

PHP iaCore类代码示例

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

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



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

示例1: init

 public function init()
 {
     $this->_iaCore = iaCore::instance();
     $this->CharSet = 'UTF-8';
     $this->From = $this->_iaCore->get('site_email');
     $this->FromName = $this->_iaCore->get('site_from_name', 'Subrion CMS');
     $this->SingleTo = true;
     $this->isHTML($this->_iaCore->get('mimetype'));
     switch ($this->_iaCore->get('mail_function')) {
         case 'smtp':
             $this->isSMTP();
             $this->Host = $this->_iaCore->get('smtp_server');
             $this->SMTPAuth = (bool) $this->_iaCore->get('smtp_auth');
             $this->Username = $this->_iaCore->get('smtp_user');
             $this->Password = $this->_iaCore->get('smtp_password');
             $this->SMTPSecure = 'ssl';
             if ($port = $this->_iaCore->get('smtp_port')) {
                 $this->Port = (int) $port;
             }
             break;
         case 'sendmail':
             $this->isSendmail();
             $this->Sendmail = $this->_iaCore->get('sendmail_path');
             break;
         default:
             // PHP's mail function
             $this->isMail();
     }
     // global patterns
     $this->setReplacements(array('site_url' => IA_URL, 'site_name' => $this->_iaCore->get('site'), 'site_email' => $this->_iaCore->get('site_email')));
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:31,代码来源:ia.core.mailer.php


示例2: _getExtraType

 private function _getExtraType($extraName)
 {
     if (is_null(self::$_extraTypes)) {
         $iaCore = iaCore::instance();
         $iaCore->factory('item');
         self::$_extraTypes = $iaCore->iaDb->keyvalue(array('name', 'type'), iaDb::convertIds(iaCore::STATUS_ACTIVE, 'status'), iaItem::getExtrasTable());
     }
     return isset(self::$_extraTypes[$extraName]) ? self::$_extraTypes[$extraName] : null;
 }
开发者ID:kamilklkn,项目名称:subrion,代码行数:9,代码来源:resource.extra.php


示例3: reloadIdentity

 public static function reloadIdentity()
 {
     $sql = 'SELECT u.*, g.`name` `usergroup` ' . 'FROM `:prefix_:table_users` u ' . 'LEFT JOIN `:prefix_:table_groups` g ON (g.`id` = u.`usergroup_id`) ' . "WHERE u.`id` = :id AND u.`status` = ':status' " . 'LIMIT 1';
     $iaDb = iaCore::instance()->iaDb;
     $sql = iaDb::printf($sql, array('prefix_' => $iaDb->prefix, 'table_users' => self::getTable(), 'table_groups' => self::getUsergroupsTable(), 'id' => self::getIdentity()->id, 'status' => iaCore::STATUS_ACTIVE));
     $row = $iaDb->getRow($sql);
     self::_setIdentity($row);
     return (bool) $row;
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:9,代码来源:ia.core.users.php


示例4: _launchFile

 protected function _launchFile($file)
 {
     ignore_user_abort(1);
     @set_time_limit(0);
     $iaCore = iaCore::instance();
     $iaDb =& $iaCore->iaDb;
     $iaView =& $iaCore->iaView;
     include IA_HOME . $file;
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:9,代码来源:ia.core.cron.php


示例5: __construct

 public function __construct()
 {
     $this->_iaCore = iaCore::instance();
     $this->_iaDb =& $this->_iaCore->iaDb;
     $this->_gridQueryMainTableAlias = empty($this->_gridQueryMainTableAlias) ? '' : $this->_gridQueryMainTableAlias . '.';
     $this->_iaCore->factory('util');
     $this->_table || $this->setTable($this->getName());
     $this->_path = IA_ADMIN_URL . $this->getName() . IA_URL_DELIMITER;
     $this->_template = $this->getName();
 }
开发者ID:UzielSilva,项目名称:subrion,代码行数:10,代码来源:ia.base.controller.admin.php


示例6: getAccountsToBePaid

 function getAccountsToBePaid($aStart, $aLimit)
 {
     $iaCore =& iaCore::instance();
     $sql = "SELECT SQL_CALC_FOUND_ROWS s.`aff_id` as `id`, SUM(payment) AS `Total`, COUNT(s.`id`) AS `Sales`, s.`aff_id`, a.`username`, 1 as `remove` ";
     $sql .= "FROM `{$this->mPrefix}sales` s, `{$this->mPrefix}accounts` a ";
     $sql .= "WHERE s.`status` = 'active' AND a.`id` = s.`aff_id` ";
     $sql .= "GROUP BY s.`aff_id` ";
     $sql .= "HAVING `Total` >= '" . $iaCore->get('payout_balance') * 100 / $iaCore->get('payout_percent') . "' ";
     $sql .= $aLimit ? "LIMIT {$aStart}, {$aLimit}" : '';
     return $this->iaDb->getAll($sql);
 }
开发者ID:nicefirework,项目名称:subrion-elitius,代码行数:11,代码来源:ia.admin.elitius.php


示例7: sitemap_recipes

function sitemap_recipes($tpl = '<url><loc>{url}</loc></url>')
{
    $iaCore = iaCore::instance();
    $iaDb =& $iaCore->iaDb;
    $iaRecipe = $iaCore->factoryPackages('recipes', 'front', 'recipe');
    $text = '';
    $recipes = $iaRecipe->getRecipes();
    foreach ($recipes as $row) {
        list($url, $output) = $iaRecipe->goToItem(array('item' => $row));
        $text .= str_replace(array('{url}', '{site}'), array($url, ''), $tpl);
    }
    return $text;
}
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:13,代码来源:sitemap.inc.php


示例8: albums_search

function albums_search($aQuery, $aFields, $aStart, $aLimit, &$aNumAll, $aWhere = '', $cond = 'AND')
{
    $iaCore =& iaCore::instance();
    $iaAlbum = $iaCore->factoryPackage('album', 'lyrics');
    $ret = array();
    $where = "`title` LIKE '%{$aQuery}%' OR `description` LIKE '%{$aQuery}%'";
    $albums = $iaCore->iaDb->all('sql_calc_found_rows `title`, `title_alias`, `artist_alias`', $where, $aStart, $aLimit, iaAlbum::getTable());
    $aNumAll += $iaCore->iaDb->foundRows();
    foreach ($albums as $album) {
        $album_url = $iaCore->iaSmarty->ia_url(array('item' => $iaAlbum->getItemName(), 'data' => $album, 'type' => 'url'));
        $ret[] = sprintf('<p><a href="%s">%s</a></p>', $album_url, $album['title']);
    }
    return $ret;
}
开发者ID:nicefirework,项目名称:subrion-lyrics,代码行数:14,代码来源:search.inc.php


示例9: recipes_search

function recipes_search($aQuery, $aFields, $aStart, $aLimit, &$aNumAll, $aWhere = '', $cond = 'AND')
{
    $iaCore =& iaCore::instance();
    $ret = array();
    $match = array();
    if ($aQuery) {
        $match[] = sprintf(" MATCH (`title`, `ingredients`, `procedures`) AGAINST('%s') ", $iaCore->sql($aQuery));
    }
    if ($aWhere) {
        $match[] = '' . $aWhere;
    }
    // additional fields
    if ($aFields && is_array($aFields)) {
        foreach ($aFields as $fname => $data) {
            if ('LIKE' == $data['cond']) {
                $data['val'] = "%{$data['val']}%";
            }
            // for multiple values, like combo or checkboxes
            if (is_array($data['val'])) {
                if ('!=' == $data['cond']) {
                    $data['cond'] = count($data['val']) > 1 ? 'NOT IN' : '!=';
                } else {
                    $data['cond'] = count($data['val']) > 1 ? 'IN' : '=';
                }
                $data['val'] = count($data['val']) > 1 ? '(' . implode(',', $data['val']) . ')' : array_shift($data['val']);
            } else {
                if (preg_match('/^(\\d+)\\s*-\\s*(\\d+)$/', $data['val'], $range)) {
                    // search in range
                    $data['cond'] = sprintf('BETWEEN %d AND %d', $range[1], $range[2]);
                    $data['val'] = '';
                } else {
                    $data['val'] = "'" . $iaCore->sql($data['val']) . "'";
                }
            }
            $match[] = "`{$fname}` {$data['cond']} {$data['val']} ";
        }
    }
    $iaRecipe = $iaCore->factoryPackages('recipes', 'front', 'recipe');
    $recipes = $match ? $iaRecipe->getRecipes(' AND (' . implode(' ' . $cond . ' ', $match) . ')', $aStart, $aLimit) : array();
    $aNumAll = $iaRecipe->getRecipesNum(' AND (' . implode(' ' . $cond . ' ', $match) . ')');
    if ($recipes && SMARTY) {
        $iaCore->iaSmarty->assign('all_items', $recipes);
        $fields = $iaCore->getAcoFieldsList('recipes_home', 'recipes', '', true);
        $iaCore->iaSmarty->assign_by_ref('all_item_fields', $fields);
        $iaCore->iaSmarty->assign('all_item_type', 'recipes');
        $ret[] = $iaCore->iaSmarty->fetch('all-items-page.tpl');
    }
    return $ret;
}
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:49,代码来源:search.inc.php


示例10: init

 public function init()
 {
     $this->iaCore = iaCore::instance();
     parent::init();
     foreach ($this->iaCore->packagesData as $packageName => $packageData) {
         $this->registerResource($packageName, $this->_createPackageTemplateHandlers($packageName));
     }
     iaSystem::renderTime('main', 'afterSmartyFuncInit');
     $this->assign('tabs_content', array());
     $this->assign('tabs_before', array());
     $this->assign('tabs_after', array());
     $this->assign('fieldset_before', array());
     $this->assign('fieldset_after', array());
     $this->assign('field_before', array());
     $this->assign('field_after', array());
     $this->resources = array('jquery' => 'text:Loading jQuery API..., js:jquery/jquery', 'subrion' => 'text:Loading Subrion Awesome Stuff..., js:intelli/intelli, js:_IA_URL_tmp/cache/intelli.config, ' . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? 'js:_IA_TPL_bootstrap.min, js:bootstrap/js/bootstrap-switch.min, js:bootstrap/js/passfield.min, js:intelli/intelli.admin, js:admin/footer, css:_IA_URL_js/bootstrap/css/passfield' : 'js:intelli/intelli.minmax, js:frontend/footer') . ',js:_IA_URL_tmp/cache/intelli' . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? '.admin' : '') . '.lang.' . $this->iaCore->iaView->language, 'extjs' => 'text:Loading ExtJS..., css:_IA_URL_js/extjs/resources/ext-theme-neptune/ext-theme-neptune-all' . ($this->iaCore->get('sap_style', false) ? '-' . $this->iaCore->get('sap_style') : '') . ', js:extjs/ext-all', 'manage_mode' => 'css:_IA_URL_js/visual/css/visual, js:visual/js/slidebars.min, js:visual/js/jqueryui.min, js:visual/js/visual', 'tree' => 'js:jquery/plugins/jstree/jstree.min, js:intelli/intelli.tree, css:_IA_URL_js/jquery/plugins/jstree/themes/default/style', 'jcal' => 'js:jquery/plugins/jcal/jquery.jcal, css:_IA_URL_js/jquery/plugins/jcal/jquery.jcal', 'bootstrap' => 'js:bootstrap/js/bootstrap.min, css:iabootstrap, css:iabootstrap-responsive, css:user-style', 'datepicker' => 'js:bootstrap/js/datepicker/bootstrap-datepicker, js:bootstrap/js/datepicker/locales/bootstrap-datepicker.' . $this->iaCore->get('lang') . ', css:_IA_URL_js/bootstrap/css/datepicker' . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? '3' : ''), 'tagsinput' => 'js:jquery/plugins/tagsinput/jquery.tagsinput.min, css:_IA_URL_js/jquery/plugins/tagsinput/jquery.tagsinput', 'underscore' => 'js:utils/underscore.min', 'iadropdown' => 'js:jquery/plugins/jquery.ia-dropdown.min', 'flexslider' => 'js:jquery/plugins/flexslider/jquery.flexslider.min, css:_IA_URL_js/jquery/plugins/flexslider/flexslider');
     $this->iaCore->startHook('phpSmartyAfterMediaInit', array('iaSmarty' => &$this));
 }
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:18,代码来源:ia.core.smarty.php


示例11: smarty_function_ia_hooker

function smarty_function_ia_hooker($params, &$smarty)
{
    if (!isset($params['name'])) {
        return;
    }
    $name = $params['name'];
    iaDebug::debug('smarty', $name, 'hooks');
    iaSystem::renderTime('smarty', $name);
    $iaCore = iaCore::instance();
    $hooks = $iaCore->getHooks();
    if (!array_key_exists($name, $hooks) || empty($hooks[$name])) {
        return;
    }
    foreach ($hooks[$name] as $hook) {
        $hook['type'] = in_array($hook['type'], array('php', 'html', 'plain', 'smarty')) ? $hook['type'] : 'php';
        if (empty($hook['pages']) || in_array($iaCore->iaView->name(), $hook['pages'])) {
            if ($hook['filename']) {
                switch ($hook['type']) {
                    case 'php':
                        if (file_exists(IA_HOME . $hook['filename'])) {
                            include IA_HOME . $hook['filename'];
                        }
                        break;
                    case 'smarty':
                        echo $smarty->fetch(IA_HOME . $hook['filename']);
                }
            } else {
                switch ($hook['type']) {
                    case 'php':
                        eval($hook['code']);
                        break;
                    case 'smarty':
                        echo $smarty->fetch('eval:' . $hook['code']);
                        break;
                    case 'html':
                        echo $hook['code'];
                        break;
                    case 'plain':
                        echo iaSanitize::html($hook['code']);
                }
            }
        }
    }
}
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:44,代码来源:function.ia_hooker.php


示例12: write

 public function write($actionCode, $params = null, $pluginName = null)
 {
     if (!in_array($actionCode, $this->_validActions)) {
         return false;
     }
     if (iaUsers::hasIdentity()) {
         $params['user'] = iaUsers::getIdentity()->fullname;
     }
     empty($params['title']) || ($params['title'] = iaSanitize::html($params['title']));
     $row = array('date' => date(iaDb::DATETIME_FORMAT), 'action' => $actionCode, 'user_id' => iaUsers::hasIdentity() ? iaUsers::getIdentity()->id : null, 'params' => serialize($params));
     if ($pluginName) {
         $row['extras'] = $pluginName;
     } else {
         $iaView =& iaCore::instance()->iaView;
         if ($value = $iaView->get('extras')) {
             $row['extras'] = $value;
         }
     }
     return (bool) $this->iaDb->insert($row, null, self::getTable());
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:20,代码来源:ia.core.log.php


示例13: url

 public function url($action, $data = array(), $generate = false)
 {
     $data['action'] = $action;
     $data['alias'] = isset($data['genre_alias']) ? $data['genre_alias'] : $data['title_alias'];
     if (!isset($this->patterns[$action])) {
         $action = 'view';
     }
     if ($generate) {
         iaCore::util();
         if (!defined('IA_NOUTF')) {
             iaUtf8::loadUTF8Core();
             iaUtf8::loadUTF8Util('ascii', 'validation', 'bad', 'utf8_to_ascii');
         }
         if (!utf8_is_ascii($data['alias'])) {
             $data['alias'] = $iaCore->convertStr(utf8_to_ascii($data['alias']));
         }
     }
     $url = iaDb::printf($this->patterns[$action], $data);
     return $this->iaCore->packagesData[self::PACKAGE_NAME]['url'] . $url;
 }
开发者ID:nicefirework,项目名称:subrion-lyrics,代码行数:20,代码来源:ia.admin.lyric.php


示例14: smarty_function_ia_print_img

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_function_ia_print_img($params, &$smarty)
{
    $out = IA_CLEAR_URL;
    $folder = isset($params['folder']) ? $params['folder'] : '';
    if (isset($params['ups']) && !empty($params['ups'])) {
        $out .= 'uploads/' . $folder . $params['fl'];
    } elseif (isset($params['pl']) && !empty($params['pl'])) {
        $admin = isset($params['admin']) && $params['admin'] ? 'admin/' : 'front/';
        $out .= 'plugins/' . $params['pl'] . '/' . $admin . 'templates/img/' . $folder . $params['fl'];
    } elseif (isset($params['package']) && $params['package']) {
        $iaCore = iaCore::instance();
        $packages = $iaCore->packagesData;
        $template = $iaCore->iaView->theme;
        $admin = isset($params['admin']) && $params['admin'];
        $design = $admin ? 'admin/' : $template . '/';
        if (isset($packages[$params['package']])) {
            $out = $packages[$params['package']]['tpl_url'] . $design . 'images/' . $folder . $params['fl'];
        } else {
            $out = ($admin ? 'admin/' : '') . 'templates/' . $template . '/img/' . $folder . $params['fl'];
        }
    } else {
        $admin = isset($params['admin']) && $params['admin'] ? 'admin/templates/' : '';
        if ($admin) {
            $out .= $admin . 'default/img/' . $folder . $params['fl'];
        } else {
            $out .= 'templates/' . $smarty->tmpl . '/img/' . $folder . $params['fl'];
        }
    }
    // prints including image tag
    if (isset($params['full'])) {
        $attrs = array('id', 'title', 'width', 'height', 'border', 'style', 'class', 'alt');
        $params['alt'] = isset($params['alt']) ? $params['alt'] : '';
        $atrs = '';
        foreach ($params as $key => $attr) {
            $atrs .= in_array($key, $attrs) && isset($attr) ? $key . '="' . $attr . '" ' : '';
        }
        $out = '<img src="' . $out . '" ' . $atrs . '/>';
    }
    echo $out;
}
开发者ID:kamilklkn,项目名称:subrion,代码行数:45,代码来源:function.ia_print_img.php


示例15: define

<?php

//##copyright##
define('INTELLI_REALM', 'recipecat_view');
if (isset($vals[0])) {
    $recipecat_alias = $vals[0];
    // TODO: perform param validation
}
$iaRecipecat = $iaCore->factoryPackages(IA_CURRENT_PACKAGE, 'front', 'recipecat');
$recipecat = isset($recipecat_alias) ? $iaRecipecat->getRecipecatByAlias($recipecat_alias) : false;
if (empty($recipecat)) {
    iaCore::errorPage('404');
}
$iaCore->startHook('phpViewRecipecatBeforeStart', array('listing' => $recipecat['id'], 'item' => 'recipecats'));
$recipecat['@view'] = true;
// get sections
$sections = $iaCore->getAcoGroupsFields(false, false, "`f`.`type`<>'pictures'", $recipecat);
$pictures_sections = $iaCore->getAcoGroupsFields(false, false, "`f`.`type`='pictures'", $recipecat);
if ($pictures_sections) {
    foreach ($pictures_sections as $onesection) {
        if (isset($onesection['fields']) && !empty($onesection['fields']) && is_array($onesection['fields'])) {
            foreach ($onesection['fields'] as $onefield) {
                if (isset($recipecat[$onefield['name']]) && !empty($recipecat[$onefield['name']])) {
                    $iaCore->assign_by_ref('pictures_sections', $pictures_sections);
                    break 2;
                }
            }
        }
    }
}
$recipecat['item'] = 'recipecats';
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:31,代码来源:recipecatview.php


示例16: _createJsFile

 protected function _createJsFile($file, $type = 'config')
 {
     $this->iaCore->factory('util');
     // required in order the class iaUtil to be loaded
     $iaDb =& $this->iaCore->iaDb;
     switch ($type) {
         case 'lang':
         case 'admin_lang':
             // get phrases
             $stmt = "`code` = :lang AND `category` NOT IN ('tooltip', 'page', :category)";
             $iaDb->bind($stmt, array('lang' => $this->iaCore->iaView->language, 'category' => $type == 'admin_lang' ? 'frontend' : iaCore::ADMIN));
             $phrases = $iaDb->keyvalue(array('key', 'value'), $stmt, iaLanguage::getTable());
             // get list of languages
             $languagesList = $iaDb->assoc(array('code', 'title', 'direction', 'flagicon', 'iso' => 'code'), 'admin_lang' == $type ? null : "`status` = 'active'", 'languages');
             $fileContent = 'intelli.' . ('admin_lang' == $type ? 'admin.' : '') . 'lang = ' . iaUtil::jsonEncode($phrases) . ';' . 'intelli.languages = ' . iaUtil::jsonEncode($languagesList) . ';';
             break;
         case 'config':
             $stmt = "`private` = 0 && `type` != 'divider' && `config_group` != 'email_templates'";
             $config = $iaDb->keyvalue(array('name', 'value'), $stmt, iaCore::getConfigTable());
             if (file_exists(IA_INCLUDES . 'custom.inc.php')) {
                 include IA_INCLUDES . 'custom.inc.php';
             }
             $config['ia_url'] = IA_CLEAR_URL;
             $config['packages'] = $this->iaCore->setPackagesData();
             $config['items'] = array();
             $config['extras'] = array(array('core', iaLanguage::get('core', 'Core')));
             $array = $iaDb->all(array('name', 'title'), "`status` = 'active' ORDER BY `type`", null, null, 'extras');
             foreach ($array as $item) {
                 $config['extras'][] = array($item['name'], $item['title']);
             }
             $array = $iaDb->onefield('`item`', "`item` != 'transactions'", null, null, 'items');
             foreach ($array as $item) {
                 $config['items'][] = array($item, iaLanguage::get($item, $item));
             }
             $fileContent = 'intelli.config = ' . iaUtil::jsonEncode($config) . ';';
     }
     if (isset($fileContent)) {
         if ($fh = fopen($file, 'w')) {
             fwrite($fh, $fileContent);
             fclose($fh);
         }
     }
 }
开发者ID:rentpad,项目名称:subrion,代码行数:43,代码来源:ia.core.cache.php


示例17: errorPage

 public static function errorPage($errorCode, $message = null)
 {
     if (!in_array($errorCode, array(self::ERROR_UNAUTHORIZED, self::ERROR_FORBIDDEN, self::ERROR_NOT_FOUND, self::ERROR_INTERNAL)) && is_null($message)) {
         $message = $errorCode;
         $errorCode = self::ERROR_FORBIDDEN;
     } elseif (is_null($message)) {
         $message = iaLanguage::get((string) $errorCode, $errorCode);
     }
     $iaCore = iaCore::instance();
     $iaView =& $iaCore->iaView;
     $iaView->name(self::PAGE_ERROR);
     $iaView->_setParams(array('caption' => iaLanguage::get('error', 'Error page') . ' ' . $errorCode, 'filename' => null, 'name' => self::PAGE_ERROR, 'parent' => '', 'title' => $errorCode, 'group' => 0));
     switch ($iaView->getRequestType()) {
         case self::REQUEST_JSON:
             $iaView->assign(array('error' => true, 'message' => $message, 'code' => $errorCode));
             break;
         case self::REQUEST_HTML:
             // http://dev.subrion.com/issues/842
             // some Apache servers stop with Authorization Required error
             // because of enabled DEFLATE directives in the .htaccess file
             // below is the workaround
             if (self::ERROR_UNAUTHORIZED != $errorCode && iaCore::ACCESS_ADMIN != $iaCore->getAccessType()) {
                 header('HTTP/1.0 ' . $errorCode);
             }
             $iaView->setMessages($message);
             $iaView->assign('code', $errorCode);
             $body = self::PAGE_ERROR;
             $positions =& $iaView->blocks;
             unset($positions['left'], $positions['right'], $positions['top'], $positions['bottom'], $positions['user1'], $positions['user2']);
             $iaAcl = $iaCore->factory('acl');
             if (iaCore::ACCESS_ADMIN == $iaCore->getAccessType() && ($errorCode == self::ERROR_FORBIDDEN && !$iaAcl->isAdmin() || !iaUsers::hasIdentity())) {
                 $iaView->disableLayout();
                 if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'install') === false && !isset($_SESSION['IA_EXIT'])) {
                     $iaView->title(iaLanguage::get('access_denied'));
                 } else {
                     $iaView->title(iaLanguage::get('login'));
                     if (isset($_SESSION['IA_EXIT'])) {
                         unset($_SESSION['IA_EXIT']);
                     }
                 }
                 $body = 'login';
             } elseif (iaCore::ACCESS_FRONT == $iaView->iaCore->getAccessType() && $errorCode == self::ERROR_UNAUTHORIZED && !iaUsers::hasIdentity()) {
                 $body = 'login';
             }
             $iaView->display($body);
     }
     return true;
 }
开发者ID:UzielSilva,项目名称:subrion,代码行数:48,代码来源:ia.core.view.php


示例18: redirect

 public static function redirect($title, $message, $url = null, $isAjax = false)
 {
     $url = $url ? $url : IA_URL;
     $message = is_array($message) ? implode('<br>', $message) : $message;
     unset($_SESSION['redir']);
     $_SESSION['redir'] = array('caption' => $title, 'msg' => $message, 'url' => $url);
     if (!$isAjax) {
         $redirectUrl = IA_URL . 'redirect/';
         if (iaCore::instance()->get('redirect_time', 4000) == 0) {
             $redirectUrl = $url;
         }
         header('Location: ' . $redirectUrl);
         exit;
     }
 }
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:15,代码来源:ia.core.util.php


示例19: header

                         if (!$iaExtrasInstaller->getNotes()) {
                             $result = $iaExtrasInstaller->install();
                         }
                     }
                 }
             }
         }
         $template = iaHelper::getPost('tmpl', $template);
     }
     $iaOutput->errorList = $errorList;
     $iaOutput->template = $template;
     $iaOutput->templates = $templates;
     break;
 case 'download':
     if (class_exists('iaCore')) {
         iaCore::instance()->iaView->set('nodebug', true);
     }
     header('Content-Type: text/x-delimtext; name="config.inc.php"');
     header('Content-disposition: attachment; filename="config.inc.php"');
     echo get_magic_quotes_gpc() ? stripslashes($_POST['config_content']) : $_POST['config_content'];
     exit;
 case 'plugins':
     if (iaHelper::isAjaxRequest()) {
         if (isset($_POST['plugin']) && $_POST['plugin']) {
             echo iaHelper::installRemotePlugin($_POST['plugin']) ? 'installed successfully' : 'installation is not performed';
             exit;
         }
     } else {
         if ($plugins = iaHelper::getRemotePluginsList(IA_VERSION)) {
             $iaOutput->plugins = $plugins;
         } else {
开发者ID:UzielSilva,项目名称:subrion,代码行数:31,代码来源:module.install.php


示例20: array

 case 'add':
     iaBreadcrumb::add(iaLanguage::get('albums'), IA_ADMIN_URL . 'lyrics/albums/');
     // these fields are system and used in system template
     $item = array('status' => 'active', 'account_username' => $_SESSION['user']['username'], 'featured' => true);
     if ('edit' == $pageAction) {
         $item = $iaAlbum->getById((int) $_GET['id']);
         if (empty($item)) {
             iaView::errorPage(iaView::ERROR_NOT_FOUND);
         }
     }
     $fields = iaField::getAllFields(true, '', 'albums');
     if (isset($_POST['save'])) {
         $error = false;
         $errorFields = array();
         $messages = array();
         iaCore::util();
         if ($fields) {
             list($data, $error, $messages, $errorFields) = iaField::parsePost($fields, $item, true);
         }
         // validate account
         if (isset($_POST['account']) && !empty($_POST['account'])) {
             $member_id = $iaDb->one('id', "`username` = '{$_POST['account']}' ", iaUsers::getTable());
             if (!$member_id) {
                 $error = true;
                 $messages[] = iaLanguage::get('album_incorrect_account');
             } else {
                 $data['member_id'] = $member_id;
             }
         } else {
             $data['member_id'] = iaUsers::getIdentity()->id;
         }
开发者ID:nicefirework,项目名称:subrion-lyrics,代码行数:31,代码来源:albums.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP iaDb类代码示例发布时间:2022-05-23
下一篇:
PHP iPHP类代码示例发布时间: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