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


PHP header_location_exit函数代码示例

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


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

示例1: attachedfiles

            }
            if ($_POST['attachedfiles_session'] && $insert['is_attached'] == true) {
                $mailer->addAttachedFiles($_POST['attachedfiles_files'], $id);
                $attachedfiles = new attachedfiles($_POST['attachedfiles_session']);
                $attachedfiles->clear();
            }
            $is_update_mailer = true;
            $mailer->update($insert, $id);
            if ($insert['filter_emp'] == null) {
                $mailer->deleteFilter('mailer_filter_employer', $id_filter_emp);
            }
            if ($insert['filter_frl'] == null) {
                $mailer->deleteFilter('mailer_filter_freelancer', $id_filter_frl);
            }
            if (__paramInit('int', null, 'preview') == 1) {
                header_location_exit("/siteadmin/mailer/?action=preview&id={$message['id']}");
            }
            if ($message['in_draft'] == 'false') {
                header('Location: /siteadmin/mailer/');
                exit;
            }
        }
        break;
    default:
        break;
}
switch ($gAction) {
    case 'preview_only':
        $mailer_id = __paramInit('int', 'id');
        $message = $mailer->getMailerById($mailer_id);
        echo $mailer->getMailContent($message['message']);
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例2: __paramInit

        if ($action == 'status_action') {
            $resend = __paramInit('bool', NULL, 'resend');
            $del = __paramInit('bool', NULL, 'del');
            $cancel = __paramInit('bool', NULL, 'cancel');
            $id = __paramInit('int', NULL, 'id');
            $ok = true;
            if ($resend) {
                $ok = $sbr->resendCanceled($id);
            } else {
                if ($cancel) {
                    $ok = $sbr->cancel($id);
                } else {
                    if ($del) {
                        $ok = $sbr->delete($id);
                    }
                }
            }
            if ($ok) {
                header_location_exit('/norisk2/' . ($del ? '' : "?id={$id}"));
            }
        }
        $anchor = __paramInit('int', 'id');
        if (!($sbr_currents = $sbr->getCurrents())) {
            header_location_exit('/promo/sbr/');
        } else {
            $sbr->getUserReqvs();
        }
        $_SESSION['sbr_tip_old'] = notifications::getSbrTip('old');
        $sbr->setLastView('old');
        break;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例3: gray_ip

$gray_ip = new gray_ip($log_pp);
$task = __paramInit('string', 'task', 'task');
$page = __paramInit('int', 'page', 'page', 1);
$filter = array();
$cmd = __paramInit('string', 'cmd', null, '');
$search_name = __paramInit('string', 'search_name', null, '');
$adm = __paramInit('string', 'adm', null, 0);
$primary_id = __paramInit('string', 'primary_id', null, 0);
$f_ip = __paramInit('string', 'f_ip', null, '');
$t_ip = __paramInit('string', 't_ip', null, '');
$admins = $gray_ip->getAdmins();
$search_name = clearInputText($search_name);
if (!$page) {
    $page = 1;
} elseif ($page < 0) {
    header_location_exit('/404.php');
    exit;
}
if ($task == 'checklogin') {
    $login = __paramInit('string', 'login', 'login');
    $result = array();
    $result['success'] = false;
    if ($login) {
        $users = new users();
        $users->GetUser($login);
        if ($users->uid) {
            $result['success'] = true;
            $result['user'] = array('uid' => $users->uid, 'login' => $users->login, 'uname' => iconv('CP1251', 'UTF-8', $users->uname), 'usurname' => iconv('CP1251', 'UTF-8', $users->usurname));
        }
    }
    $result['test'] = $login;
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例4: __paramInit

    case 'remove':
        $qid = __paramInit('int', 'id');
        if ($qid) {
            $parser->removeQuery($qid);
        }
        header_location_exit($_SERVER['HTTP_REFERER']);
        break;
    case 'add_filter':
        $qid = __paramInit('int', null, 'query');
        $filter_rule = __paramInit('int', null, 'filter_rule');
        //        $word = __paramInit('string', null, 'word');
        $word = trim($_POST['word']);
        if (!strlen($word)) {
            header_location_exit($_SERVER['HTTP_REFERER']);
        }
        $parser->addFilter($word, $filter_rule, TRUE);
        if ($qid) {
            $parser->removeQuery($qid);
        }
        header_location_exit($_SERVER['HTTP_REFERER']);
        break;
    default:
        if ($page <= 0) {
            $page = 1;
        }
        $offset = ($page - 1) * $limit;
        $data = $parser->getQueries($start, $limit, $offset, $pages);
        $pages = ceil($pages / $limit);
}
//$first_chars = $parser->getFirstChars();
$rules = $parser->getRules();
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tab.queries.php

示例5: intval

 case "info":
     $inner = "inform_inner.php";
     $activ_tab = 2;
     break;
 case "all":
     $mode = intval($_GET['mode']);
     if (!($mode > 0 && $mode <= 4)) {
         include ABS_PATH . "/404.php";
         exit;
     }
     $content = "all_inner.php";
     break;
 case "tu-orders":
     if (!hasPermissions('users')) {
         if ($uid && !is_emp()) {
             header_location_exit("/tu-orders/");
             exit;
         } elseif ($user->uid != $uid) {
             include ABS_PATH . "/404.php";
             exit;
         }
     }
     require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/yii/tinyyii.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/tservices/tservices_helper.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/TServiceOrderStatus.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/widgets/TServiceOrderFeedback.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/models/TServiceOrderModel.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/tu/models/TServiceMsgModel.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reserves/ReservesArbitragePopup.php';
     // Формируем JS внизу страницы
     define('JS_BOTTOM', true);
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例6: array

     $params = $_POST['prof'];
     if (is_array($params)) {
         $firstProf = "#prof" . $params[0];
     } else {
         $firstProf = "";
     }
     if (!($params && is_array($params))) {
         $params = array(-3);
     }
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     $prof = new professions();
     if ($params && is_array($params)) {
         $error .= $prof->UpdatePortfChoise($uid, $params);
     }
     unset($prof);
     header_location_exit("/users/{$login}");
     break;
 case "portf_change":
     ini_set('memory_limit', '200M');
     if ($_POST['is_video'] === '1') {
         // Добавление видео
         // Удаляем повторные пробелы.
         //$name = substr(strip_tags(trim($_POST['v_pname'])),0,80);
         $name = __paramInit('html', null, 'v_pname', '', 80, true);
         if (!$name) {
             $name = '';
         }
         $sm_img = new CFile($_FILES['v_sm_img']);
         // Разбиваем длинные слова.
         //$descr = substr(change_q_new(stripslashes($_POST['v_descr'])),0,1500);
         $descr = __paramInit('html_save_ul_li_b_p_i', null, 'v_descr', '', 1500, true);
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例7: array

            }
            if (!$error) {
                if ($id) {
                    $promoCodes->edit($id, array('code' => $code, 'date_start' => $date_start, 'date_end' => $date_end, 'discount_percent' => $is_percent ? $discount : 0, 'discount_price' => !$is_percent ? $discount : 0, 'count' => $count), $post_services);
                    header_location_exit('/siteadmin/promo_codes/');
                } else {
                    $promoCodes->add(array('code' => $code, 'date_start' => $date_start, 'date_end' => $date_end, 'discount_percent' => $is_percent ? $discount : 0, 'discount_price' => !$is_percent ? $discount : 0, 'count' => $count), $post_services);
                    header_location_exit('/siteadmin/promo_codes/');
                }
            }
        }
        $card = $promoCodes->getById($id);
        break;
    case 'delete':
        $promoCodes->delete($id);
        header_location_exit('/siteadmin/promo_codes/');
        break;
    default:
        break;
}
$codesArray = $promoCodes->getList();
foreach ($codesArray as $key => $code) {
    $codesArray[$key]['service_string'] = '';
    foreach ($code['services'] as $k => $value) {
        if ($k > 0) {
            $codesArray[$key]['service_string'] .= ', ';
        }
        $codesArray[$key]['service_string'] .= $services[$value];
    }
}
$list = Template::render('list.php', array('data' => $codesArray));
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例8: define

<?php

/**
 * Статистика ТУ
 * 
 */
define('IS_SITE_ADMIN', 1);
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
hasPermissions('tservices') || header_location_exit('/404.php');
$rpath = "../../";
$css_file = array('moderation.css', 'new-admin.css', 'nav.css');
$header = $rpath . 'header.new.php';
$content = '../content.php';
$footer = $rpath . 'footer.new.html';
$template = 'template3.php';
$data = array();
$mode = __paramInit('string', 'mode', null, '');
// раздел
if (!in_array($mode, array('orders'))) {
    header("Location: /404.php");
    exit;
}
switch ($mode) {
    case 'orders':
        $inner_page = "orders_inner.php";
        $css_file[] = 'calendar.css';
        $js_file = array('calendar.js');
        break;
}
include $rpath . $template;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:30,代码来源:index.php

示例9: array

            if ($attachedfiles_tmpprj_files) {
                $attachedfiles_prj_files = array();
                foreach ($attachedfiles_tmpprj_files as $attachedfiles_prj_file) {
                    $attachedfiles_prj_files[] = $attachedfiles_prj_file['file_id'];
                }
                $set = $uploader->setFiles($attachedfiles_prj_files, $draft_id ? uploader::STATUS_ADDED : uploader::STATUS_CREATE);
            }
        }
        $attachedfiles_files = $uploader->getFiles();
        $content = "new/tpl.step_1.php";
        break;
        //------------------------------------------------------------------------------
    //------------------------------------------------------------------------------
    case 0:
    default:
        header_location_exit('/public/?step=1&kind=1');
        break;
}
// Все изменения $tmpPrj->_project переносим в переменную.
$project = $tmpPrj->getProject();
if (trim($project['contacts']) != '') {
    $contacts = unserialize($project['contacts']) ? unserialize($project['contacts']) : $contacts;
}
if ($project['country']) {
    $location = country::GetCountryName($project['country']);
    if ($project['city']) {
        $location .= ': ' . city::GetCityName($project['city']);
    }
    $project['location'] = $location;
}
$prj_categories = $tmpPrj->getCategories();
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例10: header_location_exit

                        header_location_exit("/norisk2/{$site_uri}");
                    }
                    break;
                case 'delete':
                    if ($sbr->delDocs($_POST['id'])) {
                        header_location_exit("/norisk2/{$site_uri}");
                    }
                    break;
                default:
                    list($action, $mode) = explode('=', $action);
                    if ($action == 'set_access') {
                        if ($sbr->setDocAccess($_POST['id'], (int) $mode)) {
                            header_location_exit("/norisk2/{$site_uri}");
                        }
                    } else {
                        if ($action == 'set_status') {
                            if ($sbr->setDocStatus($_POST['id'], (int) $mode)) {
                                header_location_exit("/norisk2/{$site_uri}");
                            }
                        }
                    }
                    break;
            }
        }
        $sbr->getDocs();
        break;
        // куда может ходить
    // куда может ходить
    case 'history':
        break;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例11: header_location_exit

        }
        $_SESSION['pro_last'] = $_SESSION['pro_last']['is_freezed'] ? false : $_SESSION['pro_last']['cnt'];
        header_location_exit($location);
    }
}
if ($action == 'freeze_stop' && $freezed_now) {
    if (!payed::freezeProStop($uid, $last_freeze_id)) {
        $freeze_error = 'Невозможно разморозить аккаунт.';
    } else {
        $pro_last = payed::ProLast($_SESSION['login']);
        if (!$pro_last['freeze_to']) {
            if (isset($_SESSION['freeze_from'])) {
                unset($_SESSION['freeze_from']);
            }
            if (isset($_SESSION['freeze_to'])) {
                unset($_SESSION['freeze_to']);
            }
            if (isset($_SESSION['is_freezed'])) {
                unset($_SESSION['is_freezed']);
            }
        } else {
            $_SESSION['freeze_from'] = $pro_last['freeze_from'];
            $_SESSION['freeze_to'] = $pro_last['freeze_to'];
            $_SESSION['is_freezed'] = $pro_last['is_freezed'];
            $_SESSION['payed_to'] = $pro_last['cnt'];
        }
        $_SESSION['pro_last'] = $pro_last['is_freezed'] ? false : $pro_last['cnt'];
        $freezed_now = $freeze_allow = false;
        header_location_exit($location);
    }
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:freeze.php

示例12: header_location_exit

                if ($stage->arbitrage($descr, $_FILES['attach'])) {
                    header_location_exit('/' . sbr::NEW_TEMPLATE_SBR . "/?id={$sbr->id}");
                }
            }
        }
        $site_uri = "?site=arbitrage&id={$stage->id}";
        $inner = 'arbitrage.php';
        break;
    case 'calc':
        header_location_exit('/404.php');
        $g_help_id = 220;
        $rqv = null;
        if ($sbr->isFrl()) {
            $rqv = $sbr->getUserReqvs(get_uid(0));
        }
        $inner = 'tpl.calc.php';
        $js_file = array('/css/block/b-tooltip/b-tooltip.js', '/css/block/b-filter/b-filter.js');
        break;
    case 'archive':
        if (!$count_old_sbr) {
            header_location_exit('/' . sbr::NEW_TEMPLATE_SBR . '/');
        }
        $filter = 'archive';
        $inner = 'tpl.archive.php';
        break;
    default:
        break;
}
$css_file = array('norisk-user.css', '/css/nav.css', '/css/block/b-button-multi/b-button-multi.css', '/css/block/b-card/b-card.css', '/css/block/b-estimate/b-estimate.css', '/css/block/b-tax/b-tax.css', '/css/block/b-icon/_help/b-icon_help.css', '/css/block/b-master/b-master.css', '/css/block/b-master/b-master.css', '/css/block/b-tooltip/b-tooltip.css', '/css/block/b-icon/__role/b-icon__role.css', '/css/block/b-menu/_tabs/b-menu_tabs.css', '/css/block/b-input-hint/b-input-hint.css');
$js_file[] = 'mAttach2.js';
include $rpath . 'template2.php';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例13: define

    $allow_fp = true;
    define('NO_CSRF', 1);
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/Verification.php';
$uid = get_uid(false);
if ($uid <= 0) {
    header_location_exit('/promo/verification/');
}
$service = __paramInit('string', 'service');
$verification = new Verification();
switch ($service) {
    case 'webmoney':
        if (!$verification->webmoney($uid)) {
            $error = $verification->getError();
            session::setFlashMessage($error, 'verify_error');
        }
        break;
        //@todo: можно перенести из income обработку ЯД верификации
    //@todo: можно перенести из income обработку ЯД верификации
    default:
        header_location_exit('/promo/verification/');
}
?>
<html>
    <body>
        <script type="text/javascript">
            window.close();
        </script>
    </body>
</html>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例14: detectSiteVersion

/**
 * при открытии основной версии сайта определяет, возможно нужно редиректить на мобильную
 * выбор сохраняется в куках
 * для мобильной версии сайта ничего не проверяет
 */
function detectSiteVersion()
{
    global $host;
    if (isset($_SERVER['SHELL'])) {
        return;
    }
    // Если скрипт запускается с консоли, не надо ничего определять и редиректить
    $_host = str_replace(HTTP_PREFIX, '', $host);
    // это можно убрать когда в конфиг добавят определение константы PDA_PREFIX
    if (!defined('PDA_PREFIX')) {
        define('PDA_PREFIX', 'p');
    }
    $_pdaHost = PDA_PREFIX . '.' . $_host;
    // если открывается PDA версия - то ничего не определяем и не редиректим
    if ($_SERVER['HTTP_HOST'] === $_pdaHost) {
        $parsed = parse_url($_SERVER['REQUEST_URI']);
        $path = $parsed['path'];
        $fullLink = HTTP_PREFIX . $_host . $path . '?pda=0';
        // сохраняем ссылку на основную версию сайта
        $GLOBALS['fullLink'] = $fullLink;
        return;
    }
    // ссылка на мобильную версию сайта
    $parsed = parse_url($_SERVER['REQUEST_URI']);
    $path = $parsed['path'];
    $pdaLink = HTTP_PREFIX . $_pdaHost . (isMobileVersionExists() ? $path : '');
    $GLOBALS['pdaLink'] = $pdaLink;
    // если полная версия сайта задается принудительно
    if ($_GET['pda'] !== null && ($_GET['pda'] === '0' || $_GET['pda'] === '1')) {
        $_SESSION['pda'] = $_GET['pda'];
    } elseif ($_SESSION['pda'] !== null && ($_SESSION['pda'] === '0' || $_SESSION['pda'] === '1')) {
        // тут ничего не делаем, но эта проверка нужна
    } elseif ($_COOKIE['pda'] !== null && ($_COOKIE['pda'] === '0' || $_COOKIE['pda'] === '1')) {
        // если версия задана в куках
        $_SESSION['pda'] = $_COOKIE['pda'];
    } else {
        require_once ABS_PATH . "/classes/Mobile_Detect.php";
        $mobileDetect = new Mobile_Detect();
        $_SESSION['pda'] = (string) (int) $mobileDetect->isMobile();
    }
    // запоминаем на год
    if ($_COOKIE['pda'] !== $_SESSION['pda']) {
        setcookie('pda', $_SESSION['pda'], time() + 3600 * 24 * 30 * 365, '/');
    }
    // если нужна мобильная версия - редиректим
    /*if ($_SESSION['pda'] === '1' && !is_release()) { //#0024887 - ?отключил для боевой, пока мобильной версии там нет
          header_location_exit($pdaLink, null, false);
      }*/
    // избавляемся от ?pda=...
    if ($_GET['pda'] !== null) {
        header_location_exit(HTTP_PREFIX . $_host . $path, null, false);
    }
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:58,代码来源:stdf.php

示例15: CFile

         }
     }
     break;
 case "foto_change":
     $foto = new CFile($_FILES['foto']);
     $del = trim($_POST['del']);
     $frl = new employer();
     if ($foto->name || $del == 1) {
         $error .= $frl->UpdateFoto(get_uid(), $foto, $del);
         /*if (!$error) $info_msg = "Изменения внесены";
         		else $error = "Файл не удовлетворяет условиям загрузки";*/
         if (!$error) {
             $_SESSION['photo'] = $frl->photo;
         }
         $nParam = !$error ? 1 : 2;
         header_location_exit('/users/' . $_SESSION['login'] . '/setup/foto/?msg=' . $nParam);
     }
     break;
     //Удаление аккаунта убрано! не раскоменчивать!
     /*case "delete":
     		$passwd = trim($_POST['passwd']);
     		if ($passwd){
     			$frl = new employer;
     			if ($frl->DeleteUser(get_uid(), $passwd, $error)){
     				logout();
     				$content = $rpath."deleted_inner.php";
     			} else $error = "Поле заполнено некорректно";
     		} else $error = "Поле заполнено некорректно";
     		break;*/
 //Удаление аккаунта убрано! не раскоменчивать!
 /*case "delete":
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php


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