-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
438 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
<nav class="nav"> | ||
<span>MANAGEMENT SYSTEM</span> | ||
<ul class="nav-ul"> | ||
<li class="nav-ul-li"><a href="main.php">MAIN</a></li> | ||
<li class="nav-ul-li"><a href="main.php">MAIN</a></li> | ||
<li class="nav-ul-li"><a href="information.php">INFORMATION</a></li> | ||
<li class="nav-ul-li"><a href="to-do.php">TO/DO</a></li> | ||
<li class="nav-ul-li"><a href="complaint.php">COMPLAINT</a></li> | ||
|
@@ -34,9 +34,6 @@ | |
</nav> | ||
|
||
|
||
|
||
|
||
|
||
<main class="main-content"> | ||
<div class="main-item"> | ||
<h2>Account Transactions</h2> | ||
|
@@ -46,54 +43,107 @@ | |
|
||
<main class="main-content"> | ||
<div class="main-item-3"> | ||
<h2>Your Information is ;</h2> | ||
<p class="input-3">User name</p> | ||
<p class="input-3">Name</p> | ||
<p class="input-3">Surname</p> | ||
<p class="input-3">Phone</p> | ||
<p class="input-3">Email</p> | ||
<h2>Your Information is ;</h2><br> | ||
<p class="input-3">User name: <?php echo $_SESSION['userUsername'] ?></p><br> | ||
<p class="input-3">Name: <?php echo $_SESSION['userName'] ?></p><br> | ||
<p class="input-3">Surname: <?php echo $_SESSION['userSurname'] ?></p><br> | ||
<p class="input-3">Phone: <?php echo $_SESSION['userGSM'] ?></p><br> | ||
<p class="input-3">Email: <?php echo $_SESSION['userEmail'] ?></p><br> | ||
<p class="input-3">Flat: <?php echo $_SESSION['userFlatno'] ?></p><br> | ||
</div> | ||
</main> | ||
|
||
|
||
<main class="main-content"> | ||
<div class="main-item-2"> | ||
<form action="#"> | ||
<form action="account.php" method="POST"> | ||
<label for="username">User name</label> | ||
<input type="text" name="username" id="username" class="input" required><br><br> | ||
<input type="text" name="userUsername" id="username" class="input" placeholder="<?php echo $_SESSION['userUsername']?>" required><br><br> | ||
<label for="name">Name</label> | ||
<input type="text" name="name" id="name" class="input" required><br><br> | ||
<input type="text" name="userName" id="name" class="input" required placeholder="<?php echo $_SESSION['userName']?>"><br><br> | ||
<label for="surname">Surname</label> | ||
<input type="text" name="surname" id="surname" class="input" required><br><br> | ||
<input type="text" name="userSurname" id="surname" class="input" required placeholder="<?php echo $_SESSION['userSurname']?>"><br><br> | ||
<label for="phone">Phone Number</label> | ||
<input type="tel" name="phone" id="phone" class="input" placeholder="555-555-55-55" pattern="[0-9]{3}-[0-9]{3}-[0-9]{2}-[0-9]{2}" required><br><br> | ||
<input type="tel" name="userGSM" id="phone" class="input" placeholder="<?php echo $_SESSION['userGSM']?>" required><br><br> | ||
<label for="mail">E-mail</label> | ||
<input type="email" name="mail" id="mail" class="input" placeholder="[email protected]" required><br><br> | ||
<input type="email" name="userEmail" id="mail" class="input" placeholder="<?php echo $_SESSION['userEmail']?>" required><br><br> | ||
<label for="password">Old Password</label> | ||
<input type="password" name="password" id="password" class="input" required><br><br> | ||
<input type="password" name="userPassword" id="passwordOld" class="input" required><br><br> | ||
<label for="password">New Password</label> | ||
<input type="password" name="password" id="password" class="input" required><br><br> | ||
<input type="password" name="userPasswordNEW" id="passwordNew" class="input" required><br><br> | ||
<label for="userFlatno">Flat</label> | ||
<input type="int" name="userFlatno" id="userFlatno" class="input" placeholder="<?php echo $_SESSION['userFlatno']?>" required><br><br> | ||
|
||
<label for="submit"></label> | ||
<input type="submit" name="submit" id="submit" class="btn" required> | ||
<label for="reset"></label> | ||
<input type="reset" name="reset" id="reset" class="btn" required> | ||
</form> | ||
<?php | ||
|
||
if(isset($_GET['update'])){ | ||
if($_GET['update'] == "ok"){ | ||
echo "güncelleme başırılı"; | ||
} | ||
elseif($_GET['update'] == "no"){ | ||
echo"güncelleme başarısız"; | ||
} | ||
} | ||
?> | ||
</div> | ||
<?php | ||
if (isset($_POST['submit'])) { | ||
|
||
$bilgilerim_id = $_SESSION['userID']; | ||
|
||
$kaydet = $db->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' => $_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; | ||
} | ||
} | ||
|
||
|
||
|
||
?> | ||
</main> | ||
|
||
<footer class="footer"> | ||
<div class="links"> | ||
<ul> | ||
<li class="link"><a href="https://www.linkedin.com/in/alperen-ka%C3%A7maz-2202/" title="LinkedIn" | ||
target="_blanced"><img | ||
src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTMdFqfhP3dTNKjtRennSsHXGUmiF9yJ2AfVQ&usqp=CAU" | ||
height="50" width="50" alt="LinkedIn"></a></li> | ||
<li class="link"><a href="https://www.instagram.com/mr.kacmaz" title="Instagram" target="_blanced"><img | ||
src="https://pazarlamasyon.com/wp-content/uploads/2018/01/new-instagram-logo-clipart-16.jpg" | ||
height="50" width="50" alt="Instagram"></a></li> | ||
<li class="link"><a href="https://github.com/MrKacmaz" title="GitHub" target="_blanced"> <img | ||
src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSUP7RN0hZaqZpljtz9c0nz5eSc2DFY-XSRQA&usqp=CAU" | ||
width="50" height="50" alt="GitHub"> </a></li> | ||
<li class="link"><a href="https://www.linkedin.com/in/alperen-ka%C3%A7maz-2202/" title="LinkedIn" target="_blanced"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTMdFqfhP3dTNKjtRennSsHXGUmiF9yJ2AfVQ&usqp=CAU" height="50" width="50" alt="LinkedIn"></a></li> | ||
<li class="link"><a href="https://www.instagram.com/mr.kacmaz" title="Instagram" target="_blanced"><img src="https://pazarlamasyon.com/wp-content/uploads/2018/01/new-instagram-logo-clipart-16.jpg" height="50" width="50" alt="Instagram"></a></li> | ||
<li class="link"><a href="https://github.com/MrKacmaz" title="GitHub" target="_blanced"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSUP7RN0hZaqZpljtz9c0nz5eSc2DFY-XSRQA&usqp=CAU" width="50" height="50" alt="GitHub"> </a></li> | ||
</ul> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?php | ||
include '../database/adminDB.php'; | ||
session_start(); | ||
?> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="../css/admin/adminTODO.css"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<!--welcome header bar--> | ||
<header class="header"> | ||
<div class="welcome"> | ||
<p id="welcome">to-do page</p> | ||
</div> | ||
</header> | ||
|
||
|
||
<!--MENU BAR--> | ||
<nav class="nav"> | ||
<span>MANAGEMENT SYSTEM</span> | ||
<ul class="nav-ul"> | ||
<li class="nav-ul-li"><a href="adminPanel.php">MAIN</a></li> | ||
<li class="nav-ul-li"><a href="adminInfo.php">USERS</a></li> | ||
<li class="nav-ul-li"><a href="adminTODO.php">TO/DO</a></li> | ||
<li class="nav-ul-li"><a href="adminBills.php">BILLS</a></li> | ||
<li class="nav-ul-li"><a href="adminComplaint.php">COMPLAINTS</a></li> | ||
<li class="nav-ul-li"><a href="adminAccount.php">USER ADD</a></li> | ||
<li class="nav-ul-li"><a href="adminLogOut.php">LOG-OUT</a></li> | ||
</ul> | ||
</nav> | ||
|
||
<main class="section"> | ||
<table id="payment"> | ||
|
||
<tr> | ||
<th class="text-table">Bill ID</th> | ||
<th class="text-table">Bill Date</th> | ||
<th class="text-table">is ok</th> | ||
<th class="text-table">Rent</th> | ||
<th class="text-table">Corridor Electric Bill</th> | ||
<th class="text-table">Maintenance Bill</th> | ||
<th class="text-table">Corridor Cleaning Bill</th> | ||
<th class="text-table">Fuel Bill</th> | ||
<th class="text-table">SUM</th> | ||
<th class="text-table">UPDATE</th> | ||
|
||
</tr> | ||
<?php | ||
$checkUserInDB = $db->prepare("SELECT * FROM bills"); | ||
$checkUserInDB->execute(); | ||
while ($pullinfo = $checkUserInDB->fetch(PDO::FETCH_ASSOC)) { | ||
?> | ||
|
||
<?php | ||
$sum = $pullinfo['rent'] + ($pullinfo['corridorLight'] / 10) + ($pullinfo['corridorWater'] / 10) + ($pullinfo['corridorCleaning'] / 10) + ($pullinfo['fuel'] / 10); | ||
?> | ||
<tr> | ||
<td><?php echo $pullinfo['billID'] ?></td> | ||
<td><?php echo $pullinfo['billDate'] ?></td> | ||
<td><?php echo $pullinfo['isOK'] ?></td> | ||
<td><?php echo $pullinfo['rent'] ?></td> | ||
<td><?php echo $pullinfo['corridorLight'] ?></td> | ||
<td><?php echo $pullinfo['corridorWater'] ?></td> | ||
<td><?php echo $pullinfo['corridorCleaning'] ?></td> | ||
<td><?php echo $pullinfo['fuel'] ?></td> | ||
<td><?php echo $sum ?></td> | ||
<td><a href="../index/payBill.php?billID=<?php echo $pullinfo['billID'] ?>"><button>UPDATE</button></a></td> | ||
</tr> | ||
<?php | ||
} | ||
?> | ||
</table><br><br> | ||
|
||
<!--UPDATE VEYA ADD İŞLEMİNİN SONUCUNU YAZDIRIR--> | ||
<?php | ||
if (isset($_GET['addNewBill'])) { | ||
if ($_GET['addNewBill'] == "ok") { | ||
echo "kayıt başarılı"; | ||
} elseif ($_GET['addNewBill'] == "no") { | ||
echo "kayıt başarısız"; | ||
} | ||
} | ||
|
||
if (isset($_GET['update'])) { | ||
if ($_GET['update'] == "ok") { | ||
echo $_GET['billID'] . " nolu güncelleme başarılı"; | ||
} elseif ($_GET['update'] == "no") { | ||
echo $_GET['billID'] . " nolu güncelleme başarısız"; | ||
} | ||
} | ||
?> | ||
<br><br><a href="../index/payBill.php?addNewBill=1"><button>ADD NEW BILL</button></a> | ||
</main> | ||
|
||
<footer class="footer"> | ||
<div class="links"> | ||
<ul> | ||
<li class="link"><a href="https://www.linkedin.com/in/alperen-ka%C3%A7maz-2202/" title="LinkedIn" target="_blanced"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTMdFqfhP3dTNKjtRennSsHXGUmiF9yJ2AfVQ&usqp=CAU" height="50" width="50" alt="LinkedIn"></a></li> | ||
<li class="link"><a href="https://www.instagram.com/mr.kacmaz" title="Instagram" target="_blanced"><img src="https://pazarlamasyon.com/wp-content/uploads/2018/01/new-instagram-logo-clipart-16.jpg" height="50" width="50" alt="Instagram"></a></li> | ||
<li class="link"><a href="https://github.com/MrKacmaz" title="GitHub" target="_blanced"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSUP7RN0hZaqZpljtz9c0nz5eSc2DFY-XSRQA&usqp=CAU" width="50" height="50" alt="GitHub"> </a></li> | ||
</ul> | ||
</div> | ||
|
||
</footer> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.