Example #1
0
            break;
        default:
            $checkinfo = '没有获取到参数';
    }
    ?>
		<tr align="left" class="dataTr">
			<td height="36" class="firstCol"><input type="checkbox" name="checkid[]" id="checkid[]" value="<?php 
    echo $row['id'];
    ?>
" /></td>
			<td><?php 
    echo $row['id'];
    ?>
</td>
			<td><?php 
    echo ClearHtml($row['content']) . $content;
    ?>
</td>
			<td><?php 
    echo $row['nickname'];
    ?>
</td>
			<td class="number"><?php 
    echo GetDateTime($row['posttime']);
    ?>
</td>
			<td><?php 
    echo $row['ip'];
    ?>
</td>
			<td class="action endCol"><span><a href="message_save.php?id=<?php 
	function MakeField($fname,$fvalue,$addvalue="")
	{

		if($fvalue==""){ $fvalue = $this->ChannelFields[$fname]["default"]; }
		$ftype = $this->ChannelFields[$fname]["type"];

		//执行函数
		if($this->ChannelFields[$fname]["function"]!=""){
			$fvalue = $this->EvalFunc($fvalue,$this->ChannelFields[$fname]["function"]);
		}
		//处理各种数据类型
		
		if($ftype=="text"||$ftype=="textchar"){
			$fvalue = ClearHtml($fvalue);
		}
		else if($ftype=="multitext"){
			$fvalue = ClearHtml($fvalue);
			$fvalue = Text2Html($fvalue);
		}
		else if($ftype=="img"){
			$fvalue = $this->GetImgLinks($fvalue);
		}
		else if($ftype=="textdata"){
			if(!is_file($GLOBALS['cfg_basedir'].$fvalue)) return "";
			$fp = fopen($GLOBALS['cfg_basedir'].$fvalue,'r');
			$fvalue = "";
			while(!feof($fp)){ $fvalue .= fgets($fp,1024); }
			fclose($fp);
		}
		else if($ftype=="addon"){
			$foldvalue = $fvalue;
			$tempStr = GetSysTemplets("channel/channel_addon.htm");
			$tempStr = str_replace('~phppath~',$GLOBALS['cfg_plus_dir'],$tempStr);
			$tempStr = str_replace('~link~',$foldvalue,$tempStr);
			$fvalue = $tempStr;
		}
		else if($ftype=="softlinks"){
			$fvalue = $this->GetAddLinkPage($fvalue);
		}
		else if($ftype=="specialtopic"){
			
			$fvalue = $this->GetSpecList($fname,$fvalue,$addvalue);
			
		}
		return $fvalue;
	}
Example #3
0
 //第一个图片作为缩略图
 if ($autothumb == 'true') {
     $cont_str = stripslashes($content);
     preg_match_all('/<[img|IMG].*?src=[\'|\\"](.*?(?:[\\.gif|\\.jpg|\\.png]))[\'|\\"].*?[\\/]?>/', $cont_str, $imgurl);
     //如果存在图片
     if (isset($imgurl[1][0])) {
         $picurl = $imgurl[1][0];
         $picurl = substr($picurl, strpos($picurl, 'uploads/'));
     }
 }
 //自动提取内容到摘要
 if ($autodesc == 'true') {
     if (empty($autodescsize) or !intval($autodescsize)) {
         $autodescsize = 200;
     }
     $descstr = ClearHtml($content);
     $description = ReStrLen($descstr, $autodescsize);
 }
 //自动分页
 if ($autopage == 'true') {
     $content = ContAutoPage($content, $autopagesize * 1024);
 }
 $posttime = GetMkTime($posttime);
 //自定义字段处理
 $fieldname = '';
 $fieldvalue = '';
 $fieldstr = '';
 $ids = GetDiyFieldCatePriv('1', $classid);
 if (!empty($ids)) {
     $dosql->Execute("SELECT * FROM `#@__diyfield` WHERE infotype=1 AND `id` IN ({$ids}) AND checkinfo=true ORDER BY orderid ASC");
     while ($row = $dosql->GetArray()) {
Example #4
0
    // format de la date (voir fonction date() pour syntaxe)
    $rss->CDATA = 'content';
    // on retire les tags CDATA en conservant leur contenu
    //data
    $data = '';
    if ($rs = $rss->get($xml)) {
        for ($i = 0; $i < count($rs['items']); $i++) {
            //转编码
            if ($_G['product']['charset'] == "utf-8") {
                $rs['items'][$i]['title'] = iconv("gbk", $_G['product']['charset'], $rs['items'][$i]['title']);
                $rs['items'][$i]['category'] = iconv("gbk", $_G['product']['charset'], $rs['items'][$i]['category']);
                $rs['items'][$i]['description'] = iconv("gbk", $_G['product']['charset'], $rs['items'][$i]['description']);
                $rs['items'][$i]['author'] = iconv("gbk", $_G['product']['charset'], $rs['items'][$i]['author']);
            }
            $data .= '<div class="feed">
							<h2 class="title"><a href="' . $rs['items'][$i]['link'] . '">' . ClearHtml($rs['items'][$i]['title']) . '</a></h2>
							<p class="meta">
								<em>
								发布于:' . $rs['items'][$i]['pubDate'] . ' 作者:<a href="search.php?q=uid:' . $rs['items'][$i]['author'] . '" target="_blank">' . $rs['items'][$i]['author'] . '</a>
								分类:<a href="search.php?cat=' . $rs['items'][$i]['category'] . '" target="_blank">' . $rs['items'][$i]['category'] . '</a>
								</em>
							</p>
							<div class="entry">
								' . $rs['items'][$i]['description'] . '
								<div><a href="' . $rs['items'][$i]['link'] . '" class="links" target="_blank">阅读全文</a></div>
							</div>
						</div>';
        }
    } else {
        $data = "<p>无法连接网络</p>";
    }
Example #5
0
			<?php 
    while ($row = $dosql->GetArray()) {
        ?>
			<li><p><input type="checkbox" name="checkid[]" id="checkid[]" value="<?php 
        echo $row['id'];
        ?>
" />&nbsp;&nbsp;<?php 
        echo ClearHtml($row['content']);
        ?>
</p><span class="from">来自网站留言</span><span class="time"><?php 
        echo GetDateTime($row['posttime']);
        ?>
</span><div class="cl"></div>
			<?php 
        if ($row['recont'] != '') {
            echo '【回复】' . ClearHtml($row['recont']);
        }
        ?>
			</li>
			<?php 
    }
    ?>
		</ul>
		</form>
		<div class="options_b">选择: <a href="javascript:CheckAll(true);">全部</a> - <a href="javascript:CheckAll(false);">无</a> - <a href="javascript:DelAllNone('?a=delmsg');" onclick="return ConfDelAll(0);">删除</a></div>
		<?php 
    echo $dopage->GetList();
    ?>
		<?php 
} else {
    ?>
Example #6
0
            default:
                echo 'No number between 1 and 3';
        }
        ?>
		<div class="pubBox">
			<div class="hd">
				<h2><?php 
        echo $row['classname'];
        ?>
</h2>
			</div>
			<div class="ft">
				<?php 
        //单页模型
        if ($row['infotype'] == '0') {
            echo '<ul class="info">' . ClearHtml(Info($row['id'], 200)) . '</ul>';
        } else {
            if ($row['infotype'] == '1') {
                echo '<ul class="list">';
                $dosql->Execute("SELECT * FROM `#@__infolist` WHERE (classid=" . $row['id'] . " or parentid=" . $row['id'] . " or parentstr like '%" . $row['id'] . "%') AND delstate='' AND checkinfo=true ORDER BY orderid DESC LIMIT 0,10", $row['id']);
                while ($row1 = $dosql->GetArray($row['id'])) {
                    ?>
					<li><a href="?m=show&cid=<?php 
                    echo $row['id'];
                    ?>
&id=<?php 
                    echo $row1['id'];
                    ?>
" style="color:<?php 
                    echo $row1['colorval'];
                    ?>
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('member_Pm');
if(!isset($action)) $action = '';
if($action=="post"){	
	$msgfrom = '管理员';
	$msgfromid = 0;
	$msgtoid = 0;
	$dateline = time();
	$subject = cn_substr(trim(ClearHtml($subject)),70);
	$message = cn_substr(trim(ClearHtml($message)),1000);
	if(!isset($subject)||empty($subject)){
		ShowMsg("短信标题不能为空!","-1");
		exit();
	}else if(!isset($message)||empty($message)){
		ShowMsg("请填写短信内容!","-1");
		exit();
	}
	$db = new DedeSql(false);
	$rs = $db->ExecuteNoneQuery("INSERT INTO #@__pms(msgfrom,msgfromid,msgtoid,folder,new,subject,dateline,message,isadmin) VALUES('$msgfrom','$msgfromid','$msgtoid','inbox',1,'{$subject}','$dateline','{$message}',1);");
	if($rs)
	{
		$db->ExecuteNoneQuery("UPDATE	#@__member SET newpm=newpm+1");		
	}
	ShowMsg("短信已成功发送","-1");
	$db->Close();
	exit();
}
require_once(dirname(__FILE__)."/templets/member_pmall.htm");
?>
Example #8
0
                    if (isset($r) && is_array($r)) {
                        $tbname = $r['modeltbname'];
                    } else {
                        $tbname = '';
                    }
                }
            }
        }
    }
    $r = $dosql->GetOne("SELECT * FROM `{$tbname}` WHERE id=" . $row['aid'] . "");
    ?>
				<a href="<?php 
    echo $row['link'];
    ?>
" target="_blank" title="点击访问"><?php 
    echo ClearHtml($row['body']);
    ?>
</a></td>
			<td><?php 
    echo $row['molds'];
    ?>
</td>
			<td><?php 
    echo $row['aid'];
    ?>
</td>
			<td class="number"><?php 
    echo GetDateTime($row['time']);
    ?>
</td>
			<td><?php