ispman/ispman-web/cgi-bin/tmpl menu.tmpl,1.61,1.62
Joerg Delker <[email protected]> Mon, 29 Dec 2008 16:18:25 +0000
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30491/ispman-web/cgi-bin/tmpl
Modified Files:
menu.tmpl
Log Message:
added database menu
some reformatting
Index: menu.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/menu.tmpl,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- menu.tmpl 11 Dec 2007 01:16:06 -0000 1.61
+++ menu.tmpl 29 Dec 2008 16:18:23 -0000 1.62
@@ -1,4 +1,3 @@
-
<HTML>
<HEAD>
<TITLE>ISPMan menu</TITLE>
@@ -19,12 +18,10 @@
} else {
return false;
}
-
-
+
} else {
location=cgiurl+"?mode=menu&ispmanDomain="+domain
}
-
}
function doThis(mode,param){
@@ -32,7 +29,7 @@
if (param){
url+="&"+param;
}
-
+
top.content.location=url
}
@@ -71,20 +68,21 @@
doThis("editVhost","ispmanVhostName="+vhost)
}
}
-
+
function addVhost(){
if(vhost=prompt("Name of virtual host (without the domain name)" , "")){
doThis("createVhost","ispmanVhostName="+vhost)
}
}
function addDatabase(){
- doThis("createDatabase");
+ if(dbName=prompt("Name of database" , "")){
+ doThis("add_database_form","ispmanDBName="+dbName+"&ispmanDomain="+ispmanDomain);
+ }
}
- function editDatabase(cn){
- doThis("editDatabase", "cn="+cn);
+ function editDatabase(dbName){
+ doThis("edit_database_form", "ispmanDBName="+dbName);
}
-
-
+
//-->
</script>
@@ -171,21 +169,21 @@
$domaintype=$masters->{$master}{'ispmanDomainType'};
$text.=">$master ( $domaintype )";
if ($masters->{$master}{'ispmanDomainLocked'} &&
- $masters->{$master}{'ispmanDomainLocked'} eq "true"){
+ $masters->{$master}{'ispmanDomainLocked'} eq "true"){
$text.=" (locked) ";
}
-
+
$text.="</option>\n";
for my $replica( sort {lc($a) cmp lc($b)} keys %{$replicas->{$master}} ) {
$text.="<OPTION value='$replica'";
if ($r->param("ispmanDomain") eq $replica){
$text.= " selected ";
}
-
+
$domaintype="replica";
$text.="> $replica ($domaintype) ";
$text.="</option>\n";
- }
+ }
}
$text.="\n</select>";
@@ -193,42 +191,40 @@
if ($thisDomainType){
$text.=qq|
- <table width=100% border=0>
- <tr class="light"
- onclick="doThis('editDomain')"
- onmouseover="this.className='lightOver'; window.status='@{[_("Edit [_1]", $thisDomain)]}'"
- onmouseout="this.className='light'; window.status=''">
-
- <td><A class=menu HREF="#">Edit $thisDomain</a></td></tr>
- </table>
-
- |;
-
+<table width=100% border=0>
+ <tr class="light" onclick="doThis('editDomain')"
+ onmouseover="this.className='lightOver'; window.status='@{[_("Edit [_1]", $thisDomain)]}'"
+ onmouseout="this.className='light'; window.status=''">
+ <td><A class=menu HREF="#">Edit $thisDomain</a></td>
+ </tr>
+</table>
+|;
- if ($thisDomainType eq "primary"){
- $text.=qq|<table width=100% border=0><tr><td class=menuheader>@{[_("Manage DNS")]}</td></tr>
-
+ if ($thisDomainType eq "primary"){
+ $text.=qq|
+ <table width=100% border=0><tr><td class=menuheader>@{[_("Manage DNS")]}</td></tr>
+
<tr class="light"
onclick="doThis('editDNSsOARecords')"
onmouseover="this.className='lightOver'; window.status='@{[_("Edit SOA Records for [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td> <a class=menu href='#'>@{[_("SOA Records")]}</a></td></tr>
-
+
<tr class="light"
onclick="doThis('editDNSmXRecords')"
onmouseover="this.className='lightOver'; window.status='@{[_("Edit MX Records for [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td> <a class=menu href='#'>@{[_("MX Records")]}</a></td></tr>
-
+
<tr class="light"
onclick="doThis('editDNSnSRecords')"
onmouseover="this.className='lightOver'; window.status='@{[_("Edit NS Records for [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td> <a class=menu href='#'>@{[_("NS Records")]}</a></td></tr>
-
+
<tr class="light"
onclick="doThis('editDNSaRecords')"
onmouseover="this.className='lightOver'; window.status='@{[_("Edit A Records for [_1]", $thisDomain)]}'"
@@ -240,7 +236,7 @@
onmouseover="this.className='lightOver'; window.status='@{[_("Edit AAAA Records for [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td> <a class=menu href='#'>@{[_("AAAA Records")]}</a></td></tr>
-
+
<tr class="light"
onclick="doThis('editDNScNAMERecords')"
onmouseover="this.className='lightOver'; window.status='@{[_("Edit CNAME Records for [_1]", $thisDomain)]}'"
@@ -252,15 +248,14 @@
onmouseover="this.className='lightOver'; window.status='@{[_("Edit TXT Records for [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td> <a class=menu href='#'>@{[_("TXT Records")]}</a></td></tr>
- </table>
-
-
- |;
- }
+ </table>
+|;
+ }
- unless ($thisDomainType eq "replica"){
- $text.=qq|<table width=100% border=0><tr><form>
- <td class=menuheader>@{[_("Manage users")]} </td></tr>
+ unless ($thisDomainType eq "replica"){
+ $text.=qq|
+ <form><table width=100% border=0>
+ <tr><td class=menuheader>@{[_("Manage users")]} </td></tr>
<tr class="light"
onclick="doThis('searchUsers')"
onmouseover="this.className='lightOver'; window.status='@{[_("Search for users under [_1]", $thisDomain)]}'"
@@ -271,10 +266,10 @@
onmouseover="this.className='lightOver'; window.status='@{[_("Add a user to [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td><a class=menu href="#">@{[_("Add user")]}</a> </td></tr>
-
+
<tr>
<td>
-
+
<SELECT NAME="users" onChange="editUser(this.options[this.selectedIndex].value)">
<OPTION VALUE="">@{[_("Select user")]}</option>
|;
@@ -284,43 +279,42 @@
}
$text.=qq|</select></td></tr>|;
-
+
if ($ispman->getConf("messaging_service")){
$text.=qq|<tr class="light" onclick="doThis('notifyUsers')"
onmouseover="this.className='lightOver'; window.status='Send e-mail to all users of $thisDomain'"
onmouseout="this.className='light'; window.status=''">
<td><a class=menu href="#">Notify users</a> </td></tr>|;
}
-
+
$text.=qq|
- </form>
- </table>
+ </table></form>
|;
-
- $text.=qq|<table width=100% border=0><tr><form>
+
+ $text.=qq|<form><table width=100% border=0><tr>
<td class=menuheader>@{[_("Manage mailgroups")]} </td></tr>
<tr class="light"
onclick="doThis('createMailGroup')"
onmouseover="this.className='lightOver'; window.status='@{[_("Add a mail group to [_1]", $thisDomain)]}'"
onmouseout="this.className='light'; window.status=''">
<td><a class=menu href="#">@{[_("Add mailgroup")]}</a> </td></tr>
-
+
<tr>
<td>
-
+
<SELECT NAME="mailgroups" onChange="editMailGroup(this.options[this.selectedIndex].value)">
<OPTION VALUE="">@{[_("Select mailgroup")]}</option>
|;
for my $mailgroup(sort{lc($mailgroups->{$a}{'cn'}) cmp lc($mailgroups->{$b}{'cn'}) } keys %$mailgroups) {
$text.="<option value='$mailgroups->{$mailgroup}{'cn'}'>$mailgroups->{$mailgroup}{'cn'}</option>";
}
-
+
$text.=qq|
</select></td>
</tr>
- </form>
</table>
+ </form>
|;
$text.=qq|<form><table width=100% border=0><tr><td class=menuheader>@{[_("Manage web users")]}</td></tr>
@@ -341,8 +335,8 @@
$text.=qq|
</select></td>
</tr>
- </form>
</table>
+ </form>
|;
$text.=qq|<form><table width=100% border=0><tr><td class=menuheader>@{[_("Manage virtualhosts")]}</td></tr>
@@ -375,12 +369,12 @@
onmouseover="this.className='lightOver'; window.status='@{[_("Add a database to [_1]", $thisDomain)]}'"
onmouseout="this.className='light';window.status=''">
<td><a class=menu href="#">@{[_("Add database")]}</a> </td></tr>
-
+
<tr>
<td>
<SELECT NAME="databases" onChange="editDatabase(this.options[this.selectedIndex].value)">
<option value=''>@{[_("Select database")]}</option>
- |;
+ |;
my $databases=$ispman->getDatabases($thisDomain);
for my $db(sort keys %$databases) {
@@ -392,9 +386,9 @@
</table>
</form>
|;
-
+
}
-
+
}
$text
</perl>
------------------------------------------------------------------------------