/home/mjc1/public_html/html/adminmobile/manage/menu2.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<? session_start(); ?>
<?
include_once("./_common.php");
    if( 
$apsid == "" ){ 
?>
<SCRIPT LANGUAGE='JavaScript'> 
    alert("·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "./intro.php";
</script>
<? }

//    $admin = str_replace("admin+","",$adminid);
 
include("./commonST.php");
?>
<SCRIPT LANGUAGE="JavaScript">
    
    function garagesearch(){
        var garage = document.getElementById("garage").value;
        var minhold = document.getElementById("minhold");
        if (minhold.checked == true)
        {
            var min = 1;
        } else {
            var min = 2;
        }
        location.href = "menu2.php?mode=search&garage="+garage+"&minhold="+min+"";
    }
</SCRIPT>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<META http-equiv=Content-Type content="text/html; charset=euc-kr">
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width" />

<head>

<title>õ³â°æ¿µ Mobile</title>
<link rel="shortcut icon" href="http://www.mijinsoft.co.kr/mijin2.ico" type="image/icon" />
<link rel="apple-touch-icon-precomposed" href="http://www.mijinsoft.co.kr/html/mobile/img/homeicon.png" />
<link href="http://www.mijinsoft.co.kr/html/adminmobile/css/common.css" rel="stylesheet" type="text/css" />
<!-- <script language='javascript' src='/js/prototype.js'></script>
<script language='javascript' src='/js/default.js'></script>
<script language='javascript' src='/js/miya_validator.js'></script> -->
</head>
<body bgcolor="#efefef">
 
<div id="wrap">
 <?
 
/*
        echo $apcount."<br>";    //Á¢¼ÓÀÚ¼öüũ¿ë
        echo $apsid."<br>";        //»ç¾÷ÀÚID
        echo $apsacode."<br>";        //»ç¾÷ÀÚÄÚµå
        echo $apsname."<br>";        //»ç¾÷ÀÚ¸í Äڵ庰·Î Àû¿ë
        echo $apcusid."<br>";    //»ç¿øID
        echo $apcuscode."<br>";    //»ç¿øÄÚµå
         echo $apcusname."<br>";        //»ç¿ø¸í
        echo $apsa_uid."<br>";        //dbÁ¢¼Ó¾ÆÀ̵ð
        echo $apsa_dbip."<br>";    //db¾ÆÀÌÇÇ
        echo $apsa_dbname."<br>";//db¸í
*/
 
?>
    <? include("./topmenu.php"); ?> 




    <div class="snb f_clear">
        <ul>
            <li class="menu1 "><a href="menu1.php">°Å·¡Ã³Á¤º¸</a></li>
            <li class="menu2 on"><a href="menu2.php">»óǰÁ¤º¸</a></li>
            <li class="menu3 "><a href="menu3.php">°Å·¡Á¤º¸</a></li>
        </ul>
    </div>
    <div class="snb_sub">    
                
        <ul podo:else>
            <li class="on"><a href="menu2.php">Àç°íÁ¶È¸</a></li>
            <li class=""><a href="menu2_2.php">»óǰ´Ü°¡</a></li>
        </ul>
    </div>


    <div class="list-wrap">

        <form name="search" method="post" action="menu1.php">
        <table border="0" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" >
            <tr height="38" bgcolor="#696969" class="txt01w" >
                <td align="center" class="bline rline" width="20%">â°í</td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" width="80%">
                                    <select name="garage" id="garage" style="font-size:14px;width:90%;">
                        <!-- <option value="0">Àüüâ°í -->
                    <?
                    
                        $gsql 
"SELECT code, name FROM storehouse WHERE hidden = '0'";
                        
$gresult mysql_query($gsql);
                        while(
$grow mysql_fetch_array($gresult)){
                    
?>
                        <option value="<?=$grow[code]?><? if($garage == $grow[code]) echo "selected"?>><?=$grow[code]?> <?=$grow[name]?>
                    <? ?>
                    </select>
                </td>
            </tr>
            <tr height="38" bgcolor="#ffffff" class="txt01">
                <td align="center" class="bline rline" colspan="2" style="padding: 0 0 0 10px;">
                <input type="checkbox" name="minhold" id="minhold" <? if($minhold == "1") echo "checked"?>> <label for="minhold"> ÀûÁ¤º¸À¯¹Ì´Þ »óǰ¸¸</label>
                </td>
            </tr>
        </table>
        </form>

        <table border="0" cellpadding="0" height="5"><tr><td></td></tr></table>
        <Table width='100%' border='0' cellpadding='0' cellspacing='0' align='center' style="border:1px solid #cccccc;"> 
            <tr height="38" bgcolor="#f0f0f0" class="txt01" style="border:1px solid #cccccc;">

                <td width="33%" align="center">
                    <a href="javascript:garagesearch();"><div class="popbutton">Á¶È¸</div></a>
                </td>
            </tr>
        </Table> 

    <!-- °Å·¡Ã³ °Ë»ö -->
        <? if($mode =="search"){ ?>
        <table border="1" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" bordercolor="#dddddd" style="border-collapse:collapse">
            <tr height="28" bgcolor="#f0f0f0" class="txt01">
                <td width="50%" align="center">»óǰ¸í</td>
                <td width="25%" align="center">Àç°í</td>
                <td width="25%" align="center">ÀûÁ¤º¸À¯</td>
            </tr>
        <?    
            
if ($minhold == "1"){
                
$mincheck "AND i.qnt < p.safeqnt";
            }
            
$i=0;

            
$garagecode "scode=$garage";
            
$osql "SELECT m.name, i.qnt, p.safeqnt, p.safeqntmax
                    FROM ((invn_real AS i INNER JOIN product_d AS p ON (i.pcode = p.pcode)) INNER JOIN product_m AS m ON (i.pcode = m.code)) INNER JOIN storehouse AS s ON (i.scode= s.code)
                    WHERE 
$garagecode AND m.hidden = 0 $mincheck
                    GROUP BY i.pcode
                    ORDER BY m.name"
;
//            echo $osql;
            
$oresult mysql_query($osql);
            while(
$orow  mysql_fetch_array($oresult)){

                
$line $i 2;
        
?>
            <tr height="30" bgcolor="<? if($line == "1"){ echo "#ffffff"; } else { echo "#f7f7f7"; } ?>"  class="txt01nb">
                <td align="left" style="padding:0 0 0 5px;"><?=$orow[name]?></td>
                <td align="left" style="padding:0 0 0 10px;"><?if ($orow[safeqnt] > $orow[qnt]) echo "<font color='#ff0000'>"?> <?=$orow[qnt]?></td>
                <td align="left" style="padding:0 0 0 10px;"><?=$orow[safeqnt]?> ~ <?=$orow[safeqntmax]?></td>
            </tr>
        <? $i++;
            } 
        }
        
?>
        </table>

    </div>
    

</div>
    <div id="footer">
        <!-- <li><a href="./config.php"><img src="./img/common/config_bt.gif" border="0"></a></li> -->
        <li><div class="corp">Copyright ¨Ï Mijinsoft Corp.</div></li>
    </div>

</body>
</html>