<? 
session_start();
//$_SESSION['mAccount']=$mAccount;
echo $mId=$_SESSION['mId'];
//include("../function.php");
//check_login();
if($mId!=''){
require_once("../db.php");
$str = oci_parse($conn,"select * from MEMBER where MID='$mId'") or die('Insert error');
oci_execute($str);
putenv("NLS_LANG=TRADITIONAL CHINESE_TAIWAN.AL32UTF8");
$row=oci_fetch_object($str);
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JUME(Join You And Me)揪咪揪團活動網</title>
<link href="../member/style/member_data_edit.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" href="../tab/themes/flora/member.all.css" type="text/css" media="screen"/>
<script type="text/javascript" src="../jQuery/jquery-1.2.6.js"></script>		
<script type="text/javascript" src="../tab/ui/ui.core.js"></script>			
<script type="text/javascript" src="../tab/ui/ui.tabs.js"></script>
<script>
$(document).ready(function(){
$("#tabsEx2 > ul").tabs
({ fxAutoHeight: true });
});
</script>
<script type="text/javascript">
function showInputQ1(e){
if($('#del').is(':checked')) {
$('#Q113').show();
}else 
{		
$('#Q113').hide();
}
}

$(document).ready(function(e){	
showInputQ1();
$("input[id='del']").click(showInputQ1);
});   
</script> 

<script language="JavaScript">    
//這裡控制要檢查的項目，true表示要檢查，false表示不檢查    
/*
 var isCheckImageType = true;  //是否檢查圖片副檔名    
 var isCheckImageWidth = true;  //是否檢查圖片寬度    
 var isCheckImageHeight = true;  //是否檢查圖片高度    
 var isCheckImageSize = true;  //是否檢查圖片檔案大小    
   
 var ImageSizeLimit = 100000;  //上傳上限，單位:byte    
 var ImageWidthLimit = 400;  //圖片寬度上限    
 var ImageHeightLimit = 300;  //圖片高度上限    
  <?
 /* 
	if($row->mPath!='')
		{
 echo "function check() {    
 
     var f = document.mr;    
     var re = /\.(jpg|gif|png)$/i;  //允許的圖片副檔名  
     
     if(f.del.checked && f.mpic.value!=''){  
     if (isCheckImageType && !re.test(f.mpic.value)) {    
         alert('只允許上傳JPG或GIF或PNG影像檔');    
     } else { 
   
     	document.mr.submit(); 
     	 /*   
         var img = new Image();    
         img.onload = checkImage;    
         img.src = f.mpic.value;    
         */
		 /*
     }
    } else { 
     	
     	document.mr.submit(); 
     	}   
 }";
}else {
	echo "function checkFile2() {    
     var f = document.mr;    
     var re = /\.(jpg|gif)$/i;  //允許的圖片副檔名  
     if(f.mpic.value!=''){  
     if (isCheckImageType && !re.test(f.mpic.value)) {    
         alert('只允許上傳JPG或GIF影像檔');    
     } else { 
     	 document.mr.submit(); 
     	 /*   
         var img = new Image();    
         img.onload = checkImage;    
         img.src = f.mpic.value;    
         */
		 /*
     }
    } else { 
     	document.mr.submit(); }   
 }";    
}
*/	
	?>
	    
 function checkImage() {    
     if (isCheckImageWidth && this.width > ImageWidthLimit) {    
         showMessage('寬度','px',this.width,ImageWidthLimit);    
     } else if (isCheckImageHeight && this.height > ImageHeightLimit) {    
         showMessage('高度','px',this.height,ImageHeightLimit);    
     } else if (isCheckImageSize && this.fileSize > ImageSizeLimit) {    
         showMessage('檔案大小','kb',this.fileSize/1000,ImageSizeLimit/1000);            
     } else {    
         document.mr.submit();    
     }    
 }    
 function showMessage(kind,unit,real,limit) {    
     var msg = "您所選擇的圖片kind為 real unit\n超過了上傳上限 limit unit\n不允許上傳！"    
     alert(msg.replace(/kind/,kind).replace(/unit/g,unit).replace(/real/,real).replace(/limit/,limit));    
 }    
 */
 </script>   
</head>
<body>
<center>
<div  id="header">
<? include("../member/header2.php"); ?>
</div>

<div id="content">
 <div id="raisedetail" align="center">
  <div id="tabsEx2" class="tab"> 
        <br>
   
    <ul style="height: 30px;"> 
        <li ><a href="#fragment-1"><span>修改基本資料</span></a></li> 
        <li ><a href="#fragment-2"><span>變更會員密碼</span></a></li> 
	</ul>
 <div id="fragment-1" class="fragment" align="center"> 

<form id="mr" name="mr" enctype="multipart/form-data" method="post" action="member_edit_act.php">

<div align="center">
  <center>
    <table width="63%" border="1" id="temp">
      <tr>
        <th width="32%" height="40" valign="top">帳號 (Account) </th>
        <td><?=$row->MACCOUNT ?></td>
      </tr>			  
	  <tr>
        <th height="40" valign="top"><p>手機</p>
          <p>(Cellphone)</p></th>
        <td><input name="cellphone" type="text" value="<? echo $row->CELLPHONE;?>" size="30" maxlength="20"/></td>
      </tr>
      <tr>
        <th height="40" valign="top">信箱 (Email) </th>
        <td><input name="email" type="text" value="<? echo $row->EMAIL;?>" size="30" maxlength="20"/></td>
      </tr>

    </table>
  </center>
</div>
<div><td width="35%" colspan="2" valign="top" bgcolor="#FFE8FD">
        
    <div align="center">
	  <input type="hidden" name="mId" value="<?=$row->MID ?>"/>
	   <input type="submit" value="完成" > 
       <input type="button" onClick="history.back(-1);" value="回上頁">
      <!--<input type="submit" value="完成" name="submit" /> -->
    </div></td>
 </div>
</form>
 </div>
 

<div id="fragment-2" class="fragment" align="center"> 
 <form name="form1" method="post" action="member_editcode_act.php">
<div align="center">
  <center>
<table border="1" width="57%" id="temp">
<tr>
  <th width="40%" height="40" valign="top">請輸入舊密碼 <br/>(Origianl Password) </th>
  <td width="60%">
  <input name="password" type="password" size="30" maxlength="20"  />
 </td>
</tr>
<tr>
  <th width="40%" height="40" valign="top">請輸入新密碼 <br/> (New Password) </th>
  <td width="60%">
  <input name="password1" type="password" size="30" maxlength="20"  />
 </td>
</tr>
<tr>
  <th width="37%" height="40" valign="top">確認新密碼 <br/> (Origianl Password) </th>
  <td width="63%">
  <input name="password2" type="password" size="30" maxlength="20"  />
 </td>
</tr>
    </table>
  </center>
</div>
 <div><td width="35%" colspan="2" valign="top" bgcolor="#FFE8FD">
        
    <div align="center">
	  <!--<input type="hidden" name="mId" value="<?=$row->MID?>"/>-->
      <input type="submit" value="完成" name="submit" /> 
      <input type="button" onClick="history.back(-1);" value="回上頁">
      
      </div></td>
 </div>
 </form>
 </div>
 </div><!-- END #raisedetail-->
</div>


</div><!--end #content-->
<div id="footer">   
  <div id="footer-in" align="center">
<p>版權資訊</p>
    <p>國立中山大學  資訊管理學系  揪咪揪團網 <a href="mailto:jumemis@yahoo.com.tw">揪咪團隊<img src="../mail/send email.gif" border="0"/></a> 版權所有  Taiwan All Rights Reserved</p> 
  </div><!-- end #footer-in -->
</div><!-- end #footer -->

</center>
</body>
</html>
<?
}else{echo "請先登入";}
?>