// 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 { ?>
Mogao was a humble artist, but dreamt of painting his best work in the famous Buddhist caves near the oasis of Dunhuang. One day, with only a pack of supplies and a few scrolls holding his most treasured paintings, he set off to cross the desert. In the shifting sands, though, after several days of walking, Mogao lost his way. He was determined, inspired by his dream, to push onward; but thirst, hunger and the blazing sun eventually brought him to his knees.
When all seemed lost, a vision appeared before Mogao: it was a kind-faced soldier bending over him with a flask of water. The soldier saved Mogao's life, brought him to Dunhuang and gave him a teapot engraved with a crescent moon; but in return for the favor, took his treasured paintings.
After he recovered, Mogao started painting in the caves. Late one afternoon, after a long day’s work, he walked into town. While walking, a vision appeared before him: a beautiful woman whose kind face looked very familiar, as if he'd seen it in a dream. It was the soldier, the daughter of the general, whose name was Yue Ya -- Crescent Moon.
From the time she took the scrolls, Crescent Moon had admired Mogao's paintings with wonder. She realized that he was a gifted artist and longed to meet him again. So she decided to look for him in town.
Mogao showed Crescent Moon his paintings in the caves and they fell in love.
But when the general learned of their love, he became very angry, for Mogao was only a poor painter. He sent out a notice, calling all of the princes and lords from the neighboring lands to come to Dunhuang for a competition to win the hand of Crescent Moon in marriage. Hearing this, Crescent Moon ran away to the caves to be with Mogao.
Her father followed with a group of soldiers and a strong hatred for Mogao in his heart. In a booming voice that echoed through the caves, he demanded that his daughter return. But Crescent Moon stubbornly refused and defiantly stood at Mogao’s side. Furious, the general unsheathed his dagger and lunged toward the humble painter. Crescent Moon threw herself in front of Mogao and the dagger pierced her heart.
The general fell to his knees and burst into tears. Repenting in his sadness, he forgave Mogao and left him to paint in the caves. Heartbroken, Mogao painted his best work and today the Mogao Caves and Crescent Moon Lake stand side by side in the desert along the oasis of Dunhuang.
Reading
Fun: Folk Stories |
© 2007 OneWorld Classrooms. All rights reserved.