Multifarious Project A personal email-system Team Members Abdullah Alghamdi Metaib Alenzai Mohammed Alshehri Hamd Alshamsi.

Slides:



Advertisements
Similar presentations
IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Advertisements

PHP I.
1 Database Driven Web Application Clients Application Servers including web servers Database Server Traditional client-server (2-tier architecture): client:
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
Implementing Application Protocols. Overview An application protocol facilitates communication between applications. For example, an client uses.
E-Commerce The technical side. LAMP Linux Linux Apache Apache MySQL MySQL PHP PHP All Open Source and free packages. Can be installed and run on most.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
Web Page A page displayed by the browser. Website Collection of multiple web pages Web Browser: A software that displays web pages on client computer.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Programming with php By: Seth Larson. A little bit about PHP  PHP stands for PHP:  Hypertext Preprocessor  PHP is a widely-used general-purpose server-side.
Mandakini Ayushi Infotech Mandakini Kumari 22 nd July PHP Basic.
PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP is a powerful.
SCV1223 PHP - Hypertext Preprocessor. Introduction PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
PHP Hypertext PreProcessor. Documentation Available SAMS books O’Reilly Books.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Nael Alian Introduction to PHP
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
Multifarious Project Team Members Alberto Dominguez Nirmit Gang Jimmy Garcia Javier Handal.
A little PHP. Enter the simple HTML code seen below.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
Chapter 6: Authentications. Training Course, CS, NCTU 2 Overview  Getting Username and Password  Verifying Username and Password  Keeping The Verification.
1 Welcome to CSC 301 Web Programming Charles Frank.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Concepts  messages are passed through the internet by using a protocol called simple mail transfer protocol.  The incoming messages are.
Introduction to PHP Advanced Database System Lab no.1.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
WEB DEVELOPMENT WITH PHP/MYSQL. WEB DEVELOPMENT COURSE HAS DIFFERENT NAME IN DIFFERENT INSITUTES, THIS IS A CORE COURSE FOR BS/MS STUDENTS. THIS IS ALSO.
Dr. Venton Kepuska Donald L. Troup. Dynamic Web Calendar
Controlling Web Site Access Using Logins CS 320. Basic Approach HTML form a php page that collects the username and password  Sends them to second PHP.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
PHP Introduction PHP is a server-side scripting language.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
1 Server Side scripting PHP. 2 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are.
Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
A pache M ySQL P hp Robert Mudge Reference:
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Tonga Institute of Higher Education IT 141: Information Systems
A PRESENTATION ON (IN PHP,CSS,HTML)
Introduction to Dynamic Web Programming
Relational database and SQL MySQL LAMP SQL queries
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
Omer Idrees Hadi Garib Dulanjan Katuwawela Fu-Sheng Hung Chi-Ti Shih
Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be.
ALWAR INSTITUTE OF ENGINEERING & TECHNOLOGY
PHP / MySQL Introduction
BASIC PHP and MYSQL Edward S. Flores.
Database Driven Websites
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
Introduction to PHP.
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Web Application Development Using PHP
Presentation transcript:

Multifarious Project A personal -system Team Members Abdullah Alghamdi Metaib Alenzai Mohammed Alshehri Hamd Alshamsi

The Project Idea  system allows user to login securely into a web-based system.

SYSTEM LAYOUT User logs into the web based system Login page displayed to user as part of client side PHP scripts Authentication and data communication occurs between client and server Server performs processing and authentication procedures and returns appropriate response Server side checks for user profiles and details in the database

Programming Languages Used  PHP  HTML

PHP and Why?  PHP stands for PHP: Hypertext Preprocessor.  PHP runs on different platforms (Windows, Linux, Unix, etc.)  PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)  PHP is an open source software (OSS).  PHP is compatible with almost all servers used today (Apache, IIS, etc.)  PHP is easy to learn and runs efficiently on the server side.

HTML  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The markup tags tell the Web browser how to display the page  An HTML file must have an htm or html file extension  An HTML file can be created using a simple text editor

Logon.php  This is the main file. It contains the PHP code that will be executed once a username and password will be entered. It authenticates the username and password that are entered by the user by communicating with the server.  The code also sets the cookie for 1800 seconds and expires after that, so that the user has to logon again after that time period.  The code checks for an invalid usernames and passwords and prevents that kind of input from the user.  This file relays all the obtained information to INDEX.PHP and communicates with it.

Logon Page

Logon PHP Code if( isset($_POST['user']) && isset($_POST['pass']) ) { $mbox $_POST['user'], $_POST['pass']); if($mbox) { setcookie("auth",serialize(Array($_POST['user'],$ _POST['pass'])),time()+1800,"/",".fit.edu"); } else { setcookie('auth','',-1,"/",".fit.edu"); }

Logon HTML Code Login Login to Username: Password:

Auth PHP  AUTH.PHP contains the logic to authorize a user.  The main function in this PHP code is the Die function. If a user enters a wrong username/password or blank username/password, this function will prevent the user from logging in.  This file communicates this information to LOGON.PHP and acts as a bridge between the client and the mail server

Auth Code 1- function die_with_honor($s) { die("Error: \"$s\""); } 2- $bad_user = true; require(dirname(__FILE__)."/logon.php");

Index  INDEX.PHP verifies the authentication requested by LOGON.PHP by talking to the -server.  After verifying login, INDEX.PHP displays 20 messages per page and also displays the number of pages that are in the INBOX. As an example, if the user has 43 messages in his INBOX, then INDEX.PHP will display the first 20 messages and 3 pages.  INDEX.PHP communicates with AUTH.PHP file for user authentication purposes.  INDEX.PHP also contains the HTML code to display the contents of the inbox to the user who logs into the system.  INDEX.PHP also communicates with COMPOSE.PHP, DELETE.PHP and READ.PHP that perform different functions that are discussed later.

Index Page

Index PHP Code 1- $startMsg = 1; if(isset($_GET['start'])) $startMsg = $_GET['start']; $countMsg = 20; if(isset($_GET['count'])) $countMsg = $_GET['count']; 2- $messages = Array(); for($i=$startMsg; $i<$lastMsg; $i++) $messages[imap_uid($conn, $i)] = imap_headerinfo($conn, $i); imap_close($conn); ?>

Index HTML Code From: Subject: Received: Delete: Reply: $msg) { $bgcolor = ($msg->Unseen == 'U' || $msg- >Recent == 'N' ? 'lightgrey' : 'white'); ?>

Read  READ.PHP communicates with the database using SQL queries to retrieve data for a particular user.  It passes in the SQL query using the IMAP protocol to talk to the Florida Tech Mail Server.  The use of the IMAP protocol in READ.PHP allows this system to display simple text s, s with pictures and even s with pictures containing text.  The code also formats the contents of an that will be displayed to the user.  Once the entire procedure of reading an and displaying the to the user has been completed, it closed the IMAP connection that was established to talk to the Florida Tech mail server.

Read Page

Read PHP Code if (!isset($struct->parts)) { $content = imap_body($conn, $uid, FT_UID); $content = " $content "; } else { for($i=1; $i parts); $i++) { $content.= imap_fetchbody($conn, $uid, "$i", FT_UID); }

Read Code HTML Subject?> [ &count= ">Inbox ] [ ">Reply ] [ &start= &count= ">Delete ] [&nbs p; Logout ]

Compose  The COMPOSE.PHP file displays the HTML content required when the user has to compose an .  It also contains the code to reply to an , to delete an and also to logout of a system.  When a user hits the reply hyperlink at the top of the page, the entire text of the original mail is displayed in the compose window and then the user can proceed to send the reply to the concerned address.

Compose Page

Compose PHP Code 1- if(isset($_POST['to'])) { imap_mail($_POST['to'], $_POST['subject'], $_POST['body'], '', '', '', header("Location: index.php"); } $to = ''; $subject = ''; $body = ''; 2- if( isset($_GET['reply']) ) { $uid = $_GET['reply']; $conn = imap_open ("{mailhost.fit.edu}INBOX", $user, $pass); $header = imap_headerinfo($conn,imap_msgno($conn, $uid)); $struct = imap_fetchstructure($conn, $uid, FT_UID);

Compose HTML Code 1- Compose New Mail To: "> 2- [ Inbox ] [&nb sp; Logout ]

Delete  DELETE.PHP allows the user to delete any message that is selected by the user.  The actual delete function in PHP does not delete the message from the inbox.  So we use the expunge() function to actually delete the message.  Once the deletion is completed, the reordered list of s is displayed to the user.

Delete Code $conn = imap_open ("{mailhost.fit.edu}INBOX", $user, $pass); imap_delete($conn, $uid, FT_UID); imap_expunge($conn); imap_close($conn);

Logout setcookie('auth',null,-1,"/",".fit.edu"); header("Location: index.php");

THE END