<?php /* Smarty version 2.6.19, created on 2014-03-07 08:48:49
         compiled from sites.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'db_fetchpage', 'sites.tpl', 32, false),)), $this); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>管理中心</title>
<script type="text/javascript" src="../common/common.js"></script>
<style type="text/css">
*{ margin:0; padding:0; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif;}
body{ background:none;}
p{ font-weight:bold; line-height:15px; height:25px; margin:0; padding:4px 0 0 0; width:625px; overflow:hidden; color:#338CE6;}
p b{ display:block; float:left;}
p span{ display:block; float:left; color:#e62; font-weight:normal; padding:0 0 0 18px;}
p span a{ color:#666; text-decoration:none;}
p span a:hover{ color:#e23;}
p span em{ font-style:normal; color:#e63;}
div{ padding:7px 0 0 0; font-family:sinsum;}
div a{ color:#338CE6; text-decoration:none;}
div a:hover{ color:#e00; text-decoration:underline;}
table tr td{ height:21px; line-height:21px; padding:3px 0;}
table tr td a{ color:#454545; text-decoration:none;}
table tr td.sites a{ color:#000;}
table tr td a:hover{ color:#f00; text-decoration:underline;}
table.webtable tr:hover{ background:#f6f6f6;}
</style>
</head>


<body>

<p><b>我的收藏</b><span><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "_head.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></span></p>


<?php echo smarty_function_db_fetchpage(array('table' => 'usersites','items' => "*",'condition' => "f_userId=".($this->_tpl_vars['userId']),'orderby' => "f_order ASC, f_id ASC",'page' => ($this->_tpl_vars['page']),'pagesize' => '20','varname' => 'arr'), $this);?>

<?php if (! $this->_tpl_vars['arr']): ?>
<div>您的收藏夹里还没有网址，<a href="site_add.php">现在添加</a></div>
<?php else: ?>


<table width="666" border="0" cellpadding="0" cellspacing="0" class="webtable">

  <?php unset($this->_sections['loop']);
$this->_sections['loop']['name'] = 'loop';
$this->_sections['loop']['loop'] = is_array($_loop=$this->_tpl_vars['arr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['loop']['show'] = true;
$this->_sections['loop']['max'] = $this->_sections['loop']['loop'];
$this->_sections['loop']['step'] = 1;
$this->_sections['loop']['start'] = $this->_sections['loop']['step'] > 0 ? 0 : $this->_sections['loop']['loop']-1;
if ($this->_sections['loop']['show']) {
    $this->_sections['loop']['total'] = $this->_sections['loop']['loop'];
    if ($this->_sections['loop']['total'] == 0)
        $this->_sections['loop']['show'] = false;
} else
    $this->_sections['loop']['total'] = 0;
if ($this->_sections['loop']['show']):

            for ($this->_sections['loop']['index'] = $this->_sections['loop']['start'], $this->_sections['loop']['iteration'] = 1;
                 $this->_sections['loop']['iteration'] <= $this->_sections['loop']['total'];
                 $this->_sections['loop']['index'] += $this->_sections['loop']['step'], $this->_sections['loop']['iteration']++):
$this->_sections['loop']['rownum'] = $this->_sections['loop']['iteration'];
$this->_sections['loop']['index_prev'] = $this->_sections['loop']['index'] - $this->_sections['loop']['step'];
$this->_sections['loop']['index_next'] = $this->_sections['loop']['index'] + $this->_sections['loop']['step'];
$this->_sections['loop']['first']      = ($this->_sections['loop']['iteration'] == 1);
$this->_sections['loop']['last']       = ($this->_sections['loop']['iteration'] == $this->_sections['loop']['total']);
?>
  <?php if ($this->_sections['loop']['index']%2): ?>
  <?php $this->assign('rowClass', " class='lineA'"); ?>
  <?php else: ?>
  <?php $this->assign('rowClass', ""); ?>
  <?php endif; ?>
  <tr>
    <td width="473" class="sites" <?php echo $this->_tpl_vars['rowClass']; ?>
 align="left"><a href="<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_url']; ?>
" target="_blank"><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_name']; ?>
</a></td>
    <td width="93" <?php echo $this->_tpl_vars['rowClass']; ?>
><?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_order']; ?>
</td>
    <td width="70" <?php echo $this->_tpl_vars['rowClass']; ?>
><a href="site_modify.php?id=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
">修改</a> | <a href="site_delete.php?id=<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
" onClick="return confirm('您将要删除这个网址，是否确定？')">删除</a></td>
  </tr>
  <?php endfor; endif; ?>
</table>
<iframe width="0" height="0" src="_sync.php" style="display:none;"></iframe>
<?php endif; ?>


</body>
</html>