Esempio n. 1
0
 public function store($mobile_data = array())
 {
     if (is_array($mobile_data) & array_key_exists('m_name', $mobile_data)) {
         $this->serial_id = $mobile_data['m_serial'];
         $this->mobile_name = $mobile_data['m_name'];
         $sql = "INSERT INTO mobile (mobile_serial,mobile_name)\r\n        VALUES ('{$this->serial_id}','{$this->mobile_name}')";
         if (mysql_query($sql)) {
             message::set('Mobile data is added successfully.');
         } else {
             message::set('There is an error while storing mobile information, please try again.');
         }
     }
     utility::redirect('index.php');
 }
Esempio n. 2
0
 public function store($birthday = array())
 {
     if (is_array($birthday) & array_key_exists('name', $birthday)) {
         $this->name = $birthday['name'];
         $this->birthday = $birthday['birthday'];
         $sql = "INSERT INTO birthday (name,birthday)VALUES ('{$this->name}','{$this->birthday}')";
         if (mysql_query($sql)) {
             message::set('Birthday is added successfully.');
         } else {
             message::set('There is an error while storing birthday information, please try again.');
         }
     }
     utility::redirect('index.php');
 }
Esempio n. 3
0
 public function store($book_data = array())
 {
     if (is_array($book_data) & array_key_exists('book_title', $book_data)) {
         $this->isbn = $book_data['isbn'];
         $this->book_name = $book_data['book_title'];
         $this->book_author = $book_data['book_author'];
         $sql = "INSERT INTO book (book_title,book_author,ISBN)VALUES ('{$this->book_name}','{$this->book_author}','{$this->isbn}')";
         if (mysql_query($sql)) {
             message::set('Book data is added successfully.');
         } else {
             message::set('There is an error while storing book information, please try again.');
         }
     }
     utility::redirect('index.php');
 }
Esempio n. 4
0
				<h3>Mobile List</h3>
			</div>
		</div>
	</div>
</div>

<div class="container">
	<div class="row">
		<div class="col-sm-6 col-sm-offset-3 add_item">
		 <?php 
if (message::get() != NULL) {
    ?>

		  <div class="alert alert-success">
		  	<strong><?php 
    echo message::flash();
    ?>
</strong>
		  </div>

		  <?php 
}
?>
		  <h4 id="dwnld">Download as a PDF <a href=""><img src="../public/images/pdf.jpg"></a></h4>
		   <a class="btn btn-primary pull-right" href="create.php">Create New</a>
			<table class="table table-bordered table-hover">
               <thead>
                    <tr>
				        <th>Mobile Serial NO</th>
				        <th>Mobile Name</th>
				        <th>Action</th>