当前位置: 首页>>代码示例>>PHP>>正文


PHP get_page_url函数代码示例

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


在下文中一共展示了get_page_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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">&nbsp;</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 <info@apphp.com>
* @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


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