Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1084461
tag_listing.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, Aug 6, 12:23 PM
Size
4 KB
Mime Type
text/x-php
Expires
Fri, Aug 8, 12:23 PM (2 m, 22 s)
Engine
blob
Format
Raw Data
Handle
704437
Attached To
rINP In-Portal
tag_listing.php
View Options
<?php
if
(
!(
isset
(
$pathtoroot
)
&&
$pathtoroot
)
)
{
$path
=
dirname
(
realpath
(
__FILE__
));
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 */
if
(
!
isset
(
$pathtoroot
)
)
$pathtoroot
=
''
;
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
(
!(
isset
(
$pathtoroot
)
&&
$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"
);
include_once
(
$pathtoroot
.
"kernel/include/tag-class.php"
);
$rootURL
=
"http://"
.
ThisDomain
().
$objConfig
->
Get
(
"Site_Path"
);
$admin
=
$objConfig
->
Get
(
"AdminDirectory"
);
if
(!
strlen
(
$admin
))
$admin
=
"admin"
;
$localURL
=
$rootURL
.
"kernel/"
;
$imagesURL
=
$rootURL
.
"admin/images"
;
$adminURL
=
$rootURL
.
$admin
;
$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:tag_library"
;
//Set Environment Variable
$envar
=
"env="
.
BuildEnv
();
$sec
=
$objSections
->
GetSection
(
$section
);
$objCatToolBar
=
new
clsToolBar
();
$objCatToolBar
->
Add
(
"img_save"
,
"la_Save"
,
"#"
,
"swap('img_save','toolbar/tool_select_f2.gif');"
,
"swap('img_save', 'toolbar/tool_select.gif');"
,
"javascript:history.back();"
,
"tool_select.gif"
);
$objCatToolBar
->
Add
(
"img_cancel"
,
"la_Cancel"
,
"#"
,
"swap('img_cancel','toolbar/tool_cancel_f2.gif');"
,
"swap('img_cancel', 'toolbar/tool_cancel.gif');"
,
"javascript:history.back();"
,
"tool_cancel.gif"
);
$extra_styles
=
'<STYLE type="text/css">
<!--
.tag-listing {
border-collapse: collapse;
padding: 0px;
margin: 0px;
border: 0px;
background-color: #f6f6f6;
}
.tag-listing-row {font: 11px verdana}
.b-element {font: bold 13px}
.i-element {font: oblique 12px; background: #ebebeb;}
.header {
background: #999;
color: #fff;
}
-->
</STYLE>'
;
$title
=
admin_language
(
"la_tag_library"
);
int_header
(
$objCatToolBar
,
NULL
,
$title
,
NULL
,
$extra_styles
);
$objTagList
=
new
clsTagList
();
$objTagList
->
Clear
();
$objTagList
->
Query_Item
(
"SELECT * FROM "
.
$objTagList
->
SourceTable
);
?>
<table class="tag-listing" border="0" width="100%">
<?php
if
(
$objTagList
->
NumItems
()>
0
)
{
foreach
(
$objTagList
->
Items
as
$i
)
{
$i
->
LoadAttribs
();
//echo " ".$i->attribs->NumItems()." Attributes<br>\n";
if
(
$i
->
Get
(
"name"
)
)
{
?>
<tr class="header">
<td class="b-element" colspan="2">
<?php
echo
(
$i
->
Get
(
"scope"
)
!=
"global"
)
?
$i
->
Get
(
"scope"
).
'.'
.
$i
->
Get
(
"name"
)
:
$i
->
Get
(
"name"
);
?>
</td>
</tr>
<tr class="tag-listing-row">
<td colspan="2" class="i-element">
<?php
echo
$i
->
Get
(
"description"
);
?>
</td>
</tr>
<tr class="tag-listing-row">
<td class="b-element" width="90%">Attributes:</td>
<td class="b-element" width="10%">Source example:</td>
</tr>
<tr>
<td>
<?php
if
(
$i
->
attribs
->
NumItems
()
>
0
)
{
// has attributes
?>
<!-- attributes listing: begin -->
<table border="0" width="100%" class="tag-listing">
<?php
foreach
(
$i
->
attribs
->
Items
as
$a
)
{
?>
<tr class="tag-listing-row">
<td valign="top">
<?php
echo
$a
->
Get
(
"Name"
).
'['
.
$a
->
Get
(
"AttrType"
).
']'
;
?>
</td>
<td>
<?php
echo
$a
->
Get
(
"Description"
);
?>
</td>
</tr>
<?php
}
?>
</table>
<!-- attributes listing: end -->
<?php
}
else
{
?>
<?php
}
?>
</td>
<td>
<!-- example -->
<?php
$example
=
$i
->
Get
(
'example'
);
echo
$example
?
$example
:
' '
;
?>
</td>
</tr>
<?php
}
}
}
?>
</table>
<?php
int_footer
();
?>
Event Timeline
Log In to Comment