Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804439
step4.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 11:09 AM
Size
7 KB
Mime Type
text/x-php
Expires
Fri, Feb 28, 11:09 AM (22 h, 24 m)
Engine
blob
Format
Raw Data
Handle
576986
Attached To
rINP In-Portal
step4.php
View Options
<?php
// new startup: begin
define
(
'REL_PATH'
,
'admin/import'
);
$relation_level
=
count
(
explode
(
'/'
,
REL_PATH
)
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
str_repeat
(
'/..'
,
$relation_level
)
)
);
require_once
FULL_PATH
.
'/kernel/startup.php'
;
// new startup: end
//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
->
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
);
?>
<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 -->
<?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_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>
<?php
}
?>
<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'
)
{
if
(
GetVar
(
'link_image'
)
)
$objSession
->
SetVariable
(
'link_image'
,
GetVar
(
'link_image'
)
);
?>
<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
}
if
(
$import_script
[
'module'
]
==
'in-bulletin'
)
{
if
(
GetVar
(
'bb_prefix'
)
)
$objSession
->
SetVariable
(
'import_table_prefix'
,
GetVar
(
'bb_prefix'
)
);
?>
<tr
<?php
echo
int_table_color
();
?>
>
<td width="60%" valign="top"><span class="text">
<?php
echo
admin_language
(
"la_prompt_Import_Prefix"
);
?>
</span></td>
<td>
<input type="text" name="bb_prefix" class="text" size="30" value="
<?php
echo
$objSession
->
GetVariable
(
'import_table_prefix'
);
?>
">
</td>
</tr>
<?php
}
?>
<!-- script spefific fields: end -->
</table>
</form>
<?php
int_footer
();
?>
Event Timeline
Log In to Comment