<?php /* Smarty version Smarty-3.1.10, created on 2015-01-23 14:43:35
         compiled from "D:\web\38dir\themes\member\article.html" */ ?>
<?php /*%%SmartyHeaderCode:1561754c1ed97750c53-20731746%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '61021117002e1b96f81bcaf5759e580e6a9d0250' => 
    array (
      0 => 'D:\\web\\38dir\\themes\\member\\article.html',
      1 => 1421922174,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1561754c1ed97750c53-20731746',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'pagename' => 0,
    'action' => 0,
    'articles' => 0,
    'row' => 0,
    'showpage' => 0,
    'category_option' => 0,
    'do' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.10',
  'unifunc' => 'content_54c1ed97c513e1_97757773',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54c1ed97c513e1_97757773')) {function content_54c1ed97c513e1_97757773($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<script type="text/javascript">
function check_sl(x,y){
		$("#sl_"+y).load("/module/baidu.php",{url:x});
}</script>
		
            <div class="content  ">
            	<div class="title"><?php echo $_smarty_tpl->tpl_vars['pagename']->value;?>
</div>
                <div class="body">
        			<?php if ($_smarty_tpl->tpl_vars['action']->value=='list'){?>
        			<div id="listbox">
						<table width="100%" border="0" cellspacing="1" cellpadding="0">
							<tr>
								<th>ID</th>
								<th>所属分类</th>
								<th>文章标题</th>
								<th>属性状态</th>
								<th>发布时间</th>
								<th>操作选项</th>
								<th>百度收录</th>
							</tr>
							<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['articles']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
							<tr>
								<td><?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
</td>
								<td><?php echo $_smarty_tpl->tpl_vars['row']->value['cate_name'];?>
</td>
								<td class="textleft"><a href="<?php echo $_smarty_tpl->tpl_vars['row']->value['art_link'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['row']->value['art_title'];?>
</a></td>
								<td><?php echo $_smarty_tpl->tpl_vars['row']->value['art_attr'];?>
</td>
								<td><?php echo $_smarty_tpl->tpl_vars['row']->value['art_ctime'];?>
</td>								
								<td><a href="?mod=article&act=edit&aid=<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
">修改</a></td><td>
								<div id="sl_<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
"><a href="javascript:check_sl('www.diyidir.com<?php echo $_smarty_tpl->tpl_vars['row']->value['art_link'];?>
',<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
)">点击检测</a></div></td>
							</tr>
							<?php }
if (!$_smarty_tpl->tpl_vars['row']->_loop) {
?>
							<tr><td colspan="6">您还未发布任何文章！</td></tr>
							<?php } ?>
						</table>
					</div>
        			<div id="showpage" class="clearfix"><?php echo $_smarty_tpl->tpl_vars['showpage']->value;?>
</div>
        			<?php }?>
        
        			<?php if ($_smarty_tpl->tpl_vars['action']->value=='add'||$_smarty_tpl->tpl_vars['action']->value=='edit'){?>
        			<div style="background: #ffc; border: dashed 1px #f60; color: #f30; margin-top: 6px; margin-bottom:5px; padding: 8px;">
		<font size=3px>您还在担心无处发软文么？还在为软文被删除而烦恼么？<br>
		目录网站为您提供最优质的软文外链发布基地。<br>
只要您在本站提交了您的网站并且审核通过了，那么您就可以在本站每天免费发布一条软文外链信息，本站承诺永不删链。</div>
<div id="formbox">
</font>						<form name="myfrom" id="myfrom" method="post" action="?mod=article">
        				<ul>
        			<div id="formbox">
        					<li><strong>选择分类：</strong>
							<select name="cate_id_f" id="cate_id_f">
							 <option value="" style="background: #EEF3F7;">第一级分类</option>
							</select>	
							<select name="cate_id" id="cate_id">
							 <option value="" style="background: #EEF3F7;">第二级分类</option>
							</select>
							
							<select name="cate_id_i" style="display:none;" id="cate_id_i">
							<?php echo $_smarty_tpl->tpl_vars['category_option']->value;?>

							</select>			
							
							<select id="cate_id_y" name="cate_id_y" style="display:none;">
							<?php echo $_smarty_tpl->tpl_vars['category_option']->value;?>

							</select>							
							</li>
        					<li><strong>文章标题：</strong><input name="art_title" type="text" class="ipt" id="art_title" size="50" maxlength="100" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['art_title'];?>
" /><font color=red>*必须以[原创][伪原创][转载]开头</li>
            				<li><strong>TAG标签：</strong><input name="art_tags" type="text" class="ipt" id="art_tags" size="50" maxlength="50" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['art_tags'];?>
" onBlur="javascript:this.value=this.value.replace(/，/ig,',');" /></li>
            				<li><strong>内容来源：</strong><input name="copy_from" type="text" class="ipt" id="copy_from" size="50" maxlength="50" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['copy_from'];?>
" /></li>
							<li><strong>来源地址：</strong><input name="copy_url" type="text" class="ipt" id="copy_url" size="50" maxlength="200" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['copy_url'];?>
" /></li>
							<li><strong>内容摘要：</strong><textarea name="art_intro" cols="50" rows="5" class="ipt" id="art_intro"><?php echo $_smarty_tpl->tpl_vars['row']->value['art_intro'];?>
</textarea></li>
                			<li><strong>文章内容：</strong>
							<script type="text/javascript">
							var editor;
							KindEditor.ready(function(K) {
							editor = K.create('textarea[name="art_content"]', {
								resizeType : 1,
								allowPreviewEmoticons : false,
								allowImageUpload : true,
								uploadJson : '?mod=upload&act=upload',
								items : [
									'source', '|', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
									'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
									'insertunorderedlist', '|', 'emoticons', 'image', 'link', '|', 'fullscreen']
								});
							});
                    		</script>
                    		<textarea name="art_content" id="art_content" cols="50" rows="6" class="ipt" style="width: 530px; height: 400px; visibility: hidden;"><?php echo $_smarty_tpl->tpl_vars['row']->value['art_content'];?>
</textarea></li>
	<font color=red>注意事项：1、标题中必须注明[原创][转载][伪原创]，否则文章将不会审核通过。<br>
　　　　　2、每位用户每天可以免费发布一篇软文，超出部分本站将会删除软文中的外链接地址。<br>
　　　　　3、审核时间为[原创]24小时以内，[伪原创]72小时以内，[转载]7天以内。<br>
　　　　　4、其它更多详细说明请<a href=""><font color=#0000FF>【点我查看】</font></a>。</font>
            				<li><strong>&nbsp;</strong><input type="hidden" name="art_id" id="art_id" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
"><input type="hidden" name="do" id="do" value="<?php echo $_smarty_tpl->tpl_vars['do']->value;?>
"><input type="submit" class="btn" value="提 交"> <input type="reset" class="btn" value="重 填"></li>
        				</ul>
        				</form>
    				</div>
					<?php }?>
            	</div>
			</div>
  <script type="text/javascript"> 
			$(function(){
				$("#cate_id_i option[style]").appendTo("#cate_id_f");
				$("#cate_id_f option:eq(0)").attr("selected","selected")
				$("#cate_id_f").change(function(){
					$("#cate_id").empty();
					//alert($(this).val());
					var v = $(this).val();// 当前选择的 项的值		
					// 当前选择的项，在当前列表中的位置
					var vi = $("#cate_id_f option[value="+v+"]").index() ;
					 
					var len = 	$("#cate_id_f option").length;
				 
					if(vi < len - 1){
						vi +=1;// 当前项的下一项	
						
						// 当前项的下一项的值
						var v_v = $("#cate_id_f option:eq("+vi+")").val();	
						// 当前选择的项，在原始列表中的位置
						var ci = $("#cate_id_y option[value="+v+"]").index();
						
						var cvi = $("#cate_id_y option[value="+v_v+"]").index();						
					}else{
					 	var ci = $("#cate_id_y option[value="+v+"]").index();
						cvi = $("#cate_id_y option").length;
							console.debug(cvi+ ' =');	
					}	

					 var i = 0;
					 for(i=ci+1;i<cvi;i++){
						 //if(i>$("#cate_id_y option").length) break;
						 $("#cate_id_y option:eq("+i+")").clone().appendTo("#cate_id");
						  //console.debug($("#cate_id_y option:eq("+i+")").clone().html());
						// console.debug(i);
					} 
	//console.debug(v + '--' + vi + '--' + v_v  + '--' + ci + '--' + cvi );					
				})
				
				/*	var v = $("#cate_id_f option:eq(0)").val();// 当前选择的 项的值		
					// 当前选择的项，在当前列表中的位置
					var vi = $("#cate_id_f option[value="+v+"]").index() ;
					vi +=1;// 当前项的下一项	 
					// 当前项的下一项的值
					var v_v = $("#cate_id_f option:eq("+vi+")").val();	
					// 当前选择的项，在原始列表中的位置
					var ci = $("#cate_id_y option[value="+v+"]").index();
					var cvi = $("#cate_id_y option[value="+v_v+"]").index();
					 var i = 0;
					 for(i=ci+1;i<cvi;i++){
						 $("#cate_id_y option:eq("+i+")").clone().appendTo("#cate_id");
					}  	
					
					var sv = $("#cate_id_y option:selected").val();
					if(sv){
					    $("#cate_id").empty();
						$("#cate_id_y option[value="+sv+"]").clone().appendTo("#cate_id");
						
						var pv = $("#cate_id_y option[value="+sv+"]").prev("option[style]").val();
						$("#cate_id_f option[value="+pv+"]").attr("selected","selected");
						console.debug(pv);
 
					}
					*/
					//alert(sv);						
			})
			
			</script>
<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>