Esempio n. 1
0
$img_title = $bank_options = $nxt_links = '';
// Start Testing Smtp mail
$to = '*****@*****.**';
$subject = 'test mail';
$body = 'test mail from smtp class';
//$mail = new SmtpMail();
//$mail->smtp_client($to,$subject,$body);
//$mail->send_mail();
// End Testing Smtp mail
$slash_vars = explode("/", $_SERVER['REQUEST_URI']);
$bank_name = urldecode($slash_vars[2]);
$ifscC = urldecode($slash_vars[3]);
$ifscC_arr = explode("-", $ifscC);
$ifscCode = $ifscC_arr[0];
$qury = "select *  from ifsc_codes where ifsc_code like '%{$ifscCode}%'";
$data = $db->qry_select($qury);
foreach ($data as $row) {
    $state = $row['STATE'];
    $district = $row['DISTRICT'];
    $city = $row['CITY'];
    $ifsc_code = $row['ifsc_code'];
    $branchName = $row['branch_name'];
    $address = $row['address'];
    $micr_code = $row['micr_code'];
    $contact = $row['contact'];
}
$title = ucwords($bank_name) . " / " . ucwords($ifscCode) . "Branch IFSC Code";
$disp_bank_name = ucwords(str_replace("-", " ", $bank_name));
$info = '
        <div class="panel panel-success">
            <div class="panel-heading">
Esempio n. 2
0
 public function save_db_sitemap($data = "")
 {
     $db = new DbConnect();
     $country_long_name = $administrative_area_level_1_long_name = $country_long_name = $administrative_area_level_1_long_name = $country_long_name = $country_short_name = $administrative_area_level_1_long_name = $administrative_area_level_1_short_name = $postal_code = '';
     foreach ($data['results'][0]['address_components'] as $address) {
         if ($address['types']['0'] == 'administrative_area_level_1') {
             $administrative_area_level_1_long_name = Commonfuns::sanitize($address['long_name']);
             $administrative_area_level_1_short_name = Commonfuns::sanitize($address['short_name']);
         }
         if ($address['types']['0'] == 'country') {
             $country_long_name = Commonfuns::sanitize($address['long_name']);
             $country_short_name = Commonfuns::sanitize($address['short_name']);
         }
         if ($address['types']['0'] == 'postal_code') {
             $postal_code = Commonfuns::sanitize($address['long_name']);
         }
     }
     $address = $data['results'][0]['formatted_address'];
     $url_add = str_replace(" ", "", $address);
     $url_add = str_replace(",", "-", $url_add);
     $sanitizeAddress = Commonfuns::sanitize($url_add);
     $url = str_replace(",", "", $sanitizeAddress . ".html");
     $serverName = Commonfuns::constants('serverName');
     $country = Commonfuns::sanitize(strtolower($country_long_name . ".xml"));
     $countryData = array(array('fileName' => 'sitemap.xml', 'sitemap' => array(array('loc' => $serverName . "sitemaps/{$country}"))));
     $state = Commonfuns::sanitize(strtolower($administrative_area_level_1_long_name . ".xml"));
     $stateData = array(array('fileName' => $country, 'sitemap' => array(array('loc' => $serverName . "sitemaps/{$state}"))));
     $locationsData = array(array('fileName' => $state, 'url' => array(array('loc' => "{$serverName}" . "latlong/{$url}"))));
     $country_id_qry = "SELECT id from countries where title like '%{$country_long_name}%' ";
     $state_id_qry = "SELECT id from states where title like '%{$administrative_area_level_1_long_name}%' ";
     $country_id_res = $db->qry_select($country_id_qry);
     $country_id = $country_id_res['id'];
     $state_id_res = $db->qry_select($state_id_qry);
     $state_id = $state_id_res['id'];
     $country_qry = "INSERT INTO countries (title,short_code) VALUES ('{$country_long_name}','{$country_short_name}');  ";
     $states_qry = "INSERT INTO states(title,short_code) VALUES ('{$administrative_area_level_1_long_name}','{$administrative_area_level_1_short_name}');  ";
     if ($country_id == '') {
         $country_res = $db->qry_insert($country_qry);
         $country_id = $country_res->insert_id;
         $this->multiLevelSitemap($countryData);
     }
     if ($state_id == '') {
         $state_res = $db->qry_insert($states_qry);
         $state_id = $state_res->insert_id;
         $this->multiLevelSitemap($stateData);
     }
     $sitemap_qry = "INSERT INTO sitemap (country_id,state_id,url) VALUES ({$country_id},{$state_id},'{$url}');  ";
     $zipcodes_qry = "INSERT INTO zipcodes (country_id,state_id,zipcode) VALUES ({$country_id},{$state_id},'{$postal_code}')";
     $url_qry = "SELECT id from sitemap where url like '%{$url}%' ";
     $url_res = $db->qry_select($url_qry);
     if ($country_id != '' && $state_id != '' && $url_res == '') {
         $db->qry_insert($sitemap_qry);
         $this->singleLevelSitemap($locationsData);
     }
     $zipcode_qry = "SELECT id from zipcodes where zipcode like '%{$postal_code}%' ";
     $zipcode_res = $db->qry_select($zipcode_qry);
     $db_zipcode_id = $url_res['id'];
     if ($country_id != '' && $state_id != '' && $db_zipcode_id == '') {
         $db->qry_insert($zipcodes_qry);
     }
 }
Esempio n. 3
0
<?php

require_once 'common/header.php';
//print_r(http_get_request_headers());
$db = new DbConnect();
$sql = "SELECT *  FROM bank_names order by bank_name ASC";
$rs = $db->qry_select($sql);
if (isset($_SERVER['REQUEST_URI'])) {
    $url = $_SERVER['REQUEST_URI'];
    $slash_pos = explode("/", $url);
}
$bank_options = '';
foreach ($rs as $row) {
    $id = $row['id'];
    $bank_name = $row['bank_name'];
    $url_param = str_replace("_", " ", $slash_pos[2]);
    if (isset($slash_pos[2]) && $slash_pos[2] != '' && $url_param == $bank_name) {
        $selected = "selected=selected";
    } else {
        $selected = '';
    }
    $bank_options .= "<option {$selected} value='{$id}' >{$bank_name}</option>";
}
?>

<div class="col-lg-4 col-md-offset-4 ">
    <h3> Find IFSC Codes</h3>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-lg-10">
                <select id="bank_id" name="bank_id" class="bank_name">
Esempio n. 4
0
include 'classes/common_funs.php';
$cf = new Commonfuns();
$db = new DbConnect();
function clean($string)
{
    //$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
    return preg_replace('/[^A-Za-z0-9\\-, ]/', '', $string);
    // Removes special chars.
}
$bank_id = $_REQUEST['bankId'];
if (isset($bank_id) && $bank_id != '' && !isset($_REQUEST['stateId']) && !isset($_REQUEST['branchName'])) {
    $httpReferer = $_SERVER['HTTP_REFERER'];
    if (strpos($httpReferer, 'quick-search') > 0) {
        $bank_id = $_REQUEST['bankId'];
        $qury = "select distinct(ic.branch_name)  as branch_name,s.state from ifsc_codes ic LEFT JOIN  states s ON ic.state_id = s.id " . "where bank_id = {$bank_id} order by branch_name ASC";
        $branch_names_res = $db->qry_select($qury);
        print_r($branch_names_res);
        $branch_names_list = "<option>Select Branch - State</option>";
        foreach ($branch_names_res as $row) {
            $branch_name = $row['branch_name'];
            $branch_name = clean($branch_name);
            $state_name = clean($row['state']);
            $branch_names_list .= "<option value='{$branch_name}'>{$branch_name} - {$state_name}</option>";
        }
        echo $branch_names_list;
    } else {
        $state_ids = '';
        $qury = "select distinct(state_id) as state_id from ifsc_codes where bank_id = {$bank_id}";
        $state_ids_res = $db->qry_select($qury);
        foreach ($state_ids_res as $row) {
            $id = $row['state_id'];