<!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><?php  echo $guestbook_title; ?> - <?php  echo WEB_NAME; ?></title>
<meta name="keywords" content="<?php  echo WEB_KEYWORDS; ?>" />
<meta name="description" content="<?php  echo WEB_DESCRIPTION; ?>" />

<link type="text/css" rel="stylesheet" href="<?php  echo WEB_HOST; ?>/templates/default/css/style.css" />
<link type="text/css" rel="stylesheet" href="<?php  echo WEB_HOST; ?>/templates/default/css/pages.css" />
<link type="text/css" rel="stylesheet" href="<?php  echo WEB_HOST; ?>/templates/default/css/ie.css" />
<script type="text/javascript" src="<?php  echo WEB_HOST; ?>/js/jquery.js"></script>
</head>

<body>
<div id="container">
	<div id="header">
    	<div id="top">
			<?php  if ( $_SESSION['member_id'] == '') { ?>
			<div id="loginBox">
            	<form name="login_from" method="post" action="<?php  echo WEB_HOST; ?>/index.php?ctl=member&act=front_member_login">
                	<?php  echo $common_header_member_name; ?><!--用户名-->：
                	  <input type="text" name="username" id="username" class="textInput" />
                    <?php  echo $common_header_member_pw; ?><!--密码-->：
                    <input type="password" name="password" id="password" class="textInput" />
					<?php  if ( LOGIN_CODE=='1') { ?>
					<?php  echo $common_header_member_code; ?><!--验证码-->：
					<input name="login_code" id="login_code" type="text" style="text-transform:uppercase; width:40px" class="textInput" />&nbsp;<?php  echo $login_code; ?>
					<?php } ?>
                    &nbsp;&nbsp;<input type="submit" name="button" id="button" class="btnInput" value="<?php  echo $common_header_member_login; ?>" />
                    &nbsp;&nbsp;<input type="button" class="btnInput" onclick="location.href='<?php  echo WEB_HOST; ?>/index.php?ctl=member&act=front_member_register'" value="<?php  echo $common_header_member_reg; ?>" />
            	</form>
			</div><!-- end of loginBox -->
			<?php  } else { ?>
			<div id="alreadyLogin">
            	<span id="whois"><strong><?php  echo $_SESSION['member_name']; ?></strong><?php  echo $common_header_member_welcome; ?></span>
				|<span><img src="<?php  echo WEB_HOST; ?>/templates/default/images/house.png" /><a href="index.php?ctl=home&act=front_home"><?php  echo $common_header_member_home; ?></a></span>
				|<span><a href="index.php?ctl=member&act=front_member_out"><?php  echo $common_header_member_out; ?></a></span>
            </div><!-- end of alreadyLogin -->
			<?php } ?>
            <div id="miniSearch">
            	<form action="index.php" method="get">
							<input type="hidden" name="ctl" value="search" />
							<input type="hidden" name="act" value="front_all_search" />
                    <input type="text" name="keywords" id="keywords" class="textInput" />
                    <input type="submit" name="button3" id="button3" class="btnInput" value="<?php  echo $common_header_member_search; ?>" />
            	</form>
            </div><!-- end of miniSearch -->
        </div><!-- end of top -->
        <div id="topMiddle">
        	<div id="logo">
            	<h1><a href="<?php  echo WEB_HOST; ?>"><?php  echo WEB_NAME; ?></a></h1>
            </div><!-- end of logo -->
            <ul id="miniLinks">
            	<li><a href="index.php?ctl=home&act=front_home"><?php  echo $common_header_member_home; ?></a></li>
            	<li><a href="index.php?ctl=guestbook"><?php  echo $common_header_member_guest_book; ?></a></li>
            	<li class="rss-icon"><a href="index.php?ctl=rss&act=front_rss" target="_blank">RSS</a></li>
            </ul><!-- end of miniLinks -->
        </div><!-- end of topMiddle -->
        <div id="topBottom">
        	<ul id="mainNav">
            	<li <?php  if ( $show_menu == 'index') { ?>class="current"<?php } ?>><span><a href="<?php  echo WEB_HOST; ?>"><?php  echo $common_index; ?></a></span></li>
            	<?php  foreach ( $top_menu as $v) { ?>
            	<?php  if ( RWRITE=='1') { ?>
				<li <?php  if ( $_GET['class_id']==$v['class_id'] ) { ?>class="current"<?php } ?>><span><a href="<?php  echo WEB_HOST; ?><?php  echo CLASSURL; ?><?php  echo $v['class_id']; ?>.html" ><?php  echo $v['class_name']; ?></a></span></li>
				<?php  } else { ?>
				<li <?php  if ( $_GET['class_id']==$v['class_id'] ) { ?>class="current"<?php } ?>><span><a href="<?php  echo WEB_HOST; ?>/index.php?ctl=class&act=front_class&class_id=<?php  echo $v['class_id']; ?>" ><?php  echo $v['class_name']; ?></a></span></li>
				<?php } ?>
				<?php } ?>
				<?php  if ( RWRITE=='1') { ?>
				<li <?php  if ( $show_menu == 'guestbook') { ?>class="current"<?php } ?>><span><a href="<?php  echo WEB_HOST; ?>/guestbook.html"><?php  echo $common_header_member_guestbook; ?></a></span></li>
            	<?php  } else { ?>
            	<li <?php  if ( $show_menu == 'guestbook') { ?>class="current"<?php } ?>><span><a href="<?php  echo WEB_HOST; ?>/index.php?ctl=guestbook"><?php  echo $common_header_member_guestbook; ?></a></span></li>
            	<?php } ?>
			</ul><!-- enf of mainNav -->
        </div><!-- end of topBottom -->
    </div><!-- end of header -->
    <div id="main">
    	<div class="right-main w980">
    	  <!-- end of whereUR -->
<div class="clear"></div>
            <div id="contentWrapper">
            	<div class="search-box">
            	  <form id="form1" name="form1" method="get" action="index.php">
				  <input type="hidden" name="ctl" value="guestbook" />
            	    <label>
            	    <?php  echo $guestbook_keyword; ?><!--关键字-->：
            	    <input type="text" name="keywords" id="keywords" class="textInput" />
            	    </label>
            	    <label>
            	    <input type="radio" name="search_type" id="member" value="member" checked="checked" />
            	    <?php  echo $guestbook_member; ?><!--会员-->
            	    <label>
            	    <label>
            	    <input type="radio" name="search_type" id="content" value="content" />
            	    <?php  echo $guestbook_content; ?><!--内容-->
            	    </label>
            	    </label>
            	    <input type="submit" name="button" id="button" value=" <?php  echo $guestbook_search; ?> " />
            	    </label>
            	  </form>
                </div>
            	<!--search-box-->
                <div class="msg-box">
                	<div class="tit"><h2><?php  echo $guestbook_title; ?><!--留言板--></h2></div>
                    <div class="con">
                    	<ul>
							<?php  if ( $leave_array != '') { ?>
							<?php  foreach ( $leave_array as $val) { ?>
                        	<li>
                            	<div class="msg-meta">
                                	<span class="msg-no">No.<?php  echo $val['leave_id']; ?></span><span class="msg-who"><?php  echo $val['leave_writer']; ?></span></div>
                                <div class="msg-con">
                                	<p class="msg-time"><?php  echo date("Y-m-d H:i:s",$val['leave_time']); ?>&nbsp;&nbsp;&nbsp;&nbsp;IP:<?php  if ( $val['leave_ip']!='') { ?><?php  echo $val['leave_ip']; ?><?php  } else { ?>无<?php } ?></p>
                                    <div class="msg-text"><?php  echo nl2br($val['leave_body']); ?></div>
                                </div>
                            </li>
							<?php } ?>
							<?php } ?>
                        </ul>
                <div class="pagebar">
					<?php  echo $show_page; ?>
                </div><!-- end of pagebar -->
                 </div>
                </div><!--/msg-box-->
				 <div class="msg-box">
                	<div class="tit"><h2><?php  echo $guestbook_add; ?><!--添加留言--></h2></div>
                    <div class="con">
										<?php  if ( LEAVE_LOGIN=='1' and $_SESSION['member_name']=='') { ?>
					<div id="noLogin">
						<a href="#"><?php  echo $guestbook_member_login; ?></a><?php  echo $guestbook_member_login_1; ?><a href="index.php?ctl=member&act=front_member_register"><?php  echo $guestbook_member_reg; ?></a>。
					</div><!-- end of onLogin -->
					<?php } ?>
                    	<div class="msg-add">
                    	  <form action="index.php?ctl=guestbook&act=front_guestbook_save" method="post">
                                <textarea name="comment" class="comment"></textarea>
                                <p><?php  if ( LEAVE_CODE=='1') { ?><?php  echo $guestbook_post_code; ?>：<input name="post_code" id="post_code" type="text" style="text-transform:uppercase; width:40px" class="textInput" />&nbsp;<?php  echo $login_code; ?>&nbsp;&nbsp;<?php } ?>
								<input type="submit" value="<?php  echo $guestbook_submit; ?>" class="btnInput" name="button">
                                </p>
                            </form>
                        </div><!--/msg-add-->
                    </div>
                </div><!--/msg-box-->
                <div id="contentWrapperTop"></div>
                <div id="contentWrapperBottom"></div>
            </div>
            <!-- end of contentWrapper -->
      </div>
    	<!-- end of right-main -->
    </div><!-- end of main -->
    <div id="footer">
    	    	<ul id="bottomNav">
			<?php  if ( $footer_array != '') { ?>
				<?php  foreach ( $footer_array as $val) { ?>
        	<li><a href="<?php  if ( $val['sys_url_jump']!='') { ?><?php  echo $val['sys_url_jump']; ?><?php  } else { ?><?php  echo WEB_HOST; ?>/index.php?ctl=other&act=footer&article_id=<?php  echo $val['sys_article_id']; ?><?php } ?>" target="_blank"><?php  echo $val['sys_article_title']; ?></a></li>
				<?php } ?>
			<?php } ?>
        </ul><!-- enf of bottomNav -->
        <p><?php  if ( WEB_COPYRIGHT!='') { ?><?php  echo html_entity_decode(WEB_COPYRIGHT); ?><?php } ?><?php  if ( WEB_GZIP=='1') { ?>Gzip enabled<?php } ?></p>
        <?php  if ( WEB_IPC!='') { ?><p><a href="http://www.miibeian.gov.cn/" target="_blank"><?php  echo WEB_IPC; ?></a></p><?php } ?>
		<?php  echo html_entity_decode(WEB_STAT_CODE); ?>
    </div><!-- end of footer -->
</div><!-- end of container -->
</body>
</html>
