GetSection($section); $objCatToolBar = new clsToolBar(); //check if the previous input is correct if( $_POST["Action"] == 'checkconn') { // save supplied connection info $objSession->SetVariable("import_sql_type", $_POST["db_sql_type"]); $objSession->SetVariable("import_server", $_POST["db_server"]); $objSession->SetVariable("import_db", $_POST["db_db"]); $objSession->SetVariable("import_user", $_POST["db_user"]); $objSession->SetVariable("import_pass", $_POST["db_pass"]); $objSession->SetVariable("error_importing", ''); // get them for using here $db_sql_type = $objSession->GetVariable("import_sql_type"); $db_server = $objSession->GetVariable("import_server"); $db_db = $objSession->GetVariable("import_db"); $db_user = $objSession->GetVariable("import_user"); $db_pass = $objSession->GetVariable("import_pass"); // check supplied connection $linkconn =& ADONewConnection($db_sql_type); if( !$linkconn->NConnect($db_server, $db_user, $db_pass, $db_db) || !$db_server || !$db_db ) { $objSession->SetVariable("error_importing","Error: The connection to the DB failed please check your settings"); header('Location: step3.php?'.$envar); } unset($linkconn); } $import_script = GetImportScript( $objSession->GetVariable('ImportScriptID') ); $var = "?env=".BuildEnv(); // Previous Button $MouseOver = "swap('moveleft','toolbar/tool_prev_f2.gif');"; $MouseOut = "swap('moveleft', 'toolbar/tool_prev.gif');"; $link = $adminURL."/import/step3.php".$var; $objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif"); // Next Button $MouseOver = "swap('moveright','toolbar/tool_next_f2.gif');"; $MouseOut = "swap('moveright', 'toolbar/tool_next.gif');"; $formaction = $rootURL.$import_script['module'].'/'.$admin.'/import/'.$import_script['url'].'.php?'.$envar; $onClick = "if( !CheckFinalForm('import_form') ) alert('Please fill in all of the fields'); else import_submit('import_form','$formaction'); "; $objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),'#',$MouseOver,$MouseOut,$onClick,"tool_next.gif"); // Header $title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 4"; $NewSection = strtolower($import_script['module']).':'.$import_script['id']; int_header($objCatToolBar,NULL,$title,NULL,NULL,Array(),$NewSection); ?>