예제 #1
0
CheckPurview('sys_User');
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
if (empty($rank)) {
    $rank = '';
} else {
    $rank = " WHERE CONCAT(#@__admin.usertype)='{$rank}' ";
}
$dsql->SetQuery("SELECT rank,typename FROM `#@__admintype` ");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
    $adminRanks[$row->rank] = $row->typename;
}
$query = "SELECT #@__admin.*,#@__arctype.typename FROM #@__admin LEFT JOIN #@__arctype ON #@__admin.typeid = #@__arctype.id {$rank} ";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/sys_admin_user.htm");
$dlist->SetSource($query);
$dlist->Display();
function GetUserType($trank)
{
    global $adminRanks;
    if (isset($adminRanks[$trank])) {
        return $adminRanks[$trank];
    } else {
        return "错误类型";
    }
}
function GetChannel($c)
{
    if ($c == "" || $c == 0) {
        return "所有频道";
예제 #2
0
                $config = AutoCharset(unserialize(utf82gb($row['config'])));
            } else {
                if ($cfg_soft_lang == 'gb2312') {
                    $config = unserialize($row['config']);
                }
            }
            foreach ($config as $key => $v) {
                $config[$key]['value'] = "";
            }
            if ($cfg_soft_lang == 'utf-8') {
                $config = AutoCharset($config, 'utf-8', 'gb2312');
                $config = serialize($config);
                $config = gb2utf8($config);
            } else {
                $config = serialize($config);
            }
            $query = "UPDATE `#@__payment` SET fee='',config='{$config}',enabled='0' WHERE id='{$pid}'";
            $dsql->ExecuteNoneQuery($query);
            //同时需要删除对应的缓存
            $m_file = DEDEDATA . "/payment/" . $row['code'] . ".php";
            @unlink($m_file);
            ShowMsg("删除成功!", "sys_payment.php");
            exit;
        }
    }
}
$sql = "SELECT * FROM `#@__payment` ORDER BY rank ASC";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/sys_payment.htm");
$dlist->SetSource($sql);
$dlist->display();
예제 #3
0
파일: mystow.php 프로젝트: soonfine/leread
    //主表信息
    $sByoU_neT_row = $dsql->GetOne("select * from #@__arctype where id='{$bid}' and topid!=45 limit 1");
    //列表
    $sByou_NET_list .= '
	<tr>
	  <td colspan="5" class="tabTitle">
		<a href="' . $BOOK_URL . ltrim($sByoU_neT_row['typedir'], '/') . '/" title="' . $sByoU_neT_row['typename'] . '" target="_blank">' . $sByoU_neT_row['typename'] . '</a>
		/&nbsp;书签:' . $sq . '
	  </td>
	  <td width="25%" align="center" class="doPost">
		<span class="itemDigg">
		  <a class="text_button" href="' . $TXT_URL . '?topid=' . $sByoU_neT_row['topid'] . '&id=' . $bid . '&date=' . $sByoU_neT_row['lastupdate'] . '" target="_blank">[下载TXT]</a>
		</span>
		<span class="itemManage">
		  <a href="' . $BOOK_URL . 'member/archives_do.php?dopost=delStow&aid=' . $bid . '">[删除收藏]</a>
		</span>
	  </td>
	</tr>
	<tr>
	  <td colspan="6" class="tabTitle tbBtm">收藏时间:' . date('Y-m-d H:i:s', $sbYou_neT_row->addtime) . '</td>
	</tr>
	';
}
if (!$pagenum) {
    $sByou_NET_list = '<tr><td>&nbsp;&nbsp;&nbsp;暂时没有收藏!</td></tr>';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEMEMBER . '/templets/mystow.htm');
$dlist->Display();
예제 #4
0
<?php

/**
 * 自定义表单列表管理
 *
 * @version        $Id: diy_main.php 1 18:31 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('c_List');
require_once DEDEINC . "/datalistcp.class.php";
require_once DEDEINC . "/common.func.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm");
$dlist->SetSource($sql);
$dlist->display();
$dlist->Close();
예제 #5
0
파일: mytag_main.php 프로젝트: iabing/mzzyc
<?php

/**
 * 自定义模型管理
 *
 * @version        $Id: mychannel_main.php 1 15:26 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . '/config.php';
CheckPurview('temp_Other');
require_once DEDEINC . '/datalistcp.class.php';
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/');
$sql = "SELECT myt.aid,myt.tagname,tp.typename,myt.timeset,myt.endtime\r\n        FROM `#@__mytag` myt LEFT JOIN `#@__arctype` tp ON tp.id=myt.typeid ORDER BY myt.aid DESC ";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . '/templets/mytag_main.htm');
$dlist->SetSource($sql);
$dlist->display();
function TestType($tname)
{
    return $tname == '' ? '所有栏目' : $tname;
}
function TimeSetValue($ts)
{
    return $ts == 0 ? '不限时间' : '限时标记';
}
예제 #6
0
<?php

require_once dirname(__FILE__) . '/config.php';
CheckPurview('a_List,a_AccList,a_MyList');
require_once DEDEINC . '/datalistcp.class.php';
if (empty($cid)) {
    $cid = '0';
    $whereSql = '';
}
if ($cid != 0) {
    require_once DEDEINC . '/channelunit.func.php';
    $whereSql = " And arc.typeid in (" . GetSonIds($cid) . ")";
}
$query = "SELECT arc.*,tp.typename FROM `#@__archives` AS arc\r\nLEFT JOIN #@__arctype AS tp ON arc.typeid = tp.id\r\nWHERE arc.arcrank = '-2' {$whereSql} order by arc.id desc";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/recycling.htm");
$dlist->SetSource($query);
$dlist->display();
예제 #7
0
파일: shuku.php 프로젝트: soonfine/leread
//列表
$dsql->SetQuery($where_sql . " order by id desc limit {$offset},{$num}");
$dsql->Execute();
while ($list_row = $dsql->GetObject()) {
    $topid = $list_row->topid;
    if ($list_row->zuozhe) {
        $list_zz = '<a style="color:#025b81;" href="' . $cfg_indexurl . 'author/?' . $list_row->id . '.html" target="_blank" title="' . $list_row->zuozhe . '">' . $list_row->zuozhe . '</a>';
    } else {
        $list_zz = '<font style="color:#343434;">未记录</font>';
    }
    $gxlb_i++;
    $gxlb_i % 2 == 0 ? $class = ' class="odd"' : ($class = '');
    $list_str .= '
	<li' . $class . '>
	  <div class="c"><a href="' . $cfg_indexurl . SBYOU_NET_catalog($topid, 'typedir') . '.html" title="' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . '">[' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . ']</a></div>
	  <div class="title">
		<div class="t"><a href="' . $cfg_indexurl . ltrim($list_row->typedir, '/') . '/" title="' . $list_row->typename . '" target="_blank">' . $list_row->typename . '</a></div>
		<div class="n">' . SbYOU_Net_NEW($list_row->id, ltrim($list_row->typedir, '/')) . '</div>
	  </div>
	  <div class="words">' . $list_row->booksize . '</div>
	  <div class="author">' . $list_zz . '</div>
	  <div class="abover">' . ($list_row->overdate == 0 ? '<span>连载</span>' : '<font style="color:blue">完结</font>') . '</div>
	  <div class="time">' . date('Y-m-d', $list_row->lastupdate) . '</div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/shuku.htm");
$dlist->Display();
<?php

/**
 * 投票管理
 *
 * @version        $Id: vote_main.php 1 23:54 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "SELECT aid,votename,starttime,endtime,totalcount,isenable FROM #@__vote ORDER BY aid DESC";
$dlist = new DataListCP();
$issel = isset($issel) ? $issel : 0;
$aid = isset($aid) ? $aid : 0;
if ($issel == 1) {
    $dlist->SetParameter('issel', $issel);
    $dlist->SetTemplet(DEDEADMIN . "/templets/vote_select.htm");
} else {
    $dlist->SetTemplet(DEDEADMIN . "/templets/vote_main.htm");
}
$dlist->SetSource($sql);
$dlist->display();
예제 #9
0
파일: chapter.php 프로젝트: soonfine/leread
}
if (!is_numeric($id)) {
    $id = '/' . $id;
    $id_row = $dsql->GetOne("select * from dede_arctype where typedir='{$id}' and topid!=45 order by id desc limit 1");
    if (!$id_row['id']) {
        SBYOU_net_error('1', '请指定正确的文档!');
    }
    $id = $id_row['id'];
    $topid = $id_row['topid'];
}
$sbyou_net = $topid;
//相关变量
$BOOK_URL = sbyou_net_sysconfig('cfg_basehost') . sbyou_net_sysconfig('cfg_indexurl');
$cfg_indexurl = sbyou_net_sysconfig('cfg_indexurl');
$templets = $cfg_indexurl . 'templets/' . sbyou_net_sysconfig('cfg_df_style');
//小说封面
$arctype_row = $dsql->GetOne("select * from dede_arctype where id={$id} limit 1");
//小说章节
$dsql->SetQuery("select * from dede_archives where typeid={$id} order by chapter_no asc,id asc");
$dsql->Execute();
while ($archives_row = $dsql->GetObject()) {
    $list .= '<li><a href="' . $cfg_indexurl . str_replace('/', '', $arctype_row['typedir']) . '/' . $archives_row->id . '.html" title="' . $archives_row->title . '" target="_blank">' . $archives_row->title . '</a></li>';
}
//当前栏目
$catalog = SBYOU_NET_catalog($arctype_row['topid'], 'typename');
$catalog_typedir = SBYOU_NET_catalog($arctype_row['topid'], 'typedir');
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/chapter.htm");
$dlist->Display();
예제 #10
0
if (empty($ischeck)) {
    $ischeck = 0;
    $ischeckSql = '';
} else {
    if ($ischeck == -1) {
        $ischeckSql = " And ischeck < 1 ";
    } else {
        $ischeckSql = " And ischeck='{$ischeck}' ";
    }
}
$selCheckArr = array(0 => '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页');
$sql = "SELECT * FROM `#@__flink` WHERE  CONCAT(`url`,`webname`,`email`) LIKE '%{$keyword}%' {$ischeckSql} ORDER BY dtime desc";
$dlist = new DataListCP();
$dlist->SetParameter('keyword', $keyword);
$dlist->SetParameter('ischeck', $ischeck);
$dlist->SetTemplet(DEDEADMIN . '/templets/friendlink_main.htm');
$dlist->SetSource($sql);
$dlist->display();
function GetPic($pic)
{
    if ($pic == '') {
        return '无图标';
    } else {
        return "<img src='{$pic}' width='88' height='31' border='0' />";
    }
}
function GetSta($sta)
{
    if ($sta == 1) {
        return '内页';
    }
예제 #11
0
<?php

/**
 * 二级域名评论调用
 *
 * @author cha369
 * @package dedecms
 */
require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once DEDEINC . "/datalistcp.class.php";
$action = isset($action) ? trim($action) : '';
$id = isset($id) && is_numeric($id) ? $id : 0;
if ($id < 1) {
    exit;
}
$siteurl = '';
$sql = "select arctype.siteurl from #@__archives arc left join #@__arctype arctype on arctype.id=arc.typeid where arc.id={$id}";
$row = $dsql->GetOne($sql);
if (is_array($row)) {
    $siteurl = $row['siteurl'];
}
$sql = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores\r\nFROM `#@__feedback` fb\r\nLEFT JOIN `#@__member` mb ON mb.mid = fb.mid\r\nWHERE fb.aid={$id} and fb.ischeck='1'\r\nORDER BY fb.id DESC";
$dlist = new DataListCP();
$dlist->pageSize = 6;
$dlist->SetParameter('id', $id);
$dlist->SetTemplet(DEDETEMPLATE . '/plus/comments_frame.htm');
$dlist->SetSource($sql);
$dlist->display();
예제 #12
0
파일: quanben.php 프로젝트: soonfine/leread
//列表
$dsql->SetQuery($where_sql . " order by id desc limit {$offset},{$num}");
$dsql->Execute();
while ($list_row = $dsql->GetObject()) {
    $topid = $list_row->topid;
    if ($list_row->zuozhe) {
        $list_zz = '<a style="color:#025b81;" href="' . $cfg_indexurl . 'author/?' . $list_row->id . '.html" target="_blank" title="' . $list_row->zuozhe . '">' . $list_row->zuozhe . '</a>';
    } else {
        $list_zz = '<font style="color:#343434;">未记录</font>';
    }
    $gxlb_i++;
    $gxlb_i % 2 == 0 ? $class = ' class="odd"' : ($class = '');
    $list_str .= '
	<li' . $class . '>
	  <div class="c"><a href="' . $cfg_indexurl . SBYOU_NET_catalog($topid, 'typedir') . '.html" title="' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . '">[' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . ']</a></div>
	  <div class="title">
		<div class="t"><a href="' . $cfg_indexurl . ltrim($list_row->typedir, '/') . '/" title="' . $list_row->typename . '" target="_blank">' . $list_row->typename . '</a></div>
		<div class="n">' . SbYOU_Net_NEW($list_row->id, ltrim($list_row->typedir, '/')) . '</div>
	  </div>
	  <div class="words">' . $list_row->booksize . '</div>
	  <div class="author">' . $list_zz . '</div>
	  <div class="abover">' . ($list_row->overdate == 0 ? '<span>连载</span>' : '<font style="color:blue">完结</font>') . '</div>
	  <div class="time">' . date('Y-m-d', $list_row->lastupdate) . '</div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/quanben.htm");
$dlist->Display();
예제 #13
0
         exit;
     }
     $typename = ConvertStr($row['typename']);
     //当前栏目下级分类
     $dsql->SetQuery("Select id,typename From `#@__arctype` where reid='{$id}' And channeltype=1 And ishidden=0 And ispart<>2 order by sortrank");
     $dsql->Execute();
     while ($row = $dsql->GetObject()) {
         $channellistnext .= "<a href='wap.php?action=list&amp;id={$row->id}'>" . ConvertStr($row->typename) . "</a> ";
     }
     $channelnav = "<div class='sublist'>子栏目:" . $channellistnext . "</div>";
     //栏目内容(分页输出)
     $sids = GetSonIds($id, 1, true);
     $varlist = "cfg_webname,typename,channelnav,channellist,channellistnext,cfg_templeturl,cfg_powerby";
     ConvertCharset($varlist);
     $dlist = new DataListCP();
     $dlist->SetTemplet($cfg_basedir . "/wap/list.php");
     $dlist->pageSize = 20;
     $dlist->SetParameter("action", "list");
     $dlist->SetParameter("id", $id);
     $dlist->SetSource("Select id,title,pubdate,click From `#@__archives` where typeid in({$sids}) And arcrank=0 order by id desc");
     $dlist->Display();
     exit;
 } else {
     if ($action == 'article') {
         //文档信息
         $query = "\n\t  Select tp.typename,tp.ishidden,arc.typeid,arc.title,arc.keywords,arc.arcrank,arc.pubdate,arc.writer,arc.click,addon.body From `#@__archives` arc \n\t  left join `#@__arctype` tp on tp.id=arc.typeid\n\t  left join `#@__addonarticle` addon on addon.aid=arc.id\n\t  where arc.id='{$id}'\n\t";
         $row = $dsql->GetOne($query, MYSQL_ASSOC);
         foreach ($row as $k => $v) {
             ${$k} = $v;
         }
         unset($row);
예제 #14
0
	{
		$where = " where tag like '%$tag%'";
	}
	else
	{
		$where = '';
	}
	$neworderway = ($orderway == 'desc' ? 'asc' : 'desc');
	$query = "Select * from `#@__tagindex` left join `#@__tagindex_ex` using(id) $where order by $orderby $orderway";
	$dlist = new DataListCP();
	$tag = stripslashes($tag);
	$dlist->SetParameter("tag",$tag);
	$dlist->SetParameter("orderway",$orderway);
	$dlist->SetParameter("orderby",$orderby);
	$dlist->pageSize = 20;
	$dlist->SetTemplet(DEDEADMIN."/templets/ex_tags_main.htm");
	$dlist->SetSource($query);
	$dlist->Display();
	exit();
}

/*
function update()
*/
else if($action == 'update')
{
	$tid = isset($_POST['tid']) ? (int)$_POST['tid'] : 0;
	if(empty($tid))
	{
		ShowMsg('没有选择要删除的tag!','-1');
		exit();
예제 #15
0
/**
 * 自定义模型管理
 *
 * @version        $Id: mychannel_main.php 1 15:26 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('c_List');
require_once DEDEINC . '/datalistcp.class.php';
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/mychannel_main.htm");
$dlist->SetSource($sql);
$dlist->display();
function GetSta($sta, $id)
{
    if ($sta == 1) {
        return $id != -1 ? "启用  &gt; <a href='mychannel_edit.php?dopost=hide&id={$id}'><u>禁用</u></a>" : "固定项目";
    } else {
        return "禁用 &gt; <a href='mychannel_edit.php?dopost=show&id={$id}'><u>启用</u></a>";
    }
}
function IsSystem($s)
{
    return $s == 1 ? "系统" : "自动";
}
예제 #16
0
//列表
$dsql->SetQuery($where_sql . " order by id desc limit {$offset},{$num}");
$dsql->Execute();
while ($list_row = $dsql->GetObject()) {
    $topid = $list_row->topid;
    $gxlb_i++;
    $gxlb_i % 2 == 0 ? $class = ' class="odd"' : ($class = '');
    if ($list_row->zuozhe) {
        $list_zz = '<a style="color:#025b81;" href="' . $cfg_indexurl . 'author/?' . $list_row->id . '.html" target="_blank" title="' . $list_row->zuozhe . '">' . $list_row->zuozhe . '</a>';
    } else {
        $list_zz = '<font style="color:#343434;">未记录</font>';
    }
    $list_str .= '
	<li' . $class . '>
	  <div class="c"><a href="' . $cfg_indexurl . SBYOU_NET_catalog($topid, 'typedir') . '.html" title="' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . '">[' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . ']</a></div>
	  <div class="title">
		<div class="t"><a href="' . $cfg_indexurl . ltrim($list_row->typedir, '/') . '/" title="' . $list_row->typename . '" target="_blank">' . $list_row->typename . '</a></div>
		<div class="n">' . SbYOU_Net_NEW($list_row->id, ltrim($list_row->typedir, '/')) . '</div>
	  </div>
	  <div class="words">' . $list_row->booksize . '</div>
	  <div class="author">' . $list_zz . '</div>
	  <div class="abover">' . ($list_row->overdate == 0 || $list_row->overdate == '' ? '连载' : '完结') . '</div>
	  <div class="time">' . date('Y-m-d', $list_row->lastupdate) . '</div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/catalog_list.htm");
$dlist->Display();
예제 #17
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once DEDEINC . "/datalistcp.class.php";
if (isset($arcID)) {
    $aid = $arcID;
}
$arcID = $aid = isset($aid) && is_numeric($aid) ? $aid : 0;
if ($aid == 0) {
    exit(" Request Error! ");
}
$querystring = "select fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores from `#@__bookfeedback` fb\n                 left join `#@__member` mb on mb.mid = fb.mid\n                 where fb.aid='{$aid}' and fb.ischeck='1' order by fb.id desc";
$dlist = new DataListCP();
$dlist->pageSize = 6;
$dlist->SetTemplet(DEDETEMPLATE . '/plus/bookfeedback_templet_js.htm');
$dlist->SetSource($querystring);
$dlist->display();
예제 #18
0
 $keywords = ConvertStr($row['typename']);
 $description = ConvertStr($row['description']);
 $seotitle = ConvertStr($row['seotitle']);
 //当前栏目下级分类
 $dsql->SetQuery("Select id,typename From `#@__arctype` where reid='{$id}' And channeltype=1 And ishidden=0 And ispart<>2 order by sortrank");
 $dsql->Execute();
 while ($row = $dsql->GetObject()) {
     $channellistnext .= "<li><a href='{$hostName}/list/{$row->id}.html'>" . ConvertStr($row->typename) . "</a></li>";
 }
 //栏目内容(分页输出)
 $sids = GetSonIds($id, 1, true);
 $varlist = "cfg_webname,typename,channellist,channellistnext,cfg_templeturl";
 $dlist = new DataListCP();
 //设置分页url
 $dlist->purl = $hostName . '/list/' . $id;
 $dlist->SetTemplet($cfg_templets_dir . "/mobile/list.htm");
 $dlist->pageSize = 10;
 $dlist->SetSource("Select id,title,pubdate,click From `#@__archives` where typeid in({$sids}) And arcrank=0 order by id desc");
 if (empty($pageno)) {
     $pageno = 1;
 }
 ob_start();
 $dlist->Display();
 $pageBody = ob_get_contents();
 ob_end_clean();
 if ($pageno == 1) {
     $fp = @fopen('../m/list/' . $id . '.html', 'w') or die('读取失败,确定有写入权限?');
 } else {
     $fp = @fopen('../m/list/' . $id . '_' . $pageno . '.html', 'w') or die('读取失败,确定有写入权限?');
 }
 fwrite($fp, $pageBody);
예제 #19
0
        exit;
    }
} else {
    function GetState($state)
    {
        if ($state == "0") {
            return "<font color='red'>未发送</font>";
        } else {
            return "已发送";
        }
    }
    function GetSendTimeMk($mktime)
    {
        if ($mktime == "0") {
            return "<font color='red'>未发送</font>";
        } else {
            return MyDate('Y-m-d H:i:s', $mktime);
        }
    }
    function GetCount($typeid)
    {
        global $dsql;
        $row = $dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`");
        return $row['cc'];
    }
    $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc";
    $dlist = new DataListCP();
    $dlist->SetTemplet(DEDEADMIN . "/templets/mail_title_send.htm");
    $dlist->SetSource($sql);
    $dlist->display();
}
예제 #20
0
            } else {
                $egroupsql = " WHERE (evalue LIKE '{$topvalue}.%%%' OR evalue={$topvalue}) AND egroup LIKE '{$egroup}'";
            }
        } else {
            $egroupsql = " WHERE egroup LIKE '{$egroup}' ";
        }
        $sql = "SELECT * FROM `#@__sys_enum` {$egroupsql} {$orderby}";
    } else {
        $egroupsql = '';
        $sql = "SELECT * FROM `#@__stepselect` ORDER BY id DESC";
    }
    //echo $sql;exit;
    $dlist = new DataListCP();
    $dlist->SetParameter('egroup', $egroup);
    $dlist->SetParameter('topvalue', $topvalue);
    $dlist->SetTemplet(DEDEADMIN . "/templets/stepselect_main.htm");
    $dlist->SetSource($sql);
    $dlist->display();
    exit;
} else {
    if ($action == 'edit' || $action == 'addnew' || $action == 'addenum' || $action == 'view') {
        AjaxHead();
        include './templets/stepselect_showajax.htm';
        exit;
    } else {
        if ($action == 'del') {
            $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='{$id}' ");
            if (!is_array($arr)) {
                ShowMsg("无法获取分类信息,不允许后续操作!", "stepselect_main.php?" . ExecTime());
                exit;
            }
예제 #21
0
파일: wap.php 프로젝트: klr2003/sourceread
     if ($row['ishidden'] == 1) {
         exit;
     }
     $typename = ConvertStr($row['typename']);
     //当前栏目下级分类
     $dsql->SetQuery("Select id,typename From `#@__arctype` where reid='{$id}' And channeltype=1 And ishidden=0 And ispart<>2 order by sortrank");
     $dsql->Execute();
     while ($row = $dsql->GetObject()) {
         $channellistnext .= "<a href='wap.php?action=list&amp;id={$row->id}'>" . ConvertStr($row->typename) . "</a> ";
     }
     //栏目内容(分页输出)
     $sids = GetSonIds($id, 1, true);
     $varlist = "cfg_webname,typename,channellist,channellistnext,cfg_templeturl";
     ConvertCharset($varlist);
     $dlist = new DataListCP();
     $dlist->SetTemplet($cfg_templets_dir . "/wap/list.wml");
     $dlist->pageSize = 10;
     $dlist->SetParameter("action", "list");
     $dlist->SetParameter("id", $id);
     $dlist->SetSource("Select id,title,pubdate,click From `#@__archives` where typeid in({$sids}) And arcrank=0 order by id desc");
     $dlist->Display();
     exit;
 } else {
     if ($action == 'article') {
         //文档信息
         $query = "\r\n\t  Select tp.typename,tp.ishidden,arc.typeid,arc.title,arc.arcrank,arc.pubdate,arc.writer,arc.click,addon.body From `#@__archives` arc \r\n\t  left join `#@__arctype` tp on tp.id=arc.typeid\r\n\t  left join `#@__addonarticle` addon on addon.aid=arc.id\r\n\t  where arc.id='{$id}'\r\n\t";
         $row = $dsql->GetOne($query, MYSQL_ASSOC);
         foreach ($row as $k => $v) {
             ${$k} = $v;
         }
         unset($row);
예제 #22
0
<?php

/**
 * 管理一个模板
 *
 * @version        $Id: templets_one.php 1 23:07 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
CheckPurview('temp_One');
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$addquery = '';
$keyword = !isset($keyword) ? '' : $keyword;
$likeid = !isset($likeid) ? '' : $likeid;
$addq = $likeid != '' ? " AND likeid LIKE '{$likeid}' " : '';
$sql = "SELECT aid,title,ismake,uptime,filename,likeid FROM `#@__sgpage` WHERE title LIKE '%{$keyword}%' {$addq} ORDER BY aid DESC";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/templets_one.htm");
$dlist->SetSource($sql);
$dlist->display();
function GetIsMake($im)
{
    return $im == 1 ? '需编译' : '不编译';
}
예제 #23
0
파일: caicai.php 프로젝트: soonfine/leread
$dsql->Execute();
while ($sbYou_neT_row = $dsql->GetObject()) {
    $topid = $sbYou_neT_row->topid;
    $sbyou_typeimg = ltrim($sbYou_neT_row->typeimg, '/');
    if (!$sbyou_typeimg) {
        $randPICID = rand(1, 50);
        $sbyou_typeimg = "uploads/empty/" . $randPICID . ".jpg";
    }
    $sByou_NET_list .= '
	<li>
	  <a href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank" class="preview"><img src="' . $BOOK_URL . $sbyou_typeimg . '" alt="" width="84"  height="112"/></a>
	  <div class="cbody">
		<a href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank" class="title">' . $sbYou_neT_row->typename . '</a> <span class="endpl">最近更新:<small>' . date('Y-m-d H:i:s', $sbYou_neT_row->lastupdate) . '</small></span>
		<p class="intro">' . sbyou_nEt_cut_str($sbYou_neT_row->description, '90', '0', 'gbk') . '</p>
		<span class="info">
		  <small class="view">浏览:</small>' . $sbYou_neT_row->bookclick . '<small class="hpd">推荐:</small>' . $sbYou_neT_row->tuijian . '<small class="pl">字数:</small>' . $sbYou_neT_row->booksize . '
		  <small class="btn">
		  [<a class="yd" href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank">立即阅读</a>]
		  [<a class="sm" href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/chapter.html" target="_blank">查看书目</a>]
		  [<a class="xz" href="' . $TXT_URL . '?topid=' . $topid . '&id=' . $sbYou_neT_row->id . '&date=' . $sbYou_neT_row->lastupdate . '" target="_blank">下载TXT</a>]
		  </small>
		</span>
	  </div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEMEMBER . '/templets/caicai.htm');
$dlist->Display();
예제 #24
0
파일: erraddsave.php 프로젝트: iabing/mzzyc
        exit;
    }
    if ($fmdo == 'yes') {
        $id = explode("`", $id);
        foreach ($id as $var) {
            $query = "DELETE FROM `#@__erradd` WHERE `id` = '{$var}'";
            $dsql->ExecuteNoneQuery($query);
        }
        ShowMsg("成功删除指定的文档!", "erraddsave.php");
        exit;
    } else {
        require_once DEDEINC . "/oxwindow.class.php";
        $wintitle = "删除";
        $wecome_info = "<a href='erraddsave.php'>错误管理</a>::删除错误";
        $win = new OxWindow();
        $win->Init("erraddsave.php", "js/blank.js", "POST");
        $win->AddHidden("fmdo", "yes");
        $win->AddHidden("dopost", $dopost);
        $win->AddHidden("id", $id);
        $win->AddTitle("你确实要删除“ {$id} ”这些错误提示?");
        $winform = $win->GetWindow("ok");
        $win->Display();
        exit;
    }
    exit;
}
$sql = "SELECT * FROM `#@__erradd`";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/erradd.htm");
$dlist->SetSource($sql);
$dlist->display();
예제 #25
0
파일: mail_type.php 프로젝트: iabing/mzzyc
        exit;
    } else {
        ShowMsg("添加分类成功!", "mail_type.php");
        exit;
    }
} elseif ($dopost == "editsave") {
    if ($typename == "") {
        ShowMsg("分类名不能为空", "-1");
        exit;
    }
    $typename = Html2Text($typename, 1);
    $description = Html2Text($description, 1);
    $query = "UPDATE #@__mail_type SET typename='{$typename}',description='{$description}' WHERE id={$id}";
    if (!$dsql->ExecuteNoneQuery($query)) {
        ShowMsg("更新数据库#@__mail_type表时出错,请检查!", "javascript:;");
        exit;
    } else {
        ShowMsg("更改分类成功!", "mail_type.php");
        exit;
    }
} elseif ($dopost == "delete") {
    $dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='{$id}'");
    ShowMsg("删除分类成功!", "mail_type.php");
    exit;
} else {
    $sql = "SELECT * FROM `#@__mail_type` ORDER BY id ";
    $dlist = new DataListCP();
    $dlist->SetTemplet(DEDEADMIN . "/templets/mail_type_main.htm");
    $dlist->SetSource($sql);
    $dlist->display();
}
<?php

/**
 * 站内新闻管理
 *
 * @version        $Id: mynews_main.php 1 15:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/typelink.class.php";
require_once DEDEINC . "/datalistcp.class.php";
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$sql = "SELECT\n #@__mynews.aid,#@__mynews.title,#@__mynews.writer,\n #@__mynews.senddate,#@__mynews.typeid,\n #@__arctype.typename\n FROM #@__mynews\n LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid\n ORDER BY aid DESC";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/mynews_main.htm");
$dlist->SetSource($sql);
$dlist->display();
예제 #27
0
    $whereSql = ' WHERE ' . $whereSql;
}
$dsql->SetQuery("SELECT name FROM `#@__member_model`");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
    $MemberModels[] = $row;
}
$sql = "SELECT * FROM `#@__member` {$whereSql} ORDER BY {$sortkey} DESC ";
$dlist = new DataListCP();
$dlist->SetParameter('sex', $sex);
$dlist->SetParameter('spacesta', $spacesta);
$dlist->SetParameter('matt', $matt);
$dlist->SetParameter('mtype', $mtype);
$dlist->SetParameter('sortkey', $sortkey);
$dlist->SetParameter('keyword', $keyword);
$dlist->SetTemplet(DEDEADMIN . "/templets/member_main.htm");
$dlist->SetSource($sql);
$dlist->display();
function GetMemberName($rank, $mt)
{
    global $MemberTypes;
    if (isset($MemberTypes[$rank])) {
        if ($mt == 'ut') {
            return " <font color='red'>待升级:" . $MemberTypes[$rank] . "</font>";
        } else {
            return $MemberTypes[$rank];
        }
    } else {
        if ($mt == 'ut') {
            return '';
        } else {
예제 #28
0
파일: paihang.php 프로젝트: soonfine/leread
    while ($row = $dsql->GetObject()) {
        $i++;
        $topid = $row->topid;
        $sbyou_typeimg = ltrim($row->typeimg, '/');
        if (!$sbyou_typeimg) {
            $randPICID = rand(1, 50);
            $sbyou_typeimg = "uploads/empty/" . $randPICID . ".jpg";
        }
        $i == 1 ? $class = ' class="Li_Mover"' : ($class = '');
        $phb .= '
		<li onmouseover="Li_Mover(this,' . $id1 . ',\'' . $id2 . '\')"' . $class . '>
			<dl class="dl_0' . $i . '">
			<dt><em>' . $row->bookclick . '</em><a target="_blank" href="' . $cfg_indexurl . ltrim($row->typedir, '/') . '/" title="' . $row->typename . '">' . $row->typename . '</a></dt>
			<dd>
				<div class="img"><a target="_blank" href="' . $cfg_indexurl . ltrim($row->typedir, '/') . '/"><img src="' . $cfg_indexurl . $sbyou_typeimg . '"></a></div>
				<strong>类型:<a target="_blank" href="' . $cfg_indexurl . SBYOU_NET_catalog($topid, 'typedir') . '.html" title="' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . '">' . SBYOU_NET_catalog($topid, 'typename') . '</a></strong>
				<p>作者:<span><a href="' . $BOOK_URL . 'author/?' . $row->id . '.html" title="' . $row->zuozhe . '" target="_blank">' . $row->zuozhe . '</a></span></p>
				<p>字数:' . $row->booksize . '</p>
				<p class="sc"><a href="javascript:ajax_favorite(' . $row->id . ',1);">[收藏本书]</a></p>
			</dd>
			</dl>
		</li>
		';
    }
    return $phb;
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/paihang.htm");
$dlist->Display();