Пример #1
0
            $nIndustry = new EBPLSIndustry($dbLink, 'false');
            $nIndustry->setData(INDUSTRY_SECTOR_CODE, $nCode);
            $nIndustry->setData(INDUSTRY_SECTOR_DESC, $nType);
            $nIndustry->setData(INDUSTRY_SECTOR_DATE_REGISTERED, $datetoday);
            $nIndustry->setData(INDUSTRY_SECTOR_DATE_UPDATED, $datetoday);
            $nIndustry->setData(UPDATED_BY, $ThUserData[username]);
            $nIndustry->add();
        }
    } else {
        $datetoday = date("Y-d-m H:i:s");
        $nIndustry = new EBPLSIndustry($dbLink, 'false');
        $nIndustry->setData(INDUSTRY_SECTOR_CODE, $nCode);
        $nIndustry->setData(INDUSTRY_SECTOR_DESC, $nType);
        $nIndustry->setData(INDUSTRY_SECTOR_DATE_UPDATED, $datetoday);
        $nIndustry->setData(UPDATED_BY, $ThUserData[username]);
        $nIndustry->update($bbo);
        $bbo = "";
    }
} elseif ($confx == 1) {
    $nIndustry = new EBPLSIndustry($dbLink, 'false');
    $nIndustry->delete($bbo);
    $bbo = "";
}
$nIndustry = new EBPLSIndustry($dbLink, 'false');
$nIndustry->search($bbo, NULL);
$nResult = $nIndustry->out;
$industry_id = $nResult[industry_sector_code];
$nCode = $nResult[industry_sector_code];
$nType = $nResult[industry_sector_desc];
include 'html/industry.html';
include 'pager/industry_page.php';
Пример #2
0
// Define the number of results per page
$fromr = abs($pager * $max_resultsr - $max_resultsr);
if ($is_desc == 'DESC' or $is_desc == '') {
    // flip between ASC and DESC
    $is_desc = 'ASC';
} else {
    $is_desc = 'DESC';
}
if ($pagemulti == '') {
    $pagemulti = 1;
}
if ($orderkey == '') {
    $orderkey = 'industry_sector_code';
    $is_desc = 'ASC';
}
$nresult = new EBPLSIndustry($dbLink, 'false');
$nresult->pagesearch($fromr, $max_resultsr, $orderkey, $is_desc);
$fetarray = $nresult->rcount;
//echo $fetarray."VooDoo";
//echo $total_resultsr."Robert<br>";
$total_sr = @mysql_fetch_array($fetarray);
$total_resultsr = $total_sr[0];
//echo $fetarray[0]."VooDoo";
$fetchrecord = $nresult->out;
// Figure out the total number of pages. Always round up using ceil()
$total_pagesr = ceil($total_resultsr / $max_resultsr);
//echo $total_resultsr."VooDoo";
echo "<table border=0 width=100%><tr><td align=left>";
if ($pager > 1) {
    $prevr = $pager - 1;
    echo "<a href='index.php?part=4&class_type=Preference&selMode={$selMode}&action_=8&itemEvent=1&data_item=0&page=1&orderkey={$orderkey}&ascdesc1={$ascdesc1}'>&lt;&lt;</a>&nbsp;";