Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 15,534
» Latest member: evansharp
» Forum threads: 70,590
» Forum posts: 363,022

Full Statistics

Latest Threads
How block IP in PHP?
Forum: General Help
14 minutes ago
» Replies: 5   » Views: 77
Implement Mpdf
Forum: CodeIgniter 4 Support
5 hours ago
» Replies: 0   » Views: 20
Upgrading and determining...
Forum: General Help
9 hours ago
» Replies: 3   » Views: 44
Classmap not loaded?
Forum: Libraries & Helpers
10 hours ago
» Replies: 0   » Views: 28
Supported Languages
Forum: CodeIgniter 4 Support
Yesterday, 12:22 PM
» Replies: 2   » Views: 54
Url segment in ci4
Forum: CodeIgniter 4 Discussion
Yesterday, 11:55 AM
» Replies: 4   » Views: 510
preg_match(): Compilation...
Forum: General Help
Yesterday, 11:39 AM
» Replies: 3   » Views: 30
values from checkbox
Forum: General Help
Yesterday, 09:03 AM
» Replies: 2   » Views: 44
Forum Anti-Spam Measures
Forum: News & Discussion
Yesterday, 04:14 AM
» Replies: 13   » Views: 11,287
Important News about Jim ...
Forum: News & Discussion
Yesterday, 01:49 AM
» Replies: 74   » Views: 17,876

 
  set up multiple applications
Posted by: fredg - 01-14-2020, 08:38 AM - Forum: Installation & Setup - Replies (7)

Hi,
Here's my context : codeigniter 3 on wamp.
Here's my problem :

  • I have two environments (production and test).
  • I have one source code for each environment.
  • In each environment I can have multiple applications sharing the same source code (one application/environment is associated to a group of databases).
  • Currently the server is located on my machine
I created the following source tree for my files in www/code_igniter directory :
  • applications (directory)
  • assets (directory)
  • system directory (of codeigniter)
  • .htaccess file (for removing index.php from url)
  • index.php
Content of applications directory :
  • application test (directory)
  • application prod
each applications directory contains the files and directories of codeigniter application directory (cache,config, controllers, core,...etc)

I want to run my applications by using the following url : http://localhost/<application_name>_<environment>
I don't succeed in making the access to my application work ("I've got The requested URL was not found on this server").
I'm lost in the configuration of index.php, .htaccess, routes.php, config.php

In index.php, I parse $_SERVER['REQUEST_URI'] to set $application_folder value and database credentials
In .htaccess i set :
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

in config.php I set :
Code:
$config['base_url'] = 'http://localhost'; and $config['index_page'] = '';

Did I make the good choices for my source tree ?
How should I configure the files index.php, .htaccess, routes.php, config.php ?

Please help me


  Authorization RBAC
Posted by: JoellSVK - 01-14-2020, 01:47 AM - Forum: Best Practices - Replies (1)

Hello,
I am just dealing with authorization in a multi-app environment for my project.

Setup is like that my project uses single CI core, one shared folder as a shared app/module and then independent apps that uses that shared app and CI core.

Now I prepared authorization and authentication classes. Authentication is done via a filter so that part is covered, when any request is made, it goes through this filter, but now I need to process authorization (permissions to use apps). I have for each app (exe, read, write, modify, special and full) access permissions to do actions.

1. How do you deal with first access to execute in the controller? Do you put it to initController? In previous, I would use constructor but in CI4 constructor is called before initializing of controller that makes hard to return view (actually it is not possible)

2. How you deal with access denied? Do you use exception such as 404 or simple you call-in function return view with access denied?

Any suggestion for how this could be done in the most logical way? Smile

THX


  Redirect and baseURL with subdir not working
Posted by: tgix - 01-13-2020, 11:57 PM - Forum: CodeIgniter 4 Support - Replies (1)

Just checking if I am doing something wrong.
Currently, https://github.com/codeigniter4/CodeIgni...ssues/2445 is the only thing that keeps me from adopting CI4 completely as I need to hack a system file to get it to work. I have downloaded the latest develop from github but still no go.

So, my question is - is it me doing something wrong?

I have baseURL = 'https://backend.tangixdev.se/client/'
I have updated public/.htaccess and changed the RewriteBase:

Code:
RewriteBase /client/

Routes are setup:
Code:
$routes->add('home', 'Home::index');
$routes->add('home/test', 'Home::test');
$routes->add('home/index', 'Home::index');


Now trying to do redirects from https://backend.tangixdev.se/client/home/test and it doesn't work:
Code:
return $this->response->redirect('/home/index'); // redirects to https://backend.tangixdev.se/home/index
Trying:
Code:
return $this->response->redirect('home/index'); // redirects to https://backend.tangixdev.se/client/home/home/index

The only thing that works for me is:
Code:
return $this->response->redirect(site_url('home/index'));

Is the last snippet the correct way to do a redirect? But this seems to override the routing logic?

According to the documentation we should do something like this:
Code:
return $this->response->redirect()->to('/home/index');

But this gives error: Too few arguments to function CodeIgniter\HTTP\Response::redirect(), 0 passed in

If anyone could point me in the right direction that would be much appreciated. As indicated in the issue reference, my only way forward is using site_url() or hack the framework file.
Too few arguments to function Code


  Array inside array
Posted by: manigopal - 01-13-2020, 08:34 PM - Forum: CodeIgniter 3.x - Replies (6)

I want to get data's from 3tables (its for invoice details by customer).

Invoice Details table : https://ibb.co/WGtBkFt
Invoice Info table      : https://ibb.co/rdqwGVp
Products Info          : https://ibb.co/QPsVwY7


My code is


// Particular Customers Sales Orders
    public function particular_customers_sales_order_api(){
        $customer_id = $_POST['customer_id'];

        $invoice_details = $this->db->query("SELECT ii.invoice_no, ii.invoice_date, ii.total_igst, ii.total_cgst, ii.total_sgst, ii.invoice_sub_total, ii.invoice_discount, ii.invoice_total, ii.customer_id, ii.customer_name, ii.customer_address, ii.customer_city, ii.customer_state, ii.customer_pincode, ii.customer_phone_no, ii.customer_type, ii.customer_shipping_address, ii.customer_shipping_city, ii.customer_shipping_state, ii.customer_shipping_pincode, ii.customer_shipping_phone_no, ii.payment_mode, ii.transaction_details, ii.invoice_status FROM invoice_info ii LEFT JOIN invoice_details id ON ii.invoice_no = id.invoice_no WHERE customer_id = $customer_id GROUP BY ii.invoice_no");

        $invoice_details_array = $invoice_details->result_array();

        $invoice_no = $invoice_details_array[0]['invoice_no'];


        /*$items_list = $this->db->query("SELECT * FROM invoice_info ii JOIN invoice_details id ON ii.invoice_no = id.invoice_no JOIN products_info pi ON id.product_id = pi.product_id WHERE customer_id = $customer_id ");*/

        $items_list = $this->db->query("SELECT * FROM invoice_details id JOIN products_info pi ON id.product_id = pi.product_id WHERE invoice_no = $invoice_no");

        $num = $invoice_details->num_rows();
        //$num .= $items_list->num_rows();


        //$invoice_details_result = $invoice_details->result_array();
        $invoice_details_result = $invoice_details->result_array();
        $items_list_result = $items_list->result_array();

        //$items_list_array = array('hi'=>$items_list_result);

        $particular_customers_sales_order = array_merge($invoice_details_result,$items_list_result);

        if($num > 0){

            echo json_encode (
                    array(
                        "status"=>'true',
                        "particular_customers_sales_order"=>$particular_customers_sales_order,
                        //"1"=>$invoice_no,
                    ));
        } else {

        echo json_encode (
                    array(
                        "status"=>'false',
                        "message"=>'No Order Found',
                    ));
    }

    }



Output (current) :


{
    "status": "true",
    "particular_customers_sales_order": [
        {
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "total_igst": null,
            "total_cgst": "126.73",
            "total_sgst": "126.73",
            "invoice_sub_total": "5069.00",
            "invoice_discount": null,
            "invoice_total": "5322.46",
            "customer_id": "1",
            "customer_name": "Ariyaputhiran",
            "customer_address": "OMR",
            "customer_city": "Vinayagapuram, Tindivanam",
            "customer_state": "Tamilnadu",
            "customer_pincode": "600121",
            "customer_phone_no": "2147483647",
            "customer_type": "general",
            "customer_shipping_address": "Vinayagapuram, Tindivanam",
            "customer_shipping_city": "Chennai",
            "customer_shipping_state": "Tamilnadu",
            "customer_shipping_pincode": "600121",
            "customer_shipping_phone_no": "2147483647",
            "payment_mode": "Online Payment",
            "transaction_details": "11832133345",
            "invoice_status": "Completed"
        },
        {
            "invoice_no": "3",
            "invoice_date": "2020-01-13",
            "total_igst": null,
            "total_cgst": "29.85",
            "total_sgst": "29.85",
            "invoice_sub_total": "1194.00",
            "invoice_discount": null,
            "invoice_total": "1253.70",
            "customer_id": "1",
            "customer_name": "Ariyaputhiran",
            "customer_address": "Vinayagapuram, Tindivanam",
            "customer_city": "Chennai",
            "customer_state": "Tamilnadu",
            "customer_pincode": "600121",
            "customer_phone_no": "2147483647",
            "customer_type": "general",
            "customer_shipping_address": "Vinayagapuram, Tindivanam",
            "customer_shipping_city": "Chennai",
            "customer_shipping_state": "Tamilnadu",
            "customer_shipping_pincode": "600121",
            "customer_shipping_phone_no": "2147483647",
            "payment_mode": "Cash on Delivery",
            "transaction_details": "Cash on Devlivery",
            "invoice_status": "Pending"
        },
        {
            "id": "1",
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "product_id": "5",
            "seller_id": "1",
            "product_name": "Mens Checked Formal Shirt",
            "product_price": "504.00",
            "product_quantity": "1",
            "sub_total": "504.00",
            "sgst_tax": "2.50",
            "sgst_amount": "12.60",
            "cgst_tax": "2.50",
            "cgst_amount": "12.60",
            "igst_tax": null,
            "igst_amount": null,
            "total_price": "529.20",
            "product_featured_image": "stop-mens-checked-formal-shirt-01.jpg",
            "product_description": "Pick a formal style that spells freshness, simplicity and comfort with this shirt. Well-suited for regular use, this simple shirt is sure to attract a lot of admirers.",
            "product_additional_image_01": "stop-mens-checked-formal-shirt-02.jpg",
            "product_additional_image_02": "stop-mens-checked-formal-shirt-03.jpg",
            "quantity": "17",
            "original_price": "524.00",
            "sale_price": "504.00",
            "tax_percent_cgst": "2.50",
            "tax_percent_sgst": "2.50",
            "tax_percent_igst": "0.00",
            "category_id": "15",
            "category_name": "Formal Shirts",
            "seller_name": "Althaf Mannargudi",
            "is_featured": "No",
            "status": "Enable",
            "views_count": "0"
        },
        {
            "id": "2",
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "product_id": "11",
            "seller_id": "7",
            "product_name": "Printed Men Grey Regular Shorts",
            "product_price": "625.00",
            "product_quantity": "2",
            "sub_total": "1250.00",
            "sgst_tax": "2.50",
            "sgst_amount": "31.25",
            "cgst_tax": "2.50",
            "cgst_amount": "31.25",
            "igst_tax": null,
            "igst_amount": null,
            "total_price": "1312.50",
            "product_featured_image": "jockey-printed-men-grey-regular-shorts-01.jpeg",
            "product_description": "Printed Men Grey Regular Shorts",
            "product_additional_image_01": "",
            "product_additional_image_02": "",
            "quantity": "33",
            "original_price": "649.00",
            "sale_price": "625.00",
            "tax_percent_cgst": "2.50",
            "tax_percent_sgst": "2.50",
            "tax_percent_igst": "0.00",
            "category_id": "17",
            "category_name": "Trousers",
            "seller_name": "Umapathy",
            "is_featured": "Yes",
            "status": "Enable",
            "views_count": "0"
        },
        {
            "id": "3",
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "product_id": "15",
            "seller_id": "7",
            "product_name": "Yellow Chanderi Cotton Designer Patch Work Saree",
            "product_price": "663.00",
            "product_quantity": "5",
            "sub_total": "3315.00",
            "sgst_tax": "2.50",
            "sgst_amount": "82.88",
            "cgst_tax": "2.50",
            "cgst_amount": "82.88",
            "igst_tax": null,
            "igst_amount": null,
            "total_price": "3480.76",
            "product_featured_image": "yellow-chanderi-cotton-designer-patch-work-saree-01.jpg",
            "product_description": "Saree Fabric - Chanderi Cotton (5.5 Metres Saree)",
            "product_additional_image_01": "yellow-chanderi-cotton-designer-patch-work-saree-02.jpg",
            "product_additional_image_02": "yellow-chanderi-cotton-designer-patch-work-saree-03.jpg",
            "quantity": "94",
            "original_price": "1343.00",
            "sale_price": "663.00",
            "tax_percent_cgst": "2.50",
            "tax_percent_sgst": "2.50",
            "tax_percent_igst": "0.00",
            "category_id": "18",
            "category_name": "Banarasi Silk Designer Saree",
            "seller_name": "Umapathy",
            "is_featured": "Yes",
            "status": "Enable",
            "views_count": "0"
        }
    ]
}



But what i expect is


{
    "status": "true",
    "particular_customers_sales_order": [
        {
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "total_igst": null,
            "total_cgst": "126.73",
            "total_sgst": "126.73",
            "invoice_sub_total": "5069.00",
            "invoice_discount": null,
            "invoice_total": "5322.46",
            "customer_id": "1",
            "customer_name": "Ariyaputhiran",
            "customer_address": "OMR",
            "customer_city": "Vinayagapuram, Tindivanam",
            "customer_state": "Tamilnadu",
            "customer_pincode": "600121",
            "customer_phone_no": "2147483647",
            "customer_type": "general",
            "customer_shipping_address": "Vinayagapuram, Tindivanam",
            "customer_shipping_city": "Chennai",
            "customer_shipping_state": "Tamilnadu",
            "customer_shipping_pincode": "600121",
            "customer_shipping_phone_no": "2147483647",
            "payment_mode": "Online Payment",
            "transaction_details": "11832133345",
            "invoice_status": "Completed",
            "line_items": [
                {
                    "id": "3",
                    "invoice_no": "1",
                    "invoice_date": "2020-01-11",
                    "product_id": "15",
                    "seller_id": "7",
                    "product_name": "Yellow Chanderi Cotton Designer Patch Work Saree",
                    "product_price": "663.00",
                    "product_quantity": "5",
                    "sub_total": "3315.00",
                    "sgst_tax": "2.50",
                    "sgst_amount": "82.88",
                    "cgst_tax": "2.50",
                    "cgst_amount": "82.88",
                    "igst_tax": null,
                    "igst_amount": null,
                    "total_price": "3480.76",
                    "product_featured_image": "yellow-chanderi-cotton-designer-patch-work-saree-01.jpg",
                    "product_description": "Saree Fabric - Chanderi Cotton (5.5 Metres Saree)",
                    "product_additional_image_01": "yellow-chanderi-cotton-designer-patch-work-saree-02.jpg",
                    "product_additional_image_02": "yellow-chanderi-cotton-designer-patch-work-saree-03.jpg",
                    "quantity": "94",
                    "original_price": "1343.00",
                    "sale_price": "663.00",
                    "tax_percent_cgst": "2.50",
                    "tax_percent_sgst": "2.50",
                    "tax_percent_igst": "0.00",
                    "category_id": "18",
                    "category_name": "Banarasi Silk Designer Saree",
                    "seller_name": "Umapathy",
                    "is_featured": "Yes",
                    "status": "Enable",
                    "views_count": "0"
                },
                {
                    "id": "1",
                    "invoice_no": "1",
                    "invoice_date": "2020-01-11",
                    "product_id": "5",
                    "seller_id": "1",
                    "product_name": "Mens Checked Formal Shirt",
                    "product_price": "504.00",
                    "product_quantity": "1",
                    "sub_total": "504.00",
                    "sgst_tax": "2.50",
                    "sgst_amount": "12.60",
                    "cgst_tax": "2.50",
                    "cgst_amount": "12.60",
                    "igst_tax": null,
                    "igst_amount": null,
                    "total_price": "529.20",
                    "product_featured_image": "stop-mens-checked-formal-shirt-01.jpg",
                    "product_description": "Pick a formal style that spells freshness, simplicity and comfort with this shirt. Well-suited for regular use, this simple shirt is sure to attract a lot of admirers.",
                    "product_additional_image_01": "stop-mens-checked-formal-shirt-02.jpg",
                    "product_additional_image_02": "stop-mens-checked-formal-shirt-03.jpg",
                    "quantity": "17",
                    "original_price": "524.00",
                    "sale_price": "504.00",
                    "tax_percent_cgst": "2.50",
                    "tax_percent_sgst": "2.50",
                    "tax_percent_igst": "0.00",
                    "category_id": "15",
                    "category_name": "Formal Shirts",
                    "seller_name": "Althaf Mannargudi",
                    "is_featured": "No",
                    "status": "Enable",
                    "views_count": "0"
                },

        },
        {
            "invoice_no": "3",
            "invoice_date": "2020-01-13",
            "total_igst": null,
            "total_cgst": "29.85",
            "total_sgst": "29.85",
            "invoice_sub_total": "1194.00",
            "invoice_discount": null,
            "invoice_total": "1253.70",
            "customer_id": "1",
            "customer_name": "Ariyaputhiran",
            "customer_address": "Vinayagapuram, Tindivanam",
            "customer_city": "Chennai",
            "customer_state": "Tamilnadu",
            "customer_pincode": "600121",
            "customer_phone_no": "2147483647",
            "customer_type": "general",
            "customer_shipping_address": "Vinayagapuram, Tindivanam",
            "customer_shipping_city": "Chennai",
            "customer_shipping_state": "Tamilnadu",
            "customer_shipping_pincode": "600121",
            "customer_shipping_phone_no": "2147483647",
            "payment_mode": "Cash on Delivery",
            "transaction_details": "Cash on Devlivery",
            "invoice_status": "Pending"
        },
        {
            "id": "2",
            "invoice_no": "1",
            "invoice_date": "2020-01-11",
            "product_id": "11",
            "seller_id": "7",
            "product_name": "Printed Men Grey Regular Shorts",
            "product_price": "625.00",
            "product_quantity": "2",
            "sub_total": "1250.00",
            "sgst_tax": "2.50",
            "sgst_amount": "31.25",
            "cgst_tax": "2.50",
            "cgst_amount": "31.25",
            "igst_tax": null,
            "igst_amount": null,
            "total_price": "1312.50",
            "product_featured_image": "jockey-printed-men-grey-regular-shorts-01.jpeg",
            "product_description": "Printed Men Grey Regular Shorts",
            "product_additional_image_01": "",
            "product_additional_image_02": "",
            "quantity": "33",
            "original_price": "649.00",
            "sale_price": "625.00",
            "tax_percent_cgst": "2.50",
            "tax_percent_sgst": "2.50",
            "tax_percent_igst": "0.00",
            "category_id": "17",
            "category_name": "Trousers",
            "seller_name": "Umapathy",
            "is_featured": "Yes",
            "status": "Enable",
            "views_count": "0"
        },
     
    ]
}


  How to connect to ibm db2 database on windows
Posted by: luciomdesouza - 01-13-2020, 05:27 PM - Forum: General Help - Replies (1)

Hello!

How to connect to ibm db2 database on windows?

It is possible?

Thank you.


  Problem with validatiomessage
Posted by: snelledre - 01-13-2020, 11:23 AM - Forum: CodeIgniter 4 Support - No Replies

Hello,

I have a problem with the validationmessage in the model.
The validation works perfect but why can't i see the validationmessage from the model?
Through this way i can my own message in Dutch for each error.
As this works then i can have the field names in englisch and not in Dutch.

Thanx for the help


Controller:

PHP Code:
<?php namespace App\Controllers;
use 
App\Models\DepartmentModel;
use 
App\Entities\Departments;

public function 
create()
    {
        $model = new DepartmentModel();

        // Validate here first, since some things
        $rules array_merge($model->getValidationRules(['only' => ['naam']]));

        if (! $this->validate($rules))
        {
            return redirect()->back()->withInput()->with('errors'$model->errors());
        }

        // Save the department
        $department = new Departments($this->request->getPost());

        if (! $model->save($department))
        {
            return redirect()->back()->withInput()->with('errors'$model->errors());
        }

        // Success!
        return redirect()->route('department')->with('message''Afdeling is toegevoegd.');

    


Model:
PHP Code:
<?php namespace App\Models;

use 
CodeIgniter\Model;
use 
App\Entities\Departments;

class 
DepartmentModel extends Model
{
    protected $table      'department';
    protected $primaryKey 'id';

    protected $returnType 'App\Entities\Departments';
    protected $useSoftDeletes false;

    protected $allowedFields = ['naam''omschrijving''actief'];

    protected $useTimestamps true;
    protected $createdField  'created_at';
    protected $updatedField  'updated_at';
    protected $deletedField  'deleted_at';

    protected $validationRules    = [
        'naam'          => 'required|min_length[2]|max_length[150]|is_unique[department.naam,id,{id}]',
        'omschrijving'  => 'max_length[150]',
    ];
    protected $validationMessages = [
        'naam'=> [
            'min_length' => 'Sorry. Deze naam is reeds al aanwezig. Kies een andere naam.'
        ]
    ];
    protected $skipValidation     false;




View:
PHP Code:
<?= $this->extend('base'?>

<?= $this->section('breadcrumb'?>

<div class="row">
    <div class="col-12">
        <div class="page-title-box">
            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item"><a href="<?= route_to('/'?>">Home</a></li>
                    <li class="breadcrumb-item"><a href="<?= route_to('department'?>"><?= $title ?></a></li>
                    <li class="breadcrumb-item active">Nieuw</li>
                </ol>
            </div>
            <h4 class="page-title"><?= $title ?></h4>
        </div>
    </div>
</div>

<?= $this->endSection() ?>

<?= $this->section('content'?>

<div class="row">
    <div class="col-lg-6 offset-lg-3 col-md-12">
        <div class="card">
            <div class="card-body">
                <h4 class="header-title mb-3">Afdeling nieuw</h4>

                <form class="needs-validation" action="<?= route_to('department'?>" method="post" novalidate>
                    <?= csrf_field() ?>
                    <div class="form-group mb-3">
                        <label for="naam">Naam<span class="text-danger">*</span></label>
                        <input type="text" class="form-control <?php if(session('errors.naam')) : ?>is-invalid<?php endif ?>" id="naam" name="naam" placeholder="Naam" value="<?= old('naam'?>" required autofocus>
                        <div class="invalid-feedback">
                            <?= session('errors.naam'?>
                        </div>
                    </div>
                    <div class="form-group mb-3">
                        <label for="omschrijving">Omschrijving</label>
                        <input type="text" class="form-control <?php if(session('errors.omschrijving')) : ?>is-invalid<?php endif ?>" id="omschrijving" name="omschrijving" placeholder="Omschrijving" value="<?= old('omschrijving'?>">
                        <div class="invalid-feedback">
                            <?= session('errors.omschrijving'?>
                        </div>
                    </div>
                    <div class="form-group mb-3">
                        <div class="custom-control custom-checkbox form-check">
                            <input type="checkbox" class="custom-control-input" id="actief" name="actief" value="1" checked>
                            <label class="custom-control-label" for="actief">Actief</label>
                        </div>
                    </div>
                    <a class="btn btn-info mr-2" href="<?= route_to('department'?>">Terug</a>
                    <button class="btn btn-primary" type="submit">Verstuur</button>
                </form>

            </div> <!-- end card-body-->
        </div> <!-- end card-->
    </div> <!-- end col-->
</div> <!-- end row -->

<?= $this->endSection() ?>

Entities:
PHP Code:
<?php namespace App\Entities;

use 
CodeIgniter\Entity;

class 
Departments extends Entity
{
    /**
     * Define properties that are automatically converted to Time instances.
     */
    protected $dates = ['created_at''updated_at''deleted_at'];


  shell script for decryption in codeigniter-v3.1.11
Posted by: vkrishn - 01-13-2020, 08:48 AM - Forum: Addins - No Replies

Hi,
I have put a shell script that lets me
decrypt ciphertext from codeigniter (v3.1.11).
Its still a WIP, but does the decryption correctly.
Also added some test code.
https://gist.github.com/insteps/db43bdf0...277332ffee
Suggestions are welcomed.
Thanks.
V.Krishn


  How consume JWT token?
Posted by: omid_student - 01-13-2020, 03:05 AM - Forum: General Help - No Replies

Hi
In this my project,user try to login and send sms to user and return JWT token
So when user enter confirmation code and login to app and also receive new JWT token
But i need consume or destroy login JWT token until user cannot use prev token for retry login with it token

Here:
1- Login user
2- get token contain code and mobile example
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMSIsIm1vYmlsZSI6IjA5MTI0OTUyNzM1In0.IU_2kJd23sUgC-bNiBHKOofs1mdtyCnfWLEZTuJmsXY

3- user enter confirmation code and send with above token to controller

4- if token is OK,so login to app and create new token

there is a important problem

If user send again -2 token to controller,user can again make new token and receive
but i need destrory relate token example unset session for prevent access use to above token

Thanks


  Remote path for Application Folder
Posted by: sreejith - 01-12-2020, 11:44 PM - Forum: CodeIgniter 4 Support - Replies (2)

Can i use application folder hosted in remote server?

Example: $application_folder = 'https://codeigniter.com/demo_guide/application';


  Show location in google map
Posted by: kelapamuda - 01-12-2020, 10:47 PM - Forum: General Help - Replies (3)

Hello.
I have data in my table, for example  :

School Name     Latitude        Longitude
School A           xxxxxxxx       yyyyyyy
School B            rrrrrrrrrrr       ttttttttttt

I want to show them in maps,,,so when a user search the school name,,for example School A,, then the user will get a google map with the location of that school. How to do that ? Is that special library,,i already google,but not find right answer yet. Thanks .



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.