Exemple #1
0
function EcmsShowThisMemberMenu()
{
    global $memberskinurl, $noaddimgurl;
    $selffile = eReturnSelfPage(0);
    if (stristr($selffile, '/member/msg')) {
        $menuname = 'menumsg';
    } elseif (stristr($selffile, 'e/DoInfo')) {
        $menuname = 'menuinfo';
    } elseif (stristr($selffile, '/member/mspace')) {
        $menuname = 'menuspace';
    } elseif (stristr($selffile, 'e/ShopSys')) {
        $menuname = 'menushop';
    } elseif (stristr($selffile, 'e/payapi') || stristr($selffile, '/member/buygroup') || stristr($selffile, '/member/card') || stristr($selffile, '/member/buybak') || stristr($selffile, '/member/downbak')) {
        $menuname = 'menupay';
    } else {
        $menuname = 'menumember';
    }
    echo '<script>turnit(do' . $menuname . ',"' . $menuname . 'img");</script>';
    ?>
	<script>
	do<?php 
    echo $menuname;
    ?>
.style.display="";
	document.images.<?php 
    echo $menuname;
    ?>
img.src="<?php 
    echo $noaddimgurl;
    ?>
";
	</script>
	<?php 
}
Exemple #2
0
function page2($num, $line, $page_line, $start, $page, $search)
{
    global $fun_r;
    if ($num <= $line) {
        return '<span class="epages"><a title="' . $fun_r['admintrecord'] . '">&nbsp;<b>' . $num . '</b> </a>&nbsp;&nbsp;</span>';
    }
    $search = RepPostStr($search, 1);
    $url = eReturnSelfPage(0) . '?page';
    $snum = 2;
    //最小页数
    $totalpage = ceil($num / $line);
    //取得总页数
    $firststr = '<a title="' . $fun_r['admintrecord'] . '">&nbsp;<b>' . $num . '</b> </a>&nbsp;&nbsp;';
    //上一页
    if ($page != 0) {
        $toppage = '<a href="' . $url . '=0' . $search . '">' . $fun_r['adminstartpage'] . '</a>&nbsp;';
        $pagepr = $page - 1;
        $prepage = '<a href="' . $url . '=' . $pagepr . $search . '">' . $fun_r['adminpripage'] . '</a>';
    }
    //下一页
    if ($page != $totalpage - 1) {
        $pagenex = $page + 1;
        $nextpage = '&nbsp;<a href="' . $url . '=' . $pagenex . $search . '">' . $fun_r['adminnextpage'] . '</a>';
        $lastpage = '&nbsp;<a href="' . $url . '=' . ($totalpage - 1) . $search . '">' . $fun_r['adminlastpage'] . '</a>';
    }
    $starti = $page - $snum < 0 ? 0 : $page - $snum;
    $no = 0;
    for ($i = $starti; $i < $totalpage && $no < $page_line; $i++) {
        $no++;
        if ($page == $i) {
            $is_1 = "<b>";
            $is_2 = "</b>";
        } else {
            $is_1 = '<a href="' . $url . '=' . $i . $search . '">';
            $is_2 = "</a>";
        }
        $pagenum = $i + 1;
        $returnstr .= "&nbsp;" . $is_1 . $pagenum . $is_2;
    }
    $returnstr = $firststr . $toppage . $prepage . $returnstr . $nextpage . $lastpage;
    return '<span class="epages">' . $returnstr . '</span>';
}
Exemple #3
0
function DoWapListPage($num, $line, $page, $search)
{
    if (empty($num)) {
        return '';
    }
    $str = '';
    $pagenum = ceil($num / $line);
    $search = RepPostStr($search, 1);
    $phpself = eReturnSelfPage(0);
    if ($page) {
        $str .= "<a href=\"" . $phpself . "?page=0" . $search . "\">首页</a>&nbsp;";
    }
    if ($page) {
        $str .= "<a href=\"" . $phpself . "?page=" . ($page - 1) . $search . "\">上一页</a>&nbsp;";
    }
    if ($page != $pagenum - 1) {
        $str .= "<a href=\"" . $phpself . "?page=" . ($page + 1) . $search . "\">下一页</a>&nbsp;";
    }
    if ($page != $pagenum - 1) {
        $str .= "<a href=\"" . $phpself . "?page=" . ($pagenum - 1) . $search . "\">尾页</a>&nbsp;";
    }
    return $str;
}
Exemple #4
0
    $doorder = "onclick desc";
} elseif ($myorder == 4) {
    $doorder = "id desc";
} else {
    $thisclassr = $empire->fetch1("select listorder from {$dbtbpre}enewsclass where classid='{$classid}'");
    if (empty($thisclassr[listorder])) {
        $doorder = "id desc";
    } else {
        $doorder = $thisclassr[listorder];
    }
}
$search .= "&totalnum={$num}";
$search1 = $search;
$search .= "&myorder={$myorder}";
$returnpage = page2($num, $line, $page_line, $start, $page, $search);
$phpmyself = urlencode(eReturnSelfPage(1));
//标题分类
$tts = '';
$ttsql = $empire->query("select typeid,tname from {$dbtbpre}enewsinfotype where mid='{$modid}' order by myorder");
while ($ttr = $empire->fetch($ttsql)) {
    $select = '';
    if ($ttr[typeid] == $ttid) {
        $select = ' selected';
    }
    $tts .= "<option value='{$ttr['typeid']}'" . $select . ">{$ttr['tname']}</option>";
}
$stts = $tts ? "<select name='ttid'><option value='0'>标题分类</option>{$tts}</select>" : "";
//栏目链接
$getcurlr['classid'] = $classid;
$classurl = sys_ReturnBqClassname($getcurlr, 9);
//导入页面
Exemple #5
0
    require_once ECMS_PATH . DASHBOARD . '/data/dbcache/class.php';
    require_once ECMS_PATH . DASHBOARD . '/data/dbcache/MemberLevel.php';
    $link = db_connect();
    $empire = new mysqlquery();
    $check_tbname = RepPostVar($check_tbname);
    $checkinfor = $empire->fetch1("select * from {$dbtbpre}ecms_" . $check_tbname . " where id='{$check_infoid}' limit 1");
    if (!$checkinfor['id'] || $checkinfor['classid'] != $check_classid) {
        echo "<script>alert('此信息不存在');history.go(-1);</script>";
        exit;
    }
    //副表
    $check_mid = $class_r[$checkinfor[classid]]['modid'];
    $checkfinfor = $empire->fetch1("select " . ReturnSqlFtextF($check_mid) . " from {$dbtbpre}ecms_" . $check_tbname . "_data_" . $checkinfor[stb] . " where id='{$checkinfor['id']}' limit 1");
    $checkinfor = array_merge($checkinfor, $checkfinfor);
} else {
    $check_tbname = RepPostVar($check_tbname);
}
require_once ECMS_PATH . DASHBOARD . '/member/class/user.php';
//验证IP
eCheckAccessDoIp('showinfo');
if ($checkinfor['groupid'] || $class_r[$checkinfor[classid]]['cgtoinfo']) {
    $toreturnurl = eReturnSelfPage(1);
    //返回页面地址
    $gotourl = $ecms_config['member']['loginurl'] ? $ecms_config['member']['loginurl'] : $public_r['newsurl'] . "e/member/login/";
    //登陆地址
    CheckShowNewsLevel($checkinfor);
}
if (!defined('PageCheckLevel')) {
    db_close();
    $empire = null;
}
Exemple #6
0
?>
&addsitename='+document.add.befrom.value);">
</td></tr><tr><td height=25 colspan=2 bgcolor='ffffff'><div align=left>新闻正文</div></td></tr></table><div style='background-color:#D0D0D0'><script type="text/javascript" src="/<?php 
echo explode('/', eReturnSelfPage(0))[1];
?>
/data/ecmseditor/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/<?php 
echo explode('/', eReturnSelfPage(0))[1];
?>
/data/ecmseditor/ueditor/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="/<?php 
echo explode('/', eReturnSelfPage(0))[1];
?>
/data/ecmseditor/ueditor/lang/zh-cn/zh-cn.js"></script>
<link rel="stylesheet" href="/<?php 
echo explode('/', eReturnSelfPage(0))[1];
?>
/data/ecmseditor/ueditor/themes/default/css/ueditor.css">
<script type="text/plain" id="myEditor" name="newstext" style="width:99%;height:450px;"> 
<?php 
echo $ecmsfirstpost == 1 ? "" : stripSlashes($r[newstext]);
?>
 
</script>
<script type="text/javascript"> 
var editor = new baidu.editor.ui.Editor(); 
editor.render("myEditor"); 
editor.classid = <?php 
echo $classid;
?>
; 
Exemple #7
0
function ShopCheckAddDdGroup($shoppr)
{
    global $public_r;
    //限制下单会员
    if ($shoppr['shopddgroupid']) {
        if (!getcvar('mluserid')) {
            $phpmyself = urlencode(eReturnSelfPage(1));
            $gotourl = $public_r['newsurl'] . "e/member/login/login.php?prt=1&from=" . $phpmyself;
            $petype = 1;
            printerror("NotLogin", $gotourl, $petype);
        }
    }
}
Exemple #8
0
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;
}