コード例 #1
0
            $nOccupancy = new EBPLSOccupancy($dbLink, 'false');
            $nOccupancy->setData(OCCUPANCY_TYPE_CODE, $nCode);
            $nOccupancy->setData(OCCUPANCY_TYPE_DESC, $nType);
            $nOccupancy->setData(OCCUPANCY_TYPE_DATE_REGISTERED, $datetoday);
            $nOccupancy->setData(OCCUPANCY_TYPE_DATE_UPDATED, $datetoday);
            $nOccupancy->setData(UPDATED_BY, $ThUserData[username]);
            $nOccupancy->add();
        }
    } else {
        $datetoday = date("Y-d-m H:i:s");
        $nOccupancy = new EBPLSOccupancy($dbLink, 'false');
        $nOccupancy->setData(OCCUPANCY_TYPE_CODE, $nCode);
        $nOccupancy->setData(OCCUPANCY_TYPE_DESC, $nType);
        $nOccupancy->setData(OCCUPANCY_TYPE_DATE_UPDATED, $datetoday);
        $nOccupancy->setData(UPDATED_BY, $ThUserData[username]);
        $nOccupancy->update($bbo);
        $bbo = "";
    }
} elseif ($confx == 1) {
    $nOccupancy = new EBPLSOccupancy($dbLink, 'false');
    $nOccupancy->delete($bbo);
    $bbo = "";
}
$nOccupancy = new EBPLSOccupancy($dbLink, 'false');
$nOccupancy->search($bbo, NULL);
$nResult = $nOccupancy->out;
$occupancy_id = $nResult[banks_id];
$nCode = $nResult[occupancy_type_code];
$nType = $nResult[occupancy_type_desc];
include 'html/occupancy.html';
include 'pager/occupancy_page.php';
コード例 #2
0
ファイル: occupancy_page.php プロジェクト: laiello/ebpls
    $pager = 1;
} else {
    $pager = $_GET['page'];
}
// Define the number of results per page
$fromr = abs($pager * $max_resultsr - $max_resultsr);
if ($is_desc == 'DESC') {
    $is_desc = 'ASC';
} else {
    $is_desc = 'DESC';
}
if ($pagemulti == '') {
    $pagemulti = 1;
}
//echo $is_desc."VooDoo";
$nresult = new EBPLSOccupancy($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><br />";
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;";