本文整理汇总了PHP中get_article_info函数的典型用法代码示例。如果您正苦于以下问题:PHP get_article_info函数的具体用法?PHP get_article_info怎么用?PHP get_article_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_article_info函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: recommendGoods
public function recommendGoods () {
$article_id = isset($_GET['id']) ? intval($_GET['id']) : 14;
$article = array();
if($article_id > 0)
{
//文章详细信息
$article = get_article_info($article_id);
//文章关联产品
$article_related_goods = article_related_goods($article_id);
$articleArr = array('article'=>$article,'article_related_goods'=>$article_related_goods);
}
//var_dump($articleArr);exit;
jsonExit($articleArr);
}
开发者ID:noikiy,项目名称:mdwp,代码行数:14,代码来源:article.action.php
示例2: insertInto
$ip = $_REQUEST['ip'];
insertInto($ip);
}
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
$cache_id = sprintf('%X', crc32($_REQUEST['id'] . '-' . $_CFG['lang']));
if (!$smarty->is_cached('article.dwt', $cache_id)) {
/* 文章详情 */
if ($_REQUEST['type'] == 'sjs') {
$article = get_article_info_sjs($article_id);
} else {
if ($_REQUEST['type'] == 'fu') {
$article = get_article_info0($article_id);
} else {
$article = get_article_info($article_id);
}
}
if (empty($article)) {
ecs_header("Location: ./\n");
exit;
}
if (!empty($article['link']) && $article['link'] != 'http://' && $article['link'] != 'https://') {
ecs_header("location:{$article['link']}\n");
exit;
}
$smarty->assign('article_categories', article_categories_tree($article_id));
//文章分类树
$smarty->assign('categories', get_categories_tree());
// 分类树
$smarty->assign('helps', get_shop_help());
开发者ID:xiaoxiaowu007,项目名称:jicai,代码行数:31,代码来源:article.php
示例3: define
<?php
define('IN_ECTOUCH', true);
require 'include/init.php';
$do = array('www.bswtg.com', 'wsc.bswtg.com');
$do99 = $_SERVER['HTTP_HOST'];
if (!in_array($do99, $do)) {
$todo = 'error';
}
$action = isset($_REQUEST['act']) ? $_REQUEST['act'] : 'default';
if ($_REQUEST['act'] == 'contact') {
assign_template();
$article = get_article_info(5);
$smarty->assign('article', $article);
$smarty->assign('action', $action);
$smarty->display('ectouch.dwt');
} elseif ($_REQUEST['act'] == 'share') {
assign_template();
$smarty->assign('HTTP_REFERER', $_SERVER['HTTP_REFERER']);
$smarty->assign('action', $action);
$smarty->display('ectouch.dwt');
} elseif ($_REQUEST['act'] == 'map') {
$smarty->assign('action', $action);
$smarty->display('ectouch.dwt');
}
function get_article_info($article_id)
{
$sql = "SELECT a.*, IFNULL(AVG(r.comment_rank), 0) AS comment_rank " . "FROM " . $GLOBALS['ecs']->table('article') . " AS a " . "LEFT JOIN " . $GLOBALS['ecs']->table('comment') . " AS r ON r.id_value = a.article_id AND comment_type = 1 " . "WHERE a.is_open = 1 AND a.article_id = '{$article_id}' GROUP BY a.article_id";
$row = $GLOBALS['db']->getRow($sql);
if ($row !== false) {
$row['comment_rank'] = ceil($row['comment_rank']);
开发者ID:seanguo166,项目名称:microdistribution,代码行数:31,代码来源:ectouch.php
示例4: define
* ECSHOP 文章
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liubo $
* $Id: article.php 16455 2009-07-13 09:57:19Z liubo $.
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
$a_id = !empty($_GET['id']) ? intval($_GET['id']) : '';
if ($a_id > 0) {
$article_row = get_article_info($a_id);
if (empty($article_row)) {
mobile_error('返回首页', $url = 'index.php', '未找到对应的文章');
}
if (!empty($article_row['link']) && $article_row['link'] != 'http://' && $article_row['link'] != 'https://') {
mobile_error('返回首页', $url = 'index.php', '未找到对应的文章');
}
$smarty->assign('common_header_title', encode_output($article_row['title']));
$article_row['title'] = encode_output($article_row['title']);
$replace_tag = array('<br />', '<br/>', '<br>', '</p>');
$article_row['content'] = htmlspecialchars_decode(encode_output($article_row['content']));
$article_row['content'] = str_replace($replace_tag, '{br}', $article_row['content']);
$article_row['content'] = strip_tags($article_row['content']);
$article_row['content'] = str_replace('{br}', '<br />', $article_row['content']);
$smarty->assign('article_data', $article_row);
$smarty->display('article_desc.dwt');
开发者ID:netroby,项目名称:ecshop,代码行数:31,代码来源:article.php
示例5: render_article_summary
function render_article_summary($dbc, $article_id, $word_count = 0)
{
$article_info = get_article_info($dbc, $article_id);
echo "<h4><a href = \"article.php?id={$article_id}\">" . $article_info[title] . "</a></h4>";
echo "{$article_info['creators']}创建于{$article_info['create_time']}";
$abstract = get_abstract($dbc, $article_id);
if ($word_count != 0) {
$abstract = tcmks_substr($abstract);
}
echo '<p>' . $abstract . '</p>';
}
开发者ID:sdgdsffdsfff,项目名称:TCMKS,代码行数:11,代码来源:article_helper.php
示例6: isset
if (isset($_GET['id'])) {
$id = $_GET['id'];
$has_right_to_edit = isset($_GET['view']) ? false : has_right_to_edit($dbc, $_SESSION['id'], $id);
if (isset($_GET['delete_image'])) {
delete_image_from_segment($dbc, $_GET['segment_id'], $_GET['delete_image']);
}
if (isset($_GET['deleted_segment_id'])) {
delete_segment_from_article($dbc, $id, $_GET['deleted_segment_id']);
}
if (isset($_GET['insert'])) {
insert_segment_into_article($dbc, $id, $_GET['insert'], $_GET['prev']);
}
if (isset($_GET['copy'])) {
copy_and_insert_segment($dbc, $id, $_GET['copy'], $_GET['prev']);
}
$article_info = get_article_info($dbc, $id);
$segments = get_segments($dbc, $id);
$images = set_image_no($dbc, $segments);
?>
<script type ="text/javascript">
function jump(link) {
window.location = "#" + link;
}
</script>
<div class="container">
<div class="row">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<?php
$is_first_segment = true;
开发者ID:sdgdsffdsfff,项目名称:TCMKS,代码行数:31,代码来源:article.php
示例7: _POST
* HQ China:
* 2319 Est.Tower Van Palace
* No.2 Guandongdian South Street
* Beijing , China
*
* U.S. Office:
* One Park Place, Elmira College, NY, 14901, USA
*
* QQ Group: 329673575
* BBS: bbs.ecmobile.cn
* Fax: +86-10-6561-5510
* Mail: [email protected]
*/
require EC_PATH . '/includes/init.php';
$id = _POST('article_id', 0);
if (empty($id)) {
GZ_Api::outPut(101);
}
if (!($article = get_article_info($id))) {
GZ_Api::outPut(13);
}
function get_article_info($article_id)
{
/* 获得文章的信息 */
$sql = "SELECT a.article_id as id, a.title, a.content " . "FROM " . $GLOBALS['ecs']->table('article') . " AS a " . "WHERE a.is_open = 1 AND a.article_id = '{$article_id}'";
$row = $GLOBALS['db']->getRow($sql);
return $row;
}
$base = sprintf('<base href="%s/" />', dirname($GLOBALS['ecs']->url()));
$html = '<!DOCTYPE html><html><head><title>' . $article['title'] . '</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>img {width: auto\\9;height: auto;vertical-align: middle;border: 0;-ms-interpolation-mode: bicubic;max-width: 100%; }html { font-size:100%; } </style>' . $base . '</head><body>' . $article['content'] . '</body></html>';
GZ_Api::outPut(array('data' => $html));
开发者ID:dx8719,项目名称:ECMobile_Universal,代码行数:31,代码来源:article.php
注:本文中的get_article_info函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论