ispman/ispman-web/cgi-bin/tmpl menu.tmpl,1.48,1.49

Atif Ghaffar <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10181

Modified Files:
	menu.tmpl 
Log Message:
Only show searched domains

Index: menu.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/menu.tmpl,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- menu.tmpl	15 Jul 2004 08:24:12 -0000	1.48
+++ menu.tmpl	28 Dec 2004 18:43:27 -0000	1.49
@@ -12,7 +12,19 @@
    var cgidomain="&ispmanDomain="+ispmanDomain
 
    function selectDomain(domain){
-       location=cgiurl+"?mode=menu&ispmanDomain="+domain
+       if (domain=="__search__"){
+        var searchString= prompt('Please enter part of the domain that you want to search', ' ');
+        if (searchString!=""){
+               location=cgiurl+"?mode=menu&domainsearchfilter="+searchString;
+        } else {
+                return false;
+        }
+        
+        
+       } else {
+               location=cgiurl+"?mode=menu&ispmanDomain="+domain
+       }
+               
    }
 
    function doThis(mode,param){      
@@ -80,7 +92,18 @@
 my $groups;
 my $thisDomainType;
 
-$domains=$ispman->makeDomainHash($ispman->getDomains());
+
+if ($r->param('domainsearchfilter')){
+        if ($r->param('domainsearchfilter') eq '*'){
+                $filter="";
+        } else {
+                $filter="ispmanDomain=*@{[$r->param('domainsearchfilter')]}*";
+        }
+        $domains=$ispman->makeDomainHash($ispman->getDomains($filter));
+
+}
+
+
 
 if ($r->param("ispmanDomain")){
     $thisDomain=$r->param("ispmanDomain");
@@ -97,7 +120,11 @@
 
 <FORM>
 
+
+
 <TABLE border=0 width=100%>
+
+
 <tr><TD class=menuheader>Manage domain</td></tr>
 
 <tr>
@@ -106,7 +133,7 @@
 <SELECT onChange="selectDomain(this.options[this.selectedIndex].value)">|;
 
 $text.="<OPTION>" . _("Choose domain to manage")  . "</option>\n";
-$text.="<OPTION>-------------------</option>\n";
+$text.="<OPTION value='__search__'> Search for a domain</option>\n";
 
 for $domain( keys %$domains ) {
     $domainInfo=$ispman->getDomainInfo($domain);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
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.