/var/www/hkosl.com/innoutstorage/webadmin/product_detail_show_index.php


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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php require_once ("check_login.php"); ?>
<?php 
require_once("head.php"); ?>
    <!-- Main Menu -->
    <link rel="stylesheet" type="text/css" href="css/menu.css"/>
    <script type="text/javascript" src="js/ddaccordion.js"></script>
    <script type="text/javascript" src="js/menuddaccordion.js"></script>
</head>

<body>
<table width="1000" height="600" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="200" align="left" valign="top">
            <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td height="70" align="left" valign="middle">&nbsp;</td>
                </tr>
                <tr>
                    <td width="200" align="left" valign="top"><!-- Main Menu -->
                        <?php require("menu.php");?><!-- End Main Menu --></td>
                </tr>
            </table>
        </td>
        <td width="800" align="left" valign="top">
            <table width="800" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <table width="800" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td height="70" class="pagetitletxt">&nbsp;&nbsp;</td>
                                <td width="50" align="center" class="icontxt">
                                    </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="pagetitletxt">
                        &nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/> Product
                            Sorting (All Product) </b></td>
                </tr>
                <tr>
                    <td height="25" align="left" valign="middle" class="msg"><?php if (!empty($_GET["msg"])) echo $_GET['msg']; ?></td>
                </tr>

                <tr>
                    <td align="left" valign="middle">
                        <form name="form1" method="post" action="product_detail_show_index_sort_update.php">

                            <table width="800" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="10" class="listtitletxt"></td>
                                    <td width="40" class="listtitletxt">Sort</td>
                                    <td width="60" class="listtitletxt">Code</td>
                                    <td width="400" class="listtitletxt">Product Name</td>
                                </tr>
                                <?php

                                    $sql2 
"SELECT * FROM pro_product pd INNER JOIN pro_product_category pdc ON pd.productid = pdc.productid WHERE pd.deleted = ? and pd.old_record = ? group by pdc.productid ORDER BY pd.all_product_sort ASC ";
                                    
$parameters2 = array("0""0");
                                    
$row_array bind_pdo($sql2$parameters2"selectall");

                                    if (
count($row_array) < 0) {
                                        exit;
                                    }

                                    foreach (
$row_array as $row) {

                                        
$sql3 "select * from pro_product_sku where deleted = ? and old_record = ? and productid = ?";
                                        
$parameters3 = array("0""0"$row{'productid'} );

                                        
$row3_array bind_pdo($sql3$parameters3"selectall");

                                        
$cntsku count($row3_array);

                                        print 
"<tr>";
                                        print 
"<td class='listtxt' style='padding-left:5'>&nbsp;</td>";

                                        print 
"<td class='listtxt' valign='middle' align='left'><input class='sortinput' type='text' name='idarraynumber[]' value='" $row{'all_product_sort'} . "' size='2' /><input type='hidden' name='idarray[]'  value='" $row{'productid'} . "'></td>";

                                        print 
"<td class='listtxt' style='padding-left:5'>" $row{'productitemcode'} . "</td>";

                                        if(!empty(
$row{'productname_tc'})){
                                            print 
"<td class='listtxt' style='padding-left:5'><a href='product_sku_index.php?categoryid=".$row{'categoryid'}."&productid=".$row{'productid'}."'>" $row{'productname_tc'} . "</a> (Total SKU: ".$cntsku.")</td>";


                                        }else{
                                            print 
"<td class='listtxt' style='padding-left:5'></td>";
                                        }

                                        print 
"</tr>";


                                    } 
//End while product

                                    
$dbh null;
                                
?>
                            </table>


                                <input type="submit" value="Update Sort">

                        </form>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</body>
</html>