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 = GetFileUrl($arc->ArcID,$arc->Fields["typeid"],$arc->Fields["senddate"], $arc->Fields["title"],$arc->Fields["ismake"],$arc->Fields["arcrank"]); */ $arclink = $cfg_phpurl.'/view.php?aid='.$arc->ArcID; $arcLinktitle = "".$arctitle.""; $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." 個!
確認閱讀請點 [確認付點閱讀]" ; include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm"); $arc->Close(); exit(); } } }//金幣處理付處理 } $arc->Display();丰禾棋牌网站 平特肖怎么买 平特高手论坛免费资料 新天地棋牌游戏? 25选5怎么没了 宝博棋牌安卓版下载 十大期货配资公司排名 六肖十二码中特 神来棋牌苹果下载 新浪财经大盘行情 捕鸟达人修改版