1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<? //require 'db_connect.php'; require 'check_login.php'; if ($logged_in <> 1) { header('Location: login.php'); return; } else { ?> <html> <head> <link rel="stylesheet" href="main.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=big5" /> <title>Dynasty Antiques Gallery Limited - Admin Page</title> </head> <body> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td class='content' align="left"><b>Products</b></td> <td class='content' align="right"><a href="productsaddform.php"><img src="images/button_insert.png" alt="Add" border="0"> Add Products</a></td> </tr> </table> <? echo "<p class='content'>". $_GET['msg'] ."</p>"; ?> <table border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" width="310"> <tr><td class="contentsearch" bgcolor="#FFFFFF" width="30" align="center">ID</td> <td class="contentsearch" bgcolor="#FFFFFF" width="150" align="center">Category</td> <td class="contentsearch" bgcolor="#FFFFFF" width="100" align="center">Image</td> <td class="contentsearch" bgcolor="#FFFFFF" width="30" align="center">Delete</td></tr> <?php require("configure.php"); ?> <?php $result = mysql_query("SELECT * FROM products inner join category on products.catid = category.catid order by catname ASC "); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { print "<tr>"; print "<td class='content' bgcolor=#DDDDDD valign='top' style='padding-left:5'>".$row{'productsid'}."</td>"; print "<td class='content' bgcolor=#DDDDDD valign='top' style='padding-left:5'>".$row{'catname'}."</td>"; print "<td class='content' bgcolor=#DDDDDD valign='top' style='padding-left:5'>".$row{'image'}."</td>"; print "<td class='content' bgcolor=#DDDDDD valign='top' align='center'>"; print "<a href='productsimagedelete.php?productsid=".$row{'productsid'}."' border='0'>"; print "<img src='images/btnRemove.gif' border='0' alt='Remove'></a>";
print "</td></tr>"; } mysql_close($dbh); ?> </table> </body> </html> <? } ?>
|