1 / 17

Webpage and database design for hosannabroadcasting

Webpage and database design for http:// www.hosannabroadcasting.com. Chia-Yao Chien. Motivation.

rodd
Download Presentation

Webpage and database design for hosannabroadcasting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Webpage and database design for http://www.hosannabroadcasting.com Chia-Yao Chien

  2. Motivation • The fundamental concept behind Hosanna Broadcasting Network (HBN) is to target the most dynamic emerging markets on earth: Africa, the Middle East, Europe and India. HBN is the first and only Christian radio network to market  with a wide range of coverage. HBN is dedicated to bring the message of Jesus Christ to the under-served areas via high quality digital satellite radio to parts of the world that have not been penetrated by the gospel.

  3. Theory • Basically the website is built on a server company called ”startlogic”. • They allow clients to access the database using phpmyadmin and php webpages.

  4. Design Login page Register Form for first time user Forgot ID Forgot password After Login Chat room Guestbook

  5. Design • Administrator page • asc/desc order • able/disable user • Email • Newletters

  6. Design • Blog • Entry/re-entry for the content • Blog display page • Calendar mode for the blog • Favorites • Contact

  7. Session( ) • Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. • How to access it • session_start() • $_session[‘save_this’] = $save_this_one;

  8. Session( ) • How to read the data from session • session_start() • $save_from_prev_page = $_session[‘save_this’]; Note: php cannot output ANYTHING before calling session_start(), (orother functions that need to sendheaders, like cookie setting).

  9. Cookie( ) • setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace.

  10. Cookie( ) • How to us cookie <?php $value = 'something from somewhere'; setcookie("TestCookie", $value); setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */

  11. Cookie( ) • setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1); ?> • Path The path on the server in which the cookie will be available on. • Domain The domain that the cookie is available. • Secure Indicates that the cookie should only be transmitted over a secure HTTPS connection.

  12. Cookie( ) • Access cookie • echo $_COOKIE["TestCookie"]; • if($_COOKIE['name'] == null){ die; } • Delete cookie • setcookie ("TestCookie", "", time() - 3600);

  13. Blog • Give and initial date, and if the current date < initial date, go to the initial date, else, go to the current. • Use $_GET['date'] to get the date on the url • Flipbar output the url with dates

  14. Blog $today = date('Ymd'); if (isSet($_GET['date'])) { if ($_GET['date'] < $initial_entry_date) { // Go to first entry if the specified date is earlier than range $date = $initial_entry_date; } elseif ($_GET['date'] > $today) { // Go to last entry if specified date is later than range $date = $today; } else { $date = $_GET['date']; } } else { $date = $today; }

  15. Blog $prevdate = $date - 1; $nextdate = $date + 1; if ($date == $initial_entry_date) { $flipbar = "\n<P CLASS=\"next\"><A HREF=\"$PHP_SELF?date=$nextdate\">Next --></A></P>\n"; } elseif ($date == $today) { $flipbar = "\n<P CLASS=\"previous\"><A HREF=\"$PHP_SELF?date=$prevdate\"><-- Previous</A></P>\n"; } else { $flipbar = "\n<TABLE BORDER=0><TR><TD WIDTH=\"50%\" ALIGN=\"left\"><SPAN CLASS=\"previous\"> <A HREF=\"$PHP_SELF?date=$prevdate\"><-- Previous</A></SPAN></TD> <TD WIDTH=\"50%\" ALIGN=\"right\"><SPAN CLASS=\"next\"> <A HREF=\"$PHP_SELF?date=$nextdate\">Next --> </A></SPAN></TD></TR></TABLE>\n"; }

  16. Blog with Calendar mode • Use date() and mktime() calculate the dates for the calendar • $date = mktime (0, 0, 0, $month, $date, $year); • $actualDate = date(“m-d-y", $Febdate2[$i]); • In sql query, take out all the dates that matches with the month of the page

  17. Calendar Mode

More Related