Example #1
0
function F_GBITEXTBOX($p)
{
    $tokens = explode("|", $p);
    $sTable = $tokens[0];
    $sField = $tokens[1];
    $sWhere = $tokens[2];
    $sRecordValue = F_SELECTRECORD("SELECT " . $sField . " FROM " . $sTable . " WHERE " . $sWhere);
    $sRoContent = str_replace("^", " ", $sRecordValue);
    if ($sRoContent == "") {
        $sRoContent = "niet ingevuld";
    }
    if (strtotime($sRoContent) == TRUE) {
        $dt = strtotime($sRoContent);
        $corrected_date = BST_finder($dt);
        $sRoContent = date("d-m-Y", $corrected_date);
    }
    return $sRoContent;
}
Example #2
0
function F_GBITEXTDATEBOX($p)
{
    $tokens = explode("|", $p);
    $sTable = $tokens[0];
    $sField = $tokens[1];
    $sWhere = $tokens[2];
    $sWidth = $tokens[3];
    $sRecordValue = F_SELECTRECORD("SELECT " . $sField . " FROM " . $sTable . " WHERE " . $sWhere);
    if (strtotime($sRecordValue) == TRUE) {
        $dt = strtotime($sRecordValue);
        $corrected_date = BST_finder($dt);
        $sRecordValue = date("d-m-Y", $corrected_date);
    }
    $sRoContent = str_replace("^", " ", $sRecordValue);
    $sBoxCode = "<INPUT STYLE='font-size: 13px; font-family: arial; border; groove; border-style: solid; border-width: 1px; border-color: #000000; width: " . $sWidth . "' TYPE=TEXT STYLE=" . "\"" . "{width: 200px; color: #000000}" . "\"" . " ID=txt" . $sField . " NAME=fld" . $sTable . "|" . $sField . " VALUE=" . "\"" . $sRecordValue . "\"" . " onchange=" . "\"" . "execserver('?e=@GBIEXEC&p=UPDATE" . "|" . $sTable . "|" . $sField . "|" . $sWhere . "|" . "' + this.value);" . "\"" . ">";
    if (@$_SESSION["GBIPRO"] != "") {
        return $sRoContent;
    } else {
        return $sBoxCode;
    }
}