Go to the documentation of this file.00001 <?php
00002
00003
00004
00005 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00006 require_once ("class_database.php");
00007 require_once 'class_user.php';
00008 $cn=new Database($_GET['gDossier']);
00009
00010
00011 if ( isset($_REQUEST['pa_id']) )
00012 {
00013 $res=$cn->exec_sql("select po_name,po_description from poste_analytique where pa_id=$1 ~* and (po_description ~* $2 or po_name ~* $3 order by po_id limit 12",
00014 array($_REQUEST['pa_id'],$_POST['anccard'],$_POST['anccard']));
00015 }
00016 else
00017 {
00018 $res=$cn->exec_sql("select po_name,po_description from poste_analytique where po_description ~* $1 or po_name ~* $2 order by po_id limit 12 ",
00019 array($_POST['anccard'],$_POST['anccard']));
00020 }
00021 $nb=Database::num_row($res);
00022 echo "<ul>";
00023 for ($i = 0;$i< $nb;$i++)
00024 {
00025 $row=Database::fetch_array($res,$i);
00026 echo "<li>";
00027 echo $row['po_name'];
00028 echo '<span class="informal"> '.$row['po_description'].'</span></li>';
00029 }
00030 echo "</ul>";
00031 ?>