本文整理汇总了PHP中App::redirectTo方法的典型用法代码示例。如果您正苦于以下问题:PHP App::redirectTo方法的具体用法?PHP App::redirectTo怎么用?PHP App::redirectTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App
的用法示例。
在下文中一共展示了App::redirectTo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logOut
public function logOut()
{
// Delete the session cookie.
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 1800, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
}
// Destroy session
session_unset();
session_destroy();
// Redirect to the home page
App::redirectTo("?");
}
示例2:
<p>
<span>"<b>Kitambulisho</b> Yetu!" is simply "<b>Kenya</b> Yetu!"</span><br/>
<span><b>Kitambulisho Yetu!</b> is a means to help people get their lost & found documents<br/>
like ID cards, Driver’s Licenses and the likes. An example is the IDs left in hotels, <br/>
bus stations, police stations, hospitals, clubs, offices, building entrances, etc.</span><br/>
</p>
<form method="POST">
<!--<input type="hidden" name="action" value="checkUsername"/>-->
<input type="hidden" name="action" value="confirmUsername"/>
<?php
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
//$url = $_SESSION['current_page'];
App::redirectTo('?signup');
}
}
?>
<div class="field">
<label for="username">Choose a <b>fantastic</b> username!</label>
<span id="user-result"></span>
<input type="text" name="username" id="username" maxlength="80" placeholder="Eg. JackSparrow" required/>
</div>
<ul class="actions">
<li><input type="submit" value="Submit" /></li>
</ul>
</form>
</div>
</section>
示例3: Form_Process
App::redirectTo("?login");
} else {
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
$id = $_GET['id'];
$details = $sub->fetchReportedDocumentDetails($id);
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
$_SESSION['update_success'] = "Successfully updated details";
} else {
if (is_bool($success) && $success == false) {
$_SESSION['update_error'] = "Failed updating details";
}
}
App::redirectTo("?my_reports");
}
}
?>
<section id="banner"></section>
<section id="footer">
<div class="inner">
<h2 class="major">Edit Document Details</h2>
<form method="POST">
<input type="hidden" name="action" value="edit_reported_document"/>
<input type="hidden" name="id" value="<?php
echo $details['id'];
?>
">
<p />
示例4: Form_Process
<?php
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
if (!isset($_SESSION['user'])) {
App::redirectTo("?login");
} else {
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
App::redirectTo("?addSuccess");
}
}
}
?>
<section id="banner"></section>
<section id="footer">
<div class="inner">
<h2 class="major">Add important document</h2>
<p>To make it convenient add the documents you wish to find easily when lost here.</p>
<form method="POST">
<input type="hidden" name="action" value="addDoc"/>
<div class="field">
<label for="item_type">Document Type</label>
<input type="text" name="item_type" id="item_type" value="<?php
if (isset($_SESSION['item_type'])) {
echo $_SESSION['item_type'];
} else {
echo 'Session Unset';
}
示例5:
<?php
if (!isset($_SESSION['user'])) {
App::redirectTo("?login");
}
?>
<!-- Banner -->
<section id="banner">
<div class="inner">
<div class="logo"> <img src="images/Kitambulisho.png" width="300"></div>
<h2 class="major">THANK YOU!</h2>
<p>You have just added a document to your <a href="?docs">Doc Log!</a></p>
</div>
</section>
示例6:
<!DOCTYPE html>
<?php
require 'boot.php';
$app = Config::get('aplikasi');
?>
<?php
if (isset($_SESSION[$app->name]) || $_SESSION[$app->name]['auth'] != "") {
App::redirectTo('index');
}
?>
<html>
<head>
<meta charset="UTF-8">
<title><?php
echo $app->name . " " . $app->client;
?>
</title>
<link rel="stylesheet" type="text/css" href="static/css/easyui.css">
<script type="text/javascript" src="static/js/jquery.min.js"></script>
<script type="text/javascript" src="static/js/jquery.easyui.min.js"></script>
<script type="text/javascript">
var BASE_URL = "<?php
echo BASE_URL;
?>
";
</script>
</head>
<body class="loginBody">
<div id="x-dialog"></div>
示例7: Form_Process
<?php
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
App::redirectTo("?nothing");
}
}
?>
<section id="footer">
<div class="inner">
<h2 class="major">Subscribe</h2>
<p>The best way to get back your ID is to help them find you!</p>
<form method="POST">
<input type="hidden" name="action" value="subscriber"/>
<div class="field">
<label for="name">Name</label>
<input type="text" name="name" id="name" />
</div>
<div class="field">
<label for="email">Email</label>
<input type="email" name="email" id="email" />
</div>
<div class="field">
<label for="tel">Tel.</label>
<input type="tel" name="tel" id="tel"/>
</div>
<ul class="actions">
示例8:
<div class="inner">
<h2 class="major">ADMIN LOGIN</h2>
<form method="POST">
<input type="hidden" name="action" value="loginer"/>
<div class="field">
<label for="username">Username</label>
<input type="text" name="username" id="username" maxlength="60" required/>
</div>
<div class="field">
<label for="password">Password</label>
<input type="password" name="password" id="password" required/>
<?php
if (!empty($_POST)) {
$success = $admin->execute();
if (is_bool($success) && $success == true) {
App::redirectTo('?ad_profile');
}
}
?>
</div>
<ul class="actions">
<li><input type="submit" value="Submit" /></li>
</ul>
</form>
</div>
</section>
示例9: updateClaim
private function updateClaim()
{
$id = $_POST['id'];
$claim = '1';
$person = $_POST['person'];
$c_time = date("Y-m-d H:i:s");
$sql = "UPDATE reports SET claim=:claim, c_time=:c_time, claimer=:person WHERE id=:id";
$stmt = $this->prepareQuery($sql);
$stmt->bindValue("id", $id);
$stmt->bindValue("claim", $claim);
$stmt->bindValue("c_time", $c_time);
$stmt->bindValue("person", $person);
if ($stmt->execute()) {
App::redirectTo("?claimSuccess");
return $this->claimSucces($id);
} else {
return false;
}
}
示例10: Form_Process
<?php
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
//if (!isset($_SESSION['username'])) {
// App::redirectTo("?signing");
//} else {
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
App::redirectTo("?welcome");
}
}
//}
?>
<section id="footer">
<div class="inner">
<h2 class="major"><?php
if (isset($_GET["user"])) {
echo $_GET["user"];
}
?>
, CONFIRM ACCOUNT</h2>
<p>Please click button to confirm account.</p>
<form method="POST">
<input type="hidden" name="action" value="confirm_subscriber"/>
<input type="hidden" name="user" value="<?php
if (isset($_GET["user"])) {
echo $_GET["user"];
}
示例11: Form_Process
<?php
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
App::redirectTo("?reporting");
}
}
?>
<section id="banner">
</section>
<section id="footer">
<div class="inner">
<h2 class="major">Report Lost & Found</h2>
<p>Ensure you indicate clearly where you have dropped the lost & found document. E.g. Central Police Station reception</p>
<form method="POST">
<input type="hidden" name="action" value="report"/>
<div class="field">
<label for="category">Document Type You have Picked</label>
<select name="category">
<?php
echo $sub->getDocTypes();
?>
</select>
</div>
<ul class="actions">
<li><input type="submit" value="Start" /></li>
</ul>
示例12:
<!DOCTYPE html>
<?php
require 'boot.php';
$aplikasi = Config::get('aplikasi');
if (!isset($_SESSION[$aplikasi->name]) || $_SESSION[$aplikasi->name]['auth'] == "") {
App::redirectTo('login');
}
require 'session.php';
?>
<html>
<head>
<meta charset="UTF-8">
<title><?php
echo $aplikasi->name . " " . $aplikasi->client;
?>
</title>
<link rel="stylesheet" type="text/css" href="static/css/easyui.css">
<script type="text/javascript" src="static/js/jquery.min.js"></script>
<script type="text/javascript" src="static/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/js/accounting.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript">
var BASE_URL = "<?php
echo BASE_URL;
?>
";
</script>
<script type="text/javascript">
var selectedNode, mainReady = true;
var configApp = {};
示例13: Form_Process
<?php
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
$item_type = $_SESSION['item_type'];
if (isset($_SESSION['user'])) {
$username = $_SESSION['user'];
$details = $sub->fetchDetails($username);
}
if (!isset($_SESSION['item_type'])) {
App::redirectTo("?report");
} else {
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
App::redirectTo("?thanks");
}
}
}
?>
<section id="banner">
</section>
<section id="footer">
<div class="inner">
<h2 class="major">Report Lost & Found</h2>
<p>Ensure you indicate clearly where you have dropped the lost & found document. E.g. Central Police Station reception</p>
<form method="POST">
<input type="hidden" name="action" value="reporting"/>
<div class="field">
<label for="item_type"> Picked Document Type</label>
示例14:
<?php
if (!isset($_SESSION['item_type'])) {
App::redirectTo("?report");
} else {
//session_unset();
}
?>
<!-- Banner -->
<section id="banner">
<div class="inner">
<div class="logo"> <img src="images/Kitambulisho.png" width="300"></div>
<h2 class="major">THANK YOU!</h2>
<p>You have just simplified somebody's life. Documents <?php
if (isset($_SESSION['user'])) {
?>
<a href="?my_reports">Reported by You</a> <?php
} else {
?>
<a href="?signing">Sign Up</a> to be informed if you lost document is found, as soon as it is found.<?php
}
?>
</p>
</div>
</section>
示例15: Form_Process
App::redirectTo("?login");
} else {
require WPATH . "modules/process/form_processor.php";
$sub = new Form_Process();
$id = $_GET['id'];
$details = $sub->fetchMyDocumentDetails($id);
if (!empty($_POST)) {
$success = $sub->execute();
if (is_bool($success) && $success == true) {
$_SESSION['update_success'] = "Successfully updated details";
} else {
if (is_bool($success) && $success == false) {
$_SESSION['update_error'] = "Failed updating details";
}
}
App::redirectTo("?docs");
}
}
?>
<section id="banner"></section>
<section id="footer">
<div class="inner">
<h2 class="major">Edit document Details</h2>
<p>We made it convenient to change this document details.</p>
<form method="POST">
<input type="hidden" name="action" value="editDoc"/>
<input type="hidden" name="id" value="<?php
echo $details['id'];
?>