Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include ('admin.php');
- ?>
- <div align="center">
- <td width="100%"><font size="5" color="darkgreen"><b>Inventory</b></td></font>
- </div>
- <title>Inventory</title>
- <table border="0" align="center">
- <td>
- </table>
- <table border=0 align="center" >
- <td>
- </table>
- <!-- //dagdag
- //$uid = addslashes(strip_tags($_POST["uid"]));
- //$uname = addslashes(strip_tags($_POST["uname"]));
- //$fname = addslashes(strip_tags($_POST["fname"]));
- //$lname = addslashes(strip_tags($_POST["lname"]));
- //$sex = addslashes(strip_tags($_POST["sex"]));
- //$age = addslashes(strip_tags($_POST["age"]));
- //$cnumber = addslashes(strip_tags($_POST["cnumber"]));
- //$address = addslashes(strip_tags($_POST["address"])); -->
- <form action='activitylogsearch2.php' method='POST' enctype='multipart/form-data'>
- <table border='0' class='style' align='center'>
- <thead>
- <th align='left'>ID</th>
- <th align='left'>Image</th>
- <th align='left'>Category</th>
- <th align='left'>Product Name</th>
- <th align='left'>Description</th>
- <th align='left'>Stock</th>
- <th align='left'>Price</th>
- <th align='left'>Date added</th>
- </thead>
- <tbody>
- <?php
- if (isset($_POST['search'],$_POST['Make'])){
- $search = mysql_real_escape_string($_POST['search']);
- $Make = mysql_real_escape_string($_POST['Make']);
- $query = mysql_query ("SELECT * FROM `products` WHERE $Make LIKE '%$search%'");
- while ($rows=mysql_fetch_array($query)){
- $userid= $rows['id'];
- $category = $rows['category'];
- $pname = $rows['pname'];
- $description = $rows['description'];
- $stock = $rows['stock'];
- $price = $rows['price'];
- $date_added = $rows['date_added'];
- $ext = $rows['ext'];
- echo "<tr>
- <td align='left'>".$user_id."</td>
- <td><img src='uploads/$user_id.$ext' height=35 width=35/></td>
- <td align='left'>$category</td>
- <td align='left'>$pname</td>
- <td align='left'>$description</td>
- <td align='left'>$stock</td>
- <td align='left'>$price</td>
- <td align='left'>$date_added</td>
- </tr>";
- }
- } else {
- $query = mysql_query ("SELECT * FROM `products` WHERE $Make LIKE '%$search%'");
- while ($rows=mysql_fetch_array($query)){
- $userid= $rows['id'];
- $category = $rows['category'];
- $pname = $rows['pname'];
- $description = $rows['description'];
- $stock = $rows['stock'];
- $price = $rows['price'];
- $date_added = $rows['date_added'];
- $ext = $rows['ext'];
- echo "<tr>
- <td align='left'>".$user_id."</td>
- <td><img src='uploads/$user_id.$ext' height=35 width=35/></td>
- <td align='left'>$category</td>
- <td align='left'>$pname</td>
- <td align='left'>$description</td>
- <td align='left'>$stock</td>
- <td align='left'>$price</td>
- <td align='left'>$date_added</td>
- </tr>";
- }
- }
- ?>
- </tbody>
- </table>
- </form>
- </div>
- <center>
- <br>
- <script type="text/javascript">
- function print1(strid)
- {
- if(confirm("Do you want to print?"))
- {
- var values = document.getElementById(strid);
- var printing =
- window.open('','','left=0,top=0,width=550,height=400,toolbar=0,scrollbars=0,sta?tus=0');
- printing.document.write(values.innerHTML);
- printing.document.close();
- printing.focus();
- printing.print();
- printing.close();
- }
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement