Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F773648
in-portal
No One
Temporary
Actions
View 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
Sun, Feb 2, 6:56 PM
Size
8 KB
Mime Type
text/x-diff
Expires
Tue, Feb 4, 6:56 PM (3 h, 50 m)
Engine
blob
Format
Raw Data
Handle
556845
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/subitems.php
===================================================================
--- trunk/admin/subitems.php (revision 1705)
+++ trunk/admin/subitems.php (revision 1706)
@@ -1,186 +1,196 @@
<?php
if(!strlen($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 */
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");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
//echo "Admin: $admin <br>\n";
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL=$rootURL.$admin;
$imagesURL = $adminURL."/images";
$cssURL = $adminURL."/include";
$jsURL = $adminURL."/include/subitems";
//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");
$section = $_GET["section"];
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
$incs = array();
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$inc = $pathtoroot.$value."admin/include/summary/".$sectionname.".php";
//echo "<pre>". $inc ."</pre><BR>";
if(file_exists($inc))
$incs[] = $inc;
}
$envar = BuildEnv();
$charset = GetRegionalOption('Charset');
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=$charset">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
clear_checkboxes=0;
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<<END
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$cssURL/subitems.css">
<script src="$jsURL/listitems.js"></script>
<script src="$jsURL/imgbuttons.js"></script>
<script src="$jsURL/navboxes.js"></script>
END;
int_SectionHeader();
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td valign="top">
- <table cellspacing="0" cellpadding="2" border="0" width="100%" CLASS="tableborder_full">
<?php
- $parent = $objSections->GetSection($section);
- $sub = $objSections->GetSection($parent->Get("child"));
- while(is_object($sub))
- {
- echo "<tr isListItem=\"true\" ". int_table_color_ret(). ">\n";
- echo " <td class=\"subitem_icon\">";
- echo " <img ALIGN=\"left\" src=\"".$sub->IconURL(2)."\" border=\"0\">";
- echo " </td>";
- echo " <td class=\"subitem_description\"><a href=\"".$sub->URL()."\" class=\"dLink\">";
- $lang_tag = "la_Description_".$sub->Get("key");
- echo admin_language($sub->Get("name"))."</A>";
- echo prompt_language($lang_tag); //$sub->Get("description");
- echo " </td>\n";
- echo "</tr>\n";
- $sub = $objSections->GetSection($sub->Get("right"));
- }
+ $parent = $objSections->GetSection($section);
+ $sub = $objSections->GetSection( $parent->Get("child") );
+ $has_modules = is_object($sub);
+?>
+ <table cellspacing="0" cellpadding="2" border="0" width="100%" CLASS="<?php echo $has_modules ? 'tableborder_full' : ''; ?>">
+<?php
+ if($has_modules)
+ {
+ while(is_object($sub))
+ {
+ echo '<tr isListItem="true" '.int_table_color_ret().'>'."\n";
+ echo ' <td class="subitem_icon">';
+ echo ' <img align="left" src="'.$sub->IconURL(2).'" border="0">';
+ echo ' </td>';
+ echo ' <td class="subitem_description"><a href="'.$sub->URL().'" class="dLink">';
+ $lang_tag = 'la_Description_'.$sub->Get('key');
+ echo admin_language( $sub->Get('name') ).'</a>';
+ echo prompt_language($lang_tag); //$sub->Get("description");
+ echo ' </td>'."\n";
+ echo '</tr>'."\n";
+ $sub = $objSections->GetSection( $sub->Get('right') );
+ }
+ }
+ else
+ {
+ echo '<tr><td> </td></tr>';
+ }
?>
</TABLE>
</TD>
<?php
if(count($incs)>0)
{
?>
<td width="1"><img src="<?php echo $imagesURL; ?>/spacer.gif" width="4" height="1"></td>
<td width="269" valign="top" class="boxContainer">
<?php
// including each module summaries here
for($i=0;$i<count($incs);$i++)
include($incs[$i]);
?>
</TD>
<?php
}
?>
</TR>
</TABLE>
<?php
if(count($incs)>0)
{
?>
<script>
init();
</script>
<?php
}
?>
<form ID="viewmenu" NAME="viewmenu" method="post" action="user_list.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>
<?php int_footer(); ?>
Property changes on: trunk/admin/subitems.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property
Index: trunk/admin/include/subitems/listitems.js
===================================================================
--- trunk/admin/include/subitems/listitems.js (revision 1705)
+++ trunk/admin/include/subitems/listitems.js (revision 1706)
@@ -1,28 +1,29 @@
var liClassName = "liTR";
var liClassNameO = "liTRO";
function initListItems()
{
- var TRs = document.getElementsByTagName("TR");
- var numLIsFound = 0;
- for (var i = 0; i < TRs.length; i++)
- if (TRs[i].getAttribute("isListItem"))
- {
- TRs[i].className = liClassName + (numLIsFound % 2);
- TRs[i].oriClassName = liClassName + (numLIsFound % 2);
- //TRs[i].onmouseover = function() { this.className = liClassNameO; }
- //TRs[i].onmouseout = function() { this.className = this.oriClassName; }
- var As = TRs[i].getElementsByTagName("A");
- if (As.length < 1) continue;
- var IMGs = TRs[i].getElementsByTagName("IMG");
- if (IMGs.length < 1) continue;
- IMGs[0].className = "imgButton";
- IMGs[0].a = As[0];
-
- IMGs[0].onclick = function()
- {
- document.location = this.a.getAttribute("href");
- }
- numLIsFound++;
- }
+ var TRs = document.getElementsByTagName("TR");
+ var numLIsFound = 0;
+ for(var i = 0; i < TRs.length; i++)
+ {
+ if(TRs[i].getAttribute("isListItem") )
+ {
+ TRs[i].className = liClassName + (numLIsFound % 2);
+ TRs[i].oriClassName = liClassName + (numLIsFound % 2);
+ //TRs[i].onmouseover = function() { this.className = liClassNameO; }
+ //TRs[i].onmouseout = function() { this.className = this.oriClassName; }
+ var As = TRs[i].getElementsByTagName("A");
+ if (As.length < 1) continue;
+ var IMGs = TRs[i].getElementsByTagName("IMG");
+ if (IMGs.length < 1) continue;
+ IMGs[0].className = "imgButton";
+ IMGs[0].a = As[0];
+ IMGs[0].onclick = function()
+ {
+ document.location = this.a.getAttribute("href");
+ }
+ numLIsFound++;
+ }
+ }
}
\ No newline at end of file
Property changes on: trunk/admin/include/subitems/listitems.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Event Timeline
Log In to Comment