Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SE_dataplug_coding _standard_voilation_fixing #2611

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 140 additions & 140 deletions application/controllers/api.php

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions application/controllers/apimaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ public function add() {
if($department_id==0) {
$department_id = trim($this->input->post('department_id'));
}
$apidata = array(
$api_data = array(
'title' => $api_title,
'secret_key' => $rand_key,
'department_id' => $department_id
);
$this->db->insert('api', $apidata);
$this->db->insert('api', $api_data);
$api_id = $this->db->insert_id();
//upload api file
$abs_path = './assets/data/';
Expand All @@ -178,9 +178,9 @@ public function add() {
umask($old);
if ($_FILES['userfile_addapi']['name'] != '') {
$file_name = preg_replace("/[^A-Za-z0-9\.]/", "_",$_FILES['userfile_addapi']['name']);
$iconName = $api_id.'_'.$file_name;
$icon_name = $api_id.'_'.$file_name;
$config['upload_path'] = $abs_path;
$config['file_name'] = $iconName;
$config['file_name'] = $icon_name;
$config['overwrite'] = TRUE;
$config["allowed_types"] = 'csv';
$config["max_size"] = 15360;
Expand All @@ -197,7 +197,7 @@ public function add() {
}

$change_file = array(
'file_name' => $iconName,
'file_name' => $icon_name,
);
$this->db->where('id', $api_id);
$this->db->update('api', $change_file);
Expand Down Expand Up @@ -241,21 +241,21 @@ public function edit($slug) {
if($department_id==0) {
$department_id = trim($this->input->post('department_id'));
}
$apidata = array(
$api_data = array(
'title' => $api_title,
'department_id' => $department_id,
);
$this->db->where('id', $api_id);
$this->db->update('api', $apidata);
$this->db->update('api', $api_data);
//upload api file
$abs_path = './assets/data/';
$old = umask(0);
@mkdir($abs_path, 0777);
umask($old);
if ($_FILES['userfile_addapi']['name'] != '') {
$iconName = $api_id.'_'.$_FILES['userfile_addapi']['name'];
$icon_name = $api_id.'_'.$_FILES['userfile_addapi']['name'];
$config['upload_path'] = $abs_path;
$config['file_name'] = $iconName;
$config['file_name'] = $icon_name;
$config['overwrite'] = TRUE;
$config["allowed_types"] = 'csv';
$config["max_size"] = 15360;
Expand All @@ -268,7 +268,7 @@ public function edit($slug) {
//success
}
$change_file = array(
'file_name' => $iconName,
'file_name' => $icon_name,
);
$this->db->where('id', $api_id);
$this->db->update('api', $change_file);
Expand Down
264 changes: 132 additions & 132 deletions application/controllers/app.php

Large diffs are not rendered by default.

70 changes: 52 additions & 18 deletions application/views/form/form_results_data_1.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div class="tableContainer">
<div class="success"></div>
<div style="overflow: auto">
<form accept-charset="utf-8" enctype="multipart/form-data" method="post" action="<?= base_url() . 'form/edit_form_result_ajax'; ?>" id='form_edit'>
<table cellspacing="0" cellpadding="0" id="application-listing-listview" class="display">
<form accept-charset="utf-8" enctype="multipart/form-data" method="post" action="
<?= base_url() . 'form/edit_form_result_ajax'; ?>" id='form_edit'>
<table cellspacing="0" cellpadding="0" id="application-listing-listview"
class="display">
<thead>
<tr>
<?php
Expand All @@ -28,7 +30,8 @@
// print_r($new_headings);die;
foreach ($headings as $heading):
if ($heading != 'is_take_picture'):
if($heading == 'activity_status' && $app_general_setting->activity_status_change==0){
if($heading == 'activity_status' &&
$app_general_setting->activity_status_change==0){
continue;
}
?>
Expand Down Expand Up @@ -74,13 +77,18 @@
$padding = '0px ' . strlen($headings[$i]) . 'px' . ' 0px ' . strlen($headings[$i]) * 2 . 'px';
}
?>
<td class="Category <?php echo $leftaligh; ?>" style="position:relative; padding: <?php echo $padding; ?> ;" >
<td class="Category <?php echo $leftaligh; ?>
" style="position:relative; padding: <?php echo $padding; ?> ;" >
<?php
if($headings[$i]=='activity_status'){
//echo $form_item['actions'].'Pending';
?>
<div class="status edit_activity_status" id="<?php echo $form_item['actions']; ?>" form_id="<?php echo $form_item['form_id']; ?>">
<span id="edit_activity_status_<?php echo $form_item['actions']; ?>" class="text_activity_status"><?php
<div class="status edit_activity_status"
id="<?php echo $form_item['actions']; ?>"
form_id=" <?php echo $form_item['form_id']; ?>">
<span id="edit_activity_status_<
?php echo $form_item['actions']; ?>"
class="text_activity_status"><?php
if ($form_item['activity_status'] == 'approved') {
echo 'Approved';
} else if ($form_item['activity_status'] == 'rejected') {
Expand All @@ -90,7 +98,9 @@
echo 'Pending';
}
?></span>
<select id="edit_activity_status_input_<?php echo $form_item['actions']; ?>" class="intxt2 edit_activity_status_box" style="display: none;width: 100%;">
<select id="edit_activity_status_input_<?php echo $form_item['actions']; ?>"
class="intxt2 edit_activity_status_box"
style="display: none;width: 100%;">
<option <?php
if ($form_item['activity_status'] == '') {
echo 'selected';
Expand Down Expand Up @@ -123,8 +133,11 @@
$title = $form_item[$headings[$i]][0]['title'];
}
?>
<a href="<?php echo $form_item[$headings[$i]][0]['image']; ?>" rel="lightbox['<?php echo $image_colorbox; ?>']" title='<b><?php echo $title; ?></b>'>
<img align="left" src="<?php echo $form_item[$headings[$i]][0]['image']; ?>" width="50" height="50" alt="Record Images" title="<b>Record Images</b>" />
<a href="<?php echo $form_item[$headings[$i]][0]['image']; ?>"
rel="lightbox['<?php echo $image_colorbox; ?>']"
title='<b><?php echo $title; ?></b>'>
<img align="left" src="<?php echo $form_item[$headings[$i]][0]['image']; ?>
" width="50" height="50" alt="Record Images" title="<b>Record Images</b>" />
</a>
<?php
//
Expand All @@ -139,31 +152,49 @@
echo $title_multi = $multi_image['title'];
}
?>
<a rel="lightbox['<?php echo $image_colorbox; ?>']" href="<?php echo $multi_image['image']; ?>" title="<b><?php echo $title_multi; ?></b>" name = " ITU Government of Punjab - Pakistan">
<a rel="lightbox['<?php echo $image_colorbox; ?>']"
href="<?php echo $multi_image['image']; ?>"
title="<b><?php echo $title_multi; ?> </b>"
name = " ITU Government of Punjab - Pakistan">
</a>
<?php
}
} elseif ($headings[$i] == 'actions') {
if ($this->acl->hasSuperAdmin()) {
?>
<img src="<?= base_url() ?>assets/images/tableLink3.png" alt="" title='Delete' form_id = '<?php echo $form_item['form_id']; ?>' class='delete_icon'/>
<a class="edit_color_box" form_id = '<?php echo $form_item['form_id']; ?>' href="<?= base_url() . 'form/edit_form_partial'; ?>">
<img src="<?= base_url() ?>assets/images/tableLink1.png" alt="" title='Update' class='update_icosn'/>
<img src="<?= base_url() ?>assets/images/tableLink3.png"
alt="" title='Delete'
form_id ='<?php echo $form_item['form_id']; ?>'
class='delete_icon'/>
<a class="edit_color_box" form_id = '<?php echo $form_item['form_id']; ?>'
href="<?= base_url() . 'form/edit_form_partial'; ?>">
<img src="<?= base_url() ?>
assets/images/tableLink1.png" alt=""
title='Update' class='update_icosn'/>
</a>
<?php
} else {
if ($this->acl->hasPermission('form', 'delete')) {
?>
<img src="<?= base_url() ?>assets/images/tableLink3.png" alt="" title='Delete' form_id = '<?php echo $form_item['form_id']; ?>' class='delete_icon'/>
<a class="edit_color_box" form_id = '<?php echo $form_item['form_id']; ?>' href="<?= base_url() . 'form/edit_form_partial'; ?>">
<img src="<?= base_url() ?>assets/images/tableLink1.png" alt="" title='Update' class='update_icosn'/>
<img src="<?= base_url() ?>assets/images/tableLink3.png"
alt="" title='Delete'
form_id = '<?php echo $form_item['form_id']; ?>'
class='delete_icon'/>
<a class="edit_color_box"
form_id = '<?php echo $form_item['form_id']; ?>'
href="<?= base_url() . 'form/edit_form_partial'; ?>">
<img src="<?= base_url() ?>assets/images/tableLink1.png"
alt="" title='Update' class='update_icosn'/>
</a>
<?php
}
}
?>
<!-- &nbsp;&nbsp;-->
<a href="<?= base_url() . 'single-record-map/' . $form_item['form_id'] . '-' . $form_item['actions']; ?>" target="_blank" >
<a href="<?= base_url() . 'single-record-map/'
. $form_item['form_id'] . '-'
. $form_item['actions']; ?>
" target="_blank" >
<img src="<?= base_url() ?>assets/images/viewmap.png" alt="" title='Map View'/>
</a>

Expand All @@ -176,7 +207,10 @@
// $data = ($headings[$i] != "Description") ? $form_item[$headings[$i]] : strtoupper($form_item[$headings[$i]]);
if($form_item[$headings[$i]]=="SHOW RECORDS"){
?>
<a rel="<?php echo "zform_".$form_item['form_id']."_".strtolower($headings[$i])."_".$form_item['actions']; ?>" href="javascript:void(0)" name = " ITU Government of Punjab - Pakistan" class="open_subtable">
<a rel="<?php echo "zform_".$form_item['form_id'].
"_".strtolower($headings[$i])."_".$form_item['actions']; ?>
" href="javascript:void(0)" name = " ITU Government of Punjab - Pakistan"
class="open_subtable">
<?php echo "<b style='color:orange'>".$form_item[$headings[$i]]."</b>"; ?>
</a>
<?php
Expand Down
20 changes: 14 additions & 6 deletions application/views/form/form_results_data_frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<div class="tableContainer">
<div class="success"></div>
<div style="overflow: auto">
<form accept-charset="utf-8" enctype="multipart/form-data" method="post" action="<?= base_url() . 'form/edit_form_result_ajax'; ?>" id='form_edit'>
<table cellspacing="0" cellpadding="0" id="application-listing-listview" class="display">
<form accept-charset="utf-8" enctype="multipart/form-data" method="post"
action="<?= base_url() . 'form/edit_form_result_ajax'; ?>" id='form_edit'>
<table cellspacing="0" cellpadding="0"
id="application-listing-listview" class="display">
<thead>
<tr>
<?php
Expand Down Expand Up @@ -46,7 +48,8 @@
$padding = '0px ' . strlen($headings[$i]) . 'px' . ' 0px ' . strlen($headings[$i]) * 2 . 'px';
}
?>
<td class="Category <?php echo $leftaligh; ?>" style="position:relative; padding: <?php echo $padding; ?> ;" >
<td class="Category <?php echo $leftaligh; ?>"
style="position:relative; padding: <?php echo $padding; ?> ;" >
<?php
if (isset($form_item[$headings[$i]])) {
if ($headings[$i] == 'image') {
Expand All @@ -60,8 +63,11 @@
$title = $form_item[$headings[$i]][0]['title'];
}
?>
<a href="<?php echo $form_item[$headings[$i]][0]['image']; ?>" rel="lightbox['<?php echo $image_colorbox; ?>']" title='<b><?php echo $title; ?></b>'>
<img align="left" src="<?php echo $form_item[$headings[$i]][0]['image']; ?>" width="50" height="50" alt="Record Images" title="<b>Record Images</b>" />
<a href="<?php echo $form_item[$headings[$i]][0]['image']; ?>"
rel="lightbox['<?php echo $image_colorbox; ?>']"
title='<b><?php echo $title; ?></b>'>
<img align="left" src="<?php echo $form_item[$headings[$i]][0]['image']; ?>"
width="50" height="50" alt="Record Images" title="<b>Record Images</b>" />
</a>
<?php
//
Expand All @@ -76,7 +82,9 @@
echo $title_multi = $multi_image['title'];
}
?>
<a rel="lightbox['<?php echo $image_colorbox; ?>']" href="<?php echo $multi_image['image']; ?>" title="<b><?php echo $title_multi; ?></b>" name = " ITU Government of Punjab - Pakistan">
<a rel="lightbox['<?php echo $image_colorbox; ?>']"
href="<?php echo $multi_image['image']; ?>"
title="<b><?php echo $title_multi; ?></b>" name = " ITU Government of Punjab - Pakistan">
</a>
<?php
}
Expand Down
Loading