Index: trunk/admin/users/user_list.php =================================================================== diff -u -N -r278 -r326 --- trunk/admin/users/user_list.php (.../user_list.php) (revision 278) +++ trunk/admin/users/user_list.php (.../user_list.php) (revision 326) @@ -353,7 +353,6 @@ - '; + return $o; } Index: trunk/kernel/admin/include/help/main_import.txt =================================================================== diff -u -N --- trunk/kernel/admin/include/help/main_import.txt (revision 0) +++ trunk/kernel/admin/include/help/main_import.txt (revision 326) @@ -0,0 +1,15 @@ +This section allows the administrator to import the data from other applications into your existing In-portal system.

+Step 1 of the import begins with a disclaimer that the data in your current system will be affected. Please ensure you understand the import process and the particular kind of import you are doing before proceeding. + +

+In-link 2 Import
+In the current version, only the import from In-link2 is available. The import is designed for In-link version 2.3.4, however it will work, or partially work, for most of the older In-link2 versions up to 2.0.10. If you have one of the older In-link2 versions and are experiencing problems, please upgrade your In-link2 to the version 2.3.4, and then run this import. It is not possible to use In-link2 import if you do not have In-link3 installed on your In-portal platform. Some In-link2 license holders are entitled to a complimentary In-link3 license, please go to your account at http://www.intechnic.com/myaccount for more information, or submit a support ticket. +

+Step 3
+In this step, the administrator will be asked to enter all database information for the In-link2 data. The current version of In-portal only supports import from the MySQL databases of In-link2.

+Step 4
+In this step, the administrator will need to designate the options of the import � how the In-link2 data is supposed to be integrated into In-portal and In-link3. +
  • Administrative Group � this field designates the In-portal administrative group (by default, �Admin'), into which the old In-link2 administrators should be imported. You can choose a different group for the import, and then designate the administrative users later. Clicking on the group button will pop up a list of In-portal groups. +
  • Regular User Group - this field designates the In-portal group (by default, �Members'), into which the old In-link2 users (link owners) should be imported. It is recommended to import then into a group that will give them access to the front-end, and to modify their links. However, you can choose a different group for the import, and then manage the users later. Clicking on the group button will pop up a list of In-portal groups. +
  • Initial Import Category � this field designates the In-portal category, which will serve as a root for the In-link2 import. This category will be the equivalent of the Home category in In-link2, and all of the sub-categories will be created underneath. Clicking on the category button (folder icon) will pop up a catalog navigator, where you can select the category. +
  • Link Image Name � this field designates the link image field in the In-link2 database, which was used to store the link image name. By default, it is �link_image' , however many users have used a custom field for this purpose, in which case you should enter the custom field name here. \ No newline at end of file Index: trunk/globals.php =================================================================== diff -u -N -r314 -r326 --- trunk/globals.php (.../globals.php) (revision 314) +++ trunk/globals.php (.../globals.php) (revision 326) @@ -1339,7 +1339,8 @@ $rec =& $rs->fields; $import_scripts[] = Array( 'label' => $rec['is_label'], 'url' => $rec['is_script'], 'enabled' => $rec['is_enabled'], 'field_prefix' => $rec['is_field_prefix'], - 'id' => $rec['is_string_id'], 'required_fields' => $rec['is_requred_fields']); + 'id' => $rec['is_string_id'], 'required_fields' => $rec['is_requred_fields'], + 'module' => strtolower($rec['is_Module']) ); $rs->MoveNext(); } } Index: trunk/kernel/admin/include/navmenu.php =================================================================== diff -u -N -r203 -r326 --- trunk/kernel/admin/include/navmenu.php (.../navmenu.php) (revision 203) +++ trunk/kernel/admin/include/navmenu.php (.../navmenu.php) (revision 326) @@ -81,12 +81,10 @@ $objSections->AddSection("in-portal:export","la_tab_ExportData","la_tab_ExportData",$admin."/backup/","export1.php", $admin."/icons/icon46_tool_export.gif",$admin."/icons/icon24_tool_export.gif", - NULL,"in-portal:tools","in-portal:restore","in-portal:inlink_inport",0,"",1, + NULL,"in-portal:tools","in-portal:restore","in-portal:main_import",0,"",1, NULL,"in-portal:tools",NULL,$admin."/icons/icon46_list_tool_export.gif","la_performing_export"); -//if( !$objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ) -//{ - $objSections->AddSection("in-portal:inlink_inport","la_tab_ImportData","la_tab_ImportData",$admin."/import/","inlinkimport1.php", + $objSections->AddSection("in-portal:main_import","la_tab_ImportData","la_tab_ImportData",$admin."/import/","step1.php", $admin."/icons/icon46_tool_import.gif",$admin."/icons/icon24_tool_import.gif", NULL,"in-portal:tools","in-portal:export","in-portal:sql_query",1,"",1, NULL,NULL,NULL,$admin."/icons/icon46_list_tool_import.gif","la_performing_import"); @@ -95,7 +93,6 @@ $admin."/icons/icon46_tool_import.gif",$admin."/icons/icon24_tool_import.gif", NULL,"in-portal:tools","in-portal:inlink_inport",NULL,0,"",1, NULL,"in-portal:tools",NULL,$admin."/icons/icon46_list_tool_import.gif","la_running_query"); -//} $objSections->AddSection("in-portal:system","la_tab_Sys_Config","la_title_Sys_Config",$admin."/","subitems.php", $admin."/icons/icon46_conf.gif",$admin."/icons/icon24_conf.gif",NULL, Index: trunk/kernel/admin/include/toolbar/inlink_inport.php =================================================================== diff -u -N --- trunk/kernel/admin/include/toolbar/inlink_inport.php (revision 288) +++ trunk/kernel/admin/include/toolbar/inlink_inport.php (revision 0) @@ -1,94 +0,0 @@ -HasSystemPermission("SYSTEM_ACCESS.READONLY"); -?> - - \ No newline at end of file Index: trunk/admin/include/mainscript.php =================================================================== diff -u -N -r64 -r326 --- trunk/admin/include/mainscript.php (.../mainscript.php) (revision 64) +++ trunk/admin/include/mainscript.php (.../mainscript.php) (revision 326) @@ -150,13 +150,39 @@ if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } +function SetButtonStateByImage(btn_id, img_src) +{ + // set state depending on image name + var btn = document.getElementById(btn_id); + if(btn) + { + if( !HasParam(img_src) ) img_src = btn.getAttribute('src'); + var img_name = img_src.split('/'); + img_name = img_name.length ? img_name[img_name.length - 1] : img_name; + img_name = img_name.split('.'); + img_name = img_name[0].split('_'); + img_name = img_name.length ? img_name[img_name.length - 1] : img_name; + if(img_name) + { + switch(img_name) + { + case 'f2': btn.setAttribute('ButtonState','over'); break; + case 'f3': btn.setAttribute('ButtonState','disabled'); break; + default: btn.setAttribute('ButtonState','enabled'); break; + } + } + } +} + + function swap(imgid, src, module_name){ // swaps toobar icons from kernel // admin or from module specified var ob = document.getElementById(imgid); if(ob) { + SetButtonStateByImage(imgid, src); var s = src; s = s.slice(0,4); if(s=='http') Index: trunk/admin/include/checkarray.js =================================================================== diff -u -N -r277 -r326 --- trunk/admin/include/checkarray.js (.../checkarray.js) (revision 277) +++ trunk/admin/include/checkarray.js (.../checkarray.js) (revision 326) @@ -35,14 +35,7 @@ function itemChecked() { - if(this.itemschecked>0) - { - return true; - } - else - { - return false; - } + return (this.itemschecked > 0) ? true : false; } function selectAll(value) @@ -146,6 +139,7 @@ { img.src=this.ImageList[i][1]; } + SetButtonStateByImage(id); } else alert('An Image [' +id+ '] not found'); Index: trunk/admin/import/step1.php =================================================================== diff -u -N --- trunk/admin/import/step1.php (revision 0) +++ trunk/admin/import/step1.php (revision 326) @@ -0,0 +1,153 @@ +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:main_import"; +//Set Environment Variable +$envar = "env=" . BuildEnv(); + + $sec = $objSections->GetSection($section); + $objCatToolBar = new clsToolBar(); + +// Clean Up Import DB Connection Variables +$objSession->SetVariable("import_sql_type",""); // sql server type +$objSession->SetVariable("import_server",""); // sql server address +$objSession->SetVariable("import_db",""); // database name +$objSession->SetVariable("import_user",""); // connection user +$objSession->SetVariable("import_pass",""); // connection password +$objSession->SetVariable("error_importing",""); // connection error + +// Clean Up Last Step Variables +$objSession->SetVariable('import_table_prefix',''); + +$objSession->SetVariable('user_admin_names',''); +$objSession->SetVariable('user_regular_names',''); +$objSession->SetVariable('user_admin_values',''); +$objSession->SetVariable('user_regular_values',''); +$objSession->SetVariable('catnavbar',''); +$objSession->SetVariable('init_cat',''); +$objSession->SetVariable('user_input1',''); // in use ? +$objSession->SetVariable('user_input2',''); // in use ? +$objSession->SetVariable('importtodo',''); + + $var="?env=".BuildEnv(); + + // Prev Button (no use at a time :) + $MouseOver=""; + $MouseOut=""; + $onClick=""; + $objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif"); + + // Next Button + $MouseOver="if( UsedAgreed() ) swap('moveright','toolbar/tool_next_f2.gif');"; + $MouseOut="if( UsedAgreed() ) swap('moveright', 'toolbar/tool_next.gif');"; + + $link2=$adminURL."/import/step2.php".$var; + $onClick="if( UsedAgreed() ) document.location= '$link2';"; + $objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),'#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif"); + + + $title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 1"; + + int_header($objCatToolBar,NULL,$title,' onload="PageOnLoad(1);"'); + +?> + + +"> + + > + + + > + + + + + + +
    This utility allows you to import data from other databases and applications, including third party products and earlier versions of this software. + +
    + +
    + +
    + + \ No newline at end of file Index: trunk/admin/import/step2.php =================================================================== diff -u -N --- trunk/admin/import/step2.php (revision 0) +++ trunk/admin/import/step2.php (revision 326) @@ -0,0 +1,135 @@ +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:main_import"; + + //Set Environment Variable + $envar = "env=" . BuildEnv(); + $var = '?env='.BuildEnv(); + + $sec = $objSections->GetSection($section); + $objCatToolBar = new clsToolBar(); + + // Previous Button + $MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');"; + $MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');"; + $link = $adminURL.'/import/step1.php'.$var; + $objCatToolBar->Add('moveleft','la_ToolTip_PreviousStep', $link, $MouseOver, $MouseOut,'','tool_prev.gif'); + + // Next Button + $MouseOver = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright','toolbar/tool_next_f2.gif');"; + $MouseOut = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright', 'toolbar/tool_next.gif');"; + + if($ro_perm) + { + $click_url = $adminURL."/import/step1.php".$var; + $onClick = "if( ChoiseMade('import_form','choose') ) document.location= '$click_url'; "; + } + else + { + $click_url = $adminURL."/import/step3.php".$var; + $onClick = "ImportRedirect('import_form', ChoiseMade('import_form','choose'), '$click_url');"; + } + $objCatToolBar->Add("moveright",'la_ToolTip_NextStep','#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif"); + + // header + $title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 2"; + int_header($objCatToolBar,NULL,$title); + +?> +
    + + + + + > + + + > + + +
    Select the program you are importing the data from:
    + $iscript) + echo '
    '."\n"; + ?> +
    +
    + \ No newline at end of file Index: trunk/admin/import/step3.php =================================================================== diff -u -N --- trunk/admin/import/step3.php (revision 0) +++ trunk/admin/import/step3.php (revision 326) @@ -0,0 +1,155 @@ +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:main_import"; + + //Set Environment Variable + $envar = "env=" . BuildEnv(); + $var = "?env=".BuildEnv(); + + + if( isset($_POST['import_id']) ) $objSession->SetVariable('ImportScriptID', $_POST['import_id']); + $import_script = GetImportScript( $objSession->GetVariable('ImportScriptID') ); + + + $sec = $objSections->GetSection($section); + $objCatToolBar = new clsToolBar(); + + // Previous Button + $MouseOver = "swap('moveleft','toolbar/tool_prev_f2.gif');"; + $MouseOut = "swap('moveleft', 'toolbar/tool_prev.gif');"; + $link = $adminURL."/import/step2.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');"; + $link2 = $adminURL."/import/step4.php".$var; + $onClick = "document.import_form.submit();"; + $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")." 3"; + int_header($objCatToolBar,NULL,$title); +?> + +
    + + + + > + + + + > + + + + > + + + + > + + + + > + + + + + + +
    + +
    + "> +
    + "> +
    + "> +
    + "> +
    GetVariable("error_importing"); ?>
    +
    + \ No newline at end of file Index: trunk/kernel/admin/include/toolbar/main_import.php =================================================================== diff -u -N --- trunk/kernel/admin/include/toolbar/main_import.php (revision 0) +++ trunk/kernel/admin/include/toolbar/main_import.php (revision 326) @@ -0,0 +1,111 @@ +HasSystemPermission("SYSTEM_ACCESS.READONLY"); +?> + + \ No newline at end of file Index: trunk/admin/import/step4.php =================================================================== diff -u -N --- trunk/admin/import/step4.php (revision 0) +++ trunk/admin/import/step4.php (revision 326) @@ -0,0 +1,210 @@ +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:main_import"; + + //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_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->PConnect($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"; + int_header($objCatToolBar,NULL,$title); + +?> + +
    "> + + + + + + > + + + + + > + + + + > + + + + + + + > + + + + + +
    + GetVariable("user_admin_names"); ?> + "> + + +
    + GetVariable("user_regular_names"); ?> + "> + + +
    GetVariable('categoryid'); + $path = prompt_language($objConfig->Get("Root_Name")); + if($catid > 0) + { + $c = $objCatList->GetItemByField('ResourceId', $catid); + $path .= ">".$c->GetCachedNavBar(); + } + ?> + + + "> + + +
    + "> +
    +
    + Index: trunk/kernel/admin/include/help/inlink_inport.txt =================================================================== diff -u -N --- trunk/kernel/admin/include/help/inlink_inport.txt (revision 55) +++ trunk/kernel/admin/include/help/inlink_inport.txt (revision 0) @@ -1,15 +0,0 @@ -This section allows the administrator to import the data from other applications into your existing In-portal system.

    -Step 1 of the import begins with a disclaimer that the data in your current system will be affected. Please ensure you understand the import process and the particular kind of import you are doing before proceeding. - -

    -In-link 2 Import
    -In the current version, only the import from In-link2 is available. The import is designed for In-link version 2.3.4, however it will work, or partially work, for most of the older In-link2 versions up to 2.0.10. If you have one of the older In-link2 versions and are experiencing problems, please upgrade your In-link2 to the version 2.3.4, and then run this import. It is not possible to use In-link2 import if you do not have In-link3 installed on your In-portal platform. Some In-link2 license holders are entitled to a complimentary In-link3 license, please go to your account at http://www.intechnic.com/myaccount for more information, or submit a support ticket. -

    -Step 3
    -In this step, the administrator will be asked to enter all database information for the In-link2 data. The current version of In-portal only supports import from the MySQL databases of In-link2.

    -Step 4
    -In this step, the administrator will need to designate the options of the import � how the In-link2 data is supposed to be integrated into In-portal and In-link3. -
  • Administrative Group � this field designates the In-portal administrative group (by default, �Admin'), into which the old In-link2 administrators should be imported. You can choose a different group for the import, and then designate the administrative users later. Clicking on the group button will pop up a list of In-portal groups. -
  • Regular User Group - this field designates the In-portal group (by default, �Members'), into which the old In-link2 users (link owners) should be imported. It is recommended to import then into a group that will give them access to the front-end, and to modify their links. However, you can choose a different group for the import, and then manage the users later. Clicking on the group button will pop up a list of In-portal groups. -
  • Initial Import Category � this field designates the In-portal category, which will serve as a root for the In-link2 import. This category will be the equivalent of the Home category in In-link2, and all of the sub-categories will be created underneath. Clicking on the category button (folder icon) will pop up a catalog navigator, where you can select the category. -
  • Link Image Name � this field designates the link image field in the In-link2 database, which was used to store the link image name. By default, it is �link_image' , however many users have used a custom field for this purpose, in which case you should enter the custom field name here. \ No newline at end of file