 <search function="setiq">
   <name>Setiqueue</name>
   <description>
      Directly login as an admin to your setiqueue web admin interface without having the hassle to go through the login page.<br/>
    <div class="helpboxDescLabels">Usage:</div>
    <table class="helpboxDescTable">
      <tr><td>setiq &lt;<i>password</i>&gt; [/server:&lt;<i>serveraddress</i>&gt; [/port:&lt;<i>portnumber</i>&gt;]] [/connect[:&lt;<i>duration</i>&gt;]] [/display:&lt;<i>page</i>&gt;] [/delay:&lt;<i>delay</i>&gt;]</td></tr>
    </table>
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td>/server:serveraddress</td><td> - </td><td>specify server IP address or name (127.0.0.1 by default)</td></tr>
      <tr><td>/port:portnumber</td><td> - </td><td>specify port number (5517 by default)</td></tr>
      <tr><td>/connect:duration</td><td> - </td><td>tell SetiQueue to connect to the Internet. You can specify one of the following durations (30 minutes by default):
        <table class="helpboxDescTable">
          <tr><td><b>0.5</b> or <b>30</b></td><td> - </td><td>30 minutes</td></tr>
          <tr><td><b>1</b> or <b>60</b></td><td> - </td><td>1 hour</td></tr>
          <tr><td><b>2</b> or <b>120</b></td><td> - </td><td>2 hours</td></tr>
          <tr><td><b>4</b> or <b>240</b></td><td> - </td><td>4 hours</td></tr>
        </table>
      </td></tr>
      <tr><td>/dislay:page</td><td> - </td><td>display specified page (without htm extension)</td></tr>
      <tr><td>/delay:delay</td><td> - </td><td>delay in ms between 2 form submissions (500 by default). Increase for slow computers.</td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpBoxDescTable">
      <tr><td>setiq mypassword</td></tr>
      <tr><td>setiq mypassword /server:localhost /port:6000 /connect:4 /display:logs /delay:2000</td></tr>
    </table>
    <div class="helpboxDescLabels" style="color: red">Security warning:<br/>
    <table class="helpBoxDescTable">
      <tr><td style="color: red">Be aware that your password will remain in DQSD's history.</td></tr>
    </table>
    </div>
    <div class="helpboxDescLabels" style="color: red">Compatibility warning:<br/>
    <table class="helpBoxDescTable">
      <tr><td style="color: red">If you are using DQSD v3.0 or earlier and you specify an IP address for the serveraddress parameter, you will need to edit defer_tools.js and change<br/>
        <nobr><span style="font-family: monospace; color: #000000">  var re_switch = /\/((\w+)(?::?(\w*)))\s*/;</span></nobr><br/>
        to<br/>
        <nobr><span style="font-family: monospace; color: #000000">  var re_switch = /\/((\w+)(?::?(\S*)))\s*/;</span></nobr></td></tr>
    </table>
    </div>
   </description>
  <category>Functions</category>
  <link>http://www.setiqueue.org</link>
  <contributor>MLL</contributor>

  <form name="setiqf"
        method="post">
    <input type="hidden" name="User"/>
    <input type="hidden" name="Pass"/>
  </form>

  <form name="setiqcf"
        method="post">
    <input type="hidden" name="Connect"/>
  </form>

  <form name="setiqlf"
        method="get">
  </form>


  <script><![CDATA[
    function setiq( q )
    {
      if( nullArgs( "setiq", q ) )
        return false;
      else
      {
        var switch_list = new Array( "server", "port", "connect", "display", "delay" );
        var args = parseArgs( q, switch_list );
        
        var serveraddress="127.0.0.1";
        if( !( typeof args.switch_val["server"] == "undefined" || args.switch_val["server"] == "" ) )
        {
          serveraddress=args.switch_val["server"];
        }

        var portnumber="5517";
        if( !( typeof args.switch_val["port"] == "undefined" || args.switch_val["port"] == "" ) )
        {
          portnumber=args.switch_val["port"];
        }
        
        var mydelay="500";
        if( !( typeof args.switch_val["delay"] == "undefined" || args.switch_val["delay"] == "" ) )
        {
          mydelay=args.switch_val["delay"];
        }
        

        if( !( typeof args.switch_val["connect"] == "undefined" ) )
        {
          var duration=args.switch_val["connect"];
          switch( duration * 1 )
          {
            case 0: duration = "30 min"; break;
            case .5:  duration = "30 min"; break;
            case 30:  duration = "30 min"; break;
            case 1:   duration = "1 hour"; break;
            case 60:  duration = "1 hour"; break;
            case 2:   duration = "2 hours"; break;
            case 120: duration = "2 hours"; break;
            case 4:   duration = "4 hours"; break;
            case 240: duration = "4 hours"; break;
            case "": duration = "30 min"; break;
            default:
            {
              nullArgs( "setiq", "?" );
              return false;
            }
          }
        }

        document.setiqf.action = "http://"+serveraddress+":"+portnumber+"/login.htm?";
        document.setiqf.User.value="admin";
        document.setiqf.Pass.value=args.q;
        document.setiqf.target=DQSD_BROWSER_WINDOW_NAME + '_setiqf';
        submitForm(document.setiqf, true);

        if( duration )
        {
          document.setiqcf.action = "http://"+serveraddress+":"+portnumber+"/connect.htm?";
          document.setiqcf.Connect.value=duration;
          document.setiqcf.target=document.setiqf.target;
          setTimeout( "submitForm(document.setiqcf, true);", mydelay );
        }

        if( !( typeof args.switch_val["display"] == "undefined" || args.switch_val["display"] == "" ) )
        {
          //mmh... I use a form, but I'm sure it's overkill. How to change the location URL of the opened window?
          document.setiqlf.action = "http://"+serveraddress+":"+portnumber+"/" + args.switch_val["display"] + ".htm";
          document.setiqlf.target=document.setiqf.target;
          setTimeout( "submitForm(document.setiqlf, true);", mydelay );
        }

        return true;
      }
    }
  ]]></script>

  <copyright>
	Copyright (c) 2002 David Bau
	Distributed under the terms of the
	GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
</search>

