I need a basic PHP script.
Firstly the script will show a password box and login button.
Once logged in. The page will show two links, just call name them 'Link One' and 'Link Two'.
When either Link 1 or Link 2 is clicked the script will show a link at the top of the page called 'Upload an image' and will have Browse and Upload buttons along with a 'Home' link to go back to the previous view (where link One and Link Two are displayed).
Below these links the page will then list all image files (png,bmp,gif,jpg/jpeg) inside a predesignated folder. It will not display non-image files in the list.
The predesignated folder will be determined by $img for 'Link one' and $img2 for 'Link Two' e.g. $img = "imgs/" $img2 = "images/"
Listsed files will look like this:
[login to view URL]
[login to view URL]
[login to view URL]
Each file name listed will be a link and when clicked this will delete the image from the server. The page will give an 'Are you sure? - yes/no' message before deleting the file.
If the user clicks the 'Upload an image' Browse button at the top of the page, the script will open a window through wich the user can navigatae and pick an image file to be uploaded. Once a file is selected the user can click the 'Upload' button. (Change the upload view is you know an easier way)
If the upload button is clicked the script will check to see if a file has been chosen. If no file has been selected, it will do nothing. If a file has been selected it will upload the image to the predesignated folder (either $img or $img2) and will show the uploaded image in the center of the screen with two options below it. 'Confirm' which keeps the image or 'Cancel' which deletes the uploaded file from the server.
Uploaded images should retain their original filename. If a file with that name already exists a rolling number will be added to the end. The upload file limit is 0.5MB. So if [login to view URL] exists, the uplaoded file will be called [login to view URL] and after than image2.bmp...
After a user clicks Confirm or Cancel the scrips will go back to the view where it lists the images in that directory.
So in a nut shell:
1. Login
2. Show Links
3. List files in a directory (either $img or $img2) and list images in them. If image names are clicked, show a prompt and delete the images from the server. Show upload link and 'Home' link at top of page.
4. Uploaded images will view in the center of the page with confirm and cancel options. Once a link is chosen the scrips lists all files in that directory including the file just uploaded.
Each numbered part above can be an individual .php file. See attatched image file.
Please comment your code
Hi.. I very much would like to take up this project and would like to submit the work done in time to your satisfaction… Please check PMB & waiting for further instructions soon… best regards….