<?php
#    IRM - The Information Resource Manager
#    Copyright (C) 1999 Yann Ramin
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License (in file COPYING) for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
################################################################################

include("../include/irm.inc");
require_once 'include/i18n.php';

AuthCheck("tech");

commonHeader(_("Setup") . " - " . _("Templates Add Form"));

if ($add == 1) 
{
  PRINT "<h3>";
  __("Template Added Successfuly");
  PRINT "</h3>";
  PRINT "<hr noshade>";
}


__("Use this form to add a template.");
PRINT '<a href="'.Config::AbsLoc('users/setup-templates.php').'">';
__("Back to Templates");
PRINT '</a><br>';
PRINT '<table width=100% border=1 noshade><form method=post 
	action="'.Config::AbsLoc('users/setup-templates-add.php').'"><tr bgcolor=#CCCCCC>
	<td colspan=2><font face="Arial, Helvetica">';
$new_date = date("Y-m-d H:i:s");
PRINT "<strong>";
__("Add Template");
PRINT "<input type=text name=templname 
		value=\"$templname\" size=40></strong>";
PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Name:");
PRINT "<br><input type=text name=name value=\"$name\" 
		size=24></font></td><td><font face=\"Arial, Helvetica\">";
__("Type");
PRINT ":<br>";

Dropdown_value("dropdown_type", "type", $type);

PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Location");
PRINT ":<br>";
Dropdown_value("dropdown_locations", "location", $location);
PRINT "</font></td><td><font face=\"Arial, Helvetica\">OS:<br>";
Dropdown_value("dropdown_os", "os", $os);
PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("OS Version");
PRINT ":<br><input type=text size=5 name=osver 
		value=\"$osver\"></font></td><td><font face=\"Arial, 
		Helvetica\">";
__("Processor");
PRINT ":<br>";
Dropdown_value("dropdown_processor", "processor", $processor);
PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Processor Speed");
PRINT ":<br><input type=text name=processor_speed 
		size=4 value=\"$processor_speed\"></font></td><td><font 
		face=\"Arial, Helvetica\">";
__("Serial Number");
PRINT ":<br><input type=text name=serial size=35 value=\"$serial\">
		</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Other Serial Number");
PRINT ":<br><input type=text size=25 name=otherserial value=\"$otherserial\"></font></td><td> <font face=\"Arial, Helvetica\">";
__("Hard Drive Space (in gigabytes)");
PRINT ":<br><input type=text name=hdspace size=5 value=\"$hdspace\"></font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("RAM Type");
PRINT ":<br>";
Dropdown_value("dropdown_ram", "ramtype", $ramtype);
PRINT "</font></td><td><font face=\"Arial, Helvetica\">";
__("RAM Amount (in MB)");
PRINT ":<br><input type=text name=ram value=\"$ram\" size=5> </font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Network Card Brand/Type");
PRINT ":<br>";
Dropdown_value("dropdown_network", "network", $network);
PRINT "</font></td><td><font face=\"Arial, Helvetica\">";
__("IP Address");
PRINT ":<br> <input type=text name=ip value=\"$ip\" size=16></font> </td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("MAC/Network Address");
PRINT ":<br><input type=text name=mac value=\"$mac\"></font></td><td>";
__("Comments");
PRINT ":<br><textarea cols=20 rows=5 name=comments wrap=soft>$comments</textarea> </font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">";
__("Contact Person");
PRINT ":<br><input type=text name=contact size=20 value=\"$contact\"></font></td><td><font face=\"Arial, Helvetica\">";
__("Contact Number");
PRINT ":<br><input type=text name=contact_num value=\"$contact_num\"></font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td colspan=2><font face=\"Arial, Helvetica\">";
__("Network Interface");
PRINT ":<br>";
Dropdown("dropdown_iface", "iface");
PRINT "</td></tr>";
  PRINT "<tr bgcolor=#DDDDDD><td colspan=2><font face=\"Arial, Helvetica\">";
__("Flags");
	PRINT ":<br>";
  if ($flags_server == 1) {
  	PRINT "<input type=checkbox name=flags_server value=yes checked>";
  } else {
  	PRINT "<input type=checkbox name=flags_server value=yes>";
  }

  __("Server (constantly running)");
  PRINT "</font></td></tr>";

PRINT "<tr bgcolor=#DDDDDD><td colspan=2><font face=\"Arial, Helvetica\">";
__("Flags");
PRINT ":<br>";
	  if ($flags_surplus == 1) {
          PRINT "<input type=checkbox name=flags_surplus value=yes checked>";
    } else {
           PRINT "<input type=checkbox name=flags_surplus value=yes>";
     }
  __("Surplus");
  PRINT "</font></td></tr>";
					
PRINT "<tr bgcolor=#CCCCCC><td><input type=submit value=Add></td><td>
		<input type=Reset value=Reset></form></td></tr></table>";
PRINT "<br>";
__("If you wish to add software to this template, you must do so by editing it.");
PRINT "<br>";
commonFooter();
