shop-wiz logo
Follow Us on Facebook Follow Us on Google+ Follow Us on Twitter Follow Us on LinkedIn
제목 php 6.4.7 버전에 옵션설정이 안됩니다.
등록일 2011.12.05 HIT 14559 작성자 위즈몰 팬
안녕하세요!

이런 훌륭한 솔루션을 만드셔서 무료로 배포하시다니 대단하세요!
존경 스럽습니다.

위즈몰을 이용해서 홈피를 구축하는 중인데요.
상품등록시 옵션설정이 제대로 되지 않는 문제가 있습니다.

옵션값, 가격, 재고를 모두 입력하고 설정을 완료하면 다른 정보는 다 제대로 저장되는데
옵션값, 가격, 재고 부분은 저장이 되지 않고 있습니다.

DB에도 값이 안들어가더라구요.

숍위즈에 있는 테스트 사이트도 마찬가지네요.
확인 부탁드립니다.
댓글보기
최창렬 좋은 소스로 쇼핑몰 개발하는데 많은 도움이 되고 있습니다. 

관리자님의 허락없이 이렇게 글을 올려도 되는지 모르겠네요. 

product1.php 파일을 아래로 바꾸시면 잘 될겁니다. 

그럼 즐거운 하루 되십시오.

<?
/* 
powered by 폰돌
Reference URL : http://www.shop-wiz.com
Contact Email : master@shop-wiz.com
Free Distributer : 
Copyright shop-wiz.com
*** Updating List ***
*/

## html 편집기 사용시 현재 폴더에 임시 폴더를 넣어둔다.

$htmleditimgfolder=session_id();

if ($query == 'qde') {   //이미지 택일 삭제옵션시 실행    
    $admin->pd_img_delete($uid, $idx);
    $common->js_location("$PHP_SELF?menushow=$menushow&theme=$theme&mode=$mode&uid=$uid&cp=$cp");
}else if ($query == 'qin' || $query == 'qup') {//Insert 실행
    include "../lib/class.image.php";
    $Image = new Image();//이미지 클라스 사용
    $common->Image($Image);

    $Name = addslashes(chop($Name));
    $Model = addslashes(chop($Model));
    if($Category3) $Category = $Category3;
    else if($Category2) $Category = $Category2;
    else if($Category1) $Category = $Category1;
    else $common->js_alert("카테고리가 설정되지 않았습니다.");
    
    $des_type1 = $des_type1 ? $des_type1 : 0;//Description1 텍스트 타입0:html 미적용, 1:html적용
    $des_type2 = $des_type2 ? $des_type2 : 0;
    $des_type3 = $des_type3 ? $des_type3 : 0;
    $TextType = $des_type1."|".$des_type2."|".$des_type3;
        
    $Description1=$common->puttrimstr($Description1, $des_type1);
    $Description2=$common->puttrimstr($Description2, $des_type2);
    $Description3=$common->puttrimstr($Description3, $des_type3);

    ## 등록 옵션 입력하기 
    unset($Regoption);
    for($i=0; $i < count($RegOptionArr); $i++){
        if(!$Multi_Regoption[$i]) $Multi_Regoption[$i] = "0";
        $Regoption .= $Multi_Regoption[$i]."|";
    }
            
    if($query == "qin"){
        $Date = time();
        ## 상품이미지 올리기
        if($watermark){
            $admin->watermark = $watermark;//워트마크 생성여부 
            if($watermark == "text"){
                $admin->watermark_text = $watermark_text;
                $admin->watermark_font = "arial.ttf";
            }else if($watermark == "img"){
                $admin->watermark_img = $watermark_img;
            }
        }
        $rtnfile = $admin->pd_img_up("insert", "file", $Category, $copyimg);

        ## PID를 구한다.
        $MaxUID = $dbcon->get_one("select max(UID) from wizMall");
        if(!$MaxUID) $uid = 1; else $uid = $MaxUID+1;
        
        ## html편집기에서 이미지가 첨부되었을 경우 경로수정 및 파일 이동
        $Description1 = $admin->htmleditorImg($Description1, $uid);
        $source    = "../config/tmp_upload/".session_id();
        $common->RemoveFiles($source);
        
        ##  쿼리문 시작
        $QUERY1 = "INSERT INTO wizMall (
        UID,PID,Name,Brand,CompName,Price,Price1,WongaPrice,Point,Unit,Model,Regoption,SimilarPd,
        Picture,None,Output,Stock,Date,Description1,Description2,Description3,Category,TextType,Hit,GetComp,opflag)
        VALUES(
        '$uid','$uid','$Name','$Brand','$CompName','$Price','$Price1','$WongaPrice','$Point','$Unit','$Model','$Regoption',
        '$SimilarPd','".$rtnfile[1]."','$None','$Output','$Stock','$Date','$Description1','$Description2','$Description3','$Category','$TextType',
        '$Hit','$GetComp', '$cobuy')";
        $dbcon->_query($QUERY1);

        $mall->insertPdCnt($Category);##카테고리별 상품갯수 입력
        
        $admin->MultiInsert($uid, $TmpMultiCategoryvalue);//다중카테고리 입력
    
        $admin->input_mallext($uid, $_POST);//확장 필드 입력

        $admin->input_imgtable($uid, $rtnfile);//이미지 테이블에 이미지 명 입력

        
    ## 재고수량이 기입되었을 경우 재고수량을 입력한다.
        if($Stock){
            $Iinputdate = time();
            $sqlstr = "INSERT INTO wizInputer (Icomid, Igoodscode, Iinputqty,Iinputdate) VALUES('$Icomid', '$uid', '$Stock', '$Iinputdate')";
            $dbcon->_query($sqlstr);
        }
        
    
    ## 등록 옵션 입력하기
        if($optioncnt){
            $oorder=0;
            foreach($opname as $key=> $value){
                $ropflag = $opflag[$key];
                $sqlstr = "insert into wizMalloptioncfg (opid, oname, oorder, oflag) values ('$uid', '$value', '$oorder', '$ropflag')";
                $dbcon->_query($sqlstr);
                $ouid = $dbcon->_insert_id();
                $oorder++;
                
                if($opcnt[$key]){
                    foreach($optioneachname[$key] as $key1=>$value1){
                        $roprice = $optioneachprice[$key][$key1];
                        $roqty = $optioneachqty[$key][$key1];
                        $sqlstr = "insert into wizMalloption (ouid,oname,oprice,oqty) values ('$ouid', '$value1', '$roprice', '$roqty')";
                        //echo $sqlstr;
                        $dbcon->_query($sqlstr);
                    }            
                }
            }
        }
        
        ## 공동구매등록
        if($cobuy == "c"){
            $c_sdate = mktime(0,0,0, $SMonth, $SDay, $SYear);
            $c_fdate = mktime(0,0,0, $FMonth, $FDay, $FYear);
            $admin->coorbuy("insert", $uid, $c_sdate, $c_fdate, $c_price, $c_qty);
        }

        $common->js_confirm("동종 상품 추가등록을 하시겠습니까?", "history.go(-1)", "$PHP_SELF?menushow=$menushow&theme=$theme&Category=$Category");
    }else if ($query == 'qup') {//update 실행

        ## html편집기에서 이미지가 첨부되었을 경우 경로수정 및 파일 이동
        $Description1 = $admin->htmleditorImg($Description1, $uid);
        $source    = "../config/tmp_upload/".session_id();
        $common->RemoveFiles($source);

        ## 상품이미지 올리기
        $rtnfile = $admin->pd_img_up("update", "file", $Category, $copyimg, $c_category, $uid);

        /* omit 된 내용 : Output = '$Output', Stock = '$Stock',*/
        $sqlstr = "UPDATE wizMall SET
        PID = '$uid',
        Name = '$Name',
        Brand = '$Brand',
        CompName = '$CompName',
        Price = '$Price',
        Price1 = '$Price1',
        WongaPrice = '$WongaPrice',
        Point = '$Point',
        Unit = '$Unit',
        Model = '$Model',
        Regoption = '$Regoption',
        SimilarPd = '$SimilarPd',
        Picture = '".$rtnfile[1]."',
        None = '$None',
        Description1 = '$Description1',
        Description2 = '$Description2',
        Description3 = '$Description3',
        Category = '$Category',
        TextType = '$TextType',
        Hit = '$Hit',
        GetComp = '$GetComp' WHERE UID='$uid'";
        $dbcon->_query($sqlstr);
        
        $admin->input_mallext($uid, $_POST);//확장 필드 입력
    
        
        $mall->insertPdCnt($c_category, "delete");##카테고리별 상품갯수 삭제
        $mall->insertPdCnt($Category);##카테고리별 상품갯수 입력
        
        $admin->MultiInsert($uid, $TmpMultiCategoryvalue);## 다중카테고리 입력
    
        $sqlstr = "UPDATE wizInputer SET
        Iinputprice = '$Iinputprice',
        Iunit = '$Iunit',
        Icomid= '$GetComp'
        WHERE Igoodscode='$uid'";
        $dbcon->_query($sqlstr);
    
        $admin->input_imgtable($uid, $rtnfile);//이미지 테이블에 이미지 명 입력
        
        ##삭제되는 값의 존재 여부 확인이 어려우므로 모두 삭제하고 새로 입력한다.
        $sqlstr = "select uid from wizMalloptioncfg where opid = '$uid'";
        $qry=$dbcon->_query($sqlstr);
        while($list = $dbcon->_fetch_array($qry)):
            $ouid = $list["uid"];
            $substr = "delete from wizMalloption where ouid = '$ouid'";
            $dbcon->_query($substr);
        endwhile;

        $sqlstr = "delete from wizMalloptioncfg where opid = '$uid'";
        $dbcon->_query($sqlstr);
        
        ## 옵션 명이 있을 경우 옵션입력을 시작한다.
        if(is_array($opname)){
            $oorder=0;
            foreach($opname as $key=> $value){
                $ropflag = $opflag[$key];
                $sqlstr = "insert into wizMalloptioncfg (opid, oname, oorder, oflag) values ('$uid', '$value', '$oorder', '$ropflag')";
                //echo $sqlstr."<br />";
                $dbcon->_query($sqlstr);
                $ouid = mysql_insert_id();
                $oorder++;
                 
                
                if(is_array(${"optioneachname".$key})){
 
                    foreach(${"optioneachname".$key} as $key1=>$value1){
                        $roprice = ${"optioneachprice".$key}[$key1];
                        $roqty = ${"optioneachqty".$key}[$key1];
                        $sqlstr = "insert into wizMalloption (ouid,oname,oprice,oqty) values ('$ouid', '$value1', '$roprice', '$roqty')";
                        //echo $sqlstr."<br />";
                        $dbcon->_query($sqlstr);
                    }            
                }
            }
        }
                    
        ## 공동구매등록
        if($cobuy == "c"){
            $c_sdate = mktime(0,0,0, $SMonth, $SDay, $SYear);
            $c_fdate = mktime(0,0,0, $FMonth, $FDay, $FYear);
            $admin->coorbuy("update", $uid, $c_sdate, $c_fdate, $c_price, $c_qty);
        }
        
        if ($back == 'none') {  //이부분은 품절상품관리 화면으로 넘어갈때 사용
            echo "<html>
            <META http-equiv=\"refresh\" content =\"0;url=$PHP_SELF?menushow=$menushow&theme=product/product4\">
            </html>";
            exit;
        }else{// 아래는 걍 제품수정에서 넘어갈때입니다.
            echo "<html>
            <META http-equiv=\"refresh\" content =\"0;url=$PHP_SELF?menushow=$menushow&theme=product/product2&cp=$cp&category=$s_category&where=$where&keyword=$keyword&OPTI_LIST=$OPTI_LIST&sort=$sort&sort1=$sort1&sort2=$sort2&sorting=$sorting\">
            </html>";
            exit;
        }    
    }  
}


if ($uid) { /* 상품 목록을 wizMall Table에서 가져옮 */
    $sqlstr = "SELECT m.*,c.PriceQty,c.SDate,c.FDate FROM wizMall m left join wizcoorbuy c on m.UID=c.PID WHERE m.UID='$uid'";
    $dbcon->_query($sqlstr);
    $list = $dbcon->_fetch_array();
    $list["Name"]            = stripslashes($list["Name"]);
    $list["CompName"]        = stripslashes($list["CompName"]);
    $list["Description1"]    = stripslashes($list[Description1]);
    $list["Description2"]    = stripslashes($list[Description2]);
    $list["Description3"]    = stripslashes($list[Description3]);
    $list["Model"]        = stripslashes($list[Model]);
    $Picture            = split("\|",$list[Picture]); 
    $imgFolder            = substr($list["Category"], -3);
    $SimilarPd            = split("\|",$list[SimilarPd]); 
    $des_type            = split("\|", $list["TextType"]);
    $des_type1            = $des_type[0];
    $des_type2            = $des_type[1];
    $des_type3            = $des_type[2];
    
    ## 공동구매 관련 정보
    $priceQty            = split("\|\|", $list["PriceQty"]);
    foreach($priceQty as $key=>$value){
        $p_qty[$key]    = split(":", $value);
    }
    $SDate                = $list["SDate"];
    $FDate                = $list["FDate"];    
    
    /* 상품재고 및 기타 상품 공급처에 관한 정보를 가져옮 */
    $inputsqlstr = "select Iinputprice, Iunit from wizInputer where Igoodscode='$uid'";
    $inputsqlqry = $dbcon->_query($inputsqlstr);
    $inputlist = $dbcon->_fetch_array($inputsqlqry);
    
    /* 기타이미지 가지고 옮 */
    ## max key 값 가져오기
    $sqlstr = "select max(orderid) from wizMall_img where pid = '$uid'  and opflag= 'm' order by orderid asc";
    $max_value = $dbcon->get_one($sqlstr);

    $sqlstr = "select filename, orderid from wizMall_img where pid = '$uid' order by orderid asc";
    $dbcon->_query($sqlstr);
    while($imglist = $dbcon->_fetch_array()):
        $filename = $imglist["filename"];
        $orderid = $imglist["orderid"];
        $fileimg[$orderid] = $filename;
    endwhile;
    $mode = "qup";
}else{
    $mode = "qin";
}
?>
<script  language="javascript" src="../js/jquery.plugins/selectboxes.js"></script>
<script  type="text/javascript">
<!--
$(function(){
    // 더리뷰 검색 소분류
    /*
    $("#s_cat").change(function(){
        var cate = this.value;

        $.post(
            "/admin/thereview/get_second_cate", 
            { 
                'cate' : cate,
                'ajax' : 'true'
            },
            function(data){
                $("#s_cat1").removeOption(/./);
                if (data.sCate) {
                    $.each(data.sCate, function(index, value){
                        $("#s_cat1").addOption(index, value, false);
                    });
                }
            }, 
            "json"
        );
    });
    */
});
//-->
</script>
<link href="../js/Smart/css/default.css" rel="stylesheet" type="text/css" />
<script  type="text/javascript" src="../js/Smart/js/HuskyEZCreator.js" charset="utf-8"></script>
<script  language="javascript">
<!--
function getCategory(v, step) {
    if(step == 1) $("#Category2").removeOption(/./);
    else if(step == 2) $("#Category3").removeOption(/./);
        $.ajax({
        
            type: "GET",
            url: "./product/search_category.php",
            data: "value="+v.value+"&step="+step,//특정변수값을 주어서 결과를 받을때
            dataType: "xml",
            success: function(xml) {
                $(xml).find('item').each(function(){
                    var cat_no = $(this).find('cat_no').text();
                    var cat_name = $(this).find('cat_name').text();
                    if(step == 1) $("#Category2").addOption(cat_no, cat_name, false);
                    else if(step == 2) $("#Category3").addOption(cat_no, cat_name, false);    
                    
                }); //close each(
            }//close function(xml)
        }); //close $.ajax(

} //close $(


function checkForm(f) {
    var MultiCategorylen = f.TmpMultiCategory.length;
    var TmpMultivalue = '';        
    var tmparr = "";

    oEditors.getById["ir1"].exec("UPDATE_IR_FIELD", []);
    
    for(var i=0; i< MultiCategorylen; i++){
        if(f.TmpMultiCategory.options[i]) TmpMultivalue += f.TmpMultiCategory.options[i].value + '|';
    }
    f.TmpMultiCategoryvalue.value = TmpMultivalue;
            
    if(!f.tmpSimilarPd) tmpSimilarPd = new Array(); 
    if ( f.Category1.value.length == 0 ) {
        alert( '등록할 카테고리를 선택해주세요' );
        f.Category1.focus();
        return false;
    }else if ( f.Name.value.length == 0 ) {
        alert( '상품의 이름을 입력해주세요' );
        f.Name.focus();
        return false;
    }else if ( f.Price.value.length == 0 ) {
        alert( '상품의 판매가를 입력해주세요' );
        f.Price.focus();
        return false;
    }else{
        if(f.tmpSimilarPd){
            var tmpSimilarPdlen = f.tmpSimilarPd.length
            for (i = 0; i < tmpSimilarPdlen; i++){
                tmparr = tmparr +"|"+f.tmpSimilarPd[i].value;
            }
            f.SimilarPd.value = tmparr
        }
    }
}
//-->
</script>
<script >
<!--
function MultiCategorySelect(selObj){
    var f=document.writeForm
    var aIdx=f.TmpMultiCategory.options.length;
    var str=selObj.options[selObj.selectedIndex].text;
    var itm= new Option(str)
    if(aIdx >= 5){
        window.alert('5개이상 카테고리 적용은 불가능합니다.');//이부분 풀어주시면 무한대.
        return false;
        exit;
    }
    f.TmpMultiCategory.options[aIdx] = itm;
    f.TmpMultiCategory.options[aIdx].value = selObj.options[selObj.selectedIndex].value
}

function DeleteMultiCat(sel){
    var f=document.writeForm
    var selectedIndexNo = sel.selectedIndex;
    sel.options[sel.selectedIndex]=null;
}

function addToPIC()
{
 var oID = document.getElementById('nameToDiv');

  var item = document.createElement("input");
  item.setAttribute('type','file');
  item.setAttribute('name','file[]');
  item.setAttribute('class','dd1');
  oID.appendChild(item);
  
/*
기존 IE 용
    nameToDiv.insertAdjacentElement("BeforeEnd",document.createElement("<br />"));
    nameToDiv.insertAdjacentElement("BeforeEnd",document.createElement("<input type='file' name='file'>"));
    */
}

function del(no,idx){
    location.href = "<?=$PHP_SELF?>?menushow=<?=$menushow?>&theme=<?=$theme?>&mode=<?=$mode;?>&cp=<?=$cp?>&uid="+no+"&query=qde"+ "&idx="+idx;         
}

//옵션관련 자바스크립트 시작
function listOptionCnt(v, inicnt){
    var cnt = parseInt(v.value);
    //alert(cnt);
    var data = "";
    for (i=1+parseInt(inicnt); i <= cnt; i++)    { 
        tmpno = "0"+i;
        var k = i-1;

        data = data +
        "<table  cellpadding=8 id='objOption' bgcolor=f3f3f3 bordercolor=#cccccc style='border-collapse:collapse' class='s1'>"+
        "<tr>"+
        "<td id=currPosition>옵션명 : <input name='opname["+k+"]' value='' size=10> "+
        "<select name='opcnt["+k+"]' onChange='listeachOptionCnt(this, "+k+", 0)'>"+
        "<option value='0'>갯수</option>"+
        "<option value='1'>1</option>"+
        "<option value='2'>2</option>"+
        "<option value='3'>3</option>"+
        "<option value='4'>4</option>"+
        "<option value='5'>5</option>"+
        "<option value='6'>6</option>"+
        "<option value='7'>7</option>"+
        "<option value='8'>8</option>"+
        "<option value='9'>9</option>"+
        "<option value='10'>10</option>"+
        "</select> "+
        "<select name='opflag["+k+"]'> "+
        "<option value='0' selected='selected'>기본</option> "+
        "<option value='1'>가격추가</option>"+
        "<option value='2'>원가격변경</option>"+
        "</select></td>"+
        "<td><span id='add_optioneach_"+k+"'></span></td>"+
        "</tr>"+
        "</table>";
        
    }
    $("#add_option").html(data);
}//end function listOptionCnt


function listeachOptionCnt(v, uid, inicnt){
    var cnt = v.value;
    var data = "";
    //uid = uid + parseInt(f.optioncntadd.value);
    for (i=1+parseInt(inicnt); i <= cnt; i++)    { 
        tmpno = "0"+i;
        var k = i-1;
        //var k = i-1 + parseInt(f.optioncntadd.value);
        data = data +
        "<table class='s1'>"+
        "<tr>"+
        "<td>옵션값:"+
        "<input name='optioneachname"+uid+"["+k+"]' size='10' /> "+
        "가격:"+
        "<input name='optioneachprice"+uid+"["+k+"]' size='5' value='0'> "+
        "재고: "+
        "<input name='optioneachqty"+uid+"["+k+"]' size='3' value='0'></td>"+
        "</tr>"+
        "</table>";
        
    }
    
    $("#add_optioneach_"+uid).html(data);

}//end function listeachOptionCnt

function option_del(el)
{
    idx = el.rowIndex;
    obj = el.parentNode
    obj.deleteRow(idx);
    //deleteRow(idx);
    //deleteRow(el);

}

//옵션관련 자바스크립트 시끝

function dp_coorbuy(v){//공동구매 필드 
    if(v.checked) $("#cobuyfield").show();
    else $("#cobuyfield").hide();
}


function gotobasicinfo(){
    location.href="<?=$PHP_SELF;?>?menushow=<?=$menushow;?>&theme=basicconfig/basic_info2";
}


function dp_watermark(v){//워터 마크 옵션 디피
    $("#watermark_text").hide();
    $("#watermark_img").hide();

    switch(v.value){
        case "text":$("#watermark_text").show();break;
        case "img":$("#watermark_img").show();;break;
    }
}  
-->
</script>
<script  language="JavaScript">
<!--
//비교상품관련
function adSimilarPd(idx)
{
    var tb0 = document.getElementById('tb0');
    var tb = parent.document.getElementById('tb_refer');

    oTr = tb.insertRow(0);
    oTd = oTr.insertCell(-1);
    oTd.innerHTML = tb0.rows[idx].cells[0].innerHTML;
    oTd = oTr.insertCell(-1);
    oTd.innerHTML = tb0.rows[idx].cells[1].innerHTML;

    tb.rows[0].className = "hand";
    tb.rows[0].onclick = function(){ parent.spoit('refer',this); }
    tb.rows[0].ondblclick = function(){ parent.remove('refer',this); }
    parent.react_goods('refer');
}

function react_goods(name)
{
    var tmp = new Array();
    
    var obj = document.getElementById('tb_'+name);
    //alert(obj.rows.length);
    for (i=0;i<obj.rows.length;i++){
    //alert(obj.rows[i].cells[0].innerHTML);
        tmp[tmp.length] = "<div style='float:left;width:0;border:1 solid #cccccc;margin:1px;' title='" + obj.rows[i].cells[1].getElementsByTagName('div')[0].innerText + "'>" + obj.rows[i].cells[0].innerHTML + "</div>";
    }
    document.getElementById(name+'X').innerHTML = tmp.join("") + "<div style='clear:both'>";
}

//-->
</script>
<script language="JavaScript"> 
<!-- 
// 파일 첨부시 미리보기 구현
//<input type='file' name='file[0]' onchange="return image_onchange(0);" id=upfile><img alt=미리보기 id=sm src="" width="largh" style="VISIBILITY: hidden"  name="imgsiz">
function AutoResize(img, flag){ 
    foto1= new Image(); 
    foto1.src=(img); 
    Controlla(img, flag); 

function Controlla(img, flag){ 
    if((foto1.width!=0)&&(foto1.height!=0)){ 
        viewFoto(img, flag); 
    } 
    else{ 
        funzione="Controlla('"+img+"')"; 
        intervallo=setTimeout(funzione,20); 
    } 

function viewFoto(img, flag){ 
    largh=foto1.width; 
    img_width=foto1.width;
    altez=foto1.height;
    img_height=foto1.height;
    if(largh >= 80) {
        largh = 80;
    }
    //if(altez >= 650) {
    //   altez = 450;
    //}
    var imgsiz
    document.imgsiz[flag].width = largh ;
    document.imgsiz[flag].alt = '원본 이미지사이즈 :' + img_width +'×'+ img_height ;
    //document.imgsiz.height = altez ;
    //f.sm.style.visibility="visible";


function image_onchange(flag){    
    var f=document.writeForm;
    sm=new Array(); 
    upfile=new Array(); 
    if(f.upfile.value!=""){
    f.sm[flag].src=f.upfile[flag].value;
    f.sm[flag].style.visibility="visible";
    imgsize = f.upfile[flag].value;
    if(event.srcElement.value.match(/(.jpg|.jpeg|.gif|.png|.JPG|.JPEG|.GIF|.PNG)/)) {
        f.sm[flag].src = event.srcElement.value;
        f.sm[flag].style.display = '';

        if(f.sm[flag].fileSize > 1000*1024){ 
        document.images[img_pre].style.display = 'none';
        alert("1000k 이상은 업로드 하실수 없습니다.");
        }
    }
    else {
        document.images[img_pre].style.display = 'none';

        if(f.sm.fileSize ==-1){
        alert("이미지 파일만 가능합니다");
        }
    }

    AutoResize(imgsize, flag);
    }                

}


//이미지 원래크기로 팝업창 띄우기/////////////////////////////////
function AutoResize1(img){ 
  foto1= new Image(); 
  foto1.src=(img); 
  Controlla1(img); 

function Controlla1(img){ 
  if((foto1.width!=0)&&(foto1.height!=0)){ 
    viewFoto1(img); 
  } 
  else{ 
    funzione="Controlla('"+img+"')"; 
    intervallo=setTimeout(funzione,20); 
  } 

function viewFoto1(img){ 
  largh=foto1.width; 
  altez=foto1.height;
  if(largh >= 1024 && 768 <= altez) {
      largh = 1024;
   }
   if(largh <= 1024 && altez >= 768) {
      largh = largh + 40;
      altez = 768;
   }
   if(largh >= 1024 && altez >= 768) {
      largh = 1024;
      altez = 768;
   }
  stringa="width="+largh+",height="+altez+",left=0,top=0,scrollbars=yes"; 
  finestra=window.open(img,"",stringa);
  

-->
</script>
<table class="table_outline">
    <tr>
        <td><fieldset class="desc">
            <legend>제품등록</legend>
            <div class="notice">[note]</div>
            <div class="comment"> 제품을 카테고리에 맞게 분류하여 등록하십시오.<br />
                등록카테고리를 지정하실 때에는 가장 하위 카테고리에 등록해 주시기 바랍니다. <br />
                스킨마다 약간식의 적용 옵션이 달라 질 수 도 있습니다.</div>
            </fieldset>
            <div class="space20"></div>
            <form  action='<?=$PHP_SELF?>' method='post' name="writeForm" enctype='multipart/form-data' onsubmit='return checkForm(this);'>
                <input type="hidden" name='query' value='<?=$mode;?>'>
                <input type="hidden" name="menushow" value="<?=$menushow?>">
                <input type="hidden" name="theme" value=<?=$theme?>>
                <input type="hidden" name="SimilarPd">
                <input type="hidden" name='uid' value='<?=$uid?>'>
                <input type="hidden" name='back' value='<?=$back?>'>
                <!-- 아래는 수정모드에서 넘어온 조건(분류라던지 검색조건)을 다시 한번 보내준다 -->
                <input type="hidden" name='where' value='<?=$where?>'>
                <input type="hidden" name='keyword' value='<?=$keyword?>'>
                <input type="hidden" name='OPTI_LIST' value='<?=$OPTI_LIST?>'>
                <input type="hidden" name='sort' value='<?=$sort?>'>
                <input type="hidden" name='sort1' value='<?=$sort1?>'>
                <input type="hidden" name='sort2' value='<?=$sort2?>' />
                <input type="hidden" name='sorting' value='<?=$sorting?>'>
                <input type="hidden" name='s_category' value='<?=$category?>'>
                <input type="hidden" name='cp' value='<?=$cp?>'>
                <input type="hidden" name='c_category' value='<?=$list["Category"]?>'>
                <input type="hidden" name='htmleditimgfolder' value='<?=$htmleditimgfolder?>'>
                <!-- 다중카테고리용으로 히든 값을 보낸다. 5개 이상 보내고 싶을 경우 이 부분의 hindden 값을 조정 -->
                <input type="hidden" id=TmpMultiCategoryvalue name='TmpMultiCategoryvalue' value=''>
                <table class="table_main">
                <col width="120px" />
                <col width="*" />
                    <tr>
                        <th>등록카테고리</th>
                        <td><select name="Category1" id="Category1" onchange="getCategory(this, 1);">
                                <option value="" selected>대분류 </option>
                                <option value="">----------------</option>
                                <?
$mall->getSelectCategory("1", $list["Category"]);
?>
                            </select>
                            <select name="Category2" id="Category2" onchange="getCategory(this, 2);">
                                <option value="" selected>중분류</option>
                                <option value="">----------------</option>
                                <?
if($mode == "qup"){
$mall->getSelectCategory("2", $list["Category"]);
}
?>
                            </select>
                            <select name="Category3" id="Category3">
                                <option value="" selected>소분류</option>
                                <option value="">----------------</option>
                                <?
if($mode == "qup"){
$mall->getSelectCategory("3", $list["Category"]);
}
?>
                            </select>
                            (등록카테고리가 없을시 카테고리를 <a href="<?=$PHP_SELF?>?menushow=<?=$menushow?>&theme=catmanager/shopmanager1">등록</a> 하세요)</td>
                    </tr>
                    <tr>
                        <th>다중카테고리</th>
                        <td><table>
                                <tr>
                                    <td><select style="width: 270px" name="" onchange="MultiCategorySelect(this)">
                                            <option value=''>상품등록 카테고리 선택</option>
                                            <option value=''>--------------------------------------</option>
                                            <?
$substr = "SELECT cat_no, cat_name FROM wizCategory WHERE LENGTH(cat_no) = 3 and cat_flag = 'wizmall' ORDER BY cat_order ASC";
$subqry = $dbcon->_query($substr);
while($sublist=@$dbcon->_fetch_array($subqry)):
    if($sublist["cat_no"]==$list["Category"]) echo "<option value='$sublist[cat_no]' selected>$sublist[cat_name]</option>\n";
    else echo "<option value='$sublist[cat_no]'>$sublist[cat_name]</option>\n";
    $cat_no_new = substr($sublist[cat_no],4);
    $substr1 = "SELECT cat_no, cat_name FROM wizCategory WHERE LENGTH(cat_no) = 6 AND RIGHT(cat_no, 3) = '".$sublist["cat_no"]."' and cat_flag = 'wizmall' ORDER BY cat_order ASC";
    $subqry1 = $dbcon->_query($substr1);
    while($sublist1=@$dbcon->_fetch_array($subqry1)):
        if($sublist1[cat_no]==$list[Category]) echo "<option value='$sublist1[cat_no]' selected>$sublist[cat_name] > $sublist1[cat_name]</option>\n";
        else echo "<option value='$sublist1[cat_no]'>$sublist[cat_name]> $sublist1[cat_name]</option>\n";
        $cat_no_new1 = substr($sublist1[cat_no],2);
        $substr2 = "SELECT cat_no, cat_name FROM wizCategory WHERE LENGTH(cat_no) = 9 AND RIGHT(cat_no, 6) = '".$sublist1["cat_no"]."' and cat_flag = 'wizmall' ORDER BY cat_order ASC";
        $subqry2 = $dbcon->_query($substr2);
        while($sublist2=@$dbcon->_fetch_array($subqry2)):
        if($sublist2[cat_no]==$list[Category]) echo "<option value='$sublist2[cat_no]' selected>$sublist[cat_name] > $sublist1[cat_name] > $sublist2[cat_name]</option>\n";
        else echo "<option value='$sublist2[cat_no]'>$sublist[cat_name] > $sublist1[cat_name] > $sublist2[cat_name]</option>\n";
        endwhile;
    endwhile;
endwhile;    
?>
                                        </select></td>
                                    <td><select name="TmpMultiCategory" multiple>
                                            <?
$sqlsubstr = "select Category from wizMall where PID = '$uid' and UID != '$uid'";
$sqlsubqry = $dbcon->_query($sqlsubstr);
while($sublist = $dbcon->_fetch_array($sqlsubqry)): 
        $mul_cat = $sublist[Category];
        $mul_cat_len =strlen($mul_cat);
    if($mul_cat_len > 0){
        $sqlcatstr = "select cat_name from wizCategory where cat_no = '".substr($mul_cat, -3)."' and cat_flag = 'wizmall'";
        $cat_name = $dbcon->get_one($sqlcatstr);
    }
    if($mul_cat_len > 3){
        $sqlcatstr = "select cat_name from wizCategory where cat_no = '".substr($mul_cat, -6)."' and cat_flag = 'wizmall'";
        $cat_name .= ">".$dbcon->get_one($sqlcatstr);
    }
    if($mul_cat_len > 6){
        $sqlcatstr = "select cat_name from wizCategory where cat_no = '$mul_cat' and cat_flag = 'wizmall'";
        $cat_name .= ">".$dbcon->get_one($sqlcatstr);
    }
?>
                                            <option value="<?=$sublist[Category]?>">
                                            <?=$cat_name?>
                                            </option>
                                            <?
endwhile;
?>
                                        </select>
                                        <input name="button" type=button onClick=DeleteMultiCat(this.form.TmpMultiCategory) value=제거>
                                        <a href="javasript:window.open('http://shop-wiz.com/wizmanual.php?BID=manual&mode=view&UID=2&cp=1&BOARD_NO=1&SEARCHTITLE=&searchkeyword=&category=2','OnlineManual','width=500,0,scrollbars=yes,resizable=yes')";><img src="../../wizboard/images/help.gif" width="20" height="9"></a></td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>상품명</th>
                        <td><input name=Name value="<?=$list[Name]?>">
                        </td>
                    </tr>
                    <tr>
                        <th>상품모델명</th>
                        <td><input name="Model" value="<?=$list[Model]?>">
                            - 사용하지 않을경우 공백처리</td>
                    </tr>
                    <tr>
                        <th>판매가<br />
                            (즉시구매가)</th>
                        <td><input name="Price" value="<?=$list["Price"]?$list["Price"]:0;?>">
                            콤마(,)없이 숫자로만 입력(보기:10000)</td>
                    </tr>
                    <tr>
                        <th>소비자가</th>
                        <td><input name="Price1" value="<?=$list[Price1]?>" maxLength=30>
                            콤마(,)없이 숫자로만 입력(보기:10000)- 사용하지 않을경우 공백처리</td>
                    </tr>
                    <tr>
                        <th>부가 포인트</th>
                        <td><input name="Point" value="<?=$list[Point]?>">
                            이 상품에 부가할 마일리지포인트. </td>
                    </tr>
                    <tr>
                        <th>공동구매
                            <input name="cobuy" type="checkbox" id="cobuy" value="c" <? if($list["opflag"]=="c") echo "checked";?> onclick="dp_coorbuy(this);"></th>
                        <td>공동구매시 이곳에 책크(공동구매는 일반 매장이 아니라 공동 구매 매장에만 디스플레이)</td>
                    </tr>
                    <TR style="display:none" id="cobuyfield">
                        <td colspan="2"><table class="table_sub">
                                <tr>
                                    <th>*차등가격적용 </th>
                                    <td><table 
>
                                            <tr>
                                                <td>- 신청수량이
                                                    <input name="c_qty[0]" value="<?=$p_qty[0][1];?>">
                                                    개 이상일때
                                                    <input name="c_price[0]" onKeyPress=is_number() value="<?=$p_qty[0][0];?>">
                                                    원(하위로 5, 10, 20... 순으로 입력)</td>
                                            </tr>
                                            <tr>
                                                <td>- 신청수량이
                                                    <input name="c_qty[1]" value="<?=$p_qty[1][1];?>" />
                                                    개 이상일때
                                                    <input  name="c_price[1]" onKeyPress=is_number()  value="<?=$p_qty[1][0];?>" />
                                                    원</td>
                                            </tr>
                                            <tr>
                                                <td>- 신청수량이
                                                    <input name="c_qty[2]" value="<?=$p_qty[2][1];?>" />
                                                    개 이상일때
                                                    <input name="c_price[2]" onKeyPress=is_number() value="<?=$p_qty[2][0];?>" />
                                                    원</td>
                                            </tr>
                                        </table></td>
                                </tr>
                                <tr>
                                    <th>*공동구매기간 </th>
                                    <td><?
$common->startyear = date("Y");
$common->getSelectDate($SDate);
?>
                                        <select name='SYear' size='1'>
                                            <?=$common->rtn_year ?>
                                        </select>
                                        <select name='SMonth' size='1'>
                                            <?=$common->rtn_month ?>
                                        </select>
                                        <select name='SDay' size='1'>
                                            <?=$common->rtn_day ?>
                                        </select>
                                        ~
                                        <?
$common->getSelectDate($FDate);
?>
                                        <select name='FYear' size='1'>
                                            <?=$common->rtn_year ?>
                                        </select>
                                        <select name='FMonth' size='1'>
                                            <?=$common->rtn_month ?>
                                        </select>
                                        <select name='FDay' size='1'>
                                            <?=$common->rtn_day ?>
                                        </select></td>
                                </tr>
                            </table>
                            <script  language="javascript">dp_coorbuy(document.writeForm.cobuy)</script></td>
                    </tr>
                    <tr>
                        <td colspan="2">이미지 copy
                            <input type="checkbox" name="checkbox" id="checkbox" />
                            (큰그림은 반드시 넣어시고 작은/중간 그림은 선택)<br />
                            <select name="watermark" id="watermark" onchange="dp_watermark(this)">
                                <option>워터마크적용</option>
                                <option value="text">텍스트적용</option>
                                <option value="img">이미지적용</option>
                            </select>
                            <input name="watermark_text" type="text" id="watermark_text" value="<?=$cfg["admin"]["str_watermark"]?>"  style="display:none" />
                            <input type="text" name="watermark_img" id="watermark_img" value="<?=$cfg["admin"]["img_watermark"]?>"  style="display:none" />
                            [<a href="javascript:gotobasicinfo()">기본 텍스트/이미지 수정하기</a>]</td>
                    </tr>
                    <tr>
                        <th>큰그림</th>
                        <td><table>
                                <tr>
                                    <td><input type='file' name='file[]'></td>
                                    <td><? if($fileimg[0]): ?>
                                        <a href='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[0]?>' target=_blank><img src ='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$Picture[0]?>' width = 30></a>
                                        <?=$common->getImgName($fileimg[0])?>
                                        <?endif;?>
                                        (권장사이즈 : 500 x 500)(상세보기팝업이미지)</td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>작은그림<br />
                            (copy
                            <input name="copyimg[1]" type="checkbox" id="copyimg[1]" value="1" />
                            )</th>
                        <td><table>
                                <tr>
                                    <td><input type='file' name='file[]'></td>
                                    <td><? if($fileimg[1]): ?>
                                        <a href='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[1]?>' target=_blank><img src ='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[1]?>' width = 30></a>
                                        <?=$common->getImgName($Picture[1])?>
                                        <?endif;?>
                                        (권장사이즈 : 100 x 100)리스트이미지</td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>중간그림<br />
                            (copy
                            <input name="copyimg[2]" type="checkbox" id="copyimg[2]" value="1" />
                            )</th>
                        <td><table>
                                <tr>
                                    <td><input type='file' name='file[]'></td>
                                    <td><? if($fileimg[2]): ?>
                                        <a href='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[2]?>' target=_blank><img src ='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[2]?>' width = 30>
                                        <?endif;?>
                                        </a>
                                        <?=$common->getImgName($Picture[2])?>
                                        (권장사이즈 : 300 x 300) 상세보기 큰이미지</td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>기타그림</th>
                        <td><table>
                                <? 
                //$PictureCount = $uid ? sizeof($$fileimg) : 3;
                for($i=3; $i<=$max_value; $i++){ 
                ?>
                                <tr>
                                    <td><input type='file' name='file[]'></td>
                                    <td><?if($fileimg[$i]):?>
                                        <a href='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[$i]?>' target=_blank><img src ='../config/uploadfolder/productimg/<?=$imgFolder?>/<?=$fileimg[$i]?>' width = 30></a>
                                        <?=$common->getImgName($fileimg[$i])?>
                                        <?endif;?>
                                        <input type="button" value="삭제" onClick = "del('<?=$uid?>','<?=$i?>');"></td>
                                </tr>
                                <?}?>
                            </table>
                            <table>
                                <tr>
                                    <td><div id='nameToDiv'></div></td>
                                    <td width="75" valign="bottom"><div ><img src="img/chu.gif" width="68" style="cursor:pointer" value="추가하기" onClick="javascript:addToPIC() ;return false";></div></td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>자세한설명
                            <input type="hidden" value="1" name="des_type1">
                        </th>
                        <td><textarea name="Description1" rows=20 id="ir1" style="width:98%"><?=$list["Description1"]?>
</textarea></td>
                    </tr>
                    <script >
var oEditors = [];
nhn.husky.EZCreator.createInIFrame({
    oAppRef: oEditors,
    elPlaceHolder: "ir1",
    sSkinURI: "../js/Smart/SEditorSkin.html",
    fCreator: "createSEditorInIFrame"
});

function insertIMG(irid,fileame)
{
 
    var sHTML = "<img src='" + fileame + "'>";
    oEditors.getById[irid].exec("PASTE_HTML", [sHTML]);
 
}
</script>
                    <tr>
                        <th>배송정보<br />
                            <input name="des_type3" type="checkbox" value="1" <? echo $des_type3=="1"?"checked":"";?>>
                            HTML사용</th>
                        <td><textarea id="Description3" name="Description3" rows="6"  style="width:98%"><?=$list[Description3]?>
</textarea></td>
                    </tr>
                    <tr>
                        <th>간단한
                            설명</th>
                        <td><textarea name="Description2" rows="3"  style="width:98%"><?=$list[Description2]?>
</textarea>
                            <br />
                            <br />
                            상품에 대한 간단한 설명을 넣는 곳입니다. 스킨에 따라 적용되지 않을 수도 있습니다.<br />
                        </td>
                    </tr>
                </table>
                <br />
                <div class="agn_c">
                    <input type="image" src="img/sul.gif" width="68">
                </div>    
                <br />
                <br />
                <span> 옵션 입력사항</span>
                <table class="table_main">
                <col width="120px" />
                <col width="*" />
                    <tr>
                        <?
##옵션관련 정보를 불러온다
$substr = "select count(1) from wizMalloptioncfg where opid = '$uid'";
$subqry = $dbcon->_query($substr);
$sublist = $dbcon->_fetch_array($subqry);
$optioncnt = $sublist[0];
if(!$optioncnt) $optioncnt = 0;
?>
                        <input type="hidden" name="optioncntadd" value="<?=$optioncnt?>" />
                        <th>옵션설정</th>
                        <td><select name="optioncnt" id="optioncnt" onchange="listOptionCnt(this, '<?=$optioncnt?>')">
                                <option value="0">갯수</option>
                                <?
                for($i=1; $i<=5; $i++){
                    $selected = $optioncnt == $i ? " selected":"";
                    echo "<option value='$i'$selected>$i</option>\n";
                }
                ?>
                            </select>
                            (옵션필드갯수:색상, 사이즈, 인치...) <br />
                            가격추가나 원가격변동은 택1하여 사용해 주시기 바랍니다.<br />
                            옵션당 한개의 값만 입력하시면 단일 텍스트가 출력됩니다.
                            <?
$substr = "select * from wizMalloptioncfg where opid = '$uid' order by oorder asc";
$subqry = $dbcon->_query($substr);
$cnt=0;
while($sublist = $dbcon->_fetch_array($subqry)):
$oname    = $sublist["oname"];
$oflag    = $sublist["oflag"];
$ouid = $sublist["uid"];

//옵션값갯수구하기
$substr1 = "select count(1) from wizMalloption where ouid = '$ouid'";
$subqry1 = $dbcon->_query($substr1);
$sublist1 = $dbcon->_fetch_array($subqry1);
$valuecnt = $sublist1[0];
if(!$valuecnt) $valuecnt = 0;
?>
                            <table  cellpadding=8 id='objOption' bgcolor=f3f3f3 bordercolor=#cccccc style='border-collapse:collapse' class='s1'>
                                <tr>
                                    <td id=currPosition>옵션명 :
                                        <input name='opname[<?=$cnt;?>]' value='<?=$oname?>' />
                                        <select name='opcnt[<?=$cnt;?>]' onChange="listeachOptionCnt(this, <?=$cnt;?>, '<?=$valuecnt?>')" style="width:50px">
                                            <option value='0'>갯수</option>
                                            <?
                for($i=1; $i<=10; $i++){
                    $selected = $valuecnt == $i ? " selected":"";
                    echo "<option value='$i'$selected>$i</option>\n";
                }
                ?>
                                        </select>
                                        <select name='opflag[<?=$cnt;?>]' style="width:90px">
                                            <option value='0' selected='selected'>기본</option>
                                            <option value='1'<? if($oflag == "1") echo " selected"; ?>>가격추가</option>
                                            <option value='2'<? if($oflag == "2") echo " selected"; ?>>원가격변경</option>
                                        </select>
                                        <input type="button" name="button2" id="button" value="del" onClick="option_del(this.parentNode.parentNode)" style='cursor:pointer'></td>
                                    <td><?
$substr1 = "select * from wizMalloption where ouid = '$ouid' order by uid asc";
$subqry1 = $dbcon->_query($substr1);
$subcnt=0;
while($sublist1 = $dbcon->_fetch_array($subqry1)):
?>
                                        <table class='s1'>
                                            <tr>
                                                <td>옵션값:
                                                    <input name='optioneachname<?=$cnt;?>[<?=$subcnt?>]' value='<?=$sublist1["oname"]?>' />
                                                    가격:
                                                    <input name='optioneachprice<?=$cnt;?>[<?=$subcnt?>]'  value='<?=$sublist1["oprice"]?>' />
                                                    재고:
                                                    <input name='optioneachqty<?=$cnt;?>[<?=$subcnt?>]'  value='<?=$sublist1["oqty"]?>' />
                                                    <input type="button" name="button2" id="button" value="del" onClick="option_del(this.parentNode.parentNode)"style='cursor:pointer'></td>
                                            </tr>
                                        </table>
                                        <?
$subcnt++;
endwhile;//while($sublist1 = $dbcon->_fetch_array($subqry1)):
?>
                                        <span id='add_optioneach_<?=$cnt?>'></span> </td>
                                </tr>
                            </table>
                            <?
$cnt++;
endwhile;//while($sublist = $dbcon->_fetch_array($subqry)):
?>
                            <span id="add_option"> </span> </td>
                    </tr>
                    <tr>
                        <th>브랜드명</th>
                        <td><input name="Brand" value="<?=$list[Brand]?>" maxLength=30></td>
                    </tr>
                    <tr>
                        <th>제조사/원산지</th>
                        <td><input name="CompName" value="<?=$list[CompName]?>" maxLength=30></td>
                    </tr>
                    <tr>
                        <th>등록옵션</th>
                        <td><?
reset($RegOptionArr);
$RegoptionArr = split("\|", $list[Regoption]);
while(list($key, $value)=each($RegOptionArr)):
    if($RegoptionArr[$key]) $checked = "checked";
    else unset($checked);
    echo "<input type='checkbox' name='Multi_Regoption[".$key."]' value='1' $checked >".$value."&nbsp; ";
endwhile;
?></td>
                    </tr>
                    <tr>
                        <th>비교상품</th>
                        <td><table>
                                <tr>
                                    <td> 비교상품을 디스플레이 하기위해서는 기본환경>몰스킨설정>상세보기스킨> 관련상품표시하기를 책크해 두셔야 합니다. <br />
                                        <select name="tmpSimilarPd" size="6"  multiple="multiple" readonly>
                                            <?
$mall->getSimilarPd($SimilarPd);
?>
                                        </select>
                                        <input type="button" name="Button" value="찾기" onClick="window.open('product/product1_1search.php?mode=compare&sort='+document.writeForm.Category1.value+'&sort1='+document.writeForm.Category2.value+'&sort2='+document.writeForm.Category3.value+'&mode=new','Product_Search_Window','width=620, height=650, scrollbars=yes')"; style="cursor:pointer">
                                    </td>
                                </tr>
                            </table></td>
                    </tr>
                    <tr>
                        <th>등록일</th>
                        <td><?
$year = date("Y");
$month = date("m");
$day = date("j");
if($list[Date]){
    $regyear = date("Y", $list[Date]);
    $regmonth = date("m", $list[Date]);
    $regday = date("d", $list[Date]);
}else{
    $regyear = $year;
    $regmonth = $month;
    $regday = $day;
}
echo "<select name='Year' size='1'>";
for($i=$regyear;$i<=$year+5;$i++) {
if($regyear == $i) {
echo "<option value='$i' selected>$i</option>\n";
}
else {
echo "<option value='$i'>$i</option>\n";
}
}
echo "</select>년 <select name='Month' size='1'>";
for($i="01";$i<=12;$i++) {
if($regmonth == $i) {
echo "<option value='$i' selected>$i</option>\n";
}
else {
echo "<option value='$i'>$i</option>\n";
}
}
echo "
</select>월 <select name='Day' size='1'>";
for($i="01";$i<=31;$i++) {
if($regday == $i) {
echo "<option value='$i' selected>$i</option>\n";
}
else {
echo "<option value='$i'>$i</option>\n";
}
}
echo "</select>일";
?>
                            <a href="#" onClick="window.open('http://shop-wiz.com/wizmanual.php?BID=manual&mode=view&UID=8&searchkeyword=&category=2','OnlineManual','width=500,0,scrollbars=yes,resizable=yes')";><img src="../../wizboard/images/help.gif" width="20" height="9"></a> (for
                            more info, click "?")</td>
                    </tr>
                </table>
                <br />
                <table class="table_main">
                <col width="120px" />
                <col width="*" />
                    <tr>
                        <th>품절</th>
                        <td><input type="checkbox" value="1" name="None" <? if($list["None"] == "1") echo "checked"; ?>>
                            품절상품은 리스트는 되나 장바구니에 담겨지지 않습니다.</td>
                    </tr>
                    <tr>
                        <th>공급처</th>
                        <td><select name=GetComp>
                                <option value=''>공급거래처 없음</option>
                                <option value=''>------------------</option>
                                <?
$sqlcompstr = "SELECT UID,CompName,CompID FROM wizCom WHERE (CompSort = '01' or CompSort = '02' or CompSort = '03')";
$sqlcompqry = $dbcon->_query($sqlcompstr);
while( $complist = $dbcon->_fetch_array( $sqlcompqry ) ) {
unset($selected);
if(!strcmp(trim($complist[CompID]),trim($list[GetComp]))) $selected = " selected";
        echo "<option value='$complist[CompID]'$selected>$complist[CompName]</option>";
}
?>
                            </select>
                            <span class="button bull"> <a href="<?=$PHP_SELF?>?menushow=<?=$menushow?>&theme=member/member5">공급처등록</a></span> </td>
                    </tr>
                    <tr>
                        <th>원가 </th>
                        <td><input name="WongaPrice" value="<?=$list[WongaPrice]?>" 
                        maxLength=30>
                            콤마(,)없이 숫자로만 입력(보기:10000) - 원 상품가</td>
                    </tr>
                    <tr>
                        <th>단위</th>
                        <td><input name="Unit" value="<?=$list[Unit]?>">
                        </td>
                    </tr>
                    <tr>
                        <th>재고수량<br />
                            (공동구매수량)</th>
                        <td><? if($uid){ ?>
                            현재고수량:
                            <?=$list["Stock"]?>
                            <?=$list[Unit]?>
                            (입하량의 추가/변경 일경우 <a href="javascript:wizwindow('./product/product2_2.php?uid=<?=$uid?>&Name=<?=$list[Name]?>&Output=<?=$list[Output]?>&Icomid=<?=$list[GetComp]?>','InputChangeWindow','width=300,0')">이곳을
                            눌러</a> 변경해 주세요)
                            <?
              }else{
              ?>
                            <input name="Stock" value="">
                            <?
              }
              ?></td>
                    </tr>
                </table>
                <br />
                <div class="agn_c">
                    <input type="image" src="img/sul.gif" width="68">
                </div>
            </form></td>
    </tr>
</table>
2012.02.06 X

Powered by shop-wiz since 2002, e-mail:wangta69@naver.com