Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1101208
browse.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
Sat, Aug 16, 12:16 PM
Size
17 KB
Mime Type
text/x-php
Expires
Mon, Aug 18, 12:16 PM (19 h, 15 m)
Engine
blob
Format
Raw Data
Handle
713176
Attached To
rINP In-Portal
browse.php
View Options
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
//$pathtoroot="";
$b_topmargin
=
"0"
;
//$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='position:absolute; width:100%;top:0px;' align='right'><img src='images/logo_bg.gif'></div><img src='images/spacer.gif' width=1 height=15><br><div style='z-Index:1; position:relative'>";
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;
require_once
(
$pathtoroot
.
"kernel/startup.php"
);
if
(!
admin_login
())
{
if
(!
headers_sent
())
setcookie
(
"sid"
,
" "
,
time
()-
3600
);
$objSession
->
Logout
();
header
(
"Location: "
.
$adminURL
.
"/login.php"
);
die
();
//require_once($pathtoroot."admin/login.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"
;
$browseURL
=
$adminURL
.
"/browse"
;
$cssURL
=
$adminURL
.
"/include"
;
$indexURL
=
$rootURL
.
"index.php"
;
$m_var_list_update
[
"cat"
]
=
0
;
$homeURL
=
"javascript:AdminCatNav('"
.
$_SERVER
[
"PHP_SELF"
].
"?env="
.
BuildEnv
().
"');"
;
unset
(
$m_var_list_update
[
"cat"
]);
$envar
=
"env="
.
BuildEnv
();
if
(
$objCatList
->
CurrentCategoryID
()>
0
)
{
$c
=
$objCatList
->
CurrentCat
();
$upURL
=
"javascript:AdminCatNav('"
.
$c
->
Admin_Parent_Link
().
"');"
;
}
else
$upURL
=
$_SERVER
[
"PHP_SELF"
].
"?"
.
$envar
;
//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
.
"/browse/toolbar.php"
);
$m
=
GetModuleArray
();
foreach
(
$m
as
$key
=>
$value
)
{
$path
=
$pathtoroot
.
$value
.
"admin/include/parser.php"
;
if
(
file_exists
(
$path
))
{
//echo "<!-- $path -->";
@
include_once
(
$path
);
}
}
if
(!
$is_install
)
{
if
(!
admin_login
())
{
if
(!
headers_sent
())
setcookie
(
"sid"
,
" "
,
time
()-
3600
);
$objSession
->
Logout
();
header
(
"Location: "
.
$adminURL
.
"/login.php"
);
die
();
//require_once($pathtoroot."admin/login.php");
}
}
//Set Section
$section
=
'in-portal:browse'
;
//Set Environment Variable
//echo $objCatList->ItemsOnClipboard()." Categories on the clipboard<br>\n";
//echo $objTopicList->ItemsOnClipboard()." Topics on the clipboard<br>\n";
//echo $objLinkList->ItemsOnClipboard()." Links on the clipboard<br>\n";
//echo $objArticleList->ItemsOnClipboard()." Articles on the clipboard<br>\n";
// save last category visited
$objSession
->
SetVariable
(
'prev_category'
,
$objSession
->
GetVariable
(
'last_category'
)
);
$objSession
->
SetVariable
(
'last_category'
,
$objCatList
->
CurrentCategoryID
()
);
/* // for testing
$last_cat = $objSession->GetVariable('last_category');
$prev_cat = $objSession->GetVariable('prev_category');
echo "Last CAT: [$last_cat]<br>";
echo "Prev CAT: [$prev_cat]<br>";
*/
$SearchType
=
$objSession
->
GetVariable
(
"SearchType"
);
if
(!
strlen
(
$SearchType
))
$SearchType
=
"all"
;
$SearchLabel
=
"la_SearchLabel"
;
if
(
GetVar
(
'SearchWord'
)
!==
false
)
$objSession
->
SetVariable
(
'admin_seach_words'
,
GetVar
(
'SearchWord'
)
);
$SearchWord
=
$objSession
->
GetVariable
(
'admin_seach_words'
);
$objSession
->
SetVariable
(
"HasChanges"
,
0
);
/* page header */
print
<<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
END;
require_once
(
$pathtoroot
.
$admin
.
"/include/mainscript.php"
);
print
<<<END
<script type="text/javascript">
if (window.opener != null) {
theMainScript.CloseAndRefreshParent();
}
</script>
END;
print
<<<END
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/checkboxes_new.js"></script>
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
END;
load_module_styles
();
if
(
!
isset
(
$list
)
)
$list
=
''
;
if
((
$SearchType
==
"categories"
||
$SearchType
=
"all"
)
&&
strlen
(
$list
))
{
int_SectionHeader
(
NULL
,
NULL
,
NULL
,
admin_language
(
"la_Title_SearchResults"
));
}
else
int_SectionHeader
();
if
(
$objSession
->
GetVariable
(
"SearchWord"
)
!=
''
)
{
$filter
=
true
;
}
else
{
$sessVars
=
$objConfig
->
GetSessionValues
(
0
);
//print_pre($sessVars);
foreach
(
$sessVars
as
$key
=>
$value
)
{
if
(
strstr
(
$key
,
'_View'
))
{
//echo "$value<br>";
if
(
$value
!=
1
)
{
$filter
=
true
;
}
}
}
}
?>
</div>
<!-- alex mark -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<div name="toolBar" id="mainToolBar">
<tb:button action="upcat" alt="
<?php
echo
admin_language
(
"la_ToolTip_Up"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="homecat" alt="
<?php
echo
admin_language
(
"la_ToolTip_Home"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:separator ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="new_cat" alt="
<?php
echo
admin_language
(
"la_ToolTip_New_Category"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="editcat" alt="
<?php
echo
admin_language
(
"la_ToolTip_Edit_Current_Category"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<?php
foreach
(
$NewButtons
as
$btn
)
{
print
"<tb:button action=
\"
"
.
$btn
[
"Action"
].
"
\"
alt=
\"
"
.
$btn
[
"Alt"
].
"
\"
ImagePath=
\"
"
.
$btn
[
"ImagePath"
].
"
\"
"
;
if
(
strlen
(
$btn
[
"Tab"
])>
0
)
print
"tab=
\"
"
.
$btn
[
"Tab"
].
"
\"
"
;
print
">
\n
"
;
}
?>
<tb:button action="edit" alt="
<?php
echo
admin_language
(
"la_ToolTip_Edit"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="delete" alt="
<?php
echo
admin_language
(
"la_ToolTip_Delete"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:separator ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="approve" alt="
<?php
echo
admin_language
(
"la_ToolTip_Approve"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="decline" alt="
<?php
echo
admin_language
(
"la_ToolTip_Decline"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:separator ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="cut" alt="
<?php
echo
admin_language
(
"la_ToolTip_Cut"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="copy" alt="
<?php
echo
admin_language
(
"la_ToolTip_Copy"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="paste" alt="
<?php
echo
admin_language
(
"la_ToolTip_Paste"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:separator ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="move_up" alt="
<?php
echo
admin_language
(
"la_ToolTip_Move_Up"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="move_down" alt="
<?php
echo
admin_language
(
"la_ToolTip_Move_Down"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:separator ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="print" alt="
<?php
echo
admin_language
(
"la_ToolTip_Print"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="view" alt="
<?php
echo
admin_language
(
"la_ToolTip_View"
);
?>
" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
</div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
<tbody>
<tr>
<td><img height="15" src="
<?php
echo
$imagesURL
;
?>
/arrow.gif" width="15" align="middle" border="0">
<span class="navbar">
<?php
$attribs
[
"admin"
]=
1
;
print
m_navbar
(
$attribs
);
?>
</span>
</td>
<td align="right">
<FORM METHOD="POST" ACTION="
<?php
echo
$_SERVER
[
"PHP_SELF"
].
"?"
.
$envar
;
?>
" NAME="admin_search" ID="admin_search"><INPUT ID="SearchScope" NAME="SearchScope" type="hidden" VALUE="
<?php
echo
$objSession
->
GetVariable
(
"SearchScope"
);
?>
"><INPUT ID="SearchType" NAME="SearchType" TYPE="hidden" VALUE="
<?php
echo
$objSession
->
GetVariable
(
"SearchType"
);
?>
"><INPUT ID="NewSearch" NAME="NewSearch" TYPE="hidden" VALUE="0"><INPUT TYPE="HIDDEN" NAME="Action" value="m_Exec_Search">
<table cellspacing="0" cellpadding="0"><tr>
<td>
<?php
echo
admin_language
(
$SearchLabel
);
?>
</td>
<td><input ID="SearchWord" type="text" value="
<?php
echo
$SearchWord
;
?>
" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
<td><img id="imgSearch" action="search_b" src="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search.gif" alt="
<?php
echo
admin_language
(
"la_ToolTip_Search"
);
?>
" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/arrow16.gif" onmouseover="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search_f2.gif'" onmouseout="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search.gif'" style="cursor:hand" width="22" width="22"><img action="search_a" alt="
<?php
echo
admin_language
(
"la_ToolTip_Search"
);
?>
" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/arrow16.gif" onmouseover="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/arrow16_f2.gif'" onmouseout="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/arrow16.gif'" style="cursor:hand">
<img action="search_c" src="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search_reset.gif" alt="
<?php
echo
admin_language
(
"la_ToolTip_Search"
);
?>
" align="absMiddle" onclick="document.all.SearchWord.value = ''; this.action = this.getAttribute('action'); actionHandler(this);" onmouseover="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search_reset_f2.gif'" onmouseout="this.src='
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
/icon16_search_reset.gif'" style="cursor:hand" width="22" width="22">
</td>
</tr></table>
</FORM>
<!--tb:button action="search_b" alt="
<?php
echo
admin_language
(
"la_ToolTip_Search"
);
?>
" align="right" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
">
<tb:button action="search_a" alt="
<?php
echo
admin_language
(
"la_ToolTip_Search"
);
?>
" align="right" ImagePath="
<?php
echo
$imagesURL
.
"/toolbar/"
;
?>
"-->
</td>
</tr>
</tbody>
</table>
<?php
if
(
$filter
)
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php
int_hint_red
(
admin_language
(
"la_Warning_Filter"
));
?>
</td>
</tr>
</table>
<?php
}
?>
<br>
<!-- CATEGORY DIVIDER -->
<?php
$OrderBy
=
$objCatList
->
QueryOrderByClause
(
TRUE
,
TRUE
,
TRUE
);
$objCatList
->
Clear
();
$IsSearch
=
FALSE
;
if
(
$SearchType
==
'categories'
||
$SearchType
==
'all'
)
{
$list
=
$objSession
->
GetVariable
(
"SearchWord"
);
$SearchQuery
=
$objCatList
->
AdminSearchWhereClause
(
$list
);
if
(
strlen
(
$SearchQuery
))
{
$SearchQuery
=
" ("
.
$SearchQuery
.
") "
;
if
(
strlen
(
$CatScopeClause
)
)
$SearchQuery
.=
" AND "
.
$CatScopeClause
;
$objCatList
->
LoadCategories
(
$SearchQuery
.
$CategoryFilter
,
$OrderBy
);
$IsSearch
=
TRUE
;
}
else
$objCatList
->
LoadCategories
(
"ParentId="
.
$objCatList
->
CurrentCategoryID
().
" "
.
$CategoryFilter
,
$OrderBy
);
}
else
$objCatList
->
LoadCategories
(
"ParentId="
.
$objCatList
->
CurrentCategoryID
().
" "
.
$CategoryFilter
,
$OrderBy
);
$TotalItemCount
+=
$objCatList
->
QueryItemCount
;
?>
<?php
$e
=
$Errors
->
GetAdminUserErrors
();
if
(
count
(
$e
)>
0
)
{
echo
"<table cellspacing=
\"
0
\"
cellpadding=
\"
0
\"
width=
\"
100%
\"
border=
\"
0
\"
>"
;
for
(
$ex
=
0
;
$ex
<
count
(
$e
);
$ex
++)
{
echo
"<tr><td width=
\1
00%
\"
class=
\"
error
\"
>"
.
prompt_language
(
$e
[
$ex
]).
"</td></tr>"
;
}
echo
"</TABLE><br>"
;
}
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="138" height="20" nowrap="nowrap" class="active_tab" onclick="toggleCategoriesB(this)" id="cats_tab">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td id="l_cat" background="
<?php
echo
$imagesURL
;
?>
/itemtabs/tab_active_l.gif" class="left_tab">
<img src="
<?php
echo
$imagesURL
;
?>
/itemtabs/divider_up.gif" width="20" height="20" border="0" align="absmiddle">
</td>
<td id="m_cat" nowrap background="
<?php
echo
$imagesURL
;
?>
/itemtabs/tab_active.gif" class="tab_class">
<?php
echo
admin_language
(
"la_ItemTab_Categories"
);
?>
:
</td>
<td id="m1_cat" align="right" valign="top" background="
<?php
echo
$imagesURL
;
?>
/itemtabs/tab_active.gif" class="tab_class">
<span class="cats_stats">(
<?php
echo
$objCatList
->
QueryItemCount
;
?>
)</span>
</td>
<td id="r_cat" background="
<?php
echo
$imagesURL
;
?>
/itemtabs/tab_active_r.gif" class="right_tab">
<img src="
<?php
echo
$imagesURL
;
?>
/spacer.gif" width="21" height="20">
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</tbody>
</table>
<div class="divider" style="" id="categoriesDevider"><img width="1" height="1" src="
<?php
echo
$imagesURL
;
?>
/spacer.gif"></div>
</DIV>
</div>
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index:0" id="firstContainer">
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index:2" id="secondContainer">
<!-- CATEGORY OUTPUT START -->
<div id="categories" tabtitle="Categories">
<form id="categories_form" name="categories_form" action="" method="post">
<input type="hidden" name="Action">
<?php
if
(
$IsSearch
)
{
$template
=
"cat_search_element.tpl"
;
}
else
{
$template
=
"cat_element.tpl"
;
}
print
adListSubCats
(
$objCatList
->
CurrentCategoryID
(),
$template
);
?>
</form>
</div>
<BR>
<!-- CATEGORY OUTPUT END -->
<?php
print
$ItemTabs
->
TabRow
();
if
(
count
(
$ItemTabs
->
Tabs
))
{
?>
<div class="divider" id="tabsDevider"><img width=1 height=1 src="images/spacer.gif"></div>
<?php
}
?>
</DIV>
<?php
unset
(
$m
);
$m
=
GetModuleArray
(
"admin"
);
foreach
(
$m
as
$key
=>
$value
)
{
$path
=
$pathtoroot
.
$value
.
"admin/browse.php"
;
if
(
file_exists
(
$path
))
{
//echo "\n<!-- $path -->\n";
include_once
(
$path
);
}
}
?>
<form method="post" action="browse.php?env=
<?php
echo
BuildEnv
();
?>
" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
</DIV>
<!-- END CODE-->
<script language="JavaScript">
InitPage();
cats_on = theMainScript.GetCookie('cats_tab_on');
if (cats_on == 0) {
toggleCategoriesB(document.getElementById('cats_tab'), true);
}
tabs_on = theMainScript.GetCookie('tabs_on');
if (tabs_on == '1' || tabs_on == null) {
if(default_tab.length == 0 || default_tab == 'categories' )
{
cookie_start = theMainScript.GetCookie('active_tab');
if (cookie_start != null) start_tab = cookie_start;
if(start_tab!=null) {
//alert('ok');
toggleTabB(start_tab, true);
}
}
else
{
//alert('ok');
toggleTabB(default_tab,true);
}
}
d = document.getElementById('SearchWord');
if(d)
{
d.onkeyup = function(event) {
if(window.event.keyCode==13)
{
var el = document.getElementById('imgSearch');
el.onclick();
}
}
}
</script>
<?php
int_footer
();
?>
Event Timeline
Log In to Comment