Exemplo n.º 1
0
        <table  style="width: 875px; margin-left: 1px;" border="1" cellpadding="0" cellspacing="0">
          <tr align="center">
            <th align="left">Nom</th>
            <th align="left">Fichier</th>
            <th>Page</th>
            <th>Rang</th>            
            <th>Publi&eacute;</th>
            <th>Modif</th>
            <th title="suppr"> Suppr </th>
            <th>Date d'ajout </th>
          </tr>
          <?php
		  $i = 0;
		 	while ($video = mysql_fetch_array($r_video)) {	
		 		
		 		$tpage  = new CTablePage(array('id'=>$video['id_page']));
				$page   = $tpage->select_row();
		 		
		 		$actif_btn = CTableUser::is_admin($_SESSION['idmbr'])?1:0;
	      ?>          
          <tr>
            <td><?php echo $video['nom'] ?></td>
            <td><?php echo $video['fichier'] ?></td>
            <td align="center"><?php echo $page['nom'] ?></td>
            <td><?php echo CHtmlSession::get_rang('video', $video['id'], $video['id_page']) ?></td>            
            <td><?php echo CHtmlSession::get_etat($video['id'], $video['etat'], null) ?></td>
            <td align="center"><?php echo CHtml::get_editbutton($video['id'], $actif_btn) ?></td>
            <td align="center"><?php echo CHtml::get_delbutton($a, $video['id'], $id, $actif_btn) ?></td>
            <td align="center"><?php echo CDate::formate_date($video['date']) ?></td>
          </tr>
          <?php } ?>
Exemplo n.º 2
0
	 */
	
	$page_faq = CTablePage::select('*', 'text LIKE \'%<!--FAQ-->%\'');
	
	if(!$page_faq || !mysql_num_rows($page_faq)) {

		// Get first article
		
		$art = CBdd::select_row('SELECT id FROM article WHERE 1 ORDER BY id LIMIT 0,1');
		
		$tpag = new CTablePage(
			array(
				'nom'=>'FAQ', 
				'etat'=>$etat, 
				'idart'=>$art['id'], 
				'text'=>'<!--FAQ-->', 
				'head'=>'', 
				'description'=>'', 
				'keywords'=>'', 
				'send'=>0)
			);
		$tpag->insert();
	}
	
	$a = 0;
	break;
	
case 5 : // Modifier 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$tfaq 		= new CTableFaq(array('id'=>$id));
	$faq  		= $tfaq->select_row();
Exemplo n.º 3
0
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}
	if (empty($idart)) {
		$error_type = 2;
		$error_signe['idart'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tpag = new CTablePage(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat, 'idart'=>$idart, 'text'=>CFunction::addslashes($text), 'head'=>CFunction::addslashes($head), 'description'=>CFunction::addslashes($description), 'keywords'=>CFunction::addslashes($keywords), 'send'=>$send));
	$tpag->update();
	$msginfo = "page bien modifiée";
	$a = 0;
	break;
	
case 6 : // Filtrer 1
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	$_SESSION['idart'] = 0;
	break;
	
case 66 : // Filtrer 2
	if(!empty($_GET['idart'])) $idart = $_GET['idart'];
	$_SESSION['idart'] = $idart;
	break;