Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Mon, Nov 3, 6:00 PM

in-portal

Index: trunk/kernel/admin_templates/img/icons/icon46_list_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/kernel/admin_templates/img/icons/icon46_list_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/kernel/admin_templates/img/icons/icon24_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/kernel/admin_templates/img/icons/icon24_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/kernel/admin_templates/img/icons/icon46_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/kernel/admin_templates/img/icons/icon46_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/kernel/admin_templates/incs/footer.tpl
===================================================================
--- trunk/kernel/admin_templates/incs/footer.tpl (revision 1714)
+++ trunk/kernel/admin_templates/incs/footer.tpl (revision 1715)
@@ -1,4 +1,5 @@
+<br /><br />
<inp2:m_AfterScript/>
</body>
<inp2:m_ParseBlock name="kernel_form_end"/>
</html>
\ No newline at end of file
Property changes on: trunk/kernel/admin_templates/incs/footer.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/kernel/admin/include/summary/root.php
===================================================================
--- trunk/kernel/admin/include/summary/root.php (revision 1714)
+++ trunk/kernel/admin/include/summary/root.php (revision 1715)
@@ -1,222 +1,242 @@
<?php
$lang_Search = admin_language("la_prompt_Search");
$lang_Users = admin_language("la_Text_Users");
$lang_PendingItems = admin_language("la_prompt_PendingItems");
$lang_Catalog = admin_language("la_Text_Catalog");
global $adminURL,$rootURL,$admin;
$UserURL = $adminURL."/users/user_list.php?env=".BuildEnv();
$browseURL = $adminURL."/browse.php?env=".BuildEnv();
$PendingTotal = 0;
$date_str = adodb_date("F j, Y");
print <<<END
<div isBox="true" id="overview">
<div class="overviewbox_header" func="header" STYLE="background:url($imagesURL/summary/overviewbox_header.gif);">
<img src="$imagesURL/spacer.gif" width="1" height="4"><br>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td><img isEI="true" src="$imagesURL/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4"><span class="overview">Overview</span></td>
<td class="info" valign="top" align="right"><span class="overviewDate">$date_str</span>&nbsp;</td>
</tr>
</table>
</div>
<div class="overviewbox_body" func="body" STYLE="background:url($imagesURL/summary/overviewbox_bg.gif);">
<div style="padding:4px; width:100%">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="lTD" width="50%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
END;
$template = "<TR><TD class=\"oInfo\"><inp:stats_label /></TD><td width=\"1%\" nowrap class=\"oValue\"><inp:stats_value /></TD></TR>";
$objStats = new clsStatList();
$objStats->Query_Item("SELECT * FROM ".GetTablePrefix()."StatItem WHERE AdminSummary=1");
$ItemCount = $objStats->NumItems();
$ItemsPerCol = ceil($ItemCount / 2);
$i = 0;
$col = 1;
$o = "";
while($i < $ItemsPerCol)
{
$s = $objStats->GetItemByIndex($i);
$o .= $s->ParseTemplateText($template);
$i++;
}
print $o;
print <<<END
</table>
</td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
END;
$o = "";
while($i<$ItemCount)
{
$s = $objStats->GetItemByIndex($i);
$o .= $s->ParseTemplateText($template);
$i++;
}
print $o;
// ---- prepare pending items list based on modules installed: begin -----
$m = GetModuleArray();
foreach($m as $key => $value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if( file_exists($path) ) include_once($path);
}
$modules = $objModules->GetModuleList();
$pending_source = $objModules->ExecuteFunction('GetModuleInfo', 'summary_pending');
// get total pending item count & merge them into one array
$all_pending = Array();
$pending_col_1 = '';
$pending_col_2 = '';
foreach($pending_source as $module_name => $pending_items)
+{
foreach($pending_items as $p_item)
+ {
$all_pending[] = $p_item;
-
+ }
+}
+
if( count($all_pending) % 2 ) $all_pending[] = 'empty';
$ItemCount = count($all_pending);
$ItemsPerCol = ceil($ItemCount / 2);
$i = 0;
while($i < $ItemCount)
{
// create cell content
$item_count = 0;
$col_type = ($i < $ItemsPerCol) ? 'l' : 'r';
$class = $col_type.'TDi';
// if last item then change class
if($i+1 == $ItemsPerCol)
$class = 'lTD';
elseif($i+1 == $ItemsPerCol*2)
$class = 'rTD';
//print_pre($all_pending[$i]);
$cell = is_array($all_pending[$i]) ? PendingCell($all_pending[$i], $class, $item_count) : '<tr><td class="rTD">&nbsp;</td></tr>';
if($col_type == 'l')
$pending_col_1 .= $cell;
elseif($col_type == 'r')
$pending_col_2 .= $cell;
$PendingTotal += $item_count;
//allocate it to row
$i++;
}
function PendingCell($params, $class, &$pending_count)
{
- $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending();
+ $list_name = getArrayValue($params, 'list_var_name');
+
+ $prefix_pos = strpos($list_name, ':');
+ if( $prefix_pos !== false)
+ {
+ global $application;
+ $prefix = substr($list_name, $prefix_pos+1, strlen($list_name) );
+ $table =& $application->getUnitOption($prefix, 'TableName');
+ $sql = 'SELECT COUNT(*) FROM %s WHERE Status = 2';
+
+ $pending_count = $application->DB->GetOne( sprintf($sql, $table) );
+ }
+ else
+ {
+ $pending_count = $GLOBALS[ $params['list_var_name'] ]->CountPending();
+ }
+
$o = '<tr>'."\n";
$o .= '<td class="'.$class.'">'."\n";
$o .= '<a href="javascript:'.$params['link'].';" class="userslink">'."\n";
$o .= '<img src="'.$params['icon_image'].'" border="0" align="absMiddle">'."\n";
$o .= admin_language($params['phrase']);
$o .= '<span class="info">&nbsp;('.$pending_count.')</span></a>'."\n";
$o .= '</td>'."\n";
$o .= '</tr>'."\n";
return $o;
}
// ---- prepare pending items list based on modules installed: end -----
print <<<END
</table>
</td>
</tr>
</table>
</div>
<img src="$imagesURL/spacer.gif" height="21" width="1">
</div>
</div>
<div isBox="true" id="searchBox">
<div class="searchbox_header" func="header" STYLE="background:url($imagesURL/summary/searchbox_header.gif);">
<img src="$imagesURL/spacer.gif" width="1" height="4"><br />
<img isEI="true" src="$imagesURL/summary/searchbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4">$lang_Search $lang_Users
</div>
<div class="searchbox_body" func="body" STYLE="background:url($imagesURL/summary/searchbox_bg.gif);">
<img src="$imagesURL/spacer.gif" width="1" height="12"><br />
<form NAME="user_search" ID="user_search" method=POST action="$UserURL">
<img src="$imagesURL/spacer.gif" width="12" height="1"><input NAME="list_search" class="search" type="text">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_user_search">
<img isImgButton="true" src="$imagesURL/toolbar/icon16_search.gif" width="22" height="22" align="absMiddle" onclick="user_search.submit();">
</FORM>
</div>
</div>
<div isBox="true" id="pendingitems">
<div class="usersbox_header" func="header" STYLE="background:url($imagesURL/summary/usersbox_header.gif);">
<img src="$imagesURL/spacer.gif" width="1" height="4"><br />
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img isEI="true" src="$imagesURL/summary/usersbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4"><b>$lang_PendingItems</b></td>
<td class="info" valign="top">&nbsp;($PendingTotal)</td>
</tr>
</table>
</div>
<div class="usersbox_body" func="body" STYLE="background:url($imagesURL/summary/usersbox_bg.gif);">
<div style="padding:8px; width:100%">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="50%">
<table cellspacing="0" cellpadding="4" border="0" width="100%">
$pending_col_1
</table>
</td>
<td valign="top" width="50%">
<table cellspacing="0" cellpadding="4" border="0" width="100%">
$pending_col_2
</table>
</td>
</tr>
</table>
</div>
<img src="images/spacer.gif" height="21" width="1">
</div>
</DIV>
<div isBox="true" id="quicklinks">
<div class="overviewbox_header" func="header" STYLE="background:url($imagesURL/summary/overviewbox_header.gif);">
<img src="$imagesURL/spacer.gif" width="1" height="4"><br>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><img isEI="true" src="$imagesURL/summary/overviewbox_cl.gif" width="8" height="8" align="absMiddle" hSpace="4"><span class="overview">Quick Links</span></td>
<td class="info" valign="top" align="right"><span class="overviewDate"></span>&nbsp;</td>
</tr>
</table>
</div>
<div class="overviewbox_body" func="body" STYLE="background:url($imagesURL/summary/overviewbox_bg.gif);">
<div style="padding:4px; width:100%">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="4">
<tr><td><a class="userslink" href="$browseURL"><img hSpace="3" src="$adminURL/icons/icon24_navigate.gif" border="0" align="absMiddle">$lang_Catalog</a></td></tr>
<tr><td><a class="userslink" href="$UserURL"><img hSpace="3" src="$adminURL/icons/icon24_users.gif" border="0" align="absMiddle">$lang_Users</a></td></tr>
</table>
</div>
<img src="images/spacer.gif" height="21" width="1">
</div>
</div>
END;
?>
\ No newline at end of file
Property changes on: trunk/kernel/admin/include/summary/root.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/admin/subitems.php
===================================================================
--- trunk/admin/subitems.php (revision 1714)
+++ trunk/admin/subitems.php (revision 1715)
@@ -1,196 +1,146 @@
<?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");
+ // KENEL4 INIT: BEGIN
+ define('FULL_PATH', realpath(dirname(__FILE__).'/..') );
+ define('APPLICATION_CLASS', 'MyApplication');
+ include_once(FULL_PATH.'/kernel/kernel4/startup.php');
+ $application =& kApplication::Instance();
+ $application->Init();
+ // KERNEL4 INI: END
+
+ // IN-PORTAL INIT: BEGIN
+ $g_TablePrefix = TABLE_PREFIX;
+ $pathtoroot = DOC_ROOT.BASE_PATH.'/';
+ require_once DOC_ROOT.BASE_PATH.'/kernel/startup.php';
+ // IN-PORTAL INIT: END
+
+ $rootURL = $application->BaseURL();
+ $admin = ADMIN_DIR;
+
+ $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.$admin.'/toolbar.php');
+ $section = $application->GetVar('section');
+
+ $sectionname = explode(":", $section);
+ $sectionname = $sectionname[sizeof($sectionname)-1];
-$admin = $objConfig->Get("AdminDirectory");
-//echo "Admin: $admin <br>\n";
-if(!strlen($admin))
- $admin = "admin";
+ $incs = Array();
-$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;
-}
+ $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');
+ $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">
<?php
$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>&nbsp;</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(); ?>
+<?php
+ int_footer();
+ $application->Done();
+?>
\ No newline at end of file
Property changes on: trunk/admin/subitems.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property

Event Timeline