From 9e90e40c942cf52178af4dde46099b66fc9c75f9 Mon Sep 17 00:00:00 2001 From: jianglong <974886602@qq.com> Date: Wed, 23 Nov 2022 22:46:36 +0800 Subject: [PATCH] 111 --- e/action/ShowInfo.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/e/action/ShowInfo.php b/e/action/ShowInfo.php index ec76494..c577bf4 100644 --- a/e/action/ShowInfo.php +++ b/e/action/ShowInfo.php @@ -78,6 +78,27 @@ if($ecms_tofunr['cacheopen']==1&&!($r['groupid']||$class_r[$classid]['cgtoinfo'] //副表 $finfor=$empire->fetch1("select ".ReturnSqlFtextF($mid)." from {$dbtbpre}ecms_".$tbname."_data_".$r['stb']." where id='$r[id]' limit 1"); $r=array_merge($r,$finfor); + +$cr=$empire->fetch1("select classpagekey,intro,classimg,cgroupid,companygroupid from {$dbtbpre}enewsclass where classid='$classid'"); +$isCompany = 0; +if($cr['companygroupid']) +{ + $userId= (int)$_COOKIE['lsfmomluserid']; + + $usergroupid = 0; + if($userId){ + $ccompany=$empire->fetch1("SELECT id FROM www_moban5_cn_ecms_companys WHERE title IN (SELECT company FROM www_moban5_cn_enewsmemberadd WHERE userid='{$userId}')"); + if($ccompany){ + $usergroupid = $ccompany['id']; + } + } + + if(!in_array($usergroupid,explode(",",$cr[companygroupid]))) + { + printerror('NotLevelToClass2','history.go(-1)',1); + } +} + //权限 if($r['groupid']||$class_r[$classid]['cgtoinfo']) { @@ -90,6 +111,7 @@ if($r['groupid']||$class_r[$classid]['cgtoinfo']) $checkinfor=$r; @include("../class/CheckLevel.php"); } + //缓存 if($ecms_tofunr['cacheopen']==1&&!$ecms_tofunr['cachehavedo']) {