// Start a session session_start(); if (!session_is_registered("auth")) { session_register("auth"); } $sessionId=session_id(); // open the mysql connection, $auth = false; // Assume user is not authenticated if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) { $msqusername="phurteau"; $msqpassword="p41r64h"; $msqdbname="120158_1"; mysql_connect('localhost',$msqusername,$msqpassword); mysql_select_db($msqdbname); $tablename = "ccphaccess"; // makes this hunk more portable // Check username and password agains the database. $cmdstr = "select china from ccphaccess where ((loginid='$PHP_AUTH_USER') && (password='$PHP_AUTH_PW'));"; $result = mysql_query($cmdstr); $num = mysql_num_rows($result); if ( $num != 0 ) { $auth = true; } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm="Creative Connnections Adventures"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { ?>
Bai Niao
Chao Feng: How Phoenix Became the Queen of All Birds
A long, long time ago, the phoenix was a small and plain-looking bird, nothing like what we think of her today. But, she worked very hard. Every day she woke up before all the other birds and spent the whole day gathering as many nuts and small fruits as she could find. The other birds liked to play. They laughed at the phoenix because she never played and sometimes picked up the food they dropped. They laughed at her because it seemed to them that she was a little silly -- only hoarding food all day long.
One year there was a long draught in the forest. All the other birds couldn't find food. They became so hungry that they couldn't even fly. The little phoenix took all the other birds to her small cave. She fed them with the food she had been collecting over the years and they all survived the draught.
The birds were very grateful and decided to give the phoenix something. They each plucked a feather and made a beautiful, shiny cloak. On the day of the phoenix's birthday, all the birds flew from all over the forest and presented the cloak to her. They also elected her to be the queen of all birds.
Reading
Fun: Folk Stories |
© 2007 OneWorld Classrooms. All rights reserved.