<?php if(!strlen($pathtoroot)) { $path=dirname(realpath($_SERVER['SCRIPT_FILENAME'])); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; //echo $pathtoroot; require_once($pathtoroot."kernel/startup.php"); $rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) $admin = "admin"; $localURL=$rootURL."kernel/"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; //admin only util $pathtolocal = $pathtoroot."kernel/"; require_once ($pathtoroot.$admin."/include/elements.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); require_once ($pathtolocal."admin/include/navmenu.php"); require_once($pathtoroot.$admin."/toolbar.php"); //Set Section $section = "in-portal:inlink_inport"; //Set Environment Variable $envar = "env=" . BuildEnv(); $sec = $objSections->GetSection($section); $objCatToolBar = new clsToolBar(); //check if the previous input is correct if( $_POST["Action"] == 'checkconn') { // save supplied connection info $objSession->SetVariable("import_inlink_sql_type", $_POST["inlink_sql_type"]); $objSession->SetVariable("import_inlink_server", $_POST["inlink_server"]); $objSession->SetVariable("import_inlink_db", $_POST["inlink_db"]); $objSession->SetVariable("import_inlink_user", $_POST["inlink_user"]); $objSession->SetVariable("import_inlink_pass", $_POST["inlink_pass"]); $objSession->SetVariable("error_importing", ''); $inlink_sql_type = $objSession->GetVariable("import_inlink_sql_type"); $inlink_server = $objSession->GetVariable("import_inlink_server"); $inlink_db = $objSession->GetVariable("import_inlink_db"); $inlink_user = $objSession->GetVariable("import_inlink_user"); $inlink_pass = $objSession->GetVariable("import_inlink_pass"); // check supplied connection $linkconn = ADONewConnection($inlink_sql_type); if(!$linkconn->PConnect($inlink_server, $inlink_user, $inlink_pass, $inlink_db) || $inlink_server =="" || $inlink_db=="") { $objSession->SetVariable("error_importing","Error: The connection to the DB failed please check your settings"); header("Location:inlinkimport3.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/inlinkimport3.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 = $adminURL.'/import/'.$import_script['url'].'.php?'.$envar; $link = $adminURL."/import/inlinkimport4.php".$var; $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"; int_header($objCatToolBar,NULL,$title); ?> <form id="import_form" name="import_form" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>"> <input type="hidden" name="Action" value="m_save_import_config"> <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder"> <?php int_subsection_title("Matching Fields - Intechnic In-Portal "); ?> <!-- script common fields: begin --> <tr <?php echo int_table_color(); ?>> <td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_AdminId"); ?></span></td> <td> <b><?php echo $objSession->GetVariable("user_admin_names"); ?></b> <input type="hidden" name="user_admin" size="15" class="text" value="<?php echo $objSession->GetVariable("user_admin_values"); ?>"> <input type="hidden" name="grouplist1" value="<?php echo $objSession->GetVariable('grouplist1'); ?>"> <a href="#"><img src="../images/icon_users_sm.gif" style="cursor:hand;" border="0" onclick="OpenGroupSelector('<?php echo $envar; ?>&en=0&destform=import_form&destfield=grouplist1&Selector=radio');"></a> </td> </tr> <tr <?php echo int_table_color(); ?>> <td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_RegUserId"); ?></span></td> <td> <b><?php echo $objSession->GetVariable("user_regular_names"); ?></b> <input type="hidden" name="user_regular" size="15" class="text" value="<?php echo $objSession->GetVariable("user_regular_values"); ?>"> <input type="hidden" name="grouplist2" value="<?php echo $objSession->GetVariable('grouplist2'); ?>"> <a href="#"><img src="../images/icon_users_sm.gif" style="cursor:hand;" border="0" onclick="OpenGroupSelector('<?php echo $envar; ?>&en=0&destform=import_form&destfield=grouplist2&Selector=radio');"></a> </td> </tr> <tr <?php echo int_table_color(); ?>> <td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_InitImportCat"); $catid = $objSession->GetVariable('categoryid'); $path = prompt_language($objConfig->Get("Root_Name")); if($catid > 0) { $c = $objCatList->GetItemByField('ResourceId', $catid); $path .= ">".$c->GetCachedNavBar(); } ?> </td> <td> <b><?php echo $path; ?></b> <input type="hidden" name="init_cat" size="15" class="text" value="<?php echo $objSession->GetVariable("categoryid"); ?>"> <a href="#"><img src="<?php echo $imagesURL; ?>/folder.gif" style="cursor:hand;" border="0" ONCLICK="OpenCatSelector('<?php echo $envar; ?>&source=inlinkimport4&continue_sess=1&destform=import_form&destfield=categorylist&Selector=radio');"></a> <input type="hidden" name="categorylist" value="<?php echo $objSession->GetVariable('categorylist'); ?>"> </td> </tr> <!-- script common fields: end --> <!-- script spefific fields: begin --> <?php if( $import_script['id'] == 'in-link' ) { ?> <tr <?php echo int_table_color(); ?>> <td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_Import_ImageName"); ?></span></td> <td> <input type="text" name="link_image" class="text" size="30" value="<?php echo $objSession->GetVariable("link_image"); ?>"> </td> </tr> <?php } ?> <!-- script spefific fields: end --> </table> </form> <?php int_footer(); ?>