public function homeAction() { $meta = array("title" => ".: HOSPITAL :."); Session::setFlashMsg("mensaje", "Hola wey"); Core::redir("./?r=index/index"); //View::render($this,"index",array("meta"=>$meta)); }
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"); }
<?php $client = PersonData::getById($_GET["id"]); $client->del(); Core::redir("./index.php?view=providers");
<?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");
<?php /** * @author evilnapsis * @brief Eliminar autores **/ $category = AuthorData::getById($_GET["id"]); $category->del(); Core::redir("./index.php?view=authors");
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"); }
<?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");
<?php /** * @author evilnapsis * @brief Eliminar editoriales **/ $category = EditorialData::getById($_GET["id"]); $category->del(); Core::redir("./index.php?view=editorials");
<?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"]);
<?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; } if (isset($_POST["is_public"])) { $product->is_public = 1; } else { $product->is_public = 0; } // $product->name = $_POST["name"]; $product->add(); Core::redir("index.php?view=slider");
<?php unset($_SESSION["cart"]); Core::redir("index.php?view=mycart");
<?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"); }
<?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");
<?php $client = PacientData::getById($_GET["id"]); $client->del(); Core::redir("./index.php?view=pacients");
</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"); } }
<?php if (count($_SESSION["cart"]) == 1) { unset($_SESSION["cart"]); } else { $products = $_SESSION["cart"]; $news = array(); foreach ($products as $product) { if ($product["product_id"] != $_GET["product_id"]) { array_push($news, $product); } } $_SESSION["cart"] = $news; } //print_r($products); if ($_GET["href"] == "cart") { Core::redir("index.php?view=mycart"); } else { if ($_GET["href"] == "product") { $p = ProductData::getById($_GET["product_id"]); $cat = CategoryData::getById($p->category_id); Core::redir("index.php?view=productos&cat=" . $cat->short_name); } }
$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");
public function deleteAction() { $post = new Criteria("post"); $post->delete("id=" . $_GET["id"]); Core::redir("./?r=blog/index"); }
<?php $client = ClientData::getById($_GET["id"]); $client->del(); Core::redir("./index.php?view=clients");
<?php if (!empty($_POST)) { $profile = ProfileData::getByUserId($_SESSION["user_id"]); $profile->title = $_POST["title"]; $profile->bio = $_POST["bio"]; $profile->likes = $_POST["likes"]; $profile->dislikes = $_POST["dislikes"]; $image = new Upload($_FILES["image"]); if ($image->uploaded) { $image->Process("storage/users/" . $_SESSION["user_id"] . "/profile/"); if ($image->processed) { $profile->image = $image->file_dst_name; } else { echo "Error: " . $image->error; } } $profile->update_info(); Core::redir("./?view=editinformation"); }
<?php $category = ProjectData::getById($_GET["id"]); $category->del(); Core::redir("./index.php?view=projects");
<?php if (isset($_SESSION["admin_id"])) { $pm = PaymethodData::getById($_GET["id"]); //print_r($pm); if (!$pm->is_active) { $pm->is_active = 1; $pm->update_active(); } else { $pm->is_active = 0; $pm->update_active(); } Core::redir("./?view=payment_settings"); }
<?php if (isset($_SESSION["user_id"])) { $fs = FriendData::getFriendship($_SESSION["user_id"], $_GET["recid"]); $fs->accept(); Core::redir("./?view=user&id=" . $_GET["recid"]); }
<?php /** * @author evilnapsis * @brief Algoritmo para cambiar la contrase~a **/ if (isset($_SESSION["user_id"]) && !empty($_POST)) { $user = UserData::getById($_SESSION["user_id"]); if ($user->password == sha1(md5($_POST["password"]))) { if ($_POST["new_password"] == $_POST["confirm_password"]) { $user->password = sha1(md5($_POST["new_password"])); $user->update_passwd(); $_SESSION["password_updated"] = true; Core::alert("La contrase~a ha sido actualizada exitosamente!"); Core::redir("./?view=configuration"); } else { Core::alert("Las contrase~as no coinciden."); Core::redir("./?view=configuration"); } } else { Core::alert("La contrase~a introducida es incorrecta."); Core::redir("./?view=configuration"); } }
<?php if (!empty($_GET)) { $fp = PermisionData::getById($_GET["id"]); // print_r($fp); $file = FileData::getById($fp->file_id); $fp->del(); Core::redir("./?view=filepermisions&id=" . $file->code); }
<?php if (!empty($_POST)) { // print_r($_POST); $buy = BuyData::getById($_POST["buy_id"]); $buy->cancel(); Core::alert("Compra Cancelada!"); Core::redir("index.php?view=client"); }
<?php if (!isset($_SESSION["user_id"])) { Core::redir("./"); } $frs = ConversationData::getConversations($_SESSION["user_id"]); ?> <div class="container"> <div class="row"> <div class="col-md-3"> <?php Action::execute("_userbadge", array("user" => Session::$user, "profile" => Session::$profile, "from" => "logged")); Action::execute("_mainmenu", array()); ?> </div> <div class="col-md-7"> <h2>Conversaciones</h2> <?php if (count($frs) > 0) { ?> <table class="table table-bordered"> <thead> <th>Amigo</th> </thead> <?php foreach ($frs as $fr) { ?> <tr> <td> <?php
<?php if (isset($_SESSION["admin_id"])) { $buy = BuyData::getById($_GET["id"]); $buy->status_id = $_GET["status"]; $buy->change_status(); Core::redir("index.php?view=sells"); }
Core::alert("Acceso Denegado!"); Core::redir("./"); } else { if ($go == false && !$is_owner) { $ps = PermisionData::getAllbyFileId($file->id); $found = false; foreach ($ps as $p) { if ($p->user_id == $_SESSION["user_id"]) { $found = true; } } if ($found == true) { $go = true; } else { Core::alert("Acceso Denegado!"); Core::redir("./?view=shared"); } } } ?> <?php if ($go || $is_owner) { ?> <div class="container"> <div class="row"> <div class="col-md-12"> <?php if (isset($_SESSION["user_id"])) {
<?php if (!empty($_POST)) { $client = ClientData::getById($_POST["id"]); $client->name = $_POST["name"]; $client->lastname = $_POST["lastname"]; $client->email = $_POST["email"]; $client->address = $_POST["address"]; $client->phone = $_POST["phone"]; $client->update(); if ($_POST["password"] != "") { @($client->password = crypt($_POST["password"])); $client->update_passwd(); } Core::redir("./?view=clients"); }