//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Pierre LEMMET 2005
// Web: http://ocsinventory.sourceforge.net
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
//Modified on 9/30/2005
include ('fichierConf.class.php');
include('req.class.php');
if($_GET["suppAcc"]) {
@mysql_query("ALTER TABLE accountinfo DROP ".$_GET["suppAcc"], $_SESSION["writeServer"]);
unset($_SESSION["availFieldList"], $_SESSION["currentFieldList"], $_SESSION["optCol"]);
echo "
". $_GET["suppAcc"] ." ".$l->g(226)."
";
}
if($_POST["nom"])
{
unset($_SESSION["availFieldList"], $_SESSION["currentFieldList"], $_SESSION["optCol"]);
switch($_POST["type"]) {
case $l->g(229): $suff = "VARCHAR(255)"; break;
case $l->g(230): $suff = "INT"; break;
case $l->g(231): $suff = "REAL"; break;
case $l->g(232): $suff = "DATE"; break;
}
$queryAccAddN = "ALTER TABLE accountinfo ADD ".$_POST["nom"]." $suff";
if(mysql_query($queryAccAddN, $_SESSION["writeServer"]))
echo "
". $_POST["nom"] ." ".$l->g(234)."
";
else
echo "
".$l->g(259)."
";
}//fin if
?>
printEnTete($l->g(56));
echo "
";
printEnTete($l->g(233));
$reqAc = mysql_query("SHOW COLUMNS FROM accountinfo", $_SESSION["readServer"]) or die(mysql_error($_SESSION["readServer"]));
echo "
";
echo "".$l->g(49)." | ".$l->g(66)." |
";
while($colname=mysql_fetch_array($reqAc)) {
if( $colname["Field"] != "DEVICEID" && $colname["Field"] != TAG_NAME && $colname["Field"] != "HARDWARE_ID" ) {
$x++;
echo ""; // on alterne les couleurs de ligne
echo "".$colname["Field"]." | ".$colname["Type"]." |
|
";
}
}
echo "
";
?>