本文整理汇总了PHP中Misc::Redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP Misc::Redirect方法的具体用法?PHP Misc::Redirect怎么用?PHP Misc::Redirect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Misc
的用法示例。
在下文中一共展示了Misc::Redirect方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: User
<?php
require 'include/config.php';
require 'include/class.user.php';
$user = new User($db);
if (isset($_POST['submitedit'])) {
$user->Edit($_POST);
Misc::Redirect('user_list.php');
}
if (isset($_POST['submitdelete'])) {
$user->Delete($_POST['id']);
Misc::Redirect('user_list.php');
}
$u = $user->getUser($_GET['id']);
include 'include/top.php';
?>
<form method="post">
<input type="hidden" name="id" value="<?php
echo $_GET['id'];
?>
" />
<p>
<label><span>Name</span></label>
<input type="text" name="name" id="name" placeholder="Enter user's name" value="<?php
echo $u['name'];
?>
" />
</p>
<p>
<label><span>E-mail</span></label>
示例2: Settings
<?php
if (isset($_POST['submit'])) {
require 'include/config.php';
require 'include/class.settings.php';
$n = new Settings($db);
$n->Insert($_POST);
Misc::Redirect('settings_list.php');
}
include 'include/top.php';
?>
<form method="post">
<p>
<label><span>Option name</span></label>
<input type="text" name="name" id="name" placeholder="Option name" />
</p>
<p>
<label><span>Option value</span></label>
<input type="text" name="value" id="value" placeholder="Option value" />
</p>
<p>
<label><span>Option description</span></label>
<input type="text" name="description" id="description" placeholder="Option description" />
</p>
<p>
<input type="submit" name="submit" value=" Add " />
</p>
</form>
<?php
include 'include/bottom.php';
示例3: Network
<?php
if (isset($_POST['submit'])) {
require 'include/config.php';
require 'include/class.network.php';
$n = new Network($db);
$n->Insert($_POST);
Misc::Redirect('network_list.php');
}
include 'include/top.php';
?>
<form method="post">
<p>
<label><span>Name</span></label>
<input type="text" name="name" id="name" placeholder="Enter network name" />
</p>
<p>
<label><span>Syntax</span></label>
<input type="text" name="syntax" id="syntax" placeholder="Enter network syntax" />
</p>
<p>
<input type="submit" name="submit" value=" Add " />
</p>
</form>
<?php
include 'include/bottom.php';
示例4: Source
require 'include/class.source.php';
$n = new Source($db);
if (isset($_POST['submitedit'])) {
$n->Edit($_POST);
if ($_POST['type'] != 'bad') {
Misc::Redirect('sources_list.php');
} else {
Misc::Redirect('badsources_list.php');
}
}
if (isset($_POST['submitdelete'])) {
$n->Delete($_POST['source_id']);
if ($_POST['type'] != 'bad') {
Misc::Redirect('sources_list.php');
} else {
Misc::Redirect('badsources_list.php');
}
}
$s = $n->getSource($_GET['id']);
include 'include/top.php';
?>
<form method="post">
<input type="hidden" id="hidden" name="source_id" value="<?php
echo $s['source_id'];
?>
" />
<p>
<label><span>Source ID </span>#<?php
echo $s['source_id'];
?>
示例5: Mailing
<?php
if (isset($_POST['submit'])) {
require 'include/config.php';
require 'include/class.mailing.php';
$n = new Mailing($db);
$n->Insert($_POST);
Misc::Redirect('mailing_list.php');
}
include 'include/top.php';
?>
<form method="post">
<p>
<label><span>Title</span></label>
<input type="text" name="title" id="title" placeholder="Enter mailing list title" />
</p>
<!-- <p>
<label><span>List ID</span></label>
<input type="text" name="list_id" id="list_id" placeholder="Enter mailing list id" />
</p>
<p>
<label><span>URL</span></label>
<input type="text" name="url" id="url" placeholder="Enter list url" />
</p>-->
<!--
<p>
<label><span>Autoresponder</span></label>
<select name="type">
<option value="getresponse">GetResponse</option>
<option value="infusionsoft">InfusionSoft</option>
示例6: Tracking
if (isset($_POST['submit'])) {
require 'include/config.php';
$r = Misc::csvParse($_FILES['file']['tmp_name']);
if (count($r) > 0) {
require 'include/class.tracking.php';
$t = new Tracking($db);
foreach ($r as $s) {
if (isset($_POST['custom_revenue']) && $_POST['custom_revenue'] == '1') {
$s['custom_rev'] = str_replace('$', '', $s['custom_rev']);
$t->convertSession($s['transaction_id'], $s['custom_rev'], $_POST['overwrite']);
} else {
$t->convertSession($s['transaction_id'], -1, $_POST['overwrite']);
}
}
}
Misc::Redirect('sessions_list.php');
}
include 'include/top.php';
?>
<form method="post" enctype="multipart/form-data">
<p>
<label for="file">Select file</label>
<input type="file" name="file" id="file" />
</p>
<p>
<input type="hidden" name="overwrite" value="0" />
<input type="checkbox" name="overwrite" value="1" /> Overwrite existing Session Ids</br />
<input type="checkbox" name="custom_revenue" value="1" /> Include custom conversion revenue (from file)
</p>
<p>
示例7: Product
require 'include/class.mailing.php';
$p = new Product($db);
if (isset($_POST['submitedit'])) {
$as = array();
foreach ($_POST['auto_subscribe_lists'] as $network => $list) {
if ($list > 0) {
$as[] = $list;
}
}
$_POST['auto_subscribe_lists'] = join(",", $as);
$p->Edit($_POST);
Misc::Redirect('product_list.php');
}
if (isset($_POST['submitdelete'])) {
$p->Delete($_POST['id']);
Misc::Redirect('product_list.php');
}
$pr = $p->getProduct($_GET['id']);
$pr['auto_subscribe_lists'] = explode(',', $pr['auto_subscribe_lists']);
include 'include/top.php';
?>
<form method="post">
<input type="hidden" id="hidden" name="id" value="<?php
echo $pr['id'];
?>
" />
<p>
<label><span>Title</span></label>
<input type="text" name="title" id="title" placeholder="Enter product title" value="<?php
echo $pr['title'];