• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to create paging with form search, but query string enable??

#5
[eluser]deepydee[/eluser]
yes i use method post, but i still confuse to parsing that page coz my URI get in $indexx ??? , this sinopsis my script

in controler
Code:
class Application extends controler {
[b]var $indexx = "index.php?c=application";[/b]

....

function application()
    {
        parent::Controller();
        this->load->helper('url');
        $this->load->helper('date');
        $this->load->helper('form');
        $this->load->helper('string');
        $this->load->helper('file');
        $this->load->helper('html');
     }

function index()
    {
         if ($this->input->post('from') == 'registerold')
         {
            $this->registerold();
            return false;
        }
    }
function filter()
{
$kond = '';

if ($this->input->post('nomorregisterold') != '')
{          
$kond .= " AND nomorregisterold = '" . $this->input->post('nomorregisterold') . "' ";
}

.....

}

function registerold(){
  if(!$this->Loginkah())
         {
        $this->mainmenu();
        return false;
      }
$kond = $this->filter();
[b]$config['base_url'] = "$this->indexx";[/b]
$config['total_rows'] = $this->db->count_all("application");
$config['per_page']="20";
$this->load->library("pagination");
$this->pagination->initialize($config);

$this->data['register']=$this->applicationmodel->getSelectRegisterOld($kond,$config['per_page']);
$this->data['pagination'] = $this->pagination->create_links();            
$this->load->view('registerold',$this->data);
}

}

headers.php
Code:
<?
echo "<form name=\"form1\" method=\"post\" action=\"$indexx\" enctype=\"multipart/form-data\">";
?>

this view registerold.php

Code:
<?
include "headers.php";
?>
if($fromfilter) {
include "filter.php";
}
else {
if($register->num_rows() > 0) {
echo "<table border=0 cellspacing=1 >";
echo "<tr><td>Nomor Register</td><td>:" . $filter['nomorregister'] . "</td></tr>";
echo "</table>";
[b]echo "$pagination<br>";[/b]
include "reportregister.php";
}
}
&lt;? include "footers.php"; ?&gt;

reportregister.php
Code:
echo "<br><table border=1 align=center cellspacing=0 cellpadding=0>";
foreach ($register->result() as $row) {
echo "<td>$row->nomorregister</a></td>";

.....


}
echo "</table>";

and this model

Code:
function &getSelectRegsiterOld;($konds = '',[b]$config = '0'[/b] )
{
if($failed) {
        $bat = $this->failed;
        $kond = $konds . ' ';
        $ni = " 1 ";
    }
    
    else
     {
        
        $kond = ' AND result = 1' . $konds;
    }
$grant = "SELECT *, replace(substring(substring_index(nomorregister, '.', 4), length(substring_index(nomordaftar,'.',3 - 1)) + 1),'.', '') AS no FROM application WHERE (replace(substring(substring_index(nomorregister, '.', 1), length(substring_index(nomorregister,'.',2 - 1)) + 1),'.', '') = $bat $kond ORDER BY nomorregister DESC LIMIT [b]$config[/b]";
}

........

$result =  $this->db->query($grant);

.........

how & what can i do?


Messages In This Thread
how to create paging with form search, but query string enable?? - by El Forum - 12-02-2008, 10:01 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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