Source for file OCSP_FRMVIEW_LIST.phpclass
Documentation is available at OCSP_FRMVIEW_LIST.phpclass
* Class file OCSP_FRMVIEW_LIST.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
require_once dirname(__FILE__
).
"/OCSP_FRMVIEW.phpclass";
require_once __OCSP_PHPINCPATH__ .
"common" .
_OCSP_DIRSEP_ .
"pcf_templates.phpinc";
* class OCSP_FRMVIEW_LIST
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @var string $tbl_summary
* @see http://www.w3.org/TR/html4/struct/tables.html#adef-summary
* @var string $tbl_caption
* @see http://www.w3.org/TR/html4/struct/tables.html#edef-CAPTION
* is used to select the icon dir
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$str_ret=
"<table id=\"".
$this->myControl->getTableId().
"\"";
$str_ret.=
$this->myControl->getTableEvents($debug);
$str_ret.=
" ".
$this->getMyForm()->getLayoutField('FRMLST_TABLEADD');
$str_ret=
"<thead " .
$this->getMyForm()->getLayoutField('FRMLST_THEADADD') .
">";
$str_ret.=
"<tr ".
$this->myControl->getHeadRowEvents().
">";
if (!$obj_field->isHidden('list'))
$str_ret.=
"<th ".
$this->myControl->getHeadColEvents($obj_field).
" " .
$this->getMyForm()->getLayoutField('FRMLST_THADD') .
">";
$str_ret.=
$obj_field->getLstLabel();
if ($i_btnCosl=
$this->myControl->getNofBtnCols())
$str_ret.=
"<th colspan=\"".
$i_btnCosl.
"\"> </th>";
if ($str_footerTag=
$this->myControl->getFooterLinks($debug))
$str_ret.=
$str_footerTag;
* returns the html code for the cells in the body (without <tr>)
$str_globalArrName=
"LISTROW_".
$this->myForm->getId();
global $
{$str_globalArrName};
$
{$str_globalArrName}=
$rowVals;
if (!$obj_field->isHidden('list'))
if ($str_link=
$this->myControl->getColLink($obj_field,$debug))
$mix_listValue=
(isset
($rowVals[$obj_field->getName()]) ?
$rowVals[$obj_field->getName()] :
NULL);
$str_ret.=
$this->myControl->getColLinkEnd($obj_field,$debug);
$str_ret.=
$this->myControl->getRowButtons("td class=\"imgWidth16\"","a",$debug);
* returns the html code for the body rows
$str_ret=
"";$str_class=
"even";
$str_globalArrName=
"LISTROW_".
$this->myForm->getId();
global $
{$str_globalArrName};
while($arr_row=
$this->myControl->getListRow($debug))
$
{$str_globalArrName}=
$arr_row;
$str_ret.=
$this->myControl->getListGroups($debug);
if ($str_class !=
"odd") $str_class=
"odd";
if (!empty($str_rowId)) $str_rowId=
" id=\"$str_rowId\" ";
$str_ret.=
"<tr $str_rowId".
$this->myControl->getRowCmd($debug).
" class=\"".
$str_class.
"\">";
* returns the headline for a list group
* @requres pcf_templates.phpinc
$arr_lstGroups=
$this->myForm->get_listGroups();
if (isset
($arr_lstGroups[$col]) &&
is_array($arr_lstGroups[$col]))
if (isset
($arr_lstGroups[$col]['CSSCLASS']) &&
!empty($arr_lstGroups[$col]['CSSCLASS']))
$str_ret.=
" class=\"".
$arr_lstGroups[$col]['CSSCLASS'].
"\" ";
if (isset
($arr_lstGroups[$col]['CSSSTYLE']) &&
!empty($arr_lstGroups[$col]['CSSSTYLE']))
$str_ret.=
" style=\"".
$arr_lstGroups[$col]['CSSSTYLE'].
"\" ";
if (isset
($arr_lstGroups[$col]['TMPL']) &&
!empty($arr_lstGroups[$col]['TMPL']))
//<pre>".print_r($arr_lstGroups[$col],TRUE)."</pre></td></tr>";
return "<tbody id=\"tbody_".
$this->myControl->getTableId().
"\">\n";
$int_nofRows=
$this->myControl->loadListValues($debug);
$str_ret.=
"<tr><td colspan=\"".
$this->getNbrOfColumns().
"\">Keine Datensätze gefunden</td></tr>";
* returns the list HTML code
function getCSV($strFileName=
Null,$charset=
"UTF-8",$debug=
False)
if (empty($str_FileName))
$str_FileName =
$this->getMyForm()->getName() .
".csv";
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: text/cvs; charset=".
$charset);
header("Last-Modified: " .
gmdate("D, d M Y H:i:s") .
" GMT");
header("Content-Disposition: filename=".
$strFileName);
header( "Content-Disposition: attachment; filename=".
$strFileName);
while($arr_row=
$this->myControl->getListRow($debug))
foreach($arr_row as $str_col =>
$mix_val)
$str_header .=
'"' .
$str_col .
'";';
$str_header =
substr($str_header,0,-
1);
echo
$str_header .
"\r\n";
foreach($arr_row as $str_col =>
$mix_val)
$str_line .=
$mix_val .
";";
$str_line .=
($mix_val ?
"1" :
"0") .
";";
$str_line .=
'"' .
str_replace('"',"'",$mix_val) .
'";';
$str_line =
substr($str_line,0,-
1);
} // end of OCSP_FRMVIEW_LIST
Documentation generated on Thu, 08 Jan 2009 17:46:38 +0100 by phpDocumentor 1.4.0a2