?> "> <input name="oldchecked" type="hidden" value="<?php echo $r[checked]; ?> "> <input name="newstext_url" type="hidden" value="<?php echo $newstext_url; ?> "> <input name="ecmsfrom" type="hidden" value="<?php echo RepPostStrUrl($_SERVER['HTTP_REFERER']); ?> "> <input name="ecmsnfrom" type="hidden" value="<?php echo RepPostStrUrl($_GET['ecmsnfrom']); ?> "> <input name="fstb" type="hidden" value="<?php echo $r[fstb]; ?> "> <input name="oldttid" type="hidden" value="<?php echo $r[ttid]; ?> "> <input name="ecmscheck" type="hidden" id="ecmscheck" value="<?php echo $ecmscheck; ?> "> <input name="ztids" type="hidden" id="ztids">
$link = db_connect(); $empire = new mysqlquery(); $editor = 1; //验证用户 $lur = is_login(); $logininid = $lur['userid']; $loginin = $lur['username']; $loginrnd = $lur['rnd']; $loginlevel = $lur['groupid']; $loginadminstyleid = $lur['adminstyleid']; //ehash $ecms_hashur = hReturnEcmsHashStrAll(); $add = $_GET; $havehtml = (int) $add['havehtml']; $add[classid] = RepPostVar($add[classid]); $add[from] = RepPostStrUrl($add[from]); $add[retype] = RepPostStr($add[retype], 1); $add[startday] = RepPostStr($add[startday], 1); $add[endday] = RepPostStr($add[endday], 1); $add[startid] = RepPostVar($add[startid]); $add[endid] = RepPostVar($add[endid]); $tbname = $add['tbname']; $count = count($tbname); //刷新所有表 if (!$count) { $j = 0; $tsql = $empire->query("select tbname from {$dbtbpre}enewstable where intb=0 order by tid"); while ($tr = $empire->fetch($tsql)) { $tbname[$j] = $tr[tbname]; $j++; }
require "../../../class/connect.php"; require "../../../class/q_functions.php"; require "../../../class/db_sql.php"; require "../../../data/dbcache/class.php"; require "../../class/user.php"; require '../../class/favfun.php'; $link = db_connect(); $empire = new mysqlquery(); $editor = 2; eCheckCloseMods('member'); //关闭模块 $user = islogin(); $id = (int) $_GET['id']; $classid = (int) $_GET['classid']; if (!$id || !$classid || !$class_r[$classid][tbname]) { printerror("ErrorUrl", "", 1); } //链接 $r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1"); if (empty($r['id']) || $r['classid'] != $classid) { printerror("ErrorUrl", "", 1); } $titleurl = sys_ReturnBqTitleLink($r); //返回分类 $cid = (int) $_GET['cid']; $select = ReturnFavaClass($user[userid], $cid); $from = RepPostStrUrl($_SERVER['HTTP_REFERER']); //导入模板 require ECMS_PATH . DASHBOARD . '/template/member/AddFava.php'; db_close(); $empire = null;
require "../../class/functions.php"; $link = db_connect(); $empire = new mysqlquery(); $editor = 1; //验证用户 $lur = is_login(); $logininid = $lur['userid']; $loginin = $lur['username']; $loginrnd = $lur['rnd']; $loginlevel = $lur['groupid']; $loginadminstyleid = $lur['adminstyleid']; //ehash $ecms_hashur = hReturnEcmsHashStrAll(); hCheckEcmsRHash(); //初使化 $from = RepPostStrUrl($_GET['from']); if ($_GET['first'] == 1) { $rechecktablenum = 0; } else { $rechecktablenum = $_COOKIE['rechecktablenum']; $rechecktablenum += 1; } if ($rechecktablenum >= $_COOKIE['retablenum']) { $enews = "ReNewsHtml"; //操作日志 insert_dolog(""); echo "<script>alert('刷新信息页面成功!');parent.location.href='{$from}';</script>"; } else { //setcookie("rechecktablenum",$rechecktablenum,0,"/",""); } db_close();
function DoingReturnUrl($url, $from = '') { if (empty($from)) { return RepPostStrUrl($url); } elseif ($from == 9) { $from = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : $url; } return RepPostStrUrl($from); }
return ''; } $navcachenum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsclassnavcache where " . $where . " limit 1"); return $navcachenum; } //写入缓存 function InsertNavClassCache($navtype, $userid, $modid) { global $empire, $dbtbpre; $userid = (int) $userid; $modid = (int) $modid; $empire->query("insert into {$dbtbpre}enewsclassnavcache(navtype,userid,modid) values('{$navtype}','{$userid}','{$modid}');"); } $enews = RepPostVar($_GET['enews']); $mess = RepPostVar($_GET['mess']); $ecmstourl = RepPostStrUrl($_GET['ecmstourl']); if (!$mess) { db_close(); $empire = null; exit; } if (!$enews) { printerror($mess, $ecmstourl); } $uid = (int) $_GET['uid']; if (empty($uid)) { $thisuid = $logininid; } else { $thisuid = $uid; } $user_r = $empire->fetch1("select adminclass,groupid from {$dbtbpre}enewsuser where userid='{$thisuid}'");
function islogin($uid = 0, $uname = '', $urnd = '') { global $empire, $dbtbpre, $public_r, $ecmsreurl, $ecms_config; if ($uid) { $userid = (int) $uid; } else { $userid = (int) getcvar('mluserid'); } if ($uname) { $username = $uname; } else { $username = getcvar('mlusername'); } $username = RepPostVar($username); if ($urnd) { $rnd = $urnd; } else { $rnd = getcvar('mlrnd'); } if ($ecms_config['member']['loginurl']) { $gotourl = $ecms_config['member']['loginurl']; } else { $gotourl = $public_r['newsurl'] . "e/member/login/"; } $petype = 1; $rnd = RepPostVar($rnd); if (!$userid || !$username || !$rnd) { if (!getcvar('returnurl')) { esetcookie("returnurl", RepPostStrUrl($_SERVER['HTTP_REFERER']), 0); } if ($ecmsreurl == 1) { $gotourl = "history.go(-1)"; $petype = 9; } elseif ($ecmsreurl == 2) { $phpmyself = urlencode(eReturnSelfPage(1)); $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself; $petype = 9; } printerror("NotLogin", $gotourl, $petype); } $cr = $empire->fetch1("select " . eReturnSelectMemberF('userid,username,email,groupid,userfen,money,userdate,zgroupid,havemsg,checked,registertime') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}' and " . egetmf('username') . "='{$username}' and " . egetmf('rnd') . "='{$rnd}' limit 1"); if (!$cr['userid']) { EmptyEcmsCookie(); if (!getcvar('returnurl')) { esetcookie("returnurl", RepPostStrUrl($_SERVER['HTTP_REFERER']), 0); } if ($ecmsreurl == 1) { $gotourl = "history.go(-1)"; $petype = 9; } elseif ($ecmsreurl == 2) { $phpmyself = urlencode(eReturnSelfPage(1)); $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself; $petype = 9; } printerror("NotSingleLogin", $gotourl, $petype); } if ($cr['checked'] == 0) { EmptyEcmsCookie(); if ($ecmsreurl == 1) { $gotourl = "history.go(-1)"; $petype = 9; } elseif ($ecmsreurl == 2) { $phpmyself = urlencode(eReturnSelfPage(1)); $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself; $petype = 9; } printerror("NotCheckedUser", '', $petype); } //默认会员组 if (empty($cr['groupid'])) { $user_groupid = eReturnMemberDefGroupid(); $usql = $empire->query("update " . eReturnMemberTable() . " set " . egetmf('groupid') . "='{$user_groupid}' where " . egetmf('userid') . "='" . $cr[userid] . "'"); $cr['groupid'] = $user_groupid; } //是否过期 if ($cr['userdate']) { if ($cr['userdate'] - time() <= 0) { OutTimeZGroup($cr['userid'], $cr['zgroupid']); $cr['userdate'] = 0; if ($cr['zgroupid']) { $cr['groupid'] = $cr['zgroupid']; $cr['zgroupid'] = 0; } } } $re[userid] = $cr['userid']; $re[rnd] = $rnd; $re[username] = $cr['username']; $re[email] = $cr['email']; $re[userfen] = $cr['userfen']; $re[money] = $cr['money']; $re[groupid] = $cr['groupid']; $re[userdate] = $cr['userdate']; $re[zgroupid] = $cr['zgroupid']; $re[havemsg] = $cr['havemsg']; $re[registertime] = $cr['registertime']; return $re; }