View file guestbook/guestbook.php

File size: 5.47Kb
<?php 
/*
 * $RCSfile: guestbook.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\">"; 
?>

<?php
include('inc/config.inc.php');
?>

<wml>
<head><meta http-equiv="Cache-control" content="no-cache"/></head>
<template>
      <do type="options" name="BACK" label="back">
         <prev/>
      </do>
   </template>

<card id="card1" title="GuestBook"> 

<onevent type="onenterforward">
  <refresh>
    <setvar name="name" value=""/>
    <setvar name="email" value=""/>
    <setvar name="show_email" value="1"/>
    <setvar name="show_url" value="1"/>
    <setvar name="rate" value="5"/>
    <setvar name="comments" value=""/>
    <setvar name="url" value=""/>
  </refresh>
</onevent>

<onevent type="onenterbackward">
  <refresh>
    <setvar name="name" value=""/>
    <setvar name="email" value=""/>
    <setvar name="show_email" value="1"/>
    <setvar name="show_url" value="1"/>
    <setvar name="rate" value="5"/>
    <setvar name="comments" value=""/>
    <setvar name="url" value=""/>
  </refresh>
</onevent>

<do type="accept" label="Send">
	<go href="<? print $post."?type=post";?>" method="post">
<postfield name="name" value="$(name)"/> 
<postfield name="email" value="$(email)"/> 
<postfield name="url" value="$(url)"/>
<postfield name="show_url" value="$(show_url)"/>
<postfield name="rate"  value="$(rate)"/>
<postfield name="comments" value="$(comments)"/> 
<postfield name="show_email" value="$(show_email)"/> 
</go> 
</do>

<!--Modify 'Home' page URL to match your 'Home' page URL below IF you dont defined it in 'config.inc.php' -->
<!--Modify 'Post' page URL to match your 'Post' page URL OR do not modify it unless you know what is going to be change below IF you dont defined it in 'config.inc.php' -->

<p>
*Your Name:
<input format="M*m" name="name" type="text" title="*Name:" maxlength="128" value=""></input><br/></p> 
<p>
*Your Email: 
<input format="*m" name="email" type="text" title="*Email:" maxlength="128" value=""></input><br/> </p>
<p>
*Comments: 
<input format="M*m" name="comments" type="text" title="*Comments:" value=""></input><br/></p> 
<p>
Your Homepage URL: (Optional)
<input format="*m" name="url" type="text" title="URL:" value="http://"></input><br/></p> 
<p>
Keep my email addresses
<select name="show_email" title="show/hide email">
	<option value="1">Public.</option>
       <option value="0">Hidden.</option>
</select>
<br/></p>
<p>
Keep my URL <select name="show_url" title="show/hide URL">
		<option value="1">Hidden.</option>
  	        <option value="2">Public.</option>
	</select><br/></p>

<p>
How will you RATE this WAP site ?
	<select name="rate" title="RATE">
  	      <option value="3">Good</option>
  	      <option value="4">Impressive</option>
  	      <option value="5">Excellent</option>
  	      <option value="2">Bad</option>
            <option value="1">Very Bad</option>
            <option value="0">Worst</option>		
	</select>
<br/></p>
<p align="center">
<anchor>Send
<!--Modify following URL to match your 'Post' page URL OR do not modify it unless you know what is going to be change IF you dont defined it in 'config.inc.php' -->
<?php print "<go href=\"".$post."?type=post\" method=\"post\">";?>
<postfield name="name" value="$(name)"/> 
<postfield name="email" value="$(email)"/> 
<postfield name="url" value="$(url)"/>
<postfield name="show_url" value="$(show_url)"/>
<postfield name="rate"  value="$(rate)"/>
<postfield name="comments" value="$(comments)"/> 
<postfield name="show_email" value="$(show_email)"/> 
</go> 
</anchor>
<br/></p>
<p>(<small>fields marked with * are compulsory.</small>)<br/></p>

<!--Modify following URL to match your 'Home' page URL IF you dont defined it in 'config.inc.php' -->

<p align="left">Back To: <br/>
<?php print "<a href=\"$home\">HOME</a><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>