gowtham
@ -46,24 +46,26 @@ $routes->match(['get','post'],'all_donation_cause','Dashboard::all_donation_caus
|
||||
|
||||
//$routes->add('edit_donor/(:num)', 'App\Catalog::productLookup');
|
||||
//$routes->match(['get'],'edit_donor/(:any)', 'My_controller::edit_donor');
|
||||
$routes->get('(:num)', 'My_controller::edit_donor/$1');
|
||||
$routes->get('edit_donor/(:num)', 'My_controller::edit_donor/$1');
|
||||
$routes->get('edit_receipt/(:num)', 'Dashboard::edit_receipt/$1');
|
||||
$routes->get('view_receipt/(:num)', 'Dashboard::view_receipt/$1');
|
||||
$routes->match(['get','post'],'edit_transaction/(:num)', 'Dashboard::edit_transaction/$1');
|
||||
$routes->match(['get','post'],'edit_donation_data/(:num)', 'Dashboard::edit_donation_data/$1');
|
||||
$routes->match(['get','post'],'edit_donation_cause/(:num)', 'Dashboard::edit_donation_cause/$1');
|
||||
|
||||
$routes->match(['get','post'],'register','Donor_controller::register');
|
||||
$routes->match(['get','post'],'signup','Donor_controller::register');
|
||||
$routes->match(['get','post'],'login','Donor_controller::login');
|
||||
$routes->match(['get'],'fetch_country','Donor_controller::fetch_country');
|
||||
$routes->match(['get','post'],'fetch_state','Donor_controller::fetch_state');
|
||||
$routes->match(['get','post'],'fetch_city','Donor_controller::fetch_city');
|
||||
$routes->match(['get'],'profile','Donor_controller::profile');
|
||||
|
||||
$routes->match(['get','post'],'receipt','Dashboard::generate_receipts');
|
||||
$routes->match(['get','post'],'update_receipt','Dashboard::update_receipt');
|
||||
$routes->match(['get','post'],'transaction','Dashboard::transaction_upload');
|
||||
$routes->match(['get','post'],'donation_data','Dashboard::donation_data_upload');
|
||||
$routes->match(['get','post'],'donor_register','My_controller::donor_register');
|
||||
$routes->match(['get','post'],'update_donor','My_controller::update_donor');
|
||||
|
||||
$routes->match(['get'],'fetch_donor_id','Dashboard::fetch_donor_id');
|
||||
$routes->match(['get'],'edit_donor_id','Dashboard::edit_donor_id');
|
||||
|
||||
@ -105,7 +105,7 @@ class Dashboard extends BaseController
|
||||
//print_r($receiptData);die();
|
||||
$model = new Receipt_model();
|
||||
$model->save($receiptData);
|
||||
return redirect()->to(base_url().'/Dashboard/last_receipt');
|
||||
return redirect()->to(base_url().'all_receipt');
|
||||
}
|
||||
|
||||
function update_receipt()
|
||||
@ -188,6 +188,10 @@ class Dashboard extends BaseController
|
||||
}
|
||||
function last_receipt()
|
||||
{
|
||||
if(!session()->has('logged_user'))
|
||||
{
|
||||
return redirect()->to(base_url());
|
||||
}
|
||||
// admin data
|
||||
$dmodel = new Donor_model();
|
||||
$id= session()->get('logged_user');
|
||||
@ -214,6 +218,10 @@ class Dashboard extends BaseController
|
||||
|
||||
function view_receipt($receiptid)
|
||||
{
|
||||
if(!session()->has('logged_user'))
|
||||
{
|
||||
return redirect()->to(base_url());
|
||||
}
|
||||
// admin data
|
||||
$dmodel = new Donor_model();
|
||||
$id= session()->get('logged_user');
|
||||
@ -235,7 +243,7 @@ class Dashboard extends BaseController
|
||||
// array for receipt
|
||||
$data= [ 'donordata'=>$Donor_data , 'admindata' =>$admin_data , 'receipt'=>$receipt_data , 'causedata'=>$cause_data];
|
||||
|
||||
|
||||
//print_r($data); die();
|
||||
return view('receipt_view',$data);
|
||||
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ class Donor_controller extends BaseController
|
||||
public $session;
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->session = session();
|
||||
$this->Donor_model = new Donor_model();
|
||||
$this->Dashboard_model = new Dashboard_model();
|
||||
@ -153,6 +154,13 @@ class Donor_controller extends BaseController
|
||||
//echo view('templates/footer');
|
||||
|
||||
}
|
||||
|
||||
function profile()
|
||||
{
|
||||
$id= session()->get('logged_user');
|
||||
$data['userdata']=$this->Dashboard_model->getLoggedInUserData($id);
|
||||
return view('profile',$data);
|
||||
}
|
||||
|
||||
function fetch_country()
|
||||
{
|
||||
|
||||
@ -20,8 +20,15 @@ class My_controller extends BaseController
|
||||
|
||||
public function donor_register()
|
||||
{
|
||||
|
||||
$data['country']=$this->Dashboard_model->fetch_country();
|
||||
helper(['form']);
|
||||
if(!session()->has('logged_user'))
|
||||
{
|
||||
return redirect()->to(base_url());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($this->request->getmethod() == 'post')
|
||||
{
|
||||
@ -85,8 +92,8 @@ class My_controller extends BaseController
|
||||
//print_r($donorData); die();
|
||||
$model->save($donorData);
|
||||
$session = session();
|
||||
$session ->setFlashdata('success','Successful Registration');
|
||||
return redirect()->to(base_url().'/Dashboard');
|
||||
$session ->setFlashdata('success','Successful Added');
|
||||
return redirect()->to(base_url().'/all_donor');
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,6 +119,10 @@ class My_controller extends BaseController
|
||||
}
|
||||
function edit_donor($id)
|
||||
{
|
||||
if(!session()->has('logged_user'))
|
||||
{
|
||||
return redirect()->to(base_url());
|
||||
}
|
||||
$model = new My_model();
|
||||
$donor_data=$model->find($id);
|
||||
$data= [ 'post'=>$donor_data ];
|
||||
@ -125,6 +136,38 @@ class My_controller extends BaseController
|
||||
}
|
||||
return view('donor_edit',$data);
|
||||
|
||||
}
|
||||
function update_donor()
|
||||
{
|
||||
if(!session()->has('logged_user'))
|
||||
{
|
||||
return redirect()->to(base_url());
|
||||
}
|
||||
|
||||
$donor_id=$this->request->getVar('id');
|
||||
|
||||
|
||||
$DonorData=[
|
||||
|
||||
'name' =>$this->request->getVar('name'),
|
||||
'phone' =>$this->request->getVar('phone'),
|
||||
'email' =>$this->request->getVar('email'),
|
||||
'pan' =>$this->request->getVar('pan'),
|
||||
'address' =>$this->request->getVar('address'),
|
||||
'country' =>$this->request->getVar('country'),
|
||||
'state' =>$this->request->getVar('state'),
|
||||
'city' =>$this->request->getVar('city'),
|
||||
'pin_code' =>$this->request->getVar('pin_code'),
|
||||
'date_of_birth' =>$this->request->getVar('date_of_birth'),
|
||||
'gender' =>$this->request->getVar('gender'),
|
||||
'org_name' =>$this->request->getVar('org_name'),
|
||||
'gstin' =>$this->request->getVar('gstin'),
|
||||
];
|
||||
//print_r($DonorData);die();
|
||||
$model = new My_model();
|
||||
$model->update($donor_id , $DonorData);
|
||||
return redirect()->to(base_url().'/all_donor');
|
||||
|
||||
}
|
||||
|
||||
function fetch_country()
|
||||
|
||||
@ -52,9 +52,15 @@ class PdfController extends Controller
|
||||
$data= [ 'donordata'=>$Donor_data , 'admindata' =>$admin_data , 'receipt'=>$receipt_data , 'causedata'=>$cause_data];
|
||||
//echo view('download_receipt',$data); die();
|
||||
$html = view('download_receipt',$data);
|
||||
|
||||
$dompdf = new \Dompdf\Dompdf();
|
||||
//$dompdf->loadHtml(view('download_receipt',$data));
|
||||
$dompdf->loadHtml($html);
|
||||
|
||||
|
||||
$options = $dompdf->getOptions();
|
||||
$options->set(array('isRemoteEnabled' => true));
|
||||
$dompdf->setOptions($options);
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->setPaper('A4', 'portrait');
|
||||
$dompdf->render();
|
||||
$dompdf->stream();
|
||||
|
||||
@ -12,7 +12,7 @@ class Sendmail extends Controller
|
||||
function Mail_to_donor()
|
||||
{
|
||||
|
||||
$to = 'gowthamceline46@gmail.com';
|
||||
$to = '';
|
||||
$subject = "hai";
|
||||
$message = 'CI4';
|
||||
|
||||
|
||||
@ -3,6 +3,23 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Bootstrap DatePicker -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css" type="text/css" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#txtDate').datepicker({
|
||||
format: "dd/mm/yyyy"
|
||||
});
|
||||
});
|
||||
$(function () {
|
||||
$('#txtDate2').datepicker({
|
||||
format: "dd/mm/yyyy"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- Bootstrap DatePicker End-->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Colorlib Templates">
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="" class="nav-link">
|
||||
<i class="fa fa-user fa-lg"></i>
|
||||
<span class="d-lg-block"> Profile</span>
|
||||
</a>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
220
app/Views/donor-table.php
Normal file
@ -0,0 +1,220 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="public/assets/img/apple-icon.png">
|
||||
<link rel="icon" type="image/png" href="public/assets/img/favicon.ico">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<title>Donar App</title>
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
|
||||
<!-- Fonts and icons -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
|
||||
<!-- CSS Files -->
|
||||
<link href="public/assets/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="public/assets/css/light-bootstrap-dashboard.css?v=2.0.0 " rel="stylesheet" />
|
||||
<!-- CSS Just for demo purpose, don't include it in your project -->
|
||||
<link href="public/assets/css/demo.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="sidebar" data-image="public/assets/img/sidebar-5.jpg">
|
||||
<!--
|
||||
Tip 1: You can change the color of the sidebar using: data-color="purple | blue | green | orange | red"
|
||||
|
||||
Tip 2: you can also add an image using data-image tag
|
||||
-->
|
||||
<div class="sidebar-wrapper">
|
||||
<div class="logo">
|
||||
<!-- <a href="http://www.creative-tim.com" class="simple-text"> -->
|
||||
Donation
|
||||
</a>
|
||||
</div>
|
||||
<ul class="nav">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="<?= base_url() ?>/dashboard">
|
||||
<i class="nc-icon nc-chart-pie-35"></i>
|
||||
<p>Dashboard</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown ">
|
||||
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-user fa-lg"></i>
|
||||
|
||||
<span>Donor Management</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/all_donor"> View Donors </a>
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/donor_register"> Add New Donor </a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown ">
|
||||
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-book fa-lg"></i>
|
||||
|
||||
<span >Receipts</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/all_receipt"> All Receipts </a>
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/receipts"> Generate Receipts </a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown ">
|
||||
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-newspaper-o fa-lg"></i>
|
||||
|
||||
<span >Transaction</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/all_transaction"> All Transaction </a>
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/transaction"> Upload Transaction </a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown ">
|
||||
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-money fa-lg"></i>
|
||||
|
||||
<span>Donation Data</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/all_donation_data"> Donation Data List </a>
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/donation_data"> Add Donation Data </a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown ">
|
||||
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-pencil-square-o fa-lg"></i>
|
||||
|
||||
<span>DonationCause</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/donation_cause"> Add Donation Cause </a>
|
||||
<a class="dropdown-item" href="<?= base_url() ?>/all_donation_cause"> View Donation Cause </a>
|
||||
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="fa fa-user fa-lg"></i>
|
||||
<span class="d-lg-block"> Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-panel">
|
||||
|
||||
<nav class="navbar navbar-expand-lg " color-on-scroll="500">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#pablo"> </a>
|
||||
<button href="" class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-bar burger-lines"></span>
|
||||
<span class="navbar-toggler-bar burger-lines"></span>
|
||||
<span class="navbar-toggler-bar burger-lines"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navigation">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<!-- <div class="container">
|
||||
<h2 style="text-align: center;">All Receipts</h2> -->
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h4 class="title">Donor List</h4>
|
||||
|
||||
</div>
|
||||
<div class="content table-responsive table-full-width">
|
||||
|
||||
<table class="table table-bordered table-sm ">
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Phone</th>
|
||||
<th > Email</th>
|
||||
<th> Pan </th>
|
||||
<th> Address</th>
|
||||
<th> DOB</th>
|
||||
<th> Gender</th>
|
||||
<th> Org Name</th>
|
||||
<th> GSTIN</th>
|
||||
<th> Action</th>
|
||||
</tr>
|
||||
<?php foreach ($receiptdata as $row)
|
||||
{ ?>
|
||||
<tr>
|
||||
<td><?php echo $row['name'];?></td>
|
||||
<td><?php echo $row['phone'];?></td>
|
||||
<td ><?php echo $row['email'];?></td>
|
||||
<td><?php echo $row['pan'];?></td>
|
||||
<td><?php echo $row['address'];?>,<?php echo $row['city'];?>,<?php echo $row['state'];?>,<?php echo $row['country'];?>.</td>
|
||||
<td><?php echo $row['date_of_birth'];?></td>
|
||||
<td><?php echo $row['gender'];?></td>
|
||||
<td><?php echo $row['org_name'];?></td>
|
||||
<td><?php echo $row['gstin'];?></td>
|
||||
<td><a href="<?= base_url() ?>/edit_donor/<?php echo $row['id'];?>">Edit</a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<!-- Core JS Files -->
|
||||
<script src="public/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
|
||||
<script src="public/assets/js/core/popper.min.js" type="text/javascript"></script>
|
||||
<script src="public/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
|
||||
<script src="public/assets/js/plugins/bootstrap-switch.js"></script>
|
||||
<!-- Google Maps Plugin -->
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
|
||||
<!-- Chartist Plugin -->
|
||||
<script src="public/assets/js/plugins/chartist.min.js"></script>
|
||||
<!-- Notifications Plugin -->
|
||||
<script src="public/assets/js/plugins/bootstrap-notify.js"></script>
|
||||
<!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc -->
|
||||
<script src="public/assets/js/light-bootstrap-dashboard.js?v=2.0.0 " type="text/javascript"></script>
|
||||
<!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
|
||||
<script src="public/assets/js/demo.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Javascript method's body can be found in assets/js/demos.js
|
||||
demo.initDashboardPageCharts();
|
||||
|
||||
demo.showNotification();
|
||||
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -17,74 +17,15 @@
|
||||
|
||||
</script>
|
||||
<!-- Bootstrap DatePicker End-->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script>
|
||||
|
||||
$.ajax({
|
||||
url:"<?= base_url(); ?>/fetch_country",
|
||||
method:"GET",
|
||||
data:{},
|
||||
success:function(data)
|
||||
{
|
||||
$('#country0').html(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
//fetch state and sity values
|
||||
$('#country0').change(function(){
|
||||
|
||||
var country_id = $('#country0').val();
|
||||
|
||||
if(country_id != '')
|
||||
{
|
||||
|
||||
$.ajax({
|
||||
url:"<?= base_url(); ?>/fetch_state",
|
||||
method:"POST",
|
||||
data:{country_id:country_id},
|
||||
success:function(data)
|
||||
{
|
||||
$('#state0').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#state0').html('<option value="">Select State</option>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#state0').change(function(){
|
||||
var state_id = $('#state0').val();
|
||||
if(state_id != '')
|
||||
{
|
||||
$.ajax({
|
||||
url:"<?= base_url(); ?>/fetch_city",
|
||||
method:"POST",
|
||||
data:{state_id:state_id},
|
||||
success:function(data)
|
||||
{
|
||||
$('#city0').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#city0').html('<option value="">Select City</option>');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Colorlib Templates">
|
||||
<meta name="author" content="Colorlib">
|
||||
<meta name="keywords" content="Colorlib Templates">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="public/assets/img/apple-icon.png">
|
||||
<link rel="icon" type="image/png" href="public/assets/img/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<?= base_url() ?>/public/assets/img/apple-icon.png">
|
||||
<link rel="icon" type="image/png" href="<?= base_url() ?>/public/assets/img/favicon.ico">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<title>Donar App</title>
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
|
||||
@ -92,27 +33,27 @@ $(document).ready(function(){
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
|
||||
<!-- CSS Files -->
|
||||
<link href="public/assets/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="public/assets/css/light-bootstrap-dashboard.css?v=2.0.0 " rel="stylesheet" />
|
||||
<link href="<?= base_url() ?>/public/assets/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="<?= base_url() ?>/public/assets/css/light-bootstrap-dashboard.css?v=2.0.0 " rel="stylesheet" />
|
||||
<!-- CSS Just for demo purpose, don't include it in your project -->
|
||||
<link href="vendor copy/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
|
||||
<!-- Font special for pages-->
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">
|
||||
|
||||
<!-- Vendor CSS-->
|
||||
<link href="public/assets/vendor copy/select2/select2.min.css" rel="stylesheet" media="all">
|
||||
<link href="public/assets/vendor copy/datepicker/daterangepicker.css" rel="stylesheet" media="all">
|
||||
<link href="<?= base_url() ?>/public/assets/vendor copy/select2/select2.min.css" rel="stylesheet" media="all">
|
||||
<link href="<?= base_url() ?>/public/assets/vendor copy/datepicker/daterangepicker.css" rel="stylesheet" media="all">
|
||||
|
||||
<!-- Main CSS-->
|
||||
<link href="public/assets/css/main2.css" rel="stylesheet" media="all">
|
||||
<link href="public/assets/css/demo.css" rel="stylesheet" />
|
||||
<link href="<?= base_url() ?>/public/assets/css/main2.css" rel="stylesheet" media="all">
|
||||
<link href="<?= base_url() ?>/public/assets/css/demo.css" rel="stylesheet" />
|
||||
|
||||
</head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="sidebar" data-image="public/assets/img/sidebar-5.jpg">
|
||||
<div class="sidebar" data-image="<?= base_url() ?>/public/assets/img/sidebar-5.jpg">
|
||||
<!--
|
||||
Tip 1: You can change the color of the sidebar using: data-color="purple | blue | green | orange | red"
|
||||
|
||||
@ -199,7 +140,7 @@ $(document).ready(function(){
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
@ -240,7 +181,8 @@ $(document).ready(function(){
|
||||
<h2 class="title">Donor Registration</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" >
|
||||
<form method="POST" action="<?= base_url()."/update_donor"; ?>" >
|
||||
<input class="input--style-5" type="hidden"name="id" id = "id" value="<?= $post['id'] ?>">
|
||||
<div class="form-row m-b-55">
|
||||
<div class="name">Name</div>
|
||||
<div class="value">
|
||||
@ -305,9 +247,7 @@ $(document).ready(function(){
|
||||
<div class="value">
|
||||
<div class="input-group">
|
||||
<div class="rs-select2 js-select-simple select--no-search">
|
||||
<select name="country" id="country0" class="form-control ">
|
||||
<option value="">Select Country</option>
|
||||
</select>
|
||||
<input class="input--style-5" type="text" name="country" id="country" value="<?= $post['country'] ?>">
|
||||
<div class="select-dropdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -318,9 +258,7 @@ $(document).ready(function(){
|
||||
<div class="value">
|
||||
<div class="input-group">
|
||||
<div class="rs-select2 js-select-simple select--no-search">
|
||||
<select name="state" id="state0" class="form-control ">
|
||||
<option value="">Select State</option>
|
||||
</select>
|
||||
<input class="input--style-5" type="text" name="state" id="state" value="<?= $post['state'] ?>">
|
||||
<div class="select-dropdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -331,9 +269,7 @@ $(document).ready(function(){
|
||||
<div class="value">
|
||||
<div class="input-group">
|
||||
<div class="rs-select2 js-select-simple select--no-search ">
|
||||
<select name="city" id="city0" class="form-control ">
|
||||
<option value="">Select City</option>
|
||||
</select>
|
||||
<input class="input--style-5" type="text" name="city" id="city" value="<?= $post['city'] ?>">
|
||||
<div class="select-dropdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -420,21 +356,21 @@ $(document).ready(function(){
|
||||
|
||||
</body>
|
||||
<!-- Core JS Files -->
|
||||
<script src="public/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
|
||||
<script src="public/assets/js/core/popper.min.js" type="text/javascript"></script>
|
||||
<script src="public/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/core/popper.min.js" type="text/javascript"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/core/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
|
||||
<script src="public/assets/js/plugins/bootstrap-switch.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/plugins/bootstrap-switch.js"></script>
|
||||
<!-- Google Maps Plugin -->
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
|
||||
<!-- Chartist Plugin -->
|
||||
<script src="public/assets/js/plugins/chartist.min.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/plugins/chartist.min.js"></script>
|
||||
<!-- Notifications Plugin -->
|
||||
<script src="public/assets/js/plugins/bootstrap-notify.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/plugins/bootstrap-notify.js"></script>
|
||||
<!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc -->
|
||||
<script src="public/assets/js/light-bootstrap-dashboard.js?v=2.0.0 " type="text/javascript"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/light-bootstrap-dashboard.js?v=2.0.0 " type="text/javascript"></script>
|
||||
<!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
|
||||
<script src="public/assets/js/demo.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/demo.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Javascript method's body can be found in assets/js/demos.js
|
||||
@ -446,13 +382,13 @@ $(document).ready(function(){
|
||||
</script>
|
||||
|
||||
<!-- Jquery JS-->
|
||||
<script src="public/assets/vendor copy/jquery/jquery.min.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/vendor copy/jquery/jquery.min.js"></script>
|
||||
<!-- Vendor JS-->
|
||||
<script src="public/assets/vendor copy/select2/select2.min.js"></script>
|
||||
<script src="public/assets/vendor copy/datepicker/moment.min.js"></script>
|
||||
<script src="public/assets/vendor copy/datepicker/daterangepicker.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/vendor copy/select2/select2.min.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/vendor copy/datepicker/moment.min.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/vendor copy/datepicker/daterangepicker.js"></script>
|
||||
|
||||
<!-- Main JS-->
|
||||
<script src="public/assets/js/global.js"></script>
|
||||
<script src="<?= base_url() ?>/public/assets/js/global.js"></script>
|
||||
</html>
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ $(document).ready(function(){
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="Colorlib Templates">
|
||||
@ -165,22 +166,21 @@
|
||||
<h4 class="title">Donar List</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="content table-responsive table-full-width">
|
||||
|
||||
<table class="table table-bordered table-sm ">
|
||||
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Phone</th>
|
||||
<th > Email</th>
|
||||
<th> Pan </th>
|
||||
<th> Address</th>
|
||||
<th> DOB</th>
|
||||
<th> Gender</th>
|
||||
<th> Org Name</th>
|
||||
<th> GSTIN</th>
|
||||
<th> Action</th>
|
||||
</tr>
|
||||
<table class="table table-bordered table-sm ">
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Phone</th>
|
||||
<th > Email</th>
|
||||
<th> Pan </th>
|
||||
<th> Address</th>
|
||||
<th> DOB</th>
|
||||
<th> Gender</th>
|
||||
<th> Org Name</th>
|
||||
<th> GSTIN</th>
|
||||
<th> Action</th>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($receiptdata as $row)
|
||||
{ ?>
|
||||
@ -189,12 +189,13 @@
|
||||
<td><?php echo $row['phone'];?></td>
|
||||
<td ><?php echo $row['email'];?></td>
|
||||
<td><?php echo $row['pan'];?></td>
|
||||
<td><?php echo $row['address'];?></td>
|
||||
<td><?php echo $row['address'];?>,<?php echo $row['city'];?>,<?php echo $row['state'];?>,<?php echo $row['country'];?>.</td>
|
||||
<td><?php echo $row['date_of_birth'];?></td>
|
||||
<td><?php echo $row['gender'];?></td>
|
||||
<td><?php echo $row['org_name'];?></td>
|
||||
<td><?php echo $row['gstin'];?></td>
|
||||
<td><a href="<?= base_url() ?>/<?php echo $row['id'];?>">Edit</a></td>
|
||||
<td><center><a href="<?= base_url() ?>/edit_donor/<?php echo $row['id'];?>"><button >Edit</button></a></center></td>
|
||||
<td style="display:none;"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -212,7 +213,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<!-- Core JS Files -->
|
||||
@ -241,13 +242,5 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Jquery JS-->
|
||||
<script src="public/assets/vendor copy/jquery/jquery.min.js"></script>
|
||||
<!-- Vendor JS-->
|
||||
<script src="public/assets/vendor copy/select2/select2.min.js"></script>
|
||||
<script src="public/assets/vendor copy/datepicker/moment.min.js"></script>
|
||||
<script src="public/assets/vendor copy/datepicker/daterangepicker.js"></script>
|
||||
|
||||
<!-- Main JS-->
|
||||
<script src="public/assets/js/global.js"></script>
|
||||
|
||||
</html>
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
<style>
|
||||
table {
|
||||
|
||||
width: 80% ;
|
||||
}
|
||||
td {
|
||||
width: 25% ;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>Donors List</h2>
|
||||
</div></div></br>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<table class="table table-bordered" id="dataTable" cellspacing="0">
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Phone</th>
|
||||
<th > Email</th>
|
||||
<th> Pan </th>
|
||||
<th> Address</th>
|
||||
<th> DOB</th>
|
||||
<th> Gender</th>
|
||||
<th> Org Name</th>
|
||||
<th> GSTIN</th>
|
||||
<th> Action</th>
|
||||
|
||||
</tr>
|
||||
<?php foreach ($receiptdata as $row)
|
||||
{ ?>
|
||||
<tr>
|
||||
<td><?php echo $row['name'];?></td>
|
||||
<td><?php echo $row['phone'];?></td>
|
||||
<td ><?php echo $row['email'];?></td>
|
||||
<td><?php echo $row['pan'];?></td>
|
||||
<td><?php echo $row['address'];?></td>
|
||||
<td><?php echo $row['date_of_birth'];?></td>
|
||||
<td><?php echo $row['gender'];?></td>
|
||||
<td><?php echo $row['org_name'];?></td>
|
||||
<td><?php echo $row['gstin'];?></td>
|
||||
<td><a href="<?= base_url() ?>/My_controller/edit_donor/<?php echo $row['id'];?>">Edit</a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -91,13 +91,13 @@
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 1px solid #000000;
|
||||
width: 71%;
|
||||
width: 74%;
|
||||
}
|
||||
.cause{
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 1px solid #000000;
|
||||
width: 58%;
|
||||
width: 61%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -109,7 +109,8 @@
|
||||
<tr>
|
||||
<td class="first">
|
||||
</br>
|
||||
<center> <img src="<?=base_url()?>/public/assets/logo.png" alt="Girl in a jacket" width="100" height="100"></center> </br>
|
||||
<center> <img src="<?= base_url() ?>/public/assets/uploads/logo2.png" alt="Girl in a jacket" width="100" height="100"></center> </br>
|
||||
|
||||
<center> <h3><?= $admindata['org_name'] ?></h3></center>
|
||||
<center> <?= $admindata['address'] ?>,<?= $admindata['city'] ?>,</center>
|
||||
<center> <?= $admindata['state'] ?>-<?= $admindata['pin_code'] ?>.</center>
|
||||
@ -118,11 +119,11 @@
|
||||
</td>
|
||||
|
||||
<td class="secend">
|
||||
<center> <h3>Donation Receipt</h3></center></br>
|
||||
<center> <h2>Donation Receipt</h2></center></br>
|
||||
Date : <input type="text" class="date" value="<?= $receipt['date'] ?>" readonly>
|
||||
|
||||
|
||||
Receipt No : <input type="text" class="receiptno" value=" <?= $receipt['receipt_id'] ?>" readonly> </br></br>
|
||||
Receipt No : <input type="text" class="receiptno" value=" <?= $receipt['receipt_id'] ?>" readonly> </br></br>
|
||||
Donated by : <input type="text" class="donatedby" value=" <?= $donordata['name'] ?>" readonly></br>
|
||||
Street Address : <input type="text" class="address" value=" <?= $donordata['address'] ?>" readonly> </br>
|
||||
City :
|
||||
@ -134,13 +135,58 @@ Amount Received By Charity :
|
||||
|
||||
Amount in Words :
|
||||
<!-- call the function here -->
|
||||
<?php $amt_words= $receipt['amount'];
|
||||
// nummeric value in variable
|
||||
$get_amount= numberTowords($amt_words);
|
||||
?><input type="text" class="amtinword" value="<?= $get_amount ?>" readonly> </br>
|
||||
<?php
|
||||
|
||||
$number = $receipt['amount'];
|
||||
$no = floor($number);
|
||||
$point = round($number - $no, 2) * 100;
|
||||
$hundred = null;
|
||||
$digits_1 = strlen($no);
|
||||
$i = 0;
|
||||
$str = array();
|
||||
$words = array('0' => '', '1' => 'one', '2' => 'two',
|
||||
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six',
|
||||
'7' => 'seven', '8' => 'eight', '9' => 'nine',
|
||||
'10' => 'ten', '11' => 'eleven', '12' => 'twelve',
|
||||
'13' => 'thirteen', '14' => 'fourteen',
|
||||
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
|
||||
'18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',
|
||||
'30' => 'thirty', '40' => 'forty', '50' => 'fifty',
|
||||
'60' => 'sixty', '70' => 'seventy',
|
||||
'80' => 'eighty', '90' => 'ninety');
|
||||
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
|
||||
while ($i < $digits_1) {
|
||||
$divider = ($i == 2) ? 10 : 100;
|
||||
$number = floor($no % $divider);
|
||||
$no = floor($no / $divider);
|
||||
$i += ($divider == 10) ? 1 : 2;
|
||||
if ($number) {
|
||||
$plural = (($counter = count($str)) && $number > 9) ? 's' : null;
|
||||
$hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
|
||||
$str [] = ($number < 21) ? $words[$number] .
|
||||
" " . $digits[$counter] . $plural . " " . $hundred
|
||||
:
|
||||
$words[floor($number / 10) * 10]
|
||||
. " " . $words[$number % 10] . " "
|
||||
. $digits[$counter] . $plural . " " . $hundred;
|
||||
} else $str[] = null;
|
||||
}
|
||||
$str = array_reverse($str);
|
||||
$result = implode('', $str);
|
||||
$points = ($point) ?
|
||||
"." . $words[$point / 10] . " " .
|
||||
$words[$point = $point % 10] : '';
|
||||
$get_amount = $result . "Rupees " . $points;
|
||||
?>
|
||||
<input type="text" class="amtinword" value="<?= $get_amount ?>" readonly> </br>
|
||||
Discription of Donation :
|
||||
<input type="text" class="cause" value="<?= $causedata['cause_name']; ?>" readonly></br></br>
|
||||
Authorized Signature :
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Authorized Signature : <img src="<?=base_url()?>/<?=$admindata['signature']?>.png" alt="Girl in a jacket" width="170" height="36">
|
||||
</br></br>
|
||||
<center class="mailfont">"Thank You For Your Donation"</center>
|
||||
</td>
|
||||
@ -150,134 +196,3 @@ Authorized Signature :
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
// Create a function for converting the amount in words
|
||||
function AmountInWords(float $amount)
|
||||
{
|
||||
$amount_after_decimal = round($amount - ($num = floor($amount)), 2) * 100;
|
||||
// Check if there is any number after decimal
|
||||
$amt_hundred = null;
|
||||
$count_length = strlen($num);
|
||||
$x = 0;
|
||||
$string = array();
|
||||
$change_words = array(0 => '', 1 => 'One', 2 => 'Two',
|
||||
3 => 'Three', 4 => 'Four', 5 => 'Five', 6 => 'Six',
|
||||
7 => 'Seven', 8 => 'Eight', 9 => 'Nine',
|
||||
10 => 'Ten', 11 => 'Eleven', 12 => 'Twelve',
|
||||
13 => 'Thirteen', 14 => 'Fourteen', 15 => 'Fifteen',
|
||||
16 => 'Sixteen', 17 => 'Seventeen', 18 => 'Eighteen',
|
||||
19 => 'Nineteen', 20 => 'Twenty', 30 => 'Thirty',
|
||||
40 => 'Forty', 50 => 'Fifty', 60 => 'Sixty',
|
||||
70 => 'Seventy', 80 => 'Eighty', 90 => 'Ninety');
|
||||
$here_digits = array('', 'Hundred','Thousand','Lakh', 'Crore');
|
||||
while( $x < $count_length ) {
|
||||
$get_divider = ($x == 2) ? 10 : 100;
|
||||
$amount = floor($num % $get_divider);
|
||||
$num = floor($num / $get_divider);
|
||||
$x += $get_divider == 10 ? 1 : 2;
|
||||
if ($amount) {
|
||||
$add_plural = (($counter = count($string)) && $amount > 9) ? 's' : null;
|
||||
$amt_hundred = ($counter == 1 && $string[0]) ? ' and ' : null;
|
||||
$string [] = ($amount < 21) ? $change_words[$amount].' '. $here_digits[$counter]. $add_plural.'
|
||||
'.$amt_hundred:$change_words[floor($amount / 10) * 10].' '.$change_words[$amount % 10]. '
|
||||
'.$here_digits[$counter].$add_plural.' '.$amt_hundred;
|
||||
}
|
||||
else $string[] = null;
|
||||
}
|
||||
$implode_to_Rupees = implode('', array_reverse($string));
|
||||
$get_paise = ($amount_after_decimal > 0) ? "And " . ($change_words[$amount_after_decimal / 10] . "
|
||||
" . $change_words[$amount_after_decimal % 10]) . ' Paise' : '';
|
||||
return ($implode_to_Rupees ? $implode_to_Rupees . 'Rupees ' : '') . $get_paise;
|
||||
}?>
|
||||
|
||||
<?php
|
||||
function numberTowords($num)
|
||||
{
|
||||
|
||||
$ones = array(
|
||||
0 =>"ZERO",
|
||||
1 => "ONE",
|
||||
2 => "TWO",
|
||||
3 => "THREE",
|
||||
4 => "FOUR",
|
||||
5 => "FIVE",
|
||||
6 => "SIX",
|
||||
7 => "SEVEN",
|
||||
8 => "EIGHT",
|
||||
9 => "NINE",
|
||||
10 => "TEN",
|
||||
11 => "ELEVEN",
|
||||
12 => "TWELVE",
|
||||
13 => "THIRTEEN",
|
||||
14 => "FOURTEEN",
|
||||
15 => "FIFTEEN",
|
||||
16 => "SIXTEEN",
|
||||
17 => "SEVENTEEN",
|
||||
18 => "EIGHTEEN",
|
||||
19 => "NINETEEN",
|
||||
"014" => "FOURTEEN"
|
||||
);
|
||||
$tens = array(
|
||||
0 => "ZERO",
|
||||
1 => "TEN",
|
||||
2 => "TWENTY",
|
||||
3 => "THIRTY",
|
||||
4 => "FORTY",
|
||||
5 => "FIFTY",
|
||||
6 => "SIXTY",
|
||||
7 => "SEVENTY",
|
||||
8 => "EIGHTY",
|
||||
9 => "NINETY"
|
||||
);
|
||||
$hundreds = array(
|
||||
"HUNDRED",
|
||||
"THOUSAND",
|
||||
"MILLION",
|
||||
"BILLION",
|
||||
"TRILLION",
|
||||
"QUARDRILLION"
|
||||
); /*limit t quadrillion */
|
||||
$num = number_format($num,2,".",",");
|
||||
$num_arr = explode(".",$num);
|
||||
$wholenum = $num_arr[0];
|
||||
$decnum = $num_arr[1];
|
||||
$whole_arr = array_reverse(explode(",",$wholenum));
|
||||
krsort($whole_arr,1);
|
||||
$rettxt = "";
|
||||
foreach($whole_arr as $key => $i){
|
||||
|
||||
while(substr($i,0,1)=="0")
|
||||
$i=substr($i,1,5);
|
||||
if($i < 20){
|
||||
/* echo "getting:".$i; */
|
||||
$rettxt .= $ones[$i];
|
||||
}elseif($i < 100){
|
||||
if(substr($i,0,1)!="0") $rettxt .= $tens[substr($i,0,1)];
|
||||
if(substr($i,1,1)!="0") $rettxt .= " ".$ones[substr($i,1,1)];
|
||||
}else{
|
||||
if(substr($i,0,1)!="0") $rettxt .= $ones[substr($i,0,1)]." ".$hundreds[0];
|
||||
if(substr($i,1,1)!="0")$rettxt .= " ".$tens[substr($i,1,1)];
|
||||
if(substr($i,2,1)!="0")$rettxt .= " ".$ones[substr($i,2,1)];
|
||||
}
|
||||
if($key > 0){
|
||||
$rettxt .= " ".$hundreds[$key]." ";
|
||||
}
|
||||
}
|
||||
if($decnum > 0){
|
||||
$rettxt .= " and ";
|
||||
if($decnum < 20){
|
||||
$rettxt .= $ones[$decnum];
|
||||
}elseif($decnum < 100){
|
||||
$rettxt .= $tens[substr($decnum,0,1)];
|
||||
$rettxt .= " ".$ones[substr($decnum,1,1)];
|
||||
}
|
||||
}
|
||||
return $rettxt;
|
||||
}
|
||||
extract($_POST);
|
||||
if(isset($convert))
|
||||
{
|
||||
echo "<p align=''>".numberTowords("$num")."</p>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
|
||||
<div class="text-center p-t-90">
|
||||
<a class="txt1" href="<?= base_url()."/register"; ?>">
|
||||
<a class="txt1" href="<?= base_url()."/signup"; ?>">
|
||||
Don't have an account yet ? Signup
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<h4>Mobile:<?= $userdata->phone;?></h4></br>
|
||||
<h4>Email :<?= $userdata->email;?></h4></br>
|
||||
<h4>Organization Name :<?= $userdata->org_name;?></h4></br>
|
||||
<a href="<?= base_url()?>/Sendmail/Mail_to_donor">send mail</a>
|
||||
|
||||
<h4></h4></br>
|
||||
</div>
|
||||
</div>
|
||||
@ -157,7 +157,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
@ -275,20 +275,13 @@
|
||||
<div class="hover-btn">
|
||||
|
||||
<div class="wrapper wrapper--w790">
|
||||
<div class="row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button type="button" class="btn btn-info " style="background-color: crimson; width: 160px; padding: 0px; line-height: 40px;">Edit Receipt</button>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button type="button" class="btn btn-info "style="background-color: green; width: 160px; padding: 0px; line-height: 40px;">Download</button>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button type="button" class="btn btn-info " style="background-color: orange; width: 160px; padding: 0px; line-height: 40px;">Send Mail</button>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button type="button" class="btn btn-info "style="background-color: blue; width: 160px; padding: 0px; line-height: 40px;">Exit</button>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<a href="<?= base_url() ?>/edit_receipt/<?= $receipt['receipt_id'] ?>"><button type="button" class="btn btn-info " style="background-color: crimson; width: 160px; padding: 0px; line-height: 40px;">Edit Receipt</button></a>
|
||||
<a href="<?= base_url() ?>/PdfController/download_receipt/<?= $receipt['receipt_id'] ?>"><button type="button" class="btn btn-info "style="background-color: green; width: 160px; padding: 0px; line-height: 40px;">Download</button></a>
|
||||
<a href="<?= base_url() ?>/Send_mail/<?= $receipt['receipt_id'] ?>"><button type="button" class="btn btn-info " style="background-color: orange; width: 160px; padding: 0px; line-height: 40px;">Send Mail</button></a>
|
||||
<a href="<?= base_url() ?>/all_receipt"><button type="button" class="btn btn-info "style="background-color: blue; width: 160px; padding: 0px; line-height: 40px;">Exit</button></a>
|
||||
|
||||
</center>
|
||||
|
||||
<div class="invoice-box">
|
||||
<div class="row">
|
||||
@ -317,12 +310,55 @@ Pin : <input type="text" class="pincode" value="<?= $donordata['pin_code']
|
||||
Amount Received By Charity :
|
||||
<input type="text" class="amt" value=" <?= $receipt['amount'] ?>" readonly></br>
|
||||
|
||||
Amount in Words :
|
||||
|
||||
Amount in Words :
|
||||
<!-- call the function here -->
|
||||
<?php $amt_words= $receipt['amount'];
|
||||
// nummeric value in variable
|
||||
$get_amount= numberTowords($amt_words);
|
||||
?><input type="text" class="amtinword" value="<?= $get_amount ?>" readonly> </br>
|
||||
<?php
|
||||
|
||||
$number = $receipt['amount'];
|
||||
$no = floor($number);
|
||||
$point = round($number - $no, 2) * 100;
|
||||
$hundred = null;
|
||||
$digits_1 = strlen($no);
|
||||
$i = 0;
|
||||
$str = array();
|
||||
$words = array('0' => '', '1' => 'one', '2' => 'two',
|
||||
'3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six',
|
||||
'7' => 'seven', '8' => 'eight', '9' => 'nine',
|
||||
'10' => 'ten', '11' => 'eleven', '12' => 'twelve',
|
||||
'13' => 'thirteen', '14' => 'fourteen',
|
||||
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
|
||||
'18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',
|
||||
'30' => 'thirty', '40' => 'forty', '50' => 'fifty',
|
||||
'60' => 'sixty', '70' => 'seventy',
|
||||
'80' => 'eighty', '90' => 'ninety');
|
||||
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
|
||||
while ($i < $digits_1) {
|
||||
$divider = ($i == 2) ? 10 : 100;
|
||||
$number = floor($no % $divider);
|
||||
$no = floor($no / $divider);
|
||||
$i += ($divider == 10) ? 1 : 2;
|
||||
if ($number) {
|
||||
$plural = (($counter = count($str)) && $number > 9) ? 's' : null;
|
||||
$hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
|
||||
$str [] = ($number < 21) ? $words[$number] .
|
||||
" " . $digits[$counter] . $plural . " " . $hundred
|
||||
:
|
||||
$words[floor($number / 10) * 10]
|
||||
. " " . $words[$number % 10] . " "
|
||||
. $digits[$counter] . $plural . " " . $hundred;
|
||||
} else $str[] = null;
|
||||
}
|
||||
$str = array_reverse($str);
|
||||
$result = implode('', $str);
|
||||
$points = ($point) ?
|
||||
"." . $words[$point / 10] . " " .
|
||||
$words[$point = $point % 10] : '';
|
||||
$get_amount = $result . "Rupees " . $points;
|
||||
?>
|
||||
<input type="text" class="amtinword" value="<?= $get_amount ?>" readonly> </br>
|
||||
|
||||
|
||||
Discription of Donation :
|
||||
<input type="text" class="cause" value="<?= $causedata['cause_name']; ?>" readonly></br></br></br>
|
||||
Authorized Signature : <img src="<?=base_url()?>/<?=$admindata['signature']?>.png" alt="Girl in a jacket" width="200" height="40">
|
||||
@ -367,93 +403,3 @@ Authorized Signature : <img src="<?=base_url()?>/<?=$adm
|
||||
</script>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
function numberTowords($num)
|
||||
{
|
||||
|
||||
$ones = array(
|
||||
0 =>"ZERO",
|
||||
1 => "ONE",
|
||||
2 => "TWO",
|
||||
3 => "THREE",
|
||||
4 => "FOUR",
|
||||
5 => "FIVE",
|
||||
6 => "SIX",
|
||||
7 => "SEVEN",
|
||||
8 => "EIGHT",
|
||||
9 => "NINE",
|
||||
10 => "TEN",
|
||||
11 => "ELEVEN",
|
||||
12 => "TWELVE",
|
||||
13 => "THIRTEEN",
|
||||
14 => "FOURTEEN",
|
||||
15 => "FIFTEEN",
|
||||
16 => "SIXTEEN",
|
||||
17 => "SEVENTEEN",
|
||||
18 => "EIGHTEEN",
|
||||
19 => "NINETEEN",
|
||||
"014" => "FOURTEEN"
|
||||
);
|
||||
$tens = array(
|
||||
0 => "ZERO",
|
||||
1 => "TEN",
|
||||
2 => "TWENTY",
|
||||
3 => "THIRTY",
|
||||
4 => "FORTY",
|
||||
5 => "FIFTY",
|
||||
6 => "SIXTY",
|
||||
7 => "SEVENTY",
|
||||
8 => "EIGHTY",
|
||||
9 => "NINETY"
|
||||
);
|
||||
$hundreds = array(
|
||||
"HUNDRED",
|
||||
"THOUSAND",
|
||||
"MILLION",
|
||||
"BILLION",
|
||||
"TRILLION",
|
||||
"QUARDRILLION"
|
||||
); /*limit t quadrillion */
|
||||
$num = number_format($num,2,".",",");
|
||||
$num_arr = explode(".",$num);
|
||||
$wholenum = $num_arr[0];
|
||||
$decnum = $num_arr[1];
|
||||
$whole_arr = array_reverse(explode(",",$wholenum));
|
||||
krsort($whole_arr,1);
|
||||
$rettxt = "";
|
||||
foreach($whole_arr as $key => $i){
|
||||
|
||||
while(substr($i,0,1)=="0")
|
||||
$i=substr($i,1,5);
|
||||
if($i < 20){
|
||||
/* echo "getting:".$i; */
|
||||
$rettxt .= $ones[$i];
|
||||
}elseif($i < 100){
|
||||
if(substr($i,0,1)!="0") $rettxt .= $tens[substr($i,0,1)];
|
||||
if(substr($i,1,1)!="0") $rettxt .= " ".$ones[substr($i,1,1)];
|
||||
}else{
|
||||
if(substr($i,0,1)!="0") $rettxt .= $ones[substr($i,0,1)]." ".$hundreds[0];
|
||||
if(substr($i,1,1)!="0")$rettxt .= " ".$tens[substr($i,1,1)];
|
||||
if(substr($i,2,1)!="0")$rettxt .= " ".$ones[substr($i,2,1)];
|
||||
}
|
||||
if($key > 0){
|
||||
$rettxt .= " ".$hundreds[$key]." ";
|
||||
}
|
||||
}
|
||||
if($decnum > 0){
|
||||
$rettxt .= " and ";
|
||||
if($decnum < 20){
|
||||
$rettxt .= $ones[$decnum];
|
||||
}elseif($decnum < 100){
|
||||
$rettxt .= $tens[substr($decnum,0,1)];
|
||||
$rettxt .= " ".$ones[substr($decnum,1,1)];
|
||||
}
|
||||
}
|
||||
return $rettxt;
|
||||
}
|
||||
extract($_POST);
|
||||
if(isset($convert))
|
||||
{
|
||||
echo "<p align=''>".numberTowords("$num")."</p>";
|
||||
}
|
||||
?>
|
||||
@ -179,7 +179,7 @@ $(document).ready(function(){
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
@ -263,7 +263,7 @@ $(document).ready(function(){
|
||||
<div class="contact100-form-checkbox">
|
||||
<input class="input-checkbox100" id="ckb1" type="checkbox" name="remember-me">
|
||||
<label class="label-checkbox100" for="ckb1">
|
||||
<a href="<?= base_url()."/"; ?>">Already have an account</a>
|
||||
<a class="txt1" href="<?= base_url()."/"; ?>">Already have an account</a>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
@ -355,6 +355,7 @@ body {
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(function () {
|
||||
$('#txtDate').datepicker({
|
||||
format: "dd/mm/yyyy"
|
||||
@ -364,7 +365,7 @@ body {
|
||||
$('#txtDate2').datepicker({
|
||||
format: "dd/mm/yyyy"
|
||||
});
|
||||
});
|
||||
}); });
|
||||
</script>
|
||||
<!-- Bootstrap DatePicker End-->
|
||||
<script>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link">
|
||||
<a href="<?= base_url() ?>/logout" class="nav-link">
|
||||
|
||||
<span class="d-lg-block"> Logout</span>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
BIN
public/assets/uploads/logo2.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB |
1
writable/debugbar/debugbar_1609523602.json
Normal file
1
writable/debugbar/debugbar_1609523633.json
Normal file
1
writable/debugbar/debugbar_1609524459.json
Normal file
1
writable/debugbar/debugbar_1609524555.json
Normal file
1
writable/debugbar/debugbar_1609524635.json
Normal file
1
writable/debugbar/debugbar_1609524708.json
Normal file
1
writable/debugbar/debugbar_1609524740.json
Normal file
1
writable/debugbar/debugbar_1609524774.json
Normal file
1
writable/debugbar/debugbar_1609524803.json
Normal file
1
writable/debugbar/debugbar_1609524848.json
Normal file
1
writable/debugbar/debugbar_1609524879.json
Normal file
1
writable/debugbar/debugbar_1609524966.json
Normal file
1
writable/debugbar/debugbar_1609524995.json
Normal file
1
writable/debugbar/debugbar_1609525038.json
Normal file
1
writable/debugbar/debugbar_1609525069.json
Normal file
1
writable/debugbar/debugbar_1609525100.json
Normal file
1
writable/debugbar/debugbar_1609525128.json
Normal file
1
writable/debugbar/debugbar_1609525220.json
Normal file
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1609321965;_ci_previous_url|s:40:"http://localhost/donation/view_receipt/6";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1609310163;_ci_previous_url|s:35:"http://localhost/donation/dashboard";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1607342249;_ci_previous_url|s:26:"http://localhost/donation/";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1608562236;_ci_previous_url|s:47:"http://localhost/donation/dashboard/transaction";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1607935660;_ci_previous_url|s:34:"http://localhost/donation/register";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1607943803;_ci_previous_url|s:35:"http://localhost/donation/Dashboard";logged_user|s:1:"3";
|
||||
@ -0,0 +1 @@
|
||||
__ci_last_regenerate|i:1609522591;_ci_previous_url|s:58:"http://localhost/donation/PdfController/download_receipt/8";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1608553806;_ci_previous_url|s:47:"http://localhost/donation/dashboard/transaction";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1607342565;_ci_previous_url|s:54:"http://localhost/donation/My_controller/donor_register";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1608266540;_ci_previous_url|s:35:"http://localhost/donation/Dashboard";logged_user|s:1:"3";
|
||||
@ -1 +0,0 @@
|
||||
__ci_last_regenerate|i:1608282100;_ci_previous_url|s:44:"http://localhost/donation/dashboard/receipts";logged_user|s:1:"3";
|
||||