<div class="loader"> <div id="scan-text"> <div class="vertical-centered"> <label style="display:block;">Loading.....</label> <img src="../images/ajax-loader.gif"> </div> </div> </div> <?php if (Session::get('user_id') && Session::get('assign')) { if (Crytion::decryt64(Session::get('assign')) == "ST_C" || Crytion::decryt64(Session::get('assign')) == "ST_IN") { header("Location:../detail%20staff/"); } else { if (Crytion::decryt64(Session::get('assign')) == "AD") { $user_id = Crytion::decryt64(Session::get('user_id')); $user = DB::getInstance()->get('tbl_employee', array("user_id", "=", $user_id)); if ($user->error()) { header("Refresh :0;url=../"); } else { if ($user->count() == 1) { $fname = $user->result()->fname; $user_id = Crytion::encryt64(Crytion::encryt64($user_id)); $jb = Crytion::encryt64(Crytion::encryt64("employee")); ?> <!-- navbar --> <div class="navbar navbar-inverse"> <div class="navbar-inner"> <button type="button" class="btn btn-navbar visible-phone" id="menu-toggler"> <span class="icon-bar"></span> <span class="icon-bar"></span>
top: 50%; left: 50%; margin: -28px 0 0 -25px; } </style> </head> <body onload="scrlsts()"> <?php if (Input::get('todo') == 'out') { session_destroy(); Redirect::to('../'); } $user = new User(); $user->checkLoggedin(array('user')); if ($user->isLoggedin()) { $get = DB::getInstance()->get('tbl_cust', array('cust_id', '=', Crytion::decryt64(Session::get('user')))); $result = $get->result(); ?> <div data-role="page" data-theme='b' id="main-page"> <div data-role="header" data-position="fixed" data-tap-toggle="false" data-theme='b'> <h1>Retail Mobile System</h1> <a href="#" target='_blank'><i class='fa fa-shopping-cart'></i></a> </div> <div data-role="content"> <ul data-role="listview" data-inset="false" data-icon="false" data-divider-theme="b"> <li data-role="list-divider">Welcome <?php echo $result->cust_fname; ?> !</li>
if ($query->rowCount() > 0) { while ($r = $query->fetch(PDO::FETCH_OBJ)) { echo '<tr>'; echo '<td style="text-align:center;line-height:20px;vertical-align:middle"><a href="../history/?view_sales=' . Crytion::encryt64($r->sales_id) . '"><span class="fa fa-eye"/></a></td>'; echo '<td>' . $r->sales_id . '</td>'; echo '<td>RM ' . $r->payment_amount . '</td>'; echo '<td>' . date('d F Y (h:m A)', strtotime($r->sale_time)) . '</td>'; echo '</tr>'; } } ?> </tbody> </table> <?php } else { $sales_id = Crytion::decryt64(Input::get('view_sales')); ?> <li><label>Sales ID # <?php echo $sales_id; ?> </label></li> <table data-role='table' id='table-column-toggle' data-mode='columntoggle' class='ui-responsive table-stroke' data-ajax='false'> <thead> <tr> <th></th> <th data-priority="2">Goods ID</th> <th data-priority="1">Item Name</th> <th data-priority="2">Category</th> <th data-priority="3">Item purchased</th> <th data-priority="3">Price</th> <th data-priority="2">Discount</th>
<?php require 'core/init.php'; echo "<div class='print-div'>"; if (isset($_POST['check'])) { foreach ($_POST['check'] as $value) { $value = Crytion::decryt64($value); echo '<div>'; echo '<img src="barcode_img.php?num=' . $value . '&type=code128&imgtype=png">'; echo '</div>'; } } if (isset($_GET['text'])) { $value = Crytion::decryt64($_GET['text']); echo '<div><img src="barcode_img.php?num=' . $value . '&type=code128&imgtype=png"></div>'; } echo "</div>"; ?> <script src="js/jquery-2.1.0.js"></script> <script src="js/html2canvas.js"></script> <script> var domElement = document.getElementById(''); var domElement2 = document.getElementById(''); html2canvas(domElement, { onrendered: function(canvas) { domElement2.appendChild(canvas); } }); </script>
$x = 1; $set = ''; foreach (Session::get('form-error') as $error) { $set .= $error; if ($x < count(Session::get('form-error'))) { $set .= " | "; } $x = $x + 1; } echo $set; echo '</div></div>'; Session::delete('form-error'); } else { if (Session::exists('form-success')) { if (Input::get('return_url')) { $return_url = Crytion::decryt64(Input::get('return_url')); Session::put('select_cust', $id); echo "<script>window.setTimeout(function(){window.location = '" . $return_url . "'},1);</script>"; } else { echo '<div style="width:auto;margin-right:50px;overflow: auto;">'; echo '<div id="form_success" class="alert alert-success"><a class="close" data-dismiss="alert" href="#">×</a> '; echo '<i class="fa fa-check"></i><span>' . Session::get('form-success') . '</span><br/> Redirect in 3 seconds'; echo '</div></div>'; echo "<script>window.setTimeout(function(){window.location = 'user-list.php'},3000);</script>"; } Session::delete('form-success'); } } ?> <div class="container">
?> <div class="list"> <table class="item-list table"> <thead> <tr> <th class="span4">Item Name</th> <th class="span3">Price Unit (discount)</th> <th class="span2">Quantity</th> <th class="span3">Total RM</th> </tr> </thead> <tbody> <?php $sql2 = "Select a.goods_name,b.unit_price,b.goods_qty,b.goods_discount\n from tbl_goods a,tbl_sales_item b,tbl_sales c\n Where a.goods_id = b.goods_id\n AND c.sales_id = b.sales_id\n AND c.sale_time = ?\n AND c.cust_id = ?\n AND c.sales_id = ?"; $query2 = $con->prepare($sql2); $query2->execute(array(Input::get('time'), Crytion::decryt64(Input::get('view')), Input::get('sale'))); if ($query2->rowCount() > 0) { while ($row = $query2->fetch(PDO::FETCH_NUM)) { echo "<tr>"; echo "<td>" . $row[0] . "</td>"; echo "<td>" . $row[1] . " (" . $row[3] . "%)</td>"; echo "<td>" . $row[2] . "</td>"; echo "<td>" . ($row[1] - $row[1] * $row[3] / 100) . "</td>"; echo "</tr>"; $discountprice = $row[1] - $row[1] * $row[3] / 100; $subtotal = $discountprice * $row[2]; $total = $total + $subtotal; } } ?> </tbody>
</div> </div> <!-- Users table --> <div class="row-fluid table"> <style type="text/css"> .dataTables_filter{ display: none; } </style> <?php if (Input::get('del') == 1) { $delete = new Employee(); if (Input::get('check') != null) { foreach (Input::get('check') as $check) { $delete->deleteEmployee(Crytion::decryt64(Crytion::decryt64($check))); } } } ?> <form action='employee-list.php?del=1' method='post' id='deleteem'> <table class="table table-bordered table-hover dataTable" id="employee-list-table"> <thead> <tr> <th class="span1"> <input type="checkbox" name="checkall" id="checkall"/> </th> <th class="span4"> Employee Info </th> <th class="span2">
<!-- Users table --> <div class="row-fluid table"> <style type="text/css"> .dataTables_filter{ display: none; } </style> <?php if (Input::get('del') == 1) { $delete = new Customer(); if (Input::get('check') != null) { foreach (Input::get('check') as $check) { $delete->deletecustomer(Crytion::decryt64(Crytion::decryt64($check))); } } } ?> <form action='user-list.php?del=1' method='post' id='deletecust'> <table class="table table-bordered display dataTable" id="user-list"> <thead> <tr> <th class="span1"><input type="checkbox" name="checkall" id="checkall"/></th> <th class="span2">Person Id</th> <th class="span4">Name</th> <th class="span2">Registered</th> <th class="span3">Contact</th> </tr> </thead>
<?php require 'init/core.php'; if (Input::get('set') == 'cat') { $return_url = Crytion::decryt64(Input::get("return_url")); Session::put('no-cat'); Redirect::to($return_url); } if (Input::get('complete') == md5('true')) { $return_url = Crytion::decryt64(Input::get("return_url")); Session::put('complete'); Redirect::to($return_url); }
<span class="pull-right">Time: <span id="time"></span></span> </ul> <div class="container-fluid"> <div id="pad-wrapper" class="user-profile new-user" > <?php if (Input::get('del') == 1) { $delete = new Customer(); $delete->deletecustomer(Crytion::decryt64(Crytion::decryt64(Input::get('id')))); if ($delete->valid()) { echo "<script>alert('Delete Successful');</script>"; echo "<script>window.setTimeout(function(){window.location = 'user-list.php'},1000);</script>"; } } if (Input::get('id')) { $id = Crytion::decryt64(Crytion::decryt64(Input::get('id'))); $user = DB::getInstance()->query("Select * from tbl_cust where cust_id=?", array($id)); if (!$user->error() && $user->count() == 1) { $result = $user->result(); $address = DB::getInstance()->get('tbl_add', array("person_id", "=", $result->cust_id)); $addr = $address->result(); ?> <!-- delete modal --> <div id="deleteuser" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 >Delete User</h3> </div> <div class="modal-body"> <p><strong>Delete This Data Will Never Be Revert back.Are you Sure?</strong></p> </div>
} else { if ($user->data()->job_id === 'SI') { Session::put("user_id", Crytion::encryt64($id)); Session::put("assign", Crytion::encryt64("ST_IN")); header("Location:detail%20staffin"); } } } } else { Session::put('msg', 'Wrong Password! Make Sure The Combination Is Valid'); } } if (Session::exists('id')) { $id = Session::get('id'); $jb = Session::get('jb'); $user = DB::getInstance()->query('Select * from tbl_employee where user_id=?', array(Crytion::decryt64(Crytion::decryt64($id)))); if (!$user->error()) { ?> <div id="carousel-example-generic" class="carousel slide carousel-fade" data-ride="carousel" style="display:none"> <div class="carousel-inner"> <div class="item active"> <img src="images/bg/supermarket.jpg" alt="" /> </div> <div class="item"> <img src="images/bg/supermarket2.jpg" alt="" /> </div> <div class="item"> <img src="images/bg/blurred.jpg" alt="" /> </div> <div class="item">
<button class="btn btn-info pull-right" disabled="disabled" id="deletebtn"> <span>-</span> DELETE </button> <a href="" class="btn btn-success pull-right"> <i class="fa fa-plus"></i> ADD SUPPLIER </a> </div> </div> <?php if (Input::get('del') == 1) { $delete = new Supplier(); if (Input::get('check') != null) { foreach (Input::get('check') as $check) { $delete->deleteSupplier(Crytion::decryt64(Crytion::decryt64($check))); } } } ?> <form action='supplier.php?del=1' method='post' id='deleteem'> <div class="row-fluid"> <table class="table table-hover table-bordered display dataTable" id="supplier-list"> <thead> <tr> <th class="span1"><input type="checkbox" name="checkall" id="checkall"/></th> <th class="span2"> Supplier ID </th> <th class="span4"> Supplier Name
<input type="submit" class="btn-glow primary" value="Save Item"> <span>OR</span> <input type="reset" value="Cancel" class="reset"> </div> </form> </div> </div> </div> </div> <?php } else { if (Input::get('item') && Input::get('tkn') == 'delete' && Input::get('inv') == md5('0')) { $valid = $inv->deleteitem(Crytion::decryt64(Input::get('item'))); if ($valid) { echo "<script>alert('Items Deleted');</script>"; echo "<script>window.setTimeout(function(){window.location = 'items.php'},1);</script>"; } else { echo "<script>alert('Deleted Failed');</script>"; echo "<script>window.setTimeout(function(){window.location = 'items.php'},1);</script>"; } } else { Redirect::to(404); } } } } ?> </div>
public function select_cust($customer) { $select = DB::getInstance()->get('tbl_cust', array('cust_id', '=', Crytion::decryt64($customer))); if ($select && $select->count() > 0) { Session::put('select_cust', $select->result()->cust_id); } }