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


PHP iaUtil::go_to方法代码示例

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


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

示例1: _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

示例2: _indexPage

 protected function _indexPage(&$iaView)
 {
     // set default template
     if (isset($_POST['install']) || isset($_POST['reinstall'])) {
         if ($this->_installTemplate()) {
             $iaView->setMessages(iaLanguage::getf('template_installed', array('name' => $this->getHelper()->title)), iaView::SUCCESS);
             $this->_iaCore->iaCache->clearAll();
             $this->_iaCore->factory('log')->write(iaLog::ACTION_INSTALL, array('type' => 'template', 'name' => $this->getHelper()->title));
             iaUtil::go_to(IA_SELF);
         }
     }
     // download template
     if (isset($_POST['download'])) {
         if ($this->_downloadTemplate()) {
             $this->_iaCore->iaCache->remove('subrion_templates.inc');
         }
     }
     $templates = $this->_getList();
     if ($this->_messages) {
         $iaView->setMessages($this->_messages, $this->_error ? iaView::ERROR : iaView::SUCCESS);
     }
     $iaView->assign('templates', $templates);
     $iaView->assign('tmpl', $this->_iaCore->get('tmpl'));
 }
开发者ID:kamilklkn,项目名称:subrion,代码行数:24,代码来源:templates.php

示例3: _processAction

 private function _processAction(&$iaView)
 {
     $iaAcl = $this->_iaCore->factory('acl');
     $iaLog = $this->_iaCore->factory('log');
     $package = iaSanitize::sql($this->_iaCore->requestPath[0]);
     $action = $this->_iaCore->requestPath[1];
     $error = false;
     switch ($action) {
         case 'activate':
         case 'deactivate':
             if (!$iaAcl->isAccessible($this->getName(), 'activate')) {
                 return iaView::accessDenied();
             }
             if ($this->_activate($package, 'deactivate' == $action)) {
                 $type = 'deactivate' == $action ? iaLog::ACTION_DISABLE : iaLog::ACTION_ENABLE;
                 $iaLog->write($type, array('type' => iaExtra::TYPE_PACKAGE, 'name' => $package), $package);
             } else {
                 $error = true;
             }
             break;
         case 'set_default':
             if (!$iaAcl->isAccessible($this->getName(), $action)) {
                 return iaView::accessDenied();
             }
             $error = !$this->_setDefault($package);
             break;
         case 'reset':
             if (!$iaAcl->isAccessible($this->getName(), 'set_default')) {
                 return iaView::accessDenied();
             }
             $error = !$this->_reset($iaView->domain);
             break;
         case iaExtra::ACTION_INSTALL:
         case iaExtra::ACTION_UPGRADE:
             if (!$iaAcl->isAccessible($this->getName(), $action)) {
                 return iaView::accessDenied();
             }
             if ($this->_install($package, $action, $iaView->domain)) {
                 // log this event
                 $action = $this->getHelper()->isUpgrade ? iaLog::ACTION_UPGRADE : iaLog::ACTION_INSTALL;
                 $iaLog->write($action, array('type' => iaExtra::TYPE_PACKAGE, 'name' => $package, 'to' => $this->getHelper()->itemData['info']['version']), $package);
                 //
                 $iaSitemap = $this->_iaCore->factory('sitemap', iaCore::ADMIN);
                 $iaSitemap->generate();
             } else {
                 $error = true;
             }
             break;
         case iaExtra::ACTION_UNINSTALL:
             if (!$iaAcl->isAccessible($this->getName(), $action)) {
                 return iaView::accessDenied();
             }
             if ($this->_uninstall($package)) {
                 $iaLog->write(iaLog::ACTION_UNINSTALL, array('type' => iaExtra::TYPE_PACKAGE, 'name' => $package), $package);
             } else {
                 $error = true;
             }
     }
     $this->_iaCore->iaCache->clearAll();
     $iaView->setMessages($this->getMessages(), $error ? iaView::ERROR : iaView::SUCCESS);
     iaUtil::go_to($this->getPath());
 }
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:62,代码来源:packages.php

示例4: _reopen

 protected function _reopen($option, $action)
 {
     $options = array('add' => $this->getPath() . 'add/', 'list' => $this->getPath(), 'stay' => $this->getPath() . 'edit/' . $this->getEntryId() . '/');
     $option = isset($options[$option]) ? $option : 'list';
     if (iaCore::ACTION_EDIT == $action && 'stay' != $option || iaCore::ACTION_ADD == $action) {
         $this->_iaCore->factory('util');
         iaUtil::go_to($options[$option]);
     }
 }
开发者ID:UzielSilva,项目名称:subrion,代码行数:9,代码来源:ia.base.controller.admin.php

示例5: array

         } else {
             $iaView->assign('pay_message', iaLanguage::getf('wait_for_gateway_answer', array('url' => IA_SELF . '?repay')));
         }
         break;
     case iaTransaction::PASSED:
         if ('ipn' == $action) {
             $iaTransaction->createIpn($transaction);
         } else {
             $iaView->setMessages(iaLanguage::get('this_transaction_already_passed'), iaView::ALERT);
             iaUtil::go_to($iaPage->getUrlByName('member_funds'));
         }
         break;
     case iaTransaction::REFUNDED:
     case iaTransaction::FAILED:
         $iaView->setMessages($messages);
         iaUtil::go_to($iaPage->getUrlByName('member_funds'));
         break;
     default:
         $error = true;
         $messages[] = 'Unknown status';
 }
 $iaView->setMessages($messages, $error ? iaView::ERROR : iaView::SUCCESS);
 $memberBalance = iaUsers::hasIdentity() ? iaUsers::getIdentity()->funds : 0;
 iaLanguage::set('funds_in_your_account', iaLanguage::getf('funds_in_your_account', array('sum' => $memberBalance, 'currency' => $iaCore->get('currency'))));
 $isBalancePayment = iaUsers::hasIdentity() && iaTransaction::TRANSACTION_MEMBER_BALANCE == $transaction['item'] && iaUsers::getIdentity()->id == $transaction['item_id'];
 $isFundsEnough = (bool) (!$isBalancePayment && iaUsers::hasIdentity() && iaUsers::getIdentity()->funds >= $transaction['amount']);
 // FIXME: solution to prevent csrf catching.
 // Should be replaced once it is possible to disable csrf checking for a single page.
 if (isset($_POST)) {
     $paymentPost = $_POST;
     if (isset($_SERVER['HTTP_ORIGIN'])) {
开发者ID:rentpad,项目名称:subrion,代码行数:31,代码来源:pay.php

示例6: count

                            $results['num'] += count($array);
                            $results['html'][$i] = implode('', $array);
                        }
                    }
                }
                $start = $start > 0 ? $start + $results['num'] - $results['all'] : $start;
                $limit = $results['num'] < $limit ? $limit - $results['num'] : 0;
            }
        }
    }
    if ($results['all']) {
        if (isset($_POST['q'])) {
            $search['terms'] = serialize($search['terms']);
            $searchId = $iaDb->insert($search, array('time' => 'UNIX_TIMESTAMP()'));
            $url = IA_URL . ($adv ? 'adv' : '') . 'search/?id=' . $searchId;
            iaUtil::go_to($url);
        }
    }
    // searched terms for additional fields
    if ($fields && $search['terms']['items']) {
        foreach ($search['terms']['items'] as $i => $f) {
            foreach ($f as $fname => $fval) {
                $fields[$i][$fname]['val'] = iaSanitize::html($fval['val']);
                $fields[$i][$fname]['cond'] = $fval['cond'];
            }
        }
    }
}
$iaDb->resetTable();
$iaView->assign('items', $adv ? array_keys($items) : array());
$iaView->assign('adv', $adv);
开发者ID:nicefirework,项目名称:subrion,代码行数:31,代码来源:search.php

示例7: array

     $tags = iaCore::ACTION_ADD == $pageAction ? '' : $iaBlog->getTagsString($id);
     $iaView->assign('item', $entry);
     $iaView->assign('tags', $tags);
     break;
 case iaCore::ACTION_DELETE:
     if (1 != count($iaCore->requestPath)) {
         return iaView::errorPage(iaView::ERROR_NOT_FOUND);
     }
     $id = (int) $iaCore->requestPath[0];
     $entry = $iaDb->row(iaDb::ALL_COLUMNS_SELECTION, iaDb::convertIds($id));
     if (!$entry) {
         return iaView::errorPage(iaView::ERROR_NOT_FOUND);
     }
     $result = $iaBlog->delete($id);
     $iaView->setMessages(iaLanguage::get($result ? 'deleted' : 'db_error'), $result ? iaView::SUCCESS : iaView::ERROR);
     iaUtil::go_to($baseUrl);
     break;
 default:
     $iaView->display('index');
     $pageActions = array();
     if (isset($iaCore->requestPath[0])) {
         $id = (int) $iaCore->requestPath[0];
         if (!$id) {
             return iaView::errorPage(iaView::ERROR_NOT_FOUND);
         }
         $entry = $iaBlog->getById($id);
         if (empty($entry)) {
             return iaView::errorPage(iaView::ERROR_NOT_FOUND);
         }
         $title = iaSanitize::tags($entry['title']);
         iaBreadcrumb::toEnd($title);
开发者ID:UzielSilva,项目名称:subrion,代码行数:31,代码来源:index.php

示例8: _indexPage

 protected function _indexPage(&$iaView)
 {
     if ('phrases' == $iaView->get('name')) {
         iaBreadcrumb::preEnd(iaLanguage::get('languages'), IA_ADMIN_URL . 'languages/');
         $iaView->assign('action', 'phrases');
         $iaView->display('languages');
         return true;
     }
     $action = isset($this->_iaCore->requestPath[0]) ? $this->_iaCore->requestPath[0] : 'list';
     $iaView->assign('action', $action);
     switch ($action) {
         case 'search':
             $pageCaption = iaLanguage::get('search_in_phrases');
             break;
         case 'download':
             $pageCaption = iaLanguage::get('export_language');
             if (isset($_POST['lang']) && $_POST['lang'] || isset($this->_iaCore->requestPath[1]) && array_key_exists($this->_iaCore->requestPath[1], $this->_iaCore->languages)) {
                 $this->_downloadLanguage($iaView);
             }
             break;
         case 'comparison':
             $pageCaption = iaLanguage::get('languages_comparison');
             $this->_compareLanguages($iaView);
             break;
         case 'rm':
             // TODO: set checkAccess
             $this->_removeLanguage($iaView);
             iaUtil::go_to($this->getPath());
             break;
         case 'default':
             $this->_setLanguageAsDefault($iaView);
             iaUtil::go_to($this->getPath());
             break;
         case 'import':
             $result = $this->_importLanguage($iaView);
             iaUtil::go_to($this->getPath() . ($result ? '' : 'download/'));
             break;
     }
     if (isset($pageCaption)) {
         iaBreadcrumb::toEnd($pageCaption, IA_SELF);
         $iaView->title($pageCaption);
     }
 }
开发者ID:kamilklkn,项目名称:subrion,代码行数:43,代码来源:languages.php

示例9: _previewPage

 private function _previewPage($action)
 {
     if (iaCore::ACTION_ADD == $action) {
         $_POST['save'] = true;
     } else {
         iaUtil::loadUTF8Functions('ascii', 'validation', 'bad', 'utf8_to_ascii');
         $newPage = array();
         $name = strtolower($_POST['name'] = !utf8_is_ascii($_POST['name']) ? utf8_to_ascii($_POST['name']) : $_POST['name']);
         if (isset($_POST['contents']) && is_array($_POST['contents'])) {
             function utf8_validation(&$item)
             {
                 $item = !utf8_is_valid($item) ? utf8_bad_replace($item) : $item;
             }
             foreach ($_POST['contents'] as $key => $content) {
                 utf8_validation($_POST['contents'][$key]);
             }
             $newPage['contents'] = $_POST['contents'];
         }
         $newPage['titles'] = $_POST['titles'];
         $newPage['passw'] = iaSanitize::sql($_POST['passw']);
         isset($_SESSION['preview_pages']) || ($_SESSION['preview_pages'] = array());
         $_SESSION['preview_pages'][$name] = $newPage;
         $languagesEnabled = $this->_iaCore->get('language_switch', false) && count($this->_iaCore->languages);
         $redirectUrl = IA_CLEAR_URL . ($languagesEnabled ? $_POST['language'] . IA_URL_DELIMITER : '') . 'page' . IA_URL_DELIMITER . $name . IA_URL_DELIMITER . '?preview';
         iaUtil::go_to($redirectUrl);
     }
 }
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:27,代码来源:pages.php

示例10: array

                $info = array('image_width' => 500, 'image_height' => 500, 'thumb_width' => 150, 'thumb_height' => 150, 'resize_mode' => iaPicture::CROP);
                if ($image = $iaPicture->processImage($_FILES['image'], '', iaUtil::generateToken(), $info)) {
                    empty($guestbook['avatar']) || $iaPicture->delete($guestbook['avatar']);
                    // already has an assigned image
                    $guestbook['avatar'] = $image;
                }
            }
            if (isset($_POST['status'])) {
                $guestbook['status'] = isset($_POST['status']) && !empty($_POST['status']) && in_array($_POST['status'], array(iaCore::STATUS_ACTIVE, iaCore::STATUS_INACTIVE)) ? $_POST['status'] : 'inactive';
            }
            if (isset($_POST['email']) && iaValidate::isEmail($_POST['email'])) {
                $guestbook['email'] = $_POST['email'];
            }
            if (!$error && iaCore::ACTION_EDIT == $pageAction) {
                $id = $guestbook['id'] = (int) $iaCore->requestPath[0];
                $result = $iaDb->update($guestbook);
                $messages[] = iaLanguage::get('saved');
                if ($result) {
                    $iaCore->factory('log')->write(iaLog::ACTION_UPDATE, array('item' => '', 'name' => iaLanguage::get('guestbook_message'), 'id' => $id, 'module' => 'guestbook'));
                }
            }
            $iaView->setMessages($messages, $error ? iaView::ERROR : iaView::SUCCESS);
            iaUtil::go_to(IA_ADMIN_URL . 'guestbook/');
        }
        $iaView->assign('guestbook', $guestbook);
        $iaView->display('index');
    } else {
        $iaView->grid('_IA_URL_plugins/guestbook/js/admin/index');
    }
}
$iaDb->resetTable();
开发者ID:intelliants,项目名称:subrion-plugin-guestbook,代码行数:31,代码来源:index.php

示例11: utf8_to_ascii

                    }
                    if (!utf8_is_ascii($data['title_alias'])) {
                        $data['title_alias'] = utf8_to_ascii($data['title_alias']);
                    }
                }
                $data['title_alias'] = $iaCore->convertStr($data['title_alias']);
                if (empty($recipecat)) {
                    $iaCore->startHook("phpAdminBeforeRecipecatAdd");
                    $data['id'] = $iaRecipecat->add($data);
                    $msg = _t('recipecat_added');
                } else {
                    $data['id'] = $recipecat['id'];
                    $iaCore->startHook("phpAdminBeforeRecipecatUpdate");
                    $iaRecipecat->update($data);
                    $msg = _t('changes_saved');
                }
                $recipecat = $iaDb->row('*', sprintf("`id`=%d", $data['id']));
                $iaCore->msg($msg, $error ? 'error' : 'success');
                if (isset($_POST['goto'])) {
                    iaUtil::go_to(IA_ADMIN_URL . 'manage/recipecats/' . ($_POST['goto'] == 'add' ? 'add/' : ''));
                }
            }
        }
        $fields_groups = $iaCore->getFieldsGroups();
        $iaCore->assign('fields_groups', $fields_groups);
        $iaCore->assign('recipecat', $recipecat);
        $iaCore->assign('isView', false);
        $iaCore->display('recipecats');
    }
}
$iaDb->resetTable();
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:31,代码来源:manage_recipecats.php

示例12: array

         } else {
             $iaView->assign('pay_message', iaLanguage::getf('wait_for_gateway_answer', array('url' => IA_SELF . '?repay')));
         }
         break;
     case iaTransaction::PASSED:
         if ('ipn' == $action) {
             $iaTransaction->createIpn($transaction);
         } else {
             $iaView->setMessages(iaLanguage::get('this_transaction_already_passed'), iaView::ALERT);
             iaUtil::go_to($iaPage->getUrlByName('member_balance'));
         }
         break;
     case iaTransaction::REFUNDED:
     case iaTransaction::FAILED:
         $iaView->setMessages($messages);
         iaUtil::go_to($iaPage->getUrlByName('member_balance'));
         break;
     default:
         $error = true;
         $messages[] = 'Unknown status';
 }
 $iaView->setMessages($messages, $error ? iaView::ERROR : iaView::SUCCESS);
 $memberBalance = iaUsers::hasIdentity() ? iaUsers::getIdentity()->funds : 0;
 iaLanguage::set('balance_in_your_account', iaLanguage::getf('balance_in_your_account', array('sum' => $memberBalance, 'currency' => $iaCore->get('currency'))));
 $isBalancePayment = iaUsers::hasIdentity() && 'balance' == $transaction['item'] && iaUsers::getIdentity()->id == $transaction['item_id'];
 $isFundsEnough = (bool) (!$isBalancePayment && iaUsers::hasIdentity() && iaUsers::getIdentity()->funds >= $transaction['amount']);
 // FIXME: solution to prevent csrf catching.
 // Should be replaced once it is possible to disable csrf checking for a single page.
 if (isset($_POST)) {
     $paymentPost = $_POST;
     if (isset($_SERVER['HTTP_ORIGIN'])) {
开发者ID:bohmszi,项目名称:kdbe_cms,代码行数:31,代码来源:pay.php

示例13: str_replace

}
if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
    if (iaCore::ACTION_ADD == $pageAction) {
        $html = 0;
        if (isset($_POST['save'])) {
            if ($_POST['type'] == 'text') {
                $body = str_replace("'", "\\'", $_POST['body']);
            } else {
                $body = str_replace("'", "\\'", $_POST['html_body']);
                $html = 1;
            }
            list($error, $msg) = $iaMailerPlugin->createQueue($_POST['from_name'], $_POST['from_mail'], $_POST['subj'], $body, $html, $_POST['groups'], $_POST['st']);
            $iaView->setMessages($msg, $error ? iaView::ERROR : iaView::SUCCESS);
            if (!$error) {
                $iaUtil = iaCore::util();
                iaUtil::go_to(IA_ADMIN_URL . 'mailer/');
            }
        }
        if (empty($_POST)) {
            $data = array('from_name' => iaUsers::getIdentity()->fullname, 'from_mail' => iaUsers::getIdentity()->email, 'type' => 'html', 'subj' => '', 'body' => '');
        } else {
            $data = $_POST;
        }
        $statuses = $iaMailerPlugin->getAccountsStatusList();
        $iaView->assign('data', $data);
        $iaView->assign('statuses', $statuses);
        $iaView->assign('usergroups', $iaCore->factory('users')->getUsergroups());
        $iaView->assign('check', !empty($_POST['type']) && 'html' == $_POST['type'] ? true : false);
    } else {
        if ($queue = $iaMailerPlugin->getQueues()) {
            $iaView->assign('queue', $queue);
开发者ID:intelliants,项目名称:subrion-plugin-mailer,代码行数:31,代码来源:index.php

示例14: isset

<?php

//##copyright##
if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
    // affiliate member id
    $memberId = isset($iaCore->requestPath[0]) ? (int) $iaCore->requestPath[0] : 0;
    // affiliate product id used for tracking
    $productId = isset($iaCore->requestPath[1]) ? (int) $iaCore->requestPath[1] : 0;
    // check referer
    $visitorReferrer = getenv('HTTP_REFERER');
    if ($memberId) {
        $iaVisitor = $iaCore->factoryPackage('visitor', IA_CURRENT_PACKAGE);
        // get unique tracking ID for a visitor in case it's not set
        $trackingSalt = isset($_COOKIE['IA_AFF_TRACKING']) ? $_COOKIE['IA_AFF_TRACKING'] : $memberId . iaUtil::generateToken(20);
        // update tracking record
        $iaVisitor->updateTrackingRecords($trackingSalt, $memberId, $productId, $visitorReferrer);
    }
    // redirect to the page
    $redirectUrl = $iaCore->get('aff_incoming_page', IA_URL);
    if ($productId) {
        $redirectUrl = $iaDb->one('`url`', iaDb::convertIds($productId), 'affiliates_products');
    }
    iaUtil::go_to($redirectUrl);
}
开发者ID:nicefirework,项目名称:subrion-elitius,代码行数:24,代码来源:tracking.php

示例15: _checkForUpdates

 private function _checkForUpdates()
 {
     $url = sprintf(iaUtil::REMOTE_TOOLS_URL . 'get/updates/%s/', IA_VERSION);
     $content = iaUtil::getPageContent($url);
     if (!$content) {
         return;
     }
     $content = iaUtil::jsonDecode($content);
     if (is_array($content) && $content) {
         $messages = array();
         foreach ($content as $entry) {
             switch ($entry['type']) {
                 case self::UPDATE_TYPE_INFO:
                     $messages[] = array($entry['id'], $entry['message']);
                     break;
                 case self::UPDATE_TYPE_PATCH:
                     $version = explode('.', $entry['version']);
                     if (count($version) > 3) {
                         if ($this->_iaCore->get('auto_apply_critical_upgrades')) {
                             $result = iaSystem::forceUpgrade($entry['version']);
                             if (is_bool($result) && $result) {
                                 $this->_iaCore->factory('cache')->clearGlobalCache();
                                 $message = iaLanguage::getf('script_upgraded', array('version' => $entry['version']));
                                 $this->_iaCore->iaView->setMessages($message, iaView::SUCCESS);
                                 iaUtil::go_to(IA_SELF);
                             } else {
                                 iaDebug::debug($result, 'Forced upgrade to the version ' . $entry['version']);
                             }
                         }
                     } else {
                         $url = sprintf('%sinstall/upgrade/check/%s/', IA_CLEAR_URL, $entry['version']);
                         $this->_iaCore->iaView->setMessages(iaLanguage::getf('upgrade_available', array('url' => $url, 'version' => $entry['version'])), iaView::SYSTEM);
                     }
             }
         }
         $this->_iaCore->iaView->assign('updatesInfo', $messages);
     }
 }
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:38,代码来源:index.php


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