[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <? 2 //==================================================================================== 3 // OCS INVENTORY REPORTS 4 // Copyleft Pierre LEMMET 2005 5 // Web: http://ocsinventory.sourceforge.net 6 // 7 // This code is open source and may be copied and modified as long as the source 8 // code is always made freely available. 9 // Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt 10 //==================================================================================== 11 //Modified on 9/30/2005 12 include ('fichierConf.class.php'); 13 14 include ('req.class.php'); 15 if($_GET["suppAcc"]) { 16 @mysql_query("ALTER TABLE accountinfo DROP ".$_GET["suppAcc"], $_SESSION["writeServer"]); 17 unset($_SESSION["availFieldList"], $_SESSION["currentFieldList"], $_SESSION["optCol"]); 18 echo "<br><br><center><font face='Verdana' size=-1 color='red'><b>". $_GET["suppAcc"] ."</b> ".$l->g(226)." </font></center><br>"; 19 } 20 21 if($_POST["nom"]) 22 { 23 unset($_SESSION["availFieldList"], $_SESSION["currentFieldList"], $_SESSION["optCol"]); 24 switch($_POST["type"]) { 25 case $l->g(229): $suff = "VARCHAR(255)"; break; 26 case $l->g(230): $suff = "INT"; break; 27 case $l->g(231): $suff = "REAL"; break; 28 case $l->g(232): $suff = "DATE"; break; 29 } 30 31 $queryAccAddN = "ALTER TABLE accountinfo ADD ".$_POST["nom"]." $suff"; 32 if(mysql_query($queryAccAddN, $_SESSION["writeServer"])) 33 echo "<br><br><center><font face='Verdana' size=-1 color='green'><b>". $_POST["nom"] ."</b> ".$l->g(234)." </font></center><br>"; 34 else 35 echo "<br><br><center><font face='Verdana' size=-1 color='red'><b>".$l->g(259)."</b></font></center><br>"; 36 }//fin if 37 ?> 38 <script language=javascript> 39 function confirme(did) 40 { 41 if(confirm("<?echo $l->g(227)?> "+did+" ?")) 42 window.location="index.php?multi=<?=$_GET["multi"]?>&c=<?=($_SESSION["c"]?$_GET["c"]:2)?>&a=<?=$_GET["a"]?>&page=<?=$_GET["page"]?>&suppAcc="+did; 43 } 44 </script> 45 <? 46 printEnTete($l->g(56)); 47 echo " 48 <br> 49 <form name='ajouter_reg' method='POST' action='index.php?multi=9'> 50 <center> 51 <table width='60%'> 52 <tr> 53 <td align='right' width='50%'> 54 <font face='Verdana' size='-1'>".$l->g(228)." : </font> 55 </td> 56 <td width='50%' align='left'><input size=40 name='nom'> 57 </td> 58 </tr> 59 <tr> 60 <td align=center> 61 <font face='Verdana' size='-1'>".$l->g(66).":</font> 62 </td> 63 <td> 64 <select name='type'> 65 <option>".$l->g(229)."</option> 66 <option>".$l->g(230)."</option> 67 <option>".$l->g(231)."</option> 68 <option>".$l->g(232)."</option> 69 </select> 70 </td> 71 </tr> 72 <tr><td> </td></tr> 73 <tr> 74 <td colspan='2' align='center'> 75 <input class='bouton' name='enre' type='submit' value=".$l->g(114)."> 76 </td> 77 </tr> 78 79 </table></center></form><br> 80 "; 81 printEnTete($l->g(233)); 82 $reqAc = mysql_query("SHOW COLUMNS FROM accountinfo", $_SESSION["readServer"]) or die(mysql_error($_SESSION["readServer"])); 83 echo "<br><table BORDER='0' WIDTH = '50%' ALIGN = 'Center' CELLPADDING='0' BGCOLOR='#C7D9F5' BORDERCOLOR='#9894B5'>"; 84 echo "<tr><td align='center'><b>".$l->g(49)."</b></font></td><td align='center'><b>".$l->g(66)."</b></font></td></tr>"; 85 while($colname=mysql_fetch_array($reqAc)) { 86 if( $colname["Field"] != "DEVICEID" && $colname["Field"] != TAG_NAME && $colname["Field"] != "HARDWARE_ID" ) { 87 $x++; 88 echo "<TR height=20px bgcolor='". ($x%2==0 ? "#FFFFFF" : "#F2F2F2") ."'>"; // on alterne les couleurs de ligne 89 echo "<td align=center>".$colname["Field"]."</font></td><td align=center>".$colname["Type"]."</font></td><td align=center> 90 <a href=# OnClick='confirme(\"".$colname["Field"]."\");'><img src=image/supp.png></a></td></tr>"; 91 } 92 } 93 echo "</table><br>"; 94 95 ?> 96
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |