本文整理汇总了PHP中CUrl::get_href方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrl::get_href方法的具体用法?PHP CUrl::get_href怎么用?PHP CUrl::get_href使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrl
的用法示例。
在下文中一共展示了CUrl::get_href方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetRSS
function GetRSS()
{
$this->checkValues();
$rssValue = "<?xml version=\"1.0\"?>\r\n";
$rssValue .= "<rss version=\"2.0\">\r\n";
$rssValue .= "<channel>\r\n";
$rssValue .= "<title>" . $this->channelTitle . "</title>\r\n";
$rssValue .= "<link>" . $this->channelLink . "</link>\r\n";
$rssValue .= "<description>" . $this->channelDesc . "</description>\r\n";
$rssValue .= "<image>\r\n";
$rssValue .= "<title>" . $this->imageTitle . "</title>\r\n";
$rssValue .= "<url>" . $this->imageURL . "</url>\r\n";
$rssValue .= "<link>" . $this->imageLink . "</link>\r\n";
$rssValue .= "</image>\r\n";
$sql = "SELECT * FROM page WHERE etat = 1 ORDER BY date DESC";
$res = CBdd::select($sql);
while($page = mysql_fetch_array($res))
{
$rssValue .= "<item>\r\n";
$rssValue .= "<title>" . $page['nom'] . "</title>\r\n";
$rssValue .= "<description>" . $page['description'] . "</description>\r\n";
$rssValue .= "<link>" .htmlentities(CUrl::get_href('page', $page['id'], $page['nom'])). "</link>\r\n";
$rssValue .= "</item>\r\n";
}
$rssValue .= "</channel>\r\n";
$rssValue .= "</rss>\r\n";
return $rssValue;
}
示例2: mysql_fetch_assoc
}
if($id_video_courant > 0){
$sql = "SELECT * FROM video WHERE id = " . $id_video_courant;
$current_video = CBdd::select_row($sql);
}
?>
<?php
if($nb_video > 1) {
?>
<div class="video-list">
<ul>
<?php
$i = 1;
while($video = mysql_fetch_assoc($res)) {
$link = CUrl::get_href('video', $video['id'], $video['nom']);
?>
<li class="<?php echo $id_video_courant==$video['id']?'active-video':''; ?>"><a href="<?php echo $link; ?>"><?php echo $video['nom']; ?></a></li>
<?php
$i++;
}
?>
</ul>
</div>
<?php
}
if($nb_video > 0) {
?>
<div class="video-container">
示例3: CPage
$page_courant = $page_courant_objet->get_element($id_page_courant);
if($page_courant) {
?>
<div id="titre_page">
<h1><?php echo $page_courant['nom'] ?></h1>
</div>
<div id="num_page">
<ul>
<?php
$page_objet = new CPage();
$page_liste = $page_objet->get_elements($id_sousmenu_courant);
if($page_objet->nb_elements > 1) {
$page_num = 1;
while($page_element = mysql_fetch_assoc($page_liste)) {
?>
<li><?php if ($page_element['id'] != $id_page_courant) { ?><a href="<?php echo CUrl::get_href('page', $page_element['id'], $page_element['nom'] ) ?>" title="<?php echo $page_element['nom'] ?>"><?php echo $page_num ?></a><?php } else { echo $page_num; } ?></li>
<?php $page_num++; }} ?>
</ul>
</div>
<div class="clearfloat"></div>
<div id="contenu">
<?php
$page_objet = new CPage();
$page = $page_objet->get_element($id_page_courant);
if($page) {
if(strstr($page['text'], '<!--GALERIE-->')) {
include 'diaporama.php';
// include 'galerie.php';
}
示例4: mysql_fetch_assoc
$sql = "SELECT id FROM galerie WHERE etat = 1 AND idpage = " . $id_page_courant . " ORDER BY rang LIMIT 1";
$id_galerie_courant = CBdd::select_one($sql, 'id');
}
?>
<p> </p>
<?php
if($nb_galerie > 1) {
?>
<div class="galerie-list">
<ul>
<?php
$i = 1;
while($gal = mysql_fetch_assoc($res)) {
$link = CUrl::get_href('galerie', $gal['id'], $gal['nom']);
?>
<li class="<?php echo $id_galerie_courant==$gal['id']?'active-gal':''; ?>"><a href="<?php echo $link; ?>"><?php echo $gal['nom']; ?></a></li>
<?php
$i++;
}
?>
</ul>
</div>
<?php
}
if($nb_galerie > 0) {
$sql = "SELECT * FROM galerie WHERE id = " . $id_galerie_courant;
$gal = CBdd::select_row($sql);
示例5: CMenu
<div class="conteneur">
<h2>menu principal</h2>
<?php
$menu_objet = new CMenu();
$menu_liste = $menu_objet->get_elements();
if($menu_objet->nb_elements > 0) {
?>
<ul>
<?php
while($menu_element = mysql_fetch_assoc($menu_liste)) {
?>
<li<?php if($menu_element['id'] == $id_menu_courant) echo ' class="courant"' ?>><a href="<?php echo CUrl::get_href('menu', $menu_element['id'], $menu_element['nom'] ) ?>"><?php echo $menu_element['nom'] ?></a>
<?php
$sousmenu_objet = new CSousmenu();
$sousmenu_liste = $sousmenu_objet->get_elements($menu_element['id']);
if($sousmenu_objet->nb_elements > 1) {
?>
<dl>
<?php
while($sousmenu_element = mysql_fetch_assoc($sousmenu_liste)) {
?>
<dt<?php if($sousmenu_element['id'] == $id_sousmenu_courant) echo ' class="courant"' ?>><a href="<?php echo CUrl::get_href('sousmenu', $sousmenu_element['id'], $sousmenu_element['nom'] ) ?>" title="<?php echo $sousmenu_element['nom'] ?>"><?php echo $sousmenu_element['nom'] ?></a></dt>
<?php } ?>
</dl>
<?php }?>
</li>
<?php } ?>
</ul>
<?php } ?>
</div>
</div>