• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_article函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_article函数的典型用法代码示例。如果您正苦于以下问题:PHP get_article函数的具体用法?PHP get_article怎么用?PHP get_article使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_article函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: view

 private function view()
 {
     $id = intval($_REQUEST['id']);
     if ($id == 0) {
         app_redirect(url("index", "usagetip"));
     }
     $GLOBALS['tmpl']->caching = true;
     $GLOBALS['tmpl']->cache_lifetime = 6000;
     //首页缓存10分钟
     $cache_id = md5(MODULE_NAME . ACTION_NAME . "view" . $id);
     if (!$GLOBALS['tmpl']->is_cached("page/usagetip_view.html", $cache_id)) {
         $article = get_article($id);
         $GLOBALS['tmpl']->assign("article", $article);
         $seo_title = $article['seo_title'] != '' ? $article['seo_title'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_title", $seo_title);
         $seo_keyword = $article['seo_keyword'] != '' ? $article['seo_keyword'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
         $seo_description = $article['seo_description'] != '' ? $article['seo_description'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
         //使用技巧
         $use_tech_list = get_article_list(6, 6);
         $GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
     }
     $GLOBALS['tmpl']->display("page/usagetip_view.html", $cache_id);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:25,代码来源:usagetipModule.class.php


示例2: format_nav_list

/**
 * 获取导航菜单
 */
function format_nav_list($nav_list)
{
    foreach ($nav_list as $k => $v) {
        if (trim($v['url']) != '') {
            if (substr($v['url'], 0, 7) != "http://") {
                //开始分析url
                $nav_list[$k]['url'] = APP_ROOT . "/" . $v['url'];
            }
        } else {
            preg_match("/id=(\\d+)/i", $v['u_param'], $matches);
            $id = intval($matches[1]);
            if ($v['u_module'] == 'article' && $id > 0) {
                $article = get_article($id);
                if ($article['type_id'] == 1) {
                    $nav_list[$k]['u_module'] = "help";
                } elseif ($article['type_id'] == 2) {
                    $nav_list[$k]['u_module'] = "notice";
                } elseif ($article['type_id'] == 3) {
                    $nav_list[$k]['u_module'] = "sys";
                } else {
                    $nav_list[$k]['u_module'] = 'article';
                }
            }
        }
    }
    return $nav_list;
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:30,代码来源:common.php


示例3: get_latest_article

function get_latest_article()
{
    if ($entry_all = return_query("SELECT entry_id FROM enz_entries ORDER BY entry_id DESC LIMIT 0,1")) {
        $entry = $entry_all[0];
        $entry = get_article($entry['entry_id']);
        return $entry;
    }
    return 0;
}
开发者ID:halfbyte,项目名称:janzyklopedie,代码行数:9,代码来源:funcs.inc.php


示例4: index

 public function index()
 {
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']);
     if (!$GLOBALS['tmpl']->is_cached('page/help_index.html', $cache_id)) {
         $id = intval($_REQUEST['id']);
         $uname = addslashes(trim($_REQUEST['id']));
         if ($id == 0 && $uname == '') {
             $id = $GLOBALS['db']->getOne("select a.id from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on a.cate_id = ac.id where ac.type_id = 1 order by a.sort desc");
         } elseif ($id == 0 && $uname != '') {
             $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where uname = '" . $uname . "'");
         }
         $article = get_article($id);
         if (!$article || $article['type_id'] != 1) {
             app_redirect(APP_ROOT . "/");
         } else {
             if (check_ipop_limit(get_client_ip(), "article", 60, $article['id'])) {
                 //每一分钟访问更新一次点击数
                 $GLOBALS['db']->query("update " . DB_PREFIX . "article set click_count = click_count + 1 where id =" . $article['id']);
             }
             if ($article['rel_url'] != '') {
                 if (!preg_match("/http:\\/\\//i", $article['rel_url'])) {
                     if (substr($article['rel_url'], 0, 2) == 'u:') {
                         app_redirect(parse_url_tag($article['rel_url']));
                     } else {
                         app_redirect(APP_ROOT . "/" . $article['rel_url']);
                     }
                 } else {
                     app_redirect($article['rel_url']);
                 }
             }
         }
         $article = get_article($id);
         $GLOBALS['tmpl']->assign("article", $article);
         $seo_title = $article['seo_title'] != '' ? $article['seo_title'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_title", $seo_title);
         $seo_keyword = $article['seo_keyword'] != '' ? $article['seo_keyword'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
         $seo_description = $article['seo_description'] != '' ? $article['seo_description'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
         $GLOBALS['tmpl']->assign("relate_help", $cate_list);
     }
     $GLOBALS['tmpl']->display("page/help_index.html", $cache_id);
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:44,代码来源:helpModule.class.php


示例5: index

 public function index()
 {
     $id = intval($_REQUEST['id']);
     $uname = addslashes(trim($_REQUEST['id']));
     if ($uname == 'list') {
         $this->list_notice();
         exit;
     }
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']);
     if (!$GLOBALS['tmpl']->is_cached('sys_index.html', $cache_id)) {
         if ($id == 0 && $uname == '') {
             app_redirect(APP_ROOT . "/");
         } elseif ($id == 0 && $uname != '') {
             $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where uname = '" . $uname . "'");
         }
         $article = get_article($id);
         if (!$article || $article['type_id'] != 3) {
             app_redirect(APP_ROOT . "/");
         } else {
             if (check_ipop_limit(get_client_ip(), "article", 60, $article['id'])) {
                 //每一分钟访问更新一次点击数
                 $GLOBALS['db']->query("update " . DB_PREFIX . "article set click_count = click_count + 1 where id =" . $article['id']);
             }
             if ($article['rel_url'] != '') {
                 if (!preg_match("/http:\\/\\//i", $article['rel_url'])) {
                     if (substr($article['rel_url'], 0, 2) == 'u:') {
                         app_redirect(parse_url_tag($article['rel_url']));
                     } else {
                         app_redirect(APP_ROOT . "/" . $article['rel_url']);
                     }
                 } else {
                     app_redirect($article['rel_url']);
                 }
             }
         }
         $article = get_article($id);
         $GLOBALS['tmpl']->assign("article", $article);
         //开始输出当前的site_nav
         $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => APP_ROOT . "/");
         $site_nav[] = array('name' => $GLOBALS['lang']['SHOP_SYSTEM'], 'url' => url("shop", "sys#list"));
         if ($article['type_id'] == 1) {
             $module = "help";
         } elseif ($article['type_id'] == 2) {
             $module = "notice";
         } elseif ($article['type_id'] == 3) {
             $module = "sys";
         } else {
             $module = 'article';
         }
         if ($article['uname'] != '') {
             $aurl = url("index", $module, array("id" => $article['uname']));
         } else {
             $aurl = url("index", $module, array("id" => $article['id']));
         }
         $site_nav[] = array('name' => $article['title'], 'url' => $aurl);
         $GLOBALS['tmpl']->assign("site_nav", $site_nav);
         //输出当前的site_nav
         $seo_title = $article['seo_title'] != '' ? $article['seo_title'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_title", $seo_title);
         $seo_keyword = $article['seo_keyword'] != '' ? $article['seo_keyword'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
         $seo_description = $article['seo_description'] != '' ? $article['seo_description'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
     }
     $GLOBALS['tmpl']->display("sys_index.html", $cache_id);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:67,代码来源:sysModule.class.php


示例6: require

<? require('header.php');
    $id = $_GET['a'];
    $article = get_article($db, $id);
?>

<div id="nav">
    <a href="index.php">Home</a>
    |
    <a href="feed.php?f=<?php 
echo $article['feed'];
?>
">Feed</a>
</div>

<h2><?php 
echo $article['title'];
?>
</h2>
<form action="newarticle.php?edit" method="post">
    <input type="hidden" name="article" value="<?php 
echo $id;
?>
" />
    Title: <input type="text" name="title" value="<?php 
echo $article['title'];
?>
" /> <br />
    <textarea name="desc"><?php 
echo $article['description'];
?>
</textarea> <br />
开发者ID:jeffayle,项目名称:RSS-Maker,代码行数:31,代码来源:article.php


示例7: get_footer

function get_footer()
{
    return get_article('footer');
}
开发者ID:kishanterry,项目名称:emdlog,代码行数:4,代码来源:helpers.php


示例8: get_header

<?php

/*
Template Name: document-template
*/
get_header();
if (function_exists('get_article')) {
    $stringContent = get_article($wp_query->query_vars['documentation_id']);
    print_r($stringContent);
}
?>



	<div id="primary" class="content-area">
		<main id="main" class="site-main" role="main">

		<?php 
// Start the loop.
while (have_posts()) {
    the_post();
    // Include the page content template.
    get_template_part('content', 'page');
    // If comments are open or we have at least one comment, load up the comment template.
    if (comments_open() || get_comments_number()) {
        comments_template();
    }
    // End the loop.
}
?>
开发者ID:southworkscom,项目名称:vscom,代码行数:30,代码来源:document-template.php


示例9: get_article

<?php

require_once 'common.php';
require_once 'models/edit_news_translation.model.php';
$article_id = $_GET['article'];
$lang_id = $_GET['lang'];
$article = get_article($article_id, $lang_id);
$article = $article[0];
if ($article_id && $lang_id && $_POST) {
    $title = $_POST['title'];
    $addedby = $_POST['name'];
    $full_text = $_POST['article'];
    $lang = get_lang_by_name($lang_id);
    $data = array('title' => $title, 'full_text' => $full_text, 'article_id' => $article_id, 'lang_id' => $lang);
    set_article($data);
}
require_once 'templates/edit_news_translation.php';
开发者ID:Boleiko-Nastia,项目名称:conference,代码行数:17,代码来源:edit_news_translation.php


示例10: get_points

function get_points(&$C, $args)
{
    $count = is_numeric($args['count']) ? intval($args['count']) : 1000;
    $offset = is_numeric($args['offset']) ? intval($args['offset']) : 0;
    $woe_id = is_int($args['woe_id']) ? $args['woe_id'] : null;
    $woe_ids = is_array($args['woe_ids']) ? $args['woe_ids'] : null;
    $article_id = is_int($args['article_id']) ? $args['article_id'] : null;
    $article_ids = is_array($args['article_ids']) ? $args['article_ids'] : null;
    $where = array('1');
    $order = array();
    if ($woe_id) {
        $where[] = sprintf('p.woe_id = %d', $woe_id);
    }
    if ($woe_ids) {
        $where[] = sprintf('p.woe_id IN (%s)', join(', ', $woe_ids));
    }
    if ($article_id) {
        $where[] = sprintf('p.article_id = %d', $article_id);
    }
    if ($article_ids) {
        $where[] = sprintf('p.article_id IN (%s)', join(', ', $article_ids));
    }
    // default sort
    $order[] = 'p.created DESC';
    $where_clause = join(' AND ', $where);
    $order_clause = join(', ', $order);
    $q = sprintf("SELECT p.article_id, p.woe_id,\n                             p.latitude, p.longitude,\n                             p.place_id, p.place_path, p.place_type, p.place_name,\n                             p.created\n                      FROM points AS p\n                      WHERE {$where_clause}\n                      ORDER BY {$order_clause}\n                      LIMIT {$count} OFFSET {$offset}");
    $res = $C->dbh->query($q);
    if (PEAR::isError($res)) {
        die("DB Error: " . $q);
    }
    $points = array();
    while ($point = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
        $point['article'] = get_article($C, $point['article_id']);
        $point['article_id'] = intval($point['article_id']);
        $point['woe_id'] = intval($point['woe_id']);
        $points[] = $point;
    }
    return $points;
}
开发者ID:RandomEtc,项目名称:apimaps,代码行数:40,代码来源:data.php


示例11: get_articles

             case 'per_page':
             default:
                 $config['layout']['list_style'] = $config['front']['front_list_style'];
                 $articles = get_articles($config['layout']);
                 break;
         }
     }
 }
 // 404 error
 if ($_GET['page_name'] == '404') {
     // no content
     // we set up the meta tags and parse the request string on the partial page
 }
 // single article
 if ($_GET['page_name'] == 'article') {
     $article = get_article($_GET['article_id']);
 }
 // multiple articles - either a search or listings request
 if ($_GET['page_name'] == 'listing') {
     if (isset($_GET['feed_listing'])) {
         // for a list of all available feeds we'll borrow the listing page
         $feeds = get_feeds($config['admin']['show_all_feeds']);
         $articles = format_feeds_list($feeds);
     } elseif (!empty($_GET['search'])) {
         // run a search
         $articles = search_articles($_GET['search'], $config['layout']);
     } else {
         // standard article listing
         $articles = get_articles($config['layout']);
     }
 }
开发者ID:justincawthorne,项目名称:mt-test,代码行数:31,代码来源:index.php


示例12: get_article

    }
    if (!in_array($artikel, $result)) {
        $artikel = "101";
    }
    $sql = "SELECT * FROM `produkte` WHERE `artikelnummer` = \"{$artikel}\" LIMIT 1";
    $ergebnis = $db->query($sql);
    if ($ergebnis->num_rows == 0) {
        $ergebnis = False;
    }
    $db->close();
    return $ergebnis;
}
$result = get_article();
if ($result == False) {
    $_GET['artikel'] = "101";
    $result = get_article();
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>

<body>
        <div class="detailviewdiv">
			<? 
			$z = $result->fetch_object();
			$files = array();
			$pattern = "weinliste_images/{$z->artikelnummer}_72_medium_*.jpg";
			$files = glob("$pattern",GLOB_BRACE);
			?>
开发者ID:rokibul-hasan,项目名称:michel-wein,代码行数:31,代码来源:weinliste_detail.php


示例13: article_json_pmid

            article_json_pmid($_GET["PMID"]);
            break;
        case "article_json_doi":
            article_json_doi($_GET["PMID"]);
            break;
        case "search_lucene":
            search_lucene($_GET["query"]);
            break;
        case "article_list":
            article_list($_GET["query"]);
            break;
        case "index_lucene":
            index_lucene($_GET, 1);
            break;
        case "get_article":
            get_article($_GET);
            break;
        case "get_concept":
            get_concept($_GET);
            break;
        case "add_log":
            add_log($_GET);
            break;
        case "get_log":
            get_log($_GET);
            break;
        case "admin_updateDOI":
            admin_updateDOI($_GET);
            break;
    }
}
开发者ID:BIDS-collaborative,项目名称:brainspell,代码行数:31,代码来源:brainspell.php


示例14: get_post

function get_post($fp)
{
    return array("date" => fgetschop($fp), "url" => fgetschop($fp), "title" => fgetschop($fp), "post" => fgetschop($fp));
}
$sids = array();
$posts = array();
$post_count = 0;
$cur_sid = "";
$cur_title = "";
$fp = fopen("../slash_files/slash_parsed2.txt", "r");
if (!$fp) {
    exit;
}
$articles = fgetschop($fp);
while ($articles--) {
    $article = get_article($fp);
    $cur_sid = $article["sid"];
    $cur_title = $article["title"];
    $sids[$cur_sid] = array("title" => $cur_title, "url" => $article["url"]);
    while ($article["posts"]--) {
        $post = get_post($fp);
        $posts[$cur_sid][$post["date"]][] = array("url" => $post["url"], "title" => $post["title"], "article" => $cur_title, "post" => $post["post"]);
    }
}
fclose($fp);
$output_file = "../slashdot.html";
$fp = fopen($output_file, "w");
$head = preg_replace(array("/@keywords/", "/@title/"), array($conf->keywords . ", slashdot", "{$conf->title} - Slashdot archive"), $conf->header);
$head .= read_file("template/slashdot.html");
$titles = "<h2>Article List</h2>\n<ul>\n";
ksort($sids);
开发者ID:enascimento,项目名称:carmack,代码行数:31,代码来源:slash2html.php


示例15: index

 public function index()
 {
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']);
     if (!$GLOBALS['tmpl']->is_cached('article_index.html', $cache_id)) {
         $cate_tree = get_acate_tree();
         $GLOBALS['tmpl']->assign("acate_tree", $cate_tree);
         //获取当前页的团购商品
         $id = intval($_REQUEST['id']);
         $uname = addslashes(trim($_REQUEST['id']));
         if ($id == 0 && $uname == '') {
             app_redirect(APP_ROOT . "/");
         } elseif ($id == 0 && $uname != '') {
             $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where is_delete = 0 and is_effect = 1 and uname = '" . $uname . "'");
         }
         $article = get_article($id);
         if (!$article || $article['type_id'] != 0) {
             app_redirect(APP_ROOT . "/");
         } else {
             if ($article['rel_url'] != '') {
                 if (!preg_match("/http:\\/\\//i", $article['rel_url'])) {
                     if (substr($article['rel_url'], 0, 2) == 'u:') {
                         app_redirect(parse_url_tag($article['rel_url']));
                     } else {
                         app_redirect(APP_ROOT . "/" . $article['rel_url']);
                     }
                 } else {
                     app_redirect($article['rel_url']);
                 }
             }
         }
         //开始输出当前的site_nav
         $cates = array();
         $cate = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where id = " . $article['cate_id']);
         do {
             $cates[] = $cate;
             $pid = intval($cate['pid']);
             $cate = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where is_effect =1 and is_delete =0 and id = " . $pid);
         } while ($pid != 0);
         $page_title = substr($page_title, 0, -3);
         krsort($cates);
         $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => APP_ROOT . "/");
         if ($cates) {
             foreach ($cates as $cate_row) {
                 $site_nav[] = array('name' => $cate_row['title'], 'url' => url("shop", "acate#index", array("id" => $cate_row['id'])));
             }
         }
         if ($article['uname'] != '') {
             $aurl = url("shop", "article#index", array("id" => $article['uname']));
         } else {
             $aurl = url("shop", "article#index", array("id" => $article['id']));
         }
         $site_nav[] = array('name' => $article['title'], 'url' => $aurl);
         $GLOBALS['tmpl']->assign("site_nav", $site_nav);
         //输出当前的site_nav
         $article = get_article($id);
         $GLOBALS['tmpl']->assign("article", $article);
         $seo_title = $article['seo_title'] != '' ? $article['seo_title'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_title", $seo_title);
         $seo_keyword = $article['seo_keyword'] != '' ? $article['seo_keyword'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
         $seo_description = $article['seo_description'] != '' ? $article['seo_description'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
     }
     $GLOBALS['tmpl']->display("article_index.html", $cache_id);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:66,代码来源:articleModule.class.php


示例16: get_page

              <script>
              $(function() {
                $( "#datepicker" ).datepicker();
              });
              </script>
            <!---/End-date-piker---->
            <div class="p-ww">
              <form>
                <span> Where</span>
                <input class="dest" type="text" value="Distination" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Distination';}">
                <span> When</span>
                <input class="date" id="datepicker" type="text" value="Select date" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Select date';}">
                <input type="submit" value="Search" />
              </form>
            </div>
          </div>

            <div class="clear"> </div></div>
        <!----//End-find-place---->
      <div class="wrap">
      <?php 
if (isset($page)) {
    echo get_page($page);
}
?>
            <?php 
if (isset($article)) {
    echo get_article($article);
}
?>
      </div>
开发者ID:ankibalyan,项目名称:levoyagers,代码行数:31,代码来源:post.php


示例17: part_items

function part_items($items, &$prod_id, &$date_mod, $start_pos)
{
    $start_time = time();
    for ($i = $start_pos; $i < count($items) && $i < $start_pos + 30; $i++) {
        $item_id = get_id_by_sku(get_article($items[$i]->No));
        if ($item_id) {
            $prod_id[$items[$i]->No] = $item_id;
            $date_mod[$items[$i]->No] = get_post_meta($item_id, '_last_time_modified', true);
            if ($date_mod[$items[$i]->No] < $items[$i]->Last_time_modified) {
                //если дата последнего изменения товара в бд меньше, чем дата изменения выгруженного товара, то обновляем
                set_main_information($items[$i], $item_id);
                update_post_meta($item_id, '_last_time_modified', $items[$i]->Last_time_modified);
            }
        } else {
            //новый продукт добавляем в базу
            create_item($items[$i], $prod_id);
        }
        if (time() - $start_time > 25 || $i == $start_pos + 29) {
            restart_load_items($items, $prod_id, $date_mod, ++$i);
            break;
        }
        error_log(current_time('mysql') . " Added item " . $i . ": " . $prod_id[$items[$i]->No] . ": " . $items[$i]->No . " \r\n", 3, "connect.log");
    }
}
开发者ID:systemo-biz,项目名称:merlion,代码行数:24,代码来源:merlion_db.php


示例18: url

        </div>
    </div>
    <div class="iirig">
        <h5>网络热门文章</h5>
        <dl class="channel">
            <dd><a href="<?php 
echo url('public/article/more');
?>
" target="_blank" title="更多文章">更多</a></dd>
        </dl>
        <div class="content">
            <div class="inew-class">
                <ul>
                <?php 
if (is_array(get_article())) {
    foreach (get_article() as $one) {
        ?>
                <li><a href="<?php 
        echo url('public/article', array('id' => $one['id']));
        ?>
" target="_blank" title="<?php 
        echo $one['title'];
        ?>
"><?php 
        echo $one['title'];
        ?>
</a></li>
                <?php 
    }
}
?>
开发者ID:legeng,项目名称:project-2,代码行数:31,代码来源:common.tpl.php


示例19: chr

         $c = chr($s);
         if ($entries = return_query("SELECT entry_id,title,date FROM enz_entries WHERE idx='{$c}' ORDER BY title")) {
             foreach ($entries as $entry) {
                 $tpl->SetCurrentBlock("eintrag");
                 $tpl->SetVariable("titel", $entry[title]);
                 $tpl->SetVariable("entry_id", $entry[entry_id]);
                 $tpl->SetVariable("date", $entry[date]);
                 $tpl->ParseCurrentBlock("eintrag");
             }
         }
         $tpl->SetCurrentBlock("buchstabe");
         $tpl->SetVariable("buchstabe", strtoupper($c));
         $tpl->ParseCurrentBlock("buchstabe");
     }
 } elseif ($_GET[action] == "entry") {
     if ($entry = get_article($_GET[id])) {
         # head- titel setzen
         $headtpl->SetVariable("titel", $entry[title]);
         # main-template laden
         $tpl->loadTemplatefile("entry.tpl.html", true, true);
         $tpl->SetVariable("titel", $entry[title]);
         $tpl->SetVariable("entry_id", $entry[entry_id]);
         $tpl->SetVariable("artikel", $entry[artikel]);
         $tpl->SetVariable("date", $entry[date]);
         $tpl->SetVariable("text", nl2br($entry[text]));
         $comments = get_comments($_GET['id']);
         if ($comments) {
             foreach ($comments as $comment) {
                 $link = $comment['link'];
                 if (strpos($link, "@") != false) {
                     if (strpos($link, "mailto:") == false) {
开发者ID:halfbyte,项目名称:janzyklopedie,代码行数:31,代码来源:index.php


示例20: switch

<?php

include_once 'db_fns.php';
if (empty($_GET['view'])) {
    $view = 'start';
} else {
    $view = $_GET['view'];
}
echo 'view:::::---| ' . $view . '<br />';
switch ($view) {
    case 'start':
        $items = get_exercises();
        break;
    case 'muscle_group':
        $m_group = $_GET['align'];
        $items = get_muscle_group_exercise($m_group);
        break;
    case 'article':
        $id = $_GET['id'];
        $item = get_article($id);
        break;
}
include $_SERVER['DOCUMENT_ROOT'] . '/euro/view/layouts/blog.php';
开发者ID:sawatzki,项目名称:Euro,代码行数:23,代码来源:index.php



注:本文中的get_article函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_article_children函数代码示例发布时间:2022-05-15
下一篇:
PHP get_array_of_activities函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap