|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/www/admin/ |
Upload File : |
<?include $_SERVER['DOCUMENT_ROOT']."/admin/adminTopMenu.html";?>
<script type="text/javascript">
function validate()
{
if(!frm.name){
alert("타이틀을 입력하세요");return;
}
}
function go_List() {
var f = document.form;
f.action = 'storeList.php';
f.submit();
}
function makeInput(strNum) {
var tempInput = "";
if( strNum < 6){
for(var i=1;i <= strNum; i++) {
tempInput += ". 타입 : <input type='text' name='deliname[]' size='30' /> 가격 : <input type='text' name='deliprice[]'><br><br>\n";
}
}else{
alert("5개를 초과하셨습니다.");
}
document.getElementById("make").innerHTML = tempInput;
}
;(function($){
$(document).ready(function(){
// var imgs = $('input[name=conImg]').length;
$('div#file_make input').bind('click',function(){
//imgs = (imgs+1);
$(this).before("옵션명: <input type='hidden' name='opt_uid[]' class='form-control'> <input type='text' name='optName[]' placeholder='옵션명' class='form-control'>가격:<input type='text' name='optPrice[]' placeholder='가격' class='form-control'>재고: <input type='text' name='optStock[]' placeholder='재고' class='form-control' style='width:20%'><br />");
return false;
});
$("input[name=option_chk]").bind('click',function(){
checkOption();
});
function checkOption(){
var option_val = $("input[name=option_chk]:radio:checked").val();
if( option_val =='Y' ){
$("#option_field").show();
return true;
}else{
$("#option_field").hide();
return true;
}
}
checkOption();
});
})(jQuery);
</script>
<div id="contents">
<?
$tableName="shop";
if($idx){
$qry = "SELECT * FROM shop_product where uid='$idx'";
$result= mysql_query($qry,$db_con);
$row = mysql_fetch_array($result);
$category = $row[category];
$loginDate = substr($row[logindate],0,10);
$regDate = substr($row[cdate],0,10);
$subject = stripslashes($row[subject]);
$contents = stripslashes($row[contents]);
$naviChkName = "수정";
$mode = "proc";
//옵션 내용 가져오기
$qry3 = "SELECT * FROM shop_product_opt WHERE product_prt = '$idx'";
$result3= mysql_query($qry3,$db_con);
while($row3 = mysql_fetch_array($result3))
{
$option_field .="
<input type='hidden' name='opt_uid[]' value='$row3[uid]' class='form-control'>
옵션명:<input type='text' name='optName[]' value='$row3[optName]' placeholder='옵션명' class='form-control'>
가격:<input type='text' name='optPrice[]' value='$row3[optPrice]' placeholder='가격' class='form-control'>
재고:<input type='text' name='optStock[]' value='$row3[amount]' placeholder='재고' class='form-control' style='width:20%'><br/>
";
}
if(!$option_field){
$option_field="
<input type='text' name='optName[]' value='' placeholder='옵션명' class='form-control'>
<input type='text' name='optPrice[]' value='' placeholder='가격' class='form-control'>
<input type='text' name='optStock[]' value='' placeholder='재고' class='form-control' style='width:20%'>
";
}
}else{
$naviChkName = "등록";
$mode = "";
$option_field="
<input type='text' name='optName[]' value='' placeholder='옵션명' class='form-control'>
<input type='text' name='optPrice[]' value='' placeholder='가격' class='form-control'>
<input type='text' name='optStock[]' value='' placeholder='재고' class='form-control' style='width:20%'>
";
}
?>
<h2>상품 등록</h2>
<div id="content">
<form name="form" method="post" target="_self" onsubmit="return false;" >
<input type="hidden" name="page" value="1">
<input type="hidden" name="totalRow" value="22" >
<input type="hidden" name="searchType" value="">
<input type="hidden" name="searchStr" value="">
<input type="hidden" name="searchGroup" value="">
<input type="hidden" name="lang_code" value="KO">
</form>
<form name="frm" method="post" action="./Proc/store_proc.php" onsubmit="return validate();" enctype="multipart/form-data">
<input type="hidden" name="fd" value="post">
<input type="hidden" name="module_name" value="shop">
<input type="hidden" name="inputtype" value="">
<input type="hidden" name="idx" value="<?=$idx?>">
<input type="hidden" name="mode" value="<?=$mode?>">
<input type="hidden" name="act" value="<?=$act?>">
<table class="write" summary="관리자모드 게시판입니다" cellspacing="0">
<colgroup>
<col width="120" />
<col />
</colgroup>
<tbody>
<tr>
<th>회원유무</th>
<td>
<select name='category'>
<option value='0' <?if($category == '0'){ echo "selected";}?>>유료회원만</option>
<option value='1' <?if($category == '1'){ echo "selected";}?>>무료회원만</option>
<option value='2' <?if($category == '2'){ echo "selected";}?>>유무료둘다</option>
</select>
</td>
</tr>
<tr>
<th>상품명</th>
<td><input type="text" name="name" class="title" value="<?=$row[name]?>"/></td>
</tr>
<tr>
<th>부가정보</th>
<td><input type="text" name="addinfo" class="title" value="<?=$row[addinfo]?>"/></td>
</tr>
<tr>
<th>업체</th>
<td><input type="text" name="maker" value="<?=$row[maker]?>"/></td>
</tr>
<tr>
<th>판매일</th>
<td><input type="text" name="start_date" value="<?=$row[start_date]?>"/></td>
</tr>
<tr>
<th>발매예정일</th>
<td><input type="text" name="model" value="<?=$row[model]?>"/></td>
</tr>
<tr>
<th>등록사진</th>
<td><input type="file" name="thumnail"/>
<?
$tableName="shop";
$imgName = get_db("select original_name from files where module_no = '$idx' and module_name='$tableName' and order_by='1'");
if($imgName){
echo "<br>".$imgName."";
//echo "<input type='hidden' name='old_thumnail' value='$imgName'>";
}
?>
</td>
</tr>
<tr>
<th>관리자 정산메뉴</th>
<td>
<input type="checkbox" name="namekey" id="display_4" value="Y" <?if($row[namekey]=="Y") echo"checked";?>/><label for="display_4">메뉴 보이게</label>
메뉴명 : <input type="text" value="<?=$row[brand]?>" name="brand" />
</td>
</tr>
<tr>
<th>옵션</th>
<td>
<?=$option_field?>
<div id='file_make'><input type='button' value='추가'/></div>
</td>
</tr>
<tr>
<th>판매가격</th>
<td><input type="text" value="<?=$row[price]?>" name="price" />엔 (시중가<input type="text" value="<?=$row[price1]?>" name="price1"/>엔)
환율 :<input type="text" value="<?=$row[shop_rate]?>" name="shop_rate" size="5"/>
</td>
</tr>
<tr>
<th>판매상태</th>
<td>
<input type="radio" name="display" id="display_1" value="0"<?if($row[display]==0 ||$row[display]=='') echo"checked";?>/><label for="display_1">정상판매</label>
<input type="radio" name="display" id="display_2" value="1" <?if($row[display]==1) echo"checked";?>/><label for="display_2">노출미정</label>
<input type="radio" name="display" id="display_3" value="2" <?if($row[display]==2) echo"checked";?>/><label for="display_3">노출중단</label>
<input type="radio" name="display" id="display_3" value="3" <?if($row[display]==3) echo"checked";?>/><label for="display_3">판매마감</label>
| 재고량 : <input type="text" name="stock_num" value="0" size="4" class="input" maxlength="5" onkeydown="numFormat(this);" onkeypress="numFormat(this);" />
<input type="checkbox" name="stock" id="display_4" value="1" /><label for="display_4">재고관리</label>
</td>
</tr>
<!--tr>
<th>상품옵션</th>
<td>
<input type="radio" name="_option_chk" id="_option_chk2" value="0" checked="checked" onclick="useOptionFlag(0);" /><label for="_option_chk2">미사용</label>
<input type="radio" name="_option_chk" id="_option_chk1" value="1" onclick="useOptionFlag(1);" /><label for="_option_chk1">사용</label>
</td>
</tr-->
<tr>
<th>배송개수</th>
<td><input type="text" name="delicnt" onkeyup="javascript:makeInput(this.value)" value="<?=$row[deli]?>"/></td>
</tr>
<tr>
<th>배송방법</th>
<td>
<?
$QUERY_PAGE = "SELECT * FROM shop_deli where product = '$idx'";
$results= mysql_query($QUERY_PAGE,$db_con);
$totals = mysql_affected_rows();
for($i=0; $i<$totals; $i++) {
$rows = mysql_fetch_array($results);
echo ". 타입 : <input type='text' name='deliname[]' value='".$rows[deliName]."' size='30' /> 가격 : <input type='text' name='deliprice[]' value='".$rows[deliPrice]."'><a href='javascript:go_FileDel(".$rows[uid].");'><img src='/admin/images/out.png'></a>";
echo "<br><br>";
}
?>
<div id="make"></div></td>
</tr>
<tr>
<th>Contents</th>
<td>
<textarea cols="60" id="editor_kama2" name="mainContent" rows="10"><?=stripslashes($row[content])?></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'editor_kama2',
{
skin : 'kama',
enterMode : 2,
shiftEnterMode : 3,
width: '650',
language : 'ja',
//filebrowserBrowseUrl : '/browser/browse.php',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
//filebrowserWindowWidth : '640 ',
//filebrowserWindowHeight : '480'
});
//]]>
</script>
</td>
</tr>
<tr>
<th>delivery Contents</th>
<td>
<textarea cols="60" id="editor_kama3" name="deli_content" rows="10"><?=stripslashes($row[deli_content])?></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'editor_kama3',
{
skin : 'kama',
enterMode : 2,
shiftEnterMode : 3,
width: '650',
language : 'ja',
//filebrowserBrowseUrl : '/browser/browse.php',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
//filebrowserWindowWidth : '640 ',
//filebrowserWindowHeight : '480'
});
//]]>
</script>
</td>
</tr>
<tr>
<th>change Contents</th>
<td>
<textarea cols="60" id="editor_kama4" name="change_content" rows="10"><?=stripslashes($row[change_content])?></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'editor_kama4',
{
skin : 'kama',
enterMode : 2,
shiftEnterMode : 3,
width: '650',
language : 'ja',
//filebrowserBrowseUrl : '/browser/browse.php',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
//filebrowserWindowWidth : '640 ',
//filebrowserWindowHeight : '480'
});
//]]>
</script>
</td>
</tr>
<tr>
<th>입금 안내 메일</th>
<td>
<textarea cols="60" id="editor_kama5" name="mail1" rows="10"><?=stripslashes($row[mail1])?></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'editor_kama5',
{
skin : 'kama',
enterMode : 2,
shiftEnterMode : 3,
width: '650',
language : 'ja',
//filebrowserBrowseUrl : '/browser/browse.php',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
//filebrowserWindowWidth : '640 ',
//filebrowserWindowHeight : '480'
});
//]]>
</script>
</td>
</tr>
<tr>
<th>입금 완료 메일</th>
<td>
<textarea cols="60" id="editor_kama6" name="mail2" rows="10"><?=stripslashes($row[mail2])?></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'editor_kama6',
{
skin : 'kama',
enterMode : 2,
shiftEnterMode : 3,
width: '650',
language : 'ja',
//filebrowserBrowseUrl : '/browser/browse.php',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
//filebrowserWindowWidth : '640 ',
//filebrowserWindowHeight : '480'
});
//]]>
</script>
</td>
</tr>
</tbody>
</table>
<div class="btn">
<!--
<input type="button" value="임시저장" class="btn_blue" />
<input type="button" value="미리보기" class="btn_blue" />
-->
<input type="submit" value="<?=$naviChkName?>하기" class="btn_red" />
<a href="javascript:go_List();" class="btn_blue">목록보기</a>
</div>
</form>
</div>
</div>
<p></p>
</body>
</html>