function ReplaceShowSponeVars($no, $listtemp, $subnews, $subtitle, $formatdate, $r)
{
    global $public_r;
    //标题
    if (!empty($subtitle)) {
        $r[title] = sub($r[title], 0, $subtitle, false);
    }
    $r[title] = DoTitleFont($r[titlefont], $r[title]);
    $listtemp = str_replace('[!--title--]', $r['title'], $listtemp);
    $listtemp = str_replace('[!--oldtitle--]', $r['oldtitle'], $listtemp);
    //时间
    $listtemp = str_replace('[!--newstime--]', date($formatdate, $r['newstime']), $listtemp);
    //其它变量
    $listtemp = str_replace('[!--id--]', $r['sid'], $listtemp);
    $listtemp = str_replace('[!--titleurl--]', $r['titleurl'], $listtemp);
    $listtemp = str_replace('[!--titlepic--]', $r['titlepic'], $listtemp);
    $listtemp = str_replace('[!--bigpic--]', $r['bigpic'], $listtemp);
    $listtemp = str_replace('[!--titlepre--]', $r['titlepre'], $listtemp);
    $listtemp = str_replace('[!--titlenext--]', $r['titlenext'], $listtemp);
    //简介
    if (!empty($subnews)) {
        $r[smalltext] = sub($r[smalltext], 0, $subnews, false);
    }
    $listtemp = str_replace('[!--smalltext--]', nl2br($r['smalltext']), $listtemp);
    //序号
    $listtemp = str_replace('[!--no.num--]', $no, $listtemp);
    return $listtemp;
}
Exemple #2
0
    $st .= "[已审核]  ";
} else {
    $st .= "[未审核]  ";
}
if ($r[istop]) {
    $st .= "[顶" . $r[istop] . "]  ";
}
if ($r[isgood]) {
    $st .= "[推" . $r[isgood] . "]  ";
}
if ($r[firsttitle]) {
    $st .= "[头" . $r[firsttitle] . "]";
}
//标题
$titleurl = sys_ReturnBqTitleLink($r);
$r[title] = "<a href='{$titleurl}' target='_blank'>" . DoTitleFont($r[titlefont], $r[title]) . "</a>";
//权限
$group = '';
if ($r[groupid]) {
    $group = $level_r[$r[groupid]][groupname];
    if ($r[userfen]) {
        $group .= " ,扣除点数:" . $r[userfen];
    }
}
//栏目链接
$classurl = sys_ReturnBqClassname($r, 9);
$getclassurlr['classid'] = $bclassid;
$bclassurl = sys_ReturnBqClassname($getclassurlr, 9);
$classes = "<a href='{$bclassurl}' target='_blank'>" . $class_r[$bclassid][classname] . "</a>&nbsp;>&nbsp;<a href='{$classurl}' target='_blank'>" . $class_r[$classid][classname] . "</a>";
//标题分类
$titletype = $class_tr[$r[ttid]]['tname'];
    <td width="17%"><div align="center">所属栏目</div></td>
    <td width="14%" height="25"><div align="center">操作</div></td>
  </tr>
  <?php 
    while ($r = $empire->fetch($sql)) {
        if (empty($class_r[$r[classid]][tbname])) {
            continue;
        }
        $infor = $empire->fetch1("select id,classid,titleurl,groupid,newspath,filename,checked,isgood,firsttitle,plnum,totaldown,onclick,newstime,titlepic,title from {$dbtbpre}ecms_" . $class_r[$r[classid]][tbname] . " where id='{$r['id']}'");
        //标题图片
        $showtitlepic = "";
        if ($infor[titlepic]) {
            $showtitlepic = "<a href='" . $infor[titlepic] . "' title='预览标题图片' target=_blank><img src='../../data/images/showimg.gif' border=0></a>";
        }
        //标题
        $infor[title] = DoTitleFont($infor[titlefont], stripSlashes($infor[title]));
        //标题链接
        $titleurl = sys_ReturnBqTitleLink($infor);
        //栏目链接
        $classurl = sys_ReturnBqClassname($r, 9);
        ?>
  <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'"> 
    <td height="32"> 
      <?php 
        echo $showtitlepic;
        ?>
      <a href='<?php 
        echo $titleurl;
        ?>
' target=_blank><?php 
        echo stripSlashes($infor[title]);
Exemple #4
0
function GetAdJs($adid)
{
    global $empire, $public_r, $dbtbpre;
    $r = $empire->fetch1("select * from {$dbtbpre}enewsad where adid='{$adid}'");
    $file = "../../../d/js/acmsd/" . $public_r[adfile] . $adid . ".js";
    //到期
    if ($r['endtime'] != '0000-00-00' && time() > to_time($r['endtime'])) {
        $r[reptext] = ClearHtmlZs($r[reptext]);
        $h = addslashes(str_replace("\r\n", "", $r[reptext]));
        $html = "document.write(\"" . $h . "\")";
        WriteFiletext_n($file, $html);
        return '';
    }
    if ($r['ylink']) {
        $ad_url = $r['url'];
    } else {
        $ad_url = $public_r[newsurl] . "e/public/ClickAd?adid=" . $adid;
        //广告链接
    }
    //----------------------文字广告
    if ($r[t] == 1) {
        $r[titlefont] = $r[titlecolor] . ',' . $r[titlefont];
        $picurl = DoTitleFont($r[titlefont], $r[picurl]);
        //文字属性
        $h = "<a href='" . $ad_url . "' target=" . $r[target] . " title='" . $r[alt] . "'>" . addslashes($picurl) . "</a>";
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\")";
        } else {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        }
    } elseif ($r[t] == 2) {
        $r[htmlcode] = ClearHtmlZs($r[htmlcode]);
        $h = addslashes(str_replace("\r\n", "", $r[htmlcode]));
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\")";
        } else {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        }
    } elseif ($r[t] == 3) {
        //打开新窗口
        if ($r[adtype] == 8) {
            $html = "window.open('" . $r[url] . "');";
        } elseif ($r[adtype] == 9) {
            $html = "window.open('" . $r[url] . "','','width=" . $r[pic_width] . ",height=" . $r[pic_height] . ",scrollbars=yes');";
        } else {
            $html = "window.showModalDialog('" . $r[url] . "','','dialogWidth:" . $r[pic_width] . "px;dialogHeight:" . $r[pic_height] . "px;scroll:no;status:no;help:no');";
        }
    } else {
        $filetype = GetFiletype($r[picurl]);
        //flash
        if ($filetype == ".swf") {
            $h = "<object classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\" codebase=\\\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\\\" name=\\\"movie\\\" width=\\\"" . $r[pic_width] . "\\\" height=\\\"" . $r[pic_height] . "\\\" id=\\\"movie\\\"><param name=\\\"movie\\\" value=\\\"" . $r[picurl] . "\\\"><param name=\\\"quality\\\" value=\\\"high\\\"><param name=\\\"menu\\\" value=\\\"false\\\"><embed src=\\\"" . $r[picurl] . "\\\" width=\\\"" . $r[pic_width] . "\\\" height=\\\"" . $r[pic_height] . "\\\" quality=\\\"high\\\" pluginspage=\\\"http://www.macromedia.com/go/getflashplayer\\\" type=\\\"application/x-shockwave-flash\\\" id=\\\"movie\\\" name=\\\"movie\\\" menu=\\\"false\\\"></embed><PARAM NAME='wmode' VALUE='Opaque'></object>";
        } else {
            $h = "<a href='" . $ad_url . "' target=" . $r[target] . "><img src='" . $r[picurl] . "' border=0 width='" . $r[pic_width] . "' height='" . $r[pic_height] . "' alt='" . $r[alt] . "'></a>";
        }
        //普通显示
        if ($r[adtype] == 1) {
            $html = "document.write(\"" . $h . "\");";
        } elseif ($r[adtype] == 4) {
            $html = "ns4=(document.layers)?true:false;\nie4=(document.all)?true:false;\nif(ns4){document.write(\"<layer id=DGbanner2 width=" . $r[pic_width] . " height=" . $r[pic_height] . " onmouseover=stopme('DGbanner2') onmouseout=movechip('DGbanner2')>" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner2 style='position:absolute; width:" . $r[pic_width] . "px; height:" . $r[pic_height] . "px; z-index:9; filter: Alpha(Opacity=90)' onmouseover=stopme('DGbanner2') onmouseout=movechip('DGbanner2')>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_fullscreen.js></script>\");";
        } elseif ($r[adtype] == 5) {
            $html = "if (navigator.appName == 'Netscape')\n{document.write(\"<layer id=DGbanner3 top=150 width=" . $r[pic_width] . " height=" . $r[pic_height] . ">" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner3 style='position: absolute;width:" . $r[pic_height] . ";top:150;visibility: visible;z-index: 1'>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_upanddown.js></script>\");";
        } elseif ($r[adtype] == 6) {
            $html = "if(navigator.appName == 'Netscape')\n{document.write(\"<layer id=DGbanner10 top=150 width=" . $r[pic_width] . " height=" . $r[pic_height] . ">" . $h . "</layer>\");}\nelse{document.write(\"<div id=DGbanner10 style='position: absolute;width:" . $r[pic_width] . ";top:150;visibility: visible;z-index: 1'>" . $h . "</div>\");}\ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_float_upanddown_L.js></script>\");";
        } elseif ($r[adtype] == 7) {
            $html = "ns4=(document.layers)?true:false;\nif(ns4){document.write(\"<layer id=DGbanner4Cont onLoad='moveToAbsolute(layer1.pageX-160,layer1.pageY);clip.height=" . $r[pic_height] . ";clip.width=" . $r[pic_width] . "; visibility=show;'><layer id=DGbanner4News position:absolute; top:0; left:0>" . $h . "</layer></layer>\");}\nelse{document.write(\"<div id=DGbanner4 style='position:absolute;top:0; left:0;'><div id=DGbanner4Cont style='position:absolute;width:" . $r[pic_width] . ";height:" . $r[pic_height] . ";clip:rect(0," . $r[pic_width] . "," . $r[pic_height] . ",0)'><div id=DGbanner4News style='position:absolute;top:0;left:0;right:820'>" . $h . "</div></div></div>\");} \ndocument.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_fullscreen.js></script>\");";
        } elseif ($r[adtype] == 3) {
            $html = "document.write(\"<script language=javascript src=" . $public_r[newsurl] . "d/js/acmsd/ecms_dialog.js></script>\"); \ndocument.write(\"<div style='position:absolute;left:300px;top:150px;width:" . $r[pic_width] . "; height:" . $r[pic_height] . ";z-index:1;solid;filter:alpha(opacity=90)' id=DGbanner5 onmousedown='down1(this)' onmousemove='move()' onmouseup='down=false'><table cellpadding=0 border=0 cellspacing=1 width=" . $r[pic_width] . " height=" . $r[pic_height] . " bgcolor=#000000><tr><td height=18 bgcolor=#5A8ACE align=right style='cursor:move;'><a href=# style='font-size: 9pt; color: #eeeeee; text-decoration: none' onClick=clase('DGbanner5') >关闭>>><img border='0' src='" . $public_r[newsurl] . "d/js/acmsd/close_o.gif'></a>&nbsp;</td></tr><tr><td bgcolor=f4f4f4 >&nbsp;" . $h . "</td></tr></table></div>\");";
        } else {
            $html = "function closeAd(){huashuolayer2.style.visibility='hidden';huashuolayer3.style.visibility='hidden';}function winload(){huashuolayer2.style.top=109;huashuolayer2.style.left=5;huashuolayer3.style.top=109;huashuolayer3.style.right=5;}//if(document.body.offsetWidth>800){\n\t\t\t\t{document.write(\"<div id=huashuolayer2 style='position: absolute;visibility:visible;z-index:1'><table width=0  border=0 cellspacing=0 cellpadding=0><tr><td height=10 align=right bgcolor=666666><a href=javascript:closeAd()><img src=" . $public_r[newsurl] . "d/js/acmsd/close.gif width=12 height=10 border=0></a></td></tr><tr><td>" . $h . "</td></tr></table></div>\"+\"<div id=huashuolayer3 style='position: absolute;visibility:visible;z-index:1'><table width=0  border=0 cellspacing=0 cellpadding=0><tr><td height=10 align=right bgcolor=666666><a href=javascript:closeAd()><img src=" . $public_r[newsurl] . "d/js/acmsd/close.gif width=12 height=10 border=0></a></td></tr><tr><td>" . $h . "</td></tr></table></div>\");}winload()//}";
        }
    }
    WriteFiletext_n($file, $html);
}
Exemple #5
0
		{
			$st.="<font color=red>[顶".$r[istop]."]</font>";
		}
		if($r[isgood])//推荐
		{
			$st.="<font color=red>[".$ignamer[$r[isgood]-1]."]</font>";
		}
		if($r[firsttitle])//头条
		{
			$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>";}
Exemple #6
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;
}