@@ -1,38 +0,0 @@ | |||||
<?php | |||||
if(!file_exists(dirname(__FILE__).'/../data/common.inc.php')) | |||||
{ | |||||
header('Location:install/index.php'); | |||||
exit(); | |||||
} | |||||
if ( preg_match("#PHP (.*) Development Server#",$_SERVER['SERVER_SOFTWARE']) ) | |||||
{ | |||||
if ( $_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME']) ) | |||||
{ | |||||
header('HTTP/1.1 301 Moved Permanently'); | |||||
header('Location:'.$_SERVER['REQUEST_URI'].'/'); | |||||
} | |||||
} | |||||
//自动生成HTML版 | |||||
if(isset($_GET['upcache']) || !file_exists('index.html')) | |||||
{ | |||||
require_once (dirname(__FILE__) . "/../include/common.inc.php"); | |||||
require_once DEDEINC."/arc.partview.class.php"; | |||||
$GLOBALS['_arclistEnv'] = 'index'; | |||||
$row = $dsql->GetOne("Select * From `#@__homepageset`"); | |||||
$row['templet'] = MfTemplet($row['templet']); | |||||
$pv = new PartView(); | |||||
$row['templet'] =str_replace('.htm','_m.htm',$row['templet']); | |||||
if ( !file_exists($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']) ) | |||||
{ | |||||
echo "模板文件不存在,无法解析文档"; | |||||
exit(); | |||||
} | |||||
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']); | |||||
$pv->Display(); | |||||
exit(); | |||||
} else { | |||||
header('HTTP/1.1 301 Moved Permanently'); | |||||
header('Location:index.html'); | |||||
} | |||||
?> |
@@ -1,62 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* | |||||
* 栏目列表频道动态页 | |||||
* | |||||
* @version $Id: list.php 1 15:38 2022年7月8日Z tianya $ | |||||
* @package DedeBIZ.Libraries | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
define('DEDEMOB', 'Y'); | |||||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | |||||
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0); | |||||
$channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0); | |||||
if($tid==0 && $channelid==0) die(" Request Error! "); | |||||
if(isset($TotalResult)) $TotalResult = intval(preg_replace("/[^\d]/", '', $TotalResult)); | |||||
//如果指定了内容模型ID但没有指定栏目ID,那么自动获得为这个内容模型的第一个顶级栏目作为频道默认栏目 | |||||
if(!empty($channelid) && empty($tid)) | |||||
{ | |||||
$tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc"); | |||||
if(!is_array($tinfos)) die(" No catalogs in the channel! "); | |||||
$tid = $tinfos['id']; | |||||
} else { | |||||
$tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' "); | |||||
} | |||||
if($tinfos['issystem']==-1) | |||||
{ | |||||
$nativeplace = ( (empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace ); | |||||
$infotype = ( (empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype ); | |||||
if(!empty($keyword)) $keyword = FilterSearch($keyword); | |||||
$cArr = array(); | |||||
if(!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace; | |||||
if(!empty($infotype)) $cArr['infotype'] = $infotype; | |||||
if(!empty($keyword)) $cArr['keyword'] = $keyword; | |||||
include(DEDEINC."/arc.sglistview.class.php"); | |||||
$lv = new SgListView($tid,$cArr); | |||||
} else { | |||||
include(DEDEINC."/arc.listview.class.php"); | |||||
$lv = new ListView($tid); | |||||
//对设置了会员级别的栏目进行处理 | |||||
if(isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0) | |||||
{ | |||||
require_once(DEDEINC.'/memberlogin.class.php'); | |||||
$cfg_ml = new MemberLogin(); | |||||
if( $cfg_ml->M_Rank < $lv->Fields['corank'] ) | |||||
{ | |||||
$dsql->Execute('me' , "SELECT * FROM `#@__arcrank` "); | |||||
while($row = $dsql->GetObject('me')) | |||||
{ | |||||
$memberTypes[$row->rank] = $row->membername; | |||||
} | |||||
$memberTypes[0] = "游客或没权限会员"; | |||||
$msgtitle = "您没有权限浏览栏目:{$lv->Fields['typename']} !"; | |||||
$moremsg = "这个栏目需要 ".$memberTypes[$lv->Fields['corank']]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." 等级"; | |||||
include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm'); | |||||
exit(); | |||||
} | |||||
} | |||||
} | |||||
if($lv->IsError) ParamError(); | |||||
$lv->Display(); |
@@ -1,28 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: tags.php 4 15:13 2022年7月7日Z tianya $ | |||||
* @package DedeBIZ.Libraries | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
define('DEDEMOB', 'Y'); | |||||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | |||||
require_once (DEDEINC . "/arc.taglist.class.php"); | |||||
$PageNo = 1; | |||||
if(isset($_SERVER['QUERY_STRING'])) | |||||
{ | |||||
$tag = trim($_SERVER['QUERY_STRING']); | |||||
$tags = explode('/', $tag); | |||||
if(isset($tags[1])) $tag = $tags[1]; | |||||
if(isset($tags[2])) $PageNo = intval($tags[2]); | |||||
define('DEDERETAG', 'Y'); | |||||
} else { | |||||
$tag = ''; | |||||
} | |||||
$tag = FilterSearch(urldecode($tag)); | |||||
if($tag != addslashes($tag)) $tag = ''; | |||||
if($tag == '') $dlist = new TagList($tag, 'tag_m.htm'); | |||||
else $dlist = new TagList($tag, 'taglist_m.htm'); | |||||
$dlist->Display(); | |||||
exit(); |
@@ -1,117 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* | |||||
* 关于文章权限设置的说明 | |||||
* 文章权限设置限制形式如下: | |||||
* 如果指定了会员等级,那么必须到达这个等级才能浏览 | |||||
* 如果指定了金币,浏览时会扣指点的点数,并保存记录到用户业务记录中 | |||||
* 如果两者同时指定,那么必须同时满足两个条件 | |||||
* | |||||
* @version $Id: view.php 1 15:38 2022年7月8日Z tianya $ | |||||
* @package DedeBIZ.Libraries | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
define('DEDEMOB', 'Y'); | |||||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | |||||
require_once(DEDEINC.'/arc.archives.class.php'); | |||||
$t1 = ExecTime(); | |||||
if(empty($okview)) $okview = ''; | |||||
if(isset($arcID)) $aid = $arcID; | |||||
if(!isset($dopost)) $dopost = ''; | |||||
$app = (isset($app) && is_numeric($app) ? $app : 0); | |||||
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | |||||
if($aid==0) die(" Request Error! "); | |||||
$arc = new Archives($aid); | |||||
if($arc->IsError) ParamError(); | |||||
//检查阅读权限 | |||||
$needMoney = $arc->Fields['money']; | |||||
$needRank = $arc->Fields['arcrank']; | |||||
require_once(DEDEINC.'/memberlogin.class.php'); | |||||
$cfg_ml = new MemberLogin(); | |||||
if($needRank < 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) | |||||
{ | |||||
ShowMsg('文章尚未审核,非作者本人无权查看', 'javascript:;'); | |||||
exit(); | |||||
} | |||||
//设置了权限限制的文章 | |||||
//arctitle msgtitle moremsg | |||||
if($needMoney>0 || $needRank>1) | |||||
{ | |||||
$arctitle = $arc->Fields['title']; | |||||
$arclink = $cfg_phpurl.'/view.php?aid='.$arc->ArcID; | |||||
$arcLinktitle = "<a href=\"{$arclink}\"><u>".$arctitle."</u></a>"; | |||||
$description = $arc->Fields["description"]; | |||||
$pubdate = GetDateTimeMk($arc->Fields["pubdate"]); | |||||
//会员级别不足 | |||||
if(($needRank>1 && $cfg_ml->M_Rank < $needRank && $arc->Fields['mid']!=$cfg_ml->M_ID)) | |||||
{ | |||||
$dsql->Execute('me' , "SELECT * FROM `#@__arcrank` "); | |||||
while($row = $dsql->GetObject('me')) | |||||
{ | |||||
$memberTypes[$row->rank] = $row->membername; | |||||
} | |||||
$memberTypes[0] = "游客或没权限会员"; | |||||
$msgtitle = "您没有权限浏览文档:{$arctitle} !"; | |||||
$moremsg = "这篇文档需要 ".$memberTypes[$needRank]." 才能访问,您目前是:".$memberTypes[$cfg_ml->M_Rank]." 等级"; | |||||
include_once(DEDETEMPLATE.'/plus/view_msg.htm'); | |||||
exit(); | |||||
} | |||||
//需要金币的情况 | |||||
if($needMoney > 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) | |||||
{ | |||||
$sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'"; | |||||
$row = $dsql->GetOne($sql); | |||||
//未购买过此文章 | |||||
if(!is_array($row)) | |||||
{ | |||||
if($cfg_ml->M_Money=='' || $needMoney > $cfg_ml->M_Money) | |||||
{ | |||||
$msgtitle = "您没有权限浏览文档:{$arctitle} !"; | |||||
$moremsg = "这篇文档需要 ".$needMoney." 金币才能访问,您目前拥有金币:".$cfg_ml->M_Money." 个"; | |||||
include_once(DEDETEMPLATE.'/plus/view_msg.htm'); | |||||
$arc->Close(); | |||||
exit(); | |||||
} | |||||
else | |||||
{ | |||||
if($dopost=='buy') | |||||
{ | |||||
$inquery = "INSERT INTO `#@__member_operation`(mid,oldinfo,money,mtime,buyid,product,pname) | |||||
VALUES ('".$cfg_ml->M_ID."','$arctitle','$needMoney','".time()."', 'ARCHIVE".$aid."', 'archive',''); "; | |||||
if($dsql->ExecuteNoneQuery($inquery)) | |||||
{ | |||||
$inquery = "UPDATE `#@__member` SET money=money-$needMoney WHERE mid='".$cfg_ml->M_ID."'"; | |||||
if(!$dsql->ExecuteNoneQuery($inquery)) | |||||
{ | |||||
showmsg('购买失败,请返回', -1); | |||||
exit; | |||||
} | |||||
#api{{ | |||||
if(defined('UC_APPID')) | |||||
{ | |||||
include_once DEDEROOT.'/api/uc.func.php'; | |||||
$row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='".$cfg_ml->M_ID."'"); | |||||
uc_credit_note($row['userid'],-$needMoney,'money'); | |||||
} | |||||
#/aip}} | |||||
showmsg('购买成功,购买扣点不会重扣金币,谢谢', '/plus/view.php?aid='.$aid); | |||||
exit; | |||||
} else { | |||||
showmsg('购买失败,请返回', -1); | |||||
exit; | |||||
} | |||||
} | |||||
$msgtitle = "扣金币购买阅读!"; | |||||
$moremsg = "阅读该文档内容需要付费 ".$needMoney." 金币才能访问,您目前拥有金币 ".$cfg_ml->M_Money." 个<br>确认阅读请点 [<a href='/plus/view.php?aid=".$aid."&dopost=buy' target='_blank'>确认付点阅读</a>]" ; | |||||
include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm"); | |||||
$arc->Close(); | |||||
exit(); | |||||
} | |||||
} | |||||
}//金币处理付处理 | |||||
} | |||||
$arc->Display(); |