Пример #1
0
	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
0
}

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
0
$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
0
	$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>&nbsp;</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
0
  <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>