/** * The drawing function * array($attribs, $data, $prefix, $suffix); */ function show() { global $AppUI; $CR = "\n"; $CT = "\n\t"; $s = $CR . '<table width="100%" border="0" cellpadding="1" cellspacing="1">'; $s .= $CR . '<tr>'; if ($this->icon) { $s .= $CR . '<td width="42">'; $s .= dPshowImage(dPFindImage($this->icon, $this->module)); $s .= '</td>'; } $s .= $CR . '<td align="left" width="100%" nowrap="nowrap"><h1>' . $AppUI->_($this->title) . '</h1></td>'; foreach ($this->cells1 as $c) { $s .= $c[2] ? $CR . $c[2] : ''; $s .= $CR . '<td align="right" nowrap="nowrap"' . ($c[0] ? ' ' . $c[0] : '') . '>'; $s .= $c[1] ? $CT . $c[1] : ' '; $s .= $CR . '</td>'; $s .= $c[3] ? $CR . $c[3] : ''; } if ($this->showhelp) { $s .= '<td nowrap="nowrap" width="20" align="right">'; //$s .= $CT . contextHelp('<img src="./images/obj/help.gif" width="14" height="16" border="0" alt="'.$AppUI->_('Help').'" />', $this->helpref); $s .= "\n\t<a href=\"#" . $this->helpref . "\" onClick=\"javascript:window.open('?m=help&dialog=1&hid=" . $this->helpref . "', 'contexthelp', 'width=400, height=400, left=50, top=50, scrollbars=yes, resizable=yes')\" title=\"" . $AppUI->_('Help') . "\">"; $s .= "\n\t\t" . dPshowImage('./images/icons/stock_help-16.png', '16', '16', $AppUI->_('Help')); $s .= "\n\t</a>"; $s .= "\n</td>"; } $s .= "\n</tr>"; $s .= "\n</table>"; if (count($this->crumbs) || count($this->cells2)) { $crumbs = array(); foreach ($this->crumbs as $k => $v) { $t = $v[1] ? '<img src="' . dPfindImage($v[1], $this->module) . '" border="" alt="" /> ' : ''; $t .= $AppUI->_($v[0]); $crumbs[] = "<a href=\"{$k}\">{$t}</a>"; } $s .= "\n<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" width=\"100%\">"; $s .= "\n<tr>"; $s .= "\n\t<td nowrap=\"nowrap\">"; $s .= "\n\t\t" . '<strong>' . implode(' : ', $crumbs) . '</strong>'; $s .= "\n\t</td>"; foreach ($this->cells2 as $c) { $s .= $c[2] ? "\n{$c['2']}" : ''; $s .= "\n\t<td align=\"right\" nowrap=\"nowrap\"" . ($c[0] ? " {$c['0']}" : '') . '>'; $s .= $c[1] ? "\n\t{$c['1']}" : ' '; $s .= "\n\t</td>"; $s .= $c[3] ? "\n\t{$c['3']}" : ''; } $s .= "\n</tr>\n</table>"; } echo "{$s}"; }
/** * The drawing function */ function show() { global $AppUI; $s = '<table width="100%" border="0" cellpadding="1" cellspacing="1">'; $s .= '<tr>'; if ($this->icon) { $s .= '<td width="42">'; $s .= dPshowImage(dPFindImage($this->icon, DP_CURRENT_MODULE)); $s .= '</td>'; } else { $icon = defined('DP_CURRENT_MODULE_ICON') ? DP_CURRENT_MODULE_ICON : DP_CURRENT_MODULE . '.png'; $s .= '<td width="42">'; $s .= '<img src="modules/' . DP_CURRENT_MODULE . '/images/' . $icon . '">'; $s .= '</td>'; } $s .= '<td align="left" width="100%" nowrap="nowrap"><h1>' . $AppUI->_($this->title) . '</h1></td>'; foreach ($this->cells as $c) { $s .= $c[2] ? $c[2] : ''; $s .= '<td align="right" nowrap="nowrap"' . ($c[0] ? " {$c['0']}" : '') . '>'; $s .= $c[1] ? $c[1] : ' '; $s .= '</td>'; $s .= $c[3] ? $c[3] : ''; } $s .= '</tr>'; $s .= '</table><br/>'; echo $s; }