92 $this->Lang=parse_ini_file(
$Lang);
94 $this->PendingRow=
false;
95 $this->PendingHeader=
false;
98 $this->colSpecial[
'MODIFY']=99;
99 $this->colSpecial[
'DELETE']=99;
100 $this->colSpecial[
'DETAIL']=99;
123 $this->
Out(
"<table border=1 align=center>");
124 $this->CurrentCol=-1;
125 $this->PendingRow=
false;
126 $this->PendingHeader=
false;
136 if($this->PendingRow)
137 trigger_error(
'You cannot start an header after a normal row',E_USER_ERROR );
141 $this->CurrentCol=-1;
142 $this->PendingHeader=
true;
154 if(!$this->PendingHeader)
155 trigger_error(
'You cannot write an header cell without start the header',E_USER_ERROR);
158 while((++$this->CurrentCol)<$offset)
159 $this->out(
'<th> </th>');
163 $text=
"<a href='" . $Href .
"'>".$Label.
"</a>";
164 $this->out(
'<th>'.$text.
'</th>');
174 if($this->PendingRow)
175 trigger_error(
'You cannot close an header after a normal row',E_USER_ERROR );
176 $this->PendingHeader=
false;
177 $this->
Out(
"</tr>\n");
189 if($this->PendingRow)
197 $this->CurrentCol=-1;
198 $this->PendingRow=
true;
213 function Cell($txt_in,$FieldName,$offset=-1,$fmt=
'NONE')
215 if(!$this->PendingRow)
216 trigger_error(
'You cannot write a cell without start the row',E_USER_ERROR);
219 while((++$this->CurrentCol)<$offset)
220 $this->out(
'<td> </td>');
225 if(array_key_exists($fmt,$this->formats))
227 eval($this->formats[$fmt]);
228 $this->out(
'<td>'.$txt_out.
'</td>');
231 trigger_error(
'Unknown format name: '.$fmt,E_USER_ERROR);
250 $text=
'<a href='.$link.
' onMouseOver="YapToolTip(\''.$this->Lang[
'TipModify'].
'\')
" onMouseOut="YapToolTip()
" >'.$this->Lang['Modify'].'</a>';
253 $text='<a href='.$link.' onMouseOver="YapToolTip(\
''.$this->Lang[
'TipRemove'].
'\')
" onMouseOut="YapToolTip()
" >'.$this->Lang['Remove'].'</a>';
256 $text='<a href='.$link.' onMouseOver="YapToolTip(\
''.$this->Lang[
'TipDetail'].
'\')
" onMouseOut="YapToolTip()
" >'.$this->Lang['Detail'].'</a>';
262 $this->Cell($text,$type,$offset);
270 function AddRowCell($link)
274 $col=($this->colSpecial['MODIFY']<$this->colSpecial['DELETE'])?$this->colSpecial['MODIFY']:$this->colSpecial['DELETE'];
275 $col=($col<$this->colSpecial['DETAIL'])?$col:$this->colSpecial['DETAIL'];
276 $col=($col==99)?0:$col;
277 $text='<a href='.$link.' onMouseOver="YapToolTip(\
''.$this->Lang[
'TipNewRow'].
'\')
" onMouseOut="YapToolTip()
" >'.$this->Lang['NewRow'].'</a>';
278 $this->Cell($text,'ADDROW',$col);
283 $this->Out("</tr></table>
");
288 print $this->HtmlCode;
301 $this->HtmlCode.=$text;
310 class CYap_DetailView
356 function CYap_DetailView($Lang)
358 $this->Lang=parse_ini_file($Lang);
359 $this->CurrentCol=-1;
360 $this->PendingRow=false;
361 $this->PendingHeader=false;
362 $this->EchoText=true;
373 function LoadFormats($fmt)
383 function BeginTable()
385 $this->Out("<table border=1 align=center>
");
386 $this->CurrentCol=-1;
387 $this->PendingRow=false;
388 $this->PendingHeader=false;
395 function HeaderStart()
399 <th>
".$this->Lang['Field']."</th>
400 <th width=20> </th>
401 <th>
".$this->Lang['Value']."</th>
403 if($this->PendingRow)
404 trigger_error('You cannot start an header after a normal row',E_USER_ERROR );
407 $this->PendingHeader=false;
420 function Cell($label='', $txt_in='',$FieldName,$fmt='NONE')
423 if(array_key_exists($fmt,$this->formats))
425 eval($this->formats[$fmt]);
426 $this->out('<tr><td><b>'.$label.'</b></td><td></td><td align=center>'.$txt_out.'</td></tr>');
429 trigger_error('Unknown format name: '.$fmt,E_USER_ERROR);
438 $this->Out("</table>
");
451 print $this->HtmlCode;
464 $this->HtmlCode.=$text;