<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理後臺</title>
<meta name="keywords" content="管理後臺" />
<meta name="description" content="管理後臺" />
<link href="/css/font-awesome.css" rel="stylesheet">
<script src="/jquery/jquery-1.8.2.min.js"></script>
<script src="ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
</head>
<body>
	<style>
		.contentMain .article form fieldset p i {
			font-size: 18px;
			color: #1361de;
		}
	</style>
	<div class="wrapper">
    	<?# header ?>
    	<div class="wrap">
        	<?# sidePage ?>
            <div class="contentMain">
            	<h3><?# editTitle ?></h3>
                <div class="article" style="width: 100%;">
                    <form id="form1" name="form1" action="customerEdit.php" method="post">
                        <fieldset style="width: 100%;">
                        	<div class="titleTyp"><p style="margin-left: 15px;">會員詳細資訊</p></div>
                            <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                            	<input type="hidden" id="FacebookID" name="FacebookID" value="<?# FacebookID ?>" />
                                <p>
                                	<label>會員級別</label>
                                    <input type="radio" name="CustomerLevel" value="0" /> 普通會員 &nbsp;
                                    <input type="radio" name="CustomerLevel" value="-1" /> 停權會員
                                </p>
                                <p>
                                	<label>電子信箱</label>
                                    <input type="text" id="LoginName" name="LoginName" value="<?# LoginName ?>" style="width: 300px;" <?# readonly ?> />
                                </p>
                                <p>
                                    <label>登入密碼</label>
                                    <input type="text" id="LoginPassword" name="LoginPassword" value="<?# LoginPassword ?>" maxlength="20" style="width: 300px;" />
                                    <b style="color:#F4080C;">請輸入8到20個英文或數字。</b>
                                </p>
                                <p>
                                	<label>姓名</label>
                                    <input type="text" id="CustomerName" name="CustomerName" value="<?# CustomerName ?>" style="width: 300px;"  />
                                </p>
                                <p>
                                	<label>手機</label>
                                    <input type="text" id="Mobile" name="Mobile" value="<?# Mobile ?>" style="width: 300px;"  />
                                </p>
                                <p>
                                	<label>Line ID</label>
                                	<input type="text" id="LineID" name="LineID" value="<?# LineID ?>" style="width: 300px;"  />
                                </p>
                                <p<?# noneBox ?>>
                                	<label>申請IP</label>
                                    <?# CreatedIP ?>  
                                </p>
                                <p<?# noneBox ?>>
                                	<label>申請時間</label>
                                    <?# CreatedTime ?>  
                                </p>
                            </div>
                        	<div class="titleTyp" style="background: #66CC96; margin: 5px 0 0;"><p style="margin-left: 15px;">會員評論內容</p></div>
                            <div style="background: rgba(102, 204, 150, 0.11); padding: 10px 0;">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td style="width: 180px;">遊戲名稱</td>
                                        <td style="width: 60px;">評分</td>
                                        <td style="width: 300px;">評論</td>
                                        <td style="width: 100px;">評論時間</td>
                                    </tr>
                                    <php:repeater id="list">
                                    <template>
                                    <tr>
                                        <td><a href="/games-<?# ProductID ?>.html" target="_blank"><?# ProductName ?></a></td>
                                        <td class="star"><?# StarsIcon ?></td>
                                        <td><?# Content ?></td>
                                        <td><?# CreatedTime ?></td>
                                    </tr>
                                    </template>
                                    </php:repeater>
                                </table>
                            </div>
                            <p>
                                <input type="button" id="btnOK" name="btnOK" value="確 定" />
								<input type="button" id="btnCancel" value="返 回" />
                            </p>
                            <input type="hidden" id="id" name="id" value="<?# id ?>" />
                            <input type="hidden" id="pUrl" name="pUrl" value="<?# pUrl ?>" />
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
        <style>
		.contentMain .article form fieldset table { margin: auto; width: 95%; }
		.contentMain .article form fieldset table tr td { padding: 5px 10px; height: 30px; border: 1px #797979 solid; border-top: 0; border-right: 0; text-align: center; word-wrap: break-word; word-break: break-all; }
		.contentMain .article form fieldset table tr td:last-child { border-right: 1px #797979 solid; }
		.contentMain .article form fieldset table tr:nth-child(even) td { background: #65cd9659; }
		.contentMain .article form fieldset table tr:first-child td { border-top: 1px #797979 solid; border-bottom: 2px #797979 solid; color: #191919; }
		.contentMain .article form fieldset table tr td.star i { margin: 0 1px; vertical-align: initial; font-size: 16px; color: #b0b0b0; }
		.contentMain .article form fieldset table tr td.star i.light { color: #f73000; }
	</style>
        <?# footer ?>
    </div>
<script>
<!--
	$(function(){
		$('input:radio[name="CustomerLevel"][value="<?# CustomerLevel ?>"]').attr('checked',true);
		$('#btnOK').click(function(){
			if($('#LoginName').val() == ''){
				alert('請輸入電子信箱!');
				$('#LoginName').focus();
				return false;
			}
			var reMail = /^[A-Za-z0-9\-_\.]+@[A-Za-z0-9\-_]+(\.[A-Za-z0-9\-_]+)+$/;
			if(!reMail.test($('#LoginName').val())){
				alert('電子信箱格式錯誤!');
				$('#LoginName').focus();
				return false;
			}
			if($('#FacebookID').val() == ''){
				if($('#LoginPassword').val() == ''){
					alert('請輸入密碼!');
					$('#LoginPassword').focus();
					return false;
				}
				var rePass = /^[A-Za-z0-9]{8,20}$/;
				if(!rePass.test($('#LoginPassword').val())){
					alert('密碼格式錯誤!');
					$('#LoginPassword').focus();
					return false;
				}
			}
			if($('#CustomerName').val() == ''){
				alert('請輸入姓名!');
				$('#CustomerName').focus();
				return false;
			}
			$('#form1').submit();
		});
		$('#btnCancel').click(function(){
			if($('#pUrl').val() == '')
				location.href = 'customerList.php';
			else
				location.href = $('#pUrl').val();
		});
	});
//-->
</script>
</body>
</html>