prepare("SELECT wsh_cus_code FROM workshops WHERE wshid = $acc_wsh"); // execute Query $stmaccis->execute(); // fetch the data $acciss = $stmaccis->fetch(); $redir_wsh = $acciss ['wsh_cus_code']; $acc_id = $_POST["acc_id_is"]; $acc_tittle = filter_var($_POST['acc_tittle_ed'], FILTER_SANITIZE_STRING); $acc_amount = filter_var($_POST['acc_amount_ed'], FILTER_SANITIZE_NUMBER_INT); $acc_date = filter_var($_POST['acc_date_ed'], FILTER_SANITIZE_STRING); if (empty($acc_tittle)){ $formErrors[] = 'amount Cant Be Empty '; } //loop into errors array and echo it foreach($formErrors as $error){ echo '
' . $error . '
' ; } if (empty($formErrors)){ $stmt = $conn->prepare("UPDATE workshopsaccounting SET acc_amount = ?, acc_tittle = ?, acc_date =? WHERE acc_id = $acc_id "); $stmt->execute(array($acc_amount ,$acc_tittle,$acc_date)); header('location:workshop_details.php?wsh='.$redir_wsh); exit(); } } ?> prepare("DELETE FROM workshopsaccounting WHERE acc_id = :zid"); $stmt->bindparam(":zid", $wshdel); $stmt->execute(); header('location:workshop_details.php?wsh='.$wshcucd); exit(); } ?> Empty '; } //loop into errors array and echo it foreach($formErrors as $error){ echo '
' . $error . '
' ; } if (empty($formErrors)){ $editwsh = $conn->prepare("UPDATE workshops SET wsh_customer_name =?, wsh_customer_phone =?, wsh_type =?, wsh_place =?, wsh_desc =? WHERE wshid = $wshedid "); $editwsh->execute(array($wsh_cusname ,$wsh_cusphone,$wsh_type,$wsh_place,$wsh_desc)); header('location:workshops.php'); exit(); } else{ $msg=urlencode("البيانات المدخلة تحتوي على مشكلة" . "، أعد المحاولة"); header('location:ac_workshops.php?Message='. $msg); exit(); } } ?> Empty '; } //loop into errors array and echo it foreach($formErrors as $error){ echo '
' . $error . '
' ; } if (empty($formErrors)){ $stmt = $conn->prepare("INSERT INTO workshopsaccounting(acc_wshid, acc_type, acc_amount, acc_tittle, acc_date) VALUES (:zwid, :zwty, :zwam, :zwti, now() ) "); $stmt->execute(array( 'zwid' => $wsh_id_is, 'zwam' => $wsh_amount_is, 'zwty' => $wsh_type_is, 'zwti' => $wsh_tittle )); header('location:workshop_details.php?wsh='.$cuswsh); exit(); } else{ $msg=urlencode("البيانات المدخلة تحتوي على مشكلة" . "، أعد المحاولة"); header('location:ac_workshops.php?Message='. $msg); exit(); } } ?> Empty '; } //loop into errors array and echo it foreach($formErrors as $error){ echo '
' . $error . '
' ; } if (empty($formErrors)){ $stmt = $conn->prepare("INSERT INTO workshopsaccounting(acc_wshid, acc_type, acc_amount, acc_tittle, acc_date) VALUES (:zwid, :zwty, :zwam,:zwti, now() ) "); $stmt->execute(array( 'zwid' => $wsh_id_is, 'zwam' => $wsh_amount_is, 'zwty' => $wsh_type_is, 'zwti' => $wsh_tittle )); header('location:workshop_details.php?wsh='.$cuswsh); exit(); } else{ $msg=urlencode("البيانات المدخلة تحتوي على مشكلة" . "، أعد المحاولة"); header('location:ac_workshops.php?Message='. $msg); exit(); } } ?>

إضافة إيراد لورشة عمل


إضافة مصروف لورشة عمل


prepare("SELECT * FROM workshopsaccounting WHERE acc_id = $accid"); // execute Query $stmacc->execute(); // fetch the data $accinfo = $stmacc->fetch(); ?>

تعديل بيانات قيد ورشة


prepare("SELECT * FROM workshops WHERE wshid = $wshid"); // execute Query $stmawsh->execute(); // fetch the data $wshcop = $stmawsh->fetch(); ?>

تعديل بيانات ورشة عمل