Beispiel #1
0
function CleanFormInput($form, $request)
{
    foreach ($form->field as $field) {
        switch ($field['cleanMethod']) {
            case 'regex':
                break;
            case 'htmlpurifier':
                break;
            case 'enum':
                if (!in_array($request[GetFieldName($field)], GetFieldEnum($field))) {
                    return false;
                }
                break;
        }
    }
    return $request;
}
Beispiel #2
0
</b>
					<?php 
            if (GetFieldLabel($itemField) == "Image") {
                ?>
						<input name="<?php 
                echo GetFieldLabel($itemField);
                ?>
" type="file"></input>	
					<?php 
            } else {
                ?>
						<input name="<?php 
                echo GetFieldLabel($itemField);
                ?>
" type="text" value="<?php 
                echo $item[GetFieldName($itemField)];
                ?>
"></input>	
					<?php 
            }
            ?>
	
				<?php 
        }
        ?>
				<br><br>
			<?php 
    }
    ?>
			<input type="submit" value="Save Changes"/>
		</form>	
Beispiel #3
0
    $item_id = 1;
    $Title1 = "<a href=\"" . $ADMIN_PATH . "field/system.php\">" . SECTION_SECTIONS_OPTIONS_SYSTEM . "</a>";
    $Title2 = CONTROL_FIELD_FIELDS . " (" . GetSystemTableRusName($SystemTableID ? $SystemTableID : $Id) . ")";
    $Title3 = "<a href=\"" . $ADMIN_PATH . "field/systemField.php?SystemTableID=" . $SystemTableID . "\">" . CONTROL_FIELD_FIELDS . " (" . GetSystemTableRusName($SystemTableID ? $SystemTableID : $Id) . ")</a>";
    $DocPath = "http://" . $DOC_DOMAIN . "/settings/systables/fields/";
} else {
    $main_section = "control";
    $item_id = 8;
    $Title1 = "<a href=\"" . $ADMIN_PATH . "class/\">" . CONTROL_CLASS . "</a>";
    $Title2 = CONTROL_FIELD_FIELDS . " (" . GetClassNameByID($ClassID) . ")";
    $Title3 = "<a href=\"" . $ADMIN_PATH . "field/?ClassID=" . $ClassID . "\">" . CONTROL_FIELD_FIELDS . " (" . GetClassNameByID($ClassID) . ")</a>";
    $DocPath = "http://" . $DOC_DOMAIN . "/management/class/fields/";
}
if ($FieldID) {
    $Title4 = CONTROL_FIELD_ADDING;
    $Title5 = GetFieldName($FieldID);
    $Title6 = CONTROL_FIELD_EDITING;
}
$Delimeter = " &gt ";
if (!isset($phase)) {
    $phase = 1;
}
if (in_array($phase, array(3, 5, 7))) {
    if (!$nc_core->token->verify()) {
        BeginHtml($Title2, $Title1 . $Delimeter . $Title2, $DocPath);
        nc_print_status(NETCAT_TOKEN_INVALID, 'error');
        EndHtml();
        exit;
    }
}
switch ($phase) {
Beispiel #4
0
	<?php 
    if (IsStoreItem($item)) {
        ?>
		<?php 
        foreach ($itemForm->field as $itemField) {
            ?>
			<?php 
            if (IsFieldDisplayable($itemField)) {
                ?>
				<tr>
					<td><b><?php 
                echo GetFieldLabel($itemField);
                ?>
</b></td>
					<td><?php 
                echo GetFieldDisplay($itemField, $item[GetFieldName($itemField)]);
                ?>
</td>
				</tr>
			<?php 
            }
            ?>
		<?php 
        }
        ?>
		<tr>
			<td><a href="#">View Item</a></td>
			<td>
				<form class="cart-add-form">
					<input class="iditem" type="hidden" value="<?php 
        echo $item['iditem'];