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


PHP iaUtil::redirect方法代码示例

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


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

示例1: elseif

                     if ($url = $iaPlan->prePayment($iaUsers->getItemName(), $itemData, $plan['id'])) {
                         iaUtil::redirect(iaLanguage::get('thanks'), iaLanguage::get('member_created'), $url);
                     }
                 }
             }
         }
     } elseif ('register_confirm' == $iaView->name()) {
         if (!isset($_GET['email']) || !isset($_GET['key'])) {
             return iaView::accessDenied();
         }
         $error = true;
         if ($iaUsers->confirmation($_GET['email'], $_GET['key'])) {
             $messages[] = $iaCore->get('members_autoapproval') ? iaLanguage::get('reg_confirmed') : iaLanguage::get('reg_confirm_adm_approve');
             $error = false;
             $url = $iaCore->get('members_autoapproval') ? IA_URL . 'login/' : IA_URL;
             iaUtil::redirect(iaLanguage::get('reg_confirmation'), $messages, $url);
         } else {
             $messages[] = iaLanguage::get('confirmation_key_incorrect');
         }
         $iaView->assign('success', !$error);
     }
 }
 switch ($iaView->name()) {
     case 'member_password_forgot':
         $template = 'forgot';
         break;
     case 'register_confirm':
         $template = 'registration-confirmation';
         break;
     default:
         if ($memberId) {
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:31,代码来源:registration.php

示例2: array

             $iaDb->update($item, iaDb::convertIds(iaUsers::getIdentity()->id));
             if (0 == $iaDb->getErrorNumber()) {
                 $iaCore->startHook('phpUserProfileUpdate', array('userInfo' => iaUsers::getIdentity(true), 'data' => $item));
                 iaUsers::reloadIdentity();
                 $iaView->setMessages(iaLanguage::get('saved'), iaView::SUCCESS);
             } else {
                 $iaView->setMessages(iaLanguage::get('db_error'));
             }
         } else {
             $iaView->setMessages($messages);
         }
     }
     if (isset($_POST['plan_id']) && $_POST['plan_id'] != iaUsers::getIdentity()->sponsored_plan_id) {
         if ($plan = $iaPlan->getById((int) $_POST['plan_id'])) {
             $url = $iaPlan->prePayment($itemName, iaUsers::getIdentity(true), $plan['id'], IA_SELF);
             iaUtil::redirect(iaLanguage::get('thanks'), iaLanguage::get('plan_added'), $url);
         } else {
             $iaPlan->setUnpaid(iaUsers::getItemName(), iaUsers::getIdentity()->id);
         }
     }
 }
 $iaCore->startHook('phpFrontAfterProfileProcessData');
 $item = iaUsers::getIdentity(true);
 // get fieldgroups
 list($tabs, $fieldgroups) = $iaField->generateTabs($iaField->filterByGroup($item, $itemName));
 // compose tabs
 $sections = array_merge(array('common' => $fieldgroups), $tabs);
 $extraTabs = array();
 $iaCore->startHook('phpFrontEditProfileExtraTabs', array('tabs' => &$extraTabs, 'item' => &$item));
 $sections = array_merge($sections, $extraTabs);
 if (iaUsers::MEMBERSHIP_ADMINISTRATOR != iaUsers::getIdentity()->usergroup_id) {
开发者ID:TalehFarzaliey,项目名称:subrion,代码行数:31,代码来源:profile.php

示例3: _t

             $action = 'added';
             $data['id'] = $iaLyric->add($data);
         } else {
             if (isset($_POST['delete_lyric'])) {
                 $action = 'deleted';
                 $data['id'] = 0;
                 $iaLyric->delete('`id` = ' . $lyric['id']);
             } else {
                 $action = 'updated';
                 $data['id'] = $lyric['id'];
                 $iaLyric->update($data);
             }
         }
         if (!$error) {
             $messages[] = _t('lyric_' . $action . $dmsg);
             iaUtil::redirect(_t('thanks'), $messages, $iaLyric->url('view', $data));
         }
     }
     if (isset($_POST['ajax'])) {
         header('Content-type: text/xml');
         echo '<?xml version="1.0" encoding="' . $iaCore->get('charset') . '" ?>' . '<root><error>' . $error . '</error><msg><![CDATA[<li>' . implode('</li><li>', $messages) . ']]></msg></root>';
         exit;
     }
 }
 $itemInfo = false;
 $sections = iaField::getAcoGroupsFields(false, 'lyrics', '', $itemInfo);
 $iaView->assign('sections', $sections);
 $iaView->assign('fields', $fields);
 $iaView->assign('error_fields', $errorFields);
 $iaView->assign('item', $lyric);
 $iaView->display('manage');
开发者ID:nicefirework,项目名称:subrion-lyrics,代码行数:31,代码来源:manage.php

示例4: array

 $tplFile = 'pay';
 $error = false;
 $messages = array();
 $iaPlan = $iaCore->factory('plan');
 $iaUsers = $iaCore->factory('users');
 $iaCore->startHook('phpFrontBeforePaymentProcessing', array('transaction' => $transaction));
 switch ($transaction['status']) {
     case iaTransaction::PENDING:
         if (isset($_POST['source']) && 'internal' == $_POST['source']) {
             $iaCore->startHook('phpFrontPaymentBeforeBalanceUpdate');
             if ($transaction && isset($_POST['source']) && 'internal' == $_POST['source']) {
                 if ($iaPlan->extractFunds($transaction)) {
                     empty($_POST['invaddr']) || $iaCore->factory('invoice')->updateAddress($transaction['id'], $_POST['invaddr']);
                     /*-- MOD // jjangaraev --*/
                     $iaPlan->setPaid($transaction);
                     iaUtil::redirect(iaLanguage::get('thanks'), iaLanguage::get('payment_done'), $transaction['return_url']);
                 }
             }
         } elseif (empty($transaction['gateway']) || isset($_GET['repay'])) {
             if (empty($transaction['plan_id'])) {
                 $plan['title'] = $transaction['operation'];
                 $plan['cost'] = $transaction['amount'];
             } else {
                 $plan = $iaPlan->getById($transaction['plan_id']);
             }
             $plan['title'] = $transaction['item'] . ' - ' . $plan['title'];
             $iaView->assign('plan', $plan);
             $iaView->assign('address', $iaCore->factory('invoice')->getAddress($transaction['id']));
             foreach ($gateways as $key => $gateway) {
                 $htmlFormTemplate = IA_PLUGINS . $key . IA_DS . 'templates' . IA_DS . 'front' . IA_DS . 'form.tpl';
                 $gateways[$key] = file_exists($htmlFormTemplate) ? $htmlFormTemplate : false;
开发者ID:rentpad,项目名称:subrion,代码行数:31,代码来源:pay.php

示例5: _t

                }
            } else {
                if (isset($_POST['delete_recipe'])) {
                    $iaDb->delete('`id` = ' . $recipe['id']);
                    $action = 'deleted';
                    $data['id'] = 0;
                } else {
                    $action = 'updated';
                    $data['id'] = $recipe['id'];
                    $iaDb->update($data);
                }
            }
            if (!$error) {
                $url = IA_PACKAGE_URL . ($data['id'] != 0 ? 'add/?id=' . $data['id'] : 'accounts/');
                $msg[] = _t('recipe_' . $action . $dmsg);
                $iaUtil = $iaCore->factory('core', 'util');
                iaUtil::redirect(_t('thanks'), $msg, $url, isset($_POST['ajax']));
            }
        }
        if (isset($_POST['ajax'])) {
            header('Content-type: text/xml');
            echo '<?xml version="1.0" encoding="' . $iaCore->get('charset') . '" ?>' . '<root><error>' . $error . '</error><msg><![CDATA[<li>' . implode('</li><li>', $msg) . ']]></msg></root>';
            exit;
        }
    }
    $iaCore->assign('error_fields', $error_fields);
    $iaCore->assign('item', $recipe);
    $iaCore->set_cfg('body', 'submit');
    $iaCore->set_cfg('title', _t('page_title_' . INTELLI_REALM));
}
$iaDb->resetTable();
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:31,代码来源:recipeadd.php


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