CVS: ispman/ispman-web/cgi-bin/tmpl/vhosts add.tmpl,1.11,1.11.2.1 edit.tmpl,1.17,1.17.2.1 view.tmpl,1.6,1.6.2.1
Tarjei Huse <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts
In directory sc8-pr-cvs1:/tmp/cvs-serv30245/ispman-web/cgi-bin/tmpl/vhosts
Modified Files:
Tag: ALTVHOSTS
add.tmpl edit.tmpl view.tmpl
Log Message:
This should be everything for the ALTVHOSTbranch to be functional.
The todolist is long, but at least it's all commited now.
Index: add.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/add.tmpl,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -r1.11 -r1.11.2.1
*** add.tmpl 31 Jul 2003 00:55:09 -0000 1.11
--- add.tmpl 8 Sep 2003 16:19:18 -0000 1.11.2.1
***************
*** 81,85 ****
</tr>
<tr>
! <td valign=center>Create vhost on server</td>
<td>
<select name="webHost">
--- 81,85 ----
</tr>
<tr>
! <td valign=center>Create vhost on server</td>
<td>
<select name="webHost">
***************
*** 89,97 ****
for (@webhosts){
! $text.="<option VALUE='$_'>$_</option>";
}
if ($#webhosts<0){
! $text.="<option VALUE=''>WARNING: No members in group httphosts defined</option>";
}
--- 89,97 ----
for (@webhosts){
! $text .= "<option VALUE='$_'>$_</option>";
}
if ($#webhosts<0){
! $text .= "<option VALUE=''>WARNING: No members in group httphosts defined</option>";
}
***************
*** 164,168 ****
!
<input type=hidden name="mode" value="newVhost">
--- 164,204 ----
! <tr>
! <td>Port <br>(optional)</td>
! <td>
! <input size=5 type=text name=ispmanVhostPort value="<perl>
! if (defined $ispman->{'vhost'}->{"ispmanVhostPort"}){
! $ispman->{'vhost'}->{"ispmanVhostPort"};
! } else {
! "80";
! }
! </perl>">
! </td>
! </tr>
! <perl>
! my @hosttypes = split ' ', $ispman->getConf('ispmanVhostTypes');
!
! if ($#hosttypes > 0) {
! my $hosttype = "";
! my $hostdescriptions = "";
! for (@hosttypes) {
! $hosttype .= "<option value=\"$_\" >" . $ispman->getConf('ispmanVhostTypeN'.$_) . "</option>\n ";
! $hostdescriptions .= $ispman->getConf('ispmanVhostTypeD'.$_);
! }
!
! $vhosts .= "
! <tr valign=top>
! <td>Hosttypes:<br>(optional)</td>
! <td>
! <select name=ispmanVhostType MULTIPLE>
! $hosttype
! </select>
! $hostdescriptions
! </td>
! </tr>";
!
! $vhosts;
! }
! </perl>
<input type=hidden name="mode" value="newVhost">
Index: edit.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/edit.tmpl,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -C2 -r1.17 -r1.17.2.1
*** edit.tmpl 14 Jul 2003 17:44:21 -0000 1.17
--- edit.tmpl 8 Sep 2003 16:19:18 -0000 1.17.2.1
***************
*** 44,48 ****
if (ref $directoryOptions eq "ARRAY"){
for (@$directoryOptions){
! $selectedOptions->{$_}++;
}
} else {
--- 44,48 ----
if (ref $directoryOptions eq "ARRAY"){
for (@$directoryOptions){
! $selectedOptions->{$_}++;
}
} else {
***************
*** 195,199 ****
<tr>
<td>Max Storage Space (in MB) </td>
! <td>
<input size=4 type=text name=FTPQuotaMBytes value="<perl>$ispman->{'vhost'}{'FTPQuotaMBytes'}</perl>">
</td>
--- 195,199 ----
<tr>
<td>Max Storage Space (in MB) </td>
! <td>
<input size=4 type=text name=FTPQuotaMBytes value="<perl>$ispman->{'vhost'}{'FTPQuotaMBytes'}</perl>">
</td>
***************
*** 201,216 ****
<tr>
<td>Password </td>
! <td>
<input size=35 type=text name=userPassword value="<perl> $ispman->{'vhost'}->{"userPassword"}</perl>">
</td>
</tr>
<input type=hidden name=ispmanVhostName value="<perl>$ispman->{'vhost'}->{'ispmanVhostName'}</perl>">
<input type=hidden name=ispmanDomain value="<perl>$ispman->{'vhost'}->{'ispmanDomain'}</perl>">
<input type=hidden name="mode" value="updateVhost">
<input type=hidden name="dn" value="<perl>$r->param("dn")</perl>">
! <tr><td align=left colspan=2>
<input type=button class="button" onClick="document.forms['VhostsForm'].reset()" value="Reset">
<input type=button class="button" onClick="Delete()" value="Delete">
--- 201,283 ----
<tr>
<td>Password </td>
! <td>
<input size=35 type=text name=userPassword value="<perl> $ispman->{'vhost'}->{"userPassword"}</perl>">
</td>
</tr>
+ <tr>
+ <td>Host port </td>
+ <td><perl>
+ if (defined $ispman->{'vhost'}->{"ispmanVhostPort"}){
+ $ispman->{'vhost'}->{"ispmanVhostPort"};
+ } else {
+ "80";
+ $ispman->{'vhost'}->{"ispmanVhostPort"} =80;
+ }
+ </perl>
+ </td>
+ </tr>
+
+ <tr>
+ <td>Host profiles:</td>
+ </tr>
+ <perl>
+ my @hosttypes = split ' ', $ispman->getConf('ispmanVhostTypes');
+ my $setOptions=$ispman->{'vhost'}->{"ispmanVhostType"};
+ my $selectedOptions;
+ if (ref $setOptions eq "ARRAY"){
+ for (@$setOptions){
+ $selectedOptions->{$_}++;
+ }
+ } else {
+ $selectedOptions->{$setOptions}++;
+ }
+ if ($#hosttypes > 0) {
+ my $hosttype = "";
+ my $hostdescriptions = "";
+ my $setHostTypes =""; # Hosts with portnumber change
+ my $selected = "";
+ for (@hosttypes) {
+ $selected = "";
+ if ($selectedOptions->{$_}) { $selected = "SELECTED"; }
+ # since it it impossible to modify a hosts port -> if you need to do that, delete and recreate the host.
+ if ($ispman->{'vhost'}->{"ispmanVhostPort"} == $ispman->getConf('ispmanVhostTypeP' . $_)) {
+ $hosttype .= "<option value=\"$_\" $selected>" . $ispman->getConf('ispmanVhostTypeN'.$_) . $ispman->getConf('ispmanVhostTypeP' . $_) . "</option>\n ";
+ } else {
+ $setHostTypes = "<br><b>" .$ispman->getConf('ispmanVhostTypeN'.$_). "</b>";
+ }
+ $hostdescriptions .= $ispman->getConf('ispmanVhostTypeD'.$_);
+ }
+ $vhosts .= "\n<tr valign=top>\n\n<td>Hosttypes:<br>(optional)</td>\n
+ <td><B>Set hosttypes (you may only set these when creating the host)</b><br>
+ $setHostTypes
+ <hr>";
+
+ if (!$hosttype) {
+ $vhosts .= "No chanagable hosttypes defined<br>";
+ } else {
+ $vhosts .= "<select name=ispmanVhostType MULTIPLE>\n$hosttype\n </select><hr>";
+ }
+
+ $vhosts.="$hostdescriptions\n\t</td>\n </tr>";
+
+ $vhosts;
+ }
+ </perl>
+
+ <input type=hidden name=ispmanVhostOldType value ="<perl>my $oldOptions = $ispman->{'vhost'}->{"ispmanVhostType"};
+ if (ref $oldOptions eq "ARRAY") {
+ join(' ',@{$ispman->{'vhost'}->{"ispmanVhostType"}});
+ } else {
+ $oldOptions;
+ }
+ </perl>">
<input type=hidden name=ispmanVhostName value="<perl>$ispman->{'vhost'}->{'ispmanVhostName'}</perl>">
<input type=hidden name=ispmanDomain value="<perl>$ispman->{'vhost'}->{'ispmanDomain'}</perl>">
<input type=hidden name="mode" value="updateVhost">
<input type=hidden name="dn" value="<perl>$r->param("dn")</perl>">
! <tr><td align=left colspan=2>
<input type=button class="button" onClick="document.forms['VhostsForm'].reset()" value="Reset">
<input type=button class="button" onClick="Delete()" value="Delete">
***************
*** 222,226 ****
</td></tr>
</form></table>
!
--- 289,293 ----
</td></tr>
</form></table>
!
Index: view.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/view.tmpl,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** view.tmpl 28 Apr 2003 14:47:28 -0000 1.6
--- view.tmpl 8 Sep 2003 16:19:18 -0000 1.6.2.1
***************
*** 98,101 ****
--- 98,108 ----
</tr>
+ <tr class=line0>
+ <td valign=top>Server port:<br>(otional)</td>
+ <td colspan=2>
+ <perl>$ispman->{'vhost'}{'ispmanVhostPort'}</perl>
+ </td>
+ </tr>
+
</table>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf