// 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 { ?>
Cao Chong Cheng Xiang - Cao Chong
Weighs an Elephant
Here’s a story featuring the world's largest land animal – and a boy named Cao Chong who was clever enough to figure out how to weigh one. Cao Chong was the son of Cao Cao, a famous emperor during the time of the Three Kingdoms around 200 A.D.
One day, guests from afar brought an elephant to Cao Cao as a gift. Since elephants are from southern Asia, Cao Cao's people had never seen one before. While they were commenting on the size of this giant animal, Cao Cao asked his wise men how much this elephant weighed. The wise men, with their long white beards, looked at each other and thought to themselves: How can it be possible to weigh the huge animal! There's no scale in the world that would be big enough! Cao Cao became a little upset. He bellowed, 'How come with all the wisdom in my country, I can't even figure out how much an elephant weighs?'
At this moment, a child stepped out and said that he could do it. It was Cao Cao's six-year-old son, Cao Chong. Everybody laughed, but Cao Chong didn't care. He ordered everyone and the elephant to go to the river. He had a large boat put into the water. Then he ordered the servants to lead the elephant onto the boat. While the boat sank lower, he told the boatman to mark the water level on the side of the boat. After the elephant was led off the boat, he ordered the servants to fill the boat with rocks. When there were enough rocks on the boat, the boat sank again into the water to where it was marked. Then Cao Chong told the people to weigh the rocks one by one and add up the weights. The total weight was what the elephant weighed!
Reading
Fun: Folk Stories |
© 2007 OneWorld Classrooms. All rights reserved.