예제 #1
0
 function _mkObj($array)
 {
     $mf = new Mf();
     $mf->setMbrid($array["mbrid"]);
     $mf->setCode($array["code"]);
     $mf->setData($array["data"]);
     /*
     if ($this->_tableNm == "collection_dm") {
       $mf->setDaysDueBack($array["days_due_back"]);
       $mf->setDailyLateFee($array["daily_late_fee"]);
     }
     
     if (isset($array['checkout_limit'])) {
       $mf->setCheckoutLimit($array["checkout_limit"]);
     }
     if (isset($array['renewal_limit'])) {
       $mf->setRenewalLimit($array["renewal_limit"]);
     }
     if (isset($array["image_file"])) {
       $mf->setImageFile($array["image_file"]);
     }
     if (isset($array["max_fines"])) {
       $mf->setMaxFines($array["max_fines"]);
     }
     if (isset($array["row_count"])) {
       $mf->setCount($array["row_count"]);
     }
     */
     return $mf;
 }
//
require_once "../functions/errorFuncs.php";
require_once "../classes/Localize.php";
$loc = new Localize(OBIB_LOCALE, $tab);
#****************************************************************************
#*  Checking for post vars.  Go back to form if none found.
#****************************************************************************
if (count($_POST) == 0) {
    header("Location: ../admin/member_fields_list.php");
    exit;
}
#****************************************************************************
#*  Validate data
#****************************************************************************
$mf = new Mf();
$mf->setMbrid($_POST["mbrid"]);
$_POST["mbrid"] = $mf->getMbrid();
$mf->setCode($_POST["code"]);
$_POST["code"] = $mf->getCode();
$mf->setData($_POST["data"]);
$_POST["data"] = $mf->getData();
if (!$mf->validateData()) {
    $pageErrors["data"] = $mf->getDataError();
    $_SESSION["postVars"] = $_POST;
    $_SESSION["pageErrors"] = $pageErrors;
    header("Location: ../admin/member_fields_edit_form.php");
    exit;
}
#**************************************************************************
#*  Update domain table row
#**************************************************************************