织梦所有文章列表看最新更新时间修改(2)

    $flagsArr .= ($frow['att']==$flag ? "<option value='{$frow['att']}' selected>{$frow['attname']}</option> " : "<option value='{$frow['att']}'>{$frow['attname']}</option> ");

}

 

 

if(!empty($userCatalogSql))

{

    $whereSql .= " AND ".$userCatalogSql;

}

if(!empty($mid))

{

    $whereSql .= " AND arc.mid = '$mid' ";

}

if($keyword != '' && intval($keyword) > 1)

{

    $whereSql .= " AND arc.dutyadmin LIKE '$keyword' ";

}

 

elseif($keyword != ''){

 

    $whereSql .= " AND arc.title LIKE '%$keyword%' ";

}

 

if($flag != '')

{

    $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) ";

}

if($cid != 0)

{

    $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')';

}

if($arcrank != '')

{

    $whereSql .= " AND arc.arcrank = '$arcrank' ";

    $CheckUserSend = "<input type='button' class='coolbg np' onClick="location='catalog_do.php?cid=".$cid."&dopost=listArchives&gurl=content_list.php';" value='所有文档' />";

}

else

{

    $CheckUserSend = "<input type='button' class='coolbg np' onClick="location='catalog_do.php?cid=".$cid."&dopost=listArchives&arcrank=-1&gurl=content_list.php';" value='稿件审核' />";

}

 

$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby);

$orderbyField = 'arc.'.$orderby;

 

$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,

arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid,arc.dutyadmin

FROM `$maintable` arc

$whereSql

ORDER BY $orderbyField DESC";

 

if(empty($f) || !preg_match("#form#", $f)) $f = 'form1.arcid1';

 

//初始化

$dlist = new DataListCP();

$dlist->pageSize = 30;

 

//GET参数

$dlist->SetParameter('dopost', 'listArchives');

$dlist->SetParameter('keyword', $keyword);

if(!empty($mid)) $dlist->SetParameter('mid', $mid);

$dlist->SetParameter('cid', $cid);

$dlist->SetParameter('flag', $flag);

$dlist->SetParameter('orderby', $orderby);

$dlist->SetParameter('arcrank', $arcrank);

$dlist->SetParameter('channelid', $channelid);

$dlist->SetParameter('f', $f);

 

//模板

if(empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm';

$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets);

 

//查询

$dlist->SetSource($query);

 

//显示

$dlist->Display();

// echo $dlist->queryTime;

$dlist->Close();

 

content_list.htm:直接复制即可:

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">

<title>文档管理</title>

<link rel="stylesheet" type="text/css" href=http://www.dede58.com/"css/base.css">

<script language="javascript" src=http://www.dede58.com/"../include/js/dedeajax2.js"></script>

<script language="javascript" src=http://www.dede58.com/"js/ieemu.js"></script>

<script language="javascript" src=http://www.dede58.com/"js/context_menu.js"></script>

<script language="javascript" src=http://www.dede58.com/"js/main.js"></script>

<script language="javascript" src=http://www.dede58.com/"js/list.js"></script>

</head>

<body leftmargin="8" topmargin="8" background='images/allbg.gif' onLoad="ContextMenu.intializeContextMenu()">

 

<!--  快速转换位置按钮  -->

<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ccd9b9" align="center">

<tr>

 <td height="26" background="images/newlinebg3.gif">

  <table width="98%" border="0" cellspacing="0" cellpadding="0">

  <tr>

  <td align="center">

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/5f2b39464d82d2846256ac0a1938102f.html