diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminAccount.php b/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminAccount.php deleted file mode 100644 index 902a350..0000000 --- a/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminAccount.php +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - Account - - - - - - - - -
-
-

ACCOUNT

-
-
- - - - - - -

BURAYA INFORMATION ICONU VE BİLGİ EKLE

- -
- -
-
-
-
- FIRST - -
-
- LAST - -
-
- USER NAME - -
-
- #FLAT - -
-
- GSM - -
-
- E-MAIL - -
-
- PASSWORD - -
-
- - - - - Registration Successful

"; - } elseif ($_GET['adminUserSign'] == "failed") { - echo "

Registration Failed

"; - } - } - ?> -
- prepare("UPDATE usersinfo set - userUsername=:userUsername, - userName=:userName, - userSurname=:userSurname, - userEmail=:userEmail, - userUsername=:userUsername, - userFlatno=:userFlatno, - userPassword=:userPassword, - userGSM=:userGSM - - where userID={$_SESSION['userID']} - "); - - $insert = $kaydet->execute(array( - - 'userName' => $_POST['userName'], - 'userSurname' => $_POST['userSurname'], - 'userEmail' => $_POST['userEmail'], - 'userUsername' => $_POST['userUsername'], - 'userFlatno' => $_POST['userFlatno'], - 'userPassword' => md5($_POST['userPasswordNEW']), - 'userGSM' => $_POST['userGSM'] - - )); - if ($insert) { - //echo "kayıt başarılı"; - Header("location:account.php?update=ok&bilgilerim_id=$bilgilerim_id"); - exit; - } else { - //echo "kayıt başarısız"; - Header("Location:account.php?update=no&bilgilerim_id=$bilgilerim_id"); - exit; - } - } else { - echo "
"; - } - } - ?> - "; - } elseif ($_GET['update'] == "no") { - echo "
"; - } - } - ?> -
-
-
-
-
- ADMIN FIRST - -
-
- ADMIN LAST - -
-
- ADMIN USER NAME - -
-
- ADMIN GSM-1 - -
-
- ADMIN GSM-2 - -
-
- ADMIN E-MAIL - -
-
- ADMIN PASSWORD - -
-
- - - - - Registration Successful

"; - } elseif ($_GET['adminNewAdmin'] == "failed") { - echo "

Registration Failed

"; - } - } - ?> - -
- prepare("UPDATE usersinfo set - userUsername=:userUsername, - userName=:userName, - userSurname=:userSurname, - userEmail=:userEmail, - userUsername=:userUsername, - userFlatno=:userFlatno, - userPassword=:userPassword, - userGSM=:userGSM - - where userID={$_SESSION['userID']} - "); - - $insert = $kaydet->execute(array( - - 'userName' => $_POST['userName'], - 'userSurname' => $_POST['userSurname'], - 'userEmail' => $_POST['userEmail'], - 'userUsername' => $_POST['userUsername'], - 'userFlatno' => $_POST['userFlatno'], - 'userPassword' => md5($_POST['userPasswordNEW']), - 'userGSM' => $_POST['userGSM'] - - )); - if ($insert) { - //echo "kayıt başarılı"; - Header("location:account.php?update=ok&bilgilerim_id=$bilgilerim_id"); - exit; - } else { - //echo "kayıt başarısız"; - Header("Location:account.php?update=no&bilgilerim_id=$bilgilerim_id"); - exit; - } - } else { - echo "
"; - } - } - ?> - "; - } elseif ($_GET['update'] == "no") { - echo "
"; - } - } - ?> -
-
- - - - - - - \ No newline at end of file diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminBills.php b/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminBills.php index 2808206..260ae1a 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminBills.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/admin/adminBills.php @@ -109,12 +109,10 @@ function logoutFun() { Bill ID Bill Date - is ok - Rent - Corridor Electric Bill - Maintenance Bill - Corridor Cleaning Bill - Fuel Bill + Periot + Bill Type + Amount + Status SUM UPDATE DELETE @@ -125,24 +123,20 @@ function logoutFun() { $checkUserInDB->execute(); while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) { ?> - + + + + - - - - - - + -

prepare("INSERT into bills set - rent=:rent, - corridorLight=:corridorLight, - corridorWater=:corridorWater, - corridorCleaning=:corridorCleaning, - fuel =:fuel, + billDate=:billDate, + periot=:periot, + billType=:billType, + amount=:amount, isOK =:isOK "); $insert = $kaydet->execute(array( - 'rent' => $_POST['rent'], - 'corridorLight' => $_POST['corridorLight'], - 'corridorWater' => $_POST['corridorWater'], - 'corridorCleaning' => $_POST['corridorCleaning'], - 'fuel' => $_POST['fuel'], + 'billDate' => $_POST['billDate'], + 'periot' => $_POST['periot'], + 'billType' => $_POST['billType'], + 'amount' => $_POST['amount'], 'isOK' => $_POST['isOK'] )); if ($insert) { @@ -275,9 +277,11 @@ function logoutFun() { Invoice Number Date + Periot Payer ID Name #Flat + Type Amount "; @@ -288,9 +292,11 @@ function logoutFun() { + + - - - - - - - To/Do - - - - - -
-
-

to-do page

-
-
- - - -
- - -
-
- garden arrangements -
- -
- -
- apartment expenses
- -
- -
- -
- - - - - - - - \ No newline at end of file diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/css/admin/adminTODO.css b/Projects/Project-1_DesignApartmentManager(NEW)/css/admin/adminTODO.css deleted file mode 100644 index 5f6b66e..0000000 --- a/Projects/Project-1_DesignApartmentManager(NEW)/css/admin/adminTODO.css +++ /dev/null @@ -1,193 +0,0 @@ -* { - margin: 0; - padding: 0; - box-sizing: border-box; - font-family: Arial, Helvetica, sans-serif; -} - -body { - margin: 0; - padding: 0; -} - -.welcome { - background-image: linear-gradient(to left, #ed4264, #ffedbc); - padding: 3.5%; - text-align: center; - font-size: 2rem; - text-transform: capitalize; - color: #333; -} - -#welcome { - text-shadow: 2px 1.5px #ffedbc; -} - -.nav { - background-color: #333; - color: white; - padding: 1rem; - display: flex; - align-items: center; - justify-content: space-between; - -} - -.nav-ul { - margin: 0; - list-style: none; - display: flex; -} - -.nav-ul-li { - padding: .75rem; -} - -.nav-ul-li:hover { - background-color: #777; -} - -.nav-ul-li a { - text-decoration: none; - color: inherit; -} - - - - -.main-content { - display: flex; - padding: 2%; - flex-wrap: wrap; - flex-direction: row; -} - -.main-content-1 { - background-color: rgb(237, 66, 100,0.5); - padding: 4%; - margin: auto; - text-transform: capitalize; - color: #333; -} -.main-content-1 li{ - font-size: 1.5rem; -} - -.main-content-1 span { - font-size: 2rem; - -} - -.main-content-2 { - background-color: rgb(237, 66, 100,0.5); - padding: 4%; - margin: auto; - text-transform: capitalize; - color: #333; -} - -.main-content-2 li{ - font-size: 1.5rem; -} - -.main-content-2 span { - font-size: 2rem; -} - - - - -.section { - background-image: linear-gradient(to right, rgb(237, 66, 100, 0.5), rgb(255, 237, 189, 0.5)); - padding: 1rem; - margin: 1em 15%; - -} - -.text-table { - color: white; - text-shadow: 2px 1.5px blue; - ; - font-size: 1em; -} - -table, -th, -td { - border: 3px solid black; - border-collapse: collapse; - padding: 1rem; - margin: auto; -} - -.btn-class { - margin-left: 65%; -} - -.btn { - padding: 1em; - margin: 0.5em 1em; - outline: none; - font-size: 1em; - border-radius: 0.6em; - -} - -.btn :hover { - background-color: #ddd; - box-shadow: 0 0 5px #ccc; -} - - -.links { - position: fixed; - width: 100%; - height: 10%; - bottom: 0; - background-color: #333; - padding: 1rem; - display: flex; - align-items: center; - justify-content: center; - -} - -.links ul { - margin: 0; - list-style: none; - display: flex; - -} - -.links ul li { - padding: .5rem; -} - -.links ul li:hover { - background-color: #777; -} - -.links ul li a { - text-decoration: none; - color: inherit; -} - -.btn-class { - margin-left: 65%; - cursor: pointer; -} - -.btn { - padding: .5em; - margin: 0.5em 1em; - outline: none; - font-size: 1em; - border-radius: 0.6em; - cursor: pointer; - -} - -.btn :hover { - background-color: #ddd; - box-shadow: 0 0 5px #ccc; -} \ No newline at end of file diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/index/delete.php b/Projects/Project-1_DesignApartmentManager(NEW)/index/delete.php index 998e6c0..b6d4cf4 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/index/delete.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/index/delete.php @@ -36,4 +36,21 @@ exit; } } +if($_GET['billDelete'] == "delete"){ + + $sil=$db->prepare("DELETE from bills where billID=:billID"); + $kontrol=$sil->execute(array( + 'billID' => $_GET['billID'] + )); + if ($kontrol) { + + Header("Location:../admin/adminBills.php?delete=ok"); + exit; + + } else { + Header("Location:../admin/adminBills.php?durum=no"); + exit; + } + +} diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/index/new_user_sign.php b/Projects/Project-1_DesignApartmentManager(NEW)/index/new_user_sign.php index 9b7465d..7f987a4 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/index/new_user_sign.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/index/new_user_sign.php @@ -117,21 +117,24 @@ // ADMIN LOG IN SLIDE if (isset($_POST['admin-btn'])) { - $adminUSERNAME = $_POST['adminUSERNAME']; - $adminPASSWORD = md5($_POST['adminPASSWORD']); - $checkUserInDB = $db->prepare("SELECT * FROM adminpanel WHERE - adminUSERNAME=:adminUSERNAME AND adminPASSWORD=:adminPASSWORD"); + $userUsername = $_POST['userUsername']; + $userPassword = md5($_POST['userPassword']); + $isAdmin = 'admin'; + + $checkUserInDB = $db->prepare("SELECT * FROM usersinfo WHERE + userUsername=:userUsername AND userPassword=:userPassword AND isAdmin=:isAdmin"); $checkUserInDB->execute(array( - 'adminUSERNAME' => $adminUSERNAME, - 'adminPASSWORD' => $adminPASSWORD + 'userUsername' => $userUsername, + 'userPassword' => $userPassword, + 'isAdmin' => $isAdmin )); $int = $checkUserInDB->rowCount(); if ($int == 1) { $pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC); - $_SESSION['adminUSERNAME'] = $adminUSERNAME; - $_SESSION['adminNAME'] = $pullinfo['adminNAME']; - $_SESSION['adminSURNAME'] = $pullinfo['adminSURNAME']; + $_SESSION['adminUSERNAME'] = $userUsername; + $_SESSION['adminNAME'] = $pullinfo['userName']; + $_SESSION['adminSURNAME'] = $pullinfo['userSurname']; header("Location:../admin/adminPanel.php"); exit; } elseif ($int == 0) { @@ -140,7 +143,7 @@ if ($adminPASSWORD != $pullinfo2['adminPASSWORD']) { header("Location:../log.php?fail=ADMINpassword"); exit; - } elseif ($adminUSERNAME != $pullinfo2['adminUSERNAME']) { + } elseif ($userUsername != $pullinfo2['userPassword']) { header("Location:../log.php?fail=ADMINusername"); exit; } else { diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/index/payBill.php b/Projects/Project-1_DesignApartmentManager(NEW)/index/payBill.php index cf3d20c..0e94cae 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/index/payBill.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/index/payBill.php @@ -124,43 +124,33 @@ $bilgilerimcek = $bilgilerimsor->fetch(PDO::FETCH_ASSOC); $billID = $bilgilerimcek['billID']; $billDate = $bilgilerimcek['billDate']; - $rent = $bilgilerimcek['rent']; - $corridorLight = $bilgilerimcek['corridorLight']; - $corridorWater = $bilgilerimcek['corridorWater']; - $corridorCleaning = $bilgilerimcek['corridorCleaning']; - $fuel = $bilgilerimcek['fuel']; + $periot = $bilgilerimcek['periot']; + $billType = $bilgilerimcek['billType']; + $amount = $bilgilerimcek['amount']; $isOK = $bilgilerimcek['isOK']; echo "
- RENT - + billID +
- RENT - + Bill Date +
- RENT - + periot +
- LIGHT - + billType +
- WATER - -
-
- CLEANING - -
-
- FUEL - + amount +
Show the Content @@ -185,22 +175,20 @@ if (isset($_POST['updateBill'])) { $kaydet = $db->prepare("UPDATE bills set - rent=:rent, - corridorLight=:corridorLight, - corridorWater=:corridorWater, - corridorCleaning=:corridorCleaning, - fuel =:fuel, + billDate=:billDate, + periot=:periot, + billType=:billType, + amount=:amount, isOK =:isOK where billID={$billID} "); $insert = $kaydet->execute(array( - 'rent' => $_POST['rent'], - 'corridorLight' => $_POST['corridorLight'], - 'corridorWater' => $_POST['corridorWater'], - 'corridorCleaning' => $_POST['corridorCleaning'], - 'fuel' => $_POST['fuel'], + 'billDate' => $_POST['billDate'], + 'periot' => $_POST['periot'], + 'billType' => $_POST['billType'], + 'amount' => $_POST['amount'], 'isOK' => $_POST['isOK'] )); @@ -225,17 +213,23 @@ if (isset($_GET['userPayBill'])) { $kaydet = $db->prepare("INSERT into billpayers set - payerID=:payerID, - payerName=:payerName, - payerFlat=:payerFlat, - payerMuch=:payerMuch + billID=:billID, + payerID=:payerID, + payerName=:payerName, + payerFlat=:payerFlat, + periot=:periot, + paymentType=:paymentType, + payerMuch=:payerMuch - "); + "); $insert = $kaydet->execute(array( + 'billID' => $_GET['billID'], 'payerID' => $_SESSION['userID'], 'payerName' => $_SESSION['userName'], 'payerFlat' => $_SESSION['userFlatno'], + 'periot' => $_GET['periot'], + 'paymentType' => $_GET['type'], 'payerMuch' => $_GET['sumOfBill'] )); diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/log.php b/Projects/Project-1_DesignApartmentManager(NEW)/log.php index db1aa07..bae164e 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/log.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/log.php @@ -84,8 +84,8 @@ - - + +



- \ No newline at end of file diff --git a/Projects/Project-1_DesignApartmentManager(NEW)/to-do.php b/Projects/Project-1_DesignApartmentManager(NEW)/to-do.php index 157b518..a23cb0e 100644 --- a/Projects/Project-1_DesignApartmentManager(NEW)/to-do.php +++ b/Projects/Project-1_DesignApartmentManager(NEW)/to-do.php @@ -113,11 +113,9 @@ function logoutFun() { Bill ID Bill Date - Rent - Corridor Electric Bill - Maintenance Bill - Corridor Cleaning Bill - Fuel Bill + Periot + Bill Type + Bill Amount SUM PAY @@ -126,35 +124,30 @@ function logoutFun() { prepare("SELECT * FROM bills WHERE isOK = 1"); $checkUserInDB->execute(); - while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) { - $sum = $pullinfo['rent'] + ($pullinfo['corridorLight'] / 10) + ($pullinfo['corridorWater'] / 10) + ($pullinfo['corridorCleaning'] / 10) + ($pullinfo['fuel'] / 10); + while (($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC))) { ?> - - - - - - + + + +
+ + echo ""; - } ?> @@ -181,11 +174,12 @@ function alertFun() { - + - + + @@ -196,11 +190,12 @@ function alertFun() { while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) { ?> - + - + +
Invoice NumberBill ID Payer DatePayer ID Payer Name Payer Flat NoPeriotType Amount Paid