DXT PH
WELCOME TO DXT PH HACKING -

PLEASE REGISTER EXPLORE TO OUR SITE FREE CF VIP HACK FOR FREE ALREADY RELEASE -

LOW RATE OF PSF VIP WARROCK VIP OP7 VIP

Just Register to our site - Thanks
DXT PH
WELCOME TO DXT PH HACKING -

PLEASE REGISTER EXPLORE TO OUR SITE FREE CF VIP HACK FOR FREE ALREADY RELEASE -

LOW RATE OF PSF VIP WARROCK VIP OP7 VIP

Just Register to our site - Thanks
DXT PH
Would you like to react to this message? Create an account in a few clicks or log in to continue.


DXT PH Hacking
 
HomePortalLatest imagesSearchRegisterLog in

 

 Simple HTML for LOG IN and Password

Go down 
2 posters
AuthorMessage
DXT-Ripper
Admin
DXT-Ripper


Posts : 71
Coins : 114
Reputation : 8
Join date : 2010-10-24

Simple HTML for LOG IN and Password Empty
PostSubject: Simple HTML for LOG IN and Password   Simple HTML for LOG IN and Password EmptyWed Oct 27, 2010 8:29 pm

Heres a quick little tip to save some time looking at the ISPConfig login.php file, or for those who don't know php/html very well Simple HTML for LOG IN and Password Tongue

This is just some simple HTML code that will log in to the ISPConfig panel from anywhere you want to put it. (It will redirect you to the port 81 server, of course, but it will skip the login screen... supposing you put in a valid username and password.)

Also, note that "passwort" is not a typo. ISPConfig seemingly was not coded in english.

Hope this helps someone,
Quote :
<form method="POST" action="http://YOUR_DOMAIN_HERE:81/login/login.php">
Username: <input type="text" name="username" size="15" /><br />
Password: <input type="password" name="passwort" size="15" /><br />
<div align="center">
<p><input type="submit" value="Login" /></p>
</div>
</form>

Back to top Go down
https://dxtph.forumotion.net
kimjan
Member
kimjan


Posts : 8
Coins : 56
Reputation : 9
Join date : 2010-10-25
Age : 28
Location : cebu city

Simple HTML for LOG IN and Password Empty
PostSubject: Re: Simple HTML for LOG IN and Password   Simple HTML for LOG IN and Password EmptyWed Oct 27, 2010 8:32 pm

anu yan admin?..
Back to top Go down
DXT-Ripper
Admin
DXT-Ripper


Posts : 71
Coins : 114
Reputation : 8
Join date : 2010-10-24

Simple HTML for LOG IN and Password Empty
PostSubject: Re: Simple HTML for LOG IN and Password   Simple HTML for LOG IN and Password EmptyWed Oct 27, 2010 8:34 pm

Ok, there are two things I really don't like about ISPConfig. One, there are a lot of passwords and usernames for each user to remeber. Two, there is a lack of remoting (can't wait for them to release the remoting plugin!! Simple HTML for LOG IN and Password Biggrin )

Here is a much more advanced login script in PHP. This script displays the most important parts of ISPConfig (in my opinion) based on the ISPConfig panel login username and password. Once the user uses this login, the login form will be replaced with a link to the ISPConfig panel, webmail, and phpMyAdmin for each of the databases that they have created. All these log in automatically in a new window.

Simple HTML for LOG IN and Password Script_example


As a disclaimer... I'm primarily a C++ coder, and I don't do much PHP, so there are surely many improvements to be made!
Connect.php
PHP Code:

Quote :
<?php
// db info
$hostname="localhost";
$mysql_login="root";
$mysql_password="YOUR_ROOT_PASSWORD";
$database="THE_ISPCONFIG_DATABASE_NAME";

if (!(
$db = mysql_connect($hostname, $mysql_login , $mysql_password))){
die(
"Can't connect to mysql.");
}else{
if (!(
mysql_select_db("$database",$db))) {
die(
"Can't connect to db.");
}
}
?>


This file simply sets up a connection to the ISPConfig database. Make sure to replace the root password, and ISPConfig database name with your own. Simple HTML for LOG IN and Password Biggrin

login.php
PHP Code:

Quote :
<?php
/***************************************************************************
ISP Config Login Interface
Author: Glorfindel
---------------------------------------------------------------------------
Desc: Provides a unified log-in outside of the ISPConfig control panel.
This unified login checks the ISPConfig user tables, and provides links
to each of the ISPConfig panels with one, unified, password outside port
81.
***************************************************************************/

// start session
session_start();

include(
"connect.php");

function
checkLogin()
{
// convert username and password from _GET to _SESSION
if($_GET){
$_SESSION['username']=$_GET["username"];
$_SESSION['passwort']=$_GET["passwort"];
}

$username = $_SESSION['username'];
$passwort = $_SESSION['passwort'];

$username = addslashes($username);
$passwort = addslashes($passwort);

$sql = "SELECT * FROM sys_user WHERE username = '$username' AND (passwort = '".md5($passwort)."' OR passwort = PASSWORD('$passwort'))";

$result=mysql_query($sql);
if (!
$_SESSION['verified'])
{
if ((
$num = mysql_num_rows($result) ) and ($passwort != ""))
{
if (
$num != 0)
{
$_SESSION['ERROR'] = "";
$_SESSION['verified'] = 1;

// lets get their e-mail alias.
$sql = "SELECT user_email FROM isp_isp_user WHERE user_name='$username'";
$result = mysql_query($sql);
$_SESSION['email'] = mysql_result($result,0,"user_email");
}
}
else
{
$_SESSION['ERROR'] = "login is WRONG!!";
}
}

if (
$_SESSION['verified'] != 1) $_SESSION['ERROR'] = "Login Failed. <br />";
}


//////////////////////////
// Main Bit Starts Here //
//////////////////////////
//
if ($_SESSION['verified'] != 1 and $_GET['action'] == "login")
checkLogin();

if (
$_GET['action'] == "logout")
{
$_SESSION = array();
session_destroy();
$_SESSION['ERROR'] = "You have successfully logged out. <BR />";
}

if (
$_SESSION['verified'] != 1)
{
// User is NOT logged in, so lets give him a login form...
echo("<!--Begin Login -->");
echo(
"<font color='red'>");
echo(
$_SESSION['ERROR']);
$_SESSION['ERROR'] = ""; // reset the error message if there is one.
echo("</font><br />");
echo(
"<form method="GET" action="");
echo(
$_SERVER['PHP_SELF']);
echo(
"">");
echo(
"Username: <br /><input type="text" name="username" size="15" /><br />");
echo(
"Password: <br /><input type="password" name="passwort" size="15" /><br />");
echo(
"<input type="hidden" name="action" value="login" />");
echo(
"<p><input type="submit" value="Login" /></p>");
echo(
"</form>");
echo(
"<!--End Login -->");
} else {
// if the user IS logged in, give him options here.

// Javascript to make POST data submittable thru link...
// Web Admin Panel
echo("<script language='JavaScript' type='text/javascript'>\n");
echo(
"<!--\n");
echo(
"function submit()\n");
echo(
"{\n");
echo(
"document.loginform.submit();\n");
echo(
"}\n");
echo(
"-->\n");

// Mail
//echo("<script language='JavaScript' type='text/javascript'>\n");
echo("<!--\n");
echo(
"function submit1()\n");
echo(
"{\n");
echo(
"document.loginform1.submit();\n");
echo(
"}\n");
echo(
"-->\n");

// PhpMyAdmin
//echo("<script language='JavaScript' type='text/javascript'>\n");
echo("<!--\n");
echo(
"function submit2()\n");
echo(
"{\n");
echo(
"document.loginform2.submit();\n");
echo(
"}\n");
echo(
"-->\n");
echo(
"</script>\n");
////////////////////////////////////////////////////////////////////
// Note: Newlines are required, else it screws up the javascript //
////////////////////////////////////////////////////////////////////

echo("<B>Control Panel: </B><BR />");

echo(
"<form method='POST' target=_blank action='http://www.glorf.com:81/login/login.php' name='loginform'>\n");
echo(
"<input type="hidden" name="username" value="");
echo(
$_SESSION['username']);
echo(
""><input type="hidden" name="passwort" value="");
echo(
$_SESSION['passwort']);
echo(
"">");
echo(
"</form>");
echo(
"<a href='javascript: submit()'>Website Admin Panel</a>\n");

echo(
"<form method='POST' target=_blank action='http://www.glorf.com:81/webmail/msglist.php' name='loginform1'>\n");
echo(
"<input type="hidden" name="f_email" value="");
echo(
$_SESSION['email']);
echo(
"@glorfy.com"><input type="hidden" name="f_pass" value="");
echo(
$_SESSION['passwort']);
echo(
"">");
echo(
"</form>");
echo(
"<a href='javascript: submit1()'>Web Mail</a><br />\n");


echo(
"<BR /><B>Databases: </B><BR />");

// Now lets get the database names...
// first that means we need to link the username to a web_id.
$email = $_SESSION['email'];
$sql = "SELECT web_id FROM isp_fakt_record WHERE notiz= '$email'";
$result = mysql_query($sql);
$_SESSION['web_id'] = mysql_result($result,0,"web_id");
$web_id = $_SESSION['web_id'];

// now we need to use that to grab all the DB names for displaying.
$sql = "SELECT datenbankuser FROM isp_isp_datenbank WHERE web_id = '$web_id'";
$result = mysql_query($sql);
// now lets loop the results and store them into an array for later display purposes.
global $dbs, $num_db;
$num_db = mysql_num_rows($result);
$dbs = array(30); // a user can't have more than 30 databases Smile
for ($i=0; $i < $num_db; $i+=1)
{
$dbs[$i] = mysql_result($result,$i,"datenbankuser");
echo(
"<a href="http://");
echo(
$dbs[$i]);
echo(
":");
echo(
$_SESSION['passwort']);
echo(
"@[You must be registered and logged in to see this link.]);
echo(
"">");
echo(
$dbs[$i]);
echo(
"</a><br />");
}

///////////////////////////////////////
echo("<hr />");
echo(
"<a href="");
echo(
$_SERVER['PHP_SELF']);
echo(
"?action=logout">logout<br></a>");
}
mysql_close();
?>


This file is the meat of the script. You need to use a search and replace to replace all "glorf.com" with "your.com" DO NOT put a [You must be registered and logged in to see this link.] on that... I used www off and on throughout the script, so your find and replace would end up making some [You must be registered and logged in to see this link.] if you do that!


Now, wherever you would like to have the login, you need to add the code...
PHP Code:

Quote :
<?php include("login.php"); ?>

I suggest you do this inside a table, as that is how I am using it.

Feel free to modify the code, but let me know if you make improvements, so that I can put them into my own version!! Simple HTML for LOG IN and Password Biggrin
Back to top Go down
https://dxtph.forumotion.net
DXT-Ripper
Admin
DXT-Ripper


Posts : 71
Coins : 114
Reputation : 8
Join date : 2010-10-24

Simple HTML for LOG IN and Password Empty
PostSubject: Re: Simple HTML for LOG IN and Password   Simple HTML for LOG IN and Password EmptyWed Oct 27, 2010 8:35 pm

HTML for Log in And Password for your site :3
Back to top Go down
https://dxtph.forumotion.net
Sponsored content





Simple HTML for LOG IN and Password Empty
PostSubject: Re: Simple HTML for LOG IN and Password   Simple HTML for LOG IN and Password Empty

Back to top Go down
 
Simple HTML for LOG IN and Password
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
DXT PH :: Web Designing & Coding :: HTML (Hyper Text Markup Language)-
Jump to: