} } else { // value $value = Request::getOrPost("value"); } } } } $expanded = Request::getOrPost("expanded"); $page = Request::getOrPost('page'); // get the requested page $limit = Request::getOrPost('rows'); // get how many rows we want to have into the grid $sidx = Request::getOrPost('sidx'); // get index row - i.e. user click to sort $sord = Request::getOrPost('sord'); // get the direction $start = $limit * $page - $limit; //print_r($_GET); $reqDao = $reqobj . "Dao"; $dao = new $reqDao(); $reqDef = $reqobj . "Definition"; $def = new $reqDef(); $reqBuilder = $reqobj . "JqGridBuilder"; $builder = new $reqBuilder(); $joinTable = Request::getSafeGetOrPost('joinTable'); $joinField = Request::getSafeGetOrPost('joinField'); $otherJoinField = Request::getSafeGetOrPost('otherJoinField'); Inform8Context::getLogger()->log(0, 'jt:' . $joinTable); Inform8Context::getLogger()->log(0, 'jf:' . $joinField); Inform8Context::getLogger()->log(0, 'ojf:' . $otherJoinField);
// get how many rows we want to have into the grid $sidx = Request::getOrPost('sidx'); // get index row - i.e. user click to sort $sord = Request::getOrPost('sord'); // get the direction $start = $limit * $page - $limit; //print_r($_GET); $reqDao = $reqobj . "Dao"; $dao = new $reqDao(); $reqDef = $reqobj . "Definition"; $def = new $reqDef(); $reqBuilder = $reqobj . "JqGridBuilder"; $builder = new $reqBuilder(); $joinTable = Request::getOrPost('joinTable'); $joinField = Request::getOrPost('joinField'); $otherJoinField = Request::getOrPost('otherJoinField'); $totalCount = 0; if ($field == 'ALL' && $value == 'ALL') { $objs = $dao->getAll($limit, $start, $sidx, $sord); $totalCount = $dao->countAll(); if ($totalCount > 0) { $totalPages = ceil($totalCount / $limit); } else { $totalPages = 0; } } else { //print"getWhere $field - $value - $searchOption"; if ($joinTable != null) { $reqJoinDao = $joinTable . "Dao"; $joinDao = new $reqJoinDao(); $joinobs = $joinDao->getWhere(array($joinField), array($value), $searchOption, $limit, $start, $sidx, $sord);
<?php /* Copyright 2011 - 88 Creative Pty Ltd. * Copyright of this program is the property of 88 Creative, * without whose written permission reproduction in * whole or in part is prohibited. All rights reserved. * http://www.inform8.com * http://www.88creative.com.au */ // site settings + config + seession load require_once 'config/settings.php'; //TODO add checks $reqobj = Request::getOrPost("object"); $field = Request::getOrPost("field"); $value = Request::getOrPost("value"); $expanded = Request::getOrPost("expanded"); // print($reqobj); // print($field); // print($value); $reqDao = $reqobj . "Dao"; $dao = new $reqDao(); $reqJsonBuilder = $reqobj . "JsonBuilder"; $builder = new $reqJsonBuilder(); if ($field == 'ALL' && $value == 'ALL') { $objs = $dao->getAll(); } else { $objs = IQL::select($reqobj)->where(NULL, $field, '=', $value)->get(); } if ($objs != -1) { $objCount = count($objs); for ($i = 0; $i < $objCount; $i++) {