/home/mjc1/public_html/manage/newwinadd.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php
include("./_common2.php"); 
?>
<!DOCTYPE html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
        <title>MacAddress ½Å±Ôµî·Ï</title> 
        <link rel='stylesheet' type='text/css' href='./css/reset.css'>
        <link rel='stylesheet' type='text/css' href='./css/point.css'>
    </head>
    
<?
    
@session_start();
   
Header("P3P: CP='NOI DSP COR IVAa OUR BUS IND UNI COM NAV INT'"); 
   
    if(
$_SESSION['ADMINID'] == ""){
?>

<script>
    location.href = "index.php";
</script>

<?    
    
}
?>

<?  include("./category/opcommon.php"); ?>

<SCRIPT LANGUAGE="JavaScript">
function addnum(){
    var oldwin = window.open( "newwinpop.php?idx="+idx+"", "newpop", "status=0,toolbar=0,resizable=0,scrollbars=no,width=640,height=400" );
}

function searchid(){

    var userid = document.getElementById("userid").value;
    
    if(userid == ""){
        alert("¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä");
        document.getElementById("userid").focus();
        return;
    }
    
    var idwin = window.open( "searchid.php?userid="+userid+"", "iprocess", "status=0,toolbar=0,resizable=0,scrollbars=no,width=640,height=400" );

}

function shuffle(array) { 
    var len = array.length; 
        for(var i=len ; i>0 ; i--) { 
        array[len-1] = array.splice(Math.floor(Math.random() * i),1)[0]; 
    } 
}


function keygenold(){

    var iStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    var n=0;
    var i=0;
    var s="";
    len=12;
    //   alert(iStr.length);
    
    for (x=1;x<=len;x++) {
        n=Math.random()*36;
        i=Math.round(n);
        s+=iStr.charAt(i);
    }
    
    if(s.length < 12){
        s+=iStr.charAt(i);
    }

    document.getElementById("cdkey").value = s;
    //           alert(s.length);
}


function keygen(){
    var keywin = window.open( "newkeygen.php", "iprocess", "status=0,toolbar=0,resizable=0,scrollbars=no,width=640,height=400" );
}


function newsave(){
    
    if(document.getElementById("userid").value == ""){
        alert("ȸ¿øID¸¦ ÀÔ·ÂÈÄ [°Ë»ö] ¹öưÀ» ´©¸£¼¼¿ä.");
        document.getElementById("userid").focus();
        return;
    }
    
    if(document.getElementById("username").value == ""){
        alert("ȸ¿øID¸¦ ÀÔ·ÂÈÄ [°Ë»ö] ¹öưÀ» ´©¸£¼¼¿ä.");
        document.getElementById("userid").focus();
        return;
    }
    
    if(document.getElementById("cdkey").value == ""){
        alert("½ÃµðŰ [»ý¼º] ¹öưÀ» ´©¸£¼¼¿ä.");
        //document.getElementById("userid").focus();
        return;
    }
    
    if(document.getElementById("program").value == "0"){
        alert("ÇÁ·Î±×·¥À» ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
        document.getElementById("program").focus();
        return;
    }
    /*
    if(document.getElementById("price").value == "0"){
    alert("ÆÇ¸Å±Ý¾×À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
    document.getElementById("price").focus();
    return;
    }
    */
    newaddform.submit();

}

function enddayProcess(cde){
    if (cde == "none"){ //¼±ÅÃÇϼ¼¿ä´Â ¸¸·áÀÏ Áö¿ò
        document.getElementById("endday").value = '';
    } else {
        var keywin = window.open( "newendday.php?cde="+cde+"", "iprocess", "" );
    }
}
 </script>
 
<body>
    <div class="wrap">
        <h2>ÀÎÁõ¹øÈ£Ãß°¡</h2>

        <form name='newaddform' method="post" target="iprocess" action="newaddProcess.php">
        <div class="columnWarp">
            <table class="columnTable">
                <tr>
                    <th>ȸ¿øID</th>
                    <td><input type="text" name="userid" id="userid"> <img src="./images/common/btn_save.png" alt="°Ë»ö" onclick="searchid();"></td>
                </tr>
                <tr>
                    <th>ȸ»ç¸í[À̸§]</th>
                    <td><input type="text" name="username" id="username" readonly class="gray"></td>
                </tr>
                <tr>
                    <th>CD-KEY</th>
                    <td><input type="text" name="cdkey" id="cdkey" readonly class="gray"> <img src="./images/common/btn_generate.png" alt="»ý¼º" onclick="keygen();"></td>
                </tr>
                <tr>
                    <th>ÇÁ·Î±×·¥</th>
                    <td>
                        <select name='program' id="program" onchange="enddayProcess(this.value);">
                            <option value="none"  <? if($SearchMdiv == 'none'){ echo "selected"; } ?>>¼±ÅÃÇϼ¼¿ä</option>
        <? 
            $osql 
"SELECT cde, cde_alias, flag4 FROM codes WHERE flag4 != '' ORDER BY flag4";
            
$oresult mysql_query($osql);
            
                while(
$orow mysql_fetch_array($oresult)){
        
?>
                            <option value="<?=$orow['cde']?>"><?=$orow['cde_alias']?></option>
        <? ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>¸¸·áÀÏÀÚ</th>
                    <td><input type="text" name="endday" id="endday" readonly> ÀÏ</td>
                </tr>
                <tr>
                    <th>¶óÀ̼¾½º</th>
                    <td><input type="text" name="pgnum" id="pgnum" value="1"> ´ë</td>
                </tr>
                <tr>
                    <th>PDA/õSÁ¶È¸Àü¿ë</th>
                    <td><input type="text" name="pdanum" id="pdanum" value="0"> ´ë</td>
                </tr>
                <tr>
                    <th>ÆÇ¸Å±Ý¾×</th>
                    <td><input type="text" name="price" id="price"> ¿ø</td>
                </tr>
                <tr>
                    <th class="last">ºñ°í</th>
                    <td class="last"><input type="text" name="bigo" id="bigo"></td>
                </tr>
            </table><!--//columnTable-->
        </div><!--//columnWarp-->
        </form>


        <div class="btn2Warp">
            <img src="./images/common/btn_mac_save.png" alt="ÀúÀå" onclick="newsave();"><img src="./images/common/btn_close.png" alt="´Ý±â"  onclick="javascript:self.close();" class="ml10">
        </div>


        <iframe name="iprocess" width="600" height="1" style="border:0px;"></iframe>

    </div><!--//wrap-->
</body>
</html>