status file

This commit is contained in:
venbatechnologies@gmail.com 2017-12-07 11:31:25 +05:30
parent 8cf22ca70b
commit d06b1c0cba
4897 changed files with 701 additions and 0 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
Apollo/api/.htaccess Normal file → Executable file
View File

0
Apollo/api/README.MD Normal file → Executable file
View File

0
Apollo/api/application/.htaccess Normal file → Executable file
View File

0
Apollo/api/application/cache/.htaccess vendored Normal file → Executable file
View File

0
Apollo/api/application/cache/index.html vendored Normal file → Executable file
View File

0
Apollo/api/application/config/autoload.php Normal file → Executable file
View File

0
Apollo/api/application/config/config.php Normal file → Executable file
View File

0
Apollo/api/application/config/constants.php Normal file → Executable file
View File

0
Apollo/api/application/config/database.php Normal file → Executable file
View File

0
Apollo/api/application/config/doctypes.php Normal file → Executable file
View File

0
Apollo/api/application/config/foreign_chars.php Normal file → Executable file
View File

0
Apollo/api/application/config/hooks.php Normal file → Executable file
View File

0
Apollo/api/application/config/index.html Normal file → Executable file
View File

0
Apollo/api/application/config/memcached.php Normal file → Executable file
View File

0
Apollo/api/application/config/migration.php Normal file → Executable file
View File

0
Apollo/api/application/config/mimes.php Normal file → Executable file
View File

0
Apollo/api/application/config/profiler.php Normal file → Executable file
View File

0
Apollo/api/application/config/rest.php Normal file → Executable file
View File

0
Apollo/api/application/config/routes.php Normal file → Executable file
View File

0
Apollo/api/application/config/smileys.php Normal file → Executable file
View File

0
Apollo/api/application/config/user_agents.php Normal file → Executable file
View File

View File

0
Apollo/api/application/controllers/Autenticador.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

0
Apollo/api/application/controllers/Rest_server.php Normal file → Executable file
View File

View File

@ -0,0 +1,141 @@
<?php
/**
* Created by Visual Studio Code.
* User: Surendiran
* Date: 12/05/17
* Time: 01:05 PM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
/** @noinspection PhpIncludeInspection */
require_once APPPATH . '/libraries/REST_Controller.php';
/**
* This is an example of a few basic user interaction methods you could use
* all done with a hardcoded array
*
* @package CodeIgniter
* @subpackage Rest Server
* @category Controller
* @author
* @license MIT
* @link
*/
class Status_Controller extends REST_Controller {
function __construct()
{
// Construct the parent class
parent::__construct();
// Configure limits on our controller methods
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
$this->methods['addStatusDetails_get']['limit'] = 500; // 500 requests per hour per user/key
$this->methods['addStatusDetails_post']['limit'] = 100; // 100 requests per hour per user/key
$this->methods['addStatusDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
$this->methods['getStatusDetails_post']['limit'] = 500; // 50 requests per hour per user/key
$this->methods['updateStatusDetails_post']['limit'] = 500;
// load the model
$this->load->model('Status_model', 'status_model');
}
/*
* This method used to add status details
* created by Surendiran
* */
public function addStatusDetails_post()
{
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$details['ListCode'] = $this->post('statusID');
$details['ListName'] = $this->post('statusName');
$details['ListGroup'] = "1";
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$statusDetails = $this->status_model->addstatus($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($statusDetails)
{
$statusDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($statusDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
/*
* get status details
* created by Surendiran
* */
public function getStatusDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getStatus = $this->status_model->getStatus($requestedBy);
if ($getStatus)
{
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
/*
* update the status details
* created by Surendiran
* */
public function updateStatusDetails_post()
{
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$ListCode = $this->post('ListCode');
$details['ListName'] = $this->post('ListName');
$details['IsActive'] = $this->post('status');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
$statusDetails = $this->status_model->update($details,$ListCode);// Check if the users data store contains users (in case the database result returns NULL)
if ($statusDetails)
{
$statusDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($statusDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
}

View File

0
Apollo/api/application/controllers/Teste.php Normal file → Executable file
View File

View File

0
Apollo/api/application/controllers/Welcome.php Normal file → Executable file
View File

0
Apollo/api/application/controllers/index.html Normal file → Executable file
View File

0
Apollo/api/application/core/MY_Controller.php Normal file → Executable file
View File

0
Apollo/api/application/core/index.html Normal file → Executable file
View File

0
Apollo/api/application/helpers/index.html Normal file → Executable file
View File

0
Apollo/api/application/hooks/index.html Normal file → Executable file
View File

0
Apollo/api/application/index.html Normal file → Executable file
View File

0
Apollo/api/application/language/bulgarian/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/dutch/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/english/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/french/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/german/index.html Normal file → Executable file
View File

View File

View File

0
Apollo/api/application/language/index.html Normal file → Executable file
View File

0
Apollo/api/application/language/indonesia/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/italian/index.html Normal file → Executable file
View File

View File

View File

0
Apollo/api/application/language/romanian/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/serbian_cyr/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/language/serbian_lat/index.html Normal file → Executable file
View File

View File

View File

0
Apollo/api/application/language/spanish/index.html Normal file → Executable file
View File

View File

View File

0
Apollo/api/application/language/turkish/index.html Normal file → Executable file
View File

View File

0
Apollo/api/application/libraries/Format.php Normal file → Executable file
View File

0
Apollo/api/application/libraries/JWT.php Normal file → Executable file
View File

0
Apollo/api/application/libraries/REST_Controller.php Normal file → Executable file
View File

0
Apollo/api/application/libraries/index.html Normal file → Executable file
View File

0
Apollo/api/application/logs/index.html Normal file → Executable file
View File

0
Apollo/api/application/models/Admin_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Announcement_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Batch_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Branch_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Calltracking_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Course_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Dashboard_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Employee_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Forgot_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/Login_model.php Normal file → Executable file
View File

View File

@ -0,0 +1,134 @@
<?php
/**
* Created by Visual Studio Code.
* User: Surendiran
* Date: 11/13/17
* Time: 8:03 PM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Status_model extends CI_Model {
/*
* add status details
* params:StatusID,StatusName,activestatus
* created by Surendiran
* */
public function addstatus($arrayDetails=null)
{
$this->db->select('ListCode');
$this->db->where('ListGroup', '1');
$this->db->where('ListName', $arrayDetails['ListName']);
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
$result['Status'] = false;
$result['message'] = "This Status Name is already exist!";
} else {
$this->db->insert(PICK_LIST_DETAILS, $arrayDetails);
if($this->db->affected_rows() == '1'){
$result['Status'] = true;
$result['message'] = "Successfully status Name is added";
}
else {
$result['Status'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
// $checkExistActivity = $this->db->get(PICK_LIST_DETAILS);
return $result;
}
/*
* get status details
* parama id
* created by Surendiran
* */
public function getStatus()
{
$this->db->select('ListCode,ListName,IsActive');
$this->db->where('ListGroup','1');
$this->db->order_by('ListCode','DESC');
$statusDetails = $this->db->get(PICK_LIST_DETAILS);
if($statusDetails->result()){
$result['Status'] = true;
$result['details'] = $statusDetails->result();
}
else {
$result['Status'] = false;
$result['message'] = "No records found!";
}
return $result;
}
/*
* update status details
* created by Surendiran
* */
public function update($arrayDetails=null,$ListCode=null)
// {
// $this->db->where('ListCode',$ListCode);
// $statusDetails=$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
// if($statusDetails){
// $result['Status'] = true;
// $result['message'] = "Successfully status details updated";
// }
// else {
// $result['Status'] = false;
// $result['message'] = "Something went wrong.please try again";
// }
// return $result;
// }
{
$this->db->select('ListName');
$this->db->where('ListName', $arrayDetails['ListName']);
$this->db->where_not_in('ListCode', $ListCode);
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
$result['Status'] = false;
$result['message'] = "This Status Name is already exist!";
} else {
$this->db->where('ListCode',$ListCode);
$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
if($this->db->affected_rows() == '1'){
$result['Status'] = true;
$result['message'] = "Successfully status Name is updated";
}
else {
$result['Status'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
// $checkExistActivity = $this->db->get(PICK_LIST_DETAILS);
return $result;
}
}

0
Apollo/api/application/models/Student_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/University_model.php Normal file → Executable file
View File

0
Apollo/api/application/models/index.html Normal file → Executable file
View File

0
Apollo/api/application/third_party/index.html vendored Normal file → Executable file
View File

0
Apollo/api/application/views/errors/cli/error_404.php Normal file → Executable file
View File

0
Apollo/api/application/views/errors/cli/error_db.php Normal file → Executable file
View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More