<?php
function a($where) {
$where['pagesize']=1;
$article=alist($where);
if(isset($article['list'][0])) {
Return $article['list'][0];
}else {
Return false;
}
}
function u($cid) {
if($cid==0) {
Return gethomeurl();
}
Return getchannelurl($cid);
}
function z($strname,$return=1) {
Return str($strname,0,$return);
}
function s($strname,$cid='',$return=1) {
Return str($strname,$cid,$return);
}
function n($where=0) {
Return nav($where);
}
function c($kind=0,$num=9999,$fid=0) {
$channel=getchannelscache();
$newchannel=array();
$count=0;
foreach($channel as $val) {
if($fid==$val['fid']) {
if($kind==0) {
$newchannel[]=$val;
$count++;
$newchannel[count($newchannel)-1]['key']=$count;
}elseif($val['ckind']==$kind) {
$newchannel[]=$val;
$count++;
$newchannel[count($newchannel)-1]['key']=$count;
}
if($count==$num) {
Return $newchannel;
}
}
}
Return $newchannel;
}
function b($cid='',$return=false,$linktag=' > ',$homepage=SystemDir) {
Return cnav($cid,$return,$linktag,$homepage);
}
function uri($uri) {
$uri=ltrim($uri,'/');
if(UrlRewrite) {
Return SystemDir.$uri;
}else {
Return SystemDir.IndexFile.'/'.$uri;
}
}
function f($file) {
require(SystemRoot.TemplateDir.DIRECTORY_SEPARATOR.$file);
}
function t($file='',$echo=1) {
if($echo==1) {
echo(SystemDir.TemplateDir.'/'.$file);
}
Return SystemDir.TemplateDir.'/'.$file;
}
function alist($where='') {
if(SiteCache && isset($where['cache']) && $where['cache']>0) {
$cachewhere=$where;
$cachehash=md5(json_encode($where));
$res =cacheget($cachehash,$where['cache'],'alist');
if ($res) {return json_decode($res,1);}
}
$sql='';
$nullarticle=array('list'=>array(),'pagecount'=>0,'pagesize'=>1,'page'=>1,);
if(!isset($where['tablename']) && !isset($where['cid']) && defined('cid')) {
$where['cid']=cid;
}
if(isset($where['cid']) && $where['cid']<>'') {
$thichannelcache=getchannelcache($where['cid']);
if(!$thichannelcache || $thichannelcache['ckind']!=2) {Return $nullarticle;}
$where['cid']=$thichannelcache['cid'];
$defaultsetting=$thichannelcache['csetting'];
if(isset($defaultsetting['channel_domain']) && !empty($defaultsetting['channel_domain'])) {
$where['domain']=$defaultsetting['channel_domain'];
}
$sql.=" and cid='".$where['cid']."'";
if(!isset($where['tablename'])) {
if(isset($defaultsetting['articletable']) && !empty($defaultsetting['articletable'])) {
$where['tablename']=$defaultsetting['articletable'];
}else {Return $nullarticle;}
}elseif(empty($where['tablename'])) {
Return $nullarticle;
}
if(!isset($where['pagesize'])) {
if(isset($defaultsetting['temppage_size']) && !empty($defaultsetting['temppage_size'])) {
$where['pagesize']=$defaultsetting['temppage_size'];
}
}
if(!isset($where['order'])) {
if(isset($defaultsetting['temppage_order']) && !empty($defaultsetting['temppage_order'])) {
$where['order']=$defaultsetting['temppage_order'];
}
}
if(isset($defaultsetting['channel_articleurl']) && !empty($defaultsetting['channel_articleurl']) && !isset($where['link'])) {
$where['link']=$defaultsetting['channel_articleurl'];
}
if(isset($defaultsetting['channel_pageurl']) && !empty($defaultsetting['channel_pageurl'])) {
$allpageurl=explode(';',$defaultsetting['channel_pageurl']);
if(UrlRewrite) {
$where['pageurl']=$allpageurl[0];
}else {
$where['pageurl']=SystemDir.IndexFile.$allpageurl[0];
}
}
}
isset($where['addslashes']) ? $ifaddslashes=$where['addslashes']:$ifaddslashes=1;
isset($where['tablename']) ? $where['tablename']=$where['tablename']:die('no tablename');
isset($where['pagesize']) ? $where['pagesize']=intval($where['pagesize']):$where['pagesize']=9;
isset($where['order']) ? $where['order']='order by '.$where['order']:$where['order']='order by id desc';
isset($where['start']) ? $where['start']=intval($where['start']):$where['start']=0;
isset($where['column']) ? $where['column']=$where['column']:$where['column']='*';
isset($where['rowidstyle']) && !isset($where['rowidname']) ? $where['rowidname']='id' :'';
isset($where['linktime']) ? 1==1 : $where['linktime']='posttime';
isset($where['domain']) ? 1==1 : $where['domain']='';
if(!empty($where['domain'])) {
$domains=explode(';',$where['domain']);
$where['domain']=$domains[0];
foreach($domains as $domain) {
if($domain==server_name()) {
$where['domain']=null;
break;
}
}
}
if(isset($where['where'])) {
if(is_array($where['where'])) {
foreach($where['where'] as $key=>$val) {
$key=addslashes_str($key,$ifaddslashes);
if(is_array($val) && count($val)>0) {
$sql.=" and (";
foreach($val as $value) {
$sql.=$key."='".addslashes_str($value,$ifaddslashes)."' or ";
}
$sql=substr($sql,0,strlen($sql)-4);
$sql.=")";
}else {
$sql.=" and ".$key."='".addslashes_str($val,$ifaddslashes)."'";
}
}
}else {
$sql.=" and ".$where['where'];
}
}
if(isset($where['inwhere'])) {
foreach($where['inwhere'] as $key=>$val) {
if(!is_array($val)) {
$val=array();
$val[]=$where['inwhere'][$key];
}
$key=addslashes_str($key,$ifaddslashes);
foreach($val as $val1) {
if(is_numeric($val1) && $val1>0) {
$sql.=" and (".$key." like '%:".$val1.",%' or ".$key." like '%:".$val1."}')";
}else {
unset($where['inwhere'][$key]);
}
}
}
}
if(isset($where['nowhere'])) {
foreach($where['nowhere'] as $key=>$val) {
$key=addslashes_str($key,$ifaddslashes);
if(is_array($val) && count($val)>0) {
foreach($val as $value) {
$sql.=" and ".$key."<>'".addslashes_str($value,$ifaddslashes).'\'';
}
}else {
$sql.=" and ".$key."<>'".addslashes_str($val,$ifaddslashes)."'";
}
}
}
if(isset($where['other']) && !empty($where['other'])) {
$sql.=" and ".$where['other'];
}
if(isset($where['keyword']) && !empty($where['keyword'])) {
if(!isset($where['searchcolumn'])) {$where['searchcolumn']='title';}
if(!is_array($where['searchcolumn'])) {$where['searchcolumn']=explode(',',$where['searchcolumn']);}
$sql.=" and (";
foreach($where['searchcolumn'] as $key=>$searchcolumn) {
if($key==0) {
$sql.="$searchcolumn like '%".addslashes_str($where['keyword'],$ifaddslashes)."%'";
}else {
$sql.=" or $searchcolumn like '%".addslashes_str($where['keyword'],$ifaddslashes)."%'";
}
}
$sql.=" )";
}
if(isset($where['page']) && is_numeric($where['page']) && $where['page']>0) {
$where['page']=intval($where['page']);
$where['pagecount'] = $GLOBALS['db'] -> fetchcount("SELECT count(id) FROM ".$where['tablename']." where 1=1 $sql");
$where['start']=($where['page']-1)*$where['pagesize'];
}
if(!isset($where['sql'])) {
$where['sql']='SELECT '.$where['column'].' FROM '.$where['tablename'].' where 1=1 '.$sql.' '.$where['order'].' limit '.$where['start'].','.$where['pagesize'];
}
$query = $GLOBALS['db'] -> query($where['sql']);
$articles = $GLOBALS['db'] -> fetchall($query);
$i=0;
foreach ($articles as $value)
{
$i++;
$value['key']=$i;
if(isset($where['stepstyle'])) {
foreach($where['stepstyle'] as $key=>$val) {if($i%$key==0) {$value['stepstyle']=$where['stepstyle'][$key];}}
if(!isset($value['stepstyle'])) {$value['stepstyle']='';}
}
if(isset($where['rowstyle'])) {
foreach($where['rowstyle'] as $key=>$val) {if($i==$key) {$value['rowstyle']=$where['rowstyle'][$key];}}
if(!isset($value['rowstyle'])) {$value['rowstyle']='';}
}
if(isset($where['rowidstyle'])) {
foreach($where['rowidstyle'] as $key=>$val) {
if($value[$where['rowidname']]==$key) {
$value['rowidstyle']=$val;
}
}
if(!isset($value['rowidstyle'])) {$value['rowidstyle']='';}
}
if(isset($where['link']) && !empty($where['link']))
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的UCMS米表程序 php版.zip
共161个文件
php:90个
js:27个
gif:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 131 浏览量
2023-07-23
00:26:36
上传
评论
收藏 759KB ZIP 举报
温馨提示
基于PHP的UCMS米表程序 php版.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的UCMS米表程序 php版.zip (161个子文件)
default.css 21KB
admin.css 11KB
style.css 8KB
simple.css 2KB
database.db 43KB
loading.gif 3KB
qq.gif 1KB
folder-64.gif 1KB
file-64.gif 1KB
flash.gif 1KB
media.gif 1KB
rm.gif 989B
loading.gif 673B
align_left.gif 639B
align_right.gif 636B
align_top.gif 625B
go-up.gif 562B
anchor.gif 371B
folder-16.gif 226B
file-16.gif 170B
blank.gif 43B
.htaccess 137B
index.html 3KB
map.html 2KB
map.html 1KB
2.html 539B
3.html 373B
1.html 243B
ico.ico 4KB
favicon.ico 4KB
weixin.jpg 896B
kindeditor.js 94KB
jquery.min.js 91KB
multiimage.js 51KB
table.js 24KB
image.js 11KB
jquery.SuperSlide.2.1.1.js 11KB
zh_CN.js 8KB
filemanager.js 7KB
media.js 6KB
flash.js 5KB
map.js 5KB
insertfile.js 4KB
baidumap.js 3KB
js.js 3KB
code.js 2KB
link.js 2KB
template.js 2KB
quickformat.js 2KB
wordpaste.js 2KB
autoheight.js 1KB
anchor.js 1KB
plainpaste.js 1KB
clearhtml.js 1KB
lineheight.js 1KB
preview.js 1KB
pagebreak.js 1006B
js.js 61B
func.php 59KB
kses.php 29KB
chk.php 27KB
index.php 25KB
cedit.php 17KB
file.php 12KB
aedit.php 11KB
cineditpost.php 10KB
aaddpost.php 10KB
aindex.php 10KB
admin_config.php 9KB
edit.php 9KB
ajax.php 8KB
sbasicedit.php 8KB
add.php 8KB
ceditpost.php 7KB
add.php 7KB
9.php 7KB
login.php 6KB
fileedit.php 6KB
sbasic.php 6KB
upload.php 6KB
edit.php 5KB
cinedit.php 5KB
domain_list.php 5KB
caddpost.php 5KB
top.php 4KB
my.php 4KB
cout.php 4KB
addpost.php 4KB
index.php 4KB
17.php 4KB
index.php 3KB
16.php 3KB
del.php 3KB
editpost.php 3KB
aeditpost.php 3KB
5.php 3KB
6.php 3KB
cineditjs.php 3KB
index.php 3KB
index.php 3KB
共 161 条
- 1
- 2
资源评论
助力毕业
- 粉丝: 2177
- 资源: 5130
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功