Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Single Page Login That Displays The Contents Of A Directory


Im running into a problem, I have a single page login that displays the contents of a directory. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Phpbb Create A Single Login/logout Page
We run a medium sized website that hosts a phpbb forum. We want to create a custom login/logout script, and I have tried really hard to decrypt the phpbb code but find it really difficult.

Does anyone have a basic login/logout script that works with the phpbb database? So writing the sessions/cookies etc.

I want to be able to create a single login/logout page where i process everything - ie: set sessions/cookies for login (but finding it hard to work out what values/names to set).

View Replies !
Php Script That Displays Last Uploaded Jpg In A Directory
As title really, does anyone know of (or could write?) a php file which
in a directory of .jpg files display the most recent added to that
/dir?

View Replies !
Replacing A Single <div>'s Contents
The main contents for the About page (within the white portion of the page and contained within <div id="content">) are included using a standard <?php include(""); ?>. The idea here is of course to have a page that remains in place without having to load anew every time you click a link.

I would like to replace these contents (within the white section) with external pages when you click a link (such as Home, Contact, or About) by ONLY REPLACING that white section. Code:

View Replies !
Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

View Replies !
Read Contents Of An External XML Page And Then Parse Its Contents
I have a URL that generates an XML page. I'm trying to read its contents and parse the information. But, I keep receiving these error messages: Code:

View Replies !
Single Login
the php script For Single login at a time by one userid i.e. Using one userid no one can login in more than two machines or twice at a time.

View Replies !
Generate A PDF And IE Displays A Blank Page. What Happens?
I have two server one is local and the one is the live server? for the pdf in local it display in IE and give me a good results, but when i test it online (live) the IE gave me blank?

Is this something on limit time?

View Replies !
Safe_mod On A Single Directory ?
i d like to know if it s possible to apply safe_mod to just one directory in
order to test it with my scripts.


View Replies !
PHP Script That Displays Another Page Partial Content
If you go to http://europe.nokia.com/A4305060, fill the "Enter your
product code:" field with the value "0523183" and press "Go" (the
ending page URL varies because there's a variable session-ID in the
URL-link associated to "Go") you will obtain this string:

"Version: RM43_V1.10.030"

Is it possible to have a string.php page that just display this string?

View Replies !
Displays 5 Posts Per Page In Descending Order
I have been doing up a website which will, among other things, display news that I input into the MYSQL database. I have a working version of this where it just displays 5 posts per page in descending order (the latest at the top of the page) with the page numbering underneath them.

Now what I wan't to do is just dispaly the latest 5 posts on the page but, I want to dispaly them so that I can put in a Javascript function to maxamize and minimize each post by clicking on the title.

So, I have, ID, Title, Newstype, Author, Post, Date. In my mind I see this as display each of these using the COUNT(*) thing and just subtracting 1, 2, 3, 4 to get the 5 posts I want. I just don't know how to do it.

View Replies !
Make A Single Sign On Login
I want to make a single sign on login.I'm try using javascript but this is not function, if i use different server.Then i try using curl library. but it doesn't solve my problem.i don't have idea to solve this problem. So, anybody can give me idea?

View Replies !
Single Promotional Code For Login
I'm trying to create a form where people can register by entering their names, email addresses and one "promotional" code  (the same for everyone).

The names and emails I've got, I just can't seem to wrap my head around the notion of one single access code.

I mean, do I create a new table for just one value or do I have to do something else, and also what would the query look like?

View Replies !
Script That Reads My Log File And Displays It In An HTML Page.
I have a problem. I am trying to make a script that reads my log file and displays it in an HTML page. I got the base code from a book, being that I am still learning PHP and I needed a little help starting out. But the code I am using gives me an error.

The error is :

Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 15

It ranges from to line like so :

Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 27

I want to know if anyone knows the specific reason or maybe a place to start at to find out the problem and the solution.

View Replies !
Developing A Page That Displays Latest 5 Images In A Database
I am currently changing my web site so that it is PHP and mySQL powered. On the front page I have an area that will display the latest images in my portfolio and the latest text description.

Therefore, what I need is an admin page which allows me to upload images to a database which has a timestamp/date field, a thumbnail field, an image field, a text field for the title and a text field for the description. I also need a HTML form with inputs for the thumbnail upload, image upload, title and text description (in a textarea).

It would also be useful to have the page display the database contents and allow me to edit the details and also, delete rows. I then need code for that will display the most recent 5 thumbnails and the title on my index.php page.

View Replies !
Displays Page Will Not Parse Till The Sql Query Is Finished.
I had PHP 4.3.3 running before I updated. When a page was loading, all the php/html that was doing simple prints of tables and images would load while an sql query was running. When the sql finished, the rest of the page displayed. I have now updated to 5.2.3 and when I go to the exact same page, nothing displays until the sql has completely finished.

The issue with this whole thing is the javascript I had loading on certain pages that displayed an image telling the visitor "please wait, processing..". This no longer displays since the page will not parse till the sql query is finished.

View Replies !
PHP Page That Displays Html Based On The Address Enterd
I would like to have a PHP page that displays html based on the address enterd. For example:

index.php?example=a would show a page with <body>Example1234</body> whereas index.php?example=b would show a page with <body>Example5678</body>.

I've done this before, but I can't remember the code I used.

View Replies !
MySQL Query - Page Which Displays A List Of Orders
At the moment I have a page which displays a list of orders, with the following query: Code:

<?php
mysql_select_db($database_connOriental, $connOriental);
$query_rsOrders = "SELECT *, date_format(OrderDate, '%d %M %Y') as formatted_date FROM Orders INNER JOIN Customers WHERE OrderCustomerID = CustomerID ORDER BY OrderID ASC";
$rsOrders = mysql_query($query_rsOrders, $connOriental) or die(mysql_error());
$row_rsOrders = mysql_fetch_assoc($rsOrders);
$totalRows_rsOrders = mysql_num_rows($rsOrders);
?>
.........

View Replies !
How To Restrict Multiple Login Using A Single Account.
In my project there is a requirement. If a user logged in at a time
since he/she logged out others are not allowed to loggin using the
same user name. That is to avoid multiple logins using a account. How
to do this?

I had got a idea and implemented.

1. When a user logs in storing the username, ip, login time to db.
2. When a User logs in i'll check the table whether the username
exists in the table or not if yes i'll not allow the user to login
else i'll allow to loggin.
3. When he logs out i'll delete the record from the table. Then he/
she can login again.

But there is a problem in this the user can close the browser directly
or right click in the taskbar and close it or by pressing Alt + F4. So
for this i have to catch the things in Javascript and trigger the
logout.

Is is possible to catch the events in Javascript, if yes please
provide me.

Or Is there any other method to restrict multiple login using single
account.

View Replies !
How To Restrict Multiple Login Using A Single Account
In my project there is a requirement. If a user logged in at a time since he/she logged out others are not allowed to loggin using the same user name. That is to avoid multiple logins using a account. How to do this? Code:

View Replies !
Displaying Directory Contents.
Is it possible to display the contents of a directory onto a page with php? Is there a certain function for it?

View Replies !
PHP Directory Contents Displayer
I have the following script, which lists files within a specified web
directory (as long as they are valid extension types). It works, but I
would like the file names to be links (i.e. with hrefs) that allow you
to open that file directly from the page. Purpose of the script is
purely to display a list of photos within the directory, with links to
view those photos. PHP is not my strong-point. Any suggestions would
be very gratefully received... Here's the script....

//This function retrieves all files within a directory (non recursive)
and outputs them onto the page
//You can limit the type of files to retrieve, such as images only, as
dictated by the file's extension

function getfiles($dirname=".") {
$pattern="(.jpg$)|(.png$)|(.jpeg$)|(.gif$)"; //valid image
extensions
$files = array();
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)) //if this file is a valid image
echo "$file <br />";
}

closedir($handle);
}
return($files);
}
//EXAMPLE USAGE:
getfiles(); //List all image files within the directory the PHP script
is in
getfiles("/home/myserver/public_html/george"); //List all image files
within a specific directory on the server

View Replies !
Size Of Directory Contents
I want to find the size of all the files in a certain directory. I believe I have to start with: PHP Code:

View Replies !
View Contents Of Directory
I need a script that will display, in a table, all the contents of the folder. Like, for example, its filled with images, there will be a table and in each cell the file name with a link to the actual file. Can someone try to whip this up?

View Replies !
Viewing The Contents Of A Directory
Is there anyway to view images in a folder using php? I tried asking in perl and a guy replied saying use glob but i dont think we can so is there a way in php.

View Replies !
Copy Directory And Its Contents
i have a directory called user. I need a function that will copy user, and all files/directories under it to "../profiles/$id" Does anyone know a function that can do this for me?

View Replies !
Get A Directory Contents List
I recently wrote a script which grabbed a file list via ftp, pretty basic but the one problem is it doesn't work when the ftp server isn't running, is there any way in which I can get file lists without an ftp server.

I looked through the filesystem function list but could find something that stood out as giving a directory list. I am planning on eventually writing a whole file manager, but for now am just developing individual parts.

View Replies !
Copy() Directory Contents
I want to copy the contents of a directory to another directory each time the page is loaded it should automatically update a certain directory copy new files over from a certain other directory, of this makes sense. The page that is loaded will have a list of all the files that are now in a directory (shall call it destination) upon going to that page it will first check to see if there are any new files in another directory (shall call this one source) if there are then it will copy them over to the destination directory? I have tried using the copy(); function but opening a directory, reading it and then copying it over but doesnt work, it talks about the permissions being wrong (accessed denied).

View Replies !
Prevent Multiple Login For Single User Account?
how to prevent multiple login for single user account? eg user A login AccountA in german while user B also login AccountA in netherland(at the same time) that website.. how to prevent this? set login status in mysql or?

View Replies !
Listing A Directory & Its Contents As Html
I was wondering if i could do a while loop or something which would display the contents of an online directory (excel documents).. the contents would change regularly so it has to update dynamically/automatically. every different file would be displayed on a different line, and would link to that file (it would actually link to another php file, containing an iframe with the excel document in it).

View Replies !
Write The Contents Into A Newfile In A Different Directory.
I am opening a file copying the contents and trying to write the contents into a newfile in a different directory. but its not working.

<?php
if ($handle = opendir('/home/jarntz/cdstuff/files')) {
//echo "Directory handle: $handle";
echo "Files:";
while (false !== ($file = readdir($handle))) {
echo "$file<br>";

$namelen = strrpos ($file, ".");
$name = substr($file, 0, $namelen);
print "$name<br>";

$filename = "/home/jarntz/cdstuff/files/$file";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

$ncontents = nl2br ($contents);
$scontents = "Test<br>" . $ncontents;
print "$scontents<br><br>";

if($name){
$storefile = "/home/jarntz/cdstuff/html/" . $name . ".html";
print "$storefile<br>";
$myfile = fopen ($storefile, "w");
$fp = fwrite($myfile, $scontents);
fclose($myfile);
}
}
closedir($handle);
}
?>

View Replies !
Virtual Directory Does Not Allow Contents To Be Listed.
I am getting this error when I try to list a DIR using php:

This Virtual Directory does not allow contents to be listed. I was wondering if this is my hosting causing this error or if I need to show the script As there are no PHP erors I think it could be a hosting company problem.

View Replies !
Printing The Contents Of Each File In A Directory
I've been trying to create a PHP page that reads each file in a directory (txt, for example), and then outputs the contents of the file. The purpose for this is for someone advertising products for a website, so that he can use a form to describe the product, and then saves each entry as a new txt file.

I then want the php to print the contents of the file. I've set it up so that it is html code, so formatting is not an issue.

I've figured out how to read the contents of a single file, using file_get_contents. I can also display each file NAME from the directory. However, when I add file_get_contents into the loop, the php script wont run.

Here's what I have so far:

<?php

     $handle = opendir('sales');

if($handle)
{
   while(false !== ($file = readdir($handle)))
   {
print "$file <br>";

$contents = file_get_contents($file);
print "$contents <br>";
   }
closedir($handle);
}?>

I've tried using seperate php entries and also had a play with readf and such, but can't seem to get anything to work. It seems like a common thing to want to do, and I've probably just made a small mistake somewhere?

View Replies !
CHMOD An Entire Directory And Its Contents?
Basically I will have directories that my photographers will upload photos to. None of my photographers are computer savvy so I've embedded a Java applet that allows them to upload multiple files and/or directories with a single click (or two ).

The problem is this applet does not give the uploaded files the proper permissions to be modified by a script I have in those directories.

With that said, I would like to know if it's possible to have a script recursively CHMOD the entire directory that they are creating and/or uploading to? Code:

View Replies !
Listing Directory Contents For A User
1. Print company that houses user PDF files

2. User logs in and is brought to his own area

3. Dynamic customer inventory page is displayed based on PDF files in
a home directory (It would be nice if the MetaTag in a PDF file could
be used here)

4. Inventory page is also "order" page that allows for the ordering of
cases of printed items

5. Each inventory item will have a place for entering a number of
cases to be ordered

6. Order is submitted and emailed to owner of company who inputs
manually into billing system.

View Replies !
Reading A Directory And Displaying Its Contents As An URL
I am starting to play with php and i got a webfolder where i get regulary new files. I'm looking for a command that reads out a directory and then displays the url that would be required to download the file. Code:

View Replies !
Upload All The Contents Of A User Selected Directory
In php is the way to upload all the contents of a user selected directory up to a certain spot on a website?

View Replies !
Reading Remote Directory Contents W Sockets
I'm workin on a project that connects to a remote site via a socket. I have this working fine where it can read the contents of a specific file. Now I want to read the contents of a directory on the remote site so I can pick and choose which files (image files) I want to read. Any ideas?

View Replies !
Create Download Links From Directory Contents
i want to read a directories contents and create links so you can download the file - mpeg files i have this but the links wont work? Code:

View Replies !
Removing All Contents In A Directory Including Subdirectories
I'm trying to remove all of the files and subdirectories within a directory. The subdirectories may or may not have subdirectories.

I am using the following code. It removes files just fine, but it won't remove subdirectories. I need to make this code into some sort of loop that will remove all subdirectories and the files within those directories. Code:

View Replies !
Image Resize To Display Directory Contents
I have got upto the point where the dir contents will display only problem is the images are displayed in something like 1px by 1px. Here's the code as you can see, its simple code and the math is correct. It just won't work. PHP Code:

<?php
  $count = 0;
  $dir = "./images";

// open directory and parse file list
  if (is_dir($dir))
  {
  if ($dh = opendir($dir))
  {  }
  }
echo "-- $count FILES FOUND --";
?>

View Replies !
Read Contents Of Directory - If Not Text Files Exit
I have to make a page that shows the contents of a directory BUT if there are no text files in the folder I am supposed to kill the script. Code I tried (for that specific part of the script) was: Code:

$directory = dir("./courses/");
if(!(isset($directory[2]))){
die("No files in directory");
}

To my knowledge $directory[0] would be taken up by "." and [1] would have ".." so I thought if [2] isn't set then there isnt an actual file in the directory. I am sure there must be a better way of doing this however as [2] could easily be taken up by a folder or image and still come out true that there is a txt file.

View Replies !
PHP Dynamic Drop Down Menus, Page Displays Diff Data Depending On Dropdown Selected.
I currently have two drop down menus the first one with countries and then the second one changes depending on which country is selected to display counties.

This works fine, now what I want to do is have it so when it county is selected it shows all the squash clubs that are in that county below the drop downs. Code:

View Replies !
Create A Separate Page With One Login That Let's Me Login To All Of The Sripts At Once?
I'm building a website using various php scripts from I found on hotscripts. Because I'm not much of a programmer myself I'm using a separate script for the blog, another one for the links section and a different one for the gallery and so on. The downside to this is that I have to login on a separate page to update the gallery and another page to update the blog and so on.

Is there a simple way to either remove the need for a login for all the scripts and just create a separate page with one login that let's me login to all of the sripts at once?
Or if there's a script that can kinda save the passwords and logs in for me?

View Replies !
Refresh Page With New Contents Without Leaving The Page?
Basicly what i want to do is: i have a bunch of links. when i click that links the dynamic content from a mysql db appear above the links. I need to do this without open a new page because i'm using mootools with the acoordeon script, and inside each "tab" theres contents. when i'm inside one tab i want to have links, and clicking each link new contents appears.

When i do this opening a new page is easy, i just put on the links something like newpage.php?id=games and then the page newpage.php open and the recordeset from games is echoed. but how to do that without leaving the page? refreshing or something like that.

View Replies !
Main Page Login = Forum Login
This is going to be a website for a club im in at University. Now, I only want members of that club to be able to register.

The problem is that they pay a member fee. I want to know a way that when they pay me the fee (in person) I can give them a unique confirmation number from which they can register properly (sorta like a CD-Key). Code:

View Replies !
Redirect From The Login Page To The Login Page
I have been working on a cms, and I got the login and main admin page working, so what I am trying to do is make it so if your not logged it, it redirects you to the login page. But the problem is once it gets to the login page, it continues to redirect from the login page to the login page, so its nonstop. How can I fix this.. Code:

View Replies !
Linking Within A Single Page
i want to create a single PHP page where the links are linked to contents within that single page. can anyone please help me with this?

View Replies !
Single Page Website
I want to convert my site into a single-page PHP-site. So for instance to see the about page the URL would look something like http://www.mydomain.com/index.php?nav=about

I was thinking of making the index.php like this: PHP Code:

View Replies !
Secure Directory Login Using Php In IE6
Hi, I'm pretty new to php. Does anyone know how to login to a secured directory using php? I can get it to work when the site visitor is using mozilla, but IE will not allow a login due to the url spoofing fix.

I want to do it this way so I can disable autocomplete at the login page.

code I have is as follows:

View Replies !
Incorporate Into A Single Page Instead Of Using Two Pages.
I have a simple login script that I am trying to incorporate into a single page instead of using two pages. So the way I had it origionally is using two files, index.php, and checklogin.php. What I am trying to do is combine them into a single. So, basically, it would display the form, then run the checklogin.php to check the login and do what needs to be done. The files are below: Code:

View Replies !
Forum - Single Page W/ Includes
I'm coding a forum for one of the sites I maintain, and I'd like to ask the community's opinion. Should I code it one main page, index.php, and have it use includes like index.php?p=newthread or should I have multiple pages, i.e., index.php, newthread.php, attachment.php, etc. What do you guys think is the best way to code this?

View Replies !
Single Page Submission Problems For A CMS.
I'm working on a new content management system (CMS) for my website Allaboutthegames.net in particular the article submission page. Now at the moment we have separate forms for if the author is writing a review, a new story or a feature etc.

This is because while they all have common fields, reviews and features have an extra field for article_image and a review has an extra field review_score. Code:

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved