Nicketick

Untitled

Jan 2nd, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.46 KB | None | 0 0
  1. <?php
  2.     include("gallery/config.inc.php");
  3.  
  4.    
  5.  
  6.     // Firstly Lets build the Category List
  7.  
  8.     $result = mysql_query( "SELECT category_id,category_name FROM gallery_category" );
  9.     while( $row = mysql_fetch_array( $result ) )
  10.     {
  11. $photo_category_list .=<<<__HTML_END
  12.     <option value="$row[1]">$row[1]</option>\n
  13. __HTML_END;
  14.     }
  15.     mysql_free_result( $result );  
  16.  
  17. // Final Output
  18. echo <<<__HTML_END
  19.  <script>
  20.     $(document).ready(function(){
  21.         $("#bestelformulier").validationEngine('attach');
  22.        });
  23.     </script>
  24.     <script>var counter = 0;
  25.  
  26. function moreFields() {
  27.     counter++;
  28.     var newFields = document.getElementById('readroot').cloneNode(true);
  29.     newFields.id = '';
  30.     newFields.style.display = 'block';
  31.     var newField = newFields.childNodes;
  32.     var insertHere = document.getElementById('writeroot');
  33.     insertHere.parentNode.insertBefore(newFields,insertHere);
  34. }
  35.  
  36. window.onload = moreFields;</script>
  37.     <div id="readroot" style="display: none">
  38.     <input type="button" value="Verwijder velden"
  39.         onclick="this.parentNode.parentNode.removeChild(this.parentNode);" /><table width='100%' border='0' align='left' style='width: 100%;'><tr>
  40. <?<td>
  41. Artiest:
  42. </td>
  43.     <td>
  44. <select name='artiest' class="validate[required]" id='rand()'>
  45. <option value="">Kies:</option>
  46. $photo_category_list
  47. </select>
  48.     </td>
  49.     <td>
  50.     Foto:</td>
  51.     <td>
  52.     <input type='text' name='fotonr' size='2' class='validate[required,custom[onlyNumberSp]]' id='fotonr' />
  53.     </td>
  54. </tr>
  55. <tr>
  56. <td>Formaat:</td>
  57. <td>
  58. <select name='formaat' class="validate[required]" id='formaat'><option value''>Kies:</option><option value='Lorum Ipsum'>Lorum Ipsum</option><option value='Lorum Ipsum'>Lorum Ipsum</option></select>
  59. </td>
  60. <td>Aantal:</td>
  61. <td><input type='text' name='aantal' size='2' class='validate[required,max[25]]' id='aantal' /></td>
  62. </tr>
  63. <tr>
  64. <td>Kleursoort:</td>
  65. <td>
  66. <select name='kleur' class="validate[required]" id='kleur'><option value=''>Kies:</option><option value='Full Color'>Full Color</option><option value='Zwart Wit'>Zwart Wit</option><option value='Sepia'>Sepia</option></select>
  67. </td></tr>
  68. <tr><td><br></td></tr>
  69. </table></div>
  70.    
  71.    
  72.    
  73.    
  74.    
  75.    
  76.    
  77.    
  78.    
  79.    
  80.     <form enctype='multipart/form-data' action='index.php?p=order' method='post' id='bestelformulier' name='bestelformulier'>
  81. <table width='100%' border='0' align='left' style='width: 100%;'>
  82. <span id="writeroot"></span><input type="button" onclick="moreFields()" value="Toon meer velden" />
  83.  
  84. <tr>
  85. <td>Naam:</td>
  86. <td>
  87. <input type='text' name='naam' class='validate[required,custom[onlyLetterSp]]' id='naam' size='20' /></td></tr>
  88. <tr><td>Email:</td><td><input type='text' class='validate[required,custom[email]]' name='mail' size='20' id='email' /></td></tr>
  89. <tr><td>Straat:</td><td><input type='text' name='straat' size='20' class='validate[required,custom[onlyLetterSp]]' id='strait'/></td><td>Huisnr.:</td><td><input type='text' name='huisnr' size='2' class='validate[required,custom[huisnummer]]' id='huisnr'/></td></tr>
  90. <tr><td>Postcode:</td><td><input type='text' name='postcode' class='validate[required,custom[postcode]]' size='20' id='post code' /></td><td>Plaats:</td><td><input type='text' name='plaats' size='20' class='validate[required,custom[onlyLetterSp]]' id='plaats' /></td></tr>
  91.  
  92. <tr>
  93.     <td>
  94. <input type='submit' name='submit' value='Bestellen' /><input type='button' name='error' value='Verberg errors' onclick="$('#bestelformulier').validationEngine('hideAll');" />
  95.      
  96.     </td>
  97. </tr>
  98.  
  99. </form>
  100.  
  101. </table>
  102. __HTML_END;
  103. ?>
Advertisement
Add Comment
Please, Sign In to add comment