[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-ocs/sources/www/ -> label.php (source)

   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 7/7/2005
  12  printEntete($l->g(263));
  13  
  14  if( $_POST["newlabel"]!="" && str_replace(" ", "", $_POST["newlabel"] )!="" ) {
  15      $_POST["newlabel"] = str_replace(array("\t","\n","\r"), array("","",""), $_POST["newlabel"] );
  16      @mysql_query("DELETE FROM deploy WHERE name='label'");
  17      $queryL = "INSERT INTO deploy VALUES('label','".$_POST["newlabel"]."');";
  18      mysql_query($queryL) or die(mysql_error());
  19      echo "<br><center><font color=green><b>".$l->g(260)."</b></font></center>";
  20  }
  21  else if(isset($_POST["newlabel"])) {
  22      @mysql_query("DELETE FROM deploy WHERE name='label'");
  23      echo "<br><center><font color=green><b>".$l->g(261)."</b></font></center>";
  24  }
  25  
  26  $reqL="SELECT content FROM deploy WHERE name='label'";
  27  $resL=mysql_query($reqL) or die(mysql_error());
  28  $con = mysql_fetch_row($resL);
  29  
  30  if($con[0]) {
  31      //echo "<br><center><FONT FACE='tahoma' SIZE=2 color='green'><b>Label actuel: \"".$con[0]."\"</b></font></center>";
  32  }
  33  else {
  34      if(!isset($_POST["newlabel"]))
  35          echo "<br><center><FONT FACE='tahoma' SIZE=2 color='green'><b>".$l->g(264)."</b></font></center>";
  36  }
  37  $con[0] = stripslashes($con[0]);
  38  ?><br>
  39  <center><b><? echo $l->g(262);?>:</b>
  40  <form name='lab' action='index.php?multi=12' method='post'>
  41      <textarea name='newlabel'><?=$con[0]?></textarea>
  42      <input name='sublabel' type='submit' value='envoyer'>
  43  </form>
  44  </center>


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1