View Full Version : Login form on my home page?
jdlitson
06-11-2003, 08:29 PM
Hi, How can I add a login form to my home page?
Not a link to the login popup box, but the ability to type the user name and password directly on to the web page?
Here is the latest working code so you don't have to hunt for it.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Direct Admin Login</title>
</head>
<body>
<form method="POST" action="http://yourdoman.com:2222/CMD_LOGIN">
<input type="text" name="username"/>
<input type="password" name="password" size="20"/>
<input type="submit" value="go" name="submit"/>
</form>
</body>
</html>
Thanks for your time and help -Jason
BTW I highly recomend Direct Admin.
I like many others have spent months deciding on which CP to use. DA Rocks! :D
The Prohacker
06-11-2003, 08:48 PM
This is just a sample way to do it with JavaScript..
You'll need to modify the HTML to make it look how you want..
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name=login>
<div align="center">
<table border=1 cellpadding=3>
<tr>
<td colspan=2 align=center>
<h2 align="center">DirectAdmin Login</h2>
</td>
</tr>
<tr>
<td>Username:</td>
<td>
<input type=text name=username size=15 maxlength="26">
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type=password name=password size=15>
</td>
</tr>
<tr>
<td>Domain:</td>
<td>
<input type="text" name="server" maxlength="65" size="15">
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=button value="Login!" onClick="Login(this.form)" name="button">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
jdlitson
06-11-2003, 11:50 PM
Thanks so much Prohacker. You Rock and the script works perfect!
Some mistakes I made and things I learned when using this script which I hope will help others.
1. On this line I tried typing in my domain name or IP address in the "http://" area; don't do this, just leave the entire line the way it is. Like Prohacker said is all you have to do is change the html to suite your look and feel.
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
2. If you would like to create a form which alows a demo user to login just by clicking the login button then modify these lines.
input type="text" name="username" size="15" maxlength="26" value="demo_user"
input type="password" name="password" size="15" value="demo"
input type="text" name="server" maxlength="65" size="15" value="Insert Your IP Address Here"
Thanks again for your help Prohacker -Jdlitson :D
The Prohacker
06-12-2003, 12:27 AM
If you are using this for a demo user to login.. You might change the server field from text to hidden as a guest doesn't need to see your server name :D
SH-Lloyd
06-16-2003, 07:15 PM
If it is for a demo user why even bother with a form? Why not make the URL and set it as a link i.e. if user was demo and password demo it would be:
< a href = "http://demo:demo@123.45.67.8:2222/" > Login To Demo Control Panel </ a >
Of course remove spaces to get it working and replace with your IP ;)
The Prohacker
06-16-2003, 07:28 PM
Originally posted by SH-Lloyd
If it is for a demo user why even bother with a form? Why not make the URL and set it as a link i.e. if user was demo and password demo it would be:
< a href = "http://demo:demo@123.45.67.8:2222/" > Login To Demo Control Panel </ a >
Of course remove spaces to get it working and replace with your IP ;)
You might just want to present it to the user as if they were a regular customer and use the login form... :D
I dunno.. People do strange things :D
jdlitson
06-25-2003, 11:51 PM
Hi, Does anyone know the code to use an alternate image other than the default login image that is displayed with this script?
I tried using html 3 and html 4 using an online tutorial but was only able to get the alternate image to apear but not submit the form properly.
Thanks for your help -Jason
ProWebUK
06-26-2003, 11:23 AM
to use an image instaed of the grey box chnage the line:
<input type=button value="Login!" onClick="Login(this.form)" name="button">
to
<input name="submit" type="image" value="Login!" src="http://url.to/image.ext" onClick="Login(this.form)" alt="alt_text">
you will need to chnage "http://url.to/image.ext to the address of your image, can be local if wanted. Also, chnage your alt_text, unless you want people to get that message hovering over the submit button ;)
Chris
jdlitson
06-26-2003, 01:02 PM
Thanks so much Chris!
I struggled with this problem for hours last night.
Best Regards -Jason :D
jdlitson
06-26-2003, 01:56 PM
Hi Chris,
I just tried the button change code but it's not working properly.
The image does show up but the form still doesn't login.
Thanks for trying though -Jason
ProWebUK
06-26-2003, 01:59 PM
weird.... any errors? does the form go to the correct place etc?
jdlitson
06-26-2003, 02:39 PM
The form removes the login text and stays on the same page but does not report any errors.
Does it work for you?
ProWebUK
06-26-2003, 02:48 PM
new code coming right up ;)
Chris
ProWebUK
06-26-2003, 02:59 PM
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name=login>
<div align="center">
<table border=1 cellpadding=3>
<tr>
<td colspan=2 align=center>
<h2 align="center">DirectAdmin Login</h2>
</td>
</tr>
<tr>
<td>Username:</td>
<td>
<input type=text name=username size=15 maxlength="26">
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type=password name=password size=15>
</td>
</tr>
<tr>
<td>Domain:</td>
<td>
<input type="text" name="server" maxlength="65" size="15">
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input type="image" src="images/login.gif" onClick='Login(this.form)' name="submit">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
ProWebUK
06-26-2003, 03:10 PM
and its not working :( ..... trys to look for some info
ProWebUK
06-26-2003, 03:18 PM
i got an idea that will 100% definately work give me 5 ;)
Chris
jdlitson
06-26-2003, 03:19 PM
Ok Thanks Chris I appreciate your help :) -Jason
gmilazzo
06-26-2003, 03:26 PM
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF">
<td valign="top" width="20%">
<center>
<b>User Login</b>
</center>
<br />
<form method="post">Username:<br />
<input name="username" id="username" type="text"
value="" /><br />
Password:<br />
<input name="password" id="password" type="password"
value="" /><br />
Domain Name:<br />
<input name="server" id="server" type="text"
value="" /><br />
<input type="button" value="Login!"
onclick="Login(this.form)" name="button" /></form>
</td>
<h2 align="center"> </h2>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan=2 align=center> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
save as php
ProWebUK
06-26-2003, 03:28 PM
:rolleyes: thats fromCPANEL but it works i guess ;) i will still post my new idea ;)
jdlitson
06-26-2003, 03:44 PM
gmilazzo your script works but how do we use a custom image with it? Thanks -Jason
Still looking forward to your new idea Chris.
Thanks -Jason
ProWebUK
06-26-2003, 03:50 PM
my one will be based on css, if gmilazzo cant get images working on his code either i will chnage the css to use images. At the moment the one im making just runs on css styles :cool:
Chris
ProWebUK
06-26-2003, 04:04 PM
here is the CSS based login code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DirectAdmin Login Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tablestyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
border: 1px solid #000000;
font-size: 12px;
}
</style>
<style type="text/css">
.buttonstyle {
}
</style>
<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
</script>
</head>
<body>
<form name="login">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tablestyle"><div align="center"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>DIRECTADMIN
LOGIN</strong></font></div></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></td>
<td valign="middle"> <input name="username" type="text" class="tablestyle" maxlength="26"></td>
</tr>
<tr>
<td height="48" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></td>
<td><input name="password" type="password" class="tablestyle"></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Domain:</font></td>
<td width="50%" height="50"><input name="server" type="text" class="tablestyle">
</td>
</tr>
<tr>
<td colspan="2" class="tablestyle"><div align="center">
<p class="buttonstyle"><br>
<input type="button" name="button" value="Login!" onClick="Login(this.form)">
<br>
<br>
</p>
</div></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
Enjoy it ;) if you need the images still , leave a message here :)
Chris
gmilazzo
06-26-2003, 04:15 PM
<form method="get">Username:<br />
<input name="username" id="username" type="text"
value="" /><br />
Password:<br />
<input name="password" id="password" type="password"
value="" /><br />
Domain Name:<br />
<input name="server" id="server" type="text"
value="" /><br />
<input type="image" value="imagelocation"
onclick="Login(this.form)" name="button" /></form>
</td>
<h2 align="center"> </h2>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan=2 align=center> </td>
</tr>
</table>
</div>
</form>
ProWebUK
06-26-2003, 04:21 PM
If that works, this version of the code should show an image submit button:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DirectAdmin Login Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tablestyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
border: 1px solid #000000;
font-size: 12px;
}
</style>
<style type="text/css">
.buttonstyle {
}
</style>
<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
</script>
</head>
<body>
<form name="login">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tablestyle"><div align="center"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>DIRECTADMIN
LOGIN</strong></font></div></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></td>
<td valign="middle"> <input name="username" type="text" class="tablestyle" maxlength="26"></td>
</tr>
<tr>
<td height="48" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></td>
<td><input name="password" type="password" class="tablestyle"></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Domain:</font></td>
<td width="50%" height="50"><input name="server" type="text" class="tablestyle">
</td>
</tr>
<tr>
<td colspan="2" class="tablestyle"><div align="center">
<p class="buttonstyle"><br>
<input type="image" name="button" value="http://link.to/image.ext" onClick="Login(this.form)">
<br>
<br>
</p>
</div></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
jdlitson
06-26-2003, 06:03 PM
Hi Chris and gmilazzo,
I tried both of your scripts.
Chris, With the newer version for some reasone the image doesn't show up. When I click the image place holder the form resets :(
gmilazzo, With your button update the button shows up but the form rests and doesn't submit properly.
Thank you both for all your help.
I will just resize my page in photoshop to fit the default button for now. It' quite puzzling why these don't work. I tried the code in frontpage and also in a text editor to be sure, so???
Best Regards -Jason
ProWebUK
06-27-2003, 01:26 AM
did my css one work? that should work with no problems :(
jdlitson
06-27-2003, 08:26 AM
Hi Chris,
I wasn't able to get it to work. Perhaps it does and I did something wrong. I don't have any experience with CSS. I added my image location in this part of your code. value="http://link.to/image.ext I did this in a text editor and saved the document as .html and then previewed in my browser.
Were you able to verify it on your end? Thanks- Jason
ProWebUK
06-27-2003, 08:32 AM
Ddid my second 1 above (the CSS based without images) work?
Chris
jdlitson
06-27-2003, 03:01 PM
Yes, the first CSS did work.
-Jason
ProWebUK
06-28-2003, 03:37 PM
will make one based on CSS with image as background and you can chnage size and image then ;)
Chris
jdlitson
06-28-2003, 08:12 PM
Thanks Chris, You are too kind and I mean that. Thanks for ll the time you are putting in helping me. I hope I can return the favore one day. -Jason :D
DirectAdmin Support
06-29-2003, 01:11 AM
I'm currently looking into implementing a sessions based system which would make this type of thing a *whole* lot easier. Http auth just doesn't provide the flexibility we'd like.. (some browsers refuse to forget the passwords, so they can't log out). I'll make sure http auth still works, with the goal to have a sessions based system that can be used on top of it.
I'll keep you posted.
John
ProWebUK
06-29-2003, 12:46 PM
I think DirectAdmin needs a "real" login system, .htaccess / .htpasswd to me doesnt show the security is the best on there, also the htaccess cant be customised and makes thing much more difficult when creating custom login forms from your homepage.
Ensim style login is the way I think :cool:
Chris
ProWebUK
06-29-2003, 12:48 PM
the css code for images will be done in 5 also ;)
Chris
ProWebUK
06-29-2003, 12:55 PM
HTML version:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DirectAdmin Login Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tablestyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
border: 1px solid #000000;
font-size: 12px;
}
</style>
<style type="text/css">
.buttonstyle {
background-image: url(http://link.to/image.ext);
width: 468px;
height: 60px;
border: 1px solid #000000;
}
</style>
<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
</script>
</head>
<body>
<form name="login">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tablestyle"><div align="center"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>DIRECTADMIN
LOGIN</strong></font></div></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></td>
<td valign="middle"> <input name="username" type="text" class="tablestyle" maxlength="26"></td>
</tr>
<tr>
<td height="48" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></td>
<td><input name="password" type="password" class="tablestyle"></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Domain:</font></td>
<td width="50%" height="50"><input name="server" type="text" class="tablestyle">
</td>
</tr>
<tr>
<td colspan="2" class="tablestyle"><div align="center">
<p><br>
<input name="button" type="button" class="buttonstyle" onClick="Login(this.form)">
<br>
<br>
</p>
</div></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
ProWebUK
06-29-2003, 01:11 PM
Here is the PHP version, your page will need to be .php also, just change the variables listed at the of the code.
<?php
// change the below settings to anything you want :)
$pagetitle = "DirectAdmin Login Page"; // Title of this page
$imagelink = "http://link.to/yourimage.ext"; // link to your image
$imagewidth = "100"; // width of your image (in pixels)
$imageheight = "30"; // Height of your image (in pixels)
$border = "#000000" // Colour of the border placed around your button
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo "$pagetitle"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tablestyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
border: 1px solid #000000;
font-size: 12px;
}
</style>
<style type="text/css">
.buttonstyle {
background-image: url(<?php echo "$imagelink"; ?>);
width: <?php echo "$imagewidth";?>px;
height: <?php echo "$imageheight"; ?>px;
border: 1px solid <?php echo "border"; ?>;
}
</style>
<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" + server + ":2222/";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
</script>
</head>
<body>
<form name="login">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tablestyle"><div align="center"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>DIRECTADMIN
LOGIN</strong></font></div></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></td>
<td valign="middle"> <input name="username" type="text" class="tablestyle" maxlength="26"></td>
</tr>
<tr>
<td height="48" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></td>
<td><input name="password" type="password" class="tablestyle"></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Domain:</font></td>
<td width="50%" height="50"><input name="server" type="text" class="tablestyle">
</td>
</tr>
<tr>
<td colspan="2" class="tablestyle"><div align="center">
<p><br>
<input name="button" type="button" class="buttonstyle" onClick="Login(this.form)">
<br>
<br>
</p>
</div></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
Any more problems leave a message here ;)
Chris
Chris,
I just started playing with your lastest HTML version. It works very nicely, I think I will try integrating it in to my new site. :D
Thanks!
ProWebUK
06-29-2003, 01:51 PM
would you rather have it not require the domain and just username / password?
###
Thanks for the commnt Ryan :)
ProWebUK
06-29-2003, 01:57 PM
made it anyway :P ## for all who dont want the "domain" field just chnage the "address" variable in the php section ;) also the page must be saved as .php
<?php
// change the below settings to anything you want :)
$pagetitle = "DirectAdmin Login Page"; // Title of this page
$address = "111.111.111.111"; // IP address used for login (can also be a domain)
$imagelink = "http://link.to/yourimage.ext"; // link to your image
$imagewidth = "100"; // width of your image (in pixels)
$imageheight = "30"; // Height of your image (in pixels)
$border = "#000000" // Colour of the border placed around your button
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo "$pagetitle"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.tablestyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
border: 1px solid #000000;
font-size: 12px;
}
</style>
<style type="text/css">
.buttonstyle {
background-image: url(<?php echo "$imagelink"; ?>);
width: <?php echo "$imagewidth";?>px;
height: <?php echo "$imageheight"; ?>px;
border: 1px solid <?php echo "border"; ?>;
}
</style>
<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var dalogin = "http://" + username + ":" + password + "@" <?php echo "address"; ?>:2222";
window.location = dalogin;
}
else {
alert("Please enter a Username and password.");
}
}
</script>
</head>
<body>
<form name="login">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tablestyle"><div align="center"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>DIRECTADMIN
LOGIN</strong></font></div></td>
</tr>
<tr>
<td width="50%" height="50" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></td>
<td width="50%" valign="middle"> <input name="username" type="text" class="tablestyle" maxlength="26"></td>
</tr>
<tr>
<td height="48" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></td>
<td><input name="password" type="password" class="tablestyle"></td>
</tr>
<tr>
<td colspan="2" class="tablestyle"><div align="center">
<p><br>
<input name="button" type="button" class="buttonstyle" onClick="Login(this.form)">
<br>
<br>
</p>
</div></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
Chris
Originally posted by ProWebUK
would you rather have it not require the domain and just username / password?
I took it out in mine but it would become very useful once you had multiple DA boxes.
ProWebUK
06-29-2003, 02:03 PM
just given me another idea :D multiple server login coming up :)
Chris
DirectAdmin Support
06-29-2003, 03:38 PM
Hold the presses!!!
Ok, that went faster than I thought it would....
I've completed the sessions based login system. When you first login, it will notice you don't a sessions cookie, so it will send you to a login form which is an actual webpage (hard coded right now)... no more http auth is required. Your session will be stored for one hour after your last access, at which time you will be prompted with the login screen again. To logout within that hour, you click the logout button, or close all browsers.
As for http auth, it will still work for the api people. Rules for which one is used is as follows:
If the sessions cookie is sent, a session is required.
If the http authentication is sent, http auth is used
If neither is sent, the sessions login page will be displayed.
I'd figure I'd mention this before you guys get too carried away with your fancy login scripts :)
If you want to have a login form on your webpage, you just pass it to:
action=http://domain.com:2222/CMD_LOGIN
method=POST
username=username
password=password
voila!
Will be out for 1.12
John
ProWebUK
06-29-2003, 03:42 PM
Good job John! when will v1.12 be released?
##
will make a new thread with a couple of different styled logins for v1.12 in 5 :D
Chris
jdlitson
06-29-2003, 06:50 PM
Thanks again Chris, Your new code works perfectly.
-Jason :D
DirectAdmin Support
06-30-2003, 12:49 AM
Hi guys,
1.12 should be out in a few days. I need to make sure that it works for everyone before I release it... if it doesn't, nobody will be able to log in at all... which would be a *bad* thing :D
Just a note that although http auth will still function, most browsers will not be able to use it via http://user:Pass@domain.com because browsers check to see if it requires auth before actually using it... sessions don't require http auth because they are purely server side, so if you MUST use http auth, it can only be done by explicitly passing the encrypted user:Pass in the headers. Only people using the API really need to take note of this fact.
John
DirectAdmin Support
06-30-2003, 09:27 PM
I havn't sent out the update to everyone yet so you guys can play around with our demo accounts on here just so you can get an idea of what it does.
http://www.directadmin.com:2222
login: demo_admin or demo_reseller or demo_user
pass: demo
edit: Ok, It needs a few things before I'm going to release it. The admin|user login system needs tweaking :)
John
ProWebUK
07-01-2003, 02:10 AM
:D Looks much better
Good job ;)
Chris
jdlitson
07-21-2003, 09:30 PM
Hi, would someone please post an example of the new meathode of adding a login form to a page?
===================================
action=http://domain.com:2222/CMD_LOGIN
method=POST
username=username
password=password
===================================
Thanks for your time and help -Jason
jdlitson
07-21-2003, 10:46 PM
Just figured this out!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Direct Admin Login</title>
</head>
<body>
<form method="POST" action="http://yourdoman.com:2222/CMD_LOGIN">
<input type="text" name="username"/>
<input type="password" name="password" size="20"/>
<input type="submit" value="go" name="submit"/>
</form>
</body>
</html>
-Jason:D
Gadget
07-31-2003, 01:21 AM
should have put that inside [CODE] tags:\ it makes copy/paste in editors easier
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.