Академический Документы
Профессиональный Документы
Культура Документы
Maritime Transport
Presented By:
Supervised By:
March 2011
Egypt Gate Web Development and Web Hosting
Acknowledgement
The work on This Project has been an inspiring, often exciting, sometimes challenging, but
always interesting experience. It has been made possible by many other people, who have
supported us.
We wish to thank Our Supervisor, Professor Dr. Gamal Selim, for his extensive support and
encouraging way of delivering knowledge, which helped us accomplish many successful
thoughts that would provide us with many benefits, not only through this Project, but also
through our career life.
2
Egypt Gate Web Development and Web Hosting
Abstract
C
lassified advertising is a form of advertising which is particularly common in
newspapers, online and other periodicals which may be sold or distributed free of
charge. Advertisements in a newspaper are typically short, as they are charged for by
the line, and one newspaper column wide. Classified advertising is called such because it is
generally grouped within the publication under headings classifying the product or service being
offered (headings such as Accounting, Automobiles, Clothing, Farm Produce, For Sale, For
Rent, etc.) and is grouped entirely in a distinct section of the periodical, which makes it distinct
from display advertising, which often contains graphics or other art work and which is more
typically distributed throughout a publication adjacent to editorial content. In recent years the
term "classified advertising" or "classified ads" has expanded from merely the sense of print
advertisements in periodicals to include similar types of advertising on computer services, radio,
and even television."Egypt Gate" is an interactive, user friendly, classified advertisements
solution, where users can post his personal adverts whether they were registered or not, but
registration will allow him to send and receive messages to and from other registered users;
knowing that registration is completely free .You can post unlimited number of advertisements
choosing from suggested categories in order to be posted and viewed in the regular category
page. The user interface of this web site is very user friendly; user can find everything he needs
easily.
3
Egypt Gate Web Development and Web Hosting
Table of Contents:
Acknologemnt................................................................................................................................2
Abstract..........................................................................................................................................3
List of figures.................................................................................................................................7
List of tables...................................................................................................................................8
Abbreviations.................................................................................................................................9
Chapter 1 Introduction..............................................................................................................10
1.1 Overview................................................................................................................................11
1.2 Definitions:.............................................................................................................................11
1.3 Developments.........................................................................................................................12
1.4 Statistics..................................................................................................................................13
1.5 Famous Classified Ads Web Sites..........................................................................................14
1.5.1 Gumtree...............................................................................................................................14
1.5.2 Ebay Classifieds..................................................................................................................15
1.5.3 Locanto................................................................................................................................17
1.6 Aim of the project...................................................................................................................18
1.7 The main objective of the project...........................................................................................18
1.8 Project planing........................................................................................................................19
Chapter 2 Hypertext Preprocessor and Structured Query Language..................................20
2.1 Hypertext Preprocessor (PHP)...............................................................................................21
2.2 History....................................................................................................................................22
2.3 Usage......................................................................................................................................24
2.4 Security...................................................................................................................................25
2.5 Speed Optimization................................................................................................................26
2.6 Why using PHP not HTML....................................................................................................26
2.7 PHP , ASP comparison...........................................................................................................27
2.8 PHP and database...................................................................................................................29
2.9 Database.................................................................................................................................30
2.10 Structured Query Language (SQL)......................................................................................30
2.10.1 Basic SELECT Query.......................................................................................................30
2.10.2 WHERE Clause.................................................................................................................31
2.10.3ORDER BY Clause............................................................................................................31
2.10.4 Merging Data from Multiple Tables :INNER JOIN.........................................................32
2.10.5 INSERT Statement............................................................................................................33
2.10.6 UPDATE Statement .........................................................................................................33
2.10.7 DELETE Statement...........................................................................................................34
2.11 What is MySQL....................................................................................................................34
2.12 Creat a connection to a MySQL Database...........................................................................34
2.12.1 Closing a connection.........................................................................................................35
Chapter 3 Main SystemDesgin And Architure........................................................................36
3.1 Requirements..........................................................................................................................37
3.1.1 Functional requirements......................................................................................................37
3.1.2 Constitutional requirements................................................................................................37
3.1.2.1 Non registered users rights...............................................................................................37
3.1.2.2 Registered users rights......................................................................................................38
4
Egypt Gate Web Development and Web Hosting
5
Egypt Gate Web Development and Web Hosting
6
Egypt Gate Web Development and Web Hosting
List of figures:
7
Egypt Gate Web Development and Web Hosting
List of tables:
8
Egypt Gate Web Development and Web Hosting
Abbreviations:
9
Egypt Gate Web Development and Web Hosting
Chapter 1
Introduction
Egypt Gate
10
Egypt Gate Web Development and Web Hosting
1.1 Overview:
Classified advertisements are much cheaper than larger display advertisements used by
businesses, and are mostly placed by private individuals with single items they wish to sell or
buy.
1.2 Definitions:
Purposes of advertising:
Giving Information: The first and the most important purpose of advertisement are to inform the
public about the availability of new product, service or an idea that is being sold in the market.
This is aimed for creating a demand for new product and the new product has to be known to
public.
11
Egypt Gate Web Development and Web Hosting
To Persuade: Advertisement not only informs but also serves to influence the public to buy the
product or services. For example a company seeks to induce the public to buy its particular brand
of soap in preference to others.
To Remind: Advertisement also serves to remind consumers of existing products, that the
product may be needed in future and where to buy the product. It is necessary for the advertiser
to constantly draw the attention of consumer to his product and away from other competitive
brands, which may be heavily advertised.
1.3 Developments
In recent years the term "classified advertising" or "classified ads" has expanded from
merely the sense of print advertisements in periodicals to include similar types of advertising on
computer services, radio, and even television, particularly cable television but occasionally
broadcast television as well, with the latter occurring typically very early in the morning hours.
Like most forms of printed media, the classified ad has found its way to the Internet.
Internet classified ads do not typically use per-line pricing models, so tend to be longer.
They are also searchable, unlike printed material, tend to be local, and may foster a greater sense
of urgency as a result of their daily structure and wider scope for audiences. Because of their
self-policing nature and low cost structures, some companies offer free classifieds
internationally. Other companies focus mainly on their local hometown region, while others
blanket urban areas by using postal codes. Craigslist.org was one of the first online classified
sites, and has grown to become the largest classified source, bringing in over 14 million unique
visitors a month according to comScore Media Metrix. A number of online services called
aggregators crawl and aggregate classifieds from sources such as blogs and RSS feeds, as
opposed to relying on manually submitted listings.
12
Egypt Gate Web Development and Web Hosting
Additionally, other companies provide online advertising services and tools to assist members in
designing online ads using professional ad templates and then automatically distributing the
finished ads to the various online ad directories as part of their service. In this sense these
companies act as both an application service provider and a content delivery platform. Social
classifieds is niche that is growing in online classified ads.
1.4 Statistics
In 2003 the market for classified ads in the United States was $15.9 billion (newspapers),
$14.1 billion (online) according to market researcher Classified Intelligence. The worldwide
market for classified ads in 2003 was estimated at over $100 billion. Perhaps due to the lack of a
standard for reporting, market statistics vary concerning the total market for internet classified
ads. The Kelsey Research Group listed online classified ads as being worth $13.3 billion[citation
needed], while Jupiter Research provided a conservative appraisal of $2.6 billion as of
2005[citation needed] and the Interactive Advertising Bureau listed the net worth of online
classified revenue at $2.1 billion as of April 2006.
13
Egypt Gate Web Development and Web Hosting
1.5.1 Gumtree
Gumtree.com was founded in March 2000 by Michael Pennington and Simon Crookall as
a local London classified ads and community site, designed to connect people who were either
planning to move, or had just arrived in the city, and needed help getting started with
accommodation, employment and meeting new people.
In May 2005, Gumtree.com was acquired by Kijiji, eBay’s internal classifieds group, for
an undisclosed sum. At the time of the acquisition, Gumtree already was available in multiple
cities in a number of countries including the United Kingdom, Poland, France, Canada,
Australia, New Zealand, South Africa, Hong Kong and Dubai.
14
Egypt Gate Web Development and Web Hosting
eBay Inc. is an American Internet company that manages eBay.com, an online auction
and shopping website in which people and businesses buy and sell a broad variety of goods and
services worldwide. Founded in 1995, eBay is one of the notable success stories of the dot-com
bubble; it is now a multi-billion dollar business with operations localized in over thirty countries.
eBay expanded from its original "set-time" auction format to include "Buy It Now" standard
shopping; shopping by UPC, ISBN, or other kind of SKU (via Half.com); online classified
advertisements (via Kijiji or eBay Classifieds); online event ticket trading (via StubHub); online
money transfers (via PayPal) and other services.
The online auction website was founded as AuctionWeb in San Jose, California, on
September 3, 1995, by French-born Iranian computer programmer Pierre Omidyar as part of a
larger personal site that included, among other things, Omidyar's own tongue-in-cheek tribute to
the Ebola virus. One of the first items sold on eBay was a broken laser pointer for $14.83.
Astonished, Omidyar contacted the winning bidder to ask if he understood that the laser pointer
was broken. In his responding email, the buyer explained: "I'm a collector of broken laser
pointers." The frequently repeated story that eBay was founded to help Omidyar's fiancée trade
Pez candy dispensers was fabricated by a public relations manager in 1997 to interest the media.
This was revealed in Adam Cohen's 2002 book, The Perfect Store, and confirmed by eBay.
Chris Agarpao was hired as eBay's first employee and Jeffrey Skoll was hired as the first
president of the company in early 1996. In November 1996, eBay entered into its first third-party
licensing deal, with a company called Electronic Travel Auction to use SmartMarket Technology
to sell plane tickets and other travel products. Growth was phenomenal; in January 1997 the site
hosted 2,000,000 auctions, compared with 250,000 during the whole of 1996.
The company officially changed the name of its service from AuctionWeb to eBay in
September 1997. Originally, the site belonged to Echo Bay Technology Group, Omidyar's
consulting firm. Omidyar had tried to register the domain name echobay.com, but found it
already taken by the Echo Bay Mines, a gold mining company, so he shortened it to his second
choice, eBay.com. (Echobay.com is now owned by Echobay Partners, Ltd., a private equity firm
based in Nevis.)
In 1997, the company received $6.7 million in funding from the venture capital firm
Benchmark Capital.
15
Egypt Gate Web Development and Web Hosting
Meg Whitman was hired as eBay President and CEO in March 1998. At the time, the
company had 30 employees half a million users and revenues of $4.7 million in the United
States. eBay went public on September 21, 1998, and both Omidyar and Skoll became instant
billionaires. eBay's target share price of $18 was all but ignored as the price went to $53.50 on
the first day of trading.
As the company expanded product categories beyond collectibles into almost any
saleable item, business grew quickly. In February 2002, the company purchased IBazar, a similar
European auction web site founded in 1995 and then bought PayPal on October 14, 2002.
In early 2008, the company had expanded worldwide, counted hundreds of millions of
registered users, 15,000+ employees and revenues of almost $7.7 billion. After nearly ten years
at eBay, Whitman made the decision to enter politics. On January 23, 2008 the company
announced that Whitman would step down on March 31, 2008 and John Donahoe was selected to
become President and CEO. Whitman remained on the Board of Directors and continued to
advise Donahoe through 2008. In late 2009, eBay completed the sale of Skype for $2.75 billion,
but will still own 30% equity in the company.
In July 2010, eBay was sued for $3.8 billion by XPRT Ventures which accused eBay of
stealing information shared in confidence by the inventors on XPRT's own patents, and
incorporated it into features in its own payment systems, such as PayPal Pay Later and PayPal
Buyer Credit.
December 20, 2010, EBay Inc. says it will acquire a German online shopping club -
brand4friends for 150 million Euro ($197 million) to strengthen the company fashion business in
Europe. It is subject to regulatory approval and expected to close it in the Q1 2011.
16
Egypt Gate Web Development and Web Hosting
1.5.3 Locanto
Locanto is a worldwide online classifieds network with areas dedicated to jobs, personals,
for rent, for sale, services, community, real estate, vehicles, and pets. Locanto Classifieds is
available in 38 countries worldwide, covering over 1600 cities and 5 major languages and is
considered as competition for Craigslist .
The Locanto Classifieds sites are operated by the German startup company Yalwa located
in Wiesbaden, Germany. Locanto was launched in July 2006 with a local classifieds site for New
York. One month later, on August 21, 2006, the service was extended to the U.S. cities of
Boston, Chicago, Los Angeles and San Francisco. As of 2007, every major U.S. city has its own
accessible site for the Locanto classifieds service. In addition, Locanto classifieds sites are now
available in 5 languages for more than 1600 cities in 38 countries worldwide.
Locanto is one of three local web applications, including Askalo and Yalwa, created by
the German start-up company, Yalwa. Klaus P. Gapp, CEO and founder of Yalwa, previously
founded and operated OpusForum.org, a local classifieds site for the German speaking market.
OpusForum.org was bought by Ebay in 2005 and merged with its classifieds site Kijiji one year
later.
17
Egypt Gate Web Development and Web Hosting
To provide a classified advertisements to traders and users to assist them in to trade their
products all over Egypt.
To provide an indexed view of the advertisements of which will be easier to look for the
thing a user want.
This site gives the user an electronic free market targeting a large number of customers.
User can buy products, sell his old car, rent a flat and find a job from the same place.
This site saves money and time for both traders and users.
Provide all convenience media to user to browse user-friendly Classifieds website.
Convert real business to an application.
Simplify interactions for online consumers.
Solving traffic crowdedness.
Greater access to information.
Simplifying comparison between products or items.
Giving user wide variety of products.
18
Egypt Gate Web Development and Web Hosting
1. Brain storming
Gathering and collecting information about different ideas for the graduation project.
2. Choosing the tools
Analyzing the project idea into real world to model that can be implemented and used
trying our best to make it end user soloution.
3. System design
Drawing models and designing system menus.
4. Implementation
Building a system using suitable tools.
5. Documentation
Writing a user documentation to describe the phases of building the system .
19
Egypt Gate Web Development and Web Hosting
Chapter 2
Web Development
And
20
Egypt Gate Web Development and Web Hosting
PHP was originally created by Rasmus Lerdorf in 1995and has been in continuous
development ever since. The main implementation of PHP is now produced by the PHP Group
and serves as the de facto standard for PHP as there is no formal specification. PHP is free
software released under the PHP License.
21
Egypt Gate Web Development and Web Hosting
2.2 History:
PHP originally stood for personal home page.Its development began in 1994 when the
Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called
'Personal Home Page Tools' to maintain his personal homepage, including tasks such as
displaying his résumé and recording how much traffic his page was receiving.
A development team began to form and, after months of work and beta testing, officially
released PHP/FI 2 in November 1997.Zeev Suraski and Andi Gutmans, two Israeli developers at
the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the
language's name to the recursive initialism PHP: Hypertext Preprocessor.Afterwards, public
testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then
started a new rewrite of PHP's core, producing the Zend Engine in 1999.They also founded Zend
Technologies in Ramat Gan, Israel.On May 22, 2000, PHP 4, powered by the Zend Engine 1.0,
was released.As of August 2008 this branch is up to version 4.4.9. PHP 4 is no longer under
development nor will any security updates be released.
On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II.PHP 5
included new features such as improved support for object-oriented programming, the PHP Data
Objects (PDO) extension (which defines a lightweight and consistent interface for accessing
databases), and numerous performance enhancements.In 2008 PHP 5 became the only stable
version under development. Late static binding had been missing from PHP and was added in
version 5.3.
22
Egypt Gate Web Development and Web Hosting
A new major version has been under development alongside PHP 5 for several years.
This version was originally planned to be released as PHP 6 as a result of its significant changes,
which included plans for full Unicode support. However, Unicode support took developers much
longer to implement than originally thought, and the decision was made in March 2010to move
the project to a branch, with features still under development moved to trunk.Changes in the new
code include the removal of register_globals,magic quotes, and safe mode.The reason for the
removals was that register_globals had given way to security holes, and the use of magic quotes
had an unpredictable nature, and was best avoided. Instead, to escape characters, magic quotes
may be replaced with the addslashes() function, or more appropriately an escape mechanism
specific to the database vendor itself like mysql_real_escape_string() for MySQL. Functions that
will be removed in future versions and have been deprecated in PHP 5.3 will produce a warning
if used.Many high-profile open-source projects ceased to support PHP 4 in new code as of
February 5, 2008, because of the GoPHP5 initiative,provided by a consortium of PHP developers
promoting the transition from PHP 4 to PHP 5.
PHP currently does not have native support for Unicode or multibyte strings; Unicode support is
under development for a future version of PHP and will allow strings as well as class, method,
and function names to contain non-ASCII characters.
PHP interpreters are available on both 32-bit and 64-bit operating systems, but on
Microsoft Windows the only official distribution is a 32-bit implementation, requiring Windows
32-bit compatibility mode while using Internet Information Services (IIS) on a 64-bit Windows
platform. As of PHP 5.3.0, experimental 64-bit versions are available for MS Windows.logic.
The technology focuses on data rather than processes, with programs composed of self-sufficient
modules ("classes"), each instance of which ("objects") contains all the information needed to
manipulate its own data structure ("members"). This is in contrast to the existing modular
programming which had been dominant for many years that focused on the function of a module,
rather than specifically the data, but equally provided for code reuse, and self-sufficient reusable
units of programming logic, enabling collaboration through the use of linked modules
23
Egypt Gate Web Development and Web Hosting
(subroutines). This more conventional approach, which still persists, tends to consider data and
behavior separately.
2.3 Usage:
PHP primarily acts as a filter,taking input from a file or stream containing text and/or
PHP instructions and outputs another stream of data; most commonly the output will be HTML.
Since PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend
Engine, giving improved performance over its interpreter predecessor.
Originally designed to create dynamic web pages, PHP now focuses mainly on server-
side scripting,and it is similar to other server-side scripting languages that provide dynamic
content from a web server to a client, such as Microsoft's Asp.net, Sun Microsystems' JavaServer
Pages,and mod_perl. PHP has also attracted the development of many frameworks that provide
building blocks and a design structure to promote rapid application development (RAD). Some
24
Egypt Gate Web Development and Web Hosting
of these include CakePHP, Symfony, CodeIgniter, and Zend Framework, offering features
similar to other web application frameworks.
The LAMP architecture has become popular in the web industry as a way of deploying
web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and
MySQL, although the P may also refer to Python or Perl or some combination of the three.
WAMP packages (Windows/ Apache/ MySQL / PHP) and MAMP packages (Macintosh /
Apache / MySQL / PHP) are also available.
As of April 2007, over 20 million Internet domains had web services hosted on servers
with PHP installed and mod_php was recorded as the most popular Apache HTTP Server
module.PHP is used as the server-side programming language on 75% of all web servers.Web
content management systems written in PHP include MediaWiki,Joomla, eZ Publish,
WordPress,Drupal and Moodle.All websites created using these tools are written in PHP,
including the user-facing portion of Wikipedia, Facebook, and Digg.
2.4 Security:
These vulnerabilities are caused mostly by not following best practice programming
rules: technical security flaws of the language itself or of its core libraries are not frequent (23 in
2008, about 1% of the total).Recognizing that programmers cannot be trusted, some languages
include taint checking to detect automatically the lack of input validation which induces many
issues. Such a feature is being developed for PHP,but its inclusion in a release has been rejected
several times in the past.Hosting PHP applications on a server requires careful and constant
attention to deal with these security risks.There are advanced protection patches such as Suhosin
and Hardening-Patch, especially designed for web hosting environments.
25
Egypt Gate Web Development and Web Hosting
PHPIDS adds security to any PHP application to defend against intrusions. PHPIDS
detects Cross-site scripting (XSS), SQL injection, header injection, Directory traversal, Remote
File Execution, Local File Inclusion, Denial of Service (DoS).
PHP source code is compiled on-the-fly to an internal format that can be executed by the
PHP engine.In order to speed up execution time and not have to compile the PHP source code
every time the webpage is accessed, PHP scripts can also be deployed in executable format using
a PHP compiler.
Code optimizers aim to enhance the performance of the compiled code by reducing its
size, merging redundant instructs and making other changes that can reduce the execution time.
With PHP, there are often opportunities for code optimization.An example of a code optimizer is
the eAccelerator PHP extension.Another approach for reducing compilation overhead for PHP
servers is using an opcode cache. Opcode caches work by caching the compiled form of a PHP
script (opcodes) in shared memory to avoid the overhead of parsing and compiling the code
every time the script runs. An opcode cache, APC, will be built into an upcoming release of
PHP.
Opcode caching and code optimization can be combined for best efficiency, as the
modifications do not depend on each other (they happen in distinct stages of the compilation).
2.6 Why use dynamic PHP in Egypt Gate not static HTML pages?
26
Egypt Gate Web Development and Web Hosting
It is the simplest way to pull over a complete portal, thanks to its open source engine; it
allows anyone to implement new modules or to modify and to personalize existing
modules.
It is very intuitive and easy to learn.
It is easy to modify by those who intend to personalize the program.
It is easy to use by the lesser experts among us.
27
Egypt Gate Web Development and Web Hosting
There are no requirements to purchase commercial licenses and pay continuously for
upgrades. For example, to perform binary file uploads, retrieve a file via FTP or HTTP,
encrypt passwords in MD5, or send email from a Web page require 3rd party commercial
software packages in ASP. It’s all available for free in PHP.
PHP is platform-agnostic
It will run on Linux, Solaris, Windows, and other operating systems as well. With ASP
you’re also forced down a path that is very costly and painful to extricate yourself from.
For example, what if you wanted to switch web hosting providers to one that was more
reliable and had better customer service but was Linux-based? ASP only runs reliably on
Microsoft Windows-based web servers.
It’s more popular than ASP, Cold Fusion, Perl, or any other web programming language.
28
Egypt Gate Web Development and Web Hosting
Both PHP and relational database management systems (RDBMSs) are extremely common in
software today. Since relational databases don't store objects directly (though some RDBMSs
have object-oriented features to approximate this), there is a general need to bridge the two
worlds.
The problem of bridging object-oriented programming accesses and data patterns with relational
databases is known as Object-Relational impedance mismatch. There are a numbers of
approaches to cope with this problem, but no general solution without downsides.
29
Egypt Gate Web Development and Web Hosting
2.9 Database:
A database is an integrated collection of data. Many different strategies exist for organizing data
in databases to facilitate easy access to and manipulation of the data. A database management
system (DBMS) provides mechanisms for storing and organizing data in a manner that is
consistent with the database’s format. Database management systems enable programmers to
access and store data without worrying about the internal representation of databases.
Today’s most popular database systems are relational databases. Almost universally, relational
databases use a language called Structured Query Language (SQL—pronounced as its individual
letters or as “sequel”) to perform queries (i.e., to request information that satisfies given criteria)
and to manipulate data.
Some popular, enterprise-level relational database systems include Microsoft SQL Server,
Oracle™, Sybase™, DB2™, Informix™ and MySQL™.
Let us consider several SQL queries that extract information from database Books. A typical
30
Egypt Gate Web Development and Web Hosting
SQL query “selects” information from one or more tables in a database. Such selections are
performed by SELECT queries. The basic format for a SELECT query is:
SELECT * FROM tableName
In this query, the asterisk (*) indicates that all columns from the tableName table of the database
should be selected.
In most cases, users search a database for records that satisfy certain selection criteria. Only
records that match the selection criteria are selected. SQL uses the optional WHERE clause in a
SELECT query to specify the selection criteria for the query. The simplest format for a
SELECT query that includes selection criteria is:
SELECT fieldName1, fieldName2, … FROM tableName WHERE criteria
31
Egypt Gate Web Development and Web Hosting
The results of a query can be arranged in ascending or descending order using the optional
ORDER BY clause. The simplest forms for an ORDER BY clause are:
SELECT fieldName1, fieldName2, … FROM tableName ORDER BY field ASC
SELECT fieldName1, fieldName2, … FROM tableName ORDER BY field DESC
The ORDER BY clause also can be used to order records by multiple fields. Such queries are
written in the form:
ORDER BY field1 sortingOrder, field2 sortingOrder, …
Database designers often split related data into separate tables to ensure that a database does not
store data redundantly. For example, the Books database has tables Authors and Titles. We use
an AuthorISBN table to provide “links” between authors and their corresponding titles. If we
did not separate this information into individual tables, we would need to include author
information with each entry in the Titles table. This would result in the database storing
duplicate author information for authors who wrote multiple books.
Often, it is necessary for analysis purposes to merge data from multiple tables into a single set of
data. Referred to as joining the tables, this is accomplished via an INNER JOIN operation in the
SELECT query. An INNER JOIN merges records from two or more tables by testing for
matching values in a field that is common to the tables. The simplest format for an INNER
JOIN clause is:
SELECT fieldName1, fieldName2, …
FROM table1
INNER JOIN table2
ON table1.fieldName = table2.fieldName
32
Egypt Gate Web Development and Web Hosting
The INSERT statement inserts a new record in a table. The simplest form for this statement is:
INSERT INTO tableName ( fieldName1, fieldName2, …, fieldNameN )
VALUES ( value1, value2, …, valueN )
where tableName is the table in which to insert the record. The tableName is followed by a
comma-separated list of field names in parentheses. The list of field names is followed by the
SQL keyword VALUES and a comma-separated list of values in parentheses. The specified
values in this list must match the field names listed after the table name in both order and type
(for example, if fieldName1 is specified as the firstName field, then value1 should be a string in
single quotes representing the first name).
An UPDATE statement modifies data in a table. The simplest form for an UPDATE statement
is:
UPDATE tableName
SET fieldName1 = value1, fieldName2 = value2, …, fieldNameN = valueN
WHERE criteria
where tableName is the table in which to update a record (or records). The tableName is
followed by keyword SET and a comma-separated list of field name/value pairs written in the
format, fieldName = value. The WHERE clause specifies the criteria used to determine which
record(s) to update.
33
Egypt Gate Web Development and Web Hosting
An SQL DELETE statement removes data from a table. The simplest form for a DELETE
statement is:
DELETE FROM tableName WHERE criteria
where tableName is the table from which to delete a record (or records). The WHERE clause
specifies the criteria used to determine which record(s) to delete.
MySQL is a database.
The data in MySQL is stored in database objects called tables.
A table is a collections of related data entries and it consists of columns and rows.
Databases are useful when storing information categorically. A company may have a database
with the following tables: "Employees", "Products", "Customers" and "Orders".
Before you can access data in a database, you must create a connection to the database.
Syntax
mysql_connect(servername,username,password);
34
Egypt Gate Web Development and Web Hosting
The connection will be closed automatically when the script ends. To close the connection
before, use the mysql_close() function:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($con);
?>
35
Egypt Gate Web Development and Web Hosting
Chapter 3
And
Architecture
36
Egypt Gate Web Development and Web Hosting
3.1 Requirements:
Egypt Gate web soloution will provide all required services for organizing and
conducting an advert, posting process. It will support all actors involved; namely
administrators, traders and users. It will also feature an easy and user-friendly
environment for the interaction of the end uers with the system while considering the
appropriate sociological and behavioral aspects.
The Egypt Gate web soloution must support the registration of all persons that are
eligible to post and. at the same tune, provide some kind of unique identification that will
allow the system to organize the ueser's advertisments.
1. Browse: they can browse almost all the website and all the advetisments .
2. Post: they can post advertisments without being registerd.
3. Search: they can search for the advert they want.
4. Register: registration is completely free of charge and it allows the users to do more
with the website .
37
Egypt Gate Web Development and Web Hosting
1. Accuracy/Completeness: Egypt Gate web solution should record the adverts correctly.
2. Verifiability: Should be possible to verify that adverts are correctly counted for in the
final tally
3. Integrity: Adverts should not be able to be modified without detection.
4. Reliability: The system must be resistant to randomly generated malfunctions.
5. Auditability: There should be a reliable and authentic adverts records.
6. Usability: The system must be very easy to use.
38
Egypt Gate Web Development and Web Hosting
Model Detail
This document provides a complete overview of all element details. For simpler and more
focused reports, simply copy this initial template and turn off the sections not required.
Type: Package
Package: Model
GUID: {1EAEE549-F419-4428-ACA8-2DC3C311286D}
Last Modified:04/03/2011
GUID: {C1DA9883-2065-4263-9C8F-9F5A8CAA330C}
39
Egypt Gate Web Development and Web Hosting
sign in
«include»
Register
«include»
sign out
«include»
«include»
user
serv ices
electronics
Brow se
«include»
«include»
Monitor the
alter
adv ertisements administrator
delete
administrator
Type: Actor
40
Egypt Gate Web Development and Web Hosting
GUID: {F10AC146-4729-483f-8378-6F1CB944FEDC}
Connections
Connector Source Target Notes
user
Type: Actor
GUID: {8FBAA2C6-3661-46df-BDD5-278A16645DD2}
41
Egypt Gate Web Development and Web Hosting
Connections
Connector Source Target Notes
Browse
Type: UseCase
42
Egypt Gate Web Development and Web Hosting
GUID: {5258B356-4434-4fe9-A568-E1A0680C4FC3}
Connections
Connector Source Target Notes
GUID: {5ABB894C-868E-4251-815D-D07067F681FF}
Connections
43
Egypt Gate Web Development and Web Hosting
Register
Type: UseCase
GUID: {6D5F7FA1-32E0-45e6-8590-AA126267AE76}
Connections
Connector Source Target Notes
44
Egypt Gate Web Development and Web Hosting
alter
Type: UseCase
GUID: {3A10943E-B8E3-418e-BD1C-B03D7A0B0505}
Connections
Connector Source Target Notes
cars
Type: UseCase
GUID: {4E4962FD-4671-4a2e-B84F-29EE287A042D}
45
Egypt Gate Web Development and Web Hosting
Connections
Connector Source Target Notes
GUID: {3350FCE6-1A1F-4b5e-A150-09505A56F385}
46
Egypt Gate Web Development and Web Hosting
Connections
delete
Type: UseCase
GUID: {33E9180C-0519-40be-B1BD-B6489F3890AD}
Connections
47
Egypt Gate Web Development and Web Hosting
electronics
Type: UseCase
GUID: {80E443F3-4908-4174-BC54-06F366F348BE}
Connections
Connector Source Target Notes
48
Egypt Gate Web Development and Web Hosting
GUID: {DAC6B7C0-DE28-46bb-8380-37198A6163AF}
Connections
Connector Source Target Notes
homes
Type: UseCase
GUID: {8232877D-C623-45db-AB2E-F09719C3C248}
Connections
49
Egypt Gate Web Development and Web Hosting
jobs
Type: UseCase
GUID: {0A6B1248-9EE0-417e-A032-7B8939283A6B}
Connections
Connector Source Target Notes
play game
Type: UseCase
GUID: {0C893214-2F56-4e40-BC3A-8307A5964B4A}
Connections
50
Egypt Gate Web Development and Web Hosting
post advertisements
Type: UseCase
GUID: {2F4FF72C-F74F-4514-AB0E-1C5CD91567F9}
Connections
Connector Source Target Notes
51
Egypt Gate Web Development and Web Hosting
services
Type: UseCase
GUID: {3398CA12-4660-49ff-9F0B-27B88478E713}
Connections
52
Egypt Gate Web Development and Web Hosting
sign in
Type: UseCase
GUID: {EA2AF234-DE64-45ab-B006-697D8752D449}
Connections
Connector Source Target Notes
sign out
Type: UseCase
GUID: {B5FA44E9-1CF9-4a12-A437-94BCC25D1B69}
Connections
Connector Source Target Notes
Object1
Type: Object
GUID: {E2CBAB1A-A6B2-4e30-BAC1-831D4DAA5951}
Connections
Connector Source Target Notes
54
Egypt Gate Web Development and Web Hosting
Actors
Type: Package
GUID: {A39DFC2F-0983-47e5-9009-3167C138CAAD}
Last Modified:15/12/2005
GUID: {A2D0F299-D951-46fd-97D3-0F4D0209E7CC}
uc Actors
User
55
Egypt Gate Web Development and Web Hosting
User
Type: Actor
GUID: {8066845D-D5B7-44b7-B884-A29A36025778}
Connections
Connector Source Target Notes
56
Egypt Gate Web Development and Web Hosting
GUID: {D5374B6E-17B8-4651-9971-3351C9452418}
Last Modified:05/01/2006
GUID: {D53D8728-0F82-42fd-916D-9E46BFE0433A}
System Boundary
The System Boundary shows the
logical interface between users
and the system being described.
Use Case1
User
Use Case2
57
Egypt Gate Web Development and Web Hosting
Use Case1
Type: UseCase
GUID: {062E0E66-3142-451c-92BA-1BF868556C1C}
Connections
Connector Source Target Notes
58
Egypt Gate Web Development and Web Hosting
sd Use Case1
Object1
User
Object1
Type: Sequence
GUID: {C08AC599-073C-48dc-AD87-554B550C0270}
59
Egypt Gate Web Development and Web Hosting
Connections
Connector Source Target Notes
Use Case2
Type: UseCase
GUID: {D1A3F7A8-378F-4a4b-9AC3-DCE73DE60CBC}
Connections
60
Egypt Gate Web Development and Web Hosting
Model Detail
This document provides a complete overview of all element details. For simpler and more
focused reports, simply copy this initial template and turn off the sections not required.
Type: Package
Package: Model
GUID: {6433294B-3C84-4eb3-94B6-A2FFDA633A05}
Last Modified:04/03/2011
GUID: {55CA96E7-7C75-44fa-B48A-D871BC60F407}
61
Egypt Gate Web Development and Web Hosting
dfd xyz
personal data
user data
advertisements
messages
advertisements
advertisements messages
related sites
messages
administrator
Type: External
GUID: {58B8E520-01BF-4ba5-B625-26119EB8AC6E}
Custom Properties
isActive = False
62
Egypt Gate Web Development and Web Hosting
Custom Properties
Connections
Connector Source Target Notes
user
Type: External
63
Egypt Gate Web Development and Web Hosting
GUID: {15CB3D8F-1630-4719-AF4E-147BA9132377}
Custom Properties
isActive = False
Connections
Connector Source Target Notes
64
Egypt Gate Web Development and Web Hosting
GUID: {D7AA5E57-610F-49ce-8D4A-5E8D2A421E2C}
Custom Properties
isReadOnly = False
65
Egypt Gate Web Development and Web Hosting
Custom Properties
precondition =
isSingleExecution = False
postcondition =
parameterName =
_defaultDiagramType = DiagramProfile::DataFlowDiagram
Connections
Connector Source Target Notes
66
Egypt Gate Web Development and Web Hosting
67
Egypt Gate Web Development and Web Hosting
Process1
Type: Process
GUID: {291CBC68-1511-420b-A940-14C96EAEDC7D}
Custom Properties
isReadOnly = False
precondition =
isSingleExecution = False
postcondition =
parameterName =
_defaultDiagramType = DiagramProfile::DataFlowDiagram
Connections
Connector Source Target Notes
68
Egypt Gate Web Development and Web Hosting
69
Egypt Gate Web Development and Web Hosting
Chapter 4
All the computers in the Web can communicate with each other.
70
Egypt Gate Web Development and Web Hosting
Web clients view the pages with a program called a web browser.
71
Egypt Gate Web Development and Web Hosting
The collection of all your web pages is called your web site.
To let others view your web pages, you must publish your web site.
To publish your work, you must copy your site to a web server.
72
Egypt Gate Web Development and Web Hosting
73
Egypt Gate Web Development and Web Hosting
Get a DNS hostname for the Internet connection hosting the web site.
Get a static local IP address for your computer within your local network.
Configure the Firewall to allow your web server to communicate on port 80.
Get Apache, a free, high-quality web server program. If you have Windows
XP Professional, you also have the option of Microsoft Internet Information
Server (IIS).
Replace the default home page with your own web page.
74
Egypt Gate Web Development and Web Hosting
Domain names must be registered. When domain names are registered, they
are added to a large domain name register. In addition, information about the
web site, including the IP address, is stored on a DNS server.
DNS stands for Domain Name System. A DNS server is responsible for
informing all other computers on the Internet about the domain name and the
web site address.
75
Egypt Gate Web Development and Web Hosting
STATIC WEB PAGE: A static web page shows the required information to
the viewer, but do not accept any information from the viewer.
This is different from client-side scripting where scripts are run by the
viewing web browser, usually in JavaScript. The primary advantage to
server-side scripting is the ability to highly customize the response based on
the user's requirements, access rights, or queries into data stores.
Server-side scripts are never visible to the browser as these scripts are
executes on the server and emit HTML corresponding to user's input to the
page.
ASP
ANSI C scripts
76
Egypt Gate Web Development and Web Hosting
PHP
SMX
Lasso
WebDNA
77
Egypt Gate Web Development and Web Hosting
Chapter 5
Implementation Tools
78
Egypt Gate Web Development and Web Hosting
5.1.1 Overview:
79
Egypt Gate Web Development and Web Hosting
available (both commercial and free) for most web development tasks from simple rollover
effects to full-featured shopping carts.
Dreamweaver, like other HTML editors, edits files locally then uploads them to the
remote web server using FTP, SFTP, or WebDAV. Dreamweaver CS4 now supports the
Subversion (SVN) version control system.
ActionScript
Active Server Pages (ASP).
ASP.NET (no longer supported as of version CS4 -
http://kb2.adobe.com/cps/402/kb402489.html)
C#
Cascading Style Sheets (CSS)
ColdFusion
EDML
Extensible HyperText Markup Language (XHTML)
Extensible Markup Language (XML)
Extensible Stylesheet Language Transformations (XSLT)
HyperText Markup Language (HTML)
Java
JavaScript
JavaServer Pages (JSP) (no longer supported as of version CS4 -
http://kb2.adobe.com/cps/402/kb402489.html)
PHP: Hypertext Preprocessor (PHP)
Visual Basic (VB)
Visual Basic Script Edition (VBScript)
Wireless Markup Language (WML)
It is also possible to add your own language syntax highlighting. In addition, code completion is
available for many of these languages.
80
Egypt Gate Web Development and Web Hosting
5.2 MySQL:
5.2.1 Overview:
Free-software projects that require a full-featured database management system often use
MySQL. Where the project may lead to something in commercial use, the license terms need
careful study. Some free software project examples: WordPress, phpBB, Drupal and other
software built on the LAMP software stack. MySQL is also used in many high-profile, large-
scale World Wide Web products, including Wikipedia, Google and Facebook.
81
Egypt Gate Web Development and Web Hosting
5.2.2 Uses:
MySQL is a popular choice of database for use in web applications, and is a central
component of the widely used LAMP web application software stack—LAMP is an acronym for
"Linux, Apache, MySQL, PHP". Its popularity is closely tied to the popularity of PHP. MySQL
is used in some of the most frequently visited web sites on the Internet, including Flickr,
Facebook, Wikipedia, Google—though not for searches, Nokia.com and YouTube.
MySQL is written in C and C++. Its SQL parser is written in yacc, and a home-brewed
lexical analyzer named sql_lex.cc.
MySQL works on many different system platforms, including AIX, BSDi, FreeBSD, HP-
UX, i5/OS, Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, eComStation,
OS/2 Warp, QNX, IRIX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos,
Tru64 and Microsoft Windows. A port of MySQL to OpenVMS also exists.
82
Egypt Gate Web Development and Web Hosting
5.2.4 Third-party
Several other third-party proprietary and free graphical administration applications (or "front
ends") are available that integrate with MySQL and enable users to work with database structure
and data visually. Some well-known front ends, in alphabetical order, are:
Adminer – a free MySQL front end written in one PHP script, capable of managing
multiple databases, with many CSS skins available.
DBEdit – a free front end for MySQL and other databases.
dbForge GUI Tools — a set of tools for database management that includes separate
applications for schema comparison and synchronization, data comparison and
synchronization, and building queries.
HeidiSQL – a full featured free front end that runs on Windows, and can connect to local
or remote MySQL servers to manage databases, tables, column structure, and individual
data records. Also supports specialised GUI features for date/time fields and enumerated
multiple-value fields.
Navicat – a series of proprietary graphical database management applications, developed
for Windows, Macintosh and Linux.
Other available proprietary MySQL front ends include Aqua Data Studio, dbForge Studio
for MySQL, Epictetus, Oracle SQL Developer, SchemaBank, SQLyog, SQLPro SQL
Client, Toad, Toad Data Modeler
Open Office – The database part of Open Office can manage MySQL databases. (You
must install all of the Open Office suite. It is free and open source.)
phpMyAdmin – a free Web-based front end widely installed by Web hosts worldwide,
since it is developed in PHP and is included in the convenient LAMP stack and WAMP
software bundle installers.
83
Egypt Gate Web Development and Web Hosting
5.3 phpMyAdmin
5.3.1 Overview:
phpMyAdmin is an open source tool written in PHP intended to handle the administration
of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying
or deleting databases, tables, fields or rows; executing SQL statements; or managing users and
permissions.
5.3.2 History:
Tobias Ratschiller, then an IT consultant and later founder of the software company
Maguma, started to work on a PHP-based web front-end to MySQL in 1998, inspired by
MySQL-Webadmin. He gave up the project (and phpAdsNew, of which he was also the original
author) in 2000 because of lack of time.
84
Egypt Gate Web Development and Web Hosting
By that time, phpMyAdmin had already become one of the most popular PHP
applications and MySQL administration tools, with a large community of users and contributors.
In order to coordinate the growing number of patches, a group of three developers registered The
phpMyAdmin Project at SourceForge.net and took over the development in 2001.and worked out
a short-term deal with scanner manufacturer Barneyscan to distribute copies of the program with
a slide scanner; a "total of about 200 copies of Photoshop were shipped" this way.
During this time, John traveled to Silicon Valley and gave a demonstration of the
program to engineers at Apple and Russell Brown, art director at Adobe. Both showings were
successful, and Adobe decided to purchase the license to distribute in September 1988. While
John worked on plug-ins in California, Thomas remained in Ann Arbor writing program code.
Photoshop 1.0 was released in 1990 for Macintosh exclusively.
Web interface
Export data to various formats: CSV, SQL, XML, PDF (via the TCPDF library), ISO/IEC 26300
- OpenDocument Text and Spreadsheet, Word, Excel, LaTeX and others
Transforming stored data into any format using a set of predefined functions, like displaying
BLOB-data as image or download-link
85
Egypt Gate Web Development and Web Hosting
5.4.1 Introduction:
This document provides a comprehensive overview of the capabilities of Sparx Systems’
Enterprise Architect 7.1. Each section focuses on a particular aspect of Enterprise Architect,
providing an introduction to the purpose and benefits of each capability.
Enterprise Architect is a visual platform for designing and constructing software systems, for
business process modeling, and for more generalized modeling purposes. Enterprise Architect is
based on the latest UML specification. UML defines a visual language that is used to model a
particular domain or system (either proposed or existing). Enterprise Architect is a progressive
tool that covers all aspects of the development cycle, providing full traceability from the initial
design phase through to deployment, maintenance, testing and change control.
86
Egypt Gate Web Development and Web Hosting
87
Egypt Gate Web Development and Web Hosting
implementations range from single users to companies with over 1000 seats working on large,
distributed projects.
88
Egypt Gate Web Development and Web Hosting
The production of documentation is essential to realizing the full benefit of Enterprise Architect.
Enterprise Architect outputs high quality documentation in either RTF or HTML format. You
can modify the RTF formatting directly with RTF Style templates to alter the look and feel of
generated output. Using Microsoft® Word® you can further enhance the output by connecting
and interweaving model output in linked documents.
There are many ways to specify the Enterprise Architect content being documented. You can:
· Document a package and/or its child packages by manually highlighting the package and
selecting a documentation control.
· Specify embedded packages for exclusion if child packages are recursively documented.
· Link a package to an RTF document template to simplify generating consistent types of
documentation (such as Use Case reports) using the Documents feature.
You can select group and order packages together in a manner different from the project view by
creating ‘virtual’ documents.
89
Egypt Gate Web Development and Web Hosting
90
Egypt Gate Web Development and Web Hosting
5.5.1 Introduction:
WampServer is a Windows web development environment. It allows you to create web
applications with Apache, PHP and the MySQL database. It also comes with PHPMyAdmin to
easily manage your databases.
WampServer installs automatically (installer), and its usage is very intuitive. You will be able to
tune your server without even touching the setting files.
WampServer is the only packaged solution that will allow you to reproduce your production
server. Once WampServer is installed, you have the possibility to add as many Apache, MySQL
and PHP releases as you want.
WampServer also has a trayicon to manage your server and its settings.
91
Egypt Gate Web Development and Web Hosting
5.5.2 Installing
Double click on the downloaded file and just follow the instructions. Everything is
automatic. The WampServer package is delivered whith the latest releases of Apache, MySQL
and PHP.
Once WampServer is installed, you can add other releases by downloading them on this
website. They will then appear in the WampServer menu and you will be able to switch releases
with a simple click.
Each release of Apache, MySQL and PHP has its own settings and its own files (datas for
MySQL).
5.5.3 Functionalities
WampServer's functionalities are very complete and easy to use so we won't explain here
how to use them.
With a left click on WampServer's icon, you will be able to:
- manage your Apache and MySQL services
- switch online/offline (give access to everyone or only localhost)
- install and switch Apache, MySQL and PHP releases
- manage your servers settings
- access your logs
- access your settings files
- create alias
With a right click :
- change WampServer's menu language
- access this page
92
Egypt Gate Web Development and Web Hosting
93
Egypt Gate Web Development and Web Hosting
WampServer allows you to install almost all the existing releases of Apache, PHP and MySQL
so you can reproduce exactly the settings of your production server.
To add a new release, donwload it here and install it.
Then click on the WampServer menu and activate the release that you want to use.
94
Egypt Gate Web Development and Web Hosting
Chapter 6
Implementation Details
95
Egypt Gate Web Development and Web Hosting
6.1 Screen 1:
96
Egypt Gate Web Development and Web Hosting
6.2 Screen 2:
97
Egypt Gate Web Development and Web Hosting
6.3 Screen 3:
98
Egypt Gate Web Development and Web Hosting
5.4 Screen 4:
99
Egypt Gate Web Development and Web Hosting
6.5 Screen 5:
100
Egypt Gate Web Development and Web Hosting
6.6 Screen 6:
101
Egypt Gate Web Development and Web Hosting
6.7 Screen 7:
102
Egypt Gate Web Development and Web Hosting
6.8 Screen 8:
103
Egypt Gate Web Development and Web Hosting
6.9 Screen 9:
104
Egypt Gate Web Development and Web Hosting
Figure 6.10: Adding user authentication(log In,Out and Restrict Acces to page)
105
Egypt Gate Web Development and Web Hosting
106
Egypt Gate Web Development and Web Hosting
107
Egypt Gate Web Development and Web Hosting
108
Egypt Gate Web Development and Web Hosting
109
Egypt Gate Web Development and Web Hosting
Chapter 7
110
Egypt Gate Web Development and Web Hosting
7.1 Conclusion:
Classifieds ads received a great interest in the last few years as a normal result of the huge
growth in electronic and digital communications. An ideal Classifieds ads solution must at least
meet four main characteristics, which are security, privacy, accuracy, and mobility.
The time performance of the system also an important issue, the system should be able to serve
any number of users connected to the system in concurrency sessions with reasonable processing
time for each user.
There is an inverse relationship between security and practicality. i.e. systems that are highly
secured have little practicality and systems that are highly practical are minimally secured.
There exist few cryptographic schemes which fulfill a wide range of user requirements. They
use sophisticated cryptographic tools that make them hard to implement.
The future is expected to have more changes due to the new software, hardware and
privacy issues. The next few paragraphs will show some of these changes.
Hardware
New hardware will allow the storage of larger database with more details about every
user. This should enhance the detection and prediction of users' behavior.Higher processing
power will allow the use of time consuming models which can guarantee more accurate results.
Software
New operating systems are supposed to detect users' behavior in different fields. These
operating systems should enable browsers to transfer anonymous information about the
users' behavior to smart Web site, allowing these Web sites to serve their users' better.
Navigation applications are expected to search automatically for the contents that suit the
customer requirements within the pages. For example a page will contain a lot of
information, and the browser will select what to show. Although this will need more
loading time of the pages, it will insure user's privacy since no preference information is
sent to other Web sites.
111
Egypt Gate Web Development and Web Hosting
Privacy
As we said before, security is one of the most important issues that affect the user's
confidence in the internet. Most users will hate to know that their information is collected and
saved somewhere on the internet. Companies that will save users' information should request
user confirmation first. A very powerful encryption should be applied to the database so that no
one can gain access to the information collected about users.
112
Egypt Gate Web Development and Web Hosting
References:
Books
Websites
1. www.w3shools.com
2. www.htmldog.com
3. www.php.net
4. www.wikipedia.org
1. www.back2college.com
113
Egypt Gate Web Development and Web Hosting
Abbreviations:
114