+
List of All Tenant
+
+
+
+ S.NO |
+ ID |
+ Name |
+ Surname |
+ User Name |
+ Flat No |
+ E-Mail |
+ GSM |
+ Register Time |
+ Update |
+ Delete |
+
+ prepare("SELECT * FROM usersinfo");
+ $checkUserInDB->execute();
+ $say = 0;
+ while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) {
+ $say++
+ ?>
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
ALERT EKLE DELETE YAPARKEN
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/admin/adminLogOut.php b/Projects/project1_main/admin/adminLogOut.php
new file mode 100644
index 0000000..1f2523f
--- /dev/null
+++ b/Projects/project1_main/admin/adminLogOut.php
@@ -0,0 +1,4 @@
+
+
+
+
+
+
+
+
Main
+
+
+
+
+
+
+
+
+
+
+
+
+ prepare("SELECT * FROM maintopics");
+ $checkUserInDB->execute();
+ while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) {
+ ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/admin/adminTODO.php b/Projects/project1_main/admin/adminTODO.php
new file mode 100644
index 0000000..720d1ad
--- /dev/null
+++ b/Projects/project1_main/admin/adminTODO.php
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
To/Do
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
garden arrangements
+
+ prepare("SELECT * FROM gardenarrangements");
+ $checkUserInDB->execute();
+ while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) {
+ ?>
+
- ID:
+ -
+
+
+
+
+
+
+
+
apartment expenses
+
+
+ prepare("SELECT * FROM apartmentexpenses");
+ $checkUserInDB->execute();
+ while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) {
+ ?>
+
- ID:
+ - Date:
+ - Light: ₺
+ - Water: ₺
+ - Extra: ₺
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/complaint.php b/Projects/project1_main/complaint.php
index 6c8aebb..06b9b53 100644
--- a/Projects/project1_main/complaint.php
+++ b/Projects/project1_main/complaint.php
@@ -1,3 +1,7 @@
+
@@ -21,43 +25,49 @@
-
+
diff --git a/Projects/project1_main/css/admin/adminAccount.css b/Projects/project1_main/css/admin/adminAccount.css
new file mode 100644
index 0000000..ca02d98
--- /dev/null
+++ b/Projects/project1_main/css/admin/adminAccount.css
@@ -0,0 +1,97 @@
+*{
+ 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,rgb(237, 66, 100),rgb(255, 237, 189));
+ padding: 3.5%;
+ text-align: center;
+ font-size: 2rem;
+ text-transform: uppercase;
+ 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-item{
+ padding:2%;
+ line-height: 1.5;
+ text-align: center;
+ flex:1;
+ flex-grow: 1;
+ flex-basis: 0;
+}
+.main-item h2{
+ color: #da4167;
+}
+.main-item p{
+ margin-top:0.5rem;
+}
+
+.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;
+}
\ No newline at end of file
diff --git a/Projects/project1_main/css/admin/adminComplain.css b/Projects/project1_main/css/admin/adminComplain.css
new file mode 100644
index 0000000..c5986a6
--- /dev/null
+++ b/Projects/project1_main/css/admin/adminComplain.css
@@ -0,0 +1,106 @@
+* {
+ 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: 0.75rem;
+ }
+ .nav-ul-li:hover {
+ background-color: #777;
+ }
+ .nav-ul-li a {
+ text-decoration: none;
+ color: inherit;
+ }
+
+ .cmp {
+ margin: 2rem;
+ }
+ #select {
+ margin: 1em 2em;
+ }
+ #p-2 {
+ margin: 2em 0;
+ }
+ #sub,
+ #reset {
+ margin: 1em 2em;
+ }
+ #textarea {
+ margin: 1em 0;
+ resize: none;
+ font-size: 20px;
+ border-radius: 0.5em;
+ }
+ .btn,
+ #sendPic {
+ padding: 0.5em;
+ cursor: pointer;
+ font-size: 1em;
+ border-radius: 0.75em;
+ }
+ .btn:hover{
+ background-color: #999;
+ }
+
+ .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: 0.5rem;
+ }
+ .links ul li:hover {
+ background-color: #777;
+ }
+ .links ul li a {
+ text-decoration: none;
+ color: inherit;
+ }
+
\ No newline at end of file
diff --git a/Projects/project1_main/css/admin/adminInfo.css b/Projects/project1_main/css/admin/adminInfo.css
new file mode 100644
index 0000000..38bdfe3
--- /dev/null
+++ b/Projects/project1_main/css/admin/adminInfo.css
@@ -0,0 +1,102 @@
+*{
+ 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-item{
+ padding:2%;
+ line-height: 1.5;
+ text-align: center;
+ flex:1;
+ flex-grow: 1;
+ flex-basis: 0;
+}
+.main-item h2{
+ color: #da4167;
+}
+.main-item p{
+ margin-top:0.5rem;
+}
+
+.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;
+}
\ No newline at end of file
diff --git a/Projects/project1_main/css/admin/adminPanelMain.css b/Projects/project1_main/css/admin/adminPanelMain.css
new file mode 100644
index 0000000..a66a28d
--- /dev/null
+++ b/Projects/project1_main/css/admin/adminPanelMain.css
@@ -0,0 +1,100 @@
+*{
+ 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,rgb(237, 66, 100),rgb(255, 237, 189));
+ padding: 3.5%;
+ text-align: center;
+ font-size: 2rem;
+ text-transform: uppercase;
+ 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-item{
+ padding:2%;
+ line-height: 1.5;
+ text-align: center;
+ flex:1;
+ flex-grow: 1;
+ flex-basis: 0;
+}
+.main-item h2{
+ color: #da4167;
+}
+.main-item p{
+ margin-top:0.5rem;
+}
+
+.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;
+}
\ No newline at end of file
diff --git a/Projects/project1_main/css/admin/adminTODO.css b/Projects/project1_main/css/admin/adminTODO.css
new file mode 100644
index 0000000..a56926b
--- /dev/null
+++ b/Projects/project1_main/css/admin/adminTODO.css
@@ -0,0 +1,148 @@
+*{
+ 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 {
+ background-color: red;
+ display: flex;
+ padding:2%;
+ flex-wrap: wrap;
+ flex-direction: row;
+}
+.main-content-1{
+ background-color: #fff;
+ padding: 4%;
+ margin: auto;
+ text-transform: capitalize;
+ color: #333;
+
+}
+.main-content-1 span{
+ font-size: 2rem;
+
+}
+.main-content-2{
+ background-color: #fff;
+ padding: 4%;
+ margin: auto;
+ text-transform: capitalize;
+ color: #333;
+}
+.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;
+}
\ No newline at end of file
diff --git a/Projects/project1_main/css/admin/updatepanel.css b/Projects/project1_main/css/admin/updatepanel.css
new file mode 100644
index 0000000..a66a28d
--- /dev/null
+++ b/Projects/project1_main/css/admin/updatepanel.css
@@ -0,0 +1,100 @@
+*{
+ 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,rgb(237, 66, 100),rgb(255, 237, 189));
+ padding: 3.5%;
+ text-align: center;
+ font-size: 2rem;
+ text-transform: uppercase;
+ 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-item{
+ padding:2%;
+ line-height: 1.5;
+ text-align: center;
+ flex:1;
+ flex-grow: 1;
+ flex-basis: 0;
+}
+.main-item h2{
+ color: #da4167;
+}
+.main-item p{
+ margin-top:0.5rem;
+}
+
+.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;
+}
\ No newline at end of file
diff --git a/Projects/project1_main/css/main.css b/Projects/project1_main/css/main.css
index a66a28d..ca02d98 100644
--- a/Projects/project1_main/css/main.css
+++ b/Projects/project1_main/css/main.css
@@ -46,9 +46,6 @@ body{
color:inherit;
}
-
-
-
.main-content {
display: flex;
diff --git a/Projects/project1_main/database/adminDB.php b/Projects/project1_main/database/adminDB.php
new file mode 100644
index 0000000..c0038be
--- /dev/null
+++ b/Projects/project1_main/database/adminDB.php
@@ -0,0 +1,8 @@
+getMessage();
+}
+?>
\ No newline at end of file
diff --git a/Projects/project1_main/database/logDB.php b/Projects/project1_main/database/logDB.php
new file mode 100644
index 0000000..c0038be
--- /dev/null
+++ b/Projects/project1_main/database/logDB.php
@@ -0,0 +1,8 @@
+getMessage();
+}
+?>
\ No newline at end of file
diff --git a/Projects/project1_main/index/complains.php b/Projects/project1_main/index/complains.php
new file mode 100644
index 0000000..abbccbf
--- /dev/null
+++ b/Projects/project1_main/index/complains.php
@@ -0,0 +1,46 @@
+prepare("INSERT INTO complains set
+ userName=:userName,
+ userSurname=:userSurname,
+ userUsername=:userUsername,
+ userFlatno=:userFlatno,
+ about=:about,
+ userComplain=:userComplain
+ ");
+
+ $insert = $kaydet->execute(array(
+ 'userName' => $_SESSION['userName'],
+ 'userSurname' => $_SESSION['userSurname'],
+ 'userUsername' => $_SESSION['userUsername'],
+ 'userFlatno' => $_SESSION['userFlatno'],
+ 'about' => $_POST['about'],
+ 'userComplain' => $_POST['userComplain']
+ ));
+
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../complaint.php?complaint=success");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../complaint.php?complaint=failed");
+ exit;
+ }
+}
+
+if (isset($_GET['userOKupdate'])) {
+ if ($_GET['userOKupdate'] = "ok") {
+ echo"asdadsa";
+
+
+
+
+ }
+}
diff --git a/Projects/project1_main/index/delete.php b/Projects/project1_main/index/delete.php
new file mode 100644
index 0000000..6d48a07
--- /dev/null
+++ b/Projects/project1_main/index/delete.php
@@ -0,0 +1,37 @@
+prepare("DELETE from usersinfo where userID=:userID");
+ $kontrol=$sil->execute(array(
+ 'userID' => $_GET['userID']
+ ));
+ if ($kontrol) {
+
+ Header("Location:../admin/adminInfo.php?delete=ok");
+ exit;
+
+ } else {
+ Header("Location:../admin/adminInfo.php?durum=no");
+ exit;
+ }
+}
+if ($_GET['userComplaintdelete']=="delete") {
+ $sil=$db->prepare("DELETE from complains where complainID=:complainID");
+ $kontrol=$sil->execute(array(
+ 'complainID' => $_GET['complainID']
+ ));
+ if ($kontrol) {
+
+ Header("Location:../admin/adminComplaint.php?delete=ok");
+ exit;
+
+ } else {
+ Header("Location:../admin/adminComplaint.php?durum=no");
+ exit;
+ }
+}
+
diff --git a/Projects/project1_main/index/mainTopics.php b/Projects/project1_main/index/mainTopics.php
new file mode 100644
index 0000000..1d60f13
--- /dev/null
+++ b/Projects/project1_main/index/mainTopics.php
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
Document
+
+
+
+
+
+
+
+
+
+
+ prepare("SELECT * from maintopics where mainTopicsID=:mainTopicsID");
+ $bilgilerimsor->execute(array(
+ 'mainTopicsID' => $_GET['mainTopicsID']
+ ));
+ $bilgilerimcek = $bilgilerimsor->fetch(PDO::FETCH_ASSOC);
+ }
+ ?>
+
+
+ prepare("UPDATE maintopics set
+ mainTopicsTitle=:mainTopicsTitle,
+ mainTopicsContent=:mainTopicsContent,
+ isOK=:isOK
+ where mainTopicsID={$_POST['mainTopicsID']}
+ ");
+
+ $insert = $update->execute(array(
+ 'mainTopicsTitle' => $_POST['NewMainTopicsTitle'],
+ 'mainTopicsContent' => $_POST['NewMainTopicsContent'],
+ 'isOK' => $_POST['isOK']
+ ));
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminPanel.php?mainTopicsUpdated=ok&mainTopicsID=$mainTopicsID");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminPanel.php?mainTopicsUpdated=no&mainTopicsID=$mainTopicsID");
+ exit;
+ }
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/index/new_user_sign.php b/Projects/project1_main/index/new_user_sign.php
new file mode 100644
index 0000000..7b596b8
--- /dev/null
+++ b/Projects/project1_main/index/new_user_sign.php
@@ -0,0 +1,186 @@
+prepare("SELECT * FROM usersinfo WHERE
+ userUsername=:userUsername AND userPassword=:userPassword");
+ $checkUserInDB->execute(array(
+ 'userUsername' => $userUsername,
+ 'userPassword' => $userPassword
+ ));
+ $int = $checkUserInDB->rowCount();
+
+ if ($int == 1) {
+ $pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC);
+ $_SESSION['userUsername'] = $userUsername;
+ $_SESSION['userName'] = $pullinfo['userName'];
+ $_SESSION['userSurname'] = $pullinfo['userSurname'];
+ $_SESSION['userFlatno'] = $pullinfo['userFlatno'];
+ $_SESSION['userGSM'] = $pullinfo['userGSM'];
+ $_SESSION['userEmail'] = $pullinfo['userEmail'];
+ header("Location:../main.php");
+ exit;
+ } elseif ($int == 0) {
+ $pullinfo2 = $checkUserInDB->fetch(PDO::FETCH_ASSOC);
+ $username = $pullinfo2['userUsername'];
+ $password = $pullinfo2['userPassword'];
+ if ($password != $userPassword) {
+ header("Location:../log.php?fail=password");
+ exit;
+ } elseif ($username != $userUsername) {
+ header("Location:../log.php?fail=username");
+ exit;
+ } else {
+ header("Location:../log.php?fail=fail");
+ exit;
+ }
+ }
+}
+
+
+
+// new user sign-in slide
+if (isset($_POST['register-btn'])) {
+
+ $kaydet = $db->prepare("INSERT into usersinfo set
+ userName=:userName,
+ userSurname=:userSurname,
+ userUsername=:userUsername,
+ userFlatno=:userFlatno,
+ userGSM =:userGSM,
+ userEmail =:userEmail,
+ userPassword =:userPassword
+ ");
+
+ $insert = $kaydet->execute(array(
+ 'userName' => $_POST['userName'],
+ 'userSurname' => $_POST['userSurname'],
+ 'userUsername' => $_POST['userUsername'],
+ 'userFlatno' => $_POST['userFlatno'],
+ 'userGSM' => $_POST['userGSM'],
+ 'userEmail' => $_POST['userEmail'],
+ 'userPassword' => $_POST['userPassword']
+ ));
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../log.php?sign=success");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../log.php?sign=failed");
+ exit;
+ }
+}
+
+// ADMIN LOG IN SLIDE
+if (isset($_POST['admin-btn'])) {
+ $adminUSERNAME = $_POST['adminUSERNAME'];
+ $adminPASSWORD = $_POST['adminPASSWORD'];
+ $checkUserInDB = $db->prepare("SELECT * FROM adminpanel WHERE
+ adminUSERNAME=:adminUSERNAME AND adminPASSWORD=:adminPASSWORD");
+ $checkUserInDB->execute(array(
+ 'adminUSERNAME' => $adminUSERNAME,
+ 'adminPASSWORD' => $adminPASSWORD
+ ));
+ $int = $checkUserInDB->rowCount();
+
+ if ($int == 1) {
+ $pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC);
+ $_SESSION['adminUSERNAME'] = $adminUSERNAME;
+ $_SESSION['adminNAME'] = $pullinfo['adminNAME'];
+ $_SESSION['adminSURNAME'] = $pullinfo['adminSURNAME'];
+ header("Location:../admin/adminPanel.php");
+ exit;
+ } elseif ($int == 0) {
+ $pullinfo2 = $checkUserInDB->fetch(PDO::FETCH_ASSOC);
+ $adminUSERNAME = $pullinfo2['adminUSERNAME'];
+ $adminPASSWORD = $pullinfo2['adminPASSWORD'];
+ if ($adminPASSWORD != $adminPASSWORD) {
+ header("Location:../log.php?fail=ADMINpassword");
+ exit;
+ } elseif ($adminUSERNAME != $adminUSERNAME) {
+ header("Location:../log.php?fail=ADMINusername");
+ exit;
+ } else {
+ header("Location:../log.php?fail=ADMINfail");
+ exit;
+ }
+ }
+}
+
+
+//ADMIN PAGE
+//NEW USER ADD
+if (isset($_POST['adminSignUser-btn'])) {
+
+ $kaydet = $db->prepare("INSERT into usersinfo set
+ userName=:userName,
+ userSurname=:userSurname,
+ userUsername=:userUsername,
+ userFlatno=:userFlatno,
+ userGSM =:userGSM,
+ userEmail =:userEmail,
+ userPassword =:userPassword
+ ");
+
+ $insert = $kaydet->execute(array(
+ 'userName' => $_POST['userName'],
+ 'userSurname' => $_POST['userSurname'],
+ 'userUsername' => $_POST['userUsername'],
+ 'userFlatno' => $_POST['userFlatno'],
+ 'userGSM' => $_POST['userGSM'],
+ 'userEmail' => $_POST['userEmail'],
+ 'userPassword' => $_POST['userPassword']
+ ));
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminAccount.php?adminUserSign=success");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminAccount.php?adminUserSign=failed");
+ exit;
+ }
+}
+
+
+//ADMIN PAGE
+//NEW ADMIN ADD
+if (isset($_POST['adminSignAdmin-btn'])) {
+ $kaydet = $db->prepare("INSERT into adminpanel set
+ adminUSERNAME=:adminUSERNAME,
+ adminNAME=:adminNAME,
+ adminSURNAME=:adminSURNAME,
+ adminGSM=:adminGSM,
+ adminGSM_2 =:adminGSM_2,
+ adminPASSWORD =:adminPASSWORD,
+ adminEMAIL =:adminEMAIL
+ ");
+
+ $insert = $kaydet->execute(array(
+ 'adminUSERNAME' => $_POST['adminUSERNAME'],
+ 'adminNAME' => $_POST['adminNAME'],
+ 'adminSURNAME' => $_POST['adminSURNAME'],
+ 'adminGSM' => $_POST['adminGSM'],
+ 'adminGSM_2' => $_POST['adminGSM_2'],
+ 'adminPASSWORD' => $_POST['adminPASSWORD'],
+ 'adminEMAIL' => $_POST['adminEMAIL']
+ ));
+
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminAccount.php?adminNewAdmin=success");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminAccount.php?adminNewAdmin=failed");
+ exit;
+ }
+}
\ No newline at end of file
diff --git a/Projects/project1_main/index/update.php b/Projects/project1_main/index/update.php
new file mode 100644
index 0000000..aae7770
--- /dev/null
+++ b/Projects/project1_main/index/update.php
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Update User Data
+
+
+
+ prepare("SELECT * from usersinfo where userID=:userID");
+ $bilgilerimsor->execute(array(
+ 'userID' => $_GET['userID']
+ ));
+
+ $bilgilerimcek = $bilgilerimsor->fetch(PDO::FETCH_ASSOC);
+ }
+ ?>
+
+
+
+
+ prepare("UPDATE usersinfo set
+ userName=:userName,
+ userSurname=:userSurname,
+ userEmail=:userEmail,
+ userUsername=:userUsername,
+ userFlatno=:userFlatno,
+ userGSM=:userGSM
+
+ where userID={$_POST['userID']}
+ ");
+
+ $insert = $kaydet->execute(array(
+
+ 'userName' => $_POST['userName'],
+ 'userSurname' => $_POST['userSurname'],
+ 'userEmail' => $_POST['userEmail'],
+ 'userUsername' => $_POST['userUsername'],
+ 'userFlatno' => $_POST['userFlatno'],
+ 'userGSM' => $_POST['userGSM']
+ ));
+
+
+
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminInfo.php?durum=ok&bilgilerim_id=$bilgilerim_id");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminInfo.php?durum=no&bilgilerim_id=$bilgilerim_id");
+ exit;
+ }
+ }
+ ?>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/index/updateArrangements.php b/Projects/project1_main/index/updateArrangements.php
new file mode 100644
index 0000000..9b103da
--- /dev/null
+++ b/Projects/project1_main/index/updateArrangements.php
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
Document
+
+
+
+
+
+
+
+
+
+
+
+
Update Arrangements
+
+
+
+ prepare("SELECT * from gardenarrangements where toDoID=:toDoID");
+ $bilgilerimsor->execute(array(
+ 'toDoID' => $_GET['toDoID']
+ ));
+ $bilgilerimcek = $bilgilerimsor->fetch(PDO::FETCH_ASSOC);
+ } elseif ($arrangement == 1) {
+ echo "arrangement == 1 ERROR !!!!!";
+ }
+ }
+
+ ?>
+
+
+
+
+ prepare("UPDATE gardenarrangements set
+ toDo=:toDo,
+ isOK=:isOK
+ where toDoID={$_POST['toDoID']}
+ ");
+
+ $insert = $update->execute(array(
+
+ 'toDo' => $_POST['newToDo'],
+ 'isOK' => $_POST['isOK']
+ ));
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminTODO.php?UPDATE=ok&toDoID=$toDoID");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminTODO.php?UPDATE=no&toDoID=$toDoID");
+ exit;
+ }
+ }
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/index/updateExpenses.php b/Projects/project1_main/index/updateExpenses.php
new file mode 100644
index 0000000..82d5831
--- /dev/null
+++ b/Projects/project1_main/index/updateExpenses.php
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
Document
+
+
+
+
+
+
+
+
+
+
+
+
+
Update Expenses
+
+
+
+ prepare("SELECT * from apartmentexpenses where expensesID=:expensesID");
+ $bilgilerimsor->execute(array(
+ 'expensesID' => $_GET['expensesID']
+ ));
+ $bilgilerimcek = $bilgilerimsor->fetch(PDO::FETCH_ASSOC);
+ }
+ ?>
+
+
+
+ prepare("UPDATE apartmentexpenses set
+ corridorLight=:corridorLight,
+ corridorWater=:corridorWater,
+ corridorExtra=:corridorExtra,
+ isOK=:isOK
+ where expensesID={$_POST['expensesID']}
+ ");
+
+ $insert = $update->execute(array(
+
+ 'corridorLight' => $_POST['corridorLight'],
+ 'corridorWater' => $_POST['corridorWater'],
+ 'corridorExtra' => $_POST['corridorExtra'],
+ 'isOK' => $_POST['isOK']
+ ));
+ if ($insert) {
+ //echo "kayıt başarılı";
+ Header("Location:../admin/adminTODO.php?expensesUpdated=ok&expensesID=$expensesID");
+ exit;
+ } else {
+ //echo "kayıt başarısız";
+ Header("Location:../admin/adminTODO.php?expensesUpdated=no&expensesID=$expensesID");
+ exit;
+ }
+
+ }
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/Projects/project1_main/information.php b/Projects/project1_main/information.php
index 0a60566..e9eb9f6 100644
--- a/Projects/project1_main/information.php
+++ b/Projects/project1_main/information.php
@@ -1,12 +1,19 @@
+
+
Information
+
+