File: setup-templates-edit.php3

package info (click to toggle)
irm 1.0.3-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 816 kB
  • ctags: 753
  • sloc: php: 3,440; sh: 346; makefile: 40
file content (136 lines) | stat: -rw-r--r-- 6,221 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?
#    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.
#
#    $Id: setup-templates-edit.php3,v 1.7 2000/05/04 01:30:37 atrus Exp $
#
################################################################################
#                                  CHANGELOG                                   #
################################################################################
#  7/22/99 - Keith Schoenefeld:	Cleaned up code, converted all IF(): to if(){. #
################################################################################

include("../irm.inc");

AuthCheck("admin");
$db = new DB;

commonHeader("IRM Setup - Templates Editor");


$query = "SELECT * FROM templates WHERE (ID = $ID)";
$result = $db->query($query);
$ID = $db->result($result, 0, "ID");
$templname = $db->result($result, 0, "templname");
$name = $db->result($result, 0, "name");
$type = $db->result($result, 0, "type");
$os = $db->result($result, 0, "os");
$osver = $db->result($result, 0, "osver");
$processor = $db->result($result, 0, "processor");
$processor_speed = $db->result($result, 0, "processor_speed");
$location = $db->result($result, 0, "location");
$serial = $db->result($result, 0, "serial");
$otherserial = $db->result($result, 0, "otherserial");
$ramtype = $db->result($result, 0, "ramtype");
$ram = $db->result($result, 0, "ram");
$network = $db->result($result, 0, "network");
$ip = $db->result($result, 0, "ip");
$mac = $db->result($result, 0, "mac");
$hdspace = $db->result($result, 0, "hdspace");
$comments = $db->result($result, 0, "comments");
$flags_server = $db->result($result, 0, "flags_server");
$new_date = date("Y-m-d H:i:s");
$iface = $db->result($result, 0, "iface");

PRINT "Use this form to edit template \"$templname\".  
		<a href=setup-templates.php3>Back to Templates</a><br>";
PRINT "<table width=100% border=1 noshade><form method=post 
		action=setup-templates-update.php3><tr bgcolor=#CCCCCC>
		<td colspan=2><font face=\"Arial, Helvetica\">";
$new_date = date("Y-m-d H:i:s");
PRINT "<strong>Editing Template <input type=hidden name=ID value=\"$ID\">
		<input type=text name=templname value=\"$templname\" 
		size=40></strong>";

PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">Name:<br>
		<input type=text name=name value=\"$name\" size=24></font>
		</td><td><font face=\"Arial, Helvetica\">Type:<br>";
Dropdown_value("dropdown_type", "type", $type);
PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">Location:<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:
		<br><input type=text size=5 name=osver value=\"$osver\">
		</font></td><td><font face=\"Arial, Helvetica\">Processor:<br>";
Dropdown_value("dropdown_processor", "processor", $processor);

PRINT "</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">Processor 
		Speed:<br><input type=text name=processor_speed size=4 
		value=\"$processor_speed\"></font></td><td><font face=\"Arial, 
		Helvetica\">Serial Number:<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:<br><input type=text size=25 name=otherserial 
		value=\"$otherserial\"></font></td><td><font face=\"Arial, 
		Helvetica\">Hard Drive Space (in gigabytes):<br>
		<input type=text name=hdspace size=5 value=\"$hdspace\">
		</font></td></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><font face=\"Arial, Helvetica\">RAM Type:<br>";
Dropdown_value("dropdown_ram", "ramtype", $ramtype);
PRINT "</font></td><td><font face=\"Arial, Helvetica\">RAM Amount (in MB):
		<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:<br>";
Dropdown_value("dropdown_network", "network", $network);
PRINT "</font></td><td><font face=\"Arial, Helvetica\">IP Address:<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:<br><input type=text name=mac 
		value=\"$mac\"></font></td><td>Comments:<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:<br><input type=text name=contact size=20 
		value=\"$contact\"></font></td><td><font face=\"Arial, 
		Helvetica\">Contact Number:<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: ";
Dropdown_value("dropdown_iface", "iface", $iface);
PRINT "</td></tr>"; 
  PRINT "<tr bgcolor=#DDDDDD><td colspan=2><font face=\"Arial, Helvetica\">
  		Flags: ";
  if ($flags_server == 1) {
  	PRINT "<input type=checkbox name=flags_server value=yes checked>";
  } else {
  	PRINT "<input type=checkbox name=flags_server value=yes>";
  }

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

PRINT "<tr bgcolor=#CCCCCC><td><input type=submit value=Update></td>
		<td><input type=Reset value=Reset></form></td></tr></table>";
PRINT "<br>";
templcompsoftShow($ID);
PRINT "<br>";	
?>