Example #1
0
 function static_url($index)
 {
     global $news;
     return get_news_url($news, 'static', $index);
 }
Example #2
0
    }
    if (!check_email($_POST['mail'][$i])) {
        die($_POST['mail'][$i] . " 格式不正确");
    }
    $news_share->id = 0;
    $news_share->user = $user->name;
    $news_share->nick_name = htmlspecialchars($_POST['name'][$i]);
    $news_share->email = htmlspecialchars($_POST['mail'][$i]);
    $news_share->created_at = now();
    $news_share->news_id = $news_id;
    $news_share->share_type = 'assitant';
    $news_share->save();
    $content = addslashes($_POST['name'][$i] . ",你好:<br/><br/>  您的好友" . $user->name . "想与您分享网趣宝贝的文章《" . $news->name . "》,您可以点击以下连接阅读<br/><br/><a href='{$site_domain}" . get_news_url($news, 'static') . "'>http://www.localhost.com" . get_news_url($news, 'static') . "</a><br/>  如果点击以上链接不起作用,请将此网址复制并粘贴到新的浏览器窗口中。");
    $title = $news->title;
    insert_email($news_share->email, $email_from, $title, $content);
}
function insert_email($email_to, $email_from, $email_subject, $email_content)
{
    $db = get_db();
    $db->execute("insert into `eachbb_email`.eb_email (email_to,email_from,email_subject,email_content,created_at) values('{$email_to}','{$email_from}','{$email_subject}','{$email_content}',now())");
}
#send_mail('smtp.qiye.163.com','*****@*****.**','userservice','*****@*****.**',$_GET['mail'][$i],$title,$content);
?>
<script>
	alert("已成功分享!");
	window.location.href = "<?php 
echo get_news_url($news, 'static');
?>
";
</script>
Example #3
0
" title="<?php 
    echo $li;
    ?>
"><?php 
    echo $li;
    ?>
</a></li>
							<?php 
}
?>
						</ul>
					</div>
					<div id="text_content">
						<font>本文摘要:</font>
						<a href="<?php 
get_news_url($column[0]);
?>
" title="<?php 
echo strip_tags($column[0]->description);
?>
"><?php 
echo strip_tags($column[0]->description);
?>
</a>
					</div>
					<div id="text_menu">
						<div class="tm_a"><a href="#">打印</a></div>
						<div id="tm_b"><a href="#">收藏</a></div>
						<div class="tm_a"><a href="#">分享</a></div>
						<div id="tm_ticket"><a href="#">支持&nbsp;<?php 
echo $column[0]->click_count;
Example #4
0
			</div>
			<?php 
}
?>
			
			<div id=list_content>
					<?php 
$count = count($record);
for ($i = 0; $i < $count; $i++) {
    ?>
					<div class=list_box>
							<div class=title><a title="<?php 
    echo $record[$i]->title;
    ?>
" href="<?php 
    echo get_news_url($record[$i]);
    ?>
"><?php 
    echo $record[$i]->title;
    ?>
</a></div>
							<div class=info>作者:<?php 
    echo $record[$i]->author;
    ?>
 发布于:<?php 
    echo substr($record[$i]->created_at, 0, 10);
    ?>
</div>
							<div class=description ><?php 
    echo mb_substr(strip_tags($record[$i]->content), 0, 200, 'utf8');
    ?>
Example #5
0
</span>”的新闻<span>共<?php 
echo $page_record_count;
?>
篇</span></div>
			</div>
			<div id="list_content">
				<?php 
for ($i = 0; $i < $count; $i++) {
    ?>
				<div class="list_box">
					<div class="head_line">
						<div class="title"><a title="<?php 
    echo $record[$i]->title;
    ?>
" target="_blank" href="<?php 
    echo get_news_url($record[$i], 'static');
    ?>
"><?php 
    echo $record[$i]->title;
    ?>
</a></div>
						<div class=info>发布于:<?php 
    echo substr($record[$i]->created_at, 0, 10);
    ?>
</div>
					</div>
					<div class=description ><?php 
    echo strip_tags($record[$i]->description);
    ?>
</div>
				</div>
Example #6
0
}
?>
					</select>
					<a id="btnonline"></a>
					<a id="sq" href="http://www.forbeschina.com/magazine/subscription"></a>
					<a id="jr"></a>
					<?php 
$magazine = $db->query("select id from fb_magazine order by publish_data desc limit 1");
$sql = "select t1.title,t1.short_title,t1.id,t1.created_at,t1.description,t1.video_photo_src from fb_news t1 join fb_magazine_relation t2 on t1.id=t2.resource_id where t2.magazine_id={$magazine[0]->id} order by t2.priority limit 2";
$magazine_news = $db->query($sql);
!$magazine_news && ($magazine_news = array());
foreach ($magazine_news as $news) {
    ?>
					<div class="content">
						<span>·<a href="<?php 
    echo get_news_url($news);
    ?>
"><?php 
    echo strip_tags($news->title);
    ?>
</a></span><br>
						<?php 
    echo strip_tags($news->description);
    ?>
					</div>
					<?php 
}
?>
				</div>
			</div>
		</div>
Example #7
0
						<div class=context style="color:#438a0f;">宝宝玩具推荐</div>	
					</div>
					<div class=piccontent><a href="<?php 
echo get_news_url($teach[0]);
?>
" title="<?php 
echo $teach[0]->toy;
?>
"><?php 
echo $teach[0]->toy;
?>
</a></div>
				</div>
				<div class=content>
					<div class=c_title style="background:#ff8587;">
						<div class=context style="color:#ce0000;">课程订购说明</div>	
					</div>
					<div class=piccontent><a href="<?php 
echo get_news_url($teach[0]);
?>
">挖矿结婚打算到离开家哈萨克交流会到拉萨快回答</a></div>
				</div>
			</div>
			<?php 
include_once '../inc/bottom.php';
?>
	</div>
	
</div>
</body>
</html>
Example #8
0
function paginate_news($news)
{
    if (is_numeric($news)) {
        $table = new table_class('eb_news');
        $news = $table->find($news);
    }
    global $page_page_count;
    global $page_type;
    $_REQUEST['page_type'] && ($page_type = $_REQUEST['page_type']);
    $page_page_count = get_fck_page_count($news->content);
    if ($page_type == 'static') {
        return paginate(get_news_url($news, 'static'), null, 'page', false, 'static', 2);
    } else {
        return paginate(null, null, 'page', false, 'normal', 2);
    }
}
Example #9
0
 function sameWidget($in = array(), $current)
 {
     global $registry;
     $output = '';
     $in = $in->toArray();
     $same = \App\Article::latest('published_at')->select('news_id', 'staties_id', 'img', 'slug', 'title', 'head', 'published_at')->nothis($current)->published()->orderall($in)->take(5)->get();
     if (count($same) > 0) {
         $output .= '<div class="cat-list">';
         $output .= '<ul>';
         foreach ($same as $item) {
             $url = strpos(URL::current(), 'news_id') == false ? get_articles_url($item->staties_id, $item->slug) : get_news_url($item->news_id, $item->slug);
             if (!empty($item->img)) {
                 $output .= '<li><div><a href="' . $url . '">';
                 $output .= '<img src="' . get_news_small_img($item->img) . '" title="' . $item->title . '" align="left">';
                 $output .= '</a></div>';
             }
             $output .= '<div';
             if (empty($item->img)) {
                 $output .= ' style="width:95%" ';
             }
             $output .= '>';
             $output .= '<a href="' . $url . '">';
             $output .= '<h4>' . $item->title . '</h4>';
             $output .= '<small>' . date('H:i | d.m.Y', strtotime($item->published_at)) . '</small><br>';
             $output .= '<span>' . $item->head . '</span>';
             $output .= '</a></div>';
             $output .= '</li>';
         }
         $output .= '</ul>';
         $output .= '</div>';
     }
     return $output;
 }
Example #10
0
        $icount++;
        ?>
							<div class=info_title style="margin-top:15px;font-size:12px;">与“<?php 
        echo $keywords[$k];
        ?>
”相关的文章 <span class="info_more"><a href="<?php 
        echo get_news_serach_url($keywords[$k]);
        ?>
"><img src="/images/news/more.png" border=0></a></span></div>
							<div class=info_list>
								<ul>
									<?php 
        foreach ($key_news as $val) {
            ?>
									<li><a href="<?php 
            echo get_news_url($val);
            ?>
" target="_blank"><?php 
            echo $val->title;
            ?>
</a></li>
									<?php 
        }
        ?>
								</ul>
							
							</div>
						<?php 
    }
}
?>
Example #11
0
    ?>
			<div class=m_l>
					<div class=picture>
					<img src="<?php 
    if ($magazine_news[$i]->video_photo_src != '') {
        echo $magazine_news[$i]->video_photo_src;
    } else {
        echo $magazine_now->img_src;
    }
    ?>
" width="150" height="190">
				</div>
				<div class=m_l_r>
					<div class=title3>
						<a href="<?php 
    echo get_news_url($magazine_news[$i]);
    ?>
"><?php 
    echo $magazine_news[$i]->short_title;
    ?>
</a>
					</div>
					<div class="text">
						<?php 
    echo $magazine_news[$i]->description;
    ?>
					</div>
				</div>	
			</div>
			<?php 
}