Source for file OCSP_FRMCONTR_LIST_FLEXGRID.phpclass
Documentation is available at OCSP_FRMCONTR_LIST_FLEXGRID.phpclass
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_LIST_FLEXGRID.phpclass,v 1.8 2008/09/02 07:07:18 pitlinz Exp $
// ---------------------------------------------------------
// ---------------------------------------------------------
require
dirname(__FILE__
) .
_OCSP_DIRSEP_ .
"OCSP_FRMCONTR_LIST.phpclass";
* @project Open CSP-Management
* @author Peter Krebs <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_LIST_FLEXGRID.phpclass,v 1.8 2008/09/02 07:07:18 pitlinz Exp $
/*** class constants --------------------------------------------- */
* @constant string CLASS_SRC_FILE
/*** compostion --------------------------------------------------- */
/*** attributes -------------------------------------------------- */
protected $myJsonUrl =
"";
/*** factory / construct ----------------------------------------- */
/*** getter / setter ---------------------------------------------- */
public function setJsonUrl($aUrl)
$this->myJsonUrl =
$aUrl;
public function getJsonUrl()
if (empty($this->myJsonUrl))
* returns the jason string for a page
* @param string $sortname
* @param string $sortorder
* @param string $qtype (filter column name)
* @param string $query (filter value)
public function getJsonPage($page,$rp,$sortname,$sortorder,$qtype=
"",$query=
"",$debug=
False)
if (!empty($query) &&
(strtolower($query) !=
"undefined"))
$this->myFilter['?FLEXGRID' .
$qtype] =
" $qtype =" .
$query;
} else if (strstr($query,"%")) {
$this->myFilter['?FLEXGRID' .
$qtype] =
" UPPER($qtype) LIKE '" .
strtoupper($query) .
"'";
$this->myFilter['?FLEXGRID' .
$qtype] =
" UPPER($qtype) LIKE '" .
strtoupper($query) .
"%'";
if (!empty($sortname) &&
(strtolower($sortname) !=
"undefined"))
$str_orderBy =
$sortname;
if (!empty($sortorder) &&
(strtolower($sortorder) !=
"undefined"))
$str_orderBy .=
" " .
$sortorder;
$str_ret .=
"page: " .
$page;
if ($arr_fields =
$this->myForm->getFields(Null,$debug))
foreach($arr_fields as &$obj_fld)
if ($debug) $str_debug .=
"Fld: ".
$obj_fld->getName().
" ";
if (!$obj_fld->isHidden('flexgrid'))
$arr_cols[] =
$obj_fld->getName();
if ($obj_fld->isPrimaryKey())
$arr_idCols[] =
$obj_fld->getName();
$arr_LeftButtons =
$this->myView->getPosButtons(-
1);
$arr_RightButtons =
$this->myView->getPosButtons(1);
$str_rowId =
$arr_row[$arr_idCols[0]];
foreach($arr_idCols as $str_colName)
$str_rowId .=
$cha_sep .
$str_colName.
"-".
$arr_row[$str_colName];
$str_ret .=
$cha_rowSep .
"{id: '" .
$str_rowId .
"',cell:[";
foreach($arr_LeftButtons as $str_cmd)
$str_buttons .=
$this->myView->getButtonImgTag($str_cmd);
foreach($arr_cols as $str_colName)
$str_ret .=
$cha_sep .
"'" .
pcf_js_escape($this->myForm->getField($str_colName)->getListValue($arr_row[$str_colName])) .
"'";
if (sizeof($arr_RightButtons))
foreach($arr_RightButtons as $str_cmd)
$str_buttons .=
$this->myView->getButtonImgTag($str_cmd);
Documentation generated on Thu, 08 Jan 2009 17:46:32 +0100 by phpDocumentor 1.4.0a2