1
0
Fork 0

Add view random functionality.

This commit is contained in:
Andrew Tomaka 2011-11-06 01:02:32 -04:00
parent fc502c2968
commit e12e876805
1 changed files with 9 additions and 0 deletions

View File

@ -43,4 +43,13 @@ class View extends CI_Controller {
$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);
}
}