Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sun Nov 18, 2007 3:23 pm Reply with quote

I am updating my MILPACS module to Release Candidate 3 (RC3).

I have the upgrade working except for that last part.

At the end of the upgrade I want to be able to allow the user to import any vWar data into MILPACS.

At the end of my upgradeRC2-RC3.php page I have the following.

Code:
echo "<hr><b>Operation Complete!</b><hr>\n";

echo "<hr><b>REMOVE THIS SCRIPT WHEN FINISHED!</b><hr>\n";

form action is removed because of NukeSentinal.
<form>
$table = 'vwar';
if(mysql_num_rows($db->sql_query("SHOW TABLES LIKE '".$table."'"))==1) {
echo "vWar tables have been detected <br><br>";
echo "Do you want to import your vWar data into MILPACS?<br><br>";
echo "<select name=\"action\">";
echo "<option value=\"import_keep_vWar\">Import but keep your vWar tables</option>\n";
echo "<option value=\"import_delete_vWar\">Import and delete your vWar tables</option>\n";
echo "</select>&nbsp;&nbsp;<input type=\"submit\" value=\"Continue\" /><br><br>\n";
echo "<input type=\"hidden\" name=\"op\" value=\"ImportvWar\"/>";
echo "</form>";
}

CloseTable();
include("footer.php");


function ImportvWar($action) {

if ($action == 'import_keep_vWar') {

   echo"You have chosen to import and keep you vWar tables";

}else{

   echo"You have chosen to import and delete you vWar tables";
}
}


For now I'm just trying to get it to display the correct echo statment inside the function.

What happens is that it instead displays the default.php page.

The milpacs_install.php page has this which directs traffic.


Code:
switch($op) {

    default:include("milpacs_installer/default.php" );break;
    case "remove":include("milpacs_installer/remove.php");break;
   case "install":include("milpacs_installer/install.php");break;
   case "upgradeRC1-RC2":include("milpacs_installer/upgradeRC1-RC2.php");break;
   case "upgradeRC2-RC3":include("milpacs_installer/upgradeRC2-RC3.php");break;   
  }


I would rather not create another php page just for the import feature, yet I can't get it to work at the end of upgradeRC2-RC3.php
 
View user's profile Send private message Visit poster's website ICQ Number
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Nov 19, 2007 12:43 am Reply with quote

We really do need to see the parameters of the FORM action

My guess is that is it submitting to your milpacs_install.php script with no $op parameters, thus it never goes to to the upgradeRC2-RC3.php script

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Donovan
PostPosted: Mon Nov 19, 2007 6:25 am Reply with quote

Code:
echo "<hr><b>Operation Complete!</b><hr>\n";

echo "<hr><b>REMOVE THIS SCRIPT WHEN FINISHED!</b><hr>\n";

echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
$table = 'vwar';
if(mysql_num_rows($db->sql_query("SHOW TABLES LIKE '".$table."'"))==1) {
echo "vWar tables have been detected <br><br>";
echo "Do you want to import your vWar data into MILPACS?<br><br>";
echo "<select name=\"action\">";
echo "<option value=\"import_keep_vWar\">Import but keep your vWar tables</option>\n";
echo "<option value=\"import_delete_vWar\">Import and delete your vWar tables</option>\n";
echo "</select>&nbsp;&nbsp;<input type=\"submit\" value=\"Continue\" /><br><br>\n";
echo "<input type=\"hidden\" name=\"op\" value=\"ImportvWar\"/>";
echo "</form>";
}

CloseTable();
include("footer.php");


function ImportvWar($action) {

if ($action == 'import_keep_vWar') {

   echo"You have chosen to import and keep you vWar tables";

}else{

   echo"You have chosen to import and delete you vWar tables";
}
}
?>


I just noticed I do not have any ImportvWar in my case statement. I need this option to exist in two different places. If they are doing a full install and if they are upgrading from RC2 to RC3.

Code:
switch($op) { 

    default:include("milpacs_installer/default.php" );break;
    case "remove":include("milpacs_installer/remove.php");break;
   case "install":include("milpacs_installer/install.php");break;
   case "upgradeRC1-RC2":include("milpacs_installer/upgradeRC1-RC2.php");break;
   case "upgradeRC2-RC3":include("milpacs_installer/upgradeRC2-RC3.php");break;   
  }


Last edited by Donovan on Mon Nov 19, 2007 6:30 am; edited 1 time in total 
Donovan
PostPosted: Mon Nov 19, 2007 6:26 am Reply with quote

Wow it worked this time. I have never before been able to include the form action of the code without NukeSentinal choking on it.
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Mon Nov 19, 2007 7:03 am Reply with quote

Raven's been working on something with Bob on NukeSentinel... Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©