add changes
This commit is contained in:
parent
a155a32932
commit
f40834532f
@ -1,111 +0,0 @@
|
||||
<?php
|
||||
include('includes/config/config.php');
|
||||
include('includes/auth/auth.php');
|
||||
include('includes/functions.php');include('access.php');
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
?>
|
||||
<?php
|
||||
|
||||
// Connect to mysqli database
|
||||
$page = 1; // The current page
|
||||
$sortname = 'year'; // Sort column
|
||||
$sortorder = 'desc'; // Sort order
|
||||
$qtype = ''; // Search column
|
||||
$query = ''; // Search string
|
||||
// Get posted data
|
||||
if (isset($_POST['page'])) {
|
||||
$page = mysqli_real_escape_string($conn,$_POST['page']);
|
||||
}
|
||||
if (isset($_POST['sortname'])) {
|
||||
$sortname = mysqli_real_escape_string($conn,$_POST['sortname']);
|
||||
}
|
||||
if (isset($_POST['sortorder'])) {
|
||||
$sortorder = mysqli_real_escape_string($conn,$_POST['sortorder']);
|
||||
}
|
||||
if (isset($_POST['qtype'])) {
|
||||
$qtype = mysqli_real_escape_string($conn,$_POST['qtype']);
|
||||
}
|
||||
if (isset($_POST['query'])) {
|
||||
$query = mysqli_real_escape_string($conn,$_POST['query']);
|
||||
}
|
||||
if (isset($_POST['rp'])) {
|
||||
$rp = mysqli_real_escape_string($conn,$_POST['rp']);
|
||||
}
|
||||
// Setup sort and search SQL using posted data
|
||||
|
||||
$hasReadAccess = isAccessible($_SESSION['RoleId'],$menu_key,'R');
|
||||
$hasWriteAccess = isAccessible($_SESSION['RoleId'],$menu_key,'W');
|
||||
$hasExecuteAccess = isAccessible($_SESSION['RoleId'],$menu_key,'E');
|
||||
|
||||
$sortSql = "order by $sortname $sortorder";
|
||||
$searchSql = ($qtype != '' && $query != '') ? "where upper($qtype) like upper('%$query%')" : '';
|
||||
// Get total count of records
|
||||
$sql = "select count(*) from csr_plan $searchSql";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
$row = mysqli_fetch_array($result);
|
||||
$total = $row[0];
|
||||
// Setup paging
|
||||
if(!isSet($rp)){
|
||||
$rp=10;
|
||||
}
|
||||
$pageStart = ($page-1)*$rp;
|
||||
$limitSql = "limit $pageStart, $rp";
|
||||
// Return JSON data
|
||||
$data = array();
|
||||
$data['page'] = $page;
|
||||
$data['total'] = $total;
|
||||
$data['rows'] = array();
|
||||
$sql_config = "SELECT * from csr_plan $searchSql $sortSql $limitSql";
|
||||
error_log($sql_config);
|
||||
//echo $sql_config;
|
||||
$results_config = mysqli_query($conn,$sql_config);
|
||||
$count=($page-1)*$rp+1;
|
||||
|
||||
//echo $sql_config;
|
||||
//echo $access_level;
|
||||
|
||||
while ($row_config = mysqli_fetch_assoc($results_config)) {
|
||||
|
||||
$csr_id=$row_config['plan_id'];
|
||||
error_log("ID " . $csr_id);
|
||||
//echo $csr_id;
|
||||
$view_link="";
|
||||
$edit_link="";
|
||||
$delete_link="";
|
||||
$achiev_link='';
|
||||
$links="";
|
||||
if($hasReadAccess )
|
||||
{
|
||||
$view_link="<a href=\"#\"class=\"grey\" onclick=\"open_csr('".$csr_id."','V');\"><i class=\"ace-icon fa fa-eye bigger-130\"></i></a>";
|
||||
// $pdf_link="<a href=\"#\"class=\"red\" onclick=\"pdf_csr('".$csr_id."');\"><i class=\"ace-icon fa fa-file-pdf-o bigger-130\"></i></a>";
|
||||
}
|
||||
|
||||
if($hasWriteAccess)
|
||||
{
|
||||
$edit_link="<a href=\"#\" title='Add Target' class=\"blue\" onclick=\"open_csr('".$csr_id."','E');\"><i class=\"ace-icon fa fa-edit bigger-130\"></i></a>";
|
||||
$achiev_link="<a href=\"#\" class=\"red\" title='Add Achievements' onclick=\"open_ach_csr('".$csr_id."','E');\"><i class=\"ace-icon fa fa-plus bigger-130\"></i></a>";
|
||||
}
|
||||
if($hasExecuteAccess )
|
||||
{
|
||||
$delete_link="<a href=\"#\" class=\"red\" onclick=\"delete_csr('".$csr_id."');\"><i class=\"ace-icon fa fa-trash-o bigger-130\"></i></a>";
|
||||
}
|
||||
$space=" ";
|
||||
$type='CSR Program';
|
||||
if($row_config['participate_type']=='TRA'){
|
||||
$type='Training Program';
|
||||
}
|
||||
$creater_uid=$row_config['creater'];
|
||||
$creater_id=getTableFieldValue('tbl_users','emp_id','user_id',$creater_uid);
|
||||
$creater=getTableFieldValue('patient_master','patient_name','id',$creater_id);
|
||||
|
||||
$links = $assign_link.$space.$view_link.$space.$edit_link.$space.$achiev_link.$space.$delete_link.$space.$pdf_link;
|
||||
|
||||
$data['rows'][] = array(
|
||||
'id' => $row_config['csr_id'],
|
||||
'cell' => array($links ,$count++,$row_config['year']
|
||||
// $row_config['start_date_time'],$row_config['end_date_time'],
|
||||
,$row_config['total_budget'],$row_config['target_beneficiary_count'],$creater, $row_config['status'],$row_config['remarks'])
|
||||
);
|
||||
}
|
||||
echo json_encode($data);
|
||||
?>
|
||||
BIN
.svn/wc.db
BIN
.svn/wc.db
Binary file not shown.
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"git.enableSmartCommit": true
|
||||
}
|
||||
@ -6,7 +6,7 @@ include_once('includes/functions.php');
|
||||
//$menu_key=$_SESSION['menu_key'];
|
||||
$menu_key=$_SESSION['menu_key'] ?? $_REQUEST['menu_key'] ?? null;
|
||||
$Role_id = $_SESSION['RoleId'] ?? null;
|
||||
$access_level=getaccesslevel($RoleId ,$menu_key);
|
||||
$access_level=getaccesslevel($Role_Id ,$menu_key);
|
||||
$_SESSION['access_key']=$access_level;
|
||||
//echo "aceess======".$access_level;
|
||||
if( !empty(isset($__currentPage)) && (strripos($__currentPage,"interim",5)>=0 || strripos($__currentPage,"review_ohc_selection")>=0 )){
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
|
||||
|
||||
</select>
|
||||
<!-- <input class="form-control" type="text" name="batch" id="batch" value='<?php echo $row['procurement_refno'] ?>' /> -->
|
||||
<input type="hidden" name="procurement_id" id="procurement_id" value="<?php echo $_REQUEST['flex_procurement_id'] ?>">
|
||||
<!-- <input class="form-control" type="text" name="batch" id="batch" value='<?php echo isset($row['procurement_refno']) ?>' /> -->
|
||||
<input type="hidden" name="procurement_id" id="procurement_id" value="<?php echo isset($_REQUEST['flex_procurement_id']) ? $_REQUEST['flex_procurement_id'] : ''; ?>">
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label>Batch <span style="color:red">*</span></label>
|
||||
|
||||
@ -120,11 +120,13 @@ while ($row_patient_master = mysqli_fetch_assoc($result_beneficiary)) {
|
||||
|
||||
$aadhar_card = $row_patient_master['aadhar_card'];
|
||||
$last_four_digits = substr($aadhar_card, -4);
|
||||
$masked_aadhar_card = str_repeat('*', strlen($aadhar_card) - 4) . $last_four_digits;
|
||||
//$masked_aadhar_card = str_repeat('*', strlen($aadhar_card) - 4) . $last_four_digits;
|
||||
$masked_aadhar_card = str_repeat('*', max(0, strlen($aadhar_card) - 4)) . substr($aadhar_card, -4);
|
||||
|
||||
$phone_number = $row_patient_master['aadhar_phone'];
|
||||
$last_four_digits = substr($phone_number, -4);
|
||||
$aadhar_phone = str_repeat('*', strlen($phone_number) - 4) . $last_four_digits;
|
||||
//$aadhar_phone = str_repeat('*', strlen($phone_number) - 4) . $last_four_digits;
|
||||
$aadhar_phone = str_repeat('*', max(0, strlen($phone_number) - 4)) . substr($phone_number, -4);
|
||||
|
||||
// Output dikhana
|
||||
|
||||
|
||||
@ -66,8 +66,11 @@ if (!$conn) {
|
||||
|
||||
|
||||
// @session_start();
|
||||
if( ! $_SESSION)
|
||||
{
|
||||
// if( ! $_SESSION)
|
||||
// {
|
||||
// session_start();
|
||||
// }
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
|
||||
9943
log-file.log
9943
log-file.log
File diff suppressed because it is too large
Load Diff
@ -44,14 +44,23 @@ if (!isset($_SESSION['RoleCode']) || ($_SESSION['RoleCode'] != "STR" && $_SESSIO
|
||||
$date = date('Y-m-d', strtotime('-' . $days . ' days'));
|
||||
|
||||
|
||||
$f_sql = "select * from placement_records where placement_date < '$date' AND ohc_type_id = '$ohc_type' status = 'Placed'";
|
||||
error_log('query: 19: ' . $f_sql);
|
||||
$f_result = mysqli_query($conn, $f_sql);
|
||||
while ($f_row = mysqli_fetch_assoc($f_result)) {
|
||||
$f_sql = "select * from placement_feedback where placement_date < '$date' AND ohc_type_id = '$ohc_type' status = 'Placed'";
|
||||
$f_sql = "SELECT * FROM placement_records WHERE placement_date < '$date' AND ohc_type_id = '$ohc_type' AND status = 'Placed'";
|
||||
error_log('query: 19: ' . $f_sql);
|
||||
|
||||
$f_result = mysqli_query($conn, $f_sql);
|
||||
|
||||
|
||||
if (!$f_result) {
|
||||
die("Query failed: " . mysqli_error($conn));
|
||||
}
|
||||
|
||||
while ($f_row = mysqli_fetch_assoc($f_result)) {
|
||||
$placement_date = $f_row['placement_date']; // if needed
|
||||
$f_sql2 = "SELECT * FROM placement_feedback WHERE placement_date < '$date' AND ohc_type_id = '$ohc_type' AND status = 'Placed'";
|
||||
|
||||
|
||||
$total_count = '';
|
||||
}
|
||||
}
|
||||
$total_proc = mysqli_num_rows($result);
|
||||
|
||||
//added on 04-12-2021 - start
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user