Пример #1
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 } ?>
        </table>
Пример #2
0
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 4;
		break;
	}
	$tpag = new CTablePage(array('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->insert();
	$msginfo = "page bien ajoutée";
	$a = 0;
	break;
	
case 5 : // Modifier 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$tpag  = new CTablePage(array('id'=>$id));
	$pag   = $tpag->select_row();
	$nom   = $pag['nom'];
	$etat  = $pag['etat'];
	$idart = $pag['idart'];
	$text  = $pag['text'];
	$head  = $pag['head'];
	$send  = $pag['send'];
	$description  = $pag['description'];
	$keywords  = $pag['keywords'];
	$idcat = CBdd::select_one("SELECT idcat FROM article WHERE id = $idart", "idcat");
	break;
		
case 55 : // Modifier 2
	if(!empty($_POST['id'])) 			$id 		= $_POST['id'];
	if(!empty($_POST['nom'])) 			$nom 		= trim($_POST['nom']);
	if(!empty($_POST['etat'])) 			$etat 		= $_POST['etat'];