當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Core::redir方法代碼示例

本文整理匯總了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));
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:7,代碼來源:IndexController.php

示例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");
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:7,代碼來源:PersonController.php

示例3:

<?php

$client = PersonData::getById($_GET["id"]);
$client->del();
Core::redir("./index.php?view=providers");
開發者ID:leanet,項目名稱:inventio-lite,代碼行數:5,代碼來源:widget-default.php

示例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");
開發者ID:mriveros,項目名稱:library-php,代碼行數:17,代碼來源:action-default.php

示例5:

<?php

/**
* @author evilnapsis
* @brief Eliminar autores 
**/
$category = AuthorData::getById($_GET["id"]);
$category->del();
Core::redir("./index.php?view=authors");
開發者ID:mriveros,項目名稱:library-php,代碼行數:9,代碼來源:action-default.php

示例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");
}
開發者ID:rogelino,項目名稱:smile,代碼行數:31,代碼來源:action-default.php

示例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");
開發者ID:leanet,項目名稱:inventio-lite,代碼行數:9,代碼來源:widget-default.php

示例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"]);
開發者ID:evilnapsis,項目名稱:katana,代碼行數:26,代碼來源:action-default.php

示例9: unset

<?php

unset($_SESSION["cart"]);
Core::redir("index.php?view=mycart");
開發者ID:evilnapsis,項目名稱:katana,代碼行數:4,代碼來源:action-default.php

示例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");
}
開發者ID:evilnapsis,項目名稱:smile,代碼行數:11,代碼來源:action-default.php

示例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");
開發者ID:evilnapsis,項目名稱:bookmedik,代碼行數:28,代碼來源:addreservation-action.php

示例12:

<?php

$client = PacientData::getById($_GET["id"]);
$client->del();
Core::redir("./index.php?view=pacients");
開發者ID:Josexv1,項目名稱:CALENDARIO-IGLESIA,代碼行數:5,代碼來源:widget-default.php

示例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">&nbsp;</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">&nbsp;</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");
    }
}
開發者ID:evilnapsis,項目名稱:katana,代碼行數:31,代碼來源:action-default.php

示例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");
開發者ID:alfieris,項目名稱:katana,代碼行數:30,代碼來源:action-default.php

示例15: deleteAction

 public function deleteAction()
 {
     $post = new Criteria("post");
     $post->delete("id=" . $_GET["id"]);
     Core::redir("./?r=blog/index");
 }
開發者ID:CloudGt,項目名稱:suggbox-php,代碼行數:6,代碼來源:BlogController.php


注:本文中的Core::redir方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。