Location: PHPKode > projects > PhpPrintAdmin (lprng version) > printadmin/action_mod_one.php
 <?


$needed_groups = array("admin");
 
include "config.php";

check_auth_page($userinfo["user_type"], $needed_groups);





if (($runme == "yes") && ($modify_ready="yes") && (isset($printerID)) && (isset($printer_name)) && (isset($printer_addr)))
{
  
  $printers = new printerDB();

  /// compose array to pass to $printers->modPrinter()

  $the_printer = array('printerID' => $printerID,
		       'name' => $printer_name,
		       'ifhp_model' => $ifhp_model,
		       'ipaddr' => $printer_addr,
		       'local_server' => $local_server,
		       'filtered' => $filtered,
		       'general_type' => $general_type);

  ///var_dump($the_printer);

  $mod_results = $printers->updatePrinter($the_printer);
  $log->makelog("modprin","Modified printer printerID: $printerID, printer_name: $printer_name",$userinfo["username"]);


  


}
else
{
  $mod_results = "You're missing some data. Try again!<br>\n";


}

?>
<title>phpPrintAdmin</title>
<link rel="stylesheet" href="conf/printadmin.css" type="text/css">

<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF" >
<table width="81%" height="544">
  <tr align="left" valign="top"> 
    <td width="23%" height="60"> <img src="images/ppa_logo.gif" width="162" height="60"></td>
    <td width="2%" height="60" align="right" class="regtext">&nbsp;</td>
    <td width="75%" height="60" align="right" class="regtext" colspan="2"> 
      <?echo `/bin/date`;?>
      <br>
      <?echo "Logged in as <b>$PHP_AUTH_USER</b>";?>
    </td>
  </tr>
  <tr align="left" valign="top"> 
    <td width="23%" height="24">&nbsp;</td>
    <td width="2%" height="24"></td>
    <td width="75%" height="24" colspan="2"></td>
  </tr>
  <tr align="left" valign="top"> 
    <td height="448" bgcolor="#FFCC66" rowspan="3" width="23%"> 
      <!-- begin menu -->
      <? include "conf/menu.php"; ?>
      <!-- end menu -->
    </td>
    <td height="396" width="2%" rowspan="2">&nbsp;</td>
    <td height="396" width="38%" rowspan="2"> 
      <p class="regtextbold">Modify a Printer</p>
 
    <? echo $mod_results; ?>
</td>
    <td height="88" width="37%" valign="bottom"> 
     &nbsp;</td>
  </tr>
  <tr align="left" valign="top"> 
    <td height="304" width="37%"> 
      

&nbsp;</td>
      
  </tr>
  <tr align="left" valign="top">
    <td height="48" align="right" class="regtext" width="2%">&nbsp;</td>
    <td height="48" align="right" class="regtext" width="75%" colspan="2"> This software is 
      distributed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU 
      General Public License</a><br>
      contact: <a href="mailto:hide@address.com">hide@address.com</a></td>
  </tr>
</table>
</form>
Return current item: PhpPrintAdmin (lprng version)