Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
adm_domstypeedit.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: adm_domstypeedit.php,v 1.6 2006/01/12 01:10:48 anarcat Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Alan Garcia
27  Purpose of file: Edit the domain types
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 if (!$admin->enabled) {
32  __("This page is restricted to authorized staff");
33  exit();
34 }
35 
36 include_once("head.php");
37 
38 $fields = array (
39  "name" => array ("request", "string", ""),
40  "description" => array ("request", "string", ""),
41  "target" => array ("request", "string", ""),
42  "entry" => array ("request", "string", ""),
43  "compatibility" => array ("request", "string", ""),
44  "enable" => array ("request", "string", ""),
45  "only_dns" => array ("request", "boolean", ""),
46  "need_dns" => array ("request", "boolean", ""),
47  "advanced" => array ("request", "boolean", ""),
48  "create_tmpdir" => array ("request", "boolean", ""),
49  "create_targetdir" => array ("request", "boolean", ""),
50 );
52 
53 
54 if (! $d=$dom->domains_type_get($name)) {
55  $error=$err->errstr();
56  echo $error;
57 } else {
58 ?>
59 
60 <h3><?php __("Edit a domain type"); ?> </h3>
61 <hr id="topbar"/>
62 <br />
63 <?php
64 if (isset($error_edit) && $error_edit) {
65  echo "<p class=\"alert alert-danger\">$error_edit</p>";
66  $error_edit="";
67 
68 } ?>
69 
70 <form action="adm_domstypedoedit.php" method="post" name="main" id="main">
71  <input type="hidden" name="name" value="<?php echo $d['name']; ?>" />
72  <table class="tedit">
73  <tr>
74  <th><?php __("Name");?></th>
75  <td><b><?php echo $d["name"]; ?></b></td>
76  </tr>
77  <tr>
78  <th><?php __("Description");?></th>
79  <td><input name="description" type="text" size="30" value="<?php echo $d['description']; ?>" /></td>
80  </tr>
81  <tr>
82  <th><?php __("Target type");?></th>
83  <td>
84  <select name="target">
85  <?php foreach ($dom->domains_type_target_values() as $k) { ?>
86  <option value="<?php echo $k ?>" <?php echo ($d['target']==$k)?"selected":"";?> ><?php echo $k;?></option>
87  <?php } ?>
88  </select>
89  </td>
90  </tr>
91  <tr>
92  <th><?php __("Entry");?></th>
93  <td><input name="entry" type="text" size="30" value="<?php echo $d['entry']; ?>" /></td>
94  </tr>
95  <tr>
96  <th><?php __("Compatibility");?><br /><small><?php __("Enter comma-separated name of other types"); ?></small></th>
97  <td><input name="compatibility" type="text" size="15" value="<?php echo $d['compatibility']; ?>" /></td>
98  </tr>
99  <tr>
100  <th><?php __("Enabled");?></th>
101  <td>
102  <select name="enable">
103  <?php foreach ($dom->domains_type_enable_values() as $k) { ?>
104  <option value="<?php echo $k ?>" <?php echo ($d['enable']==$k)?"selected":"";?> ><?php __($k);?></option>
105  <?php } ?>
106  </select>
107  </td>
108  </tr>
109  <tr>
110  <th><?php __("Do only a DNS entry");?></th>
111  <td><input name="only_dns" type="checkbox" value="1" <?php cbox($d['only_dns']); ?> /></td>
112  </tr>
113  <tr>
114  <th><?php __("Domain must have our DNS");?></th>
115  <td><input name="need_dns" type="checkbox" value="1" <?php cbox($d['need_dns']); ?> /></td>
116  </tr>
117  <tr>
118  <th><?php __("Is it an advanced option?");?></th>
119  <td><input name="advanced" type="checkbox" value="1" <?php cbox($d['advanced']); ?> /></td>
120  </tr>
121  </tr>
122  <tr>
123  <th><?php __("Create tmp directory ?");?></th>
124  <td><input name="create_tmpdir" type="checkbox" value="1" <?php cbox($d['create_tmpdir']); ?> /></td>
125  </tr>
126  </tr>
127  <tr>
128  <th><?php __("Create target directory ?");?></th>
129  <td><input name="create_targetdir" type="checkbox" value="1" <?php cbox($d['create_targetdir']); ?> /></td>
130  </tr>
131  <tr class="trbtn">
132  <td colspan="2">
133  <input type="submit" class="inb" name="submit" value="<?php __("Change this domain type"); ?>" />
134  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_domstype.php'"/>
135  </td>
136  </tr>
137 </table>
138 </form>
139 
140 <?php } ?>
141 
142 <?php include_once("foot.php"); ?>