Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2139
Modified Files:
TB_Base.class.php
Log Message:
Fixed some bugs and improved TB_Base::ShowForm()
Index: TB_Base.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/TB_Base.class.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TB_Base.class.php 6 Oct 2004 19:49:22 -0000 1.12
--- TB_Base.class.php 7 Oct 2004 21:22:08 -0000 1.13
***************
*** 372,379 ****
* @return bool Returns TRUE on success, FALSE on error.
*/
! function ShowForm($name, $action, $image = NULL, $data = NULL)
{
global $vortex_msgs;
! if (!empty($data)) if (!$this->Seek($data)) return FALSE;
echo <<<END
<div class="div_form">
--- 372,379 ----
* @return bool Returns TRUE on success, FALSE on error.
*/
! function ShowForm($name, $action, $submit = NULL, $data = NULL)
{
global $vortex_msgs;
! if (!empty($data)) $this->Seek($data);
echo <<<END
<div class="div_form">
***************
*** 402,415 ****
END;
foreach ($this->fields as $field) if ($field->pkey) {
! echo "<input type='hidden' name='{$field->name_db}' value='".(empty($this->data)?'-1':$this->data[$field->name_db])."' />\n";
}
foreach ($this->fields_form as $field) {
$field->Show($this->data);
}
! if (empty($submit)) {
! echo "<tr class='submit' id='submit_$name'><td colspan='2'><input type='submit' /></td></tr>";
! } else {
! echo "<tr class='submit' id='submit_$name'><td colspan='2'>$submit</td></tr>";
! }
echo "</tbody>\n</form>\n</table></div>\n";
}
--- 402,411 ----
END;
foreach ($this->fields as $field) if ($field->pkey) {
! $field->Show($this->data);
}
foreach ($this->fields_form as $field) {
$field->Show($this->data);
}
! echo "<tr class='submit' id='submit_$name'><td colspan='2'>".(empty($submit)?"<input type='submit' /> <input type='reset' />":$submit)."</td></tr>";
echo "</tbody>\n</form>\n</table></div>\n";
}
|