// 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 { ?>
Si Ma Guang Za Gang - Si Ma Guang
Breaks the Tank
Here's a story that can be found in school textbooks across China, the story of how Si Ma Guang saved the day. [Si Ma Guang was a famous scholar and politician during the Bei Song Dynasty (960-1127AD).]
When Si Ma Guang was merely a child of 7 years old, he loved to study and was very clever. One day when he was seven years old, he was playing with children in the neighborhood. They found an isolated garden and started to play hide-and-seek. There was a big water tank in the garden made of pottery and filled with rainwater. When the children were looking for a place to hide, they suddenly heard screaming for help. They rushed back to where they started and found that a small child had climbed up the water tank and fell into it. The water tank was deep and the child couldn't swim. Slowly he began to drown and the other kids were not strong enough to pull him out of the water. Some of them started to cry and they ran back to get the adults for help. Si Ma Guang, on the other hand, wasn't crying at all. He thought hard for a second and suddenly had an idea. He found a big rock and used all his force to break the bottom of the water tank open. The water rushed out and, by the time the adults arrived, the child was already saved.
Reading
Fun: Folk Stories |
© 2007 OneWorld Classrooms. All rights reserved.