{template 'header.html'}
<div id="c">
<div id="position">
<span><a title="{get('sitename')}" href="{get(site_url)}">{get('sitename')}</a><a title="访客留言" href="{get(site_url)}index.php?case=guestbook&act=index">访客留言</a></span><strong>{lang(nowposition)}</strong>
</div>
{template 'left.html'}

<div id="right">

<div id="text">

<div style="text-align:center;color:red;"><?php if(hasflash()) { ?>
<?php echo showflash(); ?>
<?php } ?>
</div>
<style>
table tr td {line-height:32px;}
table input {height:16px;font-size:14px;line-height:16px;}
</style>
<form method="post" action="" name="form1">
		  <table width="650" border="0" align="center" cellpadding="7" cellspacing="0" style="font-size:14px;">
             <tr>
                <td width="100">&nbsp;&nbsp;&nbsp;{lang(contactname)}：</td>
                <td>{form::input('nickname',get('username'))}
                <span style="color:#FF0000"> *</span></td>
                <td width="100"></td>
              </tr>
			  <tr>
                <td width="100">&nbsp;&nbsp;&nbsp;{lang(guesttel)}：</td>
                <td>{form::input('guesttel',get('guesttel'))}
                <span style="color:#FF0000"> *</span></td>
                <td width="100"></td>
              </tr>
			  <tr>
                <td width="100">&nbsp;&nbsp;&nbsp;{lang(guestemail)}：</td>
                <td>{form::input('guestemail',get('guestemail'))}
                <span style="color:#FF0000"> *</span></td>
                <td width="100"></td>
              </tr>
			  <tr>
                <td width="100">&nbsp;&nbsp;&nbsp;{lang(guestqq)}：</td>
                <td>{form::input('guestqq',get('guestqq'))}
                <span style="color:#FF0000"> *</span></td>
                <td width="100"></td>
              </tr>

              <?php
              $title=$content=null;
              if(empty($submit_success)) {
                  $title=front::post('title');
                  $content=front::post('content');
              }
              ?>
                        <tr>
                <td>&nbsp;&nbsp;&nbsp;{lang(title)}：</td>
                <td colspan="2"><input name="title" id="title" size="50" type="text" value="{$title}">&nbsp;<font color="red">*</font> </td>
              </tr>

                        <tr>
                <td>&nbsp;&nbsp;&nbsp;{lang(content)}：</td>
                <td colspan="2">
                <input type="hidden" id="content" name="content" value="" style="display:none" /><input type="hidden" id="content___Config" value="SkinPath={get(site_url)}fckeditor/editor/skins/silver/&amp;UserFilesPath={get(site_url)}upload/" style="display:none" /><iframe id="content___Frame" src="{get(site_url)}fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Basic" width="98%" height="300" frameborder="0" scrolling="no"></iframe>
		<font color="red">*</font> </td>
              </tr>



  <tr>
                <td colspan="3" align="center" height="10">&nbsp;
                  </td>
              </tr>
            <?php if(config::get('verifycode')){
            ?>
              <tr>
                <td>&nbsp;&nbsp;&nbsp;{lang(verifycode)}：</td>
                <td colspan="2"><span style="float:left;">{verify()}</span><span style="float:left;padding-left:10px;"><input type='text' id="verify"  name="verify" size="10" style="height:16px;" /></span><span style="color:#FF0000;float:left;">*</span>&nbsp;&nbsp;&nbsp;</td>
              </tr>
			  <tr>
                <td colspan="3" align="center" height="10">&nbsp;
                  </td>
              </tr>
              <?php
              }
              ?>
              <tr>
                <td colspan="3" align="center"><input type="submit" name="submit" value="提交" style="float:right;padding:2px; background:none; border:0px none; background-color:#DDDDDD; color:#000000; width:70px;height:20px;line-height:20px;font-size:12px;" />
                  </td>
              </tr>
            </table>
</form>
		<div class="blank30"></div>
		{if $user}

    <h5></h5>

		<div style="border:1px solid #DBE2E6;margin:6px 0px 15px;background:#F7F7F7; text-align:center;color:#0F409C; font-weight:bold; font-size:14px;">{lang(guestlist)}</div>
    
    <table width="650" border="1" align="center" cellpadding="7" cellspacing="0" bordercolor="#EDEDED">

		{loop $data $d}
		<tr>
            <td scope="col" colspan="2"><strong>{$d[username]}</strong><span style="padding-left:20px;">{sdate($d[adddate],'Y-m-d H:i')}</span>
            </td>
        </tr>
        <tr>
		  <td style="width:80px;font-weight:bold;" align="center">{lang(guestcontent)}</td>
          <?php $tags = '<p>,<li>,<b>,<strong>,<ol>,<em>'?>
            <td scope="col">{strip_tags($d[content],$tags)}</td>
			</tr>
         {if $d['reply']}<tr>
		 <td align="center">{lang(adminreply)}</td>
            <td scope="col">
                {$d['reply']}
            </td>
        </tr>{/if}
		{/loop}
    </table>
              </td>
            </tr>
          </table>
		  <div class="clear"></div>
<div class="blank30"></div>
    <div class="pages"><?php echo pagination::html($record_count); ?></div>
{/if}


<div class="blank30"></div>
<a title="{lang(gotop)}" href="#" class="clear floatright"><img alt="{lang(gotop)}" src="{$skin_url}/gotop.gif"></a>
<div class="blank30"></div>

</div>
</div>
<div class="clear"></div>
</div>


<script> 
function resizeImg(obj)
{ 
var obj = document.getElementById(obj); 
var objContent = obj.innerHTML;
var imgs = obj.getElementsByTagName('img'); 
if(imgs==null) return; 
for(var i=0; i<imgs.length; i++) 
{ 
if(imgs[i].width>parseInt(obj.style.width)) 
{ 
imgs[i].width = parseInt(obj.style.width);
} 
} 
} 
window.onload = function() {resizeImg('text');
} 
</script>
{template 'footer.html'}