<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>phpFormGenerator v2.09</title>
<link rel="stylesheet" href="style.css" >
</head>
<body bgcolor="#eeeeee">
<center>
<table cellspacing="20" >
<tr><td>
<!----this is the top navigation bar----->
<table cellspacing="0" cellpadding="1" border="0" bgcolor="333333" ><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="cccccc"><tr><td>
<table cellspacing="0" cellpadding="3" border="0" bgcolor="white"><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="333333"><tr><td>
<table cellspacing="0" cellpadding="5" border="0" bgcolor="#ff9900" width="510">
<tr>
<td> <p><b>phpFormGenerator</b></p></td>
<td valign="bottom" align="right">
<table border="0" cellspacing="0" cellpadding="1" bgcolor="#333333"><tr><td>
<table height="20" border="0" cellspacing="0" cellpadding="1" bgcolor="#ffcc00">
<tr>
<td class="small"> [
<a href="http://phpformgen.sourceforge.net">home</a> ] [<a href="https://sourceforge.net/project/showfiles.php?group_id=45605">update</a>] [<a href="http://sourceforge.net/docman/?group_id=45605">support</a>] [<a href="mailto:musawir@gmail.com">contact</a>]
</td>
</tr>
</table>
</td></tr></table>
</td>
</tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</td></tr>
<tr><td>
<!----this is the bottom section where all the content goes----->
<table cellspacing="0" cellpadding="1" border="0" bgcolor="333333" ><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="cccccc"><tr><td>
<table cellspacing="0" cellpadding="3" border="0" bgcolor="white"><tr><td>
<table cellspacing="0" cellpadding="1" border="0" bgcolor="333333"><tr><td>
<table cellspacing="0" cellpadding="3" border="0" bgcolor="#ff9900" width="510">
<tr>
<td valign="top">
<!----Side Navigation and Links----->
<table>
<tr>
<td>
<table cellpadding="1" cellspacing="0" border="0" bgcolor="#333333"><tr><td>
<table cellspacing="0" cellpadding="2" bgcolor="#333333" border="0" width="100">
<tr><td class="small" align="center">
<font color="#FFFFFF"><b>quick links</b></font>
</td></tr>
<tr>
<td class="small" bgcolor="#ffcc00">
-
<a href="http://sourceforge.net/projects/phpformgen/">project web</a><br>
- <a href="http://www.sourceforge.net/">sourceforge</a><br>
- <a href="http://www.linux.com">linux.com</a><br>
- <a href="http://www.php.net/">php.net</a><br>
- <a href="http://www.mysql.com">mysql.com</a><br>
- <a href="http://www.apache.org">apache.org</a><br>
</td>
</tr>
</table>
</td></tr></table>
</td>
</tr>
<tr>
<td><br>
<table cellpadding="1" cellspacing="0" border="0" bgcolor="#333333"><tr><td>
<table cellspacing="0" cellpadding="2" bgcolor="#333333" border="0" width="100">
<tr><td class="small" align="center">
<font color="#FFFFFF"><b>powered by</b></font>
</td></tr>
<tr>
<td class="small" bgcolor="#ffcc00">
h4x0rs.us<br>
</td>
</tr>
</table>
</td></tr></table>
</td>
</tr>
<tr>
<td>
<br>
<table cellpadding="1" cellspacing="0" border="0" bgcolor="#333333"><tr><td>
<table cellspacing="0" cellpadding="2" bgcolor="cccccc" border="0" width="100">
<tr><td bgcolor="#333333" class="small" align="center">
<b><font color="white">wise words</font></b>
</td></tr>
<tr>
<td class="small" bgcolor="#eeeeee">
What is the difference between genius and stupidity? Genius has limits. - Albert Einstein.
</td>
</tr>
</table>
</td></tr></table>
</td>
</tr>
</table>
</td>
<td rowspan="2" align="right">
<!----Item boxes for daily news events or whatever you want to talk about, i have included three.----->
<table><tr><td>
<table border="0" cellspacing="0" cellpadding="1" bgcolor="#333333"><tr><td>
<table border="0" cellspacing="0" cellpadding="2" bgcolor="#ffcc00" width="380">
<tr>
<td bgcolor="#333333"><font color="#FFFFFF"><b>
Step 5: generation status</b></font></td>
<td bgcolor="#333333" align="right" class="small">
<font color="#FFFFFF">v2.09</font> </td>
</tr>
<tr>
<td colspan="2" class="small">
thats it! now we're ready to generate your form. if
you encounter any errors, please make sure that you
provided the correct database information (if any),
and please maintain that everything is case
sensitive. also remember to give read+write
permissions to the forms directory (located under
the phpformgen directory). thank you.<br><br>
<!-- The form stuff -->
<?php
// Global registers by pass
include("global.inc.php");
pt_register('POST','fields');pt_register('POST','name');pt_register('POST','type');
pt_register('POST','required');pt_register('POST','size1');pt_register('POST','size2');
pt_register('POST','select');pt_register('POST','radio');pt_register('POST','active');
pt_register('POST','email');pt_register('POST','redirect');pt_register('POST','create_dat');
pt_register('POST','db');pt_register('POST','hostname');pt_register('POST','dbname');
pt_register('POST','dbuser');pt_register('POST','dbpass');pt_register('POST','new_table');
pt_register('POST','table_name');pt_register('POST','tab_name');pt_register('POST','column');
pt_register('POST','hvalue','evalue');pt_register('POST','gen_thank');
pt_register('POST','template_name');pt_register('POST','FormName');
// Start regular stuff
$errors=0;
$error="The following errors occured while processing your request:<ul>";
$form_name = "";
if($FormName=="")
{
$errors = 1;
$error.= "<li>You did not provide a form name.";
}
else
{
$form_name = "";
for($i=0;$i<strlen($FormName);$i++)
{
if($FormName[$i]!=' ')
$form_name .= $FormName[$i];
}
if(file_exists("use/".$form_name))
{
$errors = 1;
$error .= "<li>A directory called ".$form_name." already exists. Choose different form name.";
}
}
if($email=="")
{
//$errors=1;
$error.="<li>You did not provide an email address to send the form data to.";
}
else
{
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$",$email))
{
$errors=1;
$error.="<li>You did not provide a valid email address.";
}
}
if($redirect=="" && $gen_thank!="on")
{
$errors=1;
$error.="<li>You did not provide a thank you page URL to redirect the user to after he/she has filled the form. Please provide a URL or let phpFormGenerator generate a thank you page for you.";
}
//Check all db info
if($db=="yes")
{
if($hostname=="" || $dbname=="")
{
$errors=1;
$error.="<li>You did not enter hostname and/or database name.";
}
if($new_table=="yes")
{
if($table_name=="")
{
$errors=1;
$error.="<li>You did not enter the name of the table to be created.";
}
else
{
for($i=0;$i<sizeof($name);$i++)
{
if($column[$i]=="")
{
$errors=1;
$error.="<li>Column ".($i+1)." for field ".$name[$i]." was not entered.";
}
}
}
}
else
{
if($tab_name=="")
{
$errors=1;
$error.="<li>Table name to enter data to was not provided.";
}
else
{
for($i=0;$i<sizeof($name);$i++)
{
if($column[$i]=="")
{
$errors=1;
$error.="<li>Column ".($i+1)." for field ".$name[$i]." was not entered.";
}
}
}
}
}
else if($db==