[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 header("Content-type:text/xml"); 3 require_once ('config.php'); 4 print("<?xml version=\"1.0\"?>"); 5 $id = $_GET["id"]; 6 ?> 7 <details id="<?=$id?>"> 8 <?php 9 $link = mysql_pconnect($mysql_host, $mysql_user, $mysql_pasw); 10 mysql_select_db ($mysql_db); 11 12 loadDetails($id); 13 14 mysql_close($link); 15 16 //creates xml show item details 17 function loadDetails($id){ 18 $sql = "Select item_nm,item_parent_id,item_desc from Tree where item_id=$id"; 19 $res = mysql_query($sql); 20 if($res){ 21 while($row=mysql_fetch_array($res)){ 22 print("<name>".$row['item_nm']."</name>"); 23 print("<parent_id>".$row['item_parent_id']."</parent_id>"); 24 print("<desc>".$row['item_desc']."</desc>"); 25 } 26 27 }else{ 28 echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>"; 29 } 30 } 31 ?> 32 </details>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |