Welcome Guest, Not a member yet? Register   Sign In
Parent Page Link Not Working Correct.
#1

On my file manager I am trying to create a parent button link which will go back to previous page.

How ever if i am in a sub folder and lets say on page 3 of pagination my parent button will only display the per page query like so


Code:
http://localhost/project-2-upload/index.php?c=filemanager&per_page=6


It should display like


Code:
http://localhost/project-2-upload/index.php?c=filemanager&image_directory=Hello&per_page=6


I can echo $this->input->get('image_directory') this fine and gets the correct query string.

I am not sure what is wrong with code below any suggestions on improvment / examples and why it might not be working


PHP Code:
$parent_url ''            

//$thined_image_directory = substr($this->input->get('image_directory'), 0, strrpos($this->input->get('image_directory'),'/'));

if (null !==($this->input->get('per_page'))) {
    $back_page_no $this->input->get('per_page') - $files_limit;

    $parent_url '&per_page=' $back_page_no;
}

if (
null !==($this->input->get('image_directory'))) {
    $pos strrpos($this->input->get('image_directory'), '/');

    if ($pos) {
        $parent_url '&image_directory=' urldecode(substr($this->input->get('image_directory'), 0$pos));
    }
}

$data['parent'] = site_url('c=filemanager')  $parent_url
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
Parent Page Link Not Working Correct. - by wolfgang1983 - 03-05-2016, 02:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB