by mdsee999 » 17/11/2008 6:32 pm
ผมคัดลอกโค๊ดมาให้ดู ไม่ทราบว่าถูกต้องหรือเปล่าครับ
และแนบไฟล์มาให้ดูด้วย
// display booking summary...
if (Request::get('mosuser')){
$idarray = explode("|", Request::get('mosuser'));
$uid = $idarray[0];
$sql = "SELECT * FROM `#__carman_customers` WHERE id='".$uid."'";
$database->setQuery($sql);
$rows = $database->loadObjectList();
if (empty($rows)) {
echo "<script> alert('The CMS user you have chosen is not in the Car Manager DB. Please add a new customer'); window.history.go(-1); </script>";
}
} else {
if (!Request::get('email') || !Request::get('surname')) {
echo "<script> alert('You must enter the customers email address and surname to continue.'); window.history.go(-1); </script>";
}
if ($mf->checkMOSUser(Request::get('username'))) {
echo "<script>if (confirm('The email address you have entered is already registered on the CMS, click Ok to Continue or Cancel to Return and Edit')) { document.adminForm.paid.focus() }else{window.history.go(-1)};</script>";
}
$uid = Request::get('uid');
}
$total = $cf->GetRentalPrice(
Request::get('startdate'),
Request::get('enddate'),
$uid
);
$deposit = ($carman_config["deposit"] * $total) / 100;
$today = date("Y-m-d");
$daysfromNow = IntVal(
$cf->NumberofDays(
$today,
$cf->MySQLScreenDateFormat($startdate),
"-"
)
);
ผมคัดลอกโค๊ดมาให้ดู ไม่ทราบว่าถูกต้องหรือเปล่าครับ
และแนบไฟล์มาให้ดูด้วย
// display booking summary...
if (Request::get('mosuser')){
$idarray = explode("|", Request::get('mosuser'));
$uid = $idarray[0];
$sql = "SELECT * FROM `#__carman_customers` WHERE id='".$uid."'";
$database->setQuery($sql);
$rows = $database->loadObjectList();
if (empty($rows)) {
echo "<script> alert('The CMS user you have chosen is not in the Car Manager DB. Please add a new customer'); window.history.go(-1); </script>";
}
} else {
if (!Request::get('email') || !Request::get('surname')) {
echo "<script> alert('You must enter the customers email address and surname to continue.'); window.history.go(-1); </script>";
}
if ($mf->checkMOSUser(Request::get('username'))) {
echo "<script>if (confirm('The email address you have entered is already registered on the CMS, click Ok to Continue or Cancel to Return and Edit')) { document.adminForm.paid.focus() }else{window.history.go(-1)};</script>";
}
$uid = Request::get('uid');
}
$total = $cf->GetRentalPrice(
Request::get('startdate'),
Request::get('enddate'),
$uid
);
$deposit = ($carman_config["deposit"] * $total) / 100;
$today = date("Y-m-d");
$daysfromNow = IntVal(
$cf->NumberofDays(
$today,
$cf->MySQLScreenDateFormat($startdate),
"-"
)
);