Login   Register  
PHP Classes
elePHPant
Icontem

File: step3.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of dan boorn  >  OO Mysql Wrapper  >  step3.php  >  Download  
File: step3.php
Role: Application script
Content type: text/plain
Description: Script to generate example PHP Code
Class: OO Mysql Wrapper
MySQL database SQL queries wrapper
Author: By
Last change:
Date: 2006-07-29 15:47
Size: 3,352 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Code Generator</title>
</head>
<body>
<p align="center"><strong>OO Mysql Wrapper PHP Coder Generator</strong></p>
<script src="validate.js" type="text/javascript"></script>

<form id="form1" name="form1" method="post" action="step4.php">
  <table width="" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="30%"><strong>Step 3 </strong></td>
      <td>&nbsp;</td>
    </tr>
    <?
        $post 
$_POST;
        
        if(
$post['type'] != "Select"){
            
$numFields intval($post['Fields']);
            for(
$i=0$i $numFields$i++){
                echo 
"<tr>";
                  echo 
"<td colspan=2>";
                  echo 
"<table border=0 cellspacing=4 width='100%'>";
                    echo 
"<tr>";
                      echo 
"<td>Field Type: ";
                      echo 
"<select name='fieldType[]'>";
                      echo 
"<option value='int'>Int</option>";
                      echo 
"<option value='text'>Text</option>";
                      echo 
"<option value='date'>Date</option>";
                      echo 
"<option value='float'>Float</option>";
                      echo 
"<option value='defined'>Defined</option>";
                      echo 
"</select>";
                      echo 
"</td>";
                      echo 
"<td>Field Name: <input type='text' name='fieldName[]' required='yes' validate='text' message='Enter Field Name'></td>";
                      echo 
"<td>Field Value: ";
                      echo 
"<input type='text' name='fieldValue[]' required='yes' validate='text' message='Enter Field Value'>";                      
                      echo 
"&nbsp;<select name='valueType[]'>";
                        echo 
"<option value='Session'>Session Var. Name</option>";
                        echo 
"<option value='Get'>Get Var. Name</option>";
                        echo 
"<option value='Post'>Post Var. Name</option>";
                        echo 
"<option value='Defined'>Defined Value</option>";
                      echo 
"</select></td>";
                    echo 
"</tr>";
                  echo 
"</table>";
                  echo 
"</td>";
                echo 
"</tr>";
            }
        }              
        
        if(
$post['type'] != "Insert Row"){
            echo 
"<tr>";
              echo 
"<td>Where SQL (I.E. Where ID = 1)</td>";
              echo 
"<td><input type='text' name='Where'></td>";
            echo 
"</tr>";
        }
        if(
$post['type'] == "Select"){
            echo 
"<tr>";
              echo 
"<td>Order By and Limit  (I.E. Order by `Fname` asc limit 10)</td>";
              echo 
"<td><input type='text' name='Orderby'></td>";
            echo 
"</tr>";
        }
        elseif(
$post['type'] != "Delete Row") {
            echo 
"<tr>";
              echo 
"<td>Generate HTML Form?</td>";
              echo 
"<td>";
              echo 
"<select  name='genForm'>";
                echo 
"<option value='Yes'>Yes</option>";
                echo 
"<option value='No'>No</option>";
              echo 
"</select>";
              echo 
"&nbsp;";
              echo 
"<select name='method'>";
                echo 
"<option value='Get'>Get</option>";
                echo 
"<option value='Post'>Post</option>";
              echo 
"</select>";
        }
              
        echo 
"<input type='hidden' name='Select' value='".$post['Select']."'>";
        echo 
"<input type='hidden' name='type' value='".$post['type']."'>";
        echo 
"<input type='hidden' name='Table' value='".$post['Table']."'>";
    
?>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" value="Next" onClick="validate(this.form); return document.formSubmit;" /></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>

</html>