<?php /* Smarty version 2.6.22, created on 2017-12-13 16:33:06
         compiled from D:%5CphpStudy%5CWWW/templates/admin/default%5Citems%5Cedit.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'D:\\phpStudy\\WWW/templates/admin/default\\items\\edit.html', 90, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['admin_template_path'])."/html/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<link href="<?php echo $this->_tpl_vars['admin_template_data']; ?>
css/resource.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['admin_template_path'])."/html/pagetops.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if ($this->_tpl_vars['errorMessage']): ?>
<div id="errormsg">
<div class="msg">
  <div class="closebtn"><i data-icon="" class="icon-close"></i></div>
  <?php echo $this->_tpl_vars['errorMessage']; ?>

</div>
</div>
<?php echo '
<script type="text/javascript">
seajs.use(["modules/pageui/msg"], function(msg){
    msg.msginit("#errormsg");
});
</script>
'; ?>

<?php endif; ?>

<div class="pagebg">
  <div class="mcontent pagemain clr">
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['admin_template_path'])."/html/leftmenu.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <div class="pagemainconent">

    <div class="rightdetail_admin">
      <div class="sideblock">
        <div class="sideheader">编辑作品</div>
        <div class="sidebody">
        <form id="sampleform" action="" class="" method="post">
          <div class="input-group clr">
            <label class="control-label">作者</label>
            <div class="inputs">
              <label class="checktext"><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
admin/?m=users&c=edit&id=<?php echo $this->_tpl_vars['data']['user']['user_id']; ?>
" title="" target="_blank"><?php echo $this->_tpl_vars['data']['user']['username']; ?>
</a></label>
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label">缩略图</label>
            <div class="inputs uploadobjs clr" id="thumbnail">
              <input autocomplete="off" type="hidden" class="hiddenvalue" name="thumbnail" value="<?php echo $this->_tpl_vars['data']['thumbnail']; ?>
" />
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label"><?php echo $this->_tpl_vars['lang']['main_file']; ?>
</label>
            <div class="inputs uploadobjs clr" id="main_file">
              <input autocomplete="off" type="hidden" class="hiddenvalue" name="main_file" value="<?php echo $this->_tpl_vars['data']['main_file']; ?>
" />
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label">封面预览文件</label>
            <div class="inputs uploadobjs clr" id="first_preview">
              <input autocomplete="off" type="hidden" class="hiddenvalue" name="first_preview" value="<?php echo $this->_tpl_vars['data']['theme_preview']; ?>
" />
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label">其它预览文件</label>
            <div class="inputs uploadobjs clr" id="theme_preview">
              <input autocomplete="off" type="hidden" class="hiddenvalue" name="theme_preview" value="<?php if ($this->_tpl_vars['data']['preview']): ?><?php $_from = $this->_tpl_vars['data']['preview']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['foo'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['foo']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['s']):
        $this->_foreach['foo']['iteration']++;
?><?php echo $this->_tpl_vars['s']['dir']; ?>
<?php if (! ($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?>,<?php endif; ?><?php endforeach; endif; unset($_from); ?><?php endif; ?>" />
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label" for="idesc">详细描述</label>
            <div class="inputs">
              <!--初始化编辑器-->
              <script id="container" name="description" type="text/plain">
              <?php echo $this->_tpl_vars['data']['description']; ?>

              </script>
              <!-- 配置文件 -->
              <script type="text/javascript" src="<?php echo $this->_tpl_vars['template_data']; ?>
ueditor/ueditor.config.js"></script>
              <!-- 编辑器源码文件 -->
              <script type="text/javascript" src="<?php echo $this->_tpl_vars['template_data']; ?>
ueditor/ueditor.all.js"></script>
              <!-- 实例化编辑器 -->
              <script type="text/javascript">
              var ue = UE.getEditor('container');
              </script>
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label">分类</label>
            <div class="inputs">
              <select class="ipttheme" name="category[]"><?php echo $this->_tpl_vars['categoriesSelect']; ?>
</select>
            </div>
            <?php if (isset ( $this->_tpl_vars['error']['category'] )): ?> <?php echo $this->_tpl_vars['error']['category']; ?>
 <?php endif; ?>
          </div>
          <?php if ($this->_tpl_vars['data']['demo_url'] != ''): ?>
          <div class="input-group clr">
            <label class="control-label" for="demo_url">演示url:</label>
            <div class="inputs">
              <input class="input big ipttheme" id="demo_url" type="text" name="demo_url" value="<?php echo ((is_array($_tmp=$_POST['demo_url'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            </div>
          </div>
          <?php endif; ?>
          <div id="attribute_fields">
            <?php if ($this->_tpl_vars['attributes']): ?>
            <?php $_from = $this->_tpl_vars['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['a']):
?>
            <br />
            <div class="input-group clr">
              <label class="control-label"><?php echo $this->_tpl_vars['a']['name']; ?>
</label>
              <div class="inputs">
                <?php if ($this->_tpl_vars['a']['type'] == 'select'): ?>                      
                <select id="custom_attributes_<?php echo $this->_tpl_vars['a']['id']; ?>
" name="attributes[<?php echo $this->_tpl_vars['a']['id']; ?>
]">
                <?php $_from = $this->_tpl_vars['a']['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ai']):
?>
                <option value="<?php echo $this->_tpl_vars['ai']['id']; ?>
" <?php if (isset ( $_POST['attributes'][$this->_tpl_vars['a']['id']][$this->_tpl_vars['ai']['id']] )): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['ai']['name']; ?>
</option>
                <?php endforeach; endif; unset($_from); ?>
                </select>
                <?php elseif ($this->_tpl_vars['a']['type'] == 'multiple'): ?>
                <select multiple="multiple" id="custom_attributes_<?php echo $this->_tpl_vars['a']['id']; ?>
" name="attributes[<?php echo $this->_tpl_vars['a']['id']; ?>
][]">
                <?php $_from = $this->_tpl_vars['a']['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ai']):
?>
                <option value="<?php echo $this->_tpl_vars['ai']['id']; ?>
" <?php if (isset ( $_POST['attributes'][$this->_tpl_vars['a']['id']][$this->_tpl_vars['ai']['id']] )): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['ai']['name']; ?>
</option>
                <?php endforeach; endif; unset($_from); ?>
                </select>
                <?php elseif ($this->_tpl_vars['a']['type'] == 'check'): ?>
                <?php $_from = $this->_tpl_vars['a']['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ai']):
?>
                <input type="checkbox" name="attributes[<?php echo $this->_tpl_vars['a']['id']; ?>
][<?php echo $this->_tpl_vars['ai']['id']; ?>
]" value="<?php echo $this->_tpl_vars['ai']['id']; ?>
" <?php if (isset ( $_POST['attributes'][$this->_tpl_vars['a']['id']][$this->_tpl_vars['ai']['id']] )): ?>checked="checked"<?php endif; ?> class="mt5"/> <?php echo $this->_tpl_vars['ai']['name']; ?>
<br />
                <?php endforeach; endif; unset($_from); ?>
                <?php elseif ($this->_tpl_vars['a']['type'] == 'radio'): ?>
                <?php $_from = $this->_tpl_vars['a']['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ai']):
?>
                <input type="radio" name="attributes[<?php echo $this->_tpl_vars['a']['id']; ?>
]" value="<?php echo $this->_tpl_vars['ai']['id']; ?>
" <?php if (isset ( $_POST['attributes'][$this->_tpl_vars['a']['id']][$this->_tpl_vars['ai']['id']] )): ?>checked="checked"<?php endif; ?> class="mt5" /> <?php echo $this->_tpl_vars['ai']['name']; ?>
 <br />
                <?php endforeach; endif; unset($_from); ?>
                <?php else: ?>
                <input class="big input mt5" type="text" name="attributes[<?php echo $this->_tpl_vars['a']['id']; ?>
]" value="<?php $_from = $_POST['attributes'][$this->_tpl_vars['a']['id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['val']):
?><?php echo $this->_tpl_vars['val']; ?>
<?php endforeach; endif; unset($_from); ?>" />
                <?php endif; ?>
              </div>
            </div>
            <?php endforeach; endif; unset($_from); ?>
            <?php endif; ?>
          </div>
          <div class="input-group clr">
            <label class="control-label">推荐标签</label>
            <div class="inputs tagsinputs">
              <input type="hidden" name="tags" id="tagstxt" />
              <div class="tagtips clr" id="tagtips">
                <span class="tageditbtn"><i class="fa fa-edit m-r-xs"></i> 编辑标签</span>
              </div>
              <div class="addtags clr" id="addtags">
                <div class="tagiptbg">
                  <input type="text" class="ipttheme" id="addtagipt" autocomplete="off"/>
                  <div class="addtaglist" id="addtaglist"></div>
                </div>
                <a class="addtagsbtn">完成</a>
              </div>
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label">可设为免费文件:</label>
            <div class="inputs">
              <?php if ($_POST['free_request'] == 'true'): ?>
              <img src="<?php echo $this->_tpl_vars['template_data']; ?>
/admin/images/icons/24x24/accept.png" alt="" class="middle" />
              <?php else: ?>
              <img src="<?php echo $this->_tpl_vars['template_data']; ?>
/admin/images/icons/24x24/delete.png" alt="" class="middle" />
              <?php endif; ?>	
              <input type="hidden" name="free_request" value="<?php echo $_POST['free_request']; ?>
" />
            </div>
          </div>
          <?php if ($_POST['free_request'] == 'true'): ?>
          <div class="input-group clr">
            <label class="control-label" for="freefile">设为免费文件</label>
            <div class="inputs">
              <input class="checkbox" id="freefile" type="checkbox" name="free_file" value="true" <?php if ($_POST['free_file'] == 'true'): ?>checked="checked"<?php endif; ?> />
              <label class="checktext" for="freefile">是</label>
            </div>
          </div>
          <?php endif; ?>
          <div class="input-group clr">
            <label class="control-label" for="datepick">周推荐</label>
            <div class="inputs">
              <input class="input big ipttheme" type="text" id="datepick" name="weekly_to" value="<?php echo ((is_array($_tmp=$_POST['weekly_to'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
              <span>格式：2015-02-27</span>
            </div>
          </div>
          <div class="input-group clr">
            <label class="control-label" for="price">价格<?php echo $this->_tpl_vars['currency']['symbol']; ?>
</label>
            <div class="inputs">
              <input class="input big ipttheme" id="price" type="text" name="price" value="<?php echo ((is_array($_tmp=$_POST['price'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /> 
            </div>
          </div>
          <div class="form-submit">
            <button type="submit" name="edit" class="btntheme btnsize btn-success">编辑</button>
          </div>
        </form>
        </div>
      </div>
    </div>
    
    </div>
  </div>
</div>
<?php echo '
<script type="text/javascript">
seajs.use(["modules/pageui/upload", "modules/pageui/objtags"], function(ui, tag){
  tag.tagsInit("#tagstxt", "#tagtips", "#addtags", '; ?>
<?php echo $this->_tpl_vars['item_tags']; ?>
<?php echo ', '; ?>
<?php echo $this->_tpl_vars['all_tags']; ?>
<?php echo ');
  ui.uploadInit("/apps/upload/ajax/swfupload/doUpload.php", "'; ?>
<?php echo $this->_tpl_vars['sessID']; ?>
<?php echo '", "readonly");
});
</script>
'; ?>

</body>
</html>