summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/ClientController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/ClientController.php')
-rw-r--r--application/modules/user/controllers/ClientController.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php
index 023de4a..b9399b2 100644
--- a/application/modules/user/controllers/ClientController.php
+++ b/application/modules/user/controllers/ClientController.php
@@ -47,8 +47,8 @@ class User_ClientController extends Zend_Controller_Action
$clientMapper = new Application_Model_ClientMapper();
$clientsInGroup = $clientMapper->findBy('groupID',$this->membership->getGroupID());
- #print_a($clientsInGroup);
- $perpage = 5;
+
+ $perpage = 10;
$req_page = $this->_request->getParam('page');
$all = count($clientsInGroup);
$numpages = ceil($all/$perpage);
@@ -56,12 +56,10 @@ class User_ClientController extends Zend_Controller_Action
$req_page = 0;
if($req_page >= $numpages)
$req_page = $numpages-1;
- $startitem = $req_page * $perpage;
- $this->pagination = array('max' => $numpages, 'selected' => $req_page);
+ $startitem = $req_page * $perpage;
- print_a($all,$numpages,$startitem,$req_page);
- $pagination = new Pbs_Pagination();
- $this->pagination = $pagination->pagination('/user/client/index',$req_page,$numpages);
+ $pagination = new Pbs_Pagination();
+ $this->view->pagination = $pagination->pagination('/user/client/index',$req_page,$numpages);
$this->view->clients = array_slice($clientsInGroup,$startitem,$perpage);
}
@@ -80,8 +78,7 @@ class User_ClientController extends Zend_Controller_Action
$this->view->addclient = $addclient;
}
else{
- $addclient = new user_Form_Client(array('buttontext' => 'Create Client'),$_POST);
- print_a($_POST);
+ $addclient = new user_Form_Client(array('buttontext' => 'Create Client'),$_POST);
if ($addclient->isValid($_POST) || ($mac != '' && $hh != '') ) {
$client = new Application_Model_Client($_POST);
$mac = ($mac!='')?$mac:$_POST['macadress'];