function LoadRow()
{
    global $conn, $Security, $categories;
    $sFilter = $categories->SqlKeyFilter();
    if (!is_numeric($categories->id->CurrentValue)) {
        return FALSE;
        // Invalid key, exit
    }
    $sFilter = str_replace("@id@", ew_AdjustSql($categories->id->CurrentValue), $sFilter);
    // Replace key value
    // Call Row Selecting event
    $categories->Row_Selecting($sFilter);
    // Load sql based on filter
    $categories->CurrentFilter = $sFilter;
    $sSql = $categories->SQL();
    if ($rs = $conn->Execute($sSql)) {
        if ($rs->EOF) {
            $LoadRow = FALSE;
        } else {
            $LoadRow = TRUE;
            $rs->MoveFirst();
            LoadRowValues($rs);
            // Load row values
            // Call Row Selected event
            $categories->Row_Selected($rs);
        }
        $rs->Close();
    } else {
        $LoadRow = FALSE;
    }
    return $LoadRow;
}
示例#2
0
function LoadRow()
{
    global $conn, $Security, $hoturls, $view;
    $sFilter = $hoturls->SqlKeyFilter();
    if (!is_numeric($hoturls->id->CurrentValue)) {
        return FALSE;
        // Invalid key, exit
    }
    $sFilter = str_replace("@id@", ew_AdjustSql($hoturls->id->CurrentValue), $sFilter);
    // Replace key value
    // Call Row Selecting event
    $hoturls->Row_Selecting($sFilter);
    // Load sql based on filter
    $hoturls->CurrentFilter = $sFilter;
    $sSql = "SELECT * FROM `hoturls`  WHERE id=" . @$_GET["id"] . "";
    if ($rs = $conn->Execute($sSql)) {
        if ($rs->EOF) {
            $LoadRow = FALSE;
        } else {
            $LoadRow = TRUE;
            $rs->MoveFirst();
            LoadRowValues($rs);
            // Load row values
            // Call Row Selected event
            $hoturls->Row_Selected($rs);
        }
        $rs->Close();
    } else {
        $LoadRow = FALSE;
    }
    return $LoadRow;
}