ispman/ispman-web/cgi-bin/tmpl/vhosts edit_header.tmpl,1.4,1.4.8.1

Joerg Delker <[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.sourceforge.net:/tmp/cvs-serv11516/ispman-web/cgi-bin/tmpl/vhosts

Modified Files:
      Tag: rel_1_1-bugfixes
	edit_header.tmpl 
Log Message:
fixes bug [ 917411 ] web alias delete doesn't work

Index: edit_header.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/edit_header.tmpl,v
retrieving revision 1.4
retrieving revision 1.4.8.1
diff -u -d -r1.4 -r1.4.8.1
--- edit_header.tmpl	12 Jun 2003 17:47:38 -0000	1.4
+++ edit_header.tmpl	16 Apr 2004 21:39:08 -0000	1.4.8.1
@@ -1,4 +1,5 @@
-<script>
+<script type="text/javascript" language="JavaScript">
+<!--
         function Delete(){
                 if (confirm("Are you sure you want to permanently delete this virtualhost?")) 
                 self.location="<perl>$r->url</perl>?mode=deleteVhost&ispmanDomain=<perl>$r->param("ispmanDomain")</perl>&ispmanVhostName=<perl>$r->param("ispmanVhostName")</perl>";
@@ -16,19 +17,61 @@
                 self.location="<perl>$r->url</perl>?mode=deleteRedirect&ispmanDomain="+domain+"&ispmanVhostName="+vhost+"&ispmanVhostRedirectURL="+url;
         }
   
-        function gotoSubSection(section){
+        function deleteAlias(domain,vhost,alias){
+                self.location="<perl>$r->url</perl>?mode=deleteAlias&ispmanDomain="+domain+"&ispmanVhostName="+vhost+"&ispmanVhostServerAlias="+alias";
+        }
+        
+	function gotoSubSection(section){
                 self.location="<perl>$r->url</perl>?mode=editVhost&ispmanDomain=<perl>$r->param("ispmanDomain")</perl>&ispmanVhostName=<perl>$r->param("ispmanVhostName")</perl>&section="+section;
         }
+
+        function check_input(){
+	    homedir = document.addvhost.homeDirectory.value;
+	    docroot = document.addvhost.ispmanVhostDocumentRoot.value;
+	    scriptdir = document.addvhost.ispmanVhostScriptDir.value;
+	    logdir = document.addvhost.ispmanVhostLogdir.value;
+	    statdir = document.addvhost.ispmanVhostStatdir.value;
+	    
+	    rc = true;
+	    
+	    if (homedir==""){
+		alert('<perl>_("vhost homedirectory is empty!")</perl>');
+		rc = false;
+	    }
+	    
+	    if (docroot==""){
+		alert('<perl>_("DocumentRoot is empty")</perl>');
+		rc = false;
+	    }
+	    
+	    if (scriptdir==""){
+		alert('<perl>_("ScriptDirectory is empty")</perl>');
+		rc = false;
+	    }
+	    
+	    if (logdir==""){
+		alert('<perl>_("LogDirectory is empty")</perl>');
+		rc = false;
+	    }
+	    
+	    if (statdir==""){
+		alert('<perl>_("StatDirectory is empty")</perl>');
+		rc = false;
+	    }
+
+	    return rc;
+	}
+//-->
 </script>
-<LINK HREF="<perl>$ispman->getConfig('ispmanUrlPrefix')</perl>/ispman.css" REL="stylesheet" TYPE="text/css">
 
    
+
+Editing vhost: <perl>join '.', ($ispman->{'vhost'}->{'ispmanVhostName'}, $ispman->{'vhost'}->{'ispmanDomain'})</perl>
+(<b><perl>($ispman->{'vhost'}{'ispmanStatus'} eq "suspended")?"<font color=red>suspended</font>": "<font color=green>active</font>"</perl></b>)
+
 <br>
 <form>
-<table border=0>
-<tr><td colspan=2>
-    Editing 
-	<select onChange="gotoSubSection(this.options[this.selectedIndex].value)">
+   <select onChange="gotoSubSection(this.options[this.selectedIndex].value)">
 	<perl>
 	$options={
 		"" => "General Info",
@@ -36,22 +79,14 @@
 		"acls" => "Access controls",
 		"aliases" => "Website Aliases",
 	};
-	for (keys %$options) {
+	for (sort keys %$options) {
 		$text.= sprintf("<option value='%s' %s>%s</option>" , $_, ($r->param("section") eq $_)?" selected " :"" , $options->{$_});
 	}
 	$text
 	</perl>
 	
 	</select>
-	for 
-    VirtualHost  
-    
-    <perl>join '.', ($ispman->{'vhost'}->{'ispmanVhostName'}, $ispman->{'vhost'}->{'ispmanDomain'})</perl>
-
-<br>
-<b><perl>($ispman->{'vhost'}{'ispmanStatus'} eq "suspended")?"<font color=red>This Vhost is suspended</font>": "<font color=green>This Vhost is Active</font>"</perl></b>
 
-    <br><hr noshade></td></tr>
-</table>
+    <hr noshade></td></tr>
 </form>
 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.