コード例 #1
0
 public function delete($id = NULL)
 {
     if (is_null($id)) {
         Utility::message('No id available !!');
         return Utility::redirect('index.php');
     }
     $connect = mysql_connect("localhost", "root", "root");
     $link = mysql_select_db("BITM");
     $query = "DELETE FROM `radio` WHERE `id` = " . $id;
     $result = mysql_query($query);
     if ($result) {
         Utility::message("Delete is successful");
     } else {
         Utility::message("Delete is failed.");
     }
     Utility::redirect('index.php');
 }
コード例 #2
0
 public function delete($id = null)
 {
     if (is_null($id)) {
         Utility::message('No id available !!');
         return Utility::redirect('index.php');
     }
     $conn = mysql_connect("localhost", "root", "root") or die("Not connected");
     $link = mysql_select_db("BITM") or die("Not connected table");
     $query = "DELETE FROM `BITM`.`atomicProject` WHERE `atomicProject`.`id` = " . $id;
     $result = mysql_query($query);
     if ($result) {
         Utility::message("Delete is successful");
     } else {
         Utility::message("Delete is failed.");
     }
     Utility::redirect('index.php');
 }
コード例 #3
0
 public function recoverMultiple($ids = array())
 {
     if (is_array($ids) && count($ids) > 0) {
         $_ids = implode(',', $ids);
         $query = "UPDATE `phone_data` SET `deleted_at` = NULL WHERE `id` IN({$_ids}) ";
         $result = mysql_query($query);
         if ($result) {
             Utility::message("Trash is successful");
         } else {
             Utility::message("Trash is failed.");
         }
         Utility::redirect('index.php');
     } else {
         Utility::message('No id available !!');
         return Utility::redirect('index.php');
     }
 }
コード例 #4
0
include_once $_SERVER["DOCUMENT_ROOT"] . DIRECTORY_SEPARATOR . "BITM_Atomic_Project" . DIRECTORY_SEPARATOR . "Views" . DIRECTORY_SEPARATOR . "startup.php";
use App\BITM\SEIP107348\Date\Birthday;
use App\BITM\SEIP107348\Utility\Utility;
$view = new Birthday();
$date = $view->update($_GET['id']);
$id = $date['id'];
if (isset($_POST['submit'])) {
    $date = $_POST['date'];
    $conn = mysql_connect("localhost", "root", "root") or die("not connected");
    $lnk = mysql_select_db("BITM") or die("cannot select db table");
    $query = "UPDATE `Date` SET `birthday`='" . $date . "' WHERE  id='{$id}'";
    $result = mysql_query($query);
    if ($result) {
        Utility::message("Update is successful");
    } else {
        Utility::message("Update is failed.");
    }
    Utility::redirect('index.php');
}
?>



<!DOCTYPE>
<html>
    <head>
        <title>Birthday</title>
        <link href="../../../Asset/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
        <link href="../../../Asset/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
        <link href="../../../Asset/css/main.css" rel="stylesheet" type="text/css"/>
        <style>
コード例 #5
0
        <!-- =============== table-section =============== -->
        <section class="table_section">
            <div class="container">
                <div class="row col-md-10 col-md-offset-1  custyle">
                    <div class="table_nav">

                        <!------------------ insert-message ----------------->
                        <div>

                        </div>
                        <div class="alert alert-dismissible alert-success alert-message">
                            <button type="button" class="close" data-dismiss="alert">&Cross;</button>
                            <h4>Message!</h4>
                            <?php 
echo Utility::message();
?>
                        </div>

                        <nav class="navbar navbar-default" role="navigation">
                            <!-- Collect the nav links, forms, and other content for toggling -->
                            <div class="collapse navbar-collapse navbar-ex1-collapse">
                                <ul class="nav navbar-nav">
                                    <li><a href="../../../index.php">HOME</a></li>
                                    <li><a href="#">VIEW</a></li>
                                    <li><a href="http://localhost/BITM_Atomic_Project/Views/SEIP107348/Book/create.php">ADD BOOK</a></li>
                                    <!--<li><a href="#">Link</a></li>-->

                                </ul>

                                <ul class="nav navbar-nav navbar-right">