|










|
|
|
 |
0 |
|
View Articles |
|
 |
 Name |
±èÁ¤Èñ |
(2004-10-06 19:00:53, Hit : 10079, Vote : 2071)
|
|
 |
Subject |
 ÀüÇô ´Þ¶óÁöÁö ¾Ê´Âµ¥¿ä? |
 |
 |
¼öÁ¤Ç϶ó´Â´ë·Î ÇÑ ¼Ò½ºÀÔ´Ï´Ù
¾îµð¸¦ À߸ø ÇѰÇÁö ÀüÇô ´Þ¶óÁöÁö°¡ ¾Ê³×¿ä
Ä«¿îÆ®(Ŭ¸¯È½¼ö) ³ªÅ¸³»ÁÖ´Â ÅØ½ºÆ® ¹Ú½ºµµ ¾È º¸À̱¸¿ä
<?php
############################################################################
############################################################################
## ##
## This script is copyright Rupe Parnell (Starsol.co.uk) 2003. ##
## ##
## Distribution of this file, and/or any other files in this package, via ##
## any means, withour prior written consent of the author is prohibited. ##
## ##
## Starsol.co.uk takes no responsibility for any damages caused by the ##
## usage of this script, and does not guarantee compability with all ##
## servers. ##
## ##
## Please use the contact form at ##
## http://www.starsol.co.uk/scripts/contact.php if you need any help or ##
## have any questions about this script. ##
## ##
############################################################################
############################################################################
$version = "v1.01";
require("number_variables.php");
// ENTER ALL HTML YOU WANT ABOVE THE NUMBER GUESS BETWEEN THIS LINE ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>Á¦¸ñ ¾øÀ½</title>
<meta name="generator" content="">
<script language="javascript">
function check_submit() {
if (document.myForm.guess.value < 0) {
alert('0º¸´Ù Å« ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä');
document.myForm.guess.focus();
return;
} else if (document.myForm.guess.value > 100) {
alert('100º¸´Ù ÀÛÀº ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä');
document.myForm.guess.focus();
return;
} else {
document.myForm.action = "<?=$PHP_SELF?>";
document.myForm.submit();
}
}
</script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p></p>
</body>
</html>
<hr>
<?php // AND THIS LINE
echo"<p align='center'>";
echo"<font face='$fontface' size='4'><b>";
echo"Number Guess";
echo"</b></font>";
echo"</p>";
echo"<p align='left'>";
echo"<font face='Verdana' size='3'>";
if ($to_do != "play") {echo"Enter a number between 1 and $max to play.";}
if ($to_do == "play" ){
$number = rand(1,$max);
$guess = HTMLSpecialChars($guess);
if ($guess>$max) {
echo "Sorry, the number you entered was more than $max. Please enter a number between 1 and $max. ";
echo "The correct number this time was <b>$number</b>. You guessed <b>$guess.</b>";
}
elseif ($guess>$number) {
echo "Sorry, your guess is too high.<br>";
echo "The correct number this time was <b>$number</b>. You guessed <b>$guess.</b>";
}
if ($guess=="") {
echo"You forgot to enter a number. If you had entered <b>$number</b>, you would have won. ";
}
if ($guess<$number) {
echo "Sorry, your guess is too low.<br>";
echo "The correct number this time was <b>$number</b>. You guessed <b>$guess.</b>";
}
if ($guess == $number) {
echo "Congratulations! You guessed correctly! The number was <b>$number</b>.";
won();
}
}
echo"</font></p>";
echo"<form name='myForm' method='post'>";
echo"<input type='hidden' name='to_do' value='play'>";
echo"<p align='center'>";
echo"<font face='$fontface' size='3'>";
if ($to_do == "play") {echo"Play again?";}
if ($to_do != "play") {echo"Enter your guess:";}
echo"<br><br>";
echo"<input name='guess' type='text' value='$guess'><br>";
echo"<input type='submit' value='Play!' onclick='javascript:check_submit();'>";
echo"</font></p>";
echo"</form>";
starsol();
// ENTER ALL HTML YOU WANT BELOW THE NUMBER GUESS BETWEEN THIS LINE ?>
<hr>
<?php // AND THIS LINE
function won(){
global $fontface;
echo"<font face='$fontface' size='3'><b>Congratulations! You guessed correctly!</b></font>";
include('number_won.php');
return;
}
function starsol(){
global $fontface, $version;
echo"<br><br><center><font face='Verdana' size='1' color='#888888'>Powered by: <a href='http://www.starsol.co.uk/scripts/' target='_blank'>Starsol</a> Number Guess $version</font></center>";
return;
}
?>
|
 ¼Õº´¸ñ |
¾È³çÇϼ¼¿ä~
<input type='submit' value='Play!' onclick='javascript:check_submit();'>
¿ä ºÎºÐ¿¡¼
type='submit' ¸¦ type='button' À¸·Î ¹Ù²ãº¸¼¼¿ä.
¾Æ¸¶ µÉ °ÍÀÔ´Ï´Ù^^ |
|
|

|
|

|
|