예제 #1
0
파일: InfoType.php 프로젝트: novnan/meiju
function EditInfoType($add,$userid,$username){
	global $empire,$dbtbpre;
	$typeid=(int)$add['typeid'];
	if(!$typeid||!$add[mid]||!$add[tname]||!$add[listtempid]||!$add[tpath])
	{
		printerror("EmptyInfoTypeName","history.go(-1)");
    }
	$add=DoPostInfoTypeVar($add);
	CheckLevel($userid,$username,$classid,"infotype");
	//改变目录
	if($add[oldtpath]<>$add[tpath])
	{
		$createpath=ECMS_PATH.$add[tpath];
		if(file_exists($createpath))
		{
			printerror("ReInfoTypePath","");
		}
		if($add['oldpripath']==$add['pripath'])
		{
			$new=ECMS_PATH;
			@rename($new.$add[oldtpath],$new.$add[tpath]);//改变目录名
		}
		else
		{
			CreateInfoTypePath($add[tpath]);//建立目录
		}
    }
	//取得表名
	$tabler=GetModTable($add[mid]);
	$tabler[tid]=(int)$tabler[tid];
	//修改
	$sql=$empire->query("update {$dbtbpre}enewsinfotype set tname='$add[tname]',mid='$add[mid]',myorder='$add[myorder]',yhid='$add[yhid]',tnum='$add[tnum]',listtempid='$add[listtempid]',tpath='$add[tpath]',ttype='$add[ttype]',maxnum='$add[maxnum]',reorder='$add[reorder]',tid='$tabler[tid]',tbname='$tabler[tbname]',timg='$add[timg]',intro='$add[intro]',pagekey='$add[pagekey]',newline='$add[newline]',hotline='$add[hotline]',goodline='$add[goodline]',hotplline='$add[hotplline]',firstline='$add[firstline]',jstempid='$add[jstempid]',nrejs='$add[nrejs]',listdt='$add[listdt]',repagenum='$add[repagenum]' where typeid='$typeid'");
	GetClass();//更新缓存
	//生成页面
	if($add[listdt]==0)
	{
		ListHtml($typeid,$ret_r,5);
	}
	if($sql)
	{
		insert_dolog("typeid=".$typeid."<br>tname=".$add[tname]);//操作日志
		printerror("EditInfoTypeSuccess","InfoType.php?mid=$add[fmid]".hReturnEcmsHashStrHref2(0));
	}
	else
	{
		printerror("DbError","");
	}
}
예제 #2
0
function ReUserlist($listr, $addpath)
{
    $listr['addpath'] = $addpath;
    DoFileMkDir($listr['addpath'] . $listr['filepath']);
    //建目录
    ListHtml($classid, $field, 4, $listr);
}
예제 #3
0
파일: chtmlfun.php 프로젝트: novnan/meiju
function ReListTtHtmlMore($start, $classid, $from)
{
    global $empire, $public_r, $fun_r, $class_r, $dbtbpre;
    $start = (int) $start;
    $classid = eReturnInids($classid);
    if (empty($classid)) {
        printerror("ErrorUrl", $from);
    }
    $b = 0;
    //刷新标题分类
    $tsql = $empire->query("select typeid from {$dbtbpre}enewsinfotype where typeid>{$start} and typeid in (" . $classid . ") order by typeid limit " . $public_r[relistnum]);
    while ($t_r = $empire->fetch($tsql)) {
        $b = 1;
        ListHtml($t_r[typeid], $ret_r, 5);
        $end_classid = $t_r[typeid];
    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror("ReTtidAllSuccess", $from);
    }
    echo $fun_r[OneReTtListNewsSuccess] . "(ZtID:<font color=red><b>" . $end_classid . "</b></font>)<script>self.location.href='ecmschtml.php?enews=ReListTtHtmlMore&start={$end_classid}&classid={$classid}&from=" . urlencode($from) . hReturnEcmsHashStrHref(0) . "';</script>";
    exit;
}
예제 #4
0
function DoTimeRepage($time)
{
    global $empire, $dbtbpre;
    if (empty($time)) {
        $time = 120;
    }
    echo "<meta http-equiv=\"refresh\" content=\"" . $time . ";url=DoTimeRepage.php\">";
    DoAutoUpAndDownInfo();
    //自动上/下线
    $todaytime = time();
    $b = 0;
    $sql = $empire->query("select doing,classid,doid from {$dbtbpre}enewsdo where isopen=1 and lasttime+dotime*60<{$todaytime}");
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        if ($r[doing] == 1) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                ReListHtml($cr[$i], 1);
            }
        } elseif ($r[doing] == 2) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                ListHtml($cr[$i], $ret_r[0], 1);
            }
        } elseif ($r[doing] == 3) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select listid,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid from {$dbtbpre}enewsuserlist where listid='" . $cr[$i] . "'");
                ReUserlist($ur, "");
            }
        } elseif ($r[doing] == 4) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select id,path,pagetext,title,pagetitle,pagekeywords,pagedescription,tempid from {$dbtbpre}enewspage where id='" . $cr[$i] . "'");
                ReUserpage($ur[id], $ur[pagetext], $ur[path], $ur[title], $ur[pagetitle], $ur[pagekeywords], $ur[pagedescription], $ur[tempid]);
            }
        } elseif ($r[doing] == 5) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select jsid,jsname,jssql,jstempid,jsfilename from {$dbtbpre}enewsuserjs where jsid='" . $cr[$i] . "'");
                ReUserjs($ur, '');
            }
        } else {
            $indextemp = GetIndextemp();
            NewsBq($classid, $indextemp, 1, 0);
        }
        $empire->query("update {$dbtbpre}enewsdo set lasttime={$todaytime} where doid='{$r['doid']}'");
    }
    if ($b) {
        echo "最后执行时间:" . date("Y-m-d H:i:s", $todaytime) . "<br><br>";
    }
}
예제 #5
0
파일: hinfofun.php 프로젝트: novnan/meiju
function DoWfInfo($add, $userid, $username)
{
    global $empire, $dbtbpre, $class_r, $emod_r, $lur;
    $id = (int) $add[id];
    $classid = (int) $add[classid];
    $doing = (int) $add['doing'];
    if (!$id || !$classid || !$doing) {
        printerror('EmptyDoWfInfo', '');
    }
    $wfinfor = $empire->fetch1("select id,checknum,wfid,tid,groupid,userclass,username,checktno from {$dbtbpre}enewswfinfo where id='{$id}' and classid='{$classid}' limit 1");
    if (!$wfinfor[id]) {
        printerror('ErrorUrl', '');
    }
    if ($wfinfor[checktno] == '100' || $wfinfor[checktno] == '101' || $wfinfor[checktno] == '102') {
        printerror('DoWfInfoOver', '');
    }
    $wfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where tid='{$wfinfor['tid']}'");
    if (!(strstr(',' . $wfitemr[groupid] . ',', ',' . $lur[groupid] . ',') || strstr(',' . $wfitemr[userclass] . ',', ',' . $lur[classid] . ',') || strstr(',' . $wfitemr[username] . ',', ',' . $lur[username] . ','))) {
        printerror("NotDoCheckUserLevel", "history.go(-1)");
    }
    if (!(strstr(',' . $wfinfor[groupid] . ',', ',' . $lur[groupid] . ',') || strstr(',' . $wfinfor[userclass] . ',', ',' . $lur[classid] . ',') || strstr(',' . $wfinfor[username] . ',', ',' . $lur[username] . ','))) {
        printerror("HaveDoWfInfo", "history.go(-1)");
    }
    $pubid = ReturnInfoPubid($classid, $id);
    //附加链接参数
    $addecmscheck = empty($_POST['ecmscheck']) ? '&ecmscheck=1' : '';
    $checktext = ehtmlspecialchars($add[checktext]);
    if ($doing == 1) {
        if ($wfitemr[lztype] == 0) {
            if ($wfitemr['tno'] == '100') {
                $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_index set checked=1 where id='{$id}'");
                $ar = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_check where id='{$id}'");
                //未审核表转换
                MoveCheckInfoData($class_r[$classid][tbname], 0, $ar['stb'], "id='{$id}'");
                //更新栏目信息数
                AddClassInfos($classid, '', '+1');
                $empire->query("update {$dbtbpre}enewswfinfo set tstatus='',checktno='100' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                //生成
                GetHtml($ar['classid'], $ar['id'], $ar, 1);
                ListHtml($classid, $fr, 0);
            } else {
                $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tno>{$wfitemr['tno']} order by tno limit 1");
                $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='0' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $newwfitemr[wfid], $newwfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
            }
        } else {
            $newgroupid = str_replace(',' . $lur[groupid] . ',', ',', $wfinfor[groupid]);
            $newuserclass = str_replace(',' . $lur[classid] . ',', ',', $wfinfor[userclass]);
            $newusername = str_replace(',' . $lur[username] . ',', ',', $wfinfor[username]);
            //下一个节点
            if (($newgroupid == '' || $newgroupid == ',') && ($newuserclass == '' || $newuserclass == ',') && ($newusername == '' || $newusername == ',')) {
                if ($wfitemr['tno'] == '100') {
                    $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_index set checked=1 where id='{$id}'");
                    $ar = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_check where id='{$id}'");
                    //未审核表转换
                    MoveCheckInfoData($class_r[$classid][tbname], 0, $ar['stb'], "id='{$id}'");
                    //更新栏目信息数
                    AddClassInfos($classid, '', '+1');
                    $empire->query("update {$dbtbpre}enewswfinfo set tstatus='',checktno='100' where id='{$id}' and classid='{$classid}' limit 1");
                    //日志
                    InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                    //生成
                    GetHtml($ar['classid'], $ar['id'], $ar, 1);
                    ListHtml($classid, $fr, 0);
                } else {
                    $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tno>{$wfitemr['tno']} order by tno limit 1");
                    $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='0' where id='{$id}' and classid='{$classid}' limit 1");
                    //日志
                    InsertWfLog($classid, $id, $newwfitemr[wfid], $newwfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                }
            } else {
                $empire->query("update {$dbtbpre}enewswfinfo set groupid='{$newgroupid}',userclass='{$newuserclass}',username='******' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
            }
        }
        $mess = 'DoWfInfoCkSuccess';
    } elseif ($doing == 2) {
        if (empty($checktext)) {
            printerror('EmptyChecktext', 'history.go(-1)');
        }
        if ($wfitemr[tbdo] == 0) {
            $empire->query("update {$dbtbpre}enewswfinfo set tid=0,tstatus='',checktno='101' where id='{$id}' and classid='{$classid}' limit 1");
        } else {
            $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tid='{$wfitemr['tbdo']}' limit 1");
            $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='101' where id='{$id}' and classid='{$classid}' limit 1");
        }
        //日志
        InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 2);
        $mess = 'DoWfInfoTbSuccess';
    } else {
        if (empty($checktext)) {
            printerror('EmptyChecktext', 'history.go(-1)');
        }
        $empire->query("update {$dbtbpre}enewswfinfo set tid=0,tstatus='',checktno='102' where id='{$id}' and classid='{$classid}' limit 1");
        //日志
        InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 3);
        if ($wfitemr[tddo]) {
            $index_r = $empire->fetch1("select checked from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_index where id='{$id}' limit 1");
            //返回表
            $infotb = ReturnInfoMainTbname($class_r[$classid][tbname], $index_r['checked']);
            $r = $empire->fetch1("select * from " . $infotb . " where id='{$id}' limit 1");
            $mid = $class_r[$classid][modid];
            $tbname = $class_r[$classid][tbname];
            $pf = $emod_r[$mid]['pagef'];
            $stf = $emod_r[$mid]['savetxtf'];
            //返回表信息
            $infotbr = ReturnInfoTbname($class_r[$classid][tbname], $index_r['checked'], $r['stb']);
            //分页字段
            if ($pf) {
                if (strstr($emod_r[$mid]['tbdataf'], ',' . $pf . ',')) {
                    $finfor = $empire->fetch1("select " . $pf . " from " . $infotbr['datatbname'] . " where id='{$id}' limit 1");
                    $r[$pf] = $finfor[$pf];
                }
            }
            //存文本
            if ($stf) {
                $newstextfile = $r[$stf];
                $r[$stf] = GetTxtFieldText($r[$stf]);
                DelTxtFieldText($newstextfile);
                //删除文件
            }
            DelNewsFile($r[filename], $r[newspath], $classid, $r[$pf], $r[groupid]);
            //删除信息文件
            $empire->query("delete from {$dbtbpre}ecms_" . $tbname . "_index where id='{$id}'");
            $sql = $empire->query("delete from " . $infotbr['tbname'] . " where id='{$id}'");
            $fsql = $empire->query("delete from " . $infotbr['datatbname'] . " where id='{$id}'");
            //更新栏目信息数
            AddClassInfos($r[classid], '-1', '-1', $index_r['checked']);
            //删除其它表记录与附件
            DelSingleInfoOtherData($r['classid'], $id, $r, 0, 0);
        }
        $mess = 'DoWfInfoTdSuccess';
        $isclose = 1;
    }
    //操作日志
    insert_dolog("classid={$classid}&id={$id}", $pubid);
    printerror($mess, "workflow/DoWfInfo.php?classid={$classid}&id={$id}&isclose={$isclose}" . hReturnEcmsHashStrHref2(0));
}
예제 #6
0
function DoWfInfo($add, $userid, $username)
{
    global $empire, $dbtbpre, $class_r, $emod_r, $lur;
    $id = (int) $add[id];
    $classid = (int) $add[classid];
    $doing = (int) $add['doing'];
    if (!$id || !$classid || !$doing) {
        printerror('EmptyDoWfInfo', '');
    }
    $wfinfor = $empire->fetch1("select id,checknum,wfid,tid,groupid,userclass,username,checktno from {$dbtbpre}enewswfinfo where id='{$id}' and classid='{$classid}' limit 1");
    if (!$wfinfor[id]) {
        printerror('ErrorUrl', '');
    }
    if ($wfinfor[checktno] == '100' || $wfinfor[checktno] == '101' || $wfinfor[checktno] == '102') {
        printerror('DoWfInfoOver', '');
    }
    $wfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where tid='{$wfinfor['tid']}'");
    if (!(strstr(',' . $wfitemr[groupid] . ',', ',' . $lur[groupid] . ',') || strstr(',' . $wfitemr[userclass] . ',', ',' . $lur[classid] . ',') || strstr(',' . $wfitemr[username] . ',', ',' . $lur[username] . ','))) {
        printerror("NotDoCheckUserLevel", "history.go(-1)");
    }
    if (!(strstr(',' . $wfinfor[groupid] . ',', ',' . $lur[groupid] . ',') || strstr(',' . $wfinfor[userclass] . ',', ',' . $lur[classid] . ',') || strstr(',' . $wfinfor[username] . ',', ',' . $lur[username] . ','))) {
        printerror("HaveDoWfInfo", "history.go(-1)");
    }
    $checktext = htmlspecialchars($add[checktext]);
    if ($doing == 1) {
        if ($wfitemr[lztype] == 0) {
            if ($wfitemr['tno'] == '100') {
                $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " set checked=1 where id='{$id}'");
                $empire->query("update {$dbtbpre}enewswfinfo set tstatus='',checktno='100' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                //生成
                $ar = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}'");
                GetHtml($ar, '');
                ListHtml($classid, $fr, 0);
            } else {
                $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tno>{$wfitemr['tno']} order by tno limit 1");
                $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='0' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $newwfitemr[wfid], $newwfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
            }
        } else {
            $newgroupid = str_replace(',' . $lur[groupid] . ',', ',', $wfinfor[groupid]);
            $newuserclass = str_replace(',' . $lur[classid] . ',', ',', $wfinfor[userclass]);
            $newusername = str_replace(',' . $lur[username] . ',', ',', $wfinfor[username]);
            //下一个节点
            if (($newgroupid == '' || $newgroupid == ',') && ($newuserclass == '' || $newuserclass == ',') && ($newusername == '' || $newusername == ',')) {
                if ($wfitemr['tno'] == '100') {
                    $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " set checked=1 where id='{$id}'");
                    $empire->query("update {$dbtbpre}enewswfinfo set tstatus='',checktno='100' where id='{$id}' and classid='{$classid}' limit 1");
                    //日志
                    InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                    //生成
                    $ar = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}'");
                    GetHtml($ar, '');
                    ListHtml($classid, $fr, 0);
                } else {
                    $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tno>{$wfitemr['tno']} order by tno limit 1");
                    $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='0' where id='{$id}' and classid='{$classid}' limit 1");
                    //日志
                    InsertWfLog($classid, $id, $newwfitemr[wfid], $newwfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
                }
            } else {
                $empire->query("update {$dbtbpre}enewswfinfo set groupid='{$newgroupid}',userclass='{$newuserclass}',username='******' where id='{$id}' and classid='{$classid}' limit 1");
                //日志
                InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 1);
            }
        }
        $mess = 'DoWfInfoCkSuccess';
    } elseif ($doing == 2) {
        if (empty($checktext)) {
            printerror('EmptyChecktext', 'history.go(-1)');
        }
        if ($wfitemr[tbdo] == 0) {
            $empire->query("update {$dbtbpre}enewswfinfo set tid=0,tstatus='',checktno='101' where id='{$id}' and classid='{$classid}' limit 1");
        } else {
            $newwfitemr = $empire->fetch1("select tid,wfid,tno,groupid,userclass,username,lztype,tbdo,tddo,tstatus from {$dbtbpre}enewsworkflowitem where wfid='{$wfitemr['wfid']}' and tid='{$wfitemr['tbdo']}' limit 1");
            $empire->query("update {$dbtbpre}enewswfinfo set tid='{$newwfitemr['tid']}',groupid='{$newwfitemr['groupid']}',userclass='{$newwfitemr['userclass']}',username='******'username']}',tstatus='{$newwfitemr['tstatus']}',checktno='101' where id='{$id}' and classid='{$classid}' limit 1");
        }
        //日志
        InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 2);
        $mess = 'DoWfInfoTbSuccess';
    } else {
        if (empty($checktext)) {
            printerror('EmptyChecktext', 'history.go(-1)');
        }
        $empire->query("update {$dbtbpre}enewswfinfo set tid=0,tstatus='',checktno='102' where id='{$id}' and classid='{$classid}' limit 1");
        //日志
        InsertWfLog($classid, $id, $wfitemr[wfid], $wfitemr[tid], $username, $checktext, $wfinfor[checknum], 3);
        if ($wfitemr[tddo]) {
            $r = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}'");
            $mid = $class_r[$classid][modid];
            $tbname = $class_r[$classid][tbname];
            $pf = $emod_r[$mid]['pagef'];
            $stf = $emod_r[$mid]['savetxtf'];
            //分页字段
            if ($pf) {
                if (strstr($emod_r[$mid]['tbdataf'], ',' . $pf . ',')) {
                    $finfor = $empire->fetch1("select " . $pf . " from {$dbtbpre}ecms_" . $tbname . "_data_" . $r[stb] . " where id='{$id}'");
                    $r[$pf] = $finfor[$pf];
                }
            }
            //存文本
            if ($stf) {
                $newstextfile = $r[$stf];
                $r[$stf] = GetTxtFieldText($r[$stf]);
                DelTxtFieldText($newstextfile);
                //删除文件
            }
            DelNewsFile($r[filename], $r[newspath], $classid, $r[$pf], $r[groupid]);
            //删除信息文件
            $sql = $empire->query("delete from {$dbtbpre}ecms_" . $tbname . " where id='{$id}'");
            $fsql = $empire->query("delete from {$dbtbpre}ecms_" . $tbname . "_data_" . $r[stb] . " where id='{$id}'");
            //删除其它表记录
            $delsql = $empire->query("delete from {$dbtbpre}enewswfinfo where id='{$id}' and classid='{$r['classid']}'");
            $delsql = $empire->query("delete from {$dbtbpre}enewswfinfolog where id='{$id}' and classid='{$r['classid']}'");
            $delsql = $empire->query("delete from {$dbtbpre}enewsinfovote where id='{$id}' and classid='{$r['classid']}'");
            $delsql = $empire->query("delete from {$dbtbpre}enewsdiggips where id='{$id}' and classid='{$r['classid']}'");
            DelNewsTheFile($id, $classid);
            //删除附件
        }
        $mess = 'DoWfInfoTdSuccess';
        $isclose = 1;
    }
    //操作日志
    insert_dolog("classid={$classid}&id={$id}");
    printerror($mess, "workflow/DoWfInfo.php?classid={$classid}&id={$id}&isclose={$isclose}");
}
예제 #7
0
파일: qinfofun.php 프로젝트: novnan/meiju
function QReClassHtml($sonclass)
{
    global $empire, $dbtbpre, $class_r;
    $r = explode("|", $sonclass);
    $count = count($r);
    for ($i = 1; $i < $count - 1; $i++) {
        //终极栏目
        if ($class_r[$r[$i]]['islast']) {
            if (!$class_r[$r[$i]]['listdt']) {
                ListHtml($r[$i], '', 0, $userlistr);
            }
        } elseif ($class_r[$r[$i]]['islist'] == 1) {
            if (!$class_r[$r[$i]]['listdt']) {
                ListHtml($r[$i], '', 3);
            }
        } elseif ($class_r[$r[$i]]['islist'] == 3) {
            ReClassBdInfo($r[$i]);
        } else {
            $cr = $empire->fetch1("select classtempid from {$dbtbpre}enewsclass where classid='{$r[$i]}'");
            $classtemp = $class_r[$r[$i]]['islist'] == 2 ? GetClassText($r[$i]) : GetClassTemp($cr['classtempid']);
            NewsBq($r[$i], $classtemp, 0, 0);
        }
    }
}
예제 #8
0
function ReListZtHtmlMore($start, $classid, $from)
{
    global $empire, $public_r, $fun_r, $class_r, $dbtbpre;
    $start = (int) $start;
    $classid = RepPostVar($classid);
    if (empty($classid)) {
        printerror("ErrorUrl", $from);
    }
    $b = 0;
    //刷新专题
    $zsql = $empire->query("select ztid,ztname,ztnum,listtempid,classid from {$dbtbpre}enewszt where ztid>{$start} and ztid in(" . $classid . ") order by ztid limit " . $public_r[relistnum]);
    while ($z_r = $empire->fetch($zsql)) {
        $b = 1;
        ListHtml($z_r[ztid], $ret_r, 1);
        $end_classid = $z_r[ztid];
    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror("ReClassidAllSuccess", $from);
    }
    echo $fun_r[OneReZtListNewsSuccess] . "(ZtID:<font color=red><b>" . $end_classid . "</b></font>)<script>self.location.href='ecmschtml.php?enews=ReListZtHtmlMore&start={$end_classid}&classid={$classid}&from={$from}';</script>";
    exit;
}