<!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>
</head>
<body>
	<div class="wrapper">
    	<?# header ?>
    	<div class="wrap">
        	<?# sidePage ?>
            <div class="contentMain">
            	<h3><?# editTitle ?></h3>
                <div class="article">
                    <form id="form1" name="form1" action="faq_categoryEdit.php" method="post">
                        <fieldset style="width: 800px;">
                            <div class="titleTyp"><p>分類資訊</p></div>
                            <p>
                            	<label>分類名稱</label>
                               <input type="text" id="CategoryName" name="CategoryName" value="<?# CategoryName ?>" maxlength="128" style="width: 300px;" />
                            </p>
                            <p>
                            	<label>啟用</label>
                                <input type="radio" name="Visible" value="1" />啟用
								<input type="radio" name="Visible" value="0" />不啟用
                            </p>
                            <p>
                            	<label>排序</label>
                                <input type="text" id="OrderNO" name="OrderNO" value="<?# OrderNO ?>" onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue = false;" style="width: 300px;" />
                            </p>
                            <div class="titleTyp" style="background: #C66; margin: 5px 0 0;"><p>SEO設定</p></div>
                            <p>
                            	<label>頁面標題</label>
                                <input type="text" id="WebTitle" name="WebTitle" value="<?# WebTitle ?>" maxlength="128" style="width: 300px;" />
                            </p>
                            <p>
                            	<label>頁面關鍵字</label>
                                <input type="text" id="WebKeyword" name="WebKeyword" value="<?# WebKeyword ?>" maxlength="256" style="width: 300px;" />
                            </p>
                            <p>
                            	<label>頁面描述</label>
                                <textarea style="width:540px; height:100px;" id="WebDescription" name="WebDescription"><?# WebDescription ?></textarea>
                            </p>
                            <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 ?>" />
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
        <?# footer ?>
    </div>
<script>
<!--
	$(function(){
		$('input:radio[name="Visible"][value="<?# Visible ?>"]').attr('checked',true);
		$('#btnOK').click(function(){
			if($('#CategoryName').val() == ''){
				alert('分類名稱不可空白!');
				$('#CategoryName').focus();
				return false;
			}
			if($('input:radio[name="Visible"]:checked').size() == 0){
				alert('請選擇是否啟用此問與答!');
				return false;
			}
			$('#form1').submit();
		});
		$('#btnCancel').click(function(){
			location.href = 'faq_categoryList.php';
		});
	});
//-->
</script>
</body>
</html>