function ReturnSpInfoidGetData($add, $userid, $username)
{
    global $empire, $dbtbpre, $class_r, $emod_r;
    $idr = explode(',', $add['getinfoid']);
    $classid = (int) $idr[0];
    $id = (int) $idr[1];
    if (!$classid || !$id || !$class_r[$classid][tbname]) {
        return '';
    }
    $mid = $class_r[$classid]['modid'];
    $smalltextf = $emod_r[$mid]['smalltextf'];
    $sf = '';
    if ($smalltextf && $smalltextf != ',') {
        $smr = explode(',', $smalltextf);
        $sf = $smr[1];
    }
    $addf = '';
    if ($sf && !strstr($emod_r[$mid]['tbdataf'], ',' . $sf . ',')) {
        $addf = ',' . $sf;
    }
    $infor = $empire->fetch1("select id,classid,titleurl,groupid,newspath,filename,checked,isgood,firsttitle,plnum,totaldown,onclick,newstime,titlepic,title,stb" . $addf . " from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}'");
    if (!$infor['id']) {
        return '';
    }
    if ($sf && !$addf) {
        $finfor = $empire->fetch1("select " . $sf . " from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_data_" . $infor[stb] . " where id='{$id}'");
        $infor[$sf] = $finfor[$sf];
    }
    $ret_r['title'] = $infor[title];
    $ret_r['titleurl'] = sys_ReturnBqTitleLink($infor);
    $ret_r['titlepic'] = $infor[titlepic];
    $ret_r['smalltext'] = $infor[$sf];
    $ret_r['newstime'] = $infor[newstime];
    return $ret_r;
}
function ShowBuyproduct()
{
    global $empire, $class_r, $dbtbpre;
    $buycar = getcvar('mybuycar');
    if (empty($buycar)) {
        printerror('你的购物车没有商品', '', 1, 0, 1);
    }
    $record = "!";
    $field = "|";
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>\r\n          <tr class='header'> \r\n            <td width='41%' height=23> <div align=center>商品名称</div></td>\r\n            <td width='15%'> <div align=center>市场价格</div></td>\r\n            <td width='15%'> <div align=center>优惠价格</div></td>\r\n            <td width='8%'> <div align=center>数量</div></td>\r\n            <td width='21%'> <div align=center>小计</div></td>\r\n          </tr>";
    $alltotal = 0;
    $return[0] = 0;
    $return[1] = 0;
    $return[2] = 0;
    $r = explode($record, $buycar);
    $count = count($r);
    for ($i = 0; $i < $count - 1; $i++) {
        $pr = explode($field, $r[$i]);
        $productid = $pr[1];
        $fr = explode(",", $pr[1]);
        //ID
        $classid = (int) $fr[0];
        $id = (int) $fr[1];
        if (empty($class_r[$classid][tbname])) {
            continue;
        }
        //数量
        $num = (int) $pr[2];
        if (empty($num)) {
            $num = 1;
        }
        //取得产品信息
        $productr = $empire->fetch1("select title,tprice,price,titleurl,groupid,classid,newspath,filename,id,titlepic,buyfen from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where classid='{$classid}' and id='{$id}' limit 1");
        if (empty($productr[id])) {
            continue;
        }
        //是否全部点数
        if (!$productr[buyfen]) {
            $return[0] = 1;
        }
        $return[1] += $productr[buyfen] * $num;
        //产品图片
        if (empty($productr[titlepic])) {
            $productr[titlepic] = "../../data/images/notimg.gif";
        }
        //返回链接
        $titleurl = sys_ReturnBqTitleLink($productr);
        $thistotal = $productr[price] * $num;
        $alltotal += $thistotal;
        echo "<tr>\r\n\t<td align='center' height=23><a href='" . $titleurl . "' target=_blank>" . $productr[title] . "</a></td>\r\n\t<td align='right'>¥" . $productr[tprice] . "</td>\r\n\t<td align='right'><b>¥" . $productr[price] . "</b></td>\r\n\t<td align='right'>" . $num . "</td>\r\n\t<td align='right'>¥" . $thistotal . "</td>\r\n\t</tr>";
    }
    //支付点数付费
    if (!$return[0]) {
        $a = "<tr height='25'> \r\n      <td colspan=5><div align=right>合计点数:<strong>" . $return[1] . "</strong></div></td>\r\n    </tr>";
    }
    echo "<tr height='27'> \r\n      <td colspan=5><div align=right>合计:<strong>¥" . $alltotal . "</strong></div></td>\r\n    </tr>" . $a . "\r\n  </table>";
    $return[2] = $alltotal;
    return $return;
}
Beispiel #3
0
function ShowBuycar()
{
    global $empire, $class_r, $dbtbpre;
    $buycar = getcvar('mybuycar');
    $record = "!";
    $field = "|";
    $alltotal = 0;
    $return[0] = 0;
    $return[1] = 0;
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>\r\n  <form name=form1 method=post action='../../enews/index.php'>\r\n  <input type=hidden name=enews value=EditBuycar>\r\n    <tr class='header'> \r\n      <td width='16%' height=23> <div align=center>图片</div></td>\r\n      <td width='29%'> <div align=center>商品名称</div></td>\r\n      <td width='14%'> <div align=center>市场价格</div></td>\r\n      <td width='14%'> <div align=center>优惠价格</div></td>\r\n      <td width='8%'> <div align=center>数量</div></td>\r\n      <td width='14%'> <div align=center>小计</div></td>\r\n      <td width='5%'> <div align=center>删除</div></td>\r\n    </tr>";
    $r = explode($record, $buycar);
    $count = count($r);
    for ($i = 0; $i < $count - 1; $i++) {
        $pr = explode($field, $r[$i]);
        $productid = $pr[1];
        $fr = explode(",", $pr[1]);
        //ID
        $classid = (int) $fr[0];
        $id = (int) $fr[1];
        if (empty($class_r[$classid][tbname])) {
            continue;
        }
        //数量
        $num = (int) $pr[2];
        if (empty($num)) {
            $num = 1;
        }
        //取得产品信息
        $productr = $empire->fetch1("select title,tprice,price,titleurl,groupid,classid,newspath,filename,id,titlepic,buyfen from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where classid='{$classid}' and id='{$id}' limit 1");
        if (empty($productr[id])) {
            continue;
        }
        //是否全部点数
        if (!$productr[buyfen]) {
            $return[0] = 1;
        }
        $return[1] += $productr[buyfen] * $num;
        //产品图片
        if (empty($productr[titlepic])) {
            $productr[titlepic] = "../../data/images/notimg.gif";
        }
        //返回链接
        $titleurl = sys_ReturnBqTitleLink($productr);
        $thistotal = $productr[price] * $num;
        $alltotal += $thistotal;
        echo "<tr>\r\n\t<td align=center><a href='" . $titleurl . "' target=_blank><img src='" . $productr[titlepic] . "' border=0 width=80 height=80></a></td>\r\n\t<td align=center><a href='" . $titleurl . "' target=_blank>" . $productr[title] . "</a></td>\r\n\t<td align=right>¥" . $productr[tprice] . "</td>\r\n\t<td align=right><b>¥" . $productr[price] . "</b></td>\r\n\t<td align=center><input type=text name=num[] value='" . $num . "' size=6></td>\r\n\t<td align=right>¥" . $thistotal . "</td>\r\n\t<td align=center><input type=checkbox name=del[] value='" . $productid . "'></td>\r\n\t<input type=hidden name=productid[] value='" . $productid . "'></tr>";
    }
    //支付点数付费
    if (!$return[0]) {
        $a = "<tr height='25'> \r\n      <td colspan=6><div align=right>合计点数:<strong>" . $return[1] . "</strong></div></td>\r\n      <td>&nbsp;</td>\r\n    </tr>";
    }
    echo "<tr height='27'> \r\n      <td colspan=6><div align=right>合计:<strong>¥" . $alltotal . "</strong></div></td>\r\n      <td>&nbsp;</td>\r\n    </tr>" . $a . "\r\n    <tr> \r\n      <td colspan=7 height='25'><div align=right><a href='../../enews/?enews=ClearBuycar'><img src=../../data/images/shop/clearbuycar.gif width=92 height=23 border=0></a>&nbsp;&nbsp;\r\n          <input name=imageField type=image src=../../data/images/shop/editbuycar.gif width=135 height=23 border=0>\r\n          &nbsp;&nbsp;<a href='javascript:window.close();'><img src=../../data/images/shop/buynext.gif width=87 height=23 border=0></a>&nbsp;&nbsp;<a href='../order/'><img src=../../data/images/shop/buycarnext.gif width=87 height=19 border=0></a></div></td>\r\n    </tr>\r\n\t</form>\r\n  </table>";
    return $return;
}
Beispiel #4
0
function ecmsShowInfoTop($query, $where, $field, $topnum, $day)
{
    global $empire, $dbtbpre, $class_r;
    if ($day) {
        $and = $where ? ' and ' : ' where ';
        $query .= $and . "newstime>=" . time() . "-" . $day * 24 * 3600;
    }
    if ($field == 'plnum') {
        $word = '评论数';
    } elseif ($field == 'totaldown') {
        $word = '下载数';
    } elseif ($field == 'onclick') {
        $word = '点击数';
    }
    $query .= " order by " . $field . " desc limit " . $topnum;
    echo "<table width='100%' border='0' cellpadding='3' cellspacing='1' class='tableborder'><tr><td width='85%'>标题</td><td width='15%'>{$word}</td></tr>";
    $sql = $empire->query($query);
    while ($r = $empire->fetch($sql)) {
        $classurl = sys_ReturnBqClassname($r, 9);
        $titleurl = sys_ReturnBqTitleLink($r);
        echo "<tr bgcolor='#ffffff' height='23'><td>[<a href='" . $classurl . "' target='_blank'>" . $class_r[$r[classid]][classname] . "</a>] <a href='{$titleurl}' target='_blank' title='发布时间:" . date("Y-m-d H:i:s", $r[newstime]) . "'>" . stripSlashes($r[title]) . "</a></td><td>" . $r[$field] . "</td></tr>";
    }
    echo "</table>";
}
Beispiel #5
0
function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search)
{
    global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r;
    //更新点击
    $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='{$add['id']}' limit 1");
    $add['onclick'] = $add['onclick'] + 1;
    //模板参数
    $newstemptext = $newstemp_r[temptext];
    $formatdate = $newstemp_r[showdate];
    //页面
    $pagetitle = ehtmlspecialchars($add[title]);
    $url = ReturnClassLink($add[classid]);
    //导航
    $newstemptext = DtInfo_ReplaceSvars($newstemptext, $url, $add[classid], $pagetitle, $add[keyboard], $pagetitle);
    //相关信息
    if (strstr($newstemptext, '[!--other.link--]')) {
        $keyboardtext = GetKeyboard($add[keyboard], $add[keyid], $add[classid], $add[id], $class_r[$add[classid]][link_num]);
    }
    //分页字段
    $ptitle = $add['title'];
    $truepage = '';
    $titleselect = '';
    $expage = '[!--empirenews.page--]';
    //分页符
    $pf = $emod_r[$mid]['pagef'];
    if ($pf && strstr($add[$pf], $expage)) {
        $n_r = explode($expage, $add[$pf]);
        $thispagenum = count($n_r);
        if ($page < 0 || $page > $thispagenum - 1) {
            $page = 0;
        }
        $add[$pf] = $n_r[$page];
        if ($page) {
            $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]);
            if (count($ti_r) >= 2) {
                $ptitle = $ti_r[0];
                $add[$pf] = $ti_r[1];
            } else {
                $ptitle = $add['title'] . '(' . ($page + 1) . ')';
            }
        }
        //伪静态
        $pagefunr = eReturnRewriteInfoUrl($add['classid'], $add['id'], 0);
        $pagefunr['repagenum'] = 0;
        //取得分页
        $truepage = InfoUsePage($thispagenum, $line, $page_line, $start, $page, $search, $pagefunr);
        //下拉式分页
        if (strstr($newstemptext, '[!--title.select--]')) {
            for ($j = 0; $j < $thispagenum; $j++) {
                $spurl = eReturnRewritePageLink($pagefunr, $j);
                if ($j == 0) {
                    $sptitle = $add[title];
                } else {
                    $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]);
                    $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add[title] . '(' . ($j + 1) . ')';
                }
                $select = '';
                if ($page == $j) {
                    $ptitle = $sptitle;
                    $select = ' selected';
                }
                $titleselect .= '<option value="' . $spurl . '"' . $select . '>' . $sptitle . '</option>';
            }
            $titleselect = '<select name="titleselect" onchange="self.location.href=this.options[this.selectedIndex].value">' . $titleselect . '</select>';
        }
        //下一页链接
        if ($page == $thispagenum - 1) {
            $thisnextlink = eReturnRewritePageLink($pagefunr, 0);
        } else {
            $thisnextlink = eReturnRewritePageLink($pagefunr, $page + 1);
        }
    }
    //返回替换验证字符
    $docheckrep = ReturnCheckDoRepStr();
    if ($add[newstext]) {
        if (empty($public_r['dorepword']) && $docheckrep[3]) {
            $add[newstext] = ReplaceWord($add[newstext]);
            //过滤字符
        }
        if (empty($public_r['dorepkey']) && $docheckrep[4] && !empty($add[dokey])) {
            $add[newstext] = ReplaceKey($add['newstext'], $add['classid']);
        }
        if ($public_r['opencopytext']) {
            $add[newstext] = AddNotCopyRndStr($add[newstext]);
            //随机复制字符
        }
    }
    //变量
    $tempf = $emod_r[$mid]['tempf'];
    $fr = explode(',', $tempf);
    $fcount = count($fr) - 1;
    //变量替换
    $newstempstr = $newstemptext;
    //模板
    for ($i = 1; $i < $fcount; $i++) {
        $f = $fr[$i];
        $value = $add[$f];
        if ($f == 'downpath') {
            if (strstr($newstemptext, '[!--downpath--]')) {
                $value = ReturnDownSoftHtml($add);
            }
        } elseif ($f == 'onlinepath') {
            if (strstr($newstemptext, '[!--onlinepath--]')) {
                $value = ReturnOnlinepathHtml($add);
            }
        } elseif ($f == 'morepic') {
            if (strstr($newstemptext, '[!--morepic--]')) {
                $value = ReturnMorepicpathHtml($add);
            }
        } elseif ($f == 'newstime') {
            if (strstr($newstemptext, '[!--newstime--]')) {
                $value = date($formatdate, $value);
            }
        } elseif ($f == 'befrom') {
            if ($docheckrep[1] && strstr($newstemptext, '[!--befrom--]')) {
                $value = ReplaceBefrom($value);
            }
        } elseif ($f == 'writer') {
            if ($docheckrep[2] && strstr($newstemptext, '[!--writer--]')) {
                $value = ReplaceWriter($value);
            }
        } elseif ($f == 'titlepic') {
            if (empty($value)) {
                $value = $public_r[newsurl] . 'e/data/images/notimg.gif';
            }
        } elseif ($f == 'title') {
        } else {
            if (!strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) {
                if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) {
                    $value = nl2br($value);
                }
                if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) {
                    $value = RepFieldtextNbsp(ehtmlspecialchars($value));
                }
            }
        }
        $newstempstr = str_replace('[!--' . $f . '--]', $value, $newstempstr);
    }
    //固定变量
    $newstempstr = str_replace('[!--id--]', $add[id], $newstempstr);
    $newstempstr = str_replace('[!--classid--]', $add[classid], $newstempstr);
    $newstempstr = str_replace('[!--class.name--]', $class_r[$add[classid]][classname], $newstempstr);
    $newstempstr = str_replace('[!--ttid--]', $add[ttid], $newstempstr);
    $newstempstr = str_replace('[!--tt.name--]', $class_tr[$add[ttid]][tname], $newstempstr);
    $newstempstr = str_replace('[!--tt.url--]', sys_ReturnBqInfoTypeUrl($add['ttid']), $newstempstr);
    $newstempstr = str_replace('[!--onclick--]', $add[onclick], $newstempstr);
    $newstempstr = str_replace('[!--userfen--]', $add[userfen], $newstempstr);
    $newstempstr = str_replace('[!--username--]', $add[username], $newstempstr);
    //带链接的用户名
    if ($add[ismember] == 1 && $add[userid]) {
        $newstempstr = str_replace('[!--linkusername--]', "<a href='" . $public_r[newsurl] . "e/space/?userid=" . $add[userid] . "' target=_blank>" . $add[username] . "</a>", $newstempstr);
    } else {
        $newstempstr = str_replace('[!--linkusername--]', $add[username], $newstempstr);
    }
    $newstempstr = str_replace('[!--userid--]', $add[userid], $newstempstr);
    $newstempstr = str_replace('[!--other.link--]', $keyboardtext, $newstempstr);
    $newstempstr = str_replace('[!--news.url--]', $public_r[newsurl], $newstempstr);
    $newstempstr = str_replace('[!--plnum--]', $add[plnum], $newstempstr);
    $newstempstr = str_replace('[!--totaldown--]', $add[totaldown], $newstempstr);
    $newstempstr = str_replace('[!--keyboard--]', $add[keyboard], $newstempstr);
    //链接
    $titleurl = sys_ReturnBqTitleLink($add);
    $newstempstr = str_replace('[!--titleurl--]', $titleurl, $newstempstr);
    $newstempstr = str_replace('[!--page.stats--]', '', $newstempstr);
    $classurl = sys_ReturnBqClassname($add, 9);
    $newstempstr = str_replace('[!--class.url--]', $classurl, $newstempstr);
    //下一篇
    if (strstr($newstemptext, '[!--info.next--]')) {
        $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where id>{$add['id']} and classid='{$add['classid']}' order by id limit 1");
        if (empty($next_r[id])) {
            $infonext = "<a href='" . $classurl . "'>" . $fun_r['HaveNoNextLink'] . "</a>";
        } else {
            //链接
            $nexttitleurl = sys_ReturnBqTitleLink($next_r);
            $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[title] . "</a>";
        }
        $newstempstr = str_replace('[!--info.next--]', $infonext, $newstempstr);
    }
    //上一篇
    if (strstr($newstemptext, '[!--info.pre--]')) {
        $next_r = $empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where id<{$add['id']} and classid='{$add['classid']}' order by id desc limit 1");
        if (empty($next_r[id])) {
            $infonext = "<a href='" . $classurl . "'>" . $fun_r['HaveNoNextLink'] . "</a>";
        } else {
            //链接
            $nexttitleurl = sys_ReturnBqTitleLink($next_r);
            $infonext = "<a href='" . $nexttitleurl . "'>" . $next_r[title] . "</a>";
        }
        $newstempstr = str_replace('[!--info.pre--]', $infonext, $newstempstr);
    }
    //投票
    if (strstr($newstemptext, '[!--info.vote--]')) {
        $myvotetext = sys_GetInfoVote($add[classid], $add[id]);
        $newstempstr = str_replace('[!--info.vote--]', $myvotetext, $newstempstr);
    }
    //评分
    if (strstr($newstemptext, '[!--pinfopfen--]')) {
        $pinfopfen = $add[infopfennum] ? round($add[infopfen] / $add[infopfennum]) : 0;
        $newstempstr = str_replace('[!--pinfopfen--]', $pinfopfen, $newstempstr);
        $newstempstr = str_replace('[!--infopfennum--]', $add[infopfennum], $newstempstr);
    }
    $string = $newstempstr;
    //替换变量
    $string = str_replace('[!--p.title--]', strip_tags($ptitle), $string);
    $string = str_replace('[!--next.page--]', $thisnextlink, $string);
    $string = str_replace('[!--page.url--]', $truepage, $string);
    $string = str_replace('[!--title.select--]', $titleselect, $string);
    return $string;
}
Beispiel #6
0
$no = $offset;
$subnum = 120;
$formatdate = "Y-m-d H:i:s";
while ($r = $empire->fetch($sql)) {
    $tbname = $class_r[$r[classid]]['tbname'];
    if (empty($tbname)) {
        continue;
    }
    $titlefield = $schalltb_r[$tbname]['titlefield'];
    $smalltextfield = $schalltb_r[$tbname]['smalltextfield'];
    $infor = $empire->fetch1("select id,classid,titlepic,newstime,isurl,titleurl," . $titlefield . "," . $smalltextfield . " from {$dbtbpre}ecms_" . $tbname . " where id='{$r['id']}' limit 1");
    if (empty($infor['id'])) {
        continue;
    }
    $no++;
    $titleurl = sys_ReturnBqTitleLink($infor);
    $titlepic = $infor['titlepic'] ? $infor['titlepic'] : $public_r['newsurl'] . "e/data/images/notimg.gif";
    $smalltext = SubSchallSmalltext($infor[$smalltextfield], $subnum);
    $title = DoReplaceFontRed($infor[$titlefield], $keyboard);
    $smalltext = DoReplaceFontRed($smalltext, $keyboard);
    $newstime = date($formatdate, $infor['newstime']);
    ?>

						<h2 class="r"><span><?php 
    echo $no;
    ?>
.</span> <a class="l" href="<?php 
    echo $titleurl;
    ?>
" target="_blank"><?php 
    echo $title;
Beispiel #7
0
    $productr = $empire->fetch1("select title,tprice,price,isurl,titleurl,classid,id,titlepic,buyfen from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1");
    if (!$productr['id'] || $productr['classid'] != $classid) {
        continue;
    }
    //是否全部点数
    if (!$productr[buyfen]) {
        $buytype = 1;
    }
    $thistotalfen = $productr[buyfen] * $pnum;
    $totalfen += $thistotalfen;
    //产品图片
    if (empty($productr[titlepic])) {
        $productr[titlepic] = "../../data/images/notimg.gif";
    }
    //返回链接
    $titleurl = sys_ReturnBqTitleLink($productr);
    $thistotal = $productr[price] * $pnum;
    $totalmoney += $thistotal;
    //栏目集合
    $classids .= $cdh . $productr['classid'];
    $cdh = ',';
    ?>
<tr>
	<td align="center" height=23><a href="<?php 
    echo $titleurl;
    ?>
" target="_blank"><?php 
    echo $productr[title];
    ?>
</a><?php 
    echo $addatt ? ' - ' . $addatt : '';
function ReplaceShowPlVars($no, $listtemp, $r, $formatdate, $subnews = 0)
{
    global $public_r, $empire, $dbtbpre, $class_r;
    //标题
    $infor = $empire->fetch1("select titleurl,groupid,classid,newspath,filename,id,title from {$dbtbpre}ecms_" . $class_r[$r[classid]][tbname] . " where id='{$r['id']}' limit 1");
    $r['saytext'] = stripSlashes($r['saytext']);
    if ($subnews) {
        $r['saytext'] = sub($r['saytext'], 0, $subnews, false);
    }
    if ($r['userid']) {
        $r['username'] = "******" . $public_r[newsurl] . "e/space/?userid={$r['userid']}' target='_blank'>{$r['username']}</a>";
    }
    if (empty($r['username'])) {
        $r['username'] = '******';
    }
    $titleurl = sys_ReturnBqTitleLink($infor);
    $listtemp = str_replace("[!--titleurl--]", $titleurl, $listtemp);
    $listtemp = str_replace("[!--title--]", $infor['title'], $listtemp);
    $listtemp = str_replace("[!--plid--]", $r['plid'], $listtemp);
    $listtemp = str_replace("[!--pltext--]", RepPltextFace($r['saytext']), $listtemp);
    $listtemp = str_replace("[!--id--]", $r['id'], $listtemp);
    $listtemp = str_replace("[!--classid--]", $r['classid'], $listtemp);
    $listtemp = str_replace("[!--pltime--]", format_datetime($r['saytime'], $formatdate), $listtemp);
    $listtemp = str_replace("[!--username--]", $r['username'], $listtemp);
    $listtemp = str_replace("[!--zcnum--]", $r['zcnum'], $listtemp);
    $listtemp = str_replace("[!--fdnum--]", $r['fdnum'], $listtemp);
    //序号
    $listtemp = str_replace("[!--no--]", $no, $listtemp);
    return $listtemp;
}
Beispiel #9
0
    <td width="1%" valign="top">&nbsp;</td>
    <td width="84%" valign="top"> <div align="center">
        <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
          <tr class="header"> 
            <td width="55%" height="25"><div align="center">标题</div></td>
            <td width="16%" height="25"><div align="center">扣除点数</div></td>
            <td width="29%" height="25"><div align="center">时间</div></td>
          </tr>
	<?php 
while ($r = $empire->fetch($sql)) {
    if (empty($class_r[$r[classid]][tbname])) {
        continue;
    }
    $nr = $empire->fetch1("select title,titleurl,groupid,filename,newspath,classid from {$dbtbpre}ecms_" . $class_r[$r[classid]][tbname] . " where id='{$r['id']}'");
    //标题链接
    $titlelink = sys_ReturnBqTitleLink($nr);
    if ($r['online'] == 0) {
        $type = '下载';
    } elseif ($r['online'] == 1) {
        $type = '观看';
    } elseif ($r['online'] == 2) {
        $type = '查看';
    } elseif ($r['online'] == 3) {
        $type = '发布';
    }
    ?>
          <tr bgcolor="#FFFFFF"> 
            <td height="25">[
              <?php 
    echo $type;
    ?>
Beispiel #10
0
function espace_eloop_sp($r)
{
    global $class_r;
    $sr['titleurl'] = sys_ReturnBqTitleLink($r);
    $sr['classname'] = $class_r[$r[classid]][bname] ? $class_r[$r[classid]][bname] : $class_r[$r[classid]][classname];
    $sr['classurl'] = sys_ReturnBqClassname($r, 9);
    return $sr;
}
function RepOtherTemp($temptext, $r, $tr)
{
    global $public_r, $class_r;
    $title = sub($r[title], 0, $tr['otherlinktempsub'], false);
    $r['newstime'] = date($tr['otherlinktempdate'], $r['newstime']);
    $titlelink = sys_ReturnBqTitleLink($r);
    //标题链接
    $temptext = str_replace("[!--title--]", $title, $temptext);
    $temptext = str_replace("[!--oldtitle--]", $r[title], $temptext);
    $temptext = str_replace("[!--titleurl--]", $titlelink, $temptext);
    $temptext = str_replace("[!--newstime--]", $r[newstime], $temptext);
    if (empty($r[titlepic])) {
        $titlepic = $public_r[newsurl] . "e/data/images/notimg.gif";
    } else {
        $titlepic = $r[titlepic];
    }
    $temptext = str_replace("[!--titlepic--]", $titlepic, $temptext);
    return $temptext;
}
Beispiel #12
0
function ReplaceShowPlVars($no,$listtemp,$r,$formatdate,$subnews=0){
	global $public_r,$empire,$dbtbpre,$class_r;
	//标题
	$infor=$empire->fetch1("select isurl,titleurl,classid,id,title,titlepic from {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]." where id='$r[id]' limit 1");
	$r['saytext']=stripSlashes($r['saytext']);
	if($subnews)
	{
		$r['saytext']=sub($r['saytext'],0,$subnews,false);
	}
	if($r['userid'])
	{
		$r['username']="******".$public_r[newsurl]."e/space/?userid=$r[userid]' target='_blank'>$r[username]</a>";
	}
	if(empty($r['username']))
	{
		$r['username']='******';
	}
	$titleurl=sys_ReturnBqTitleLink($infor);
	$titlepic=$infor['titlepic']?$infor['titlepic']:$public_r['newsurl'].'e/data/images/notimg.gif';
	$listtemp=str_replace("[!--titleurl--]",$titleurl,$listtemp);
	$listtemp=str_replace("[!--title--]",$infor['title'],$listtemp);
	$listtemp=str_replace("[!--titlepic--]",$titlepic,$listtemp);
	$listtemp=str_replace("[!--plid--]",$r['plid'],$listtemp);
	$listtemp=str_replace("[!--pltext--]",RepPltextFace($r['saytext']),$listtemp);
	$listtemp=str_replace("[!--id--]",$r['id'],$listtemp);
	$listtemp=str_replace("[!--classid--]",$r['classid'],$listtemp);
	$listtemp=str_replace("[!--pltime--]",date($formatdate,$r['saytime']),$listtemp);
	$listtemp=str_replace("[!--username--]",$r['username'],$listtemp);
	$listtemp=str_replace("[!--zcnum--]",$r['zcnum'],$listtemp);
	$listtemp=str_replace("[!--fdnum--]",$r['fdnum'],$listtemp);
	//序号
	$listtemp=str_replace("[!--no--]",$no,$listtemp);
	return $listtemp;
}
Beispiel #13
0
function DoInfoSendNotice($userid, $username, $to_userid, $to_username, $causetext, $infor, $ecms = 0)
{
    global $empire, $dbtbpre, $class_r;
    if (!$infor['ismember']) {
        return '';
    }
    //操作者
    $user_r = $empire->fetch1("select truename from {$dbtbpre}enewsuser where userid='{$userid}'");
    $dousername = $user_r['truename'] ? $user_r['truename'] : $username;
    //操作类型
    if ($ecms == 1) {
        $doing = '删除';
        $title = '您的信息被删除';
    } elseif ($ecms == 2) {
        $doing = '审核通过';
        $title = '您的信息已审核通过';
    } elseif ($ecms == 3) {
        $doing = '取消审核';
        $title = '您的信息被取消审核';
    } elseif ($ecms == 4) {
        $doing = '转移';
        $title = '您的信息被转移';
    }
    //操作信息
    $title = RepPostStr($title);
    $causetext = RepPostStr($causetext);
    $dotime = date("Y-m-d H:i:s");
    //信息内容
    $titleurl = sys_ReturnBqTitleLink($infor);
    $infotitle = $infor['title'];
    $infotime = date("Y-m-d H:i:s", $infor[truetime]);
    $classname = $class_r[$infor[classid]]['classname'];
    $classurl = sys_ReturnBqClassname($infor, 9);
    $isadmin = $infor['ismember'] == 1 ? 0 : 1;
    $msgtext = "您发布的信息被 <strong>{$dousername}</strong> 执行 <strong>{$doing}</strong> 操作<br>\n<br>\n<strong>信息标题:</strong><a href='" . $titleurl . "'>" . $infotitle . "</a><br>\n<strong>发布时间:</strong>" . $infotime . "<br>\n<strong>所在栏目:</strong><a href='" . $classurl . "'>" . $classname . "</a><br>\n<strong>操作时间:</strong>{$dotime}<br>\n<strong>操作理由:</strong>" . $causetext . "<br>";
    eSendMsg(addslashes($title), addslashes($msgtext), $to_username, 0, '', 1, 1, $isadmin);
}
Beispiel #14
0
			$st.="<font color=red>[".$ftnamer[$r[firsttitle]-1]."]</font>";
		}
		//时间
		$newstime=date("Y-m-d",$r[newstime]);
		$oldtitle=$r[title];
		$r[title]=stripSlashes(sub($r[title],0,50,false));
		$r[title]=DoTitleFont($r[titlefont],$r[title]);
		if($indexchecked==0)
		{
			$checked='<font color=red>×</font>';
			$titleurl='AddInfo.php?enews=MEditInfo&classid='.$r[classid].'&id='.$r[id].'&mid='.$mid.$addecmscheck;//链接
		}
		else
		{
			$checked='√';
			$titleurl=sys_ReturnBqTitleLink($r);//链接
		}
		$plnum=$r[plnum];//评论个数
		//标题图片
		$showtitlepic="";
		if($r[titlepic])
		{$showtitlepic="<a href='".$r[titlepic]."' title='预览标题图片' target=_blank><img src='../data/images/showimg.gif' border=0></a>";}
		//栏目
		$classname=$class_r[$r[classid]][classname];
		$classurl=sys_ReturnBqClassname($r,9);
		$bclassid=$class_r[$r[classid]][bclassid];
		$br['classid']=$bclassid;
		$bclassurl=sys_ReturnBqClassname($br,9);
		$bclassname=$class_r[$bclassid][classname];
		//评论地址
		$pagefunr=eReturnRewritePlUrl($r['classid'],$r['id'],'doinfo',0,0,1);
Beispiel #15
0
function AddError($add)
{
    global $empire, $class_r, $dbtbpre;
    CheckCanPostUrl();
    //验证来源
    $id = (int) $add['id'];
    $classid = (int) $add['classid'];
    if (!$classid || !$id || !trim($add[errortext])) {
        printerror("EmptyErrortext", "history.go(-1)", 1);
    }
    //返回标题链接
    if (empty($class_r[$classid][tbname])) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    $r = $empire->fetch1("select isurl,titleurl,classid,id from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1");
    if (empty($r[id]) || $r['classid'] != $classid) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    $cid = (int) $add[cid];
    $titleurl = sys_ReturnBqTitleLink($r);
    $email = RepPostStr($add[email]);
    $ip = egetip();
    $errortext = RepPostStr($add[errortext]);
    $errortime = date("Y-m-d H:i:s");
    $sql = $empire->query("insert into {$dbtbpre}enewsdownerror(id,errortext,errorip,errortime,email,classid,cid) values({$id},'" . addslashes($errortext) . "','{$ip}','{$errortime}','" . addslashes($email) . "',{$classid},'{$cid}');");
    if ($sql) {
        printerror("AddErrorSuccess", $titleurl, 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
Beispiel #16
0
	<url><?php 
echo $pageurl;
?>
</url>

<?php 
$field = "";
while ($r = $empire->fetch($sql)) {
    if (empty($field)) {
        $field = ReturnTheIntroField($r);
    }
    //¼ò½é
    $smalltext = RepSpeRssStr(sub(strip_tags($r[$field]), 0, $sublen, false));
    //±êÌâÁ´½Ó
    $titleurl = RepSpeRssStr(sys_ReturnBqTitleLink($r));
    $cname = RepSpeRssStr($class_r[$r[classid]]['classname']);
    $thetime = $r['newstime'];
    $mydate = gmdate('Y-m-d', $thetime);
    $mytime = gmdate('H:i', $thetime);
    ?>
	<info id="<?php 
    echo $r['id'];
    ?>
">
		<title><![CDATA[<?php 
    echo RepSpeRssStr($r['title']);
    ?>
]]></title>
	    <url><?php 
    echo $titleurl;
Beispiel #17
0
    $url = ReturnZtLink($n_r['ztid']) . "&nbsp;>&nbsp;" . $fun_r[pl];
} else {
    if (empty($id) || empty($classid)) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    if (empty($class_r[$classid][tbname]) || InfoIsInTable($class_r[$classid][tbname])) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    $n_r = $empire->fetch1("select * from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1");
    if (!$n_r['id'] || $n_r['classid'] != $classid) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    $pubid = ReturnInfoPubid($classid, $id);
    $search = "&classid={$classid}&id=" . $id;
    //标题链接
    $titleurl = sys_ReturnBqTitleLink($n_r);
    $title = stripSlashes($n_r[title]);
    $pagetitle = ehtmlspecialchars($title);
    //评分
    $infopfennum = $n_r['infopfennum'];
    $pinfopfen = $infopfennum ? round($n_r['infopfen'] / $infopfennum) : 0;
    $url = ReturnClassLink($n_r[classid]) . "&nbsp;>&nbsp;<a href=" . $titleurl . ">" . $title . "</a>&nbsp;>&nbsp;" . $fun_r[pl];
}
//使用模板
$rewritetempid = 0;
if ($_GET['tempid']) {
    $tempid = (int) $_GET['tempid'];
    $tempnum = $empire->gettotal("select count(*) as total from " . GetTemptb("enewspltemp") . " where tempid='{$tempid}'");
    $tempid = $tempnum ? $tempid : $public_r['defpltempid'];
    $search .= '&tempid=' . $tempid;
    $rewritetempid = $tempid;
Beispiel #18
0
function ReplaceListVars($no, $listtemp, $subnews, $subtitle, $formatdate, $url, $haveclass = 0, $r, $field, $docode = 0)
{
    global $empire, $public_r, $class_r, $class_zr, $fun_r, $dbtbpre, $emod_r, $class_tr, $level_r, $navclassid, $etable_r;
    if ($haveclass) {
        $add = sys_ReturnBqClassname($r, $haveclass);
    }
    if (empty($r[oldtitle])) {
        $r[oldtitle] = $r[title];
    }
    if ($docode == 1) {
        $listtemp = stripSlashes($listtemp);
        eval($listtemp);
    }
    $ylisttemp = $listtemp;
    $mid = $field['mid'];
    $fr = $field['fr'];
    $fcount = $field['fcount'];
    for ($i = 1; $i < $fcount; $i++) {
        $f = $fr[$i];
        $value = $r[$f];
        $spf = 0;
        if ($f == 'title') {
            if (!empty($subtitle)) {
                $value = sub($value, 0, $subtitle, false);
            }
            $value = DoTitleFont($r[titlefont], $value);
            $spf = 1;
        } elseif ($f == 'newstime') {
            //$value=date($formatdate,$value);
            $value = format_datetime($value, $formatdate);
            $spf = 1;
        } elseif ($f == 'titlepic') {
            if (empty($value)) {
                $value = $public_r[newsurl] . 'e/data/images/notimg.gif';
            }
            $spf = 1;
        } elseif (strstr($emod_r[$mid]['smalltextf'], ',' . $f . ',')) {
            if (!empty($subnews)) {
                $value = sub($value, 0, $subnews, false);
            }
        } elseif ($f == 'befrom') {
            $spf = 1;
        } elseif ($f == 'writer') {
            $spf = 1;
        }
        if ($spf == 0 && !strstr($emod_r[$mid]['editorf'], ',' . $f . ',')) {
            if (strstr($emod_r[$mid]['tobrf'], ',' . $f . ',')) {
                $value = nl2br($value);
            }
            if (!strstr($emod_r[$mid]['dohtmlf'], ',' . $f . ',')) {
                $value = RepFieldtextNbsp(ehtmlspecialchars($value));
            }
        }
        $listtemp = str_replace('[!--' . $f . '--]', $value, $listtemp);
    }
    $titleurl = sys_ReturnBqTitleLink($r);
    //链接
    $listtemp = str_replace('[!--id--]', $r[id], $listtemp);
    $listtemp = str_replace('[!--classid--]', $r[classid], $listtemp);
    $listtemp = str_replace('[!--class.name--]', $add, $listtemp);
    $listtemp = str_replace('[!--ttid--]', $r[ttid], $listtemp);
    $listtemp = str_replace('[!--tt.name--]', $class_tr[$r[ttid]][tname], $listtemp);
    $listtemp = str_replace('[!--tt.url--]', sys_ReturnBqInfoTypeUrl($r['ttid']), $listtemp);
    $listtemp = str_replace('[!--userfen--]', $r[userfen], $listtemp);
    $listtemp = str_replace('[!--titleurl--]', $titleurl, $listtemp);
    $listtemp = str_replace('[!--no.num--]', $no, $listtemp);
    $listtemp = str_replace('[!--plnum--]', $r[plnum], $listtemp);
    $listtemp = str_replace('[!--userid--]', $r[userid], $listtemp);
    $listtemp = str_replace('[!--username--]', $r[username], $listtemp);
    $listtemp = str_replace('[!--onclick--]', $r[onclick], $listtemp);
    $listtemp = str_replace('[!--oldtitle--]', $r[oldtitle], $listtemp);
    $listtemp = str_replace('[!--totaldown--]', $r[totaldown], $listtemp);
    //栏目链接
    if (strstr($ylisttemp, '[!--this.classlink--]')) {
        $thisclasslink = sys_ReturnBqClassname($r, 9);
        $listtemp = str_replace('[!--this.classlink--]', $thisclasslink, $listtemp);
    }
    $thisclassname = $class_r[$r[classid]][bname] ? $class_r[$r[classid]][bname] : $class_r[$r[classid]][classname];
    $listtemp = str_replace('[!--this.classname--]', $thisclassname, $listtemp);
    return $listtemp;
}