$categories->Export = @$_GET["export"];
// Get export parameter
$sExport = $categories->Export;
// Get export parameter, used in header
$sExportFile = $categories->TableVar;
// Get export file, used in header
// Load key from QueryString
if (@$_GET["id"] != "") {
    $categories->id->setQueryStringValue($_GET["id"]);
}
// Create form object
$objForm = new cFormObj();
if (@$_POST["a_edit"] != "") {
    $categories->CurrentAction = $_POST["a_edit"];
    // Get action code
    LoadFormValues();
    // Get form values
} else {
    $categories->CurrentAction = "I";
    // Default action is display
}
// Check if valid key
if ($categories->id->CurrentValue == "") {
    Page_Terminate($categories->getReturnUrl());
}
// Invalid key, exit
switch ($categories->CurrentAction) {
    case "I":
        // Get a record to display
        if (!LoadRow()) {
            // Load Record based on key
Exemple #2
0
function RestoreCurrentRowFormValues()
{
    global $objForm, $logs;
    // Update row index and get row key
    $rowindex = 1;
    $objForm->Index = $rowindex;
    $sKey = strval($objForm->GetValue("k_key"));
    while ($sKey != "") {
        $arrKeyFlds = explode(EW_COMPOSITE_KEY_SEPARATOR, strval($sKey));
        if (count($arrKeyFlds) >= 1) {
            if (strval($arrKeyFlds[0]) == strval($logs->id->CurrentValue)) {
                $objForm->Index = $rowindex;
                LoadFormValues();
                // Load form values
                return;
            }
        }
        // Update row index and get row key
        $rowindex++;
        $objForm->Index = $rowindex;
        $sKey = strval($objForm->GetValue("k_key"));
    }
}