// 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 { ?>
Welcome to the Chinese Idiom Grab Bag! Idioms, cheng yu, are an important part of Chinese literature. Not only do they impart ancient wisdom, they also remind Chinese people of centuries-old traditional stories that contain that wisdom. Most idioms summarize the stories they refer to in only four Chinese characters. So, when a Chinese person hears the idiom, she automatically thinks of the story and understands the meaning behind the otherwise cryptic combination of words.
Six thousand Chinese idioms derive their meanings from traditional stories. In China, students learn hundreds of idioms and their related stories from Kindergarten through Middle School. In this section, you'll read the stories behind a handful of some of the most well-known Chinese idioms. To begin, choose an idiom (written in English and Chinese pin yin) below.
Click here to begin or choose an idiom/story title below.
Chinese
Idiom Grab Bag |
© 2007 OneWorld Classrooms. All rights reserved.