}
												 });
											});
										</script>
									
										<tr id="fileRow">
											<td> 
												<b><?php 
                                print _('Submit File');
                                ?>
 *</b><br/>
											</td>
											<td class="right">
												<input type="file" name="file" id="file"><br/><br/>
												<?php 
                                print getMaxUpload();
                                //Get list of acceptable file extensions
                                try {
                                    $dataExt = array();
                                    $sqlExt = "SELECT * FROM gibbonFileExtension";
                                    $resultExt = $connection2->prepare($sqlExt);
                                    $resultExt->execute($dataExt);
                                } catch (PDOException $e) {
                                }
                                $ext = "";
                                while ($rowExt = $resultExt->fetch()) {
                                    $ext = $ext . "'." . $rowExt["extension"] . "',";
                                }
                                ?>
											
												<script type="text/javascript">
Example #2
0
						</tr>
						<?php 
                while ($rowFields = $resultFields->fetch()) {
                    print renderCustomFieldRow($connection2, $guid, $rowFields, @$fields[$rowFields["gibbonPersonFieldID"]]);
                }
            }
            ?>
						
					<tr>
						<td>
							<span style="font-size: 90%"><i>* <?php 
            print _("denotes a required field");
            ?>
</i><br/>
							<?php 
            print getMaxUpload(TRUE);
            ?>
							</span>
						</td>
						<td class="right">
							<input type="hidden" name="address" value="<?php 
            print $_SESSION[$guid]["address"];
            ?>
">
							<input type="submit" value="<?php 
            print _("Submit");
            ?>
">
						</td>
					</tr>
				</table>
    $output .= "</script>";
    $output .= "</td>";
    $output .= "</tr>";
}
$output .= "<tr>";
$output .= "<td>";
$output .= "<b>" . _("Insert Images As") . "*</b><br/>";
$output .= "</td>";
$output .= "<td class=\"right\">";
$output .= "<select name=\"imagesAsLinks\" id=\"imagesAsLinks\" style=\"width: 302px\">";
$output .= "<option value='N'>" . _('Image') . "</option>";
$output .= "<option value='Y'>" . _('Link') . "</option>";
$output .= "</select>";
$output .= "</td>";
$output .= "</tr>";
$output .= "<tr>";
$output .= "<td>";
$output .= getMaxUpload(TRUE);
$output .= "</td>";
$output .= "<td class='right'>";
$output .= "<input type='hidden' name='id' value='" . $id . "'>";
$output .= "<input type='hidden' name='" . $id . "address' value='" . $_SESSION[$guid]["address"] . "'>";
$output .= "<input type='submit' value='Submit'>";
$output .= "</td>";
$output .= "</tr>";
$output .= "</table>";
$output .= "</form>";
$output .= "</td>";
$output .= "</tr>";
$output .= "</table>";
print $output;
     $dataExt = array();
     $sqlExt = "SELECT * FROM gibbonFileExtension";
     $resultExt = $connection2->prepare($sqlExt);
     $resultExt->execute($dataExt);
 } catch (PDOException $e) {
 }
 $ext = "";
 while ($rowExt = $resultExt->fetch()) {
     $ext = $ext . "'." . $rowExt["extension"] . "',";
 }
 $output .= "var " . $id . "file=new LiveValidation('" . $id . "file');";
 $output .= $id . "file.add( Validate.Inclusion, { within: [" . $ext . "], failureMessage: 'Illegal file type!', partialMatch: true, caseSensitive: false } );";
 $output .= $id . "file.add(Validate.Presence);";
 $output .= $id . "file.disable();";
 $output .= "</script>";
 $output .= getMaxUpload();
 $output .= "</td>";
 $output .= "</tr>";
 $output .= "<tr id='" . $id . "resourceLink'>";
 $output .= "<td>";
 $output .= "<b>" . _('Link') . " *</b><br/>";
 $output .= "</td>";
 $output .= "<td class='right'>";
 $output .= "<input name='" . $id . "link' id='" . $id . "link' maxlength=255 value='' type='text' style='width: 300px'>";
 $output .= "<script type='text/javascript'>";
 $output .= "var " . $id . "link=new LiveValidation('" . $id . "link');";
 $output .= $id . "link.add(Validate.Presence);";
 $output .= $id . "link.add( Validate.Format, { pattern: /(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/, failureMessage: 'Must start with http://' } );";
 $output .= $id . "link.disable();";
 $output .= "</script>";
 $output .= "</td>";