Ejemplo n.º 1
0
function get__news_fck_content($str, $symbol = 'fck_pageindex')
{
    $start = strpos($str, '<div style="page-break-after');
    if ($start === false) {
        return $str;
    }
    $end = strpos($str, "</div>", $start);
    $length = $end - $start + 6;
    $page_flag = substr($str, $start, $length);
    $contents = explode($page_flag, $str);
    $record_count_token = $symbol . "_record_count";
    $pagecounttoken = $symbol . "_count";
    global ${$pagecounttoken};
    global ${$record_count_token};
    ${$record_count_token} = count($contents);
    ${$pagecounttoken} = ${$record_count_token};
    $index = isset($_REQUEST[$symbol]) ? $_REQUEST[$symbol] : 1;
    return strfck($contents[$index - 1]);
}
Ejemplo n.º 2
0
						<div id=contenttitle style="margin-left:8px;">征求意见</div>
							<?php 
$comments = $db->paginate('select * from fb_comment where resource_type="djnews" order by created_at desc');
for ($i = 0; $i < count($comments); $i++) {
    ?>
								<div class=content7>
									<div class=name><a href="#"><?php 
    echo $comments[$i]->nick_name;
    ?>
</a></div>	
									<div class=time><?php 
    echo $comments[$i]->created_at;
    ?>
</div>	
									<div class=context><?php 
    echo strfck($comments[$i]->comment);
    ?>
</div>	
								</div>
								<?php 
}
?>
						
							  <div class="pageurl">
							     <?php 
paginate('');
?>
							  </div>
							<form name="commentform" id="commentform" method="post" action="/pub/pub.post.php">
							   <div id=content9>
								   用户:<input type="text" value="" id="commenter" name="post[nick_name]">