Quote:
Yesterday at 11:06 PM Ian Cunningham said this in Post #223
Is there any way so that when a user opens email.php they will automatically be logged into a specific account (i.e predefined $hosts, $pass, $user). Basically, I want all of my mods to only be allowed access to the file and for it to check a single account for news.
|
Not hard to do at all.
Edit email.php and find:
PHP Code:
$errormessage .= "<tr><td align=right><normalfont>Username: </normalfont></td><td><input TYPE=text NAME=user value='$user'></td>\n";
$errormessage .= "<tr><td align=right><normalfont>Server: </normalfont></td><td><input TYPE=text NAME=host value='$host'></td></tr>\n";
$errormessage .= "<tr><td align=right><normalfont>Password: </normalfont></td><td> <input TYPE=password NAME=pass></td></tr>\n";
Replace with:
PHP Code:
$user = "Username";
$host = "mail.server.com";
$pass = "Password";
$errormessage .= "<tr><td align=right> </normalfont></td><td><input TYPE=hidden NAME=user value='$user'></td>\n";
$errormessage .= "<tr><td align=right></td><td><input TYPE=hidden NAME=host value='$host'></td></tr>\n";
$errormessage .= "<tr><td align=right></td><td> <input TYPE=hidden NAME=pass value=$password></td></tr>\n";
Edit the values here:
$user = "Username";
$host = "mail.server.com";
$pass = "Password";
It should work... Feel free to edit that bit of code so that it looks the way you want it to.