Hey Ray..
I think I may have solved the redirect back to the Dashboard....sort of...
I am setting a session variable of -- $_SESSION[ 'pageID' ] on the plugged-in page, lets say an Insert to DB page for example, then configuring the $InsertGoTo = "../dashboard.php"; to go back to the dashboard, then on the dashboard page the <body> element is in an 'if' statement as such:
<?php
if ((isset( $_SESSION[ 'pageID' ])) == "productcategories_insert.php" ) {
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";
} else {
echo "<body onLoad="."framework_load_plugin_url('plugins/DashboardMain.php',false,'main','../',false,dashboard);return document.MM_returnValue".">";
}
?>
the 'if' statement would load the default dashboard <div> if the plugin page's session variable is not set.
on the dashboard page I start the session at the top of the page as usual... but then clear the plugin page's set session variable at the bottom of the page.. seems to be working.
Then if I refresh the dashboard page the session variable that is no longer available, defaults to the DashboardMain plugin.
Not sure if this is best method, but it does work.
This would also have to be done with the $UpdateGoTo , as well as the $DeleteGoTo covering ALL the re-directs.
Let me know if I'm on the right track, and when you have time and are feeling up to it I would still be up for that session.
Hope you are doing well with your treatments.
All the Best,
Tony
====================
====== UPDATE ======
====================
dashboard.php modifications that work!!
<?php
@session_start();
?>
... at top of page
After putting a switch/case in the dashboard.php file as such...
<?php
$page = ((isset( $_SESSION[ 'pageID' ])) ? $_SESSION['pageID'] : "");
switch ($page) {
case "productcategories_insert.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";
case "productcategories_update.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";
case "productcategories_details.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";
case "productcategories_results.php":
echo "<body onLoad="."framework_load_plugin_url('plugins/catalog/productcategories_results.php',false,'main','../','');return document.MM_returnValue".">";
default: echo "<body onLoad="."framework_load_plugin_url('plugins/DashboardMain.php',false,'main','../',false,dashboard);return document.MM_returnValue".">";
}
?>
..and at the bottom:
<?php
@session_start();
if (true){
// WA_ClearSession
$clearAll = FALSE;
$clearThese = explode(",","pageID");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>
and then on all DataAssist pages ...
$SESSION variableon all DataAssist pages corresponding to it's name:
<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_detail.php";
}
?>
for productcategories_detail.php...
<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_insert.php";
}
?>
for productcategories_insert.php...
<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_results.php";
}
?>
for productcategories_results.php...
<?php
@session_start();
if(!isset($_SESSION["pageID"])) {
$_SESSION["pageID"] = "productcategories_update.php";
}
?>
for productcategories_update.php...
$InsertGoTo = "../dashboard.php"; -- on ***_insert.php
$UpdateGoTo = "../dashboard.php"; -- on ***_update.php
$DeleteGoTo = "../dashboard.php"; -- on ***_detail.php, and on ***_results.php ... wherever I had a Delete button!
Ray if you have an idea for a better implementation let me know...
Tony