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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,438
» Latest member: ashArh130
» Forum threads: 67,196
» Forum posts: 420,564

Full Statistics

Latest Threads
Inappropriate users
Forum: News & Discussion
1 hour ago
» Replies: 11   » Views: 804
PDO Drivers
Forum: CodeIgniter 3.x
2 hours ago
» Replies: 1   » Views: 62
404 how make a rote
Forum: Events
2 hours ago
» Replies: 3   » Views: 1,193
[split] Bug in new form v...
Forum: CodeIgniter 3.x
3 hours ago
» Replies: 1   » Views: 50
TLS version of Email Libr...
Forum: Libraries & Helpers
3 hours ago
» Replies: 2   » Views: 68
New to COdeIgniter
Forum: Choosing CodeIgniter
3 hours ago
» Replies: 7   » Views: 831
CodeIgniter 3.1.7 Release...
Forum: News & Discussion
3 hours ago
» Replies: 12   » Views: 3,332
Looking for bids to conve...
Forum: Jobs
4 hours ago
» Replies: 3   » Views: 80
Facebook login
Forum: General Help
5 hours ago
» Replies: 4   » Views: 120
CI do not have model to m...
Forum: CodeIgniter 4 Feature Requests
Yesterday, 05:38 PM
» Replies: 3   » Views: 443

 
  [split] Bug in new form validation?
Posted by: angleproof - 8 hours ago - Forum: CodeIgniter 3.x - Replies (1)

(01-13-2018, 09:47 AM)jlp Wrote: CodeIgniter 3.1.7 was released today, with some changes and some bug fixes.

Changes: Updated the Cache, Email, Form Validation, Loader and Pagination libraries; deprecated the CAPTCHA helper's create_captcha() function.

Bug fixes: Database, Database Utilities, Query Builder and Session libraries; URL helper; $config['allow_get_array'] handling.

This is recommended for all users of version 3. Download v3.1.7 now, and we encourage you to read the changelog, and to check the directions for upgrading from a previous version.

Hello James,

I just came across an issue with the new Form Validation (valid_email rule) whereby I receive the following error: "Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46'".  Am I overlooking anything?

Thanks,
Mike


  Looking for bids to convert my CI site
Posted by: Blitzburgh - Yesterday, 04:45 PM - Forum: Jobs - Replies (3)

I am looking for someone to give me a bid on a full site conversion - upversion to CI 3 from CI 2.

IF CI 4 comes out and it is stable - I will then want this same person to do the update from 3 to 4. I am not willing to accept mistakes so please do not offer anything if you do not believe you are able to do this flawlessly.

You can PM me here or via my e-mail address of [email protected]

I am looking for a complete price - start to finish for the conversion from 2 to 3.

Thank you.


Photo TLS version of Email Library
Posted by: Juicepig - Yesterday, 02:35 PM - Forum: Libraries & Helpers - Replies (2)

Ubuntu: 16.04 
Apache:  Apache/2.4.18 (Ubuntu)
CI: 3.1.6

I am using the built in library Email function in CI.  Just a question for anyone who might know... Is it TLS1.2?

 The emails are sent out through Microsoft Office365, and they have sent this motification that they will be stopping support:

Quote:we are moving all of our online services to Transport Layer Security (TLS) 1.2+. As a result, we will be removing support for TLS versions less than 1.2 from our online services, beginning March 1, 2018.


Any idea how i might be go about finding out the TLS version that the CodeIgniter Library is sending? 


  Why is my ENVIRONMENT constant, "development" if my codeigniter app is online?
Posted by: desbest - Yesterday, 02:18 PM - Forum: Installation & Setup - Replies (3)

Why is my ENVIRONMENT constant, "development" if my codeigniter app is online, not on localhost?
What is going on? How do I fix it?


  PDO Drivers
Posted by: dturner123 - Yesterday, 09:47 AM - Forum: CodeIgniter 3.x - Replies (1)

Hi,

The documentation says that PDO DB Driver is support, however, the methods generally used in PDO connections don't seem to be anywhere in the files i.e. I would have expected to see code similar to the below, but I don't.

Code:
$stmt = $pdo->prepare('SELECT * FROM users WHERE email = ? AND status=?');
$stmt->execute([$email, $status]);

Does the PDO Driver in CI use prepare and execute statements?

Thanks.


  Facebook login
Posted by: Marcolino92 - Yesterday, 04:50 AM - Forum: General Help - Replies (4)

Hello guys, sorry for the question, which I have already tried immensely on google but I could not make it with any tutorial present. I would like to create a facebook login, but it seems that every tutorial is not fully functional.

Can you give me a guide or a small example of this? I would simply like a login with an obvious system of permissions (if logged in or not). I've tried a lot of guides, but it seems to always miss something or always make a mistake.


Information Load view in custom frame
Posted by: c3media - 01-15-2018, 08:55 PM - Forum: Model-View-Controller - Replies (2)

Hello,


I have one page frame based in codeingniter, and need to load other view here; this is scenario example:
[Image: 2aihdfm.png]
This is Controller code:


PHP Code:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

class 
Notifications extends MY_Controller
{

    function __construct()
    {
        parent::__construct();

        if (!$this->loggedIn) {
            $this->session->set_userdata('requested_page'$this->uri->uri_string());
            $this->sma->md('login');
        }
        if (!$this->Owner && !$this->Admin) {
            $this->session->set_flashdata('warning'lang('access_denied'));
            redirect($_SERVER["HTTP_REFERER"]);
        }
        $this->lang->load('notifications'$this->Settings->user_language);
        $this->load->library('form_validation');
        $this->load->model('cmt_model');

    }

    function index()
    {
        if (!$this->Owner && !$this->Admin) {
            $this->session->set_flashdata('warning'lang('access_denied'));
            redirect($_SERVER["HTTP_REFERER"]);
        }

        $this->data['error'] = validation_errors() ? validation_errors() : $this->session->flashdata('error');
        $bc = array(array('link' => base_url(), 'page' => lang('home')), array('link' => '#''page' => lang('notifications')));
        $meta = array('page_title' => lang('notifications'), 'bc' => $bc);
        $this->page_construct('notifications/index'$meta$this->data);
    }

    function getNotifications()
    {

        $this->load->library('datatables');
        $this->datatables
            
->select("id, comment, date, from_date, till_date")
            ->from("notifications")
            //->where('notification', 1)
            ->add_column("Actions""<div class=\"text-center\"><a href='" site_url('notifications/edit/$1') . "' data-toggle='modal' data-target='#myModal' class='tip' title='" lang("edit_notification") . "'><i class=\"fa fa-edit\"></i></a> <a href='#' class='tip po' title='<b>" $this->lang->line("delete_notification") . "</b>' data-content=\"<p>" lang('r_u_sure') . "</p><a class='btn btn-danger po-delete' href='" site_url('notifications/delete/$1') . "'>" lang('i_m_sure') . "</a> <button class='btn po-close'>" lang('no') . "</button>\"  rel='popover'><i class=\"fa fa-trash-o\"></i></a></div>""id");
        $this->datatables->unset_column('id');
        echo $this->datatables->generate();
    }

    function add()
    {

        $this->form_validation->set_rules('comment'lang("comment"), 'required|min_length[3]');

        if ($this->form_validation->run() == true) {
            $data = array(
                'comment' => $this->input->post('comment'),
                'from_date' => $this->input->post('from_date') ? $this->sma->fld($this->input->post('from_date')) : NULL,
                'till_date' => $this->input->post('to_date') ? $this->sma->fld($this->input->post('to_date')) : NULL,
                'scope' => $this->input->post('scope'),
            );
        } elseif ($this->input->post('submit')) {
            $this->session->set_flashdata('error'validation_errors());
            redirect("notifications");
        }

        if ($this->form_validation->run() == true && $this->cmt_model->addNotification($data)) {
            $this->session->set_flashdata('message'lang("notification_added"));
            redirect("notifications");
        } else {

            $this->data['comment'] = array('name' => 'comment',
                'id' => 'comment',
                'type' => 'textarea',
                'class' => 'form-control',
                'required' => 'required',
                'value' => $this->form_validation->set_value('comment'),
            );

            $this->data['error'] = validation_errors();
            $this->data['modal_js'] = $this->site->modal_js();
            $this->load->view($this->theme 'notifications/add'$this->data);

        }
    }

    function edit($id NULL)
    {
        if (!$this->Owner) {
            $this->session->set_flashdata('warning'lang('access_denied'));
            redirect($_SERVER["HTTP_REFERER"]);
        }

        if ($this->input->post('id')) {
            $id $this->input->post('id');
        }

        $this->form_validation->set_rules('comment'lang("notifications"), 'required|min_length[3]');

        if ($this->form_validation->run() == true) {
            $data = array(
                'comment' => $this->input->post('comment'),
                'from_date' => $this->input->post('from_date') ? $this->sma->fld($this->input->post('from_date')) : NULL,
                'till_date' => $this->input->post('to_date') ? $this->sma->fld($this->input->post('to_date')) : NULL,
                'scope' => $this->input->post('scope'),
            );
        } elseif ($this->input->post('submit')) {
            $this->session->set_flashdata('error'validation_errors());
            redirect("notifications");
        }

        if ($this->form_validation->run() == true && $this->cmt_model->updateNotification($id$data)) {

            $this->session->set_flashdata('message'lang("notification_updated"));
            redirect("notifications");

        } else {

            $comment $this->cmt_model->getCommentByID($id);

            $this->data['comment'] = array('name' => 'comment',
                'id' => 'comment',
                'type' => 'textarea',
                'class' => 'form-control',
                'required' => 'required',
                'value' => $this->form_validation->set_value('comment'$comment->comment),
            );


            $this->data['notification'] = $comment;
            $this->data['id'] = $id;
            $this->data['modal_js'] = $this->site->modal_js();
            $this->data['error'] = validation_errors();
            $this->load->view($this->theme 'notifications/edit'$this->data);

        }
    }

    function delete($id NULL)
    {
        if (!$this->Owner) {
            $this->session->set_flashdata('warning'lang('access_denied'));
            redirect($_SERVER["HTTP_REFERER"]);
        }

        if ($this->cmt_model->deleteComment($id)) {
            $this->sma->send_json(array('error' => 0'msg' => lang("notifications_deleted")));
        }
    }



This is View code:


PHP Code:
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<script>
    $(document).ready(function () {
        oTable = $('#NTTable').dataTable({
            "aaSorting": [[1, "asc"], [2, "asc"]],
            "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "<?= lang('all'?>"]],
            "iDisplayLength": <?= $Settings->rows_per_page ?>,
            'bProcessing': true, 'bServerSide': true,
            'sAjaxSource': '<?= site_url('notifications/getNotifications'?>',
            'fnServerData': function (sSource, aoData, fnCallback) {
                aoData.push({
                    "name": "<?= $this->security->get_csrf_token_name() ?>",
                    "value": "<?= $this->security->get_csrf_hash() ?>"
                });
                $.ajax({'dataType': 'json', 'type': 'POST', 'url': sSource, 'data': aoData, 'success': fnCallback});
            },
            "aoColumns": [null, {"mRender": fld}, {"mRender": fld}, {"mRender": fld}, {"bSortable": false}]
        });
    });
</script>

<div class="box">
    <div class="box-header">
        <h2 class="blue"><i class="fa-fw fa fa-info-circle"></i><?= lang('notifications'); ?></h2>

        <div class="box-icon">
            <ul class="btn-tasks">
                <li class="dropdown"><a href="<?= site_url('notifications/add'); ?>" data-toggle="modal"
                                        data-target="#myModal"><i class="icon fa fa-plus"></i></a></li>
            </ul>
        </div>
    </div>
    <div class="box-content">
        <div class="row">
            <div class="col-lg-12">

                <p class="introtext"><?= lang('list_results'); ?></p>

                <div class="table-responsive">
                    <table id="NTTable" cellpadding="0" cellspacing="0" border="0"
                           class="table table-bordered table-hover table-striped">
                        <thead>
                        <tr>
                            <th><?php echo $this->lang->line("notification"); ?></th>
                            <th style="width: 140px;"><?php echo $this->lang->line("submitted_at"); ?></th>
                            <th style="width: 140px;"><?php echo $this->lang->line("from"); ?></th>
                            <th style="width: 140px;"><?php echo $this->lang->line("till"); ?></th>
                            <th style="width:80px;"><?php echo $this->lang->line("actions"); ?></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td colspan="5" class="dataTables_empty"><?= lang('loading_data_from_server'?></td>
                        </tr>

                        </tbody>
                    </table>
                </div>
                <!--<p><a href="<?php echo site_url('notifications/add'); ?>" class="btn btn-primary" data-toggle="modal" data-target="#myModal"><?php echo $this->lang->line("add_notification"); ?></a></p>-->
            </div>
        </div>
    </div>
</div> 

Then, as above I need to load this scenario in same frame:

[Image: 2i2c3lv.jpg]
This is Controller code:


PHP Code:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

class 
Segway extends MY_Controller
{

  function __construct()
  {
      parent::__construct();

      if (!$this->loggedIn) {
          $this->session->set_userdata('requested_page'$this->uri->uri_string());
          $this->sma->md('login');
      }
      if (!$this->Owner && !$this->Admin) {
          $this->session->set_flashdata('warning'lang('access_denied'));
          redirect($_SERVER["HTTP_REFERER"]);
      }
  }

public function 
show_grid()
{
$db_conf = array();
$db_conf["type"] = "mysqli"// mysql,oci8(for oracle),mssql,postgres,sybase
$db_conf["server"] = "localhost";
$db_conf["user"] = "root";
$db_conf["password"] = "root";
$db_conf["database"] = "griddemo";

require_once(
"lib/inc/jqgrid_dist.php");
$g = new jqgrid($db_conf);

$grid = array();
// set table for CRUD operations
$grid["caption"] = "Test CI GRID";
$grid["rowNum"] = 10;//10,15 -- tinggi grid
$grid["shrinkToFit"] = true;
$grid["autowidth"] = true;
$grid["hidegrid"] = true;
//$grid["width"] = true;
$grid["height"] = 450;
#$grid["sortorder"] = "desc";
$grid["toolbar"] = "top";
$grid["add_options"] = array("recreateForm" => true"closeAfterEdit"=>true'width'=>'750''top'=>'150''left'=>'200');
$grid["edit_options"] = array("recreateForm" => true"closeAfterEdit"=>true'width'=>'750''top'=>'150''left'=>'200');
$grid["view_options"] = array("recreateForm" => true"closeAfterEdit"=>true'width'=>'750''top'=>'150''left'=>'200');
$g->set_options($grid);

$g->set_actions(array(
"add"=>true// allow/disallow add
"edit"=>true// allow/disallow edit
"view"=>true// allow/disallow edit
"delete"=>true// allow/disallow delete
"rowactions"=>true// show/hide row wise edit/del/save option
"export_excel"=>true// show/hide export to excel option
"export_pdf"=>true,
"autofilter" => false// show/hide autofilter for search - advance, false,true
"search" => false// show single/multi field search condition (e.g. simple or advance)
"inlineedit" => true
)
);

// render grid
$g->select_command "select * FROM country";
$g->table "country";
$g->set_columns($cols);

$data['grid'] = $g->render("list1");
//$this->load->view('grilla',$data);
    $this->load->view('default/views/show_grid',$data); // For circle 404 page

}




And this is View code:


PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grid page 1</title>
</head>
<body>

<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url() ?>lib/js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url() ?>lib/js/jqgrid/css/ui.jqgrid.css"></link>

<script src="<?php echo base_url() ?>lib/js/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>lib/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>lib/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>

<div class="box">
<?php echo $grid ?>
</div>
</body>
</html> 


It's working, but not load in same frame as first scenario, thank you!


  Inappropriate users
Posted by: jlp - 01-15-2018, 05:05 PM - Forum: News & Discussion - Replies (11)

Not everyone is happy with us having a "wall of shame", highlighting the users with illegal, offensive or inappropriate posts (who then get purged).

What do you think?


  Change gmail id for captcha
Posted by: hamid - 01-15-2018, 11:56 AM - Forum: Lounge - Replies (6)

I have created captcha for a website. But unfortunately, I forgot this gmail account's password and can't recover it. Now I want to remove previous captcha and create it in another gmail account. What are the necessary steps to change gmail id for new captcha ? Please suggest me.


  DB structure for bundled products
Posted by: neuron - 01-15-2018, 10:03 AM - Forum: General Help - Replies (3)

Hi, I am having problem with desinging db structure for bundled products.
In my website I sell subscription and other products for subscribers.
Subscription has additional products in it included.
I defined subscriptions as a product with product_category = SUBSCRIPTION
Currently I have product and bundled_product tables:

product table has:
product_id
product_category_id
product_price
product_discount
date_added
....

bundled_product table has:
bundle_id
product_id
date_added

In this structure I am I have some questions:

1. Where the product price should be in? in product table or bundled_product table
2. To list products to users which table should I use product table or bundled_product table. because I also have single products.
If I do this I will need to add one row for single products;
3. should I add another cross relation table for relation between bundled_product and product table? 
4. Lets say subscription bundle consists of product_type A, B, and C products (one from each product type). Lets say as promotion I want to add additional product type C to subscription. when there is 2 products with same type in bundled I need tell user which C product is MAIN product and which is PROMOTIONAL 


I building this type of DB first time I cant decide how should I design my DB.

Thanks in advance...



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