$query->execute(array($srch)); $str = ""; if ($query->rowCount() == 0) { echo "<a style='pointer:none;' class='list-group-item list-group-item-danger'><i class='fa fa-exclamation-triangle'></i> No record</a>"; } else { while ($r = $query->fetch(PDO::FETCH_OBJ)) { $tel = Crytion::encryt64($r->cust_tel); $str .= "<a href='updatecart.php?cust_sel=" . $tel . "&return_url=" . $return_url . "' class='list-group-item list-group-item-info'>" . $r->cust_fname . "</a>"; } echo $str; } } else { $srch = "%" . $srch . "%"; $sql = "select * from tbl_cust where cust_fname Like ?"; $query = $con->prepare($sql); $query->execute(array($srch)); $str = ""; if ($query->rowCount() == 0) { echo "<a style='pointer:none;' class='list-group-item list-group-item-danger'><i class='fa fa-exclamation-triangle'></i> No record</a>"; } else { while ($r = $query->fetch(PDO::FETCH_OBJ)) { $id = Crytion::encryt64($r->cust_id); $str .= "<a href='updatecart.php?cust_sel=" . $id . "&return_url=" . $return_url . "' class='list-group-item list-group-item-info'>" . $r->cust_fname . "</a>"; } echo $str; } } } } } }
margin-top: -10%; margin-left: -150px; } </style> </head> <body> <?php if (Input::exists()) { $user_id = Input::get('scan-id-check'); $user = DB::getInstance()->get("tbl_employee", array("user_id", "=", $user_id)); if ($user->error()) { Session::put('error', 'System error occur.Please Refresh or Contact the Administrator'); } else { if ($user->count() == 1) { $id = Crytion::encryt64(Crytion::encryt64($user->result()->user_id)); $jb = Crytion::encryt64(Crytion::encryt64("employee")); Session::put('id', $id); Session::put('jb', $jb); header("Location:login.php"); } else { Session::put('error', 'ID Not Recognize. Please Make Sure You Have the Right ID'); } } } ?> <div class="loader"> <div id="scan-text"> <div class="vertical-centered"> <?php if (Session::exists('error')) {
echo $user->pwd; ?> " /> </div> <div class="span6 actions"> <input type="submit" class="btn-glow primary" value="Save Changes"> <span>OR</span> <input type="reset" value="Cancel" class="reset"> </div> </form> <?php } else { echo '<a class="btn-flat icon pull-right delete-user" data-toggle="modal" data-toggle="tooltip" title="Delete user" data-placement="top" href="#deleteuser"> <i class="icon-trash"></i> </a>'; echo '<a class="btn btn-flat icon large pull-right edit" href="personal-info.php?id=' . Crytion::encryt64(Crytion::encryt64($user->user_id)) . '&edit=1"> Edit this person </a>'; ?> <div class="span7 section"> <h6>Recent Activity</h6> <br> <!-- recent orders table --> <table class="table table-hover"> <thead> <tr> <th class="span2"> Transaction </th> <th class="span3"> <span class="line"></span>
<tr> <th></th> <th data-priority="1">Sales ID</th> <th data-priority="2">Amount </th> <th data-priority="1">Date of Sales</th> </tr> </thead> <tbody> <?php $list = "Select * from tbl_sales a,tbl_sales_item b,tbl_sales_payment c,tbl_goods d,tbl_employee e\n Where a.sales_id = b.sales_id\n AND a.sales_id = c.sales_id\n AND b.goods_id = d.goods_id\n AND a.cust_id = ?\n AND a.user_id = e.user_id\n Group By a.sales_id"; $query = $con->prepare($list); $query->execute(array($result->cust_id)); 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;
Contact </th> </tr> </thead> <tbody> <?php require "../config/config.php"; $sql = "Select * from tbl_employee a,tbl_jobs b where a.job_id = b.job_id and b.job_name !='ADMIN' order by a.user_id"; $query = $con->query($sql); if ($query->rowCount()) { while ($r = $query->fetch(PDO::FETCH_OBJ)) { echo "<tr>"; echo '<td><input type="checkbox" name="check[]" id="check" value="' . Crytion::encryt64(Crytion::encryt64($r->user_id)) . '" /></td>'; echo "<td>"; echo "<img src='../getimg.php?id=" . Crytion::encryt64(Crytion::encryt64($r->user_id)) . "&jb=" . Crytion::encryt64(Crytion::encryt64("employee")) . "' class='img-circle avatar hidden-phone' />"; echo "<a href='em-profile.php?id=" . Crytion::encryt64(Crytion::encryt64($r->user_id)) . "' class='name'>" . $r->lname . "," . $r->fname . "</a>"; echo "<span class='subtext'>" . $r->job_name . "</span>"; echo "</td>"; echo "<td></td>"; echo "<td>" . $r->job_name . "</td>"; echo "<td>" . $r->salary . "</td>"; echo "<td><a href='#' class='name'>" . $r->email . "</a><span class='subtext'>" . $r->tel . "</span></td>"; echo "</tr>"; } } ?> </tbody> </table> </form> </div> </div>
$sql = 'SELECT sale_time,payment_amount,payment_type,SUM(goods_qty) FROM tbl_sales_item a,tbl_sales b,tbl_sales_payment c WHERE a.sales_id = b.sales_id AND b.sales_id = c.sales_id AND b.cust_id = ? Group by sale_time'; $query = $con->prepare($sql); $query->execute(array(Session::get('select_cust'))); if ($query->rowCount() > 0) { while ($r = $query->fetch(PDO::FETCH_NUM)) { echo "<tr>"; echo "<td>" . $r[0] . "</td>"; echo "<td>RM " . $r[1] . "</td>"; echo "<td>" . $r[2] . "</td>"; echo "<td>" . $r[3] . "</td>"; echo "<td><a href='/receipt?view=" . Crytion::encryt64(Session::get('select_cust')) . "&time=" . $r[0] . "'>View Receipt</a></td>"; echo "</tr>"; } } echo '</tbody>'; echo '</table>'; } } ?> </div> <div class="span3 sidepanel"> <!-- BOX 1--> <div class="panel panel-info"> <?php if (Session::exists('products') && Session::get('products') != null) { echo '<div id="togglepanel"class="panel-heading" style="text-align:center">';
} else { echo '<li style="text-align:center;display:none" data-role="fieldcontain" id="message" class="message warning">'; echo '<i class="fa fa-warning"></i>'; echo '<p id="error-msg"></p>'; echo '</li>'; } } ?> <li data-role="fieldcontain"> <div class="box-image" style="margin-bottom:20px;"> <div style="border:1px solid #000;width:150px;height:150px;margin:0 auto;" > <img src="getimg.php?id=<?php echo Crytion::encryt64(Crytion::encryt64($result->cust_id)); ?> &jb=<?php echo Crytion::encryt64(Crytion::encryt64("cust")); ?> " class="dis-img" style="width:150px;height:150px"> </div> <div class="dis-img" style="text-align:center;width:135px;margin:0 auto;"> <div class="btn btn-default btn-file" style="margin-top:10px;"> <input type="file" name="image" class="img-upload" id="img-upload" style="margin:0 auto;" /> </div> </div> </div> </li> <li data-role="fieldcontain"> <label>First name</label> <input type="text" value="<?php echo $sql->result()->cust_fname; ?>
$sql = 'SELECT sale_time,payment_amount,payment_type,SUM(goods_qty),b.sales_id FROM tbl_sales_item a,tbl_sales b,tbl_sales_payment c WHERE a.sales_id = b.sales_id AND b.sales_id = c.sales_id AND b.cust_id = ? Group by sale_time'; $query = $con->prepare($sql); $query->execute(array($id)); if ($query->rowCount() > 0) { while ($r = $query->fetch(PDO::FETCH_NUM)) { echo "<tr>"; echo "<td>" . $r[0] . "</td>"; echo "<td>RM " . $r[1] . "</td>"; echo "<td>" . $r[2] . "</td>"; echo "<td>" . $r[3] . "</td>"; echo "<td><a href='view-receipt.php?view=" . Crytion::encryt64($id) . "&time=" . $r[0] . "&sale=" . $r[4] . "'>View Receipt</a></td>"; echo "</tr>"; } } echo '</tbody>'; echo '</table>'; } ?> <div class="span12 section comment"> <h6>Add a quick note</h6> <p>Add a note about this user to keep a history of your interactions.</p> <textarea></textarea> <a href="user-profile.html#">Attach files</a> <div class="span12 submit-box pull-right"> <input type="submit" class="btn-glow primary" value="Add Note">
echo "<script>window.setTimeout(function(){window.location = ''},10000);</script>"; } } ?> <div class="form-wrapper"> <form id="new_user_form" class="new_user_form inline-input" enctype='multipart/form-data' action="em-profile.php?id=<?php echo Input::get('id'); ?> &edit=1" method="post"> <div class="box-image" style="margin-bottom:20px;"> <div style="width:150px;height:150px;margin:0 auto;" > <img src="../getimg.php?id=<?php echo Crytion::encryt64(Crytion::encryt64($result->user_id)); ?> &jb=<?php echo Crytion::encryt64(Crytion::encryt64("employee")); ?> " class=" dis-img"> </div> <div class="dis-img" style="text-align:center;width:150px;margin:0 auto;"> <span class="btn btn-default btn-file" style="margin-top:10px"> Browse <input type="file" name="image" class="img-upload" id="img-upload"/> </span> </div> </div> <hr /> <div class="field-box span12"> <label >Name:</label> <input class="span4 " name="fname" id="fname" placeholder="first name" type="text" value="<?php echo $result->fname; ?>
$login = $user->login($id, Input::get('pwd'), 'employee'); if ($login) { Session::put('msg', ''); if ($user->data()->job_id === 'AD') { Session::put("user_id", Crytion::encryt64($id)); Session::put("assign", Crytion::encryt64("AD")); header("Location:detail%20admin"); } else { if ($user->data()->job_id === 'SC') { Session::put("user_id", Crytion::encryt64($id)); Session::put("assign", Crytion::encryt64("ST_C")); header("Location:detail%20staff"); } 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()) { ?>
<tbody> <?php require "../config/config.php"; $sql = "Select * from tbl_goods a,tbl_goods_stock b Where a.goods_id = b.goods_id"; $query = $con->query($sql); while ($items = $query->fetch(PDO::FETCH_OBJ)) { echo "<tr>"; echo '<td><input type="checkbox" name="check[]" id="check" value="' . Crytion::encryt64($items->goods_id) . '" /></td>'; echo '<td>' . $items->goods_id . '</td>'; echo '<td><div class="img"><img src="../images/avatar.png" style="margin:0"></div><a href="items.php" class="name">' . $items->goods_name . '</a></td>'; echo '<td>' . $items->goods_category . '</td>'; echo '<td>' . $items->goods_qty . '</td>'; echo '<td><a href="inventory.php?item=' . Crytion::encryt64($items->goods_id) . '&tkn=inventory&inv=' . md5('1') . '">Inventory</a></td>'; echo '<td><a href="inventory.php?item=' . Crytion::encryt64($items->goods_id) . '&tkn=edit&inv=' . md5('2') . '">Edit</a> <a href="inventory.php?item=' . Crytion::encryt64($items->goods_id) . '&tkn=delete&inv=' . md5('0') . '">Delete</a></td>'; echo "</tr>"; } ?> </tbody> </table> </form> </div> </div> <!-- end products table --> </div> </div> </div> <!-- end main container --> <!-- scripts -->
echo Input::get('item'); ?> &tkn=edit&inv=<?php echo md5('2'); ?> &edit=<?php echo md5('true'); ?> " method="post" enctype="multipart/form-data"> <div class="box-image" style="margin-bottom:20px;"> <div style="width:150px;height:150px;margin:0 auto;" > <img src="../getimg.php?id=<?php echo Crytion::encryt64(Crytion::encryt64(Crytion::decryt64(Input::get('item')))); ?> &jb=<?php echo Crytion::encryt64(Crytion::encryt64("item")); ?> " class="dis-img" style="width:150px;height:150px"/> </div> <div class="dis-img" style="text-align:center;width:150px;margin:0 auto;"> <span class="btn btn-default btn-file" style="margin-top:10px"> Browse <input type="file" name="image" class="img-upload" id="img-upload"/> </span> </div> </div> <hr/> <?php if (Session::exists('no-cat')) { echo '<div class="field-box span12">'; echo '<label>New Category</label>';
<!-- <div id="overlay"> <img id="loading" src="../images/loading.gif"> </div> --> <?php if (Input::exists()) { if (Input::get('token')) { if (Token::check(Input::get('token'))) { $user = new User(); $check = $user->login(Input::get('username'), Input::get('password'), 'customer'); if ($check) { $field = is_numeric(Input::get('username')) ? 'cust_tel' : 'cust_uname'; $getid = DB::getInstance()->get('tbl_cust', array($field, '=', Input::get('username'))); Session::put('user', Crytion::encryt64($getid->result()->cust_id)); Redirect::to('main/'); } else { Session::put('error', 'Wrong Password Or Username'); } } } else { $validate = new Validate(); $validation = $validate->check($_POST, array('fname' => array('name' => 'First Name', 'required' => true, 'min' => 2), 'lname' => array('name' => 'Last Name', 'required' => true, 'min' => 2), 'password' => array('name' => 'Password', 'required' => true, 'min' => 8), 'cpassword' => array('name' => 'Retype Password', 'required' => true, 'matches' => 'password'), 'cust_tel' => array('name' => 'Tel Number', 'required' => true, 'unique' => 'tbl_cust'))); if ($validation->passed()) { $user = new User(); $id = $user->generateid('customer'); $fname = Input::get('fname'); $lname = Input::get('lname'); $pass = Crytion::generatehash(Input::get('password')); $tel = Input::get('cust_tel');