Просмотр файла guestbook/info.php

Размер файла: 7.42Kb
<?php 
/*
 * $RCSfile: info.php,v1 $
 *
 * Wap-GuestBook - a wap based guestbook
 * Copyright (C) 2004-2005 Chinmay N. Muranjan
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" 
   . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 
?>

<?
include ('inc/config.inc.php');
$type = $_GET['type'];
?>

<wml>
<head><meta http-equiv="Cache-control" content="no-cache"/></head>

<?
switch($type)
{
	case 1:
		print "<card title=\"INFO\" id=\"card2\">";
		print "<p>Please visit&nbsp;<a href=\"\">http://cmttd.u24.1stophosting.biz/chinmay2/html/index.php</a>&nbsp;";
		print "from your web-browser for more information about Wap-GuestBook and support.<br/>Thank You !!</p>";
		break;

	case 2:
		print "<card title=\"PHP\" id=\"card2\">";
		print "<p>Please visit&nbsp;<a href=\"\">http://www.php.net</a>&nbsp;";
		print "from your web-browser for more information about PHP and support.<br/>Thank You !!</p>";
		break;

	case 3:
		print "<card title=\"CHANGE LOG\" id=\"card2\">";
		print "<p><big><b>CHANGE LOG:</b></big><br/><br/>";
		print "version 2.0:<br/>";
		print "&nbsp;&nbsp;Added 3 extra fields-<br/>&nbsp;&nbsp;&nbsp;&nbsp;show/hide email;<br/>&nbsp;&nbsp;&nbsp;&nbsp;show/hide URL;";
		print "<br/>&nbsp;&nbsp;&nbsp;&nbsp;User Rating.<br/>";
		print "&nbsp;&nbsp;Added more critical URL checker.<br/>";
		print "&nbsp;&nbsp;Total 5 bugs were fixed.";
		print "<br/>-----<br/>";
		print "version 1.0:<br/>";
		print "&nbsp;&nbsp;Initial release";
		print "<br/>-----<br/></p>";
		break;

	case 4:
		print "<card title=\"BUGS\" id=\"card2\">";
		print "<p><big><b>BUGS:</b></big><br/><br/>";
		print "01-04-2005:<br/>";
		print "&nbsp;&nbsp;Still no bug is found.<br/>-----<br/><br/>If you found any bug(s) please&nbsp;<a href=\"info.php?type=7&amp;subject=Bug_Found&amp;page=4&amp;title=SEND_BUGS\">notify</a>&nbsp;me.<br/>Thanking you in advance.<br/></p>";
		break;

	case 5:
		print "<card title=\"TO DO\" id=\"card2\">";
		print "<p><big><b>TO DO LIST:</b></big><br/><br/>";
		print "version 2.0:<br/>";
		print "&nbsp;&nbsp;Graphical user-rating<br/>";
		print "&nbsp;&nbsp;Censor words";
		print "<br/>-----<br/>";
		print "version 1.0:<br/>";
		print "&nbsp;&nbsp;Initial release";
		print "<br/>-----<br/><br/>";
		print "<a href=\"info.php?type=7&amp;subject=Request_Recieved&amp;page=5&amp;title=SEND_TODO\">Send</a>&nbsp;your suggestions for further improvemnts.<br/>Thanking you in advance.<br/></p>";
		break;

	case 6:
		print "<card title=\"LICENCE\" id=\"card2\">";
		print "<p><big><b>LICENCE:</b></big><br/><br/>";
		print "This program is free software; you can redistribute it and/or modify ";
		print "it under the terms of the GNU General Public License as published by ";
		print "the Free Software Foundation; either version 2 of the License, or ";
		print "(at your option) any later version.<br/><br/>";
		$a = "http://".$HTTP_SERVER_VARS["HTTP_HOST"].$HTTP_SERVER_VARS["SCRIPT_NAME"];
		list ($a,$extra) = split ("info.php",$a);
		$a = $a."gpl.txt";
		print "<br/>You can view the GNU/GPL license by visiting&nbsp;<a href=\"\">".$a."</a>&nbsp;from your web-browser<br/><br/>";
		print "<small>OR you may read GNU/GPL license by clicking&nbsp;<a href=\"license.php?type=1\">here</a>&nbsp;</small><br/></p>";
		break;

	case 7:
		$subject = $_GET['subject'];
		$page = $_GET['page'];
		$title = $_GET['title'];
?>
		<card id="card3" title="<? echo $title; ?>" newcontext="false">
		<onevent type="onenterforward">
			<refresh>
				<setvar name="name2" value=""/>
				<setvar name="email2" value=""/>
				<setvar name="message" value=""/>
			</refresh>
		</onevent>

		<onevent type="onenterbackward">
			<refresh>
				<setvar name="name2" value=""/>
				<setvar name="email2" value=""/>
				<setvar name="message" value=""/>
			</refresh>
		</onevent>

		<p>Your Name: <input format="M*m" name="name2" type="text" title="Name:" maxlength="128" emptyok="false"/><br/>
		Message: <input format="M*m" title="Message:" name="message" type="text" emptyok="false"/><br/>
		Your Email: <input format="*m" title="Email:" name="email2" type="text" maxlength="128" emptyok="false"/><br/>
		</p>
		<p align="center">
		<anchor>Send
			<go href="info.php?type=8&amp;subject=<? echo $subject; ?>&amp;page=<? echo $page; ?>&amp;title=<? echo $title; ?>" method="post">
				<postfield name="message" value="$message"/>
				<postfield name="name2" value="$name2"/>
				<postfield name="email2" value="$email2"/>
			</go>
		</anchor>
		<br/></p>
<?
		break;

	case 8:
		$subject = $_GET['subject'];
		$page = $_GET['page'];
		$title = $_GET['title'];
?>
		<card id="card4" title="<?php print "$title" ?>" ontimer="info.php?type=<? echo $page; ?>">
		<timer value="50"/>
		<p>
<?
		$name4 = $_POST['name2'];
		$email4 = $_POST['email2'];
		$message2 = $_POST['message'];

		$from2 = "Name:&nbsp;".$name4;
		$from3 = "&nbsp;And Email:&nbsp;".$email4;
		$from4 = $from2.$from3;
		$message3 = "Message: ".$message2." Name: ".$name4." Email: ".$email4;

		if($name4 == "" OR $message2 == "" OR $email4 == "")
		{
			print "Please enter your NAME and/or MESSAGE and/or EMAIL by clicking&nbsp;<a href=\"info.php?type=7&amp;subject=$subject&amp;page=$page&amp;title=$title\">here</a>&nbsp;!!<br/>";
		}
		else
		{
			if (mail($my_email, $subject, $message3, "From: $name4"))
	            	print "Message has been sent to $my_email<br/>";
			else
		            print "Could not send message to $my_email<br/>";
		}
?>
		<br/><small>You will be automatically redirected...If failed to redirect please click&nbsp;
		<a href="info.php?type=<?php print "$page"; ?>">here</a>&nbsp;!!</small></p>
<?
		break;

	default:
		print "<card title=\"ILLEGAL\" id=\"card2\">";
		print "<p>Illegal Syntax ! Try again !!</p>";
		break;
}
print "<p><br/>Back To:<br/>";
print "<a href=\"$sign\">Sign Guestbook</a>";
print "<br/>";
print "<a href=\"$home\">HOME</a>";
print "<br/></p>";
?>

<!-- END MAIN CONTENT AREA -->
<p><br/><small>
Comments are the property of their posters.<br/>
        [ <a href="info.php?type=6">License</a>
        &nbsp;|&nbsp;
        <a href="info.php?type=3">Change Log</a>
        &nbsp;|&nbsp;
        <a href="info.php?type=5">To Do List</a>
        &nbsp;|&nbsp;
        <a href="info.php?type=4">Bugs</a> ]
      <br/>
      Powered by <a href="info.php?type=1">Wap_GuestBook v2.0</a>&nbsp;and&nbsp;<a href="info.php?type=2">PHP</a>. Copyright © 2004-2005 <a href="info.php?type=1">Chinmay N. Muranjan</a>, All Rights Reserved.<br/></small>
      <!-- YOU MAY NOT REMOVE THIS COPYRIGHT NOTICE WITHOUT PERMISSION FROM THE Wap_GuestBook AUTHOR --></p>
</card>
</wml>