<!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="管理後臺" />
<script src="/jquery/jquery-1.8.2.min.js"></script>
<script src="ckeditor/ckeditor.js" type="text/javascript"></script>
</head>
<body>
	<div class="wrapper">
    	<?# header ?>
    	<div class="wrap">
        	<?# sidePage ?>
            <div class="contentMain">
            	<h3>聯絡我們</h3>
                <div class="article" style="width: 100%;">
                <form id="form1" name="form1" action="contactView.php" method="post">
                	<fieldset style="width: 100%;">
                    	<div class="titleTyp"><p>客戶資訊</p></div>
                        <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 20px;">
                        	<p>
                        		<label>姓名</label>
                                <?# Name ?>
                            </p>
                        	<p>
                        		<label>電話</label>
                                <?# Phone ?>
                            </p>
                        	<p>
                        		<label>信箱</label>
                                <?# Email ?>
                            </p>
                        </div>
                        <div class="titleTyp" style="background: #66CC96; margin: 5px 0 0;"><p>聯絡訊息</p></div>
                        <div style="background: rgba(102, 204, 150, 0.11); padding: 10px 20px;;">
                        	<p>
                        		<label>標題</label>
                                <?# Title ?>
                            </p>
                        	<p>
                        		<label>內容</label>
                                <textarea id="Content" name="Content" style="width:540px; height:200px;" disabled="disabled"><?# Content ?></textarea>
                            </p>
                        	<p>
                        		<label>是否回覆</label>
                                <?# IsReply ?>
                            </p>
                        	<p>
                        		<label>留言時間</label>
                                <?# CreatedTime ?>
                            </p>
						</div>
                        <div class="titleTyp" style="background: #C66; margin: 5px 0 0;"><p>線上回覆</p></div>
                        <div style="background: rgba(204, 102, 102, 0.14); padding: 10px 0;">
                        	<p>
                        		<label>回覆信箱</label>
                                <input type="text" id="ReMail" name="ReMail" value="<?# ReMail ?>" maxlength="128" />
                            </p>
                        	<p>
                        		<label>回覆標題</label>
                                <input type="text" id="ReTitle" name="ReTitle" value="<?# ReTitle ?>" maxlength="50" />
                            </p>
                            <div class="writList">
                            	<label>回覆內容</label>
                                <div class="ckeList"><textarea class="ckeditor" id="ReContent" name="ReContent"><?# ReContent ?></textarea></div>
                            </div>
                        </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>
        <?# footer ?>
    </div>
<script>
<!--
	$(function(){
		$('#btnOK').click(function(){
			if($('#ReMail').val() == ''){
				alert('回覆信箱不可空白!');
				$('#ReMail').focus();
				return false;
			}
			if($('#ReTitle').val() == ''){
				alert('回覆標題不可空白!');
				$('#ReTitle').focus();
				return false;
			}
			if(CKEDITOR.instances.ReContent.getData == ''){
				alert('回覆內容不可空白!');
				return false;
			}
			$('#form1').submit();
		});
		$('#btnCancel').click(function(){
			if($('#pUrl').val() == '')
				location.href = 'contactList.php';
			else
				location.href = $('#pUrl').val();
		});
	});
//-->
</script>
</body>
</html>