本文整理汇总了PHP中Core::redir方法的典型用法代码示例。如果您正苦于以下问题:PHP Core::redir方法的具体用法?PHP Core::redir怎么用?PHP Core::redir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core::redir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: homeAction
public function homeAction()
{
$meta = array("title" => ".: HOSPITAL :.");
Session::setFlashMsg("mensaje", "Hola wey");
Core::redir("./?r=index/index");
//View::render($this,"index",array("meta"=>$meta));
}
示例2: updateAction
public function updateAction()
{
$criteria = new Criteria("person");
$person = PersonData::getById($_POST["id"]);
$criteria->update(array("no" => "\"{$_POST['no']}\"", "name" => "\"{$_POST['name']}\"", "lastname" => "\"{$_POST['lastname']}\"", "job" => "\"{$_POST['job']}\"", "phone1" => "\"{$_POST['phone1']}\"", "phone2" => "\"{$_POST['phone2']}\"", "address1" => "\"{$_POST['address1']}\"", "address2" => "\"{$_POST['address2']}\"", "email1" => "\"{$_POST['email1']}\"", "email2" => "\"{$_POST['email2']}\"", "team_id" => "\"{$_POST['team_id']}\"", "category_id" => "\"{$_POST['category_id']}\""), "id=" . $_POST["id"]);
Core::redir("./?r=index/people");
}
示例3:
<?php
$client = PersonData::getById($_GET["id"]);
$client->del();
Core::redir("./index.php?view=providers");
示例4: BookData
<?php
if (!empty($_POST)) {
$r = new BookData();
$r->title = $_POST["title"];
$r->subtitle = $_POST["subtitle"];
$r->description = $_POST["description"];
$r->isbn = $_POST["isbn"];
$r->n_pag = $_POST["n_pag"];
$r->year = $_POST["year"];
$r->category_id = $_POST["category_id"] != "" ? $_POST["category_id"] : "NULL";
$r->editorial_id = $_POST["editorial_id"] != "" ? $_POST["editorial_id"] : "NULL";
$r->author_id = $_POST["author_id"] != "" ? $_POST["author_id"] : "NULL";
$r->add();
}
//Core::alert("Agregado exitosamente!");
Core::redir("./index.php?view=books");
示例5:
<?php
/**
* @author evilnapsis
* @brief Eliminar autores
**/
$category = AuthorData::getById($_GET["id"]);
$category->del();
Core::redir("./index.php?view=authors");
示例6: Upload
if (Session::exists("user_id") && !empty($_POST)) {
$image = null;
$image_id = 0;
$handle = new Upload($_FILES['image']);
if ($handle->uploaded) {
$url = "storage/users/{$_SESSION['user_id']}/images/";
$handle->Process($url);
// $handle->file_dst_name;
$image = new ImageData();
$image->src = $handle->file_dst_name;
$image->level_id = $_POST["level_id"];
$image->user_id = $_SESSION["user_id"];
$image_id = $image->add();
}
$post_id = 0;
if ($_POST["content"] != "") {
$post = new PostData();
$post->content = $_POST["content"];
$post->level_id = $_POST["level_id"];
$post->author_ref_id = $_SESSION["user_id"];
$post->receptor_ref_id = $_SESSION["user_id"];
$post_id = $post->add();
if ($handle->uploaded) {
$pi = new PostImageData();
$pi->post_id = $post_id[1];
$pi->image_id = $image_id[1];
$pi->add();
}
}
Core::redir("./?view=home");
}
示例7: foreach
<?php
$sell = SellData::getById($_GET["id"]);
$operations = OperationData::getAllProductsBySellId($_GET["id"]);
foreach ($operations as $op) {
$op->del();
}
$sell->del();
Core::redir("./index.php?view=res");
示例8: SlideData
<?php
// print_r($_POST);
$product = new SlideData();
foreach ($_POST as $k => $v) {
$product->{$k} = $v;
# code...
}
////////////////////////////////////// / / / / / / / / / / / / / / / / / / / / / / / / /
$handle = new Upload($_FILES['image']);
if ($handle->uploaded) {
$url = "storage/slides/";
$handle->Process($url);
$product->image = $handle->file_dst_name;
$product->update_image();
}
////////////////////////////////////// / / / / / / / / / / / / / / / / / / / / / / / / /
if (isset($_POST["is_public"])) {
$product->is_public = 1;
} else {
$product->is_public = 0;
}
// $product->name = $_POST["name"];
$product->update();
$_SESSION["product_updated"] = 1;
Core::redir("index.php?view=editslide&slide_id=" . $_POST["id"]);
示例9: unset
<?php
unset($_SESSION["cart"]);
Core::redir("index.php?view=mycart");
示例10:
<?php
if (!empty($_POST)) {
$profile = ProfileData::getByUserId($_SESSION["user_id"]);
$profile->day_of_birth = $_POST["day_of_birth"];
$profile->gender = $_POST["gender"];
$profile->country_id = $_POST["country_id"];
$profile->sentimental_id = $_POST["sentimental_id"];
$profile->update_basic();
Core::redir("./?view=editbasicinfo");
}
示例11: ReservationData
<?php
/**
* BookMedik
* @author evilnapsis
**/
$rx = ReservationData::getRepeated($_POST["pacient_id"], $_POST["medic_id"], $_POST["date_at"], $_POST["time_at"]);
if ($rx == null) {
$r = new ReservationData();
$r->title = $_POST["title"];
$r->note = $_POST["note"];
$r->pacient_id = $_POST["pacient_id"];
$r->medic_id = $_POST["medic_id"];
$r->date_at = $_POST["date_at"];
$r->time_at = $_POST["time_at"];
$r->user_id = $_SESSION["user_id"];
$r->status_id = $_POST["status_id"];
$r->payment_id = $_POST["payment_id"];
$r->price = $_POST["price"];
$r->sick = $_POST["sick"];
$r->symtoms = $_POST["symtoms"];
$r->medicaments = $_POST["medicaments"];
$r->add();
Core::alert("Agregado exitosamente!");
} else {
Core::alert("Error al agregar, Cita Repetida!");
}
Core::redir("./index.php?view=reservations");
示例12:
<?php
$client = PacientData::getById($_GET["id"]);
$client->del();
Core::redir("./index.php?view=pacients");
示例13: mail
</tr>
<tr>
<td class="style5" style="width: 204px; height: 10;" valign="top"><strong>
Direccion:</strong></td>
<td class="style5" style="width: 4px; height: 10;" valign="top"> </td>
<td class="style3" style="width: 550;" valign="top">' . $address . '</td>
</tr>
<tr>
<td class="style5" style="height: 1;" valign="top" colspan="3">
<hr class="style28" style="height: 1; width: 98%" /></td>
</tr>
<tr>
<td class="style5" style="width: 204px; height: 10;" valign="top"><strong>
Telefono:</strong></td>
<td class="style5" style="width: 4px; height: 10;" valign="top"> </td>
<td class="style3" style="width: 550;" valign="top">' . $phone . '</td>
</tr>
</table>
</body>
</html> ';
mail("{$replyemail}", "Katana - Nuevo registro", "{$themessage}", "From: {$replyemail}\nReply-To: {$replyemail}\nContent-Type: text/html; charset=ISO-8859-1");
mail("{$email}", "Katana - Nuevo Registro", "{$replymessage}", "From: {$replyemail}\nReply-To: {$replyemail}\nContent-Type: text/html; charset=ISO-8859-1");
echo $success_sent_msg;
Core::redir("index.php?view=clientaccess");
} else {
Core::alert("Ya existe un usuario registrado con esta direccion email.");
Core::redir("./?view=register");
}
}
示例14: strlen
$alphabeth = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ1234567890_-";
$code = "";
for ($i = 0; $i < 11; $i++) {
$code .= $alphabeth[rand(0, strlen($alphabeth) - 1)];
}
$product->short_name = $code;
$handle = new Upload($_FILES['image']);
if ($handle->uploaded) {
$url = "storage/products/";
$handle->Process($url);
$product->image = $handle->file_dst_name;
}
if (isset($_POST["is_public"])) {
$product->is_public = 1;
} else {
$product->is_public = 0;
}
if (isset($_POST["in_existence"])) {
$product->in_existence = 1;
} else {
$product->in_existence = 0;
}
if (isset($_POST["is_featured"])) {
$product->is_featured = 1;
} else {
$product->is_featured = 0;
}
// $product->name = $_POST["name"];
$product->add();
Core::redir("index.php?view=products");
示例15: deleteAction
public function deleteAction()
{
$post = new Criteria("post");
$post->delete("id=" . $_GET["id"]);
Core::redir("./?r=blog/index");
}