MINI MINI MANI MO

Path : /home/lhcar/www/sub05/
File Upload :
Current File : /home/lhcar/www/sub05/view.php

<? include "$DOCUMENT_ROOT/inc/header.php";?>
<? include "$DOCUMENT_ROOT/inc/top.php";?>
<? include "$DOCUMENT_ROOT/inc/cus_vs.php";?>
<?
if($idx){
	$Qry = "SELECT * FROM counsel WHERE idx = '".$idx."'  ";
	$data = mysql_fetch_array(mysql_query($Qry));
}
if(($data[pass]&&$_POST[counsel_pass]==$data[pass])||($_SESSION["login_user_no"]&&$data[user_idx]==$_SESSION["login_user_no"])||$_SESSION["login_level"]=="1"){
	$passok=1;
	$con_pass=$data[pass];
}
if($_POST[counsel_pass]){
	if($_POST[counsel_pass]!=$data[pass]){
		msg("비밀번호를 확인해 주세요.");
	}
}

$pass_star="**********************************";
?>

<script language="JavaScript" type="text/JavaScript">
	var old_menu = '';  
	function menuclick( s_men)  {
//		  if( old_menu != s_men ) { 
		  	 if( old_menu !='' ) {  document.getElementById(old_menu).style.display = 'none';  } 
		  	  document.getElementById(s_men).style.display = 'block';  old_menu = s_men; 
//		  } 
//		  else {  s_men.style.display = 'none';  old_menu = '';  }
 } 
	</script>
	<style type="text/css">

.div_con { width:759px; height:130px; overflow-y:scroll; text-align:left; white-space:pre-line; padding:10px; margin:0px;	border:1px solid #959595; line-height:150%;float:center; }
.confirm_area { margin:15px 0; }
.div_title { text-align:left; margin-bottom:5px;margin-left:5px; }

    </style>

<section class="layout-contents board">   
    <div class="subtitle-2dpeth">폐차상담</div>
    <div class="subtitle-subtext">
        폐차가격 및 폐차상담시 전문상담원이 신속하게 답변을 드립니다
    </div>


<? if($passok){ ?>
    <div class="table-wrap">
		<table class="table">
            <colgroup>
                <col style="width:80px">
                <col>
            </colgroup>
            <tr>
                <th>등록자<span class="essential"></span></th>
                <td><?=$data[name]?></td>
            </tr>
            <tr>
                <th >등록일</th>
                <td ><?=substr($data[regdate],0,10)?></td>
            </tr>
            <tr>
                <th>연락처<span class="essential"></span></th>
                <td ><?=$data[phone]?></td>
            </tr>
            <tr>
                <th>이메일</th>
                <td><?=$data[email]?></td>
            </tr>
            <tr>
                <th >대구분 <span class="essential"></span></th>
                <td>
                    <?=$data[type]?></td>
            </tr>
            <tr>
                <th >차량번호</th>
                <td><?=$data[type2_etc]?></td>
            </tr>
            <tr>
                <th>소구분<span class="essential"></span></th>
                <td> <?=$data[type2]?></td>
            </tr>
            <tr>
                <th>제목<span class="essential"></span></th>
                <td ><?=$data[title]?></td>
            </tr>
            <tr>
                <th>질문내용</th>
                <td height="100" ><?=$data[memo]?></td>
            </tr>
        </table>
    </div>
    
                
              
<? if($data[step]=="2"){ ?>
				 
    <div class="contsult-title">상담원이 답변을 남긴것입니다. 좀 더 자세한 내용은 고객센터로 연락주십시요</div>
                <div class="table-wrap">
                 <table class="table">
                    <colgroup>
                        <col style="width:15%">
                        <col>
                    </colgroup>
                      <tr>
                        <th >답변내용</th>
                        <td ><?=$data[reply]?></td>
                      </tr>

                    </table>
                </div>
<? } ?>


        <section class="page-btns-wrap">
            
            <button type="button" onclick="location.href='index.php'" class="btn btn-secondary-outline btn-sm">목록보기</button>
            
            

                    <? if(($data[pass]&&$_POST[counsel_pass]==$data[pass])||($_SESSION["login_user_no"]&&$data[user_idx]==$_SESSION["login_user_no"])&&$data[step]!="2"){ ?>
                        <button type="button" onclick='document.cform_mod.submit();' class="btn btn-red-outline btn-sm" >수정하기</button>
                        <button type="button" onClick="if(confirm('삭제 하시겠습니까?')){document.cform_del.submit();}" class="btn btn-black-outline btn-sm" >삭제하기</button>
					   
<form name="cform_mod" method="post" enctype="multipart/form-data" action="write.php">
<input type="hidden" name="idx" value="<?=$idx?>">
<input type="hidden" name="counsel_pass" value="<?=$con_pass?>">
</form>
<form name="cform_del" method="post" enctype="multipart/form-data" action="counsel_del.php" target="HiddenFrm">
<input type="hidden" name="idx" value="<?=$idx?>">
<input type="hidden" name="counsel_pass" value="<?=$con_pass?>">
</form>
						<? } ?>
                    
             </section>
<? }else{ ?>


    


			
                
<form name="cform" method="post" enctype="multipart/form-data" >
<input type="hidden" name="idx" value="<?=$idx?>">
                <section class="input-password">
                    <div class="input-password-title">비밀번호를 입력하셔야 내용을 보실수 있습니다</div>
                    <div>
                        비밀번호입력
                         <input type="password" name="counsel_pass" style="" />
                    </div>

                   
                </section>


            <section class="page-btns-wrap">
        
                <button type="button" onclick="location.href='index.php'" class="btn btn-secondary-outline btn-sm">목록보기</button>
                <button type="submit" class="btn btn-red-outline btn-sm">확인하기</button>
                
            </section>


</form>

<? } ?>			 


    </section>

	<script>
menuclick('s_men01');
</script>

<? include "$DOCUMENT_ROOT/inc/bottom.php";?> 

OHA YOOOO