MIST 5990 - Zlatko Unger's PHP Experience

Friday, December 08, 2006

Final Project = Done

Ladies and gentlemen, the new face of UGASMIS is up.

Lets mark the calanders on December 9th, 2006 as the birth of the new SMIS website.

Point your eyes here: http://www.ugasmis.org/


This PHP experience has been fun and challenging. I'm glad I could make a difference in SMIS.

Tuesday, December 05, 2006

Final Project - Part 4

OK, here is an update...


  • add links to the bottom of the pages so you dont have to click the back button as often

DONE !
  • on the view files form have a more detailed date secion so that you can see what time of day the file has been updated. right now the database stores the time and the date in a field, I am going to try to have it shown on this page
DONE !
  • sort the files by date, rather than by name -- this way the most recent files are listed first
DONE !
  • increase the description filed to allow more characters inside of it
DONE!
  • try to hide the view and add file sites by having the session check inside of them (right now anyone who knows the url of the add file page can access it)
    the book does not specify how to do this, so this is all going to be fun guess work. however, this is not a big deal since the webiste is set so it does show open directories and there is a minimal security risk here
The book does not specify how to do this, again this is not a security threat, so i am not worried about it

  • if time permits create a logout button, not a problem
the book mentions logging out but this is done through cookies, and the way i have things setup right now does not use cookies, so this will be abandoned as well



Things to be done:
  • Add comments where possible
  • Figure out the login problem
    • FIXED.DONE

Monday, December 04, 2006

Final Project - Part 3

Finally, after hours of debugging and trying to get the session element to transfer over, I have finished the login page. I also incorperated the sitewidecss file. This means that the previous two benchmarks have been achieved. W00t!


Check it out:

This is what you see when you go to http://ugasmis.org/admin.php (autocomplete fills in my saved info)


Once logged in, you can either view or add files. Ntice that it calls me admin. This is because in the users table my id is associated with the 'position' value of admin.


Here we see upload dialogue...



When a file is uploaded text is shown comfirming the upload. here is an example:

File Untitled-4.jpg has been uploaded!

INSERT INTO uploads (file_name, file_size, file_type, description) VALUES ('Untitled-4.jpg', 56838, 'image/jpeg', 'one of the images i used to demonstrate that this works ')

Here we see uploaded files






Things that need to be done (color coded in terms of need):
  • add links to the bottom of the pages so you dont have to click the back button as often
  • on the view files form have a more detailed date secion so that you can see what time of day the file has been updated. right now the database stores the time and the date in a field, I am going to try to have it shown on this page
  • sort the files by date, rather than by name -- this way the most recent files are listed first
  • increase the description filed to allow more characters inside of it
  • try to hide the view and add file sites by having the session check inside of them (right now anyone who knows the url of the add file page can access it)
    the book does not specify how to do this, so this is all going to be fun guess work. however, this is not a big deal since the webiste is set so it does show open directories and there is a minimal security risk here
  • if time permits create a logout button, not a problem

Final Project - Part 2

Ok so I have been working on this all night. I got the files to upload, files to download. You can see whats going on here: http://ugasmis.org/admin.php

These are the things I'd like to do:
  • have a login page (perhaps a unique login for every officer)
  • add style to the page since its not using style sheets

Sunday, December 03, 2006

Final Project - Part 1

so I started working on this final project here is my progress

first i created a table uploads

SQL-query:
CREATE TABLE uploads(
upload_id int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
file_name varchar( 30 ) NOT NULL ,
file_size int( 6 ) unsigned NOT NULL ,
file_type varchar( 30 ) NOT NULL ,
description varchar( 100 ) default NULL ,
date_entered TIMESTAMP,
PRIMARY KEY ( upload_id ) ,
KEY ( date_entered )
)

then I started messing around with add_file.php

I got it to connect to the server, but im getting lots of errors
working on them one by one

here is the latest one

Fatal error: Call to undefined function: escape_data() in C:\Domains\ugasmis.org\wwwroot\_officers\add_file.php on line 24


that was fun, apparently the connections that the book uses and the one that the website uses is different ... i had to add some extra statements to correct overflow

here is the latest error

Could not connect to MySQL: Unknown MySQL Server Host 'DB_HOST' (11001)


grrr... thsi is just some lame error due to the fact that the way the book does stuff (more professional) is not in sync with the website which was designed poorly

anyway, we are sucessful !

File number 1 has been uploaded!

wooo hooo... its working ... yey ... check it out ... the files are saved as binary files ... hopefully the view file will make it all work ...


Saturday, December 02, 2006

final project

One of the things I got through my feedback channels was a great idea for my final part of the redesign:

It would be nice if there was an officers login that provided
functionality specific to officers. For example, it would be very
beneficial to be able to login and access a contact list that could be
updated rather than having each officer have his or her own contact
list as is the case now.
So my plan is to do just that.

  • Have a longin page where officers can log in.
    • Have a way to view current files
      • Have a way to upload/update files

For this I will need to create a few tables in the database, have a unique login page, fiddle around with PHP until I get it right. I say I should be done with this by the end of the week.

Good night and good luck.

Friday, December 01, 2006

updates be done

...so I talked to other members of SMIS this week and they sent me a list of things I should fix on the website.
There were bnch of spelling mistakes and typos. The site is almost done now.