本文整理汇总了PHP中get_page_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_page_url函数的具体用法?PHP get_page_url怎么用?PHP get_page_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_page_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
//$sitemap = new google_sitemap; //Create a new Sitemap Object
$posts = $this->cf_blog_model->getRecentPosts('50');
$item = $this->cf_sitemap_lib->google_sitemap_item(site_url(), date("Y-m-d", time()), 'daily', '1.0');
//Create a new Item
$this->cf_sitemap_lib->add_item($item);
foreach ($posts->result_array() as $entry) {
$link = get_page_url($entry);
//Create a new Item
$item = $this->cf_sitemap_lib->google_sitemap_item(site_url($link), date("Y-m-d", strtotime($entry['page_date'])), 'daily', '0.5');
//Append the item to the sitemap object
$this->cf_sitemap_lib->add_item($item);
}
$this->cf_sitemap_lib->build("sitemap.xml");
//Build it...
//Let's compress it to gz
$data = implode("", file("sitemap.xml"));
$gzdata = gzencode($data, 9);
$fp = fopen("sitemap.xml.gz", "w");
fwrite($fp, $gzdata);
fclose($fp);
//Let's Ping google
$this->_pingGoogleSitemaps(base_url() . "/sitemap.xml.gz");
echo site_url();
}
开发者ID:ipopovic,项目名称:codefight-cms,代码行数:26,代码来源:sitemap.php
示例2: return_disqus
function return_disqus()
{
global $disqus_conf;
$new_content = '<div id="disqus_thread"></div>';
$new_content .= '<script type="text/javascript">';
$new_content .= "var disqus_shortname = '" . $disqus_conf['shortname'] . "';";
$new_content .= "var disqus_developer = '" . $disqus_conf['developer'] . "';";
$new_content .= "var disqus_identifier = '" . return_page_slug() . "';";
$new_content .= "var disqus_url = '" . get_page_url(True) . "';";
$new_content .= "var disqus_title = '" . return_page_title() . "';";
$new_content .= <<<INLINECODE
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
INLINECODE;
return $new_content;
}
开发者ID:RobAnt,项目名称:GetSimple-Plugins,代码行数:22,代码来源:disqus.php
示例3: get_page_url
echo $CONF['template'];
?>
/img/screenshots/paste_screenshot.PNG" title="Apple" data-gallery>
<img src="<?php
echo get_page_url("cdn", $CONF);
?>
/<?php
echo $CONF['template'];
?>
/img/screenshots/paste_screenshot_thumb.png" alt="Apple">
</a>
<a href="<?php
echo get_page_url("cdn", $CONF);
?>
/<?php
echo $CONF['template'];
?>
/img/screenshots/podcast_screenshot.PNG" title="Orange" data-gallery>
<img src="<?php
echo get_page_url("cdn", $CONF);
?>
/<?php
echo $CONF['template'];
?>
/img/screenshots/podcast_screenshot_thumb.png" alt="Orange">
</a>
</div>
</div>
</div>
</div>
开发者ID:KingNoosh,项目名称:Teknik,代码行数:30,代码来源:main.php
示例4: rate_limit
// the allowed login attempt limits (see functions.php for more):
rate_limit($_SERVER['REMOTE_ADDR']);
// Record this login attempt
rate_limit_tick($_SERVER['REMOTE_ADDR'], $_POST['email']);
// Send the message to the user
$message = '';
$email = $_POST['email'];
$subject = 'Your Login Link';
if (!User::exists($email)) {
$subject = "Thank You For Registering!";
$message = "Thank you for registering at our site!\n\n";
}
// Attempt to login or register the person
$user = User::loginOrRegister($_POST['email']);
$message .= "You can login from this URL:\n";
$message .= get_page_url() . "?tkn=" . $user->generateToken() . "\n\n";
$message .= "The link is going expire automatically after 10 minutes.";
$result = send_email($fromEmail, $_POST['email'], $subject, $message);
if (!$result) {
throw new Exception("There was an error sending your email. Please try again.");
}
die(json_encode(array('message' => 'Thank you! We\'ve sent a link to your inbox. Check your spam folder as well.')));
}
} catch (Exception $e) {
die(json_encode(array('error' => 1, 'message' => $e->getMessage())));
}
/*--------------------------------------------------
Output the login form
---------------------------------------------------*/
?>
<!DOCTYPE HTML>
开发者ID:ProculGames,项目名称:Website,代码行数:31,代码来源:login+&+signup.php
示例5: date
/<?php
echo $post_id;
?>
" id="title_<?php
echo $post_id;
?>
"><?php
echo $title;
?>
</a></h2>
<p class="blog-post-meta-sm text-left text-muted">
Posted on <?php
echo date("F d, Y", strtotime($date));
?>
by <a href="<?php
echo get_page_url("home", $CONF);
?>
/<?php
echo $author->username;
?>
"><?php
echo $author->username;
?>
</a>
</p>
</div>
</div>
</div>
</li>
<?php
}
开发者ID:KingNoosh,项目名称:Teknik,代码行数:31,代码来源:main.php
示例6: rawurldecode
$user_id = $pod['user_id'];
$date = $pod['date_posted'];
$title = rawurldecode($pod['title']);
$tags = $pod['tags'];
$file = $pod['file_name'];
$files = explode(',', $file);
$Parsedown = new Parsedown();
$post = $Parsedown->text($pod['description']);
$rssfeed .= '<item>';
$rssfeed .= '<title><![CDATA[' . $title . ']]></title>';
$rssfeed .= '<description><![CDATA[' . $post . ']]></description>';
foreach ($files as $filename) {
$file_path = get_page_url("podcast", $CONF) . '/Podcasts/' . $title . '/' . $filename;
$direct_path = $CONF['podcast_dir'] . $title . '/' . $filename;
$file_type = mime_content_type($direct_path);
$file_length = filesize($direct_path);
$rssfeed .= '<enclosure url="' . $file_path . '" length="' . $file_length . '" type="' . $file_type . '" />';
}
$rssfeed .= '<link>' . get_page_url("podcast", $CONF) . '/' . $post_id . '</link>';
$rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O", strtotime($date)) . '</pubDate>';
$rssfeed .= '</item>';
}
}
break;
default:
break;
}
$rssfeed .= '</channel>';
$rssfeed .= '</rss>';
echo $rssfeed;
}
开发者ID:KingNoosh,项目名称:Teknik,代码行数:31,代码来源:index.php
示例7: __
<div class="box_top_mid">
<div class="box_bottom_left">
<div class="box_bottom_right">
<div class="box_top_left">
<div class="box_top_right">
<div class="box_content">
<h2><?php
echo __('Top 10 Page');
?>
</h2>
<?php
if (isset($top_page)) {
echo '<ul>';
foreach ($top_page as $v) {
echo '<li>';
echo '<a href="' . get_page_url($v) . '" target="_blank">' . $v['page_title'] . '</a>';
echo '</li>';
}
echo '</ul>';
}
?>
<p class="clear"> </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
开发者ID:mashbro,项目名称:Codefight-CMS,代码行数:31,代码来源:cp_view.php
示例8: get_page_url
Хост базы данных
<input name="db-host" value="localhost" required>
</label>
<label>
Пользователь базы данных
<input name="db-user" value="root" required>
</label>
<label>
Пароль базы данных
<input name="db-pass" value="">
</label>
<label>
Имя базы данных
<input name="db-name" value="chiffon" required>
</label>
<label>
Путь приложения
<input name="app-url" value="<?php
echo get_page_url();
?>
" required>
</label>
<button>Установка</button>
</form>
<?php
}
?>
</body>
</html>
开发者ID:s-melnikov,项目名称:simple-cms,代码行数:31,代码来源:index.php
示例9: preg_match_all
//https://itunes.apple.com/us/app/tic-tac-toe/id289278457?mt=8
$reg_tag = '/\\/id(\\d*)\\?/';
$ret = preg_match_all($reg_tag, $url, $match_result);
@($app_ids[$match_result[1][0]] += 1);
}
}
$category_id = array(6018, 6000, 6022, 6017, 6016, 6015, 6023, 6014, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 6013, 6012, 6020, 6011, 6010, 6009, 6021, 13007, 13006, 13008, 13009, 13010, 13011, 13012, 13013, 13014, 13015, 13002, 13017, 13018, 13003, 13019, 13020, 13021, 13001, 13004, 13023, 13024, 13025, 13026, 13027, 13005, 13028, 13029, 13030, 6008, 6007, 6006, 6005, 6004, 6003, 6002, 6001);
$letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '*');
$old = '';
//判断第一个运用,确定是否没有更多分页了。
foreach ($category_id as $cat_id) {
foreach ($letters as $letter) {
for ($i = 1; $i < 500; $i++) {
$url = "https://itunes.apple.com/us/genre/ios-games/id{$cat_id}?letter={$letter}&page={$i}";
$page_content = get_site_content($url);
$urls = get_page_url($page_content);
if ($old == $urls[0]) {
break;
} else {
$old = $urls[0];
}
get_and_save_app_id($urls);
//提取应用ID并保存
//信息显示
echo $url . "\n";
}
file_put_contents('app_ids.php', '<?php $app_ids = ' . var_export($app_ids, TRUE) . ';');
echo 'App total: ' . count($app_ids) . "\n";
}
}
file_put_contents('app_ids.php', '<?php $app_ids = ' . var_export($app_ids, TRUE) . ';');
开发者ID:brocard,项目名称:apple-app-orlla,代码行数:31,代码来源:grab-app.php
示例10: defined
/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <[email protected]>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$curr_page_id = Application::Get('system_page') == '' ? Application::Get('page_id') : Application::Get('system_page');
$field_name = Application::Get('system_page') == '' ? 'id' : 'system_page';
$mg_language_id = isset($_REQUEST['mg_language_id']) ? prepare_input($_REQUEST['mg_language_id']) : Application::Get('lang');
$new_page_id = Pages::GetPageId($curr_page_id, $mg_language_id, $field_name);
$field_from = Application::Get('system_page') == '' ? 'pid=' . $curr_page_id : 'system_page=' . $curr_page_id;
$field_to = Application::Get('system_page') == '' ? 'pid=' . $new_page_id : 'system_page=' . $new_page_id;
$seo_field_from = Application::Get('system_page') == '' ? '/' . $curr_page_id . '/' : '/' . $curr_page_id . '.';
$seo_field_to = Application::Get('system_page') == '' ? '/' . $new_page_id . '/' : '/' . $new_page_id . '.';
if (!empty($new_page_id) && $curr_page_id != $new_page_id) {
$url = get_page_url(false);
if ($objSettings->GetParameter('seo_urls') == '1') {
$url = str_replace($seo_field_from, $seo_field_to, $url);
} else {
$url = str_replace($field_from, $field_to, $url);
}
header('location: ' . $url);
exit;
} else {
if (empty($new_page_id)) {
$objSession->SetMessage('notice', draw_important_message(_PAGE_UNKNOWN, false));
}
}
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:handler_pages.php
示例11: function
this.on("success", function(file, responseText) {
obj = JSON.parse(responseText);
var name = obj.results.file.name;
var short_name = file.name.split(".")[0].hashCode();
$("#upload-links").css('display', 'inline', 'important');
$("#upload-links").prepend(' \
<div class="row link_'+short_name+'"> \
<div class="col-sm-6"> \
'+file.name+' \
</div> \
<div class="col-sm-3"> \
<a href="<?php
echo get_page_url('u', $CONF);
?>
/'+name+'" target="_blank" class="alert-link"><?php
echo get_page_url('u', $CONF);
?>
/'+name+'</a> \
</div> \
<div class="col-sm-3"> \
<button type="button" class="btn btn-default btn-xs generate-delete-link-'+short_name+'" id="'+name+'">Generate Deletion URL</button> \
</div> \
</div> \
');
linkUploadDelete('.generate-delete-link-'+short_name+'');
});
this.on("removedfile", function(file) {
var name = file.name.split(".")[0].hashCode();
$('.link_'+name).remove();
});
this.on("reset", function(file, responseText) {
开发者ID:KingNoosh,项目名称:Teknik,代码行数:31,代码来源:main.php
示例12: get_var
echo $template->page_title;
?>
</h1>
</div>
<div id="innolunch">
<?php
echo get_var('menu') == 'edit' ? '<form class="form-horizontal" method="post" action="' . get_page_url() . '">' : '';
?>
<h4>Week of <?php
echo get_var('menu') == 'edit' ? '<input name="innolunch_week" type="text" value="' . Innolunch::getWeek() . '" />' : Innolunch::getWeek();
?>
<span class="pull-right"><?php
echo get_var('menu') == 'edit' ? '<a class="btn btn-default btn-xs" href="' . $options['site_url'] . '/index.php?p=zeelunch#innolunch">Cancel</a> <button class="btn btn-primary btn-xs" type="submit" name="save">Save</button>' : '<a href="' . get_page_url() . '&menu=edit#innolunch">Edit</a>';
?>
</span></h4>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Day</th>
<th>Item</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<?php
foreach (Innolunch::getMenu() as $menu) {
?>
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:template-zeelunch.php
示例13: upload
function upload($files, $CONF, $db)
{
if (!empty($files)) {
$filesize = filesize($files['file']['tmp_name']);
$file_type = mime_content_type($files['file']['tmp_name']);
$ext = pathinfo($files['file']['name'], PATHINFO_EXTENSION);
if ($logged_in == 1) {
$user_id = $user->id;
} else {
$user_id = 0;
}
if ($filesize <= pow(1024, 2) * $CONF['max_upload_size']) {
$iv = rand_string(32);
$targetFile = upload_file($files, $CONF['upload_dir'], $CONF['key'], $iv, $CONF['cipher']);
$file_used = true;
while ($file_used) {
$randomString = rand_string(6);
if (empty($ext)) {
$fileURL = $randomString;
} else {
$fileURL = $randomString . "." . $ext;
}
$result = $db->select("uploads", "url=?", array($fileURL));
if (!$result) {
$file_used = false;
}
}
$data = array("filename" => $targetFile, "url" => $fileURL, "type" => $file_type, "user_id" => $user_id, "upload_date" => date("Y-m-d H:i:s", time()), "filesize" => $filesize, "hash" => $iv, "cipher" => $CONF['cipher']);
$db->insert($data, 'uploads');
$_SESSION[$fileURL] = $fileURL;
return array('results' => array('file' => array('name' => $fileURL, 'url' => get_page_url("u", $CONF) . '/' . $fileURL, 'type' => $file_type, 'size' => $filesize)));
}
return array('error' => $CONF['errors']['InvFile']);
}
return array('error' => $CONF['errors']['NoFile']);
}
开发者ID:KingNoosh,项目名称:Teknik,代码行数:36,代码来源:common.php
示例14: get_header
/**
* Get Page Header HTML
*
* This will return header html for a particular page. This will include the
* meta desriptions & keywords, canonical and title tags
*
* @since 1.0
* @uses exec_action
* @uses get_page_url
* @uses strip_quotes
* @uses get_page_meta_desc
* @uses get_page_meta_keywords
* @uses $metad
* @uses $title
* @uses $content
* @uses $site_full_name from configuration.php
* @uses GSADMININCPATH
*
* @return string HTML for template header
*/
function get_header($full = true)
{
global $metad;
global $title;
global $content;
include GSADMININCPATH . 'configuration.php';
// meta description
if ($metad != '') {
$description = get_page_meta_desc(FALSE);
} else {
if (getDef('GSAUTOMETAD', true)) {
// get meta from content excerpt
if (function_exists('mb_substr')) {
$description = trim(mb_substr(strip_tags(strip_decode($content)), 0, 160));
} else {
$description = trim(substr(strip_tags(strip_decode($content)), 0, 160));
}
$description = str_replace('"', '', $description);
$description = str_replace("'", '', $description);
$description = preg_replace('/\\n/', " ", $description);
$description = preg_replace('/\\r/', " ", $description);
$description = preg_replace('/\\t/', " ", $description);
$description = preg_replace('/ +/', " ", $description);
}
}
if (!empty($description)) {
echo '<meta name="description" content="' . $description . '" />' . "\n";
}
// meta keywords
$keywords = get_page_meta_keywords(FALSE);
if ($keywords != '') {
echo '<meta name="keywords" content="' . $keywords . '" />' . "\n";
}
if ($full) {
echo '<link rel="canonical" href="' . get_page_url(true) . '" />' . "\n";
}
// script queue
get_scripts_frontend();
exec_action('theme-header');
}
开发者ID:Foltys,项目名称:Masopust,代码行数:60,代码来源:theme_functions.php
示例15: set_page_title
<div class="col-sm-12 text-center">
<iframe style="border: 0; width: 100%;" src="https://stats.teknik.io/index.php?module=CoreAdminHome&action=optOut&language=en"></iframe>
</div>
</div>
</div>
<?php
}
?>
</div><!--/tab-content-->
</div><!--/col-9-->
</div><!--/row-->
</div>
<?php
set_page_title($Profile_User->username . " - Teknik");
} else {
set_page_title("Teknik");
?>
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<h2>Sorry, but I couldn't find that user.</h2>
</div>
</div>
</div>
<?php
}
} else {
redirect(get_page_url("home", $CONF));
}
include '../templates/' . $CONF['template'] . '/footer.php';
开发者ID:KingNoosh,项目名称:Teknik,代码行数:31,代码来源:profile.php
示例16: header
<?php
/**
* Sitemap Generator, Furasta.Org
*
* Generates sitemaps when the /sitemap.xml file is accessed.
*
* @author Conor Mac Aoidh <[email protected]>
* @license http://furasta.org/licence.txt The BSD License
* @version 1.0
*/
require 'define.php';
header('Content-type: text/xml');
$pages = rows('select id,slug,edited,parent from ' . DB_PAGES . ' where display=1');
$_url = SITE_URL;
$sitemap = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset>\n";
foreach ($pages as $page) {
$url = $page['parent'] == 0 ? $_url . $page['slug'] : $_url . implode('/', array_reverse(explode(',', get_page_url($pages, $page['parent'])))) . '/' . $page['slug'];
$sitemap .= "\t<url>\n" . "\t\t<loc>" . $url . "</loc>\n" . "\t\t<lastmod>" . $page['edited'] . "</lastmod>\n" . "\t</url>\n";
}
$sitemap .= "</urlset>";
$sitemap = $Plugins->filter('general', 'filter_sitemap', $sitemap);
echo $sitemap;
开发者ID:letsdodjango,项目名称:furasta-org,代码行数:23,代码来源:sitemap.php
示例17: build_header
function build_header($full)
{
include GSADMININCPATH . 'configuration.php';
$str = '';
// meta description
$description = get_page_meta_desc(false);
if (!empty($description)) {
$str .= '<meta name="description" content="' . $description . '" />' . "\n";
}
// meta robots
$metarobots = get_page_meta_robots(false);
if (!empty($metarobots)) {
$str .= '<meta name="robots" content="' . $metarobots . '" />' . "\n";
}
// meta keywords
$keywords = get_page_meta_keywords(false);
if (!empty($keywords)) {
$str .= '<meta name="keywords" content="' . $keywords . '" />' . "\n";
}
// canonical link
if ($full) {
$canonical = exec_filter('linkcanonical', get_page_url(true));
// @filter linkcanonical (str) rel canonical link
if (!empty($canonical)) {
$str .= '<link rel="canonical" href="' . $canonical . '" />' . "\n";
}
}
// script queue
$str .= getScripts(GSFRONT);
$str = exec_filter('theme-header', $str);
return $str;
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:32,代码来源:theme_functions.php
示例18: array
$result_list = array($rankResults);
break;
}
array_push($rank_list, $rank_result);
}
$result_array = array();
// Generate object for each result
foreach ($result_list as $result) {
$id = $result['id'];
$rank = multi_array_search($rank_list, array('id' => $id))[0] + 1;
$username = $userTools->get($result['user_id'])->username;
$image_src = $result['url'];
$date_posted = $result['date_added'];
$user_vote = $result['TotalPoints'];
$tags = explode(',', $result['tags']);
array_push($result_array, array('image' => array('id' => $id, 'url' => get_page_url("ricehalla", $CONF) . '/' . $id, 'image_src' => get_page_url("u", $CONF) . '/' . $image_src, 'rank' => $rank, 'votes' => $user_vote, 'owner' => $username, 'date_posted' => $date_posted, 'tags' => $tags)));
}
array_push($jsonArray, array('results' => $result_array));
} else {
array_push($jsonArray, array('error' => $CONF['errors']['NoImages']));
}
break;
default:
array_push($jsonArray, array('error' => $CONF['errors']['InvRequest']));
break;
}
} else {
array_push($jsonArray, array('error' => $CONF['errors']['InvRequest']));
}
break;
default:
开发者ID:KingNoosh,项目名称:Teknik,代码行数:31,代码来源:api.php
示例19: DrawFaqList
/**
* Draws FAQ list
* @param $draw
*/
public static function DrawFaqList($draw = true)
{
$output = '';
$page_url = get_page_url();
if (Modules::IsModuleInstalled('faq')) {
if (ModulesSettings::Get('faq', 'is_active') == 'yes') {
$sql = 'SELECT
fc.id as category_id,
fc.name as category_name,
fci.id as item_id,
fci.faq_question,
fci.faq_answer,
fci.priority_order
FROM ' . TABLE_FAQ_CATEGORY_ITEMS . ' fci
INNER JOIN ' . TABLE_FAQ_CATEGORIES . ' fc ON fci.category_id = fc.id
WHERE
fc.is_active = 1 AND
fci.is_active = 1
ORDER BY
fc.priority_order ASC,
fci.priority_order ASC ';
$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);
$count = 1;
$current_category = '';
$output .= '<a name="up"></a>';
$output .= '<div class="faq_questions">';
for ($i = 0; $i < $result[1]; $i++) {
if ($current_category == '') {
$current_category = $result[0][$i]['category_name'];
$output .= ($i > 0 ? '<br>' : '') . '<h3>' . $current_category . '</h3>';
} else {
if ($current_category != $result[0][$i]['category_name']) {
$current_category = $result[0][$i]['category_name'];
$output .= ($i > 0 ? '<br>' : '') . '<h3>' . $current_category . '</h3>';
}
}
$output .= '<span> • </span><a href="' . $page_url . '#faq_' . $result[0][$i]['category_id'] . '_' . $result[0][$i]['item_id'] . '">' . str_replace('\\', '', $result[0][$i]['faq_question']) . '</a><br>';
}
$output .= '</div>';
$current_category = '';
$draw_hr = true;
$count = 1;
for ($i = 0; $i < $result[1]; $i++) {
if ($current_category == '') {
$current_category = $result[0][$i]['category_name'];
$draw_hr = false;
$output .= '<br />' . draw_sub_title_bar($current_category, false);
} else {
if ($current_category != $result[0][$i]['category_name']) {
$current_category = $result[0][$i]['category_name'];
$draw_hr = false;
$output .= '<br />' . draw_sub_title_bar($current_category, false);
} else {
$draw_hr = true;
}
}
$output .= '<table width="100%" border="0" cellpadding="1" cellspacing="2">
' . ($draw_hr ? '<tr align="left" valign="top"><td colspan="2"><hr size="1" style="color:#cccccc" noshade></td></tr>' : '') . '
<tr>
<td><a name="faq_' . $result[0][$i]['category_id'] . '_' . $result[0][$i]['item_id'] . '"></a><strong>' . str_replace('\\', '', $result[0][$i]['faq_question']) . '</strong></td>
</tr>
<tr>
<td>' . str_replace('\\', '', $result[0][$i]['faq_answer']) . '</td>
</tr>
<tr><td colspan="2" align="' . Application::Get('defined_right') . '"><a href="' . $page_url . '#up">top ^</a></td></tr>
</table>';
}
}
}
if ($draw) {
echo $output;
} else {
return $output;
}
}
开发者ID:mozdial,项目名称:Directory,代码行数:79,代码来源:FaqCategories.class.php
示例20: exit
<?php
if (!defined('BASEPATH')) {
exit(__('No direct script access allowed'));
}
//Get Most Popular Posts
$popular = $this->cf_blog_model->getMostPopular(10);
if (!empty($popular)) {
?>
<ul class="most_popular">
<?php
foreach ($popular->result_array() as $v) {
?>
<li><a href="<?php
echo site_url(get_page_url($v));
?>
"><?php
echo $v['page_title'];
?>
</a></li>
<?php
}
?>
</ul>
<?php
}
开发者ID:ipopovic,项目名称:codefight-cms,代码行数:30,代码来源:blog_popular.php
注:本文中的get_page_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论