first commit

This commit is contained in:
dev@siliconpin.com
2025-08-07 11:53:41 +05:30
commit a3067c5ad4
4795 changed files with 782758 additions and 0 deletions

View File

@@ -0,0 +1 @@
404

View File

@@ -0,0 +1,10 @@
</body>
<script src="/CONTENT/cal_GV.js"></script>
<script>
//document.getElementsByName("CA_No_Of_Payment")[0].addEventListener("input", cal_mature);
</script>
</html>

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Gramin Venture POS Portal</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/asset/css/bootstrap.min.css">
<script src="/asset/js/jquery.min.js"></script>
<script src="/asset/js/bootstrap.min.js"></script>
<script src="/asset/js/angular.min.js"></script>
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
</head>
<body>

View File

@@ -0,0 +1,31 @@
<!-- nav start -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/Admin/">Gramin Venture</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li ><a href="/Admin/Create_AC_Recurring">New Recurring </a></li>
<li ><a href="/Admin/Create_AC_FD">New FD </a></li>
<li ><a href="/Admin/Create_AC_Loan">New Loan </a></li>
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
<!--<li><a href="/Admin/Trans_New">Transaction</a></li>-->
<li><a href="/Admin/Report">Report</a></li>
<li><a href="/Admin/Settings">Settings</a></li>
</ul>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/Admin/Signout">Signout</a></li>
</ul>
</div>
</div>
</nav>

View File

@@ -0,0 +1,105 @@
<div class="container">
<?php
if(isset($_POST["ac_type"]) && isset($_POST["ac_name"]) && $_POST["ac_name"]!="" && is_numeric($_POST["Mature_Value"]) ) {
$return_json['NotiFi'] = "";$return_json['NotiFi_m'] = "";$return_json['NotiFi_d'] = "";
$ca["ac_type"]=$_POST["ac_type"];
$ca["ac_name"]=$_POST["ac_name"];
$ca["ac_phone"]=$_POST["ac_phone"];
$ca["ac_mail"]=$_POST["ac_mail"];
$ca["ac_address"]=$_POST["ac_address"];
$ca["ac_no"]="GV".$_POST["ac_type"].date("Ymd")."F";
//GC_new_entry($ca);
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$t="FD";
$stmt = $conn->prepare("INSERT INTO ".$GLOBALS['arif_ac']." (`AA_ICARD_NO`,`AA_NOMINEE_DETAILS`,`AA_INTEREST`,`AA_DATE`, `AA_DATE_MATURE`, `AA_NO_OF_PAYMENT`,`AA_AMOUNT`, `AA_MATURE_VALUE`, `AA_TYPE`,`AA_ACTYPE`,`AA_NAME`, `AA_PHONE`, `AA_EMAIL`, `AA_ADDRESS`, `AA_ADMIN`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("sssssssssssssss" ,$_POST["AA_ICARD_NO"],$_POST["AA_NOMINEE_DETAILS"],$_POST["CA_interest"], $_POST["date_today"],$_POST["date_mature"],$_POST["CA_No_Of_Payment"],$_POST["CA_Amount"],$_POST["Mature_Value"], $t,$ca["ac_type"],$ca["ac_name"],$ca["ac_phone"],$ca["ac_mail"],$ca["ac_address"],$_SESSION["EMAIL"]);
if($stmt->execute()){
$lid=$conn->insert_id;$ca["ac_no"]=$ca["ac_no"].$lid;
if($conn->query("UPDATE `".$GLOBALS['arif_ac']."` SET `AA_ACNO` = '".$ca["ac_no"]."' WHERE `AA_ID` =".$lid.";"))
{$return_json['NotiFi'] = "OK";$return_json['NotiFi_m'] = "New FD A/C Created !";$return_json['NotiFi_d'] = "<a href='./Details?no=".$ca["ac_no"]."'>A/C NO- ".$ca["ac_no"]."</a>";}
else{$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error Creating New Recurring A/C !";$return_json['NotiFi_d'] = "Failed in Secondary Execution";}
}else printf("Error: %s.\n", $stmt->error);
$stmt->close();
$conn->close();
echo $return_json['NotiFi'],$return_json['NotiFi_m'],$return_json['NotiFi_d'];
} //else {$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error on input !";$return_json['NotiFi_d'] = "Check Input Details";}
//echo json_encode($return_json);
?>
</div>
<div class="container">
<form method="post" enctype="multipart/form-data" id="new_fd">
<input type="hidden" name="ac_type" value="F">
<div class="form-group">
<input type="text" class="form-control text-capitalize" name="ac_name" placeholder="Name" >
<small id="emailHelp" class="form-text text-muted">A/C Holder Name*</small>
</div>
<div class="form-group">
<input type="text" class="form-control text-uppercase" name="AA_ICARD_NO" placeholder="I-CARD NO" required>
</div>
<table><tr>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_Amount" oninput="cal_FD();">
<small id="emailHelp" class="form-text text-muted">Amount*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_interest" value="8">
<small id="emailHelp" class="form-text text-muted">interest*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_No_Of_Payment" oninput="cal_FD();cal_FD_md();" >
<small id="emailHelp" class="form-text text-muted">Month*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="Mature_Value" id="Mature_Value" value="">
<small id="emailHelp" class="form-text text-muted">Mature Value*</small>
</div></td>
</tr></table>
<div class="form-group">
<input type="text" class="form-control" id="date_today" name="date_today" value="<?php echo date('Y-m-d');?>" >
<small id="emailHelp" class="form-text text-muted">Date*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="date_mature" >
<small id="emailHelp" class="form-text text-muted">Mature Date*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_phone" placeholder="Phone No">
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_mail" placeholder="Email">
</div>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="5" name="ac_address" placeholder="Address"></textarea>
</div>
<hr>
<small class="form-text text-muted"><u>Nominee details*</u></small>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="5" name="AA_NOMINEE_DETAILS" required>Name:
DOB:
Relation:
ID:
</textarea>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-md-offset-5 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-primary">Create New FD A/C</button>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,136 @@
<div class="container">
<?php
if(isset($_POST["ac_type"]) && isset($_POST["ac_name"]) && $_POST["ac_name"]!="" && is_numeric($_POST["Mature_Value"]) ) {
$return_json['NotiFi'] = "";$return_json['NotiFi_m'] = "";$return_json['NotiFi_d'] = "";
$ca["ac_type"]=$_POST["ac_type"];
$ca["ac_name"]=$_POST["ac_name"];
$ca["ac_phone"]=$_POST["ac_phone"];
$ca["ac_mail"]=$_POST["ac_mail"];
$ca["ac_address"]=$_POST["ac_address"];
$ca["ac_no"]="GV".$_POST["ac_type"].date("Ymd")."L";
$AA_BAL=$_POST["Mature_Value"];$AA_BAL=$AA_BAL-($AA_BAL*2);
//GC_new_entry($ca);
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$t="Loan";
$stmt = $conn->prepare("INSERT INTO ".$GLOBALS['arif_ac']." (`AA_BAL`,`AA_G1_DETAILS`,`AA_G2_DETAILS`,`AA_INSTALLMENT`,`AA_ICARD_NO`,`AA_INTEREST`,`AA_DATE`,`AA_DATE_MATURE`,`AA_NO_OF_PAYMENT`,`AA_AMOUNT`,`AA_MATURE_VALUE`,`AA_TYPE`,`AA_ACTYPE`,`AA_NAME`, `AA_PHONE`, `AA_EMAIL`, `AA_ADDRESS`, `AA_ADMIN`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("isssssssssssssssss" ,$AA_BAL,$_POST["AA_G1_DETAILS"],$_POST["AA_G2_DETAILS"],$_POST["CA_installment"],$_POST["AA_ICARD_NO"],$_POST["CA_interest"],$_POST["date_today"],$_POST["date_mature"],$_POST["CA_No_Of_Payment"],$_POST["CA_Amount"],$_POST["Mature_Value"], $t,$ca["ac_type"],$ca["ac_name"],$ca["ac_phone"],$ca["ac_mail"],$ca["ac_address"],$_SESSION["EMAIL"]);
if($stmt->execute()){
$lid=$conn->insert_id;$ca["ac_no"]=$ca["ac_no"].$lid;
if($conn->query("UPDATE `".$GLOBALS['arif_ac']."` SET `AA_ACNO` = '".$ca["ac_no"]."' WHERE `AA_ID` =".$lid.";"))
{$return_json['NotiFi'] = "OK";$return_json['NotiFi_m'] = "New Loan A/C Created !";$return_json['NotiFi_d'] = "<a href='./Details?no=".$ca["ac_no"]."'>A/C NO- ".$ca["ac_no"]."</a>";}
else{$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error Creating New Recurring A/C !";$return_json['NotiFi_d'] = "Failed in Secondary Execution";}
}
$stmt->close();
$conn->close();
echo $return_json['NotiFi'],$return_json['NotiFi_m'],$return_json['NotiFi_d'];
} //else {$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error on input !";$return_json['NotiFi_d'] = "Check Input Details";}
//echo json_encode($return_json);
?>
</div>
<div class="container">
<form method="post" enctype="multipart/form-data" id="new_loan">
<!--<div ng-app="myApp" ng-controller="myCtrl" class="form-group">-->
<select class="form-control" name="ac_type" onchange="cal_loan_type();">
<option value="D">Day</option>
<option value="W">Week</option>
<option value="M">Month</option>
</select>
<small class="form-text text-muted">A/C Type*</small>
<!--</div>-->
</br>
<div class="form-group">
<input type="text" class="form-control text-capitalize" name="ac_name" placeholder="Name" >
<small class="form-text text-muted">A/C Holder Name*</small>
</div>
<div class="form-group">
<input type="text" class="form-control text-uppercase" name="AA_ICARD_NO" placeholder="ICARD No" >
<small class="form-text text-muted">A/C Holder's ID No*</small>
</div>
<div class="form-group">
<input type="text" class="form-control text-capitalize" name="Father" placeholder="Father" >
<small class="form-text text-muted">A/C Holder's Father*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_phone" placeholder="Phone No">
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_mail" placeholder="Email">
</div>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="5" name="ac_address" placeholder="Address"></textarea>
</div>
<table><tr>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_Amount" oninput="cal_loan();">
<small class="form-text text-muted">Principle Amount*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_interest" value="20" oninput="cal_loan();">
<small class="form-text text-muted">interest*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_No_Of_Payment" oninput="cal_loan();cal_Re_md();" >
<small class="form-text text-muted">Tenure no of <span id="DWM">Day</span>*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_installment" >
<small class="form-text text-muted">installment Amount*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="Mature_Value" >
<small class="form-text text-muted">Total Amount*</small>
</div></td>
</tr></table>
<div class="form-group">
<input type="text" class="form-control" id="date_today" name="date_today" value="<?php echo date('Y-m-d');?>" >
<small id="emailHelp" class="form-text text-muted">Date*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="date_mature" >
<small id="emailHelp" class="form-text text-muted">Mature Date*</small>
</div>
<hr/>
<h4>Guaranter</h4>
<hr>
<small class="form-text text-muted"><u>1st Guaranter details*</u></small>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="6" name="AA_G1_DETAILS" required>Name:
ID:
Father:
Phone:
Relation:
Address: </textarea>
</div>
<hr>
<small class="form-text text-muted"><u>2nd Guaranter details*</u></small>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="6" name="AA_G2_DETAILS" required>Name:
ID:
Father:
Phone:
Relation:
Address:</textarea>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-md-offset-5 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-primary" >Create New Loan A/C</button>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,106 @@
<div class="container">
<?php
$start = time();
if(isset($_POST["ac_type"]) && isset($_POST["ac_name"]) && $_POST["ac_name"]!="" && is_numeric($_POST["Mature_Value"]) ) {
$return_json['NotiFi'] = "";$return_json['NotiFi_m'] = "";$return_json['NotiFi_d'] = "";
$ca["ac_type"]=$_POST["ac_type"];
$ca["ac_name"]=$_POST["ac_name"];
$ca["ac_phone"]=$_POST["ac_phone"];
$ca["ac_mail"]=$_POST["ac_mail"];
$ca["ac_address"]=$_POST["ac_address"];
$ca["ac_no"]="GV".$_POST["ac_type"].date("Ymd")."R";
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$t="Recurring";
$stmt = $conn->prepare("INSERT INTO ".$GLOBALS['arif_ac']." (`AA_INTEREST`,`AA_DATE`,`AA_ICARD_NO`,`AA_DATE_MATURE`,`AA_NO_OF_PAYMENT`,`AA_INSTALLMENT`,`AA_MATURE_VALUE`,`AA_TYPE`,`AA_ACTYPE`,`AA_NAME`, `AA_PHONE`, `AA_EMAIL`, `AA_ADDRESS`, `AA_NOMINEE_DETAILS`, `AA_ADMIN`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("sssssssssssssss" ,$_POST["CA_interest"],$_POST["date_today"],$_POST["AA_ICARD_NO"],$_POST["date_mature"],$_POST["CA_No_Of_Payment"],$_POST["CA_Amount"],$_POST["Mature_Value"], $t,$ca["ac_type"],$ca["ac_name"],$ca["ac_phone"],$ca["ac_mail"],$ca["ac_address"],$_POST["AA_NOMINEE_DETAILS"],$_SESSION["EMAIL"]);
if($stmt->execute()){
$lid=$conn->insert_id;$ca["ac_no"]=$ca["ac_no"].$lid;
if($conn->query("UPDATE `".$GLOBALS['arif_ac']."` SET `AA_ACNO` = '".$ca["ac_no"]."' WHERE `AA_ID` =".$lid.";"))
{$return_json['NotiFi'] = "OK";$return_json['NotiFi_m']="New Recurring A/C Created !";$return_json['NotiFi_d'] = "<a href='./Details?no=".$ca["ac_no"]."'>A/C NO- ".$ca["ac_no"]."</a>";}
else{$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error Creating New Recurring A/C !";$return_json['NotiFi_d'] = "Failed in Secondary Execution";}
}
$stmt->close();
$conn->close();
//$e_time= time() - $start; echo $start."<br>".time()."<br>".$e_time."<br>";
echo $return_json['NotiFi'],$return_json['NotiFi_m'],$return_json['NotiFi_d'];
}// else {$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error on input !";$return_json['NotiFi_d'] = "Check Input Details";}
?>
</div>
<div class="container">
<form method="post" enctype="multipart/form-data" id="New_Recurring">
<div class="form-group">
<!--<div ng-app="myApp" ng-controller="myCtrl" class="form-group">-->
<select class="form-control" name="ac_type">
<option value="D">Day</option>
<option value="W">Week</option>
<option value="M">Month</option>
</select>
<small class="form-text text-muted">A/C Type*</small>
<!--</div>-->
</div>
<br>
<div class="form-group">
<input type="text" class="form-control text-capitalize" name="ac_name" placeholder="Name" required>
<small class="form-text text-muted">A/C Holder Name*</small>
</div>
<div class="form-group">
<input type="text" class="form-control text-uppercase" name="AA_ICARD_NO" placeholder="I-CARD NO" required>
</div>
<table><tr>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_Amount" oninput="cal_rec();" required>
<small class="form-text text-muted">Amount*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_interest" value="8" oninput="cal_rec();" required>
<small class="form-text text-muted">Interest*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="CA_No_Of_Payment" oninput="cal_rec();cal_Re_md();" required>
<small class="form-text text-muted">No Of Payment*</small>
</div></td>
<td><div class="form-group">
<input type="text" class="form-control" name="Mature_Value" required>
<small class="form-text text-muted">Mature Value*</small>
</div></td>
</tr></table>
<div class="form-group">
<input type="text" class="form-control" id="date_today" name="date_today" value="<?php echo date('Y-m-d');?>" required>
<small class="form-text text-muted">Date*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="date_mature" required>
<small class="form-text text-muted">Mature Date*</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_phone" placeholder="Phone No" required>
</div>
<div class="form-group">
<input type="text" class="form-control" name="ac_mail" placeholder="Email">
</div>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="5" name="ac_address" placeholder="Address" required></textarea>
</div>
<hr>
<small class="form-text text-muted"><u>Nominee details*</u></small>
<div class="form-group">
<textarea class="form-control text-capitalize" rows="5" name="AA_NOMINEE_DETAILS" required>Name:
DOB:
Relation:
ID:
</textarea>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-md-offset-5 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-primary" >Create New Recurring A/C</button>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,247 @@
<div class="container" style="text-align: center;">
<h3> ACCOUNT DETAILS</h3><hr>
</div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<?php
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
$conn->set_charset("utf8");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO`= '".$_GET["no"]."'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) { if($row["AA_ACTYPE"]=="D")$AA_ACTYPE="Day";if($row["AA_ACTYPE"]=="M")$AA_ACTYPE="Month";if($row["AA_ACTYPE"]=="W")$AA_ACTYPE="Week";
if ($row["AA_TYPE"]== "FD")
echo "
<tr><th colspan='2'><span class='text-center'>Fixed Diposite A/C of ".$row["AA_NAME"]. "</span></tr><tr>
<tr>
<th>ACCOUNT NO.</th>
<td>".$row["AA_ACNO"]. "</td>
</tr>
<tr>
<th>A/C Created</th>
<td>".$row["AA_TIMESTAMP"]. "</td>
</tr>
<tr>
<th>EFFECTIVE DATE</th>
<td>".$row["AA_DATE"]. "</td>
</tr>
<tr>
<th>ACCOUNT HOLDER</th>
<td>".$row["AA_NAME"]. "</td>
</tr>
<tr>
<th>ACCOUNT HOLDER's ID/CARD NO</th>
<td>".$row["AA_ICARD_NO"]. "</td>
</tr>
<tr>
<th>EMAIL ID</th>
<td>".$row["AA_EMAIL"]. "</td>
</tr>
<tr>
<th>PHONE NO.</th>
<td>".$row["AA_PHONE"]. "</td>
</tr>
<tr>
<th>ADDRESS</th>
<td>".$row["AA_ADDRESS"]. "</td>
</tr>
<tr>
<th>ACCOUNT TYPE</th>
<td>Fixed Diposite</td>
</tr>
<tr>
<th>RATE OF INTEREST</th>
<td>".$row["AA_INTEREST"]. "</td>
</tr>
<tr>
<th>AMOUNT PAID</th>
<td>".$row["AA_AMOUNT"]. "</td>
</tr>
<tr>
<th>MATURITY DATE</th>
<td>".$row["AA_DATE_MATURE"]. "</td>
</tr>
<tr>
<th>NOMINEE DETAILS</th>
<td>".$row["AA_NOMINEE_DETAILS"]. "</td>
</tr>
";
elseif ($row["AA_TYPE"]== "Recurring")
echo "
<tr><th colspan='2'><span class='text-center'>Recurring A/C of ".$row["AA_NAME"]. "</span></tr><tr>
<tr>
<th>ACCOUNT NO.</th>
<td>".$row["AA_ACNO"]. "</td>
</tr>
<tr>
<th>ACCOUNT TYPE</th>
<td>".$row["AA_TYPE"]. "</td>
</tr>
<tr>
<th>PAYMENT TERM</th>
<td>".$AA_ACTYPE. "</td>
</tr>
<tr>
<th>A/C Created</th>
<td>".$row["AA_TIMESTAMP"]. "</td>
</tr>
<tr>
<th>EFFECTIVE DATE</th>
<td>".$row["AA_DATE"]. "</td>
</tr>
<tr>
<th>ACCOUNT BALANCE</th>
<td>".$row["AA_BAL"]. "</td>
</tr>
<tr>
<th>ACCOUNT HOLDER</th>
<td>".$row["AA_NAME"]. "</td>
</tr>
<tr>
<th>ID CARD NO</th>
<td>".$row["AA_ICARD_NO"]. "</td>
</tr>
<tr>
<th>EMAIL ID</th>
<td>".$row["AA_EMAIL"]. "</td>
</tr>
<tr>
<th>PHONE NO.</th>
<td>".$row["AA_PHONE"]. "</td>
</tr>
<tr>
<th>ADDRESS</th>
<td>".$row["AA_ADDRESS"]. "</td>
</tr>
<tr>
<th>INTEREST</th>
<td>".$row["AA_INTEREST"]. "</td>
</tr>
<tr>
<th>INSTALLMENT AMOUNT</th>
<td>".$row["AA_INSTALLMENT"]. "</td>
</tr>
<tr>
<th>TOTAL NUMBER OF INSTALLMENTS</th>
<td>".$row["AA_NO_OF_PAYMENT"]. "</td>
</tr>
<tr>
<th>NUMBER OF INSTALLMENTS PAID</th>
<td>".$row["AA_NO_OF_PAYPAID"]. "</td>
</tr>
<tr>
<th>MATURITY DATE</th>
<td>".$row["AA_DATE_MATURE"]. "</td>
</tr>
<tr>
<th>MATURITY AMOUNT</th>
<td>".$row["AA_MATURE_VALUE"]. "</td>
</tr>
<tr>
<th>DATE</th>
<td>".$row["AA_DATE"]. "</td>
</tr>
<tr>
<th>NOMINEE DETAILS</th>
<td>".$row["AA_NOMINEE_DETAILS"]. "</td>
</tr>
";
else
echo "
<tr><th colspan='2'><span class='text-center'>Loan A/C of ".$row["AA_NAME"]. "</span></tr><tr>
<tr>
<th>ACCOUNT NO.</th>
<td>".$row["AA_ACNO"]. "</td>
</tr>
<tr>
<th>PAYMENT TERM</th>
<td>".$AA_ACTYPE. "</td>
</tr>
<tr>
<th>ACCOUNT TYPE</th>
<td>".$row["AA_TYPE"]. "</td>
</tr>
<tr>
<th>A/C Created</th>
<td>".$row["AA_TIMESTAMP"]. "</td>
</tr>
<tr>
<th>EFFECTIVE DATE</th>
<td>".$row["AA_DATE"]. "</td>
</tr>
<tr>
<th>ACCOUNT BALANCE</th>
<td>".$row["AA_BAL"]. "</td>
</tr>
<tr>
<th>ACCOUNT HOLDER</th>
<td>".$row["AA_NAME"]. "</td>
</tr>
<tr>
<th>ID CARD NO</th>
<td>".$row["AA_ICARD_NO"]. "</td>
</tr>
<tr>
<th>EMAIL ID</th>
<td>".$row["AA_EMAIL"]. "</td>
</tr>
<tr>
<th>PHONE NO.</th>
<td>".$row["AA_PHONE"]. "</td>
</tr>
<tr>
<th>ADDRESS</th>
<td>".$row["AA_ADDRESS"]. "</td>
</tr>
<tr>
<th>INTEREST</th>
<td>".$row["AA_INTEREST"]. "</td>
</tr>
<tr>
<th>INSTALLMENT AMOUNT</th>
<td>".$row["AA_INSTALLMENT"]. "</td>
</tr>
<tr>
<th>LOAN AMOUNT</th>
<td>".$row["AA_AMOUNT"]. "</td>
</tr>
<tr>
<th>NUMBER OF PAYMENT</th>
<td>".$row["AA_NO_OF_PAYMENT"]. "</td>
</tr>
<tr>
<th>TERM ENDING DATE</th>
<td>".$row["AA_DATE_MATURE"]. "</td>
</tr>
<tr>
<th>1st GUARANTER DETAILS</th>
<td>".$row["AA_G1_DETAILS"]. "</td>
</tr>
<tr>
<th>2nd GUARANTER DETAILS</th>
<td>".$row["AA_G2_DETAILS"]. "</td>
</tr>
";
}
} else {
echo "0 results";
};
$conn->close();
?>
</table>
</div>

View File

@@ -0,0 +1,102 @@
<div class="container">
<table>
<!-- <tr>
<td>
<form>
<input type="date" name="tday">
<input type="submit" class="btn-info" value="Daily Report">
</form>
</td>
<td>
<form>
<input type="date" name="tmonth">
<input type="submit" class="btn-info" value="Monthly Report">
</form>
</td>
</tr> -->
<tr><td>.</td><td>.</td></tr>
<tr>
<td colspan="2">
<form>
<label for="">From </label><input type="date" name="dFrom">
<label for="">To </label><input type="date" name="dTo">
<input type="submit" class="btn-info" value="Report">
</form>
</td>
</tr>
</table>
</div>
<?php
function report_view($type,$dt) {
$dateFrom=$dt;
if($type!="month" || $type!="day") {
$dateFrom= strtotime($dt); $dateFrom = date("Y-m-d", $dateFrom);
$dateTo= strtotime('+1 day', strtotime($type)); $dateTo = date("Y-m-d", $dateTo);
}
//$dateFrom=$dt;
else{
if($type=="month") {$dateFrom= strtotime('-1 day', strtotime($dt)); $dateFrom = date("Y-m-d", $dateFrom);}
$dateTo = strtotime('+1 '.$type, strtotime($dt));
$dateTo = date("Y-m-d", $dateTo);
}
echo '<div class="container"> <h3>'.$dateFrom." -> ".$dateTo."(Up to)</h3> </div>";
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$totalAmount=0;
echo '
<div class="container" style="margin-top: 70px;">
<h5>VIEW REPORT::::::::</h5><hr>
</div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Transaction ID</th>
<th>Time</th>
<th>AC No</th>
<th>Name</th>
<th>Amount</th>
</tr>';
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` INNER JOIN `".$GLOBALS['arif_ac']."` ON `".$GLOBALS['arif_tran']."`.`AT_ACID`=`".$GLOBALS['arif_ac']."`.`AA_ACNO` WHERE `AT_TIMESTAMP` BETWEEN '".$dateFrom." 00:00:00.000000' AND '".$dateTo." 00:00:00.000000' ORDER BY `arif_tran`.`AT_ID` DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
// $tt=$row["AT_ID"]-10;
echo "
<tr>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";$totalAmount+=$row["AT_AMOUNT"];
}
} else {
echo "0 results";
}
$conn->close();
echo '
</table>
<hr> <h2> Total Transaction amount : '.$totalAmount.'</h2>
</div>
';
}
if(isset($_GET['tday']) && $_GET['tday']!="") report_view('day',$_GET['tday']);
if(isset($_GET['tmonth']) && $_GET['tmonth']!="") report_view('month',$_GET['tmonth']);
if(isset($_GET['dFrom']) && $_GET['dTo']!="") report_view($_GET['dTo'],$_GET['dFrom']);
//if(isset($_GET['Type']) && $_GET['Type']=="Loan") view_list_ac('Loan');
// if(isset($_GET['Type']) && $_GET['Type']=="Recurring") view_list_ac('Recurring');
// if(isset($_GET['Type']) && $_GET['Type']=="FD") view_list_ac('FD');
?>

View File

@@ -0,0 +1,76 @@
<div class="container">
<form>
<input type="date" name="tday">
<input type="submit" class="btn-info" value="Daily Report">
</form>
<form>
<input type="date" name="tmonth">
<input type="submit" class="btn-info" value="Monthly Report">
</form>
</div>
<?php
function report_view($type,$dt) {
// $dateTo=$dt;
// $dateFrom = strtotime('-1 '.$type, strtotime($dt));
// $dateFrom = date("Y-m-d", $dateFrom);
$dateFrom=$dt;
if($type=="month") {$dateFrom= strtotime('-1 day', strtotime($dt)); $dateFrom = date("Y-m-d", $dateFrom);}
$dateTo = strtotime('+1 '.$type, strtotime($dt));
$dateTo = date("Y-m-d", $dateTo);
echo $dateFrom." -> ".$dateTo."(Up to)";
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$totalAmount=0;
echo '
<div class="container" style="margin-top: 70px;">
<h5>VIEW REPORT::::::::</h5><hr>
</div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Transaction ID</th>
<th>Time</th>
<th>AC No</th>
<th>Amount</th>
</tr>';
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_TIMESTAMP` BETWEEN '".$dateFrom." 00:00:00.000000' AND '".$dateTo." 00:00:00.000000' ORDER BY `arif_tran`.`AT_ID` DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
// $tt=$row["AT_ID"]-10;
echo "
<tr>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";$totalAmount+=$row["AT_AMOUNT"];
}
} else {
echo "0 results";
}
$conn->close();
echo '
</table>
<hr> <h2> Total Transaction amount : '.$totalAmount.'</h2>
</div>
';
}
if(isset($_GET['tday']) && $_GET['tday']!="") report_view('day',$_GET['tday']);
if(isset($_GET['tmonth']) && $_GET['tmonth']!="") report_view('month',$_GET['tmonth']);
//if(isset($_GET['Type']) && $_GET['Type']=="Loan") view_list_ac('Loan');
// if(isset($_GET['Type']) && $_GET['Type']=="Recurring") view_list_ac('Recurring');
// if(isset($_GET['Type']) && $_GET['Type']=="FD") view_list_ac('FD');
?>

View File

@@ -0,0 +1,100 @@
<div class="container">
<table>
<!-- <tr>
<td>
<form>
<input type="date" name="tday">
<input type="submit" class="btn-info" value="Daily Report">
</form>
</td>
<td>
<form>
<input type="date" name="tmonth">
<input type="submit" class="btn-info" value="Monthly Report">
</form>
</td>
</tr> -->
<tr><td>.</td><td>.</td></tr>
<tr>
<td colspan="2">
<form>
<label for="">From </label><input type="date" name="dFrom">
<label for="">To </label><input type="date" name="dTo">
<input type="submit" class="btn-info" value="Report">
</form>
</td>
</tr>
</table>
</div>
<?php
function report_view($type,$dt) {
$dateFrom=$dt;
if($type!="month" || $type!="day") {
$dateFrom= strtotime($dt); $dateFrom = date("Y-m-d", $dateFrom);
$dateTo= strtotime('+1 day', strtotime($type)); $dateTo = date("Y-m-d", $dateTo);
}
//$dateFrom=$dt;
else{
if($type=="month") {$dateFrom= strtotime('-1 day', strtotime($dt)); $dateFrom = date("Y-m-d", $dateFrom);}
$dateTo = strtotime('+1 '.$type, strtotime($dt));
$dateTo = date("Y-m-d", $dateTo);
}
echo $dateFrom." -> ".$dateTo."(Up to)";
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$totalAmount=0;
echo '
<div class="container" style="margin-top: 70px;">
<h5>VIEW REPORT::::::::</h5><hr>
</div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Transaction ID</th>
<th>Time</th>
<th>AC No</th>
<th>Amount</th>
</tr>';
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_TIMESTAMP` BETWEEN '".$dateFrom." 00:00:00.000000' AND '".$dateTo." 00:00:00.000000' ORDER BY `arif_tran`.`AT_ID` DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
// $tt=$row["AT_ID"]-10;
echo "
<tr>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";$totalAmount+=$row["AT_AMOUNT"];
}
} else {
echo "0 results";
}
$conn->close();
echo '
</table>
<hr> <h2> Total Transaction amount : '.$totalAmount.'</h2>
</div>
';
}
if(isset($_GET['tday']) && $_GET['tday']!="") report_view('day',$_GET['tday']);
if(isset($_GET['tmonth']) && $_GET['tmonth']!="") report_view('month',$_GET['tmonth']);
if(isset($_GET['dFrom']) && $_GET['dTo']!="") report_view($_GET['dTo'],$_GET['dFrom']);
//if(isset($_GET['Type']) && $_GET['Type']=="Loan") view_list_ac('Loan');
// if(isset($_GET['Type']) && $_GET['Type']=="Recurring") view_list_ac('Recurring');
// if(isset($_GET['Type']) && $_GET['Type']=="FD") view_list_ac('FD');
?>

View File

@@ -0,0 +1,5 @@
<?php
echo '<h2>Allowed Users</h2><br>';
foreach (glob("CONFIG/*.txt") as $filename) echo substr($filename, 7,-4);
echo '<h2>Add a user</h2><br><input type="text" >';
?>

View File

@@ -0,0 +1,9 @@
<?php
session_unset();
if(isset($_COOKIE['EMAIL'])){
header_remove();
setcookie('EMAIL', $_POST['EMAIL'], time() - (86400 * 30), "/");
echo '<script>window.location.relode();</script>';
}
else echo '<script>window.location.assign("/Admin/");</script>';
?>

View File

@@ -0,0 +1,149 @@
<div class="container" style="margin-top: 20px;">
<form method="get" action="Trans_New"> <input type="text" placeholder="input A/C no and enter" name="no"></form>
</div>
<?php
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Loan"){
echo '
<div class="container" style="margin-top: 20px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Remaining Amount</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<!--<input type="hidden" name="FORM_NAME" value="add_installment">-->
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Recurring"){
echo '
<div class="container" style="margin-top: 70px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Total Deposite</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
?>
<div class="container" style="margin-top: 70px;">
<h5>Past Transactions::</h5><hr>
</div>
<?php
if(isset($_GET["no"])){
echo '
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>SL</th>
<th>Tr No</th>
<th>TimeStamp</th>
<th>User</th>
<th>A/C No</th>
<th>Amount</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."'";
$result = $conn->query($sql);
$i=0;
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
$i++;
echo "
<tr>
<td>".$i. "</td>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_USER"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";
}
} else echo "No Past record Found";
$conn->close();
echo '
</table>
</div>
';
}
?>

View File

@@ -0,0 +1,150 @@
<div class="container" style="margin-top: 20px;">
<form method="get" action="Trans_New"> <input type="text" placeholder="input A/C no and enter" name="no"></form>
</div>
<?php
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Loan"){
echo '
<div class="container" style="margin-top: 20px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Remaining Amount</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Recurring"){
echo '
<div class="container" style="margin-top: 70px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Total Deposite</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
?>
<div class="container" style="margin-top: 70px;">
<h5>Past Transactions::::</h5><hr>
</div>
<?php
if(isset($_GET["no"])){
echo '
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>SL</th>
<th>Tr No</th>
<th>TimeStamp</th>
<th>User</th>
<th>A/C No</th>
<th>Amount</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
// $sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."'";
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."' ORDER BY `".$GLOBALS['arif_tran']."`.`AT_ID` DESC";
$result = $conn->query($sql);
$i=0;
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
$i++;
echo "
<tr>
<td>".$i. "</td>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_USER"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";
}
} else echo "No Past record Found";
$conn->close();
echo '
</table>
</div>
';
}
?>

View File

@@ -0,0 +1,152 @@
<div class="container" style="margin-top: 20px;">
<form method="get" action="Trans_New"> <input type="text" placeholder="input A/C no and enter" name="no"></form>
</div>
<?php
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Loan"){
echo '
<div class="container" style="margin-top: 20px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Remaining Amount</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Recurring"){
echo '
<div class="container" style="margin-top: 70px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Total Deposite</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
?>
<div class="container" style="margin-top: 70px;">
<h5>Past Transactions::::</h5><hr>
</div>
<?php
if(isset($_GET["no"])){
echo '
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>SL</th>
<th>Tr No</th>
<th>TimeStamp</th>
<th>User</th>
<th>A/C No</th>
<th>Amount</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
// $sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."'";
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."' ORDER BY `".$GLOBALS['arif_tran']."`.`AT_ID` DESC";
$result = $conn->query($sql);
$rowcount=mysqli_num_rows($result);//$rowcount++;
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$rowcount. "</td>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_USER"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";
$rowcount--;
}
} else echo "No Past record Found";
mysqli_free_result($result);$conn->close();
echo '
</table>
</div>
';
}
?>

View File

@@ -0,0 +1,152 @@
<div class="container" style="margin-top: 20px;">
<form method="get" action="Trans_New"> <input type="text" placeholder="input A/C no and enter" name="no"></form>
</div>
<?php
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Loan"){
echo '
<div class="container" style="margin-top: 20px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Remaining Amount</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
if(isset($_GET["no"]) && isset($_GET["type"])&&$_GET["type"]=="Recurring"){
echo '
<div class="container" style="margin-top: 70px;"> <h5>New Transaction : '.$GLOBALS['post_info'].' </h5><hr></div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>Name</th>
<th>Phone</th>
<th>AC No</th>
<th>Total Deposite</th>
<th>Installment</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_ACNO` = '".$_GET["no"]."' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_ACNO"]."</td>
<td>".$row["AA_BAL"]. '</td>
<td>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="add_installment">
<input type="text" name="add_i" value="'.$row['AA_INSTALLMENT'].'">
<input type="hidden" name="AA_ACNO" value="'.$row['AA_ACNO'].'"><input type="submit" class="btn-info" value="Receive"></form>
</td>
</tr>';
}
} else {echo "Check A/C no.";};
$conn->close();
echo '
</table>
</div>
';
}
?>
<div class="container" style="margin-top: 70px;">
<h5>Past Transactions::::</h5><hr>
</div>
<?php
if(isset($_GET["no"])){
echo '
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>SL</th>
<th>Tr No</th>
<th>TimeStamp</th>
<th>User</th>
<th>A/C No</th>
<th>Amount</th>
</tr>
';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
// $sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."'";
$sql = "SELECT * FROM `".$GLOBALS['arif_tran']."` WHERE `AT_ACID` = '".$_GET['no']."' ORDER BY `".$GLOBALS['arif_tran']."`.`AT_ID` DESC";
$result = $conn->query($sql);
$rowcount=mysqli_num_rows($result);//$rowcount++;
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
echo "
<tr>
<td>".$rowcount. "</td>
<td>".$row["AT_ID"]. "</td>
<td>".$row["AT_TIMESTAMP"]. "</td>
<td>".$row["AT_ADMIN"]. "</td>
<td>".$row["AT_ACID"]. "</td>
<td>".$row["AT_AMOUNT"]. "</td>
</tr>";
$rowcount--;
}
} else echo "No Past record Found";
mysqli_free_result($result);$conn->close();
echo '
</table>
</div>
';
}
?>

View File

@@ -0,0 +1,66 @@
<div class="container" style="background-color:#e0a3a3;padding:8px;">
<ul class="nav nav-pills nav-justified">
<li <?php if(isset($_GET['Type']) && $_GET['Type']=="FD") echo'class="active"';?>><a href="View_AC?Type=FD">Fixed Deposits</a></li>
<li <?php if(isset($_GET['Type']) && $_GET['Type']=="Loan") echo'class="active"';?>><a href="View_AC?Type=Loan">Loan A/C</a></li>
<li <?php if(isset($_GET['Type']) && $_GET['Type']=="Recurring") echo'class="active"';?>><a href="View_AC?Type=Recurring">Recurring A/Cs</a></li>
</ul>
</div>
<?php
function view_list_ac($type) {
echo '
<div class="container" style="margin-top: 70px;">
<h5>VIEW CUSTOMERS</h5><hr>
</div>
<div class="container">
<table class="table table-striped table-bordered table-hover table-responsive">
<tr>
<th>SL</th>
<th>Type</th>
<th>AC No</th>
<th>Name</th>
<th>PHONE</th>
<th>Balance</th>
</tr>';
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM `".$GLOBALS['arif_ac']."` WHERE `AA_TYPE`='".$type."' ORDER BY `AA_ID` DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//$ID=$row["GC_ID"];
$tt=$row["AA_ID"]-10;
echo "
<tr>
<td>".$tt. "</td>
<td>".$row["AA_ACTYPE"].",".$row["AA_TYPE"]. "</td>
<td><a href='./Details?no=".$row["AA_ACNO"]."&type=".$row["AA_TYPE"]."'>".$row["AA_ACNO"]."</a> &nbsp;&nbsp; <a href='./Trans_New?no=".$row["AA_ACNO"]."&type=".$row["AA_TYPE"]."'>Transact</a></td>
<td>".$row["AA_NAME"]. "</td>
<td>".$row["AA_PHONE"]. "</td>
<td>".$row["AA_BAL"]. "</td>
</tr>";
}
} else {
echo "0 results";
};
$conn->close();
echo '
</table>
</div>
';
}
if(isset($_GET['Type']) && $_GET['Type']=="Loan") view_list_ac('Loan');
if(isset($_GET['Type']) && $_GET['Type']=="Recurring") view_list_ac('Recurring');
if(isset($_GET['Type']) && $_GET['Type']=="FD") view_list_ac('FD');
?>

View File

@@ -0,0 +1 @@
admin panel home

View File

@@ -0,0 +1,23 @@
<?php
$lnk2 = explode('?', $lnk);
include("ADMIN_HEADER.php");//print file_get_contents('http://www.example.com/');var_dump(gethostbyaddr($_SERVER['HTTP_REFERER']));// echo $lnk."c";
/*
echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$browser = get_browser(null, true);
print_r($browser);echo $_SERVER['HTTP_REFERER'];*/
include("ADMIN_nav.php");
if(isset($_SESSION['EMAIL']) || isset($_COOKIE['EMAIL']) ){
//include("ADMIN_nav.php");
echo "<br>";
if($lnk=="") include("home.php");
elseif(file_exists(__DIR__."/".$lnk.".php")) include($lnk.".php");
elseif(isset($lnk2[1]) && file_exists(__DIR__."/".$lnk2[0].".php") ) include($lnk2[0].".php");
else include("404.php");
}else echo '<center>
<h2>Provide Details to login</h2> <a href="https://siliconpin.com/id/auth"><button class="btn btn-default">Login</button></a> </center>';
include("ADMIN_FOOTER.php");
?>

View File

@@ -0,0 +1,58 @@
<div class="container">
<?php echo $GLOBALS['alert_info'] ?>
</div>
<div class="container">
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="new_news_entry">
<input type="hidden" name="lang" value="BN">
<div ng-app="myApp" ng-controller="myCtrl" class="form-group">
<select class="form-control" name="news_category"><option ng-repeat="x in names">{{x}}</option></select>
</select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = [<?php include APP_DIR."/CONTENT/VARIABLES/news_type_list_en.php";?>];
});
</script>
<div class="form-group">
<input type="text" class="form-control" name="news_link" placeholder="Meta/Link for this news entry">
<small id="emailHelp" class="form-text text-muted">Alphanumeric(A-Z,a-z,0-9).</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="news_title" placeholder="Title for this new">
</div>
<div class="form-group">
<textarea class="form-control" rows="5" name="news_content" placeholder="News content text"></textarea>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<label class="btn btn-default btn-file">
<input name="photo_news" type="file" >
</label>
<!-- Multiple upload not needed for now! <div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-default btn-file"><span></span><input type="file" multiple /></span>
<span class="fileinput-filename"></span><span class="fileinput-new"></span>
</div>-->
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input">
Check me out
</label>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
<!--<div class="row">
<iframe width="100%" height="350" src="https://www.youtube.com/embed/UXJTvnf-meU" frameborder="0" allowfullscreen></iframe>
</div>-->
</form>
</div>

View File

@@ -0,0 +1,57 @@
<div class="container">
<?php echo $GLOBALS['alert_info'] ?>
</div>
<div class="container">
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="FORM_NAME" value="new_news_entry">
<input type="hidden" name="lang" value="EN">
<div ng-app="myApp" ng-controller="myCtrl" class="form-group">
<select class="form-control" name="news_category"><option ng-repeat="x in names">{{x}}</option></select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = [<?php include APP_DIR."/CONTENT/VARIABLES/news_type_list_en.php";?>];
});
</script>
<div class="form-group">
<input type="text" class="form-control" name="news_link" placeholder="Meta/Link for this news entry">
<small id="emailHelp" class="form-text text-muted">Alphanumeric(A-Z,a-z,0-9).</small>
</div>
<div class="form-group">
<input type="text" class="form-control" name="news_title" placeholder="Title for this new">
</div>
<div class="form-group">
<textarea class="form-control" rows="5" name="news_content" placeholder="News content text"></textarea>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<label class="btn btn-default btn-file">
<input name="photo_news" type="file" >
</label>
<!-- Multiple upload not needed for now! <div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-default btn-file"><span></span><input type="file" multiple /></span>
<span class="fileinput-filename"></span><span class="fileinput-new"></span>
</div>-->
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input">
Check me out
</label>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
<!--<div class="row">
<iframe width="100%" height="350" src="https://www.youtube.com/embed/UXJTvnf-meU" frameborder="0" allowfullscreen></iframe>
</div>-->
</form>
</div>

View File

@@ -0,0 +1,11 @@
<?php echo $_POST["name"]; ?><br>
<?php echo $_POST["email"]; ?>
<div class="container">
<form method="POST">
<input type="text" name="name" placeholder="name" class="frist"/>
<input type="text" name="email" placeholder="email"/>
<input type="submit" value="submit" />
</form>
</div>

View File

@@ -0,0 +1,3 @@
<div class="container">
</div>

View File

@@ -0,0 +1,129 @@
<script>
function update_pri(id) {
var idn='pri'+id;
if (id.length == 0) {
alert("Input Error!");
return;
} else {
var pri=document.getElementById(idn).value;
document.getElementById(idn).disabled = true;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(idn).disabled = false;
document.getElementById(idn).value = this.responseText;
}
};
xmlhttp.open("GET", "/execute.php?id=" + id + "&pri="+pri, true);
xmlhttp.send();
}
}
</script>
<script>
function switch_state(id) {
var idn='act'+id;
if (id.length == 0) {
alert("Input Error!");
return;
} else {
var active=document.getElementById(idn).value;
document.getElementById(idn).disabled = true;
console.log(idn);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(idn).disabled = false;
document.getElementById(idn).value = this.responseText;
}
};
xmlhttp.open("GET", "/execute2.php?id=" + id + "&active="+active, true);
xmlhttp.send();
}
}
</script>
<div class="container table-responsive">
<table class="table table-striped table-bordered table-hover">
<tr>
<th>ID</th>
<th>TITLE</th>
<th>DATE</th>
<th>CATEGORY</th>
<th>PRIORITY</th>
<th>STATE</th>
</tr>
<?php
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
$conn->set_charset("utf8");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM ".$GLOBALS['table1'];
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
//echo "id: " . $row["N_TITLE"]. " - Name: " . $row["N_DATE"]. " " . $row["N_CATEGORY"]." " . $row["pri"]. "<br>";
$ID=$row["id"];
echo "
<tr>
<td>" . $ID. "</td>
<td>" . $row["N_TITLE"]. "</td>
<td>" . $row["N_DATE"]. "</td>
<td>" . $row["N_CATEGORY"]. "</td>
<td>
<form method='post'>
<input type='number' name='pri' id='pri" .$ID. "' value='" . $row["pri"]. "'>
<input type='hidden' name='id' value='" .$ID. "'>
<input class='btn btn-success' type='button' name='priority' value='SAVE' onclick='update_pri(" .'"'.$ID.'"'. ")'>
</form>
</td>
<td>
<select name='state' id='act" .$ID. "' onchange='switch_state(" .'"'.$ID.'"'. ")' >
<option>".$row['ACTIVE']."</option>
<option>0</option>
<option>1</option>
</select>
</td>
</tr>";
}
} else {
echo "0 results";
};
$conn->close();
?>
<?php
if(isset($_POST['priority']) && $_POST['priority']=='SUBMIT')
{
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE `".$GLOBALS["table1"]."` SET `pri` = '".$_POST['pri']."' WHERE `news`.`id` =".$_POST['id'];
$result = $conn->query($sql);
if(!$result) echo mysqli_error(); else echo "Successfully Updated! <br />";
$conn->close();
}
?>
<?php
if(isset($_POST['statebtn']) && $_POST['statebtn']=='SUBMIT')
{
$conn = new mysqli($GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE `".$GLOBALS["table1"]."` SET `ACTIVE` = '".$_POST['active']."' WHERE `news`.`id` =".$_POST['id'];
$result = $conn->query($sql);
if(!$result) echo mysqli_error(); else echo "Successfully Updated! <br />";
$conn->close();
}
?>
</table>
</div>