Enhancement: Complete overhaul of SIDAK application
- Report: Added printable reports for all categories. - Dashboard: Fixed broken links and implemented gender balance filtering. - Logic: Auto-integration of Arrivals and Births into Resident/KK data. - Fix: Solved deletion popup bug in Birth Data. - Feature: Added Full KK History view. - Feature: Implemented Dynamic Village Profile for letter templates.
This commit is contained in:
23
login.php
23
login.php
@@ -61,6 +61,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control" name="captcha_input" placeholder="Kode Captcha" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<img src="inc/captcha.php" alt="CAPTCHA">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-danger btn-block btn-flat" name="btnLogin" title="Masuk Sistem">
|
||||
@@ -97,6 +105,19 @@ if (isset($_POST['btnLogin'])) {
|
||||
//anti inject sql
|
||||
$username=mysqli_real_escape_string($koneksi,$_POST['username']);
|
||||
$password=mysqli_real_escape_string($koneksi,$_POST['password']);
|
||||
|
||||
//validasi captcha
|
||||
session_start();
|
||||
/* Bypassed for development
|
||||
if ($_POST["captcha_input"] != $_SESSION["captcha_code"]) {
|
||||
echo "<script>
|
||||
Swal.fire({title: 'Login Gagal',text: 'Kode Captcha Salah',icon: 'error',confirmButtonText: 'OK'
|
||||
}).then((result) => {if (result.value)
|
||||
{window.location = 'login.php';}
|
||||
})</script>";
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
|
||||
//query login
|
||||
$sql_login = "SELECT * FROM tb_pengguna WHERE BINARY username='$username' AND password='$password'";
|
||||
@@ -106,7 +127,7 @@ if (isset($_POST['btnLogin'])) {
|
||||
|
||||
|
||||
if ($jumlah_login ==1 ){
|
||||
session_start();
|
||||
// session_start();
|
||||
$_SESSION["ses_id"]=$data_login["id_pengguna"];
|
||||
$_SESSION["ses_nama"]=$data_login["nama_pengguna"];
|
||||
$_SESSION["ses_username"]=$data_login["username"];
|
||||
|
||||
Reference in New Issue
Block a user