Exemple #1
0
			<td style="text-align:left; text-indent:12px;"><a href="<?php 
    echo "/news/news.php?id={$record[$i]->id}";
    ?>
" target="_blank"><?php 
    echo strip_tags($record[$i]->title);
    ?>
</a></td>
			<td><?php 
    echo $record[$i]->author;
    ?>
</td>
			<td><a href="?category=<?php 
    echo $record[$i]->category_id;
    ?>
" style="color:#0000FF"><?php 
    echo $category->find($record[$i]->category_id)->name;
    ?>
</a></td>
			<td><?php 
    echo $record[$i]->created_at;
    ?>
</td>
			<td>
					<a href="news_edit.php?id=<?php 
    echo $record[$i]->id;
    ?>
" class="edit" name="<?php 
    echo $record[$i]->id;
    ?>
" title="编辑"><img src="/images/admin/btn_edit.png" border="0"></a>
					<?php 
for ($i = 0; $i < $count_record; $i++) {
    ?>
							<div class="items" id='<?php 
    echo $items[$i]->id;
    ?>
' >
								<div class="item1"><?php 
    echo strip_tags($items[$i]->short_title);
    ?>
</div>
								<div class="item2"><?php 
    echo strip_tags($items[$i]->created_at);
    ?>
</div>					
								<div class="item3"><?php 
    echo $category->find($items[$i]->category_id)->name;
    ?>
</div>
							</div>
					<?php 
}
//--------------------
?>
				
				</div>
			</td>
		</tr>
		<tr class=tr3>
				<td colspan="4"><?php 
paginate(null, 'result_box');
?>
Exemple #3
0
foreach ($p_news as $news) {
    ?>
		<tr class=tr3>
			<td style="text-align:left; text-indent:12px;"><?php 
    echo strip_tags($news->title);
    ?>
</td>
			<td><?php 
    echo $news->author;
    ?>
</td>
			<td><a href="?category=<?php 
    echo $news->category_id;
    ?>
" style="color:#0000FF"><?php 
    echo $category->find($news->category_id)->name;
    ?>
</a></td>
			<td><?php 
    echo $news->created_at;
    ?>
</td>
			<td><?php 
    if ($news->is_adopt) {
        echo '已发布';
    } else {
        echo '未发布';
    }
    ?>
</td>
			<td>
Exemple #4
0
    $db->query("select author as name from fb_news where id={$news_id}");
    if ($db->record_count <= 0) {
        redirect('/error/');
        die;
    }
    $author = $db->field_by_name('name');
    $conditions[] = "author='{$author}'";
    $title = "作者:{$author}";
} else {
    if (empty($cid)) {
        $cid = 0;
    }
    $c_id = $category->children_map($cid);
    $c_id = implode(',', $c_id);
    $conditions[] = "a.category_id in ({$c_id})";
    $title = $category->find($cid)->name;
}
if ($author_type == 'column_writer' || $author_type == 'column_editor') {
    $conditions[] = "b.role_name = '{$author_type}'";
} elseif ($author_type == 'column') {
    $conditions[] = "b.role_name like '{$author_type}%'";
} else {
    $author_type = "";
    $conditions[] = "is_adopt = 1";
}
$sql = "select a.id,video_photo_src,a.author,a.created_at,a.title,a.content,a.description from fb_news a left join fb_user b on a.publisher=b.id where ";
if ($cid && $author_type == "" && (!$_REQUEST['page'] || $_REQUEST['page'] == 1)) {
    //normal category,find the top image;
    $condition = implode(' and ', $conditions) . " and video_photo_src!='' and set_up=1";
    $order = " order by priority asc,created_at";
    $top_news = $db->query($sql . $condition . $order . " limit 1");
Exemple #5
0
	<meta http-equiv=Content-Language content=zh-CN>
	<title>网趣宝贝-妈妈助手</title>
	<?php 
include_once '../frame.php';
css_include_tag('top_inc/assistant_top', 'logo', 'assistant_list', 'assistant/assistant_content', 'assistant/assistant_question', 'right_inc/assistant_right', 'left_inc/assistant_left');
use_jquery();
js_include_tag('assistant/list');
$db = get_db();
$age = intval($_GET['age']);
$category_id = intval($_GET['category_id']);
if (!$category_id) {
    die('invalid param');
    exit;
}
$category = new category_class('assistant');
$current_cate = $category->find($category_id);
$level = $current_cate->level;
if ($level == 1) {
    $sub_cates = $category->find_sub_category($category_id);
    $breads[0] = $current_cate;
} else {
    $breads[0] = $category->find($current_cate->parent_id);
    $breads[1] = $current_cate;
}
function convert_age($age)
{
    switch ($age) {
        case -2:
            return '准备怀孕';
            break;
        case -1:
Exemple #6
0
" target="_blank" style="color:#000000; text-decoration:none">
					<?php 
    echo $images[$i]->title;
    ?>
				</a>
			</div>
			<div class=content>
				<a href="?category=<?php 
    echo $images[$i]->category_id;
    ?>
" style="color:#0000FF">
					<a href="?category=<?php 
    echo $images[$i]->category_id;
    ?>
" style="color:#0000FF"><?php 
    echo $category->find($images[$i]->category_id)->name;
    ?>
</a>
				</a>
			</div>
			<div class=content>
				<?php 
    echo $images[$i]->created_at;
    ?>
			</div>
			<div class=content style="height:20px">
				<?php 
    $rate_flag = false;
    for ($j = 0; $j < $news_count; $j++) {
        if ($images[$i]->id == $news[$j]->news_id) {
            $rate_flag = true;
Exemple #7
0
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta http-equiv=Content-Language content=zh-CN>
<?php 
include_once '../frame.php';
$db = get_db();
$id = intval(trim($_REQUEST['category_id']));
if (empty($id)) {
    die('invliad params!');
}
$title_id = $db->query("select name from eb_category where id={$id}");
css_include_tag('news_list');
//获得顶级category id;
$category = new category_class("news");
$item = $category->find($id);
if ($item->level >= 2) {
    $item_ids = $category->tree_map($id);
    $category_id = end($item_ids);
} else {
    $category_id = $id;
}
if (!$category_id) {
    die('invalid param');
}
$sub_category_items = $category->find_sub_category($category_id);
$all_category_ids = $category->children_map($category_id);
$exists_news_ids = array();
?>
<title>网趣宝贝-育儿资讯-<?php 
echo $title_id[0]->name;
Exemple #8
0
" target="_blank" style="color:#000000; text-decoration:none">
					<?php 
    echo strip_tags($video[$i]->title);
    ?>
				</a>
			</div>
			<div class=content>
				<a href="?category=<?php 
    echo $video[$i]->category_id;
    ?>
" style="color:#0000FF">
					<a href="?category=<?php 
    echo $video[$i]->category_id;
    ?>
" style="color:#0000FF"><?php 
    echo $category->find($video[$i]->category_id)->name;
    ?>
</a>
				</a>
			</div>
			<div class=content>
				<?php 
    echo $video[$i]->created_at;
    ?>
			</div>
			<div class=content style="height:20px">
				<?php 
    if ($video[$i]->is_adopt == "1") {
        ?>
					<span style="color:#FF0000;cursor:pointer" class="revocation" name="<?php 
        echo $video[$i]->id;
Exemple #9
0
}
?>
>
	<div id=ibody>
		<?php 
include_top();
?>
		<div id=bread>
			<?php 
$category = new category_class('news');
$parent_ids = $category->tree_map($news->category_id);
?>
			<?php 
$len = count($parent_ids);
for ($i = $len - 1; $i >= 0; $i--) {
    $item = $category->find($parent_ids[$i]);
    $curl = $page_type == 'static' ? "/review/list/{$parent_ids[$i]}/cid" : "news_list.php?cid={$parent_ids[$i]}";
    ?>
				<a href="<?php 
    echo get_newslist_url($parent_ids[$i]);
    ?>
"><?php 
    echo $item->name;
    ?>
</a> > 
			<?php 
}
?>
			<span style="color:#246BB0;"><?php 
echo strip_tags($news->title);
?>