function main() { $fpath = "../template/" . app_templatedir . "/ads/"; if (!is_dir($fpath)) { mkdir($fpath); } $fso = opendir($fpath); ?> <script language="javascript"> $(document).ready(function(){ $("#btnAdd").click(function(){ location.href= "?action=add"; }); }); </script> <script type="text/javascript" src="../js/function.js"></script> <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td> <h3>当前广告文件存放路径:<?php echo $fpath; ?> </h3> </td> </tr> </table> <table class="tb"> <tr> <td width="15%">广告名称</td> <td width="10%">文件大小</td> <td width="15%">修改时间</td> <td>广告调用代码</td> <td width="15%">操作</td> </tr> <?php if (count($fso) == 0) { ?> <tr><td align="center" colspan="5">没有任何记录!</td></tr> <?php } else { while ($sFile = readdir($fso)) { if (is_file($fpath . $sFile)) { $fsize = round(filesize($fpath . $sFile) / 1024); $ftime = isToDay(date('Y-m-d H:i:s', filemtime($fpath . $sFile))); ?> <tr> <td><?php echo $sFile; ?> </td> <td><?php echo $fsize; ?> KB</td> <td><?php echo $ftime; ?> </td> <td> <input id="text<?php echo $sFile; ?> " name="text<?php echo $sFile; ?> " type="text" value='<script src="{joyplus:templatepath}ads/<?php echo $sFile; ?> "></script>' size="70"> <input class="input" type="button" value="复制" name=Submit onClick='copyData(document.getElementById("text<?php echo $sFile; ?> ").value);'> </td> <td><A href="admin_ads.php?action=edit&file=<?php echo $sFile; ?> ">修改</a> | <A href="admin_ads.php?action=del&file=<?php echo $sFile; ?> " onClick="return confirm('确定要删除吗?');">删除</a></td> </tr> <?php } } } ?> <tr> <td colspan="5"><input type="button" id="btnAdd" value="添加" class="input"/></td> </tr> </table> <?php }
function main() { global $db, $cache; $pagenum = be("get", "page"); if (isN($pagenum) || !isNum($pagenum)) { $pagenum = 1; } if ($pagenum < 1) { $pagenum = 1; } $pagenum = intval($pagenum); $sql = "select * from {pre}cj_vod_projects "; $rscount = $db->query($sql); $nums = $db->num_rows($rscount); //总记录数 $pagecount = ceil($nums / app_pagenum); //总页数 $sql = $sql . "limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum; $rs = $db->query($sql); ?> <table border="0" cellpadding="3" cellspacing="1"> <tr> <td> 菜单:<a href="collect_vod_manage.php?action=add">添加采集规则</a> | <a href="collect_vod_manage.php?action=upexp">导入采集规则</a> </td> </tr> </table> <form action="" method="post" name="form1"> <table class="collect_vod_manage tb"> <tr> <td width="5%"> </td> <td width="10%">项目名称</td> <td width="10%">播放类型</td> <td width="10%">入库分类</td> <td width="20%">上次采集</td> <td width="45%">操作</td> </tr> <?php if (!$rs) { ?> <tr><td align="center" colspan="7" >没有任何记录!</td></tr> <?php } else { while ($row = $db->fetch_array($rs)) { ?> <tr> <td><input name="p_id[]" type="checkbox" id="p_id" value="<?php echo $row["p_id"]; ?> " /></td> <td><a href="?action=edit&p_id=<?php echo $row["p_id"]; ?> "><?php echo $row["p_name"]; ?> </a></td> <td><?php echo $row["p_playtype"]; ?> </td> <td> <?php if ($row["p_classtype"] == 1) { echo "<font color=red>自定义分类</font>"; } else { $typearr = getValueByArray($cache[0], "t_id", $row["p_collect_type"]); echo $typearr["t_name"]; } ?> </td> <td><?php echo isToDay($row['p_time']); ?> </td> <td> <A href="collect_vod_cj.php?ignoreExistM=true&p_id=<?php echo $row["p_id"]; ?> ">采集</A>| <A href="collect_vod_cj.php?p_id=<?php echo $row["p_id"]; ?> ">采集(包括已经采集过)</A>| <A href="?action=collectSimple&p_id=<?php echo $row["p_id"]; ?> &p_name=<?php echo $row["p_name"]; ?> ">采集单个视频</A>| <A href="?action=collectVideo&p_id=<?php echo $row["p_id"]; ?> &p_name=<?php echo $row["p_name"]; ?> ">采集视频地址</A>| <A href="?action=edit&p_id=<?php echo $row["p_id"]; ?> ">设置</A>| <A href="?action=copy&p_id=<?php echo $row["p_id"]; ?> ">复制</A>| <A href="?action=export&p_id=<?php echo $row["p_id"]; ?> ">导出</A>| <A href="?action=del&p_id=<?php echo $row["p_id"]; ?> ">删除</A> </td> </tr> <?php } } ?> <tr class="formlast"> <td colspan="6"> <input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'p_id[]');"/> 全选 <input type="submit" value="批量删除" onClick="if(confirm('确定要删除吗')){form1.action='?action=delall';}else{return false}" class="input"/> </td> </tr> <tr align="center" class="formlast"> <td colspan="7"> <?php echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "collect_vod_manage.php?page={p}"); ?> </td> </tr> </table> </form> <?php }
function main() { global $db, $cache; $pagenum = be("get", "page"); if (isN($pagenum) || !isNum($pagenum)) { $pagenum = 1; } if ($pagenum < 1) { $pagenum = 1; } $pagenum = intval($pagenum); $keyword = be("get", "keyword"); $from = be("get", "playfrom"); $project = be("get", "cj_vod_projects"); $zt = be("get", "zt"); $sql = "Select a.*,b.p_name as p_name from {pre}cj_vod a,{pre}cj_vod_projects b where a.m_pid=b.p_id and m_playfrom not in ('tudou','kankan','cntv','wasu') "; if ($zt != "") { $sql = $sql . " and m_zt = " . $zt; } if ($keyword != "") { $keyword = trim($keyword); $sql = $sql . " and m_name like '%" . $keyword . "%' "; } if ($project != "") { $sql = $sql . " and a.m_pid = " . $project; } if ($from != "") { $sql = $sql . " and a.m_playfrom ='" . $from . "' "; } $sql = $sql . " order by m_zt asc, m_addtime desc,m_name desc "; $rscount = $db->query($sql); $nums = $db->num_rows($rscount); //总记录数 $pagecount = ceil($nums / app_pagenum); //总页数 $sql = $sql . " limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum; $rs = $db->query($sql); ?> <script language="javascript"> $(document).ready(function () { $("#btnDel").click(function () { if (confirm('确定要删除吗')) { $("#form1").attr("action", "?action=delpl"); $("#form1").submit(); } }); $("#btnDelall").click(function () { if (confirm('确定要删除吗')) { $("#form1").attr("action", "?action=delall"); $("#form1").submit(); } }); $("#btnSelin").click(function () { if (confirm('确定入库您所选择的数据吗')) { $("#form1").attr("action", "?action=IDInflow"); $("#form1").submit(); } }); $("#btnSelinZhuiju").click(function () { if (confirm('确定添加您所选择的数据到自动采集/自动入库吗')) { $("#form1").attr("action", "?action=IDInflowZhuiJu"); $("#form1").submit(); } }); $("#btnAllin").click(function () { if (confirm('全部入库你所采集的数据吗')) { $("#form1").attr("action", "?action=AllInflow"); $("#form1").submit(); } }); $("#btnNoin").click(function () { if (confirm('确定入库所有未入库的数据吗')) { $("#form1").attr("action", "?action=noInflow"); $("#form1").submit(); } }); $("#noInflowProject").click(function () { var keyword = $("#keyword").val(); var playfrom = $("#playfrom").val(); var project = $("#cj_vod_projects").val(); if (confirm('确定所搜视频入库未入库吗')) { $("#form1").attr("action", "?action=noInflowProject&keyword=" + keyword + "&playfrom=" + playfrom + "&cj_vod_projects=" + project); $("#form1").submit(); } }); $("#AllInflowProject").click(function () { var keyword = $("#keyword").val(); var playfrom = $("#playfrom").val(); var project = $("#cj_vod_projects").val(); if (confirm('确定所搜视频全部入库吗')) { $("#form1").attr("action", "?action=AllInflowProject&keyword=" + keyword + "&playfrom=" + playfrom + "&cj_vod_projects=" + project); $("#form1").submit(); } }); $("#btnType").click(function () { if (confirm('确定更新所选数据的分类吗')) { $("#form1").attr("action", "?action=editype"); $("#form1").submit(); } }); }); </script> <TABLE width="96%" border=0 align=center cellpadding=0 cellSpacing=0 class=tbtitle> <TBODY> <tr> <td> <form action="collect_vod.php" method="get"><strong>搜索影片:</strong> <input type="hidden" name="action" value="main"> <input id=keyword size=40 name=keyword value="<?php echo $keyword; ?> "> <select id="playfrom" name=playfrom> <option value="">视频播放器</option> <?php echo makeSelectPlayer($from); ?> </select> <select id="cj_vod_projects" name="cj_vod_projects"> <option value="">全部采集项目</option> <?php echo makeSelect("{pre}cj_vod_projects", "p_id", "p_name", "", "", " | ", $project); ?> </select> <INPUT class=inputbut type=submit value=搜索 name=submit></form> </td> </tr> </TBODY> </TABLE> <form action="" method="post" name="form1" id="form1"> <table class="collect_vod tb"> <tr> <td width="4%"> </td> <td>影片名称</td> <td width="7%">状态</td> <td width="7%">播放器</td> <td width="10%">栏目分类</td> <td width="10%">地区</td> <td width="10%">上映日期</td> <td width="15%">所属采集项目</td> <td width="13%">更新时间</td> <td width="8%">操作</td> </tr> <?php if (!$rs) { ?> <tr> <td align="center" colspan="9">没有任何记录!</td> </tr> <?php } else { $i = 0; while ($row = $db->fetch_array($rs)) { ?> <tr> <td><input name="m_id[]" type="checkbox" id="m_id" value="<?php echo $row["m_id"]; ?> "/></td> <td><?php echo $row["m_name"]; ?> (连载:<?php echo $row["m_state"]; ?> )</td> <td><?php if ($row["m_zt"] == 1) { echo "<font color=\"#FF0000\">已入库</font>"; } else { echo "未入库"; } ?> </td> <td><?php echo $row["m_playfrom"]; ?> </td> <td><?php if ($row["m_typeid"] == 0) { ?> <font color="#FF0000">没找到对应分类请配置</font> <?php } else { $typearr = getValueByArray($cache[0], "t_id", $row["m_typeid"]); echo $typearr["t_name"]; } ?> </td> <td><?php echo $row["m_area"]; ?> </td> <td><?php echo $row["m_year"]; ?> </td> <td><?php echo $row["p_name"]; ?> </td> <td><?php echo isToDay($row['m_addtime']); ?> </td> <td><A href="?action=edit&m_id=<?php echo $row["m_id"]; ?> ">修改</A>|<A href="?action=del&m_id=<?php echo $row["m_id"]; ?> ">删除</A></td> </tr> <?php } } ?> <tr class="formlast"> <td colspan="9"><input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'m_id[]');"/> 全选 <input type="button" id="btnDel" value="批量删除" class="btn"/> <!-- <input type="button" id="btnDelall" value="删除所有" class="btn" />--> <input type="button" id="btnSelin" class="btn" name="Submit" value="入库所选"> <input type="button" id="btnSelinZhuiju" class="btn" name="Submit" value="添加到自动采集入库"> <!-- <input type="button" id="btnAllin" class="btn" name="Submit" value="全部入库" >--> <!-- <input type="button" id="btnNoin" class="btn" name="Submit" value="入库未入库" >--> <input type="button" id="AllInflowProject" class="btn" name="Submit" value="所搜视频全部入库"> <input type="button" id="noInflowProject" class="btn" name="Submit" value="所搜视频入库未入库"> <font color="#FF0000"> </font></td> </tr> <tr class="formlast"> <td colspan="9">入库同名处理: <input type="radio" name="CCTV" value="0" checked>自动处理 <input type="radio" name="CCTV" value="1">始终新增数据 <input type="radio" name="CCTV" value="2">新增播放器组 <input type="radio" name="CCTV" value="3">不处理 <br/> 强制覆盖数据: <input type="checkbox" name="CCTV1" value="1">年份 <input type="checkbox" name="CCTV2" value="2">地区 <input type="checkbox" name="CCTV3" value="3">演员 <input type="checkbox" name="CCTV4" value="4">图片 <input type="checkbox" name="CCTV5" value="5">简介 <input type="checkbox" name="CCTV6" value="6">语言 <input type="checkbox" name="CCTV7" value="7">备注 <input type="checkbox" name="CCTV8" value="8">导演 <input type="checkbox" name="CCTV9" value="9">影片长度 <br/> <font color="#FF0000">注意 :自动判断播放来源,如遇到相同来源则更新数据。</font></td> </tr> <tr align="center" class="formlast"> <td colspan="9"><?php echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "collect_vod.php?action=main&page={p}&cj_vod_projects=" . $project . "&keyword=" . $keyword . "&playfrom=" . $from); ?> </td> </tr> </table> </form> <?php }
function main() { global $db, $template, $cache; $keyword = be("all", "keyword"); $stype = be("all", "stype"); $order = be("all", "order"); $topic = be("all", "topic"); $pagenum = be("all", "page"); $hide = be("all", "hide"); $repeat = be("all", "repeat"); $repeatlen = be("all", "repeatlen"); if (!isNum($stype)) { $stype = 0; } else { $stype = intval($stype); } if (!isNum($topic)) { $topic = 0; } else { $topic = intval($topic); } if (!isNum($repeatlen)) { $repeatlen = 0; } if (!isNum($hide)) { $hide = -1; } else { $hide = intval($hide); } if (!isNum($pagenum)) { $pagenum = 1; } else { $pagenum = intval($pagenum); } if ($pagenum < 1) { $pagenum = 1; } $where = " 1=1 "; if (!isN($keyword)) { $where = $where . " AND a_title LIKE '%" . $keyword . "%' "; } if ($stype > 0) { $typearr = getValueByArray($cache[1], "t_id", $stype); if (is_array($typearr)) { $where = $where . " and a_type in (" . $typearr["childids"] . ")"; } else { $where .= " AND a_type=" . $stype . " "; } } if ($stype == -1) { $where = $where . " AND a_type =0 "; } if ($topic > 0) { $where = $where . " AND a_topic = " . $topic . " "; } if ($hide > -1) { $where .= " AND a_hide=" . $hide . " "; } if ($repeat == "ok") { $repeatSearch = " a_title "; if ($repeatlen > 0) { $repeatSearch = " substring(a_title,1," . $repeatlen . ") as `a_title1` "; } $where .= " AND a_title IN (SELECT " . $repeatSearch . " FROM {pre}vod GROUP BY " . $repeatSearch . " HAVING COUNT(*)>1) "; } if (isN($order)) { $order = "a_addtime"; } $sql = "SELECT count(*) FROM {pre}art where " . $where; $nums = $db->getOne($sql); $pagecount = ceil($nums / app_pagenum); $sql = "SELECT a_id, a_title,a_subtitle, a_entitle, a_type,a_topic, a_content, a_author, a_color, a_time, a_hits,a_hide FROM {pre}art WHERE " . $where . " ORDER BY " . $order . " DESC limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum; $rs = $db->query($sql); ?> <script language="javascript"> $(document).ready(function(){ $("#btnrepeat").click(function(){ var repeatlen = $("#repeatlen").val(); var reg = /^\d+$/; var re = repeatlen.match(reg); if (!re){ alert("请输入数字");$("#repeatlen").focus();return;} if (repeatlen >10){ alert("长度最大10");$("#repeatlen").focus();return;} var url = "admin_art.php?repeat=ok&repeatlen=" + repeatlen; window.location.href=url; }); $("#btnDel").click(function(){ if(confirm('确定要删除吗')){ $("#form1").attr("action","admin_ajax.php?action=del&tab={pre}art"); $("#form1").submit(); } else{return false} }); $("#plsc").click(function(){ var ids="",rc=false; $("input[name='a_id[]']").each(function() { if(this.checked){ if(rc)ids+=","; ids = ids + this.value; rc=true; } }); $("#form1").attr("action","admin_makehtml.php?action=viewpl&flag=art&d_id="+ids); $("#form1").submit(); }); }); function filter(){ var stype=$("#stype").val(); var order=$("#order").val(); var keyword=$("#keyword").val(); var topic=$("#topic").val(); var hide=$("#hide").val(); var url = "admin_art.php?keyword="+encodeURI(keyword)+"&stype="+stype+"&topic="+topic+"&order="+order+"&hide="+hide; window.location.href=url; } function gosyncpic(){ if(confirm('确定要同步下载远程图片吗?数据不可恢复,请做好备份')){ location.href = 'admin_pic.php?action=syncartpic'; } } </script> <table class="tb"> <tr> <td> <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td colspan="2" > 过滤条件:<select id="stype" name="stype"> <option value="0">文章栏目</option> <option value="-1" <?php if ($stype == -1) { echo "selected"; } ?> >没有栏目</option> <?php echo makeSelectAll("{pre}art_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", " | ", $stype); ?> </select> <select id="topic" name="topic"> <option value="0">文章专题</option> <?php echo makeSelect("{pre}art_topic", "t_id", "t_name", "t_sort", "", " | ", $topic); ?> </select> <select id="order" name="order"> <option value="a_time">文章排序</option> <option value="a_id" <?php if ($order == "a_id") { echo "selected"; } ?> >文章编号</option> <option value="a_title" <?php if ($order == "a_title") { echo "selected"; } ?> >文章名称</option> <option value="a_hits" <?php if ($order == "a_hits") { echo "selected"; } ?> >文章人气</option> </select> <select id="hide" name="hide"> <option value="-1">文章显隐</option> <option value="0" <?php if ($hide == 1) { echo "selected"; } ?> >显示</option> <option value="1" <?php if ($hide == 2) { echo "selected"; } ?> >隐藏</option> </select> </td> </tr> <tr> <td> 关键字:<input id="keyword" size="40" name="keyword" value="<?php echo $keyword; ?> "> <input class="input" type="button" value="搜索" id="btnsearch" onClick="filter();"> 检测名称长度:<input id="repeatlen" size="2" name="repeatlen" > <input class="input" type="button" value="检测重复数据" id="btnrepeat" name="btnrepeat" > </td> <td width="150px"> <span>【<a href="###" onclick="javascript:gosyncpic();"><font color="red"><strong>同步下载远程图片</strong></font></a>】</span> </td> </tr> </table> </td> </tr> </table> <form action="" method="post" id="form1" name="form1"> <table class="tb"> <tr> <td width="4%"> </td> <td>标题</td> <td width="9%">分类</td> <td width="6%">人气</td> <td width="5%">专题</td> <td width="5%">浏览</td> <td width="15%">时间</td> <td width="15%">操作</td> </tr> <?php if ($nums == 0) { ?> <tr><td align="center" colspan="7">没有任何记录!</td></tr> <?php } else { while ($row = $db->fetch_array($rs)) { $a_id = $row["a_id"]; $tname = "未知"; $tenname = ""; $typearr = getValueByArray($cache[1], "t_id", $row["a_type"]); if (is_array($typearr)) { $tname = $typearr["t_name"]; $tenname = $typearr["t_enname"]; } ?> <tr> <td><input name="a_id[]" type="checkbox" value="<?php echo $row["a_id"]; ?> " /></td> <td><?php echo $row["a_title"]; ?> <?php if ($row["a_hide"] == 1) { echo "<font color=\"red\">[隐藏]</font>"; } ?> </td> <td><?php echo $tname; ?> </td> <td><?php echo $row["a_hits"]; ?> </td> <td id="zt<?php echo $row["a_id"]; ?> " > <?php if ($row["a_topic"] == 0) { ?> <?php echo "<img src=\"../images/icons/icon_02.gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"setday('zt','" . $row["a_id"] . "','art')\"/>"; ?> <?php } else { ?> <?php echo "<img src=\"../images/icons/icon_01.gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"ajaxdivdel('" . $row["a_id"] . "','zt','art')\"/>"; ?> <?php } ?> </td> <td> <?php if ($row["a_type"] == 0) { $mlink = "#"; } else { $mlink = "../" . $template->getArtLink($row["a_id"], $row["a_title"], $row["a_entitle"], $row["a_type"], $tname, $tenname, true); } $mlink = replaceStr($mlink, "../" . app_installdir, "../"); if (substring($mlink, 1, strlen($mlink) - 1) == "/") { $mlink = $mlink . "index." . app_artsuffix; } if (app_artcontentviewtype == 2) { if (file_exists($mlink)) { ?> <a target="_blank" href="<?php echo $mlink; ?> "><Img src="../images/icons/html_ok.gif" border="0" alt='浏览' /></a> <?php } else { ?> <a href="admin_makehtml.php?action=viewpl&flag=art&d_id=<?php echo $row["a_id"]; ?> "><Img src="../images/icons/html_no.gif" border="0" alt='生成' /></a> <?php } } else { ?> <a target="_blank" href="<?php echo $mlink; ?> "><Img src="../images/icons/html_ok.gif" border="0" alt='浏览' /></a> <?php } ?> </td> <td><?php echo isToDay($row["a_time"]); ?> </td> <td><A href="admin_art.php?action=edit&a_id=<?php echo $row["a_id"]; ?> ">修改</a> | <a href="admin_ajax.php?action=del&tab={pre}art&a_id=<?php echo $row["a_id"]; ?> " onClick="return confirm('确定要删除吗?');">删除</a></td> </tr> <?php } } ?> <tr> <td colspan="8"> 全选<input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'a_id[]');"/> 批量操作:<input type="button" id="btnDel" value="删除" class="input" /> <input type="button" id="plfl" value="分类" onClick="plset('plfl','art')" class="input"> <input type="button" id="plrq" value="人气" onClick="plset('plrq','art')" class="input"> <input type="button" id="plzt" value="专题" onClick="plset('plzt','art')" class="input"> <input type="button" id="plsc" value="生成" class="input"> <input type="button" id="plyc" value="显隐" onClick="plset('plyc','art')" class="input"> <span id="plmsg" name="plmsg"></span> </td></tr> <tr> <td align="center" colspan="8"> <?php echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "admin_art.php?page={p}&keyword=" . urlencode($keyword) . "&order=" . $order . "&stype=" . $stype . "&state=" . $state . "&repeat=" . $repeat . "&repeatlen=" . $repeatlen . "&hide=" . $hide); ?> </td> </tr> </table> </form> <?php unset($rs); }
function main() { global $db, $cache; $pagenum = be("get", "page"); if (isN($pagenum) || !isNum($pagenum)) { $pagenum = 1; } if ($pagenum < 1) { $pagenum = 1; } $pagenum = intval($pagenum); $sql = "select * from {pre}cj_art_projects "; $rscount = $db->query($sql); $nums = $db->num_rows($rscount); //总记录数 $pagecount = ceil($nums / app_pagenum); //总页数 $sql = $sql . "limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum; $rs = $db->query($sql); ?> <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td> 菜单:<a href="collect_art_manage.php?action=add">添加采集规则</a> | <a href="collect_art_change.php">分类转换</a> | <a href="collect_art_filters.php">信息过滤</a> </td> </tr> </table> <form action="" method="post" name="form1"> <table class=tb > <tr> <td width="4%"> </td> <td>项目名称</td> <td width="25%">入库分类</td> <td width="20%">上次采集</td> <td width="25%">操作</td> </tr> <?php if (!$rs) { ?> <tr><td align="center" colspan="7" >没有任何记录!</td></tr> <?php } else { while ($row = $db->fetch_array($rs)) { ?> <tr> <td><input name="p_id[]" type="checkbox" id="p_id" value="<?php echo $row["p_id"]; ?> " /></td> <td><a href="?action=edit&p_id=<?php echo $row["p_id"]; ?> "><?php echo $row["p_name"]; ?> </a></td> <td> <?php if ($row["p_classtype"] == 1) { echo "<font color=red>自定义分类</font>"; } else { $typearr = getValueByArray($cache[1], "t_id", $row["p_collect_type"]); echo $typearr["t_name"]; } ?> </td> <td><?php echo isToDay($row['p_time']); ?> </td> <td> <A href="collect_art_cj.php?p_id=<?php echo $row["p_id"]; ?> ">采集</A>| <A href="?action=edit&p_id=<?php echo $row["p_id"]; ?> ">修改</A>| <A href="?action=copy&p_id=<?php echo $row["p_id"]; ?> ">复制</A>| <A href="?action=export&p_id=<?php echo $row["p_id"]; ?> ">导出</A>| <A href="?action=del&p_id=<?php echo $row["p_id"]; ?> ">删除</A> </td> </tr> <?php } } ?> <tr> <td colspan="7"> 全选<input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'p_id[]');"/> <input type="submit" value="批量删除" onClick="if(confirm('确定要删除吗')){form1.action='?action=delall';}else{return false}" class="input"/> <input type="submit" value="批量采集" onClick="if(confirm('确定要批量采集吗')){form1.action='collect_art_cj.php?action=pl';}else{return false}" class="input"/> <input type="button" value="导入规则" onClick="$('#win1').window('open');" class="input"/> </td> </tr> <tr align="center" bgcolor="#f8fbfb"> <td colspan="7"> <?php echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "collect_art_manage.php?page={p}"); ?> </td> </tr> </table> </form> <div id="win1" class="easyui-window" title="窗口" style="padding:5px;width:400px;" closed="true" closable="true" minimizable="false" maximizable="false"> <form enctype="multipart/form-data" action="?action=upexpsave" method="post"> <table class="tb"> <tbody> <tr> <td colspan="2" align="center"> 上传采集规则 <input type="file" id="file1" name="file1"> <input type="submit" name="submit" value="开始导入"> </td> </tr> </table> </form> </div> <?php }
function main() { global $db, $cache; $pagenum = be("page", "get"); if (isN($pagenum) || !isNum($pagenum)) { $pagenum = 1; } if ($pagenum < 1) { $pagenum = 1; } $pagenum = intval($pagenum); $keyword = be("get", "keyword"); $project = be("get", "{pre}cj_art_projects"); $zt = be("get", "zt"); $sql = "Select a.*,b.p_name as p_name from {pre}cj_art a,{pre}cj_art_projects b where a.m_pid=b.p_id"; if ($zt != "") { $sql = $sql . " and m_zt = " . $zt; } if ($keyword != "") { $sql = $sql . " and m_title like '%" . $keyword . "%' "; } if ($project != "") { $sql = $sql . " and a.m_pid = " . $project; } $sql = $sql . " order by m_zt asc,m_addtime desc "; $rscount = $db->query($sql); $nums = $db->num_rows($rscount); //总记录数 $pagecount = ceil($nums / app_pagenum); //总页数 $sql = $sql . " limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum; $rs = $db->query($sql); ?> <script language="javascript"> $(document).ready(function(){ $("#btnDel").click(function(){ if(confirm('确定要删除吗')){ $("#form1").attr("action","?action=delpl"); $("#form1").submit(); } }); $("#btnDelall").click(function(){ if(confirm('确定要删除吗')){ $("#form1").attr("action","?action=delall"); $("#form1").submit(); } }); $("#btnSelin").click(function(){ if(confirm('确定入库您所选择的数据吗')){ $("#form1").attr("action","?action=IDInflow"); $("#form1").submit(); } }); $("#btnAllin").click(function(){ if(confirm('全部入库你所采集的数据吗')){ $("#form1").attr("action","?action=AllInflow"); $("#form1").submit(); } }); $("#btnNoin").click(function(){ if(confirm('确定入库所有未入库的数据吗')){ $("#form1").attr("action","?action=noInflow"); $("#form1").submit(); } }); $("#btnType").click(function(){ if(confirm('确定入库所有未入库的数据吗')){ $("#form1").attr("action","?action=editype"); $("#form1").submit(); } }); }); </script> <TABLE width="96%" border=0 align=center cellpadding=0 cellSpacing=0 class=tbtitle > <TBODY> <tr> <td> <form action="collect_art.php" method="get"> <strong>搜索文章:</strong> <input id=KeyWord size=40 name=keyword> <INPUT class=inputbut type=submit value=搜索 name=Submit> 按项目查看: <select onchange=javascript:window.location.href=this.options[this.selectedIndex].value> <option value="collect_art.php">全部采集项目</option> <?php echo makeSelect("{pre}cj_art_projects", "p_id", "p_name", "", "collect_art.php", " | ", ""); ?> </select> <font color="#FF0000">(没有找到对应栏目,不能入库)</font> </form> </td> </tr> </TBODY> </table> <form action="" method="post" name="form1" id="form1"> <table class=tb > <tr> <td width="4%"> </td> <td>文章名称</td> <td width="7%">状态</td> <td width="15%">栏目分类</td> <td width="15%">采集项目名称</td> <td width="13%">添加时间</td> <td width="8%">操作</td> </tr> <?php if (!$rs) { ?> <tr><td align="center" colspan="9" >没有任何记录!</td></tr> <?php } else { $i = 0; while ($row = $db->fetch_array($rs)) { ?> <tr> <td><input name="m_id[]" type="checkbox" id="m_id" value="<?php echo $row["m_id"]; ?> " /></td> <td><?php echo $row["m_title"]; ?> </td> <td><?php if ($row["m_zt"] == 1) { echo "<font color=\"#FF0000\">已入库</font>"; } else { echo "未入库"; } ?> </td> <td> <?php if ($row["m_typeid"] == 0) { ?> <font color="#FF0000">没找到对应分类请配置</font> <?php } else { $typearr = getValueByArray($cache[1], "t_id", $row["m_typeid"]); echo $typearr["t_name"]; } ?> </td> <td><?php echo $row["p_name"]; ?> </td> <td><?php echo isToDay($row['m_addtime']); ?> </td> <td><A href="?action=edit&m_id=<?php echo $row["m_id"]; ?> ">修改</A>|<A href="?action=del&m_id=<?php echo $row["m_id"]; ?> ">删除</A></td></tr> <?php } } ?> <tr> <td colspan="9"> 全选<input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'m_id[]');"/> <input type="button" id="btnDel" value="批量删除" class="btn" /> <input type="button" id="btnDelall" value="删除所有" class="btn" /> <input type="button" id="btnSelin" class="btn" name="Submit" value="入库所选" > <input type="button" id="btnAllin" class="btn" name="Submit" value="全部入库" > <input type="button" id="btnNoin" class="btn" name="Submit" value="入库未入库" > <select name="m_typeid" id="m_typeid" > <option value="">请选择数据分类</option> <?php echo makeSelectAll("{pre}art_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", " | ", ""); ?> </select> <input type="button" id="btnType" class="btn" name="Submit" value="批量分类"><font color="#FF0000"> </font></td> </tr> <tr> <td colspan="9" >同名处理: <input type="checkbox" name="CCTV1" value="1">覆盖作者: <input type="checkbox" name="CCTV2" value="2">覆盖内容: </td> </tr> <tr align="center" bgcolor="#f8fbfb"> <td colspan="8"> <?php echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "collect_art.php?page={p}&{pre}cj_art_projects=" . $project . "&keyword=" . $keyword); ?> </td> </tr> </table> </form> <?php }
function main() { global $action; $defaultPahth = "../template"; $filedir = be("get", "filedir"); if (isN($filedir)) { $filedir = $defaultPahth; } if (substring($filedir, 11) != "../template") { $filedir = "../template"; } ?> <table class="tb"> <tr> <td><strong>文件名</strong></td> <td width="15%"><strong>模板类型</strong></td> <td width="15%"><strong>文件大小</strong></td> <td width="20%"><strong>修改时间</strong></td> <td width="15%"><strong>操作</strong></td> </tr> <?php if ($action == "label") { $filedir .= "/" . app_templatedir . "/" . app_htmldir; echo "<tr><td colspan=\"5\"><a href=\"?action=add&path=" . $filedir . "\">(添加新页面)</a> 自定义页面可生成单独页面,也可以内嵌入系统模版中</td></tr>"; $fso = opendir($filedir); while ($file = readdir($fso)) { $fullpath = "{$filedir}/{$file}"; if (is_file($fullpath)) { if (substring($file, 6) == "label_") { $fsize = round(filesize("{$filedir}/{$file}") / 1024); $ftime = date("Y-n-d H:i:s", filemtime("{$filedir}/{$file}")); $ftime = isToDay($ftime); ?> <tr> <td><img src="../images/icons/asp.gif"><?php echo $file; ?> 调用标签:{label:<?php echo replaceStr($file, "label_", ""); ?> }</td> <td><?php echo templatesname($file); ?> </td> <td><?php echo $fsize; ?> KB</td> <td><?php echo $ftime; ?> </td> <td><?php echo "<a href=\"?action=view&file=" . $filedir . "/" . $file . "\">预览</a> <a href=\"admin_makehtml.php?action=diypage&fname=" . $file . "\">生成</a> <a href=\"?action=edit&file=" . $filedir . "/" . $file . "\">编辑</a> <a href=\"?action=del&file=" . $filedir . "/" . $file . "\" onClick=\"return confirm('确定要删除吗?');\">删除</a>"; ?> </td></tr> <?php } } } closedir($fso); unset($fso); } else { $upperFolder = substring($filedir, strripos($filedir, "/")); if ($upperFolder != "..") { echo "<tr><td colspan=\"5\"><img src=\"../images/icons/dir2.gif\"> <a href=\"?filedir=" . $upperFolder . "\">上级目录</a> "; echo "<a href=\"?action=add&path=" . $filedir . "\">(添加新页面)</a></td></tr>"; } $fso = opendir($filedir); while ($file = readdir($fso)) { $fullpath = "{$filedir}/{$file}"; if (is_dir($fullpath)) { if ($file != ".." && $file != ".") { echo "<tr><td colspan=\"5\"><img src=\"../images/icons/dir.gif\"> <a href=\"?filedir=" . $filedir . "/" . $file . "\">" . $file . "</a></td></tr>"; } } else { if (is_file($fullpath)) { if (substring($file, 6) != "label_") { $fsize = round(filesize("{$filedir}/{$file}") / 1024); $ftime = date("Y-n-d H:i:s", filemtime("{$filedir}/{$file}")); $ftime = isToDay($ftime); $farr = explode(".", $file); $fext = $farr[count($farr) - 1]; ?> <tr> <td><img src="../images/icons/asp.gif"><?php echo $file; ?> </td> <td><?php echo templatesname($file); ?> </td> <td><?php echo $fsize; ?> KB</td> <td><?php echo $ftime; ?> </td> <td><?php if ($fext == "jpg" || $fext == "gif" || $fext == "bmp" || $fext == "png") { echo "<a target=_blank href=\"" . $filedir . "/" . $file . "\">预览</a> "; } else { echo "<a href=\"?action=edit&file=" . $filedir . "/" . $file . "\">编辑</a> <a href=\"?action=del&file=" . $filedir . "/" . $file . "\" onClick=\"return confirm('确定要删除吗?');\">删除</a>"; } ?> </td></tr> <?php } } } } closedir($fso); unset($fso); } ?> </table> <?php }