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


PHP template::redirect方法代码示例

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


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

示例1: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$message = "\r\nName: " . security::encode($_POST['name']) . "\r\nEmail: " . security::encode($_POST['email']) . "\r\nSubjet: " . security::encode($_POST['subject']) . "\r\n\r\nMessage: " . security::encode($_POST['message']) . "\r\n";
mail("contact@anotherservice.com", "[AS] " . security::encode($_POST['subject']), $message, "From: " . security::encode($_POST['email']));
$message = "{$lang['success']}\r\n\r\n<!-- Google Code for Envoi d&#39;un email Conversion Page -->\r\n<script type=\"text/javascript\">\r\n/* <![CDATA[ */\r\nvar google_conversion_id = 998104197;\r\nvar google_conversion_language = \"en\";\r\nvar google_conversion_format = \"3\";\r\nvar google_conversion_color = \"ffffff\";\r\nvar google_conversion_label = \"Bvm0CJv26AMQhbn32wM\";\r\nvar google_conversion_value = 0;\r\n/* ]]> */\r\n</script>\r\n<script type=\"text/javascript\" src=\"https://www.googleadservices.com/pagead/conversion.js\">\r\n</script>\r\n<noscript>\r\n<div style=\"display:inline;\">\r\n<img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\" src=\"https://www.googleadservices.com/pagead/conversion/998104197/?value=0&amp;label=Bvm0CJv26AMQhbn32wM&amp;guid=ON&amp;script=0\"/>\r\n</div>\r\n</noscript>";
$_SESSION['MESSAGE']['TYPE'] = 'success';
$_SESSION['MESSAGE']['TEXT'] = $message;
template::redirect('/about/contact');
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www-1,代码行数:14,代码来源:contact_action.php

示例2: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('news/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/blog');
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:del_action.php

示例3: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/account/update', array('id' => $_GET['id'], 'domain' => $_GET['domain'], 'mode' => 'delete', 'key' => $_GET['key']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    $template->redirect('/panel/users/config?id=' . security::encode($_GET['id']) . '&domain=' . security::encode($_GET['domain']));
}
开发者ID:iseth,项目名称:php-www-1,代码行数:12,代码来源:del_key_action.php

示例4: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
switch ($_POST['type']) {
    case 'admin':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_SELECT,SELF_UPDATE,SELF_DELETE,SELF_GRANT_SELECT,SELF_GROUP_SELECT,SELF_GROUP_DELETE,SELF_TOKEN_INSERT,SELF_TOKEN_SELECT,SELF_TOKEN_UPDATE,SELF_TOKEN_DELETE,SELF_QUOTA_SELECT,SELF_TOKEN_GRANT_DELETE,SELF_TOKEN_GRANT_INSERT,SELF_DOMAIN_INSERT,SELF_DOMAIN_SELECT,SELF_DOMAIN_DELETE,SELF_DOMAIN_UPDATE,SELF_SUBDOMAIN_SELECT,SELF_SUBDOMAIN_UPDATE,SELF_SUBDOMAIN_INSERT,SELF_SUBDOMAIN_DELETE,SELF_ACCOUNT_DELETE,SELF_ACCOUNT_INSERT,SELF_ACCOUNT_SELECT,SELF_ACCOUNT_UPDATE,SELF_SERVICE_DELETE,SELF_SERVICE_INSERT,SELF_SERVICE_SELECT,SELF_SERVICE_UPDATE,SELF_APP_INSERT,SELF_APP_DELETE,SELF_APP_UPDATE,SELF_APP_SELECT,SELF_BILL_SELECT,SELF_BILL_INSERT,SELF_STORAGE_SELECT,SELF_STORAGE_UPDATE,SELF_STORAGE_DELETE,SELF_STORAGE_INSERT,SELF_LOG_SELECT,SELF_LOG_INSERT,SELF_LOG_UPDATE,SELF_LOG_DELETE,SELF_BACKUP_SELECT,SELF_BACKUP_UPDATE,SELF_BACKUP_INSERT,SELF_BACKUP_DELETE'));
        break;
    case 'apps':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_APP_INSERT,SELF_APP_SELECT,SELF_APP_UPDATE,SELF_APP_DELETE'));
        break;
    case 'services':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_SERVICE_INSERT,SELF_SERVICE_SELECT,SELF_SERVICE_UPDATE,SELF_SERVICE_DELETE'));
        break;
    case 'domains':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never', 'grants' => 'ACCESS,SELF_DOMAIN_INSERT,SELF_DOMAIN_DELETE,SELF_DOMAIN_UPDATE,SELF_DOMAIN_SELECT,SELF_ACCOUNT_INSERT,SELF_ACCOUNT_DELETE,SELF_ACCOUNT_SELECT,SELF_ACCOUNT_UPDATE'));
        break;
    case 'blank':
        api::send('self/token/add', array('name' => $_POST['name'], 'lease' => 'never'));
        break;
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/settings/tokens');
}
开发者ID:iseth,项目名称:php-www-1,代码行数:28,代码来源:add_action.php

示例5: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$security->logout();
template::redirect('/');
开发者ID:iseth,项目名称:php-www,代码行数:8,代码来源:logout.php

示例6: array

            $content .= "\r\n\t\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t";
            $template->output($content);
        } else {
            if (count($user) == 1) {
                $template->redirect('/admin/user/detail?id=' . $user[0]['id']);
            } else {
                template::redirect('/admin');
            }
        }
    } else {
        if ($_POST['site'] != $lang['site']) {
            try {
                $site = api::send('site/select', array('site' => $_POST['site']));
            } catch (Exception $e) {
                template::redirect('/admin?error=site');
            }
            $template->redirect('/admin/users/detail?id=' . $site[0]['user']['id']);
        } else {
            if ($_POST['domain'] != $lang['domain']) {
                try {
                    $domain = api::send('domain/select', array('domain' => $_POST['domain']));
                } catch (Exception $e) {
                    template::redirect('/admin?error=domain');
                }
                $template->redirect('/admin/users/detail?id=' . $domain[0]['user']['id']);
            } else {
                template::redirect('/admin');
            }
        }
    }
}
开发者ID:iseth,项目名称:php-www,代码行数:31,代码来源:search_action.php

示例7: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('group/add', array('name' => $_POST['name']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/groups');
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:add_action.php

示例8: catch

if (isset($_POST['pass']) && strlen($_POST['pass']) > 0) {
    $params['pass'] = $_POST['pass'];
}
if (isset($_POST['report']) && strlen($_POST['report']) > 0) {
    $params['report'] = $_POST['report'];
}
if (isset($_POST['postal_address']) && strlen($_POST['postal_address']) > 0) {
    $params['postal_address'] = $_POST['postal_address'];
}
if (isset($_POST['organisation']) && strlen($_POST['organisation']) > 0) {
    $params['organisation'] = $_POST['organisation'];
}
if (isset($_POST['postal_code']) && strlen($_POST['postal_code']) > 0) {
    $params['postal_code'] = $_POST['postal_code'];
}
if (isset($_POST['locality']) && strlen($_POST['locality']) > 0) {
    $params['locality'] = $_POST['locality'];
}
try {
    api::send('self/user/update', $params);
    $_SESSION['MESSAGE']['TYPE'] = 'success';
    $_SESSION['MESSAGE']['TEXT'] = $lang['success'];
} catch (Exception $e) {
    $_SESSION['MESSAGE']['TYPE'] = 'error';
    $_SESSION['MESSAGE']['TEXT'] = $lang['error'];
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/settings');
}
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:update_action.php

示例9: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
try {
    $message = api::send('message/list', array('id' => $_GET['id']));
    $message = $message[0];
    $messages = api::send('message/list', array('parent' => $_GET['id']));
} catch (Exception $e) {
    template::redirect('/admin/messages');
}
if (!$message['id'] || !$_GET['id']) {
    template::redirect('/admin/messages');
}
$content .= "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<div class=\"left\" style=\"width: 600px;\">\n\t\t\t\t<h3>{$message['title']}</h3>\n\t\t\t</div>\n\t\t\t<div class=\"right\" style=\"width: 400px; float: right; text-align: right;\">\n\t\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#reply').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['reply']}</span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t</div>\n\t\t<div class=\"container\">\n\t\t\t<div class=\"topic\">\n";
foreach ($messages as $m) {
    $content .= "\n\t\t\t\t<div class=\"message\">\n\t\t\t\t\t<div class=\"toppart\">\n\t\t\t\t\t\t<div class=\"messageid\">\n\t\t\t\t\t\t\t#{$m['id']}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"date\">\n\t\t\t\t\t\t\t" . date($lang['dateformat'], $m['date']) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"showEdit('{$m['id']}'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/pencil.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#id').val('{$m['id']}'); \$('#delete').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t\t<a href=\"/admin/users/detail?id={$m['user']['id']}\"><img style=\"width: 80px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$m['user']['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$m['user']['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{$m['user']['name']}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t<form action=\"/admin/messages/update_action\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$m['id']}\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<p id=\"text{$m['id']}\">" . bbcode::display($m['content']) . "</p>\n\t\t\t\t\t\t\t<textarea id=\"edit{$m['id']}\" style=\"display: none; width: 700px; height: 200px;\" name=\"content\">" . bbcode::edit($m['content']) . "</textarea>\n\t\t\t\t\t\t\t<input id=\"submit{$m['id']}\" style=\"display: none;\" type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t";
}
$content .= "\n\t\t\t\t<div class=\"message\">\n\t\t\t\t\t<div class=\"toppart\">\n\t\t\t\t\t\t<div class=\"messageid\">\n\t\t\t\t\t\t\t#{$message['id']}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"date\">\n\t\t\t\t\t\t\t" . date($lang['dateformat'], $message['date']) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"showEdit('{$message['id']}'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/pencil.png\" alt=\"\" /></a>\n\t\t\t\t\t\t\t<a href=\"#\" onclick=\"\$('#id').val('{$message['id']}'); \$('#delete').dialog('open'); return false;\"><img class=\"link\" src=\"/{$GLOBALS['CONFIG']['SITE']}/images/icons/small/close.png\" alt=\"\" /></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"meta\">\n\t\t\t\t\t\t<a href=\"/admin/users/detail?id={$message['user']['id']}\"><img style=\"width: 80px; display: block;\" src=\"" . (file_exists("{$GLOBALS['CONFIG']['SITE']}/images/users/{$message['user']['id']}.png") ? "/{$GLOBALS['CONFIG']['SITE']}/images/users/{$message['user']['id']}.png" : "/{$GLOBALS['CONFIG']['SITE']}/images/users/user.png") . "\" /></a>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{$message['user']['name']}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t<form action=\"/admin/messages/update_action\" method=\"post\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t\t\t\t<p id=\"text{$message['id']}\">" . bbcode::display($message['content']) . "</p>\n\t\t\t\t\t\t\t<textarea id=\"edit{$message['id']}\" style=\"display: none; width: 700px; height: 200px;\" name=\"content\">" . bbcode::edit($message['content']) . "</textarea>\n\t\t\t\t\t\t\t<input id=\"submit{$message['id']}\" style=\"display: none;\" type=\"submit\" value=\"{$lang['update']}\" />\n\t\t\t\t\t\t</form>\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br />\n\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#reply').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['reply']}</span>\n\t\t\t</a>\n";
if ($message['status'] != 3) {
    $content .= "\n\t\t\t<a class=\"button classic\" href=\"#\" onclick=\"\$('#close').dialog('open'); return false;\" style=\"width: 180px; height: 22px; float: right; margin-right: 20px;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['close']}</span>\n\t\t\t</a>\n\t";
} else {
    $content .= "\n\t\t\t<a class=\"button classic\" href=\"/admin/messages/open_action?id={$message['id']}\" style=\"width: 180px; height: 22px; float: right; margin-right: 20px;\">\n\t\t\t\t<span style=\"display: block; padding-top: 3px;\">{$lang['open']}</span>\n\t\t\t</a>\n\t";
}
$content .= "\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t</div>\n\t<div id=\"reply\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['reply']}</h3>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/add_action\" method=\"post\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"parent\" value=\"{$message['id']}\" />\n\t\t\t\t<input type=\"hidden\" name=\"type\" value=\"{$message['type']}\" />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<textarea class=\"auto\" style=\"text-align: left; width: 400px; height: 150px;\" name=\"content\" onfocus=\"this.value = this.value=='{$lang['content']}' ? '' : this.value; this.style.color='#4c4c4c';\" onfocusout=\"this.value = this.value == '' ? this.value = '{$lang['content']}' : this.value; this.value=='{$lang['content']}' ? this.style.color='#cccccc' : this.style.color='#4c4c4c'\">{$lang['content']}</textarea>\n\t\t\t\t\t<span class=\"help-block\">{$lang['content_help']}</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['send']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"delete\" class=\"floatingdialog\">\n\t\t<h3 class=\"center\">{$lang['delete']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['delete_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/del_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$message['id']}\" name=\"parent\" />\n\t\t\t\t<input id=\"id\" type=\"hidden\" value=\"\" name=\"id\" />\n\t\t\t\t<fieldset>\t\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['delete_now']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<div id=\"close\" class=\"floatingdialog\">\n\t\t<br />\n\t\t<h3 class=\"center\">{$lang['close']}</h3>\n\t\t<p style=\"text-align: center;\">{$lang['close_text']}</p>\n\t\t<div class=\"form-small\">\t\t\n\t\t\t<form action=\"/admin/messages/close_action\" method=\"get\" class=\"center\">\n\t\t\t\t<input type=\"hidden\" value=\"{$message['id']}\" name=\"id\" />\n\t\t\t\t<fieldset>\t\n\t\t\t\t\t<input autofocus type=\"submit\" value=\"{$lang['close_now']}\" />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<script>\n\t\tnewFlexibleDialog('reply', 550);\n\t\tnewFlexibleDialog('delete', 550);\n\t\tnewFlexibleDialog('close', 550);\n\t\tvar status = 0;\n\t\tfunction showEdit(id)\n\t\t{\n\t\t\tvar options = {};\n\t\t\tif( status == 0 )\n\t\t\t{\n\t\t\t\t\$(\"#text\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#submit\"  + id).show(\"fade\", options, 200);\n\t\t\t\t\$(\"#edit\"  + id).show(\"fade\", options, 200);\n\t\t\t\tstatus = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\$(\"#submit\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#edit\" + id).css(\"display\", \"none\");\n\t\t\t\t\$(\"#text\"  + id).show(\"fade\", options, 200);\n\t\t\t\tstatus = 0;\n\t\t\t}\n\t\t}\n\t</script>\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www,代码行数:29,代码来源:detail.php

示例10: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('grant/group/revoke', array('group' => $_GET['group'], 'grant' => $_GET['grant']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/group/detail?id=' . $_GET['group']);
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:revoke_action.php

示例11: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
$domain = api::send('self/domain/list', array('domain' => $_GET['source']));
$domain = $domain[0];
api::send('self/alias/del', array('id' => $_GET['id']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/domains/config?id=' . $domain['id']);
}
开发者ID:iseth,项目名称:php-www-1,代码行数:14,代码来源:del_alias_action.php

示例12: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('group/update', array('id' => $_POST['id'], 'name' => $_POST['name']));
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/groups/detail?id=' . $_POST['id']);
}
开发者ID:iseth,项目名称:php-www,代码行数:12,代码来源:update_action.php

示例13: foreach

        $apps = 12;
        $success = true;
        break;
    default:
        $success = false;
}
$quotas = api::send('self/quota/list');
foreach ($quotas as $q) {
    if ($q['name'] == 'DISK') {
        $dquota = $q;
    }
    if ($q['name'] == 'MEMORY') {
        $mquota = $q;
    }
    if ($q['name'] == 'SERVICES') {
        $squota = $q;
    }
    if ($q['name'] == 'APPS') {
        $aquota = $q;
    }
}
if ($disk && $dquota['used'] > $disk && ($dquota['max'] <= $disk || $diskplan === true) || $ram && $mquota['used'] > $ram || $ram && $squota['used'] > $services) {
    $_SESSION['MESSAGE']['TYPE'] = 'error';
    $_SESSION['MESSAGE']['TEXT'] = $lang['impossible'];
    template::redirect($_SERVER['HTTP_REFERER']);
}
$pay = array('lang' => translator::getLanguage(), 'first' => 1, 'ip' => $_SERVER['REMOTE_ADDR'], 'email' => $userinfo['email'], 'user' => $userinfo['name'], 'plan' => security::encode($_GET['plan']));
$xpay = base64_encode(serialize($pay));
$content = "\n\t<div class=\"panel\">\n\t\t<div class=\"top\">\n\t\t\t<h1 class=\"dark\" style=\"text-align: center;\">{$lang['title']}</h1>\n\t\t</div>\n\t\t<div class=\"clear\"></div><br /><br />\n\t\t<div class=\"container\" style=\"text-align: center;\">\n\t\t\t<br />\n\t\t\t<p style=\"font-size: 18px;\">{$lang['payment_text']}</p>\n\t\t\t<br />\n\t\t\t<br />\n\t\t\t<div style=\"text-align: center;\">\n\t\t\t\t<div class=\"pay\" onclick=\"\$('#paypal').submit(); return false;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['paypal']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<form id=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\" id=\"paypal\" style=\"display: none;\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"contact@anotherservice.com\" />  \n\t\t\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"EUR\">  \n\t\t\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"" . $lang['offer_' . security::encode($_GET['plan']) . '_title'] . "\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"" . $lang['offer_' . security::encode($_GET['plan']) . '_price'] . "\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"https://www.anotherservice.com/panel/plans/landing\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cancel_return\" value=\"https://www.anotherservice.com/panel/plans/landing\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"notify_url\" value=\"https://www.anotherservice.com/ipn_paypal\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"custom\" value=\"{$xpay}\" />\n\t\t\t\t\t\t<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif\" width=\"1\" height=\"1\" />\n\t\t\t\t\t</form>\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/paypal.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"pay\" onclick=\"\$('#sips').submit(); return false;\">\n\t\t\t\t\t<h3 class=\"colored\">{$lang['card']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/card.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"pay\">\n\t\t\t\t\t<h3 class=\"colored\" style=\"color: #6a6a6a\">{$lang['transfer']}</h3>\n\t\t\t\t\t<br />\n\t\t\t\t\t<img src=\"/{$GLOBALS['CONFIG']['SITE']}/images/illu/transfer_disabled.png\" style=\"width: 150px;\" alt=\"\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div><br /><br />\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<form action=\"/panel/plans/card\" method=\"post\" id=\"sips\" style=\"display: none;\">\n\t\t<input type=\"hidden\" name=\"xpay\" value=\"{$xpay}\" />\n\t\t<input type=\"hidden\" name=\"amount\" value=\"" . str_replace('.', '', sprintf("%.2f", round($lang['offer_' . security::encode($_GET['plan']) . '_price'], 2))) . "\" />\n\t\t<input type=\"hidden\" name=\"desc\" value=\"" . str_replace(' ', '&nbsp;', $lang['offer_' . security::encode($_GET['plan']) . '_title']) . "\" />\n\t</form>\t\n";
/* ========================== OUTPUT PAGE ========================== */
$template->output($content);
开发者ID:iseth,项目名称:php-www-1,代码行数:31,代码来源:pay.php

示例14: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
api::send('self/backup/restore', array('id' => $_GET['id'], 'branch' => $_GET['branch']));
$_SESSION['MESSAGE']['TYPE'] = 'success';
$_SESSION['MESSAGE']['TEXT'] = $lang['success'];
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/panel/backups');
}
开发者ID:iseth,项目名称:php-www-1,代码行数:14,代码来源:restore_action.php

示例15: header

<?php

if (!defined('PROPER_START')) {
    header("HTTP/1.0 403 Forbidden");
    exit;
}
// 1) rekvoke all grants that are not selected
$token = api::send('grant/token/list', array('user' => $_POST['user'], 'token' => $_POST['token']));
if (!isset($_POST['grant']) || !is_array($_POST['grant'])) {
    $_POST['grant'] = array();
}
if (count($token) > 0) {
    $grants = array();
    foreach ($token as $t) {
        if (!in_array($t['id'], $_POST['grant'])) {
            $grants[] = $t['id'];
        }
    }
    if (count($grants) > 0) {
        api::send('grant/token/del', array('user' => $_POST['user'], 'token' => $_POST['token'], 'grants' => implode(',', $grants)));
    }
}
// 2) grant selected grants (existing ones will be ignored)
if (count($_POST['grant']) > 0) {
    api::send('grant/token/add', array('user' => $_POST['user'], 'token' => $_POST['token'], 'grants' => implode(',', $_POST['grant'])));
}
if (isset($_GET['redirect'])) {
    template::redirect($_GET['redirect']);
} else {
    template::redirect('/admin/tokens/detail?token=' . $_POST['token'] . '&user=' . $_POST['user']);
}
开发者ID:iseth,项目名称:php-www,代码行数:31,代码来源:grant_action.php


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