| version 1.3, 2006/09/16 23:01:14 |
version 1.4, 2007/09/02 23:08:46 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/extensions/phpMyEdit-slide.class.php,v 1.10 2006-01-22 21:44:24 nepto Exp $ */ |
/* $Platon: phpMyEdit/extensions/phpMyEdit-slide.class.php,v 1.11 2007-09-02 22:30:00 nepto Exp $ */ |
| |
|
| /* |
/* |
| * Coding elapsed time: from 8:30 to 10:30 at 30th October 2002 |
* Coding elapsed time: from 8:30 to 10:30 at 30th October 2002 |
| Line 45 class phpMyEdit_slide extends phpMyEdit |
|
| Line 45 class phpMyEdit_slide extends phpMyEdit |
|
| $execute && $this->execute($opts); |
$execute && $this->execute($opts); |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function display_record_buttons() /* {{{ */ |
|
| { |
|
| // TODO: classify this table and cells |
|
| echo '<table border=0 cellpadding=0 cellspacing=0 width="100%" style="border:0;padding:0;">'; |
|
| echo '<tr><td align=left style="text-align:left;border:0;padding:0;" nowrap>' . "\n"; |
|
| if ($this->change_operation()) { |
|
| echo '<input type="submit" name="savechange" value="'.$this->labels['Save'].'" />'."\n"; |
|
| echo '<input type="submit" name="morechange" value="'.$this->labels['Apply'].'" />'."\n"; |
|
| echo '<input type="button" name="cancel" value="'.$this->labels['Cancel'].'" onClick="form.submit();" />'."\n"; |
|
| echo '<input type="hidden" name="rec_change" value="1">'; |
|
| } elseif ($this->view_operation()) { |
|
| if ($this->change_enabled()) { |
|
| echo '<input type="submit" name="operation" value="'.$this->labels['Change'].'" />'."\n"; |
|
| } |
|
| echo '<input type="submit" name="cancel" value="'.$this->labels['Cancel'].'" />'."\n"; |
|
| } |
|
| |
|
| if (! $this->ext['prev_disable']) { |
|
| $disabled = $this->ext['prev'] ? '' : ' disabled'; |
|
| echo '<input'.$disabled.' type="submit" name="'.ltrim($disabled).'prev" value="' |
|
| .$this->labels['Prev'].'"> '; |
|
| echo '<input type="hidden" name="rec_prev" value="'.$this->ext['prev'].'">'; |
|
| } |
|
| if (! $this->ext['next_disable']) { |
|
| $disabled = $this->ext['next'] ? '' : ' disabled'; |
|
| echo '<input'.$disabled.' type="submit" name="'.ltrim($disabled).'next" value="' |
|
| .$this->labels['Next'].'">'; |
|
| echo '<input type="hidden" name="rec_next" value="'.$this->ext['next'].'">'; |
|
| } |
|
| echo '</td></tr></table>'."\n"; |
|
| } /* }}} */ |
|
| |
|
| function execute($opts) /* {{{ */ |
function execute($opts) /* {{{ */ |
| { |
{ |
| if ($this->get_cgi_var('rec_change') |
if ($this->get_sys_cgi_var('rec_change') |
| && ($this->next_operation() || $this->prev_operation())) { |
&& ($this->next_operation() || $this->prev_operation())) { |
| $this->operation = $this->labels['Change']; |
$this->operation = $this->labels['Change']; |
| } |
} |
| Line 87 class phpMyEdit_slide extends phpMyEdit |
|
| Line 55 class phpMyEdit_slide extends phpMyEdit |
|
| $this->operation = $this->labels['View']; |
$this->operation = $this->labels['View']; |
| } |
} |
| if ($this->prev_operation()) { |
if ($this->prev_operation()) { |
| ! $this->ext['prev_disabled'] && $this->rec = $this->get_cgi_var('rec_prev'); |
! $this->ext['prev_disabled'] && $this->rec = $this->get_sys_cgi_var('rec_prev'); |
| $this->prev = ''; |
$this->prev = ''; |
| } |
} |
| if ($this->next_operation()) { |
if ($this->next_operation()) { |
| ! $this->ext['next_disabled'] && $this->rec = $this->get_cgi_var('rec_next'); |
! $this->ext['next_disabled'] && $this->rec = $this->get_sys_cgi_var('rec_next'); |
| $this->next = ''; |
$this->next = ''; |
| } |
} |
| if (! $this->rec) { |
if (! $this->rec) { |
| Line 128 class phpMyEdit_slide extends phpMyEdit |
|
| Line 96 class phpMyEdit_slide extends phpMyEdit |
|
| ! $this->ext['prev'] && $this->ext['prev'] = $ids[$idx - 1]; |
! $this->ext['prev'] && $this->ext['prev'] = $ids[$idx - 1]; |
| ! $this->ext['next'] && $this->ext['next'] = $ids[$idx + 1]; |
! $this->ext['next'] && $this->ext['next'] = $ids[$idx + 1]; |
| } |
} |
| |
|
| |
$this->default_buttons['V'] = array('change', 'cancel', |
| |
(isset($this->ext['prev']) ? '+prev' : 'prev'), |
| |
(isset($this->ext['next']) ? '+next' : 'next'), |
| |
array('code'=>'<input type="hidden" name="' |
| |
.$this->cgi['prefix']['sys'].'rec_prev" value="'.$this->ext['prev'].'">'), |
| |
array('code'=>'<input type="hidden" name="' |
| |
.$this->cgi['prefix']['sys'].'rec_next" value="'.$this->ext['next'].'">') |
| |
); |
| |
|
| $this->recreate_fdd(); |
$this->recreate_fdd(); |
| $this->recreate_displayed(); |
$this->recreate_displayed(); |