} $users .= "</ol>"; $usershtml = "<a href='#' class='users' data-toggle='popover' data-content='{$users}' ><i class='fa fa-list'></i></a>"; } return $usershtml; } /*-----------執行動作判斷區----------*/ $op = empty($_REQUEST['op']) ? "" : $_REQUEST['op']; $jbt_sn = empty($_REQUEST['jbt_sn']) ? "" : intval($_REQUEST['jbt_sn']); $jbi_sn = empty($_REQUEST['jbi_sn']) ? "" : intval($_REQUEST['jbi_sn']); switch ($op) { /*---判斷動作請貼在下方---*/ case "single_insert_booking": $jb_sn = insert_jill_booking(1); $jb_week[$jbt_sn] = date("w", strtotime($_POST['jb_date'])); insert_jill_booking_week($jb_sn, $jbt_sn, 1, $jb_week); insert_jill_booking_date($jb_sn, 1, $jbi_sn); $icon = delete_booking_icon($jbt_sn - 1, $jb_week[$jbt_sn], $jbt_sn, $_POST['jb_date'], $jbi_sn); die($icon); break; case "delete_booking": if (is_date($_REQUEST['jb_date']) == 1) { //die($jbt_sn."==".$jbi_sn."==".$_REQUEST['jb_date']); delete_booking($jbt_sn, $_REQUEST['jb_date'], $jbi_sn); header("location: {$_SERVER['PHP_SELF']}?op=booking_table&jbi_sn={$jbi_sn}&getdate={$_REQUEST['jb_date']}"); } break; case "jill_booking_form": if (is_date($_REQUEST['jb_date']) == 1) { jill_booking_form($jbt_sn, $_REQUEST['jb_date']); }
function bath_insert() { //XOOPS表單安全檢查 if (!$GLOBALS['xoopsSecurity']->check()) { $error = implode("<br />", $GLOBALS['xoopsSecurity']->getErrors()); redirect_header($_SERVER['PHP_SELF'], 3, $error); } $jb_sn = insert_jill_booking($jbt_sn); foreach ($_POST['jb_week'] as $jbt_sn => $jb_week) { insert_jill_booking_week($jb_sn, $jbt_sn, "", $jb_week); } $sn['jb_sn'] = $jb_sn; $sn['jbi_sn'] = $_POST['jbi_sn']; return $sn; }