إعلانيمكن أن تكون علامتك التجارية هناعلامتك التجارية هنافي كل صفحة من Darslab · طلاب وأولياء أمور ومعلمونinfo@darslab.comاسأل عن الأسعارالأسعارinfo@darslab.com
☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

Designing the site pages

الأسبوع 4 · الوحدة ٢ «متطلبات ومراحل إنتاج المشروع» (١) مرحلة تصميم صفحات الموقع: مراحل المشروع الثلاث، مخطط صفحات الموقع، وظيفة كل صفحة، صفحتا الترويسة والاتصال تُكتبان مرة وتُضمَّنان · 3 دروس
2

Eight files, eight jobs

ICT Secondary 2 Term 1, Unit 2, Topic 1: pp. 29–39
GoalName the eight files of the site and the job of each.
New words
connection page · a page the visitor never sees, which opens the connection to the databaseheader page · a page holding the banner and the links, shown at the top of every pagehelp page · a page about the site and how to use itcase-sensitive · treating capital and small letters as different letters
Explanation

The site has exactly eight files, and each has one job. index.php is the start page with the links. connection.php opens the connection to the database; the visitor never sees it. header.php holds the banner and the six links (Main, Add, Search, Edit, Delete, Help) and appears at the top of every page. add_term.php adds a term, search_term.php finds one, edit_term.php changes one, del_term.php deletes one, and help.php explains the site and how to use it. A help page of a real site often says who made it and how to contact them; for the club, use an invented address. One more point: write file names in lowercase with underscores, and always use the same spelling. Some servers are case-sensitive, so a link to Add_Term.php will not find a file named add_term.php.

FileJobSeen by the visitor?
index.phpstart page with the linksyes
connection.phpopens the database connectionno
header.phpbanner and six links, on every pageyes, as part of each page
add_term.phpadd a termyes
search_term.phpsearch for a termyes
edit_term.phpchange a termyes
del_term.phpdelete a termyes
help.phpabout the site and how to use ityes
Worked examples
GroupFilesHow many
start pageindex.php1
helper filesconnection.php, header.php2
task pagesadd, search, edit, delete, help5
all together8
Mona counts the files in the table and gets eight: one start page, two helper files (connection and header), and five task pages. She does not forget the helper files, even though they are not task pages.
Link saysFile is namedCase-sensitive serverOther server
add_term.phpAdd_Term.phpnot foundfound
add_term.phpadd_term.phpfoundfound
Youssef saves a file as Add_Term.php, but the link in the menu says add_term.php. On a server that is case-sensitive, the link cannot find the file. On a server that is not, it works. Using one lowercase spelling everywhere avoids the problem.
Class activity

For your own small site from last lesson, make a table with three columns: file name, job, and “seen by the visitor?”. Include one helper file that the visitor never sees. Use lowercase names with underscores.

Practice
1
Which file opens the connection to the database, and does the visitor see it?
2
What does header.php hold?
3
How many files does the site have?
4
Why write file names in one lowercase spelling?