Login directly to ticket system with my form.

jdlitson

Verified User
Joined
May 29, 2003
Messages
261
Hi,
I would like to know if it is possible to login to the Direct Admin ticket system through my own form.

Code:
<form method="POST" action="http://mydomain:2222/CMD_TICKET"/>

I found that it works with the default login page, which is cool but it would be more fun if I could get it working on my own form.

I appreciate your time and help -Jason
 
<form method="POST" action="http://mydomain:2222/CMD_TICKET"/>

Then add a password and username form input.... for some info click the server checklist link in my sig and look for a link to external login forms (or something similar - its there!) - theres plenty of examples on that :)

Chris
 
or another way...

Code:
<form method="POST" action="http://mydomain:2222/CMD_LOGIN">
... usual login stuff ...
<input type=hidden name=referer value="http://mydomain:2222/CMD_TICKET">
</form>
:)

John
 
Logging directly to the ticket system using your own login form

Thank you both for your fast replies.

Edit
OOPS! Sorry this code below does not work!
It was only working because I did not log out when testing it
in FrontPage preview. Sorry if you have wasted any of your time
trying to mak it work...

Here is a complete how with html coments for beginners.

<!-- This is how an html comment is formated. -->

Code:
<!-- Direct Admin form starts here. -->

<!-- This is the line that will log your user into DA and bring them directly to the ticket system. 
Change mydomain to yourdomainame.ext! -->
<form method="POST"action="http://mydomain.com:2222/CMD_TICKET"> 

<!-- This line is the username text box. -->
<input type="text" name="username" size="10" maxlength="26" style="font-size: 8pt" tabindex="1">

<!-- This line is the password text box. -->
<input type="password" name="password" size="8" style="font-size: 8pt" tabindex="2">

<!-- This line is the submit button The value Go > is what the user will see. -->
<input name="submit" type="submit" class="buttonstyle" style="width: 39; height: 24; font-size: 8pt" value="Go >" tabindex="3">

<!-- These next two lines are optional. -->

<!-- If the user types the wrong name or password then user will be taken to your choice of URL. -->
<input name="FAIL_URL" type="hidden" value="http://yourdomain/somepage.htm">

<!-- When the user logs out the user will be taken to your choice of URL. -->
<input name="LOGOUT_URL" type="hidden" value="http://yourdomain.com/somepage.htm">

<!-- The last line closes the form and must be included. -->
</form>

<!-- Direct Admin form ends here. -->
 
Last edited:
Hello,

Here, try this instead :)
Code:
<!-- Direct Admin form starts here. -->

<!-- This is the line that will log your user into DA and bring them directly to the ticket system. 
Change mydomain to yourdomainame.ext! -->
<form method="POST" action="http://mydomain.com:2222/CMD_LOGIN"> 

<!-- This line is the username text box. -->
<input type="text" name="username" size="10" maxlength="26" style="font-size: 8pt" tabindex="1">

<!-- This line is the password text box. -->
<input type="password" name="password" size="8" style="font-size: 8pt" tabindex="2">

<!-- This line is the submit button The value Go > is what the user will see. -->
<input name="submit" type="submit" class="buttonstyle" style="width: 39; height: 24; font-size: 8pt" value="Go >" tabindex="3">

<!-- These next three lines are optional. -->

<!-- If the user types the wrong name or password then user will be taken to your choice of URL. -->
<input name="FAIL_URL" type="hidden" value="http://yourdomain/somepage.htm">

<!-- When the user logs out the user will be taken to your choice of URL. -->
<input name="LOGOUT_URL" type="hidden" value="http://yourdomain.com/somepage.htm">

<!-- After a succesfull login, you will be forwarded here.  If you don't specify this, you'll be sent to / -->
<input name="referer" type="hidden" value="/CMD_TICKET">

<!-- The last line closes the form and must be included. -->
</form>

<!-- Direct Admin form ends here. -->
:)
John
 
Hi John,
When I add the new line of the code I get a page not
found error. I tried moving code to different positions on
the form but get the same results.

Thanks -Jason :D
 
Hi John,
Yes, I coppied the CMD_TICKET line directly from
your post, and changed the variable to my domain name.
Does the code work for you? if it does then I must be doing
something wrong, but I worked on it for quite a while with no luck.

Thanks again for your time and help -Jason
 
Hello,

Found the problem, you have to set the referer to a local path, not a full path:
PHP:
<!-- After a succesfull login, you will be forwarded here.  If you don't specify this, you'll be sent to / -->
<input name="referer" type="hidden" value="/CMD_TICKET">
John
 
Hi John,
I tried your suggestion this afternoon.
The form logged in to the / of DA and not the ticket page.

Thanks again and sorry to bother you with this -Jason :)
 
Hello,

I've just edited my post above to reflect the change I suggested. Just copy that, replace all the domains with your own and it should work. I've tested it and I get forwarded to the correct place. Make sure that you've spelt "referer" the same way.

John
 
Thanks for being so patient John,
It seems that FrontPage has messed something up.
My code is exactly as in your post except I have a table for my design.
When I tried the code in Dream Weaver without any tables it worked perfectly.
Everything else works when using Front Page but for some reasoned not the CMD_TICET.

Update
I have fixed this problem by making the form on a new page and then including it on my original page.

Thanks again for your help -Jason :)
 
Last edited:
Back
Top