| Index
» Projekty
» phpMyEdit
» Fórum
» redirect after cancel? trigger problem |
 |
ver_tips
Založený: 22.11.2005
Príspevky: 21
Zaslal: 2008-01-09 12:07
Návrat hore
Odpovedať s citátom
|
Hi, I have created a trigger to redirect to the view page when I have modified a record. But it does not work when I click on cancel instead of Save.
I do not know how to modify the trigger file.
*************
in my main file I have this:
$opts['triggers']['update']['after'] = 'redirect.php';
$opts['triggers']['cancel']['after'] = 'redirect.php';
*************
in redirect.php
<?
if($_POST['PME_sys_saveadd'] == 'Save' || $_POST['PME_sys_savechange'] == 'Save' || $_POST['PME_sys_savechange'] == 'Submit'){
$PME_sys_operation = 'PME_op_View';
$PME_sys_rec = $_POST['PME_sys_rec'];
$this->operation = 'View';
}
?>
|
themanthing
Založený: 24.12.2009
Príspevky: 5
Zaslal: 2010-01-19 13:41
Návrat hore
Odpovedať s citátom
|
Hi, I create a redirect trigger to edit mode after add. Maybe it helps.
In main code:
| Kód: |
| $opts['triggers']['insert']['after'] = 'triggers.org_edit.php'; |
triggers.org_edit.php:
| Kód: |
<?php
print "
<script>
document.location.href='org.php?PME_sys_fl=0&PME_sys_fm=0&PME_sys_sfn[0]=1&PME_sys_operation=PME_op_Change&PME_sys_rec=".mysql_insert_id()."';
</script>";
return(true);
?> |
|
david803
Založený: 10.05.2010
Príspevky: 6
Zaslal: 2010-07-31 16:42
Návrat hore
Odpovedať s citátom
|
$this->rec = mysql_insert_id();
$this->operation = $this->labels['View'];
$this->recreate_fdd();
$this->recreate_displayed();
return true;
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|