Add view random functionality.
This commit is contained in:
parent
fc502c2968
commit
e12e876805
1 changed files with 9 additions and 0 deletions
|
@ -43,4 +43,13 @@ class View extends CI_Controller {
|
||||||
|
|
||||||
$this->template->load('template', 'view', $this->data);
|
$this->template->load('template', 'view', $this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function random() {
|
||||||
|
$this->load->model('fileupload');
|
||||||
|
$total_uploads = $this->fileupload->count_uploads();
|
||||||
|
|
||||||
|
$id = rand(1,$total_uploads);
|
||||||
|
|
||||||
|
redirect('/view/specific/' . $id);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue