Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help with PHP pulling up pictures from a HTML file.
Old 12-21-2005, 10:54 AM Help with PHP pulling up pictures from a HTML file.
Junior Talker

Posts: 1
Trades: 0
Hello to all!
I am new here and also new to PHP.

I amattempting to build a website that will allow "Memeber Only access using a PHP script I found on the internet.

Please go to http://www.divasoccer.com/CCC_Web/html/members_only.htm, from here click on the "Member Login" link at the upper right corner. You will see that it points to the index.php file. Well, by looking at the code it would seem that the index.php is to pull up a file called login.htm. However when it does, all the pictures are missing (I get the box with the red X).

I downloaded this script and I am trying to make it fit into my website scheme. To see the original script in action, go to http://www.divasoccer.com/CCC_Web/security/index.php

I am trying to make this fit into my website scheme. Can anybody help me with this?

The PHP code for the index.php is:
<?php
include ("config.php");
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
$action_g = $_GET["a"];
$user = $_POST["loginname"];
$time=time();
if ($action_g == 'LostPassword')
{
if (isset($user))
{
$u_path = "$userdb/profile-{$user}.dat";
if (file_exists($u_path)) {
$uf = fopen($u_path, "r");
$size = filesize($u_path) + 1;
$u_data = fgets($uf, $size);
$u_data = explode("}{", $u_data);
fclose($uf);
list ($email, $fullname, $username, $real_password, $date, $real_ip) = $u_data;
$syndikutcp = date("Y");
$syndikut = "Powered by Download Manager Ultra-Lite Copyright $syndikutcp www.syndikut.org";
$mailbody = "Hello {$u_data[1]}\n\nYou are receiving this email because you (or someone pretending to be you) have requested your password to be reset for your account at $company.\n\nYour login details are below\n\nUsername: $username\n\nPassword: $real_password\n\n--\nThanks, \n\n$company\n\n $companyurl\n\n___________________________________ ____________________________\n$syndikut";
mail($email, "$company: Lost Pass", $mailbody, "From: $company <{$adminnoreply}>");
$u_data = $email."}{".$fullname."}{".$username."}{".$real_pa ssword."}{".$date."}{".$real_ip."}{";
$uf = fopen($u_path, "w");
fputs($uf, $u_data);
fclose($uf);
}
else
{
include("_inc/lostpwd_error.htm"); exit;
}
include("_inc/lostpwd_done.htm"); exit;
}
include("_inc/lostpwd.htm"); exit;
}
$username = $_POST[user];
$password = $_POST[pass];
$uol=$username;
if ($username && $password)
{
$u_path = "$userdb/profile-{$username}.dat";
if (!file_exists($u_path)) { include ("_inc/login_invalidpwd.htm"); exit; }
$uf = fopen($u_path, "r");
$size = filesize($u_path) + 1;
$u_data = fgets($uf, $size);
$u_data = explode("}{", $u_data);
fclose($uf);
list (, , $real_username, $real_password, , $real_ip) = $u_data;
if ($username == $real_username && $password == $real_password)
{
setcookie ("user", $_POST[user]);
setcookie ("pass", $password);
header("Location: manager.php"); exit;
}
else
{
include ("_inc/login_invalidpwd.htm"); exit;
}
}
if(isset($HTTP_COOKIE_VARS[user]) && ($HTTP_COOKIE_VARS[pass]))
{
header("Location: manager.php"); exit();
}
else
{
include ("_inc/login.htm");
}
?>

Again, thanks in advanced for any help!
Chad
ctsutherland is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Help with PHP pulling up pictures from a HTML file.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09018 seconds with 12 queries