Location: PHPKode > projects > The Easy and Free PHP guestbook > include/html/forms.php
<?php
$admin_verif_form= '<br><br>$ent_admin_pass<p>
<form action=\"\" method=\"post\">
<input name=\"adpass\" type=\"text\">
<input type=\"hidden\" name=\"name\" value=\"$name\">
<input type=\"hidden\" name=\"email\" value=\"$email\">
<input type=\"hidden\" name=\"message\" value=\"$message\">
<input type=\"hidden\" name=\"show_email\" value=\"$show_email\">
<input type=\"hidden\" name=\"show_message\" value=\"$show_message\">
<input type=\"hidden\" name=\"task\" value=\"adminverify\">
<input type=\"submit\" value=\"admin post\"></form>';

$captcha_form='<form action=\"\" method=\"post\" name=\"captchaform\" id=\"captchaform\">
<input name=\"random\" type=\"text\">
<input type=\"hidden\" name=\"imgverify\" value=\"verification\">
<input type=\"hidden\" name=\"name\" value=\"$name\">
<input type=\"hidden\" name=\"email\" value=\"$email\">
<input type=\"hidden\" name=\"message\" value=\"$message\">
<input type=\"hidden\" name=\"show_message\" value=\"$show_message\">
<input type=\"hidden\" name=\"show_email\" value=\"$show_email\">
<input type=\"hidden\" name=\"task\" value=\"captchaverify\">
&nbsp;<input type=\"submit\" value=\"I am human\"></form>';

$navigation_to_admin='<form action=\"\" method=\"post\">
  <input type=\"hidden\" name=\"task\" value=\"del_edit\">
  <input type=\"submit\" value=\"Back to delete/edit section\">
  </form><p>';

$navigation_to_gbook='<form action=\"\" method=\"post\">
  <input type=\"hidden\" name=\"task\" value=\"adm_logout\">
  <input type=\"submit\" value=\"Logout\">
  </form>';

$post_edit_form='<form action=\"\" method=\"post\">
    Name: <input type=text name=name value=\"$name\"><p>
    E-mail: <input type=text name=email value=\"$email\"><p>
    Message:<br>
    <textarea name=\"message\" rows=\"8\" cols=\"60\">$message</textarea>
    <input type=hidden name=post_id value=\"$post_id\">
    <input type=hidden name=ip_addr value=\"$ip_addr\">
    <input type=hidden name=date value=\"$date\">
    <input type=hidden name=show_email value=\"$show_email\">
    <input type=hidden name=show_message value=\"$show_message\">
    <input type=hidden name=approved value=\"$approved\">
    <input type=hidden name=task value=\"modify\">
    <p><input type=submit value=\"Modify message number $post_id\">
    </form>';
    
$gb_config_form='
      <center>
      <table width=1024 cellpadding=3><tr><td>
      <center><h1>Guestbook configuration page</h1></center>
      <table width=\"100%\" cellpadding=\"6\" cellspacing=\"6\" style=\"text-align:left;\">
      <form name=\"config_form\" method=\"post\" action=\"\">
      <input type=\"hidden\" name=\"task\" value=\"edit_config\">
      <tr style=\"background-color:#B0F05E;\"><td width=\"150\"><font color=\"white\"><b>Variable</b></font></td><td width=\"150\"><font color=\"white\"><b>Value</b></font></td></tr>
      <tr>
        <td valign=top><font color=red>You can mouseover the values to get plenty of information on each one</font></td>
        <td valign=top><h3>Essential values to be set before the first run</h3></td>        
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_gb_page_name_text\">Guestbook page name</span></td>
        <td valign=top><input type=\"text\" name=\"gbook_name\" size=\"25\" value=$gbook_name class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_gb_title_text\">Guestbook title</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=gbook_title SIZE=25 VALUE=\"$gbook_title\" class=\"config_form_input\"></td>
      </tr>      
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_gb_url_text\">Guestbook URL</span></td>
        <td valign=top><input type=\"text\" name=gbook_url SIZE=50 VALUE=$gbook_url class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_admin_email_text\">Administrator e-mail address</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=admin_email SIZE=25 VALUE=$admin_email class=\"config_form_input\"></td>
      </tr>
      
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_guestbook_email_text\">Guestbook e-mail address</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=gbook_email SIZE=25 VALUE=$gbook_email class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_password_text\">Administrator password</span></td>
        <td valign=top><input type=text name=admin_pass SIZE=15 VALUE=$admin_pass  class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_time_offset_text\">Set time offset</span></td>
        <td valign=top>$offsets_form_code</td>
      </tr>
      
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_posts_file_text1 <b>$posts_dir</b> $config_posts_file_text2\">Posts File</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=posts_file_name SIZE=15 VALUE=$posts_file_name class=\"config_form_input\"></td>  
        </td>
      </tr>        
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_posts_file_text1 <b>$posts_dir</b> $config_posts_file_text2\">Log File</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=logfile_name SIZE=15 VALUE=$logfile_name class=\"config_form_input\"></td>
        </td>
      </tr>        
      <tr>
        <td valign=top></td>
        <td valign=top><h3>Other variables</h3></font></td>
      </tr> 
      
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_send_email_on_post_text\">Send e-mail on post</span></td>
        <td valign=top>
          <SELECT NAME=sendmail_onpost>
            <OPTION VALUE=1>Yes
            <OPTION VALUE=0>No
          </SELECT>
        </td>
      </tr>               
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_use_reserved_name_text\">Use reserved name</span></td>
        <td valign=top>
          <SELECT NAME=activate_res_name>
            <OPTION VALUE=1>Yes
            <OPTION VALUE=0>No
          </SELECT>
        </td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_reserved_name_text\">Reserved name</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=reserved_name SIZE=25 VALUE=$reserved_name class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top></td>
        <td valign=top><h3>Spam and posting control</h3></td>
      </tr> 
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_image_verification_text\">Enable captcha verification</span></td>
        <td valign=top>
          <SELECT NAME=imgverif_active>
            <OPTION VALUE=$option1_imgverif>$option1_imgverif
            <OPTION VALUE=$option2_imgverif>$option2_imgverif
          </SELECT>
        </td>
      </tr>    
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_ajax_verification_text\">Enable ajax verification</span></td>
        <td valign=top>
          <SELECT NAME=ajaxverif_active>
            <OPTION VALUE=$option1_ajaxverif>$option1_ajaxverif
            <OPTION VALUE=$option2_ajaxverif>$option2_ajaxverif
          </SELECT>
        </td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_secret_salt_text\">Secret Salt</span></td>
        <td valign=top><input type=text name=secret_salt SIZE=25 VALUE=$secret_salt class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_forbidden_html_text2\">Forbidden html elements</span></td>
        <td valign=top>
        <TEXTAREA cols=100 rows=5 NAME=forbidden_html class=\"config_form_input\">$fh_value</textarea>
        </td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_forbidden_strings_text\">Forbidden strings</span></td>
        <td valign=top>
        <TEXTAREA cols=100 rows=30 NAME=forbidden_strings class=\"config_form_input\">$fs_value</textarea>
        </td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_banned_ips_text\">Banned IPs</span></td>
        <td valign=top>
        <TEXTAREA cols=100 rows=5 NAME=banned_ips class=\"config_form_input\">$bi_value</textarea>
        </td>
      </tr>     

      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_max_message_length_text\">Max message length</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=max_message_length SIZE=5 VALUE=$max_message_length class=\"config_form_input\"></td>
      </tr>
      
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_max_word_length_text\">Max word length</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=max_word_length SIZE=5 VALUE=$max_word_length class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top></td>
        <td valign=top><h3>GeoIp Setup, requires a databases file NOT included in this distribution, mouseover the values or see the readme file or web site for details</h3>
        Geoip database file detected: $geoip_file_detected</td>
      </tr> 
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_enable_geoip_text\">Enable GeoIp lookup</span></td>
        <td valign=top>
          <SELECT NAME=activate_geoip>
            <OPTION VALUE=$option1_geoip>$option1_geoip
            <OPTION VALUE=$option2_geoip>$option2_geoip
          </SELECT>
        </td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_country_codes_list_text\">Banned country codes list</span><p>
        <a style=\"color:blue;cursor:pointer;\"onClick=\"smilwin=openChild2(\'include/iso_country_codes.html\',\'smilieswindow\');\">see iso country codes in a popup window</a></p>
        </td>
        <td valign=top>
        <TEXTAREA cols=100 rows=5 NAME=country_codes_list class=\"config_form_input\">$cc_value</textarea>
        </td>
      </tr>
      <tr>
        <td valign=top></td>
        <td valign=top><h3>Posts appearance control</h3></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_posts_template_text\">Posts template</span></td>
        <td valign=top><textarea cols=100 rows=15 name=\"p_template\" id=\"ptemplate\" class=\"config_form_input\">$p_template</textarea>
        
        \n<script type=\"text/javascript\">
        var target=document.getElementById(\"ptemplate\");
        var existingValue=target.value;
        var defaultTemplateCss1=\'$default_template_css_1\';
        var defaultTemplateNoCss1=\'$default_template_no_css_1\';
        function swapTemplate(newTemplate)
        {
          target.value=newTemplate;
        }
        </script>
        <br>
        <span style=\"color:red;\">Use the links below to load default templates (mouseover on the links for some details):</strong><br>
        <a onclick=\"swapTemplate(defaultTemplateCss1);\" class=\"fake_links\" title=\"This is perfect for the provided guestbook.html file. To simply change the colors of the posts layout you can edit the CSS file directly (in styles/posts.css), without modifying the posts template itself\">Template with CSS (restores default)</a><br>
        <a onclick=\"swapTemplate(defaultTemplateNoCss1);\" class=\"fake_links\" title=\"This is as simple as a template can be. Use it as such or as a starting point to build your own!\">Simple template without CSS</a><br>
        </td>
        </td>
      </tr>        
      <tr>
        <td valign=top></td>
        <td valign=top><h3>Pagination control (enhanced version only)</h3></td>
      </tr> 
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_posts_per_page_text\">Posts per page</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=posts_per_page SIZE=5 VALUE=$posts_per_page class=\"config_form_input\"></td>
      </tr>
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_add_pag_nam_text\">Additional pages name</span></td>
        <td valign=top><INPUT TYPE=TEXT NAME=additional_pages_name SIZE=5 VALUE=\"$additional_pages_name\" class=\"config_form_input\"></td>
      </tr>       
      <tr>
        <td valign=top><span class=\"fake_links\" title=\"$config_navig_menu_spacer_text\">Navigation menu spacer</span></td>
        <td valign=top><input type=\"text\" name=\"menu_spacer\" SIZE=5 VALUE=\"$menu_spacer\" class=\"config_form_input\"></td>
      </tr>        
      </table>
      <p><INPUT TYPE=SUBMIT VALUE=\"Save configuration\">
      </form><p>
      <center><hr class=\"admin_footer\">
          <br>$powered_by
      
      </td></tr></table>
      </body>
      </html>
      ';

?>
Return current item: The Easy and Free PHP guestbook