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

Update appusersimportcsv.php #2578

Open
wants to merge 7 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
12 changes: 9 additions & 3 deletions application/controllers/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,13 @@ public function register() {
$this->email->to($this->input->post('email'));
$this->email->subject(PLATFORM_NAME.' Source Code Download link');
$message = "<b>Welcome to ".PLATFORM_NAME."</b><br />";
$message .= "Please click below link to Download code. <br /><br /><br /><a href='http://dataplug.itu.edu.pk/assets/dp_source_code.zip' style='background:none repeat scroll 0 0 #2DA5DA;border:medium none;color:#FFFFFF;cursor:pointer;outline:medium none;text-decoration:none;padding:5px;'/>Click Here</a>";
$message .= "<br /><br /><br />Note: This is system generated e-mail. Please do not reply<br>";
$message .= "Please click below link to Download code.
<br /><br /><br /><a href='http://dataplug.itu.edu.pk/assets/dp_source_code.zip'
style='background:none repeat scroll 0 0 #2DA5DA;border:medium none;
color:#FFFFFF;cursor:pointer;outline:medium none;text-decoration:none;
padding:5px;'/>Click Here</a>";
$message .= "<br /><br /><br />
Note: This is system generated e-mail. Please do not reply<br>";
$message .= "<br /><b>".PLATFORM_NAME."</b>";
$this->email->message($message);
$this->email->set_mailtype('html');
Expand Down Expand Up @@ -216,7 +221,8 @@ public function contact() {
$this->email->set_mailtype('html');
$this->email->send();

$this->session->set_flashdata('validate', array('message' => "Message sent successfuly", 'type' => 'success'));
$this->session->set_flashdata('validate', array('message' => "Message
sent successfuly", 'type' => 'success'));
redirect(base_url());
}
$data['active_tab'] = 'contact';
Expand Down
9 changes: 6 additions & 3 deletions application/views/apimaker/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
<tbody>
<tr>
<td>
<?php echo form_open(base_url().'add-new-api','id="addform" class="full validate add_task_form " enctype="multipart/form-data"'); ?>
<?php echo form_open(base_url().'add-new-api','id="addform"
class="full validate add_task_form " enctype="multipart/form-data"'); ?>

<div class="row">
<label for="d1_textfield">
<strong>API Title</strong>
</label>
<div>
<input class="required" type="text" name="api_title" id="api_title" value="<?php echo set_value('api_title'); ?>"/>
<input class="required" type="text" name="api_title"
id="api_title" value="<?php echo set_value('api_title'); ?>"/>
<span id='availability_status'></span>
</div>
</div>
Expand Down Expand Up @@ -46,7 +48,8 @@
<strong>API File (.csv only)</strong>
</label>
<div>
<input type="file" name="userfile_addapi" id="userfile_addapi" accept="*.csv" onchange="check_file()"/>
<input type="file" name="userfile_addapi" id="userfile_addapi"
accept="*.csv" onchange="check_file()"/>
</div>
</div>
<div class="actions">
Expand Down
12 changes: 8 additions & 4 deletions application/views/apimaker/createurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<div class="inner-wrap">
<div class="table-sec">
<h2>Create Dropdown API URL</h2>
<input type="hidden" name="api_secret" id="api_secret" value="<?php echo $api_secret; ?>"/>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example" style="box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);min-height: 230px;">
<input type="hidden" name="api_secret" id="api_secret"
value="<?php echo $api_secret; ?>"/>
<table cellpadding="0" cellspacing="0" border="0" class="display"
id="example" style="box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);min-height: 230px;">
<tbody>
<tr>
<td>
Expand Down Expand Up @@ -53,7 +55,8 @@
<label for="d1_textfield">
<strong>URL : </strong>
</label>
<div id="urldiv" style="margin-top: 15px; background-color: yellow;" onclick="select_all(this)">
<div id="urldiv" style="margin-top: 15px; background-color: yellow;"
onclick="select_all(this)">

</div>

Expand All @@ -67,7 +70,8 @@
<a href="<?php echo base_url().'apimaker'?>" class="genericBtn" style="">
Back
</a>
<a href="" id="checkurl" target="_new" class="genericBtn" style="display: none;">
<a href="" id="checkurl" target="_new"
class="genericBtn" style="display: none;">
Click for Check API
</a>
</div>
Expand Down
13 changes: 9 additions & 4 deletions application/views/apimaker/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
<tbody>
<tr>
<td>
<?php echo form_open(base_url().'edit-new-api/'.$api_id,'id="addform" class="full validate add_task_form " enctype="multipart/form-data"'); ?>
<?php echo form_open(base_url().'edit-new-api/'.$api_id,'id="addform"
class="full validate add_task_form " enctype="multipart/form-data"'); ?>

<div class="row">
<label for="d1_textfield">
<strong>API Title</strong>
</label>
<div>
<input class="required" type="text" name="api_title" id="api_title" value="<?php echo $api_title; ?>"/>
<input class="required" type="text" name="api_title"
id="api_title" value="<?php echo $api_title; ?>"/>
<span id='availability_status'></span>
</div>
</div>
Expand All @@ -31,7 +33,9 @@
<?php
foreach($departments as $key=>$val){
?>
<option <?php if($saved_department_id==$val['id']){ echo "selected"; } ?> value="<?php echo $val['id']; ?>"><?php echo $val['name']; ?></option>
<option <?php if($saved_department_id==$val['id']){
echo "selected"; } ?> value="<?php echo $val['id']; ?>"><?php
echo $val['name']; ?></option>
<?php
}
?>
Expand All @@ -48,7 +52,8 @@
<strong>API File (.csv only)</strong>
</label>
<div>
<input type="file" name="userfile_addapi" id="userfile_addapi" accept="*.csv" onchange="check_file()"/>
<input type="file" name="userfile_addapi" id="userfile_addapi"
accept="*.csv" onchange="check_file()"/>
</div>
</div>
<div class="actions">
Expand Down
24 changes: 18 additions & 6 deletions application/views/apimaker/index.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<style>.applicationText a{position:relative;}.Category a{text-decoration:underline!important;}#cboxCurrent{display:none!important;}</style>
<style>
.applicationText a{position:relative;}.Category
a{text-decoration:underline!important;}#cboxCurrent{display:none!important;}
</style>
<div class="applicationText">
<a id="add_more_app">Add Dropdown API</a>
<h2>Dropdown API Maker</h2>
<br clear="all" />
</div>
<div class="tableContainer">
<div>
<table cellspacing="0" cellpadding="0" id="application-listing-app" class="display">
<table cellspacing="0" cellpadding="0"
id="application-listing-app" class="display">
<thead>
<tr>
<th class="Categoryh">API Title</th>
Expand Down Expand Up @@ -38,10 +42,18 @@
?>
</td>
<td class="Links" style="width: 70px; border-bottom: 1px solid #D5D5D5;">
<a href="<?php echo base_url(); ?>createapiurl/<?php echo $api['id']; ?>"><img src="<?= base_url() ?>assets/images/settings-ico.png" alt="" title="Create Url" width="28px"/></a>
<a class="edit_api" api_id="<?= $api['id'] ?>"><img src="<?= base_url() ?>assets/images/tableLink1.png" alt="" title="Edit"/></a>
<a href="javascript:void(0)"><img src="<?= base_url() ?>assets/images/tableLink3.png" alt="" title="Delete" id ="delete_api" title="Delete Api" api_id ="<?= $api['id'] ?>"/></a>
<a href="<?php echo base_url(); ?>assets/data/<?php echo $api['file_name']; ?>"><img src="<?= base_url() ?>assets/images/tableLink6.png" alt="" title="Download"/></a>
<a href="<?php echo base_url(); ?>createapiurl/<?php
echo $api['id']; ?>"><img src="<?= base_url()
?>assets/images/settings-ico.png" alt="" title="Create Url" width="28px"/></a>
<a class="edit_api" api_id="<?= $api['id'] ?>"><img src="<?= base_url()
?>assets/images/tableLink1.png" alt="" title="Edit"/></a>
<a href="javascript:void(0)">
<img src="<?= base_url() ?>assets/images/tableLink3.png"
alt="" title="Delete" id ="delete_api" title="Delete Api"
api_id ="<?= $api['id'] ?>"/></a>
<a href="<?php echo base_url(); ?>assets/data/<?php echo $api['file_name'];
?>"><img src="<?= base_url() ?>assets/images/tableLink6.png"
alt="" title="Download"/></a>
<br clear="all" />
</td>
</tr>
Expand Down
17 changes: 12 additions & 5 deletions application/views/app/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
<tbody>
<tr>
<td>
<?php echo form_open(base_url().'add-new-app/'.$login_department_id,'id="addform" class="full validate add_task_form " enctype="multipart/form-data"'); ?>
<?php echo
form_open(base_url().'add-new-app/'.$login_department_id,'id="addform"
class="full validate add_task_form " enctype="multipart/form-data"'); ?>
<?php if ($this->acl->hasSuperAdmin()) { ?>
<div class="row">
<label for="d1_textfield">
<strong>Department Name</strong>
</label>
<div>
<?php echo form_dropdown('department_id', $departments, $batch, 'id="department_id"'); ?>
<?php echo form_dropdown('department_id', $departments,
$batch, 'id="department_id"'); ?>
</div>
<span class="error">
<?php echo $this->form_validation->error('department_id'); ?>
Expand All @@ -25,7 +28,8 @@
<strong>Department Name </strong>
</label>
<div>
<input class="required" type="text" name="department_name" id="department_name" value="<?php echo set_value('department_name'); ?>" />
<input class="required" type="text" name="department_name"
id="department_name" value="<?php echo set_value('department_name'); ?>" />
</div>
<span class="error">
<?php echo $this->form_validation->error('department_name'); ?>
Expand All @@ -37,7 +41,9 @@
<strong>Application Name</strong>
</label>
<div>
<input class="required" type="text" name="app_name" id="app_name" value="<?php echo set_value('app_name'); ?>" onkeyup='check_app_name_availability($(this).val())'/>
<input class="required" type="text" name="app_name" id="app_name"
value="<?php echo set_value('app_name'); ?>"
onkeyup='check_app_name_availability($(this).val())'/>
<span id='availability_status'></span>
</div>
<span class="error">
Expand All @@ -49,7 +55,8 @@
<strong>Application Icon (.png only)</strong>
</label>
<div>
<input type="file" name="userfile_addapp" id="userfile_addapp" accept="*.png" onchange="check_file()"/>
<input type="file" name="userfile_addapp" id="userfile_addapp"
accept="*.png" onchange="check_file()"/>
</div>
</div>
<div class="actions">
Expand Down
27 changes: 18 additions & 9 deletions application/views/app/appusersimportcsv.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<div id="container">
<div class="inner-wrap">
<div class="table-sec">
<form style='margin: auto;width: 100%;' action="<?= base_url() ?>app/import_app_user_csv" method="POST"
class="full validate add_task_form" enctype="multipart/form-data" id='form_edit'/>
<form style='margin: auto;width: 100%;' action="<?= base_url() ?>
app/import_app_user_csv" method="POST"
class="full validate add_task_form"
enctype="multipart/form-data" id='form_edit'/>
<h2>Import application user - Attached columns with table fields</h2>
<input type="hidden" name="app_id_import" id="app_id_import" value="<?php echo $app_id_import; ?>"/>
<input type="hidden" name="department_id_import" id="department_id_import" value="<?php echo $department_id_import; ?>"/>
<input type="hidden" name="view_id_import" id="view_id_import" value="<?php echo $view_id_import; ?>"/>
<input type="hidden" name="upload_file_path" id="upload_file_path" value="<?php echo $upload_file_path; ?>"/>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example" style="box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);min-height: 230px;">
<input type="hidden" name="app_id_import" id="app_id_import"
value="<?php echo $app_id_import; ?>"/>
<input type="hidden" name="department_id_import" id="department_id_import"
value="<?php echo $department_id_import; ?>"/>
<input type="hidden" name="view_id_import" id="view_id_import"
value="<?php echo $view_id_import; ?>"/>
<input type="hidden" name="upload_file_path"
id="upload_file_path" value="<?php echo $upload_file_path; ?>"/>
<table cellpadding="0" cellspacing="0" border="0" class="display"
id="example" style="box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);min-height: 230px;">
<tbody>
<tr>
<td style="padding-top: 20px;padding-left: 100px">
Expand Down Expand Up @@ -137,10 +144,12 @@ class="full validate add_task_form" enctype="multipart/form-data" id='form_edit'
<strong> </strong>
</label>
<div>
<a href="<?php echo base_url().'applicatioin-users'?>" class="genericBtn" style="">
<a href="<?php echo base_url().'applicatioin-users'?>
" class="genericBtn" style="">
Back
</a>
<button class="genericBtn" style="width: 100px; margin: 0px; padding: 7px;">Import CSV</button>
<button class="genericBtn" style="width: 100px; margin: 0px; padding: 7px;">
Import CSV</button>
</div>
</div>
</td>
Expand Down