Posts

Showing posts from February, 2019

Slim Rest Api

Index.php <?php error_reporting(-1); ini_set('display_errors', 'On'); require_once '../include/db_handler.php'; require '.././libs/Slim/Slim.php'; \Slim\Slim:: registerAutoloader(); $app = new \Slim\Slim(); /*Rest For Login*/  $app->post('/user/app_reg', function() use ($app) {     $name = $app->request->post('uname');     $email = $app->request->post('umail');     $mobile = $app->request->post('umbl');     $password = $app->request->post('upwd');     $cardname = $app->request->post('cardname' );     $cardno = $app->request->post('cardno');     $expmnth = $app->request->post('expmnth') ;     $expyear = $app->request->post('expyear') ;    // error_log(print_r($password), 3,'D:/error.txt');    // validateEmail($email);     $db = new DbHandler();     $respon...

Geofencing Add Marker and Fetch data from database

Maps.js jQuery(document).ready(function($) {     'use strict';     var map = document.getElementById('map-canvas');     var routeSelect = document.getElementById('routeSelect');     var viewingAllRoutes = false;     var sessionIDArray = [];     var intervalID = 0;     var dynaradius= 0;     getAllRoutesForMap();     loadRoutesIntoDropdownBox()      $("#routeSelect").change(function() {     if (hasMap()) {              viewingAllRoutes = false;              getRouteForMap();          }     });     $("#edit").click(function() {         editRoute();     });       $("#radius").focusout(function(){     //dynaradius = document.getElementById("radius").value;     //getRouteFo...

Excel Export Using Codeigniter

Excel Export using codeigniter: - Controller:-                     <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Excel_export extends CI_Controller {   public function excel_export_view() { $this->load->model("excel_export_model"); $data["employee_data"] = $this->excel_export_model->fetch_data(); $this->load->view('templates/header', $data);         $this->load->view('templates/nav', $data);         $this->load->view("Excel_export/excel_export_view", $data);         //$this->load->view('templates/footer'); } public function action() { $this->load->model("excel_export_model"); $this->load->library("excel"); $object = new PHPExcel(); $object->setActiveSheetIndex(0); $table_columns = array("Name", "Address", "Gender", "Designation...

Insert and Update or Edit Data using jQuery Dialogify with PHP Ajax

Source Code Database -- -- Database: `testing` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_employee` -- CREATE TABLE `tbl_employee` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `address` text NOT NULL, `gender` varchar(10) NOT NULL, `designation` varchar(100) NOT NULL, `age` int(11) NOT NULL, `images` varchar(150) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_employee` -- INSERT INTO `tbl_employee` (`id`, `name`, `address`, `gender`, `designation`, `age`, `images`) VALUES (6, 'Barbra K. Hurley', '1241 Canis Heights Drive\r\nLos Angeles, CA 90017', 'Female', 'Service technician', 26, 'image_35.jpg'), (7, 'Antonio J. Forbes', '403 Snyder Avenue\r\nCharlotte, NC 28208', 'Male', 'Faller', 28, 'image_36.jpg'), (8, 'Charles D. Horst', '1636 Walnut Hill Drive\r\nCincinnati, O...