// 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 { ?>
Ke
Zhou Qiu Jian -- Carving the Boat to Look for the Sword
The Story Behind the Idiom
A few men traveled together on a boat across a river. Slowly the wind picked up and the boat started to shake. A large wave came and one man's sword fell into the river.
The other men yelled, 'Quick! Jump in and get the sword!' But the owner of the sword didn't jump at all. Slowly he took out a little knife and carved a small notch on the outside the boat where the sword fell. The rest of the passengers couldn't understand his action. Very composed, he explained, 'Well, this is where my sword fell. I marked the boat. When we arrive on the other side where the waves are not so strong, I will jump into the water where the mark is and I shall find my sword there.'
The Idiom
The
famous idiom ke zhou qiu jian means 'carving the boat to find the sword.'
It is used to mock people who fail to recognize that everything changes with
time and nothing stays the same. Though this idiom is not commonly used in
everyday speech, its meaning is well known to every student in China.
Next
Idiom
-->
Back to Chinese Idiom Grab Bag Main Page
Chinese
Idiom Grab Bag |
© 2007 OneWorld Classrooms. All rights reserved.