Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 3:52 PM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: trunk/admin/confirm.php
===================================================================
--- trunk/admin/confirm.php (revision 1509)
+++ trunk/admin/confirm.php (revision 1510)
@@ -1,45 +1,45 @@
<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">
<base href="<inp:m_theme_url />">
<link rel="stylesheet" type="text/css" href="include/style.css">
</head>
<body>
<table width="100%" height="60%" border="0" cellspacing="0" cellpadding="4" align="absmiddle">
<tr>
<td width="100%" align="middle">
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="200" height="30">
<tr>
<td class="tablenav" nowrap background="images/tabnav_left.jpg" width ="400" valign="absmiddle">
- <img src="images/tabnav_dots.gif" width="18" height="18" alt="." border="0">
+ <img src="images/tabnav_dots.gif" width="18" height="18" title="." border="0">
Confirm Action</td>
</tr>
<tr class="toolbar">
<td width="100%" class="text" align="center"><br>
<table border="0" cellpadding="4" cellspacing="4">
<tr>
<td>
- <img src="images/icon_warning.gif" width="46" height="46" alt="Confirm" border="0">
+ <img src="images/icon_warning.gif" width="46" height="46" title="Confirm" border="0">
</td>
<td>
<br>
<inp:confirm_message/>
<br><br>
</td></tr></table>
<form method="POST" ACTION="<inp:confirm_actionURL/>">
<inp:confirm_hidden_inputs/>
<input type="submit" name="Confirm_Action" class="button" value="Yes">
<input type="submit" name="Action" class="button" value="No">
</form>
<br><br>
</td>
</tr>
</table>
</td></tr>
</table>
</body></html>
Property changes on: trunk/admin/confirm.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/browse.php
===================================================================
--- trunk/admin/browse.php (revision 1509)
+++ trunk/admin/browse.php (revision 1510)
@@ -1,478 +1,478 @@
<?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="";
define('REQUIRE_LAYER_HEADER', 1);
$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(__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");
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
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(!defined('IS_INSTALL'))define('IS_INSTALL',0);
if(!IS_INSTALL)
{
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
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');
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
$charset = GetRegionalOption('Charset');
/* page header */
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'+'/';
</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();
$filter = false; // always initialize variables before use
if($objSession->GetVariable("SearchWord") != '') {
$filter = true;
}
else {
$bit_combo = $objModules->ExecuteFunction('GetModuleInfo', 'all_bitmask');
$bit_combo = $objModules->MergeReturn($bit_combo);
foreach($bit_combo['VarName'] as $mod_name => $VarName)
{
//echo "VarName: [$VarName] = [".$objConfig->Get($VarName)."], ALL = [".$bit_combo['Bits'][$mod_name]."]<br>";
if( $objConfig->Get($VarName) )
if( $objConfig->Get($VarName) != $bit_combo['Bits'][$mod_name] )
{
$filter = true;
break;
}
}
}
?>
</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:button action="upcat" title="<?php echo admin_language("la_ToolTip_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="homecat" title="<?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/";?>">
+ <tb:button action="new_cat" title="<?php echo admin_language("la_ToolTip_New_Category"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="editcat" title="<?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"]."\" title=\"".$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:button action="edit" title="<?php echo admin_language("la_ToolTip_Edit"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="delete" title="<?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:button action="approve" title="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="decline" title="<?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:button action="cut" title="<?php echo admin_language("la_ToolTip_Cut"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="copy" title="<?php echo admin_language("la_ToolTip_Copy"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="paste" title="<?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:button action="move_up" title="<?php echo admin_language("la_ToolTip_Move_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="move_down" title="<?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/";?>">
+ <tb:button action="print" title="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="view" title="<?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); ?>&nbsp;</td>
<td><input ID="SearchWord" type="text" value="<?php echo inp_htmlize($SearchWord,1); ?>" 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">&nbsp;
+ <td><img id="imgSearch" action="search_b" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif" title="<?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" title="<?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" title="<?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">&nbsp;
</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/";?>"-->
+ <!--tb:button action="search_b" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="search_a" title="<?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 ParentId = ".$objCatList->CurrentCategoryID();//" 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=\100%\" 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"); ?>:&nbsp;
</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>&nbsp;
</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>&nbsp;</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
$objSession->SetVariable("HasChanges", 0);
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/browse.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15
\ No newline at end of property
+1.16
\ No newline at end of property
Index: trunk/admin/login.php
===================================================================
--- trunk/admin/login.php (revision 1509)
+++ trunk/admin/login.php (revision 1510)
@@ -1,129 +1,129 @@
<?php
$pathtoimage = $pathtoroot . $admin."/images";
if (function_exists("admin_language"))
{
$login_text = admin_language("la_Login");
$login_button = admin_language("la_Login");
$username_text = admin_language("la_Text_Login");
$password_title = admin_language("la_prompt_Password");
$cancel_button = admin_language("la_Cancel");
}
else
{
$login_text = "Login";
$login_button = "Login";
$username_text = "Username";
$password_title = "Password";
$cancel_button = "Cancel";
}
if( !function_exists('GetVar') )
{
function GetVar($name)
{
return isset($_REQUEST[$name]) ? $_REQUEST[$name] : false;
}
}
//echo "<pre>"; print_r($objSession); echo "</pre>";
if ( GetVar('expired') == 1 && GetVar('logout') != 1) {
if (function_exists("admin_language")) {
$login_error = admin_language("la_text_sess_expired");
}
else {
$login_error = "Session Expired";
}
}
if( function_exists('GetRegionalOption') )
{
$charset = GetRegionalOption('Charset');
}
else
{
$charset == 'iso-8859-1';
}
print<<<END
<html>
<head>
<script language="JavaScript">
function redirect()
{
window.name = 'redirect';
var i = 0;
//var a_parent = window.parent;
while (i < 10) {
if (window.parent.name == 'main_frame') break;
a_parent = window.parent;
i++;
}
page = a_parent.location.href + '?expired=1';
if (i < 10)
setTimeout('a_parent.location.href=page',100);
}
</script>
<title>In-Portal :: Administration Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=$charset">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<link rel="stylesheet" href="include/style.css" type="text/css">
<META http-equiv="Pragma" content="no-cache">
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="document.form1.login.focus();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td valign="middle" align="center">
<div align="center">
- <img alt="In-portal" src="images/globe.gif" width="84" height="91" border="0">
- <img alt="In-portal" src="images/logo.gif" width="150" height="91" border="0"><br>
+ <img title="In-portal" src="images/globe.gif" width="84" height="91" border="0">
+ <img title="In-portal" src="images/logo.gif" width="150" height="91" border="0"><br>
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="222" height="30">
<tr>
<TD align="right" valign="top" class="tablenav" width ="220" nowrap height=30 background="images/tabnav_left.jpg">
<span STYLE="float: left;">
- <img src="icons/icon24_lock_login.gif" width="16" height="22" alt="" border="0" align="absmiddle"> $login_text
+ <img src="icons/icon24_lock_login.gif" width="16" height="22" title="" border="0" align="absmiddle"> $login_text
</span>
<a href="help/manual.pdf"><img src="images/blue_bar_help.gif" border="0"></a>
</TD>
</tr>
</table>
<table width="222" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="form1" method="post" action="index.php" target="_top">
<tr bgcolor="#F0F0F0">
<td class="text">$username_text</td>
<td><input type="text" name="login" class="text"></td>
</tr>
<tr bgcolor="#F0F0F0">
<td class="text">$password_title</td>
<td><input type="password" name="password" class="text"></td>
</tr>
<tr bgcolor="#F0F0F0">
<td colspan="2">
<div align="left">
<input type="submit" name="submit" value="$login_button" class="button">
<input type="reset" name="Cancel" value="$cancel_button" class="button">
<input type=hidden name="adminlogin" value="1" />
</div>
</td>
</tr>
</form>
</table>
<br>
<p class="error">
$login_error</p>
</td>
</tr>
</table>
<script>
var a_parent = window.parent;
redirect();
</script>
</body>
</html>
END;
exit();
?>
\ No newline at end of file
Property changes on: trunk/admin/login.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/tree/tree.php
===================================================================
--- trunk/admin/tree/tree.php (revision 1509)
+++ trunk/admin/tree/tree.php (revision 1510)
@@ -1,177 +1,177 @@
<?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;
}
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$pathtolocal = $pathtoroot;
$envar = "env=" . BuildEnv();
//include section data; create Section hash
//main In-portal sections
//require_once ($pathtoroot."admin/include/navmenu.php");
//All modules
/*if(!isset($SysData))
$SysData=new SystemConfiguration();
$ModuleList=$SysData->GetModuleList();*/
//$sections = array();
//foreach($mod_prefix as $key => $value)
//{
// $mod = $pathtoroot . $value . "admin/include/navmenu.php";
// include_once($mod);
//}
include_once($pathtoroot.$admin."/include/sections.php");
$ServerName = $objConfig->Get("Site_Name");
$rootLink = $adminURL."/subitems.php?env=".BuildEnv()."&section=in-portal:root";
$charset = GetRegionalOption('Charset');
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<?php echo $adminURL."/include/style.css"; ?>">
<meta http-equiv="content-type" content="text/html;charset=<?php echo $charset; ?>">
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script language="javascript">
// Decide if the names are links or just the icons
USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks
// Decide if the tree is to start all open or just showing the root folders
STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree
var foldersTree = gFld('In-Portal','<?php echo $rootLink; ?>');
foldersTree.desc = '<?php echo $ServerName; ?>';
foldersTree.iconSrc='<?php echo $adminURL."/icons/icon24_site.gif"; ?>';
function credits(url)
{
var width = 200;
var height = 200;
var screen_x = (screen.availWidth-width)/2;
var screen_y = (screen.availHeight-height)/2;
window.open(url, 'credits', 'width=280,height=520,left='+screen_x+',top='+screen_y);
}
<?php
$objSections->BuildTree('in-portal:site', 'foldersTree');
$title = "In-Portal v ".$kernel_version."&nbsp;&nbsp;";
?>
</script>
</head>
<body topmargin="0" marginheight="0" marginwidth="0" marginheight="0" bgcolor="#DCEBF6">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<!--<tr><td colspan="2" bgcolor="black"><img alt="" width="1" height="1" src="images/spacer.gif"></td></tr>-->
+<!--<tr><td colspan="2" bgcolor="black"><img title="" width="1" height="1" src="images/spacer.gif"></td></tr>-->
<tr>
<td background="../images/menu_bar.gif" align="left" class="tree_head" width="80%"> <!-- 60000 -->
&nbsp;<a class="tree_head_credits" href="javascript:credits('<?php echo $rootURL.$admin."/help/credits.php?env=".BuildEnv();?>&destform=popup');"><?php echo $title; ?></a>
</td>
<td background="../images/menu_bar.gif" align="right" class="tree_head" width="20%"> <!-- 40000 -->
<FORM style="display:inline" name="lang_select" method="POST" action="<?php echo $rootURL.$admin."/index.php?env=".BuildEnv(); ?>" TARGET="main_frame">
<SELECT NAME="langselect" style="width: 62px; border: 0px; background-color: #FFFFFF; font-size: 9px; color: black" onchange="document.lang_select.submit()">
<!-- width: 52px; font-size: 8.5px; -->
<?php
$objLanguages->Query_Item("SELECT * FROM ".$objLanguages->SourceTable." WHERE Enabled=1");
foreach($objLanguages->Items as $l)
{
$selected = "";
if($l->Get("LanguageId")==$m_var_list["lang"])
$selected = " SELECTED";
echo "<OPTION onclick=\"this.form.submit();\" value=\"".$l->Get("LanguageId")."\" $selected>".$l->Get("LocalName")."</OPTION>\n";
}
?>
</SELECT>
<input type=hidden name="Action" value="m_lang_select">
</FORM>
</td>
- <td background="../images/menu_bar.gif"><img alt="" height="21" width="1" src="../images/spacer.gif"></td>
+ <td background="../images/menu_bar.gif"><img title="" height="21" width="1" src="../images/spacer.gif"></td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0">
<tr>
<td>
<script>
initializeDocument();
</script>
</td>
</tr>
</table>
</body>
</html>
Property changes on: trunk/admin/tree/tree.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property
Index: trunk/admin/browse/toolbar.php
===================================================================
--- trunk/admin/browse/toolbar.php (revision 1509)
+++ trunk/admin/browse/toolbar.php (revision 1510)
@@ -1,248 +1,248 @@
<?php
##############################################################
## In-portal :: Administration Interfaces :: Tool Bar ##
##############################################################
## 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. ##
##############################################################
class clsToolBarItem
{
var $m_img;
var $m_alt;
var $link;
var $onMouseOver;
var $onMouseOut;
var $onClick;
var $filename;
function clsToolBarItem()
{
}
function GetItem()
{
global $imagesURL;
$o = "";
if ($this->img=="divider")
{
$o .= "<img src=\"".$imagesURL."/toolbar/tool_divider.gif\" width=\"4\" height=\"32\" border=\"0\">\n";
}
else
{
$o .= "<a href=\"".$this->link."\" onMouseOut=\"".$this->onMouseOut."\"";
$o .= " onMouseOver=\"".$this->onMouseOver."\" onClick=\"".$this->onClick."\">\n";
- $o .= "<img ID=\"".$this->img."\" alt=\"".language($this->alt)."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\">";
+ $o .= "<img ID=\"".$this->img."\" title=\"".language($this->alt)."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\">";
$o .= "</a>\n";
}
return $o;
}
}
class clsToolBar
{
var $Items;
var $m_section;
var $m_load_menu_func;
var $m_CheckClass;
var $InitScript;
function clsToolBar()
{
$this->Items = array();
$this->InitScript = array();
}
function Get($name)
{
$var = "m_" . $name;
return $this->$var;
}
function Set($name, $value)
{
if (is_array($name))
{
for ($i=0; $i<sizeof($name); $i++)
{ $var = "m_" . $name[$i];
$this->$var = $value[$i];
$this->m_dirtyFieldsMap[$name[$i]] = $value[$i];
echo "$var = ".$value[$i]."<br>\n";
}
}
else
{
$var = "m_" . $name;
$this->$var = $value;
$this->m_dirtyFieldsMap[$name] = $value;
}
}
function Add($img,$alt="",$link="",$MouseOver="",$MouseOut="",$onClick="", $filename="")
{
global $imagesURL;
$t = new clsToolBarItem();
$t->img = $img;
$t->alt = $alt;
$t->link = $link;
$t->onMouseOver = $MouseOver;
$t->onMouseOut = $MouseOut;
$t->onClick = $onClick;
if(strlen($filename)==0)
{
$t->filename = $imagesURL."/toolbar/tool_".$img.".gif";
}
else
{
if(substr($filename,0,4)=="http")
{
$t->filename = $filename;
}
else
{
if(substr($filename,0,1)!="/")
$filename = "/".$filename;
if(substr($filename,0,9)!="/toolbar/")
$filename = "/toolbar".$filename;
$t->filename = $imagesURL.$filename;
}
}
array_push($this->Items,$t);
return $t;
}
function AddToInitScript($s)
{
if(is_array($s))
{
for($i=0;$i<count($s);$i++)
array_push($this->InitScript,$s[$i]);
}
else
array_push($this->InitScript,$s);
}
function GetInitScript()
{
$s="";
if(count($this->InitScript)>0)
$s = implode("\n",$this->InitScript);
return "<SCRIPT language=\"JavaScript\">$s</SCRIPT>";
}
function Build()
{
global $imagesURL;
$o = "<table border=0 cellpadding=0 cellspacing=0 width=\"100%\" class=\"toolbar\">";
- $o .= "<tr><td><img alt="|" src=\"".$imagesURL."/toolbar_start.gif\" width=10 height=50 border=0></td>\n";
+ $o .= "<tr><td><img title="|" src=\"".$imagesURL."/toolbar_start.gif\" width=10 height=50 border=0></td>\n";
foreach($this->Items as $t)
{
$o .= "<TD>".$t->GetItem()."</TD>";
}
$o .= "<TD width=\"100%\"></TD></TR></TABLE>";
return $o;
}
function onLoadString()
{
return "";
}
}
class clsItemTabs
{
var $Tabs;
var $ItemCount;
function clsItemTabs()
{
$this->Tabs = array();
$this->ItemCount = array();
}
function SetItemCount($divname,$Value)
{
$this->ItemCount[$divname] = $Value;
}
function GetItemCount($divname)
{
return (int)$this->ItemCount[$divname];
}
function AddTab($Caption,$divname,$ItemCount,$selected,$numfunc="")
{
$t["caption"]=$Caption;
$t["divname"]=$divname;
$this->SetItemCount($divname,$ItemCount);
$t["selected"]=$selected;
$t["numfunc"]=$numfunc;
$this->Tabs[] = $t;
}
function TabItem($i)
{
global $imagesURL;
$t = $this->Tabs[$i];
$div = $t["divname"];
$o = '<td width="138" height="20" noWrap class="activeTab" ';
$o .= "tabHeaderOf=\"$div\" ";
$o .= "onclick=\"toggleTabB('$div');\" style=\"cursor:hand\">\n<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td id=\"l_$div\" background=\"".$imagesURL."/itemtabs/tab_inactive_l.gif\" class=\"left_tab\">&nbsp;&nbsp;</td>
<td width=\"80%\" id=\"m_$div\" nowrap background=\"".$imagesURL."/itemtabs/tab_inactive.gif\" class=\"tab_class\">";
$o .= " <img height=\"20\" src=\"".$imagesURL."/itemtabs/divider_empty.gif\" align=absMiddle ";
$o .= "width=\"20\" border=\"0\" >";
$o .= $t["caption"]."&nbsp;</td><td id=\"m1_$div\" nowrap align=right valign=top background=\"".$imagesURL."/itemtabs/tab_inactive.gif\" class=\"tab_class\"><span class=\"cats_stats\">";
$func = $t["numfunc"];
if( is_numeric($func) )
$total = $func;
else
if( function_exists($func) ) $total = $func();
$count = $this->GetItemCount($div);
$o .= '('.( ($total != $count) ? $count.' / '.$total : $count ).')';
$o .= '</SPAN>&nbsp;</td>
<td id="r_'.$div.'" background="'.$imagesURL.'/itemtabs/tab_inactive_r.gif" class="right_tab">
<img src="'.$imagesURL.'/spacer.gif" width="21" height="20">
</td>
</tr></table></td>'."\n";
return $o;
}
function tabRow()
{
global $imagesURL;
$o = '<table cellspacing="0" cellpadding="0" border="0" id="tab_headers">'."\n";
$o .= "<tbody><tr>\n";
for($i = 0; $i < count($this->Tabs); $i++)
{
$o .= $this->TabItem($i);
$o .= '<td><img src="'.$imagesURL.'/spacer.gif" width="5" height="1"></td>'."\n";
}
$o .= "</tr></tbody></table>\n";
return $o;
}
}
$ItemTabs = new clsItemTabs();
?>
Property changes on: trunk/admin/browse/toolbar.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/browse/toolbar.js
===================================================================
--- trunk/admin/browse/toolbar.js (revision 1509)
+++ trunk/admin/browse/toolbar.js (revision 1510)
@@ -1,219 +1,219 @@
var toolbar;
//var imagesPath = "images/";
var separatorImg = "divider";
var imagesPreName = "tool_";
var imagesPostName_Active = "_f2";
var imagesPostName_Disabled = "_f3";
var imagesExt = ".gif";
var preloadImages = new Array();
preloadImage(getButtonSrc(separatorImg, 0));
function initToolbar(id, actionHandler)
{
toolbar = document.getElementById(id);
if (!toolbar) return;
toolbar.actionHandler = actionHandler;
toolbar.className = "toolbarDiv"
var childNodes = toolbar.getElementsByTagName("*");
if (childNodes.length == 0) childNodes = toolbar.childNodes;
var _oTable = document.createElement("TABLE");
var _oTBody = document.createElement("TBODY");
var _oTR = document.createElement("TR");
var _oTD = document.createElement("TD");
_oTD.className = "toolbarTD";
_oTR.appendChild(_oTD);
_oTBody.appendChild(_oTR);
_oTable.appendChild(_oTBody);
_oTable.align = "left";
_oTable.cellSpacing = 0;
_oTable.cellPadding = 0;
_oTable.border = 0;
_oTable.className= "toolbarTable"
_oTable.width = "100%";
var oTable = document.createElement("TABLE");
var oTBody = document.createElement("TBODY");
var oTR = document.createElement("TR");
oTR.parentToolbar = toolbar;
oTBody.appendChild(oTR);
oTable.appendChild(oTBody);
oTable.align = "left";
oTable.cellSpacing = 0;
oTable.cellPadding = 0;
oTable.border = 0;
// oTable.width = "100%";
oTable.className= "toolbarTable"
_oTD.appendChild(oTable);
for (var i = 0; i < childNodes.length; i++)
if (childNodes[i].nodeType == 1)
{
oTD = document.createElement("TD");
oTD.action = childNodes[i].getAttribute("action");
// oTD.width = "1%";
oIMG = document.createElement("IMG");
if (childNodes[i].getAttribute("align") == "right" && !oTR.alignedRight)
{
_owTD = document.createElement("TD");
_owTD.innerHTML = "&nbsp;";
_owTD.width = "99%";
oTR.appendChild(_owTD);
oTR.alignedRight = true;
}
switch(childNodes[i].tagName.toLowerCase())
{
case "tb:separator" :
oIMG.basepath = childNodes[i].getAttribute("ImagePath");
oIMG.action = "divider";
oIMG.src = getButtonSrc(oIMG, 0);
break;
case "tb:button" :
oIMG.toolbar = toolbar;
oIMG.action = childNodes[i].getAttribute("action");
var enabled = new String(childNodes[i].getAttribute("enabled"));
oIMG.disabled = (enabled == "false");
oIMG.basepath = childNodes[i].getAttribute("ImagePath");
oIMG.src = getButtonSrc(oIMG, (oIMG.disabled) ? 2 : 0)
for (var j = 0; j < 3; j++)
preloadImage(getButtonSrc(oIMG, j),oIMG.basepath);
oIMG.style.cursor = (oIMG.disabled) ? "default" : "hand";
- oIMG.setAttribute("alt", childNodes[i].getAttribute("alt"));
+ oIMG.setAttribute("title", childNodes[i].getAttribute("title"));
oIMG.onclick = function()
{
if (this.disabled) return;
if (this.toolbar.actionHandler)
this.toolbar.actionHandler(this)
}
oIMG.onmouseover = function(e)
{
if (this.disabled) return;
this.src = getButtonSrc(this, 1);
var evt = (e) ? e : event; evt.cancelBubble = true;
}
oIMG.onmouseout = function(e)
{
if (this.disabled) return;
this.src = getButtonSrc(this, 0);
var evt = (e) ? e : event; evt.cancelBubble = true;
}
break;
}
var tab = (childNodes[i].getAttribute("tab")) ? childNodes[i].getAttribute("tab") : "";
oTD.tab = tab;
if (tab != "") oTD.style.display = "none";
oTD.appendChild(oIMG);
oTR.appendChild(oTD)
}
toolbar.appendChild(_oTable);
toolbar.setTab = toolbarSetTab;
toolbar.showButton = toolbarShowButton;
toolbar.enableButton = toolbarEnableButton;
toolbar.disableButton = toolbarDisableButton;
}
function toolbarSetTab(tab)
{
var TDs = this.getElementsByTagName("TD");
for (var i = 0; i < TDs.length; i++)
if (TDs[i].tab)
if (TDs[i].tab != "")
{
if (TDs[i].tab == tab) TDs[i].style.display = ""
else TDs[i].style.display = "none";
}
}
function toolbarShowButton(action, value)
{
var TDs = this.getElementsByTagName("TD");
for (var i = 0; i < TDs.length; i++)
if (TDs[i].action == action)
TDs[i].style.display = (value) ? "" : "none";
}
function findButton(toolbar, action)
{
if (!toolbar) return;
var buttons = toolbar.getElementsByTagName("IMG");
for (var i = 0; i < buttons.length; i++)
if (buttons[i].action == action) return buttons[i];
}
function toolbarEnableButton(action, value)
{
var button = findButton(this, action);
if (!button) return;
button.src = getButtonSrc(button, (value == false) ? 2 : 0)
button.style.cursor = (value == false) ? "default" : "hand";
button.disabled = (value == false) ? true : false;
}
function toolbarDisableButton(action)
{
this.enableButton(action, false)
}
function getButtonSrc(button, state)
{
var stateExt;
switch(state)
{
case (1) : stateExt = imagesPostName_Active; break;
case (2) : stateExt = imagesPostName_Disabled; break;
default : stateExt = "";
}
return button.basepath + imagesPreName + button.action + stateExt + imagesExt;
}
function preloadImage(src)
{
var img = new Image();
img.src = src;
preloadImages[preloadImages.length] = img;
}
function showContextMenu(evt) {
initContextMenu(evt.clientX,evt.clientY+document.body.scrollTop);
window.FW_showMenu(window.contextMenu,evt.clientX,evt.clientY+document.body.scrollTop);
evt.returnValue = false;
evt.cancelBubble = true;
return false;
}
function initContextMenu(){
window.contextMenu = new Menu("Context");
contextMenu.addMenuItem("Edit","check_submit('','edit');","");
contextMenu.addMenuItem("Delete","check_submit('admin/browse','delete');","");
contextMenu.addMenuSeparator();
contextMenu.addMenuItem("Approve","check_submit('admin/browse','approve');","");
contextMenu.addMenuItem("Decline","check_submit('admin/browse','decline');","");
contextMenu.addMenuSeparator();
contextMenu.addMenuItem("Cut","check_submit('admin/browse','cut');","");
contextMenu.addMenuItem("Copy","check_submit('admin/browse','copy');","");
if (typeof(activeTab) != 'undefined') {
if(TabPasteEnabled(activeTab.title))
contextMenu.addMenuItem("Paste","check_submit('admin/browse','paste');","");
}
window.triedToWriteMenus = false;
window.contextMenu.writeMenus();
return true;
}
Property changes on: trunk/admin/browse/toolbar.js
___________________________________________________________________
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/relation_select.php
===================================================================
--- trunk/admin/relation_select.php (revision 1509)
+++ trunk/admin/relation_select.php (revision 1510)
@@ -1,457 +1,457 @@
<?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. ##
##############################################################
//$b_topmargin = "0";
$hideSelectAll = true;
$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='z-Index:1; position:relative'>";
//$pathtoroot="";
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");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
$m_var_list_update["cat"] = 0;
$homeURL = $_SERVER["PHP_SELF"]."?env=".BuildEnv();
unset($m_var_list_update["cat"]);
$envar = "env=" . BuildEnv();
if($objCatList->CurrentCategoryID()>0)
{
$c = $objCatList->CurrentCat();
$upURL = $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);
}
}
//Set Section
$section = 'in-portal:editcategory_relationselect';
$Selector = GetVar('Selector');
if(!$Selector) $Selector = 'checkbox';
//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";
$SearchType = $objSession->GetVariable("SearchType");
if(!strlen($SearchType))
$SearchType = "Categories";
$SearchLabel = "la_SearchLabel";
/* page header */
$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'+'/';
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
load_module_styles();
print <<<END
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/checkboxes_new.js"></script>
<script language="JavaScript1.2">
var enableContextMenus= true;
var doubleClickAction = 'select';
function toggleTabB(tabId, atm)
{
var hl = document.getElementById("hidden_line");
var activeTabId;
if (activeTab) activeTabId = activeTab.id;
if (activeTabId == tabId)
{
var devider = document.getElementById("tabsDevider");
devider.style.display = "";
unselectAll(tabId);
var tab = document.getElementById(tabId);
tab.active = false;
activeTab = null;
collapseTab = tab;
toolbar.setTab(null);
showTab();
}
else
{
if (activeTab)
toggleTab(tabId, true)
else
toggleTab(tabId, atm)
if (hl) hl.style.display = "none";
}
tab_hdr = document.getElementById('tab_headers');
if (!tab_hdr) return;
// process all module tabs
var active_str = '';
for(var i = 0; i < tabIDs.length; i++)
{
var tabHeader;
TDs = tab_hdr.getElementsByTagName("TD");
for (var j = 0; j < TDs.length; j++)
if (TDs[j].getAttribute("tabHeaderOf") == tabIDs[i])
{
tabHeader = TDs[j];
break;
}
if (!tabHeader) continue;
var tab = document.getElementById(tabIDs[i]);
if (!tab) continue;
active_str = (tab.active) ? "tab_active" : "tab_inactive";
if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
// module tab is selected
SetBackground('l_' + tabId, "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabId, "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
else
{
// module tab is not selected
SetBackground('l_' +tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) continue;
images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
}
}
function toggleCategoriesB(tabHeader, instant)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories(instant);
var active_str = '$imagesURL'+'/itemtabs/' + (categories.active ? 'tab_active' : 'tab_inactive');
SetBackground('l_cat', active_str + '_l.gif');
SetBackground('m_cat', active_str + '.gif');
SetBackground('m1_cat', active_str + '.gif');
SetBackground('r_cat', active_str + '_r.gif');
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) return;
images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif";
}
</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;
int_SectionHeader();
?>
</DIV>
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<div name="toolBar" id="mainToolBar">
- <tb:button action="select" alt="<?php echo admin_language("la_ToolTip_Select"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <tb:button action="stop" alt="<?php echo admin_language("la_ToolTip_Stop"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="select" title="<?php echo admin_language("la_ToolTip_Select"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="stop" title="<?php echo admin_language("la_ToolTip_Stop"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <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:button action="upcat" title="<?php echo admin_language("la_ToolTip_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="homecat" title="<?php echo admin_language("la_ToolTip_Home"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="view" title="<?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 print m_navbar( Array('admin' => 1) ); ?></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">
<input type="hidden" name="Selector" value="<?php echo $Selector; ?>">
<table cellspacing="0" cellpadding="0"><tr>
<td><?php echo admin_language($SearchLabel); ?>&nbsp;</td>
<td><input id="SearchWord" type="text" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: #999999" value="<?php echo $objSession->GetVariable('SearchWord'); ?>"></td>
<td>
<img
action="search_b"
src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif"
- alt="<?php echo admin_language("la_ToolTip_Search"); ?>"
+ title="<?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"); ?>"
+ title="<?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"); ?>"
+ title="<?php echo admin_language("la_ToolTip_Search"); ?>"
align="absMiddle"
onclick="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">&nbsp;
</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/";?>"-->
+ <!--tb:button action="search_b" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="search_a" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
</td>
</tr>
</tbody>
</table>
<br>
<!-- CATEGORY DIVIDER -->
<?php
$objCatList->Clear();
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
if($SearchType=="categories" || $SearchType="all")
{
$list = $objSession->GetVariable('SearchWord');
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
if(strlen($SearchQuery))
{
$SearchQuery = " (".$SearchQuery.") ";
$objCatList->LoadCategories($SearchQuery.$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
?>
<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"); ?>:&nbsp;
</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>&nbsp;
</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>&nbsp;</td>
</tr>
</tbody>
</table>
<div class="divider" style="" id="categoriesDevider"><img width=1 height=1 src="images/spacer.gif"></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 print adListSubCats($objCatList->CurrentCategoryID(),"cat_select_element.tpl"); ?>
</form>
</div>
<!-- CATEGORY OUTPUT END -->
<br>
<?php
print $ItemTabs->TabRow();
?>
<div class="divider" id="tabsDevider"><img width=1 height=1 src="images/spacer.gif"></div>
</DIV>
<?php
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/relation_select.php";
if(file_exists($path))
{
echo "\n<!-- $path -->\n";
include_once($path);
}
}
?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" 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">
<?php
if( GetVar('Selector') == 'radio' )
echo " var single_select = true;";
?>
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);
}
}
//toggleTabB(start_tab, true);
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/relation_select.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property
Index: trunk/admin/reviews.php
===================================================================
--- trunk/admin/reviews.php (revision 1509)
+++ trunk/admin/reviews.php (revision 1510)
@@ -1,378 +1,378 @@
<?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="";
define('REQUIRE_LAYER_HEADER', 1);
$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(__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");
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
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"]);
//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");
$mod_prefixes = Array();
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if(file_exists($path))
{
//echo "<!-- $path -->";
$mod_prefixes[] = $key;
@include_once($path);
}
}
if(!defined('IS_INSTALL'))define('IS_INSTALL',0);
if(!IS_INSTALL)
{
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
die();
//require_once($pathtoroot."admin/login.php");
}
}
//Set Section
$section = 'in-portal:reviews';
//Set Environment Variable
// save last category visited
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
$objSession->SetVariable("HasChanges", 0);
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
// common "Advanced View" tab php functions: begin
function GetAdvView_SearchWord($prefix,$postfix='_adv_view_search')
{
global $objSession;
return $objSession->GetVariable($prefix.$postfix);
}
function SaveAdvView_SearchWord($prefix,$postfix='_adv_view_search')
{
global $objSession;
$SearchWord = $objSession->GetVariable($prefix.$postfix);
if( isset($_REQUEST['SearchWord']) )
{
$SearchWord = $_REQUEST['SearchWord'];
$objSession->SetVariable($prefix.$postfix, $SearchWord);
}
}
function ResetAdvView_SearchWord($prefix,$postfix='_adv_view_search')
{
global $objSession;
$objSession->SetVariable($prefix.$postfix, '');
}
function ShowSearchForm($prefix, $envar, $TabID, $postfix='_adv_view_search')
{
global $imagesURL;
$btn_prefix = $imagesURL.'/toolbar/icon16_search';
$SearchWord = GetAdvView_SearchWord($prefix,$postfix);
echo '<form method="post" action="'.$_SERVER["PHP_SELF"].'?'.$envar.'" name="'.$prefix.'_adv_view_search" id="'.$prefix.$postfix.'">
<input type="hidden" name="Action" value="">
<table cellspacing="0" cellpadding="0">
<tr>
<td>'.admin_language('la_SearchLabel').'&nbsp;</td>
<td><input id="'.$prefix.'_SearchWord" type="text" value="'.inp_htmlize($SearchWord,1).'" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
<td>
<img
id="'.$TabID.'_imgSearch"
src="'.$btn_prefix.'.gif"
- alt="'.admin_language("la_ToolTip_Search").'"
+ title="'.admin_language("la_ToolTip_Search").'"
align="absMiddle"
onclick="SubmitSearch(\''.$prefix.$postfix.'\',\''.$prefix.$postfix.'\');"
onmouseover="this.src=\''.$btn_prefix.'_f2.gif\'"
onmouseout="this.src=\''.$btn_prefix.'.gif\'"
style="cursor:hand"
width="22"
height="22"
>
<img
id="imgSearchReset"
src="'.$btn_prefix.'_reset.gif"
- alt="'.admin_language("la_ToolTip_Search").'"
+ title="'.admin_language("la_ToolTip_Search").'"
align="absMiddle"
onclick="SubmitSearch(\''.$prefix.$postfix.'\',\''.$prefix.$postfix.'_reset\');"
onmouseover="this.src=\''.$btn_prefix.'_reset_f2.gif\'"
onmouseout="this.src=\''.$btn_prefix.'_reset.gif\'"
style="cursor:hand"
width="22"
height="22"
>&nbsp;
</td>
</tr>
</table>
</form>
<script language="javascript">
document.getElementById("'.$prefix.'_SearchWord").onkeydown = getKey;
</script>
';
}
// common "Advanced View" tab php functions: end
/* page header */
$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'+'/';
</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 = '';
int_SectionHeader();
$filter = false;
$bit_combo = $objModules->ExecuteFunction('GetModuleInfo', 'all_bitmask');
$bit_combo = $objModules->MergeReturn($bit_combo);
foreach($bit_combo['VarName'] as $mod_name => $VarName)
{
//echo "VarName: [$VarName] = [".$objConfig->Get($VarName)."], ALL = [".$bit_combo['Bits'][$mod_name]."]<br>";
if( $objConfig->Get($VarName) )
if( $objConfig->Get($VarName) != $bit_combo['Bits'][$mod_name] )
{
$filter = true;
break;
}
}
?>
</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="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:button action="edit" title="<?php echo admin_language("la_ToolTip_Edit"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="delete" title="<?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:button action="approve" title="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="decline" title="<?php echo admin_language("la_ToolTip_Decline"); ?>" 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/";?>">
+ <tb:button action="print" title="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="view" title="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</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 -->
</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">
<?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/reviews.php";
//echo "Including File: $path<br>";
if(file_exists($path))
{
//echo "\n<!-- $path -->\n";
include_once($path);
}
}
?>
<form method="post" action="reviews.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();
if(default_tab.length == 0)
{
cookie_start = theMainScript.GetCookie('active_tab');
if (cookie_start != null) start_tab = cookie_start;
if(start_tab!=null) toggleTabB(start_tab, true);
}
else
{
toggleTabB(default_tab,true);
}
</script>
<?php
$objSession->SetVariable("HasChanges", 0);
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/reviews.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/include/elements.php
===================================================================
--- trunk/admin/include/elements.php (revision 1509)
+++ trunk/admin/include/elements.php (revision 1510)
@@ -1,625 +1,625 @@
<?php
##############################################################
##In-portal :: Administration Interfaces :: Common Elements ##
##############################################################
## 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. ##
##############################################################
if(!defined('IS_INSTALL'))define('IS_INSTALL',0);
if(!IS_INSTALL)
{
if (!admin_login())
{
if(!headers_sent()) {
setcookie("sid"," ",time()-3600);
}
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
die();
//require_once($pathtoroot."admin/login.php");
}
}
global $admin,$pathtoroot, $objConfig;
if(!strlen($admin))
{
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
{
$admin = "admin";
}
}
require_once($pathtoroot.$admin."/include/sections.php");
$envar = "env=" . BuildEnv();
/* this function loads the javascript for each module's toolbar */
function load_module_javascript($sectionname, $skip_modules = Array() )
{
global $adminURL, $pathtoroot;
echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/browse/fw_menu.js\"></SCRIPT>\n";
echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/include/tabs.js\"></SCRIPT>\n";
echo "<script language=\"JavaScript1.2\" src=\"$adminURL/include/checkarray.js\"></script>\n";
global $objConfig, $ItemTabs;
$m = GetModuleArray("admin");
echo "<!-- ".count($m)."-->";
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/toolbar/".$sectionname.".php";
if( !in_array($value, $skip_modules) && file_exists($path) )
{
echo "\n<!-- $path -->\n";
include_once($path);
}
else
echo "\n<!-- $path not found -->\n";
}
}
function load_module_styles()
{
global $objConfig, $ItemTabs,$rootURL,$pathtoroot;
$m = GetModuleArray("admin");
echo "<!-- module styles (".count($m).")-->";
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/style.css";
if(file_exists($path))
{
$inc = $rootURL.$value."admin/include/style.css";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$inc\">\n";
}
}
}
//***********************************
//Page Header
function int_header($toolbar=NULL,$NavBarText=NULL,$ExtraTitle=NULL,$onLoad=NULL, $ExtraHead=NULL,$skip_modules=Array(),$OtherSection = '')
{
global $pathtoroot;
global $pathtolocal;
global $section;
global $objSections;
global $rootURL;
global $localURL;
global $adminURL;
global $envar;
global $admin;
global $metatag;
$style_sheet_global = $adminURL."/include/style.css";
$style_sheet_local = $localURL."admin/include/style.css";
$ExtraTitle = str_replace(Array('<','>'),Array('&lt;','&gt;'),$ExtraTitle);
//$ExtraTitle = htmlentities($ExtraTitle);
if (is_object($toolbar))
{
if(file_exists($pathtolocal."admin/include/toolbar.php"))
require_once ($pathtolocal."admin/include/toolbar.php");
//Aray of the preloaded elems
//$int_toolbar_preload = array();
print "<html>\n\t<head>\n\t\t<title>In-portal</title>\n";
if(strlen($metatag))
{
print $metatag."\n";
}
else
{
$charset = GetRegionalOption('Charset');
if(defined('FORCE_CHARSET')&&FORCE_CHARSET) $charset=FORCE_CHARSET;
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">\n";
print "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n";
}
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n";
load_module_styles();
require_once($pathtoroot.$admin."/include/mainscript.php");
//require_once($pathtolocal."admin/include/script.js");
print $ExtraHead;
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname, $skip_modules);
if(is_object($toolbar))
print $toolbar->GetInitScript();
print '</head><body topmargin="0" leftmargin="8" marginheight="8" marginwidth="8" bgcolor="#FFFFFF"';
//*** Preload toolbar images
if(strlen($onLoad))
{
print $onLoad;
}
else
print " ONLOAD=\"clear_list_checkboxes();\"";
//*** Preload toolbar images
if(is_object($toolbar))
{
if (strlen($toolbar->Get("CheckClass")))
{
print $toolbar->onLoadString().">";
}
else
print " >";
$menufunc = $toolbar->Get("load_menu_func");
if (strlen($menufunc))
{
print "<script language=\"JavaScript1.2\">$menufunc</script>";
}
}
else
print " >";
}
else
{
$charset = GetRegionalOption('Charset');
print "<html><head><title>In-Portal </title>";
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">";
print "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">";
load_module_styles();
require_once ($pathtoroot.$admin."/include/mainscript.php");
//require_once ($pathtolocal."admin/include/script.js");
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname);
print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">";
}
if(strlen($section)>0)
{
$objSections->SetCurrentSection($section);
$sec = $objSections->GetCurrentSection();
if ($sec->Get("notitle") != 1) print $objSections->page_title();
print $objSections->page_tabs($envar);
if ($sec->Get("nonavbar") != 1) //Section Navigatior
print $objSections->section_header($envar,$NavBarText,$ExtraTitle,false,$OtherSection);
//Toolbar if appropriate
if ( isset($sections[$section]) && ($sections[$section]['toolbar']==1) || ( is_object($toolbar) ) )
print $toolbar->Build();
}
}//Page Header
// HELP Page Header
function int_help_header()
{
global $pathtoroot;
global $pathtolocal;
global $section;
global $objSections;
global $rootURL;
global $localURL;
global $adminURL;
global $envar;
global $admin;
global $metatag;
$style_sheet_global = $adminURL."/include/style.css";
$style_sheet_local = $localURL."admin/include/style.css";
// TOOLBAR:
$charset = GetRegionalOption('Charset');
print "<html><head><title>In-Portal - Help</title>";
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">";
print "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">";
load_module_styles();
require_once ($pathtoroot.$admin."/include/mainscript.php");
print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">";
if(strlen($section)>0)
{
$objSections->SetCurrentSection($section);
$sec = $objSections->GetCurrentSection();
if ($sec->Get("notitle") != 1) print $objSections->page_title();
if ($sec->Get("nonavbar") != 1) //Section Navigatior
print $objSections->section_header($envar,'','', true);
}
}// HELP Page Header
function int_SectionHeader($toolbar=NULL,$onLoad=NULL,$NavBarText=NULL,$ExtraTitle=NULL)
{
global $pathtoroot;
global $pathtolocal;
global $section, $sections;
global $objSections;
global $rootURL;
global $adminURL,$admin;
global $localURL;
global $envar;
global $b_topmargin;
if (!isset($b_topmargin))
$b_topmargin = 8;
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname);
if(is_object($toolbar))
print $toolbar->GetInitScript();
print "</head><body topmargin=\"$b_topmargin\" leftmargin=\"8\" marginheight=\"$b_topmargin\" marginwidth=\"8\" bgcolor=\"#FFFFFF\"";
//*** Preload toolbar images
if(strlen($onLoad))
{
print $onLoad;
}
else
print " onload=\"if (clear_checkboxes) clear_checkboxes();\"";
print ">";
global $b_header_addon;
if (isset($b_header_addon)) echo $b_header_addon;
if(strlen($section)>0)
{
$objSections->SetCurrentSection($section);
$sec = $objSections->GetCurrentSection();
if ($sec->Get("notitle")!=1)
print $objSections->page_title();
print $objSections->page_tabs($envar);
//Section Navigatior
if ($sec->Get("nonavbar")!=1)
{
if (is_null($ExtraTitle))
$ExtraTitle = "";
print $objSections->section_header($envar,$NavBarText,$ExtraTitle);
}
//Toolbar if appropriate
if( isset($sections[$section]) )
if($sections[$section]['toolbar'] == 1 || (is_object($toolbar)) )
print $toolbar->Build();
}
}//Section Page Header
//***********************************
//SubSection Title
function int_subsection_title($caption, $ColSpan = 5)
{
int_table_color(1);
print <<<END
<!-- Subsection Title -->
<tr class="subsectiontitle">
<td colspan="$ColSpan">$caption</td>
</tr>
END;
}
function int_subsection_title_install($caption)
{
int_table_color(1);
print <<<END
<!-- Subsection Title -->
<tr class="subsectiontitle">
<td colspan="3">$caption</td>
</tr>
END;
}
function int_subsection_title_ret($caption)
{
int_table_color_ret(1);
$o = "<!-- Subsection Title --><tr class=\"subsectiontitle\"><td colspan=\"5\">$caption</td></tr>";
return $o;
}
//SubSection Title
//***********************************
//Table Alternating colors
function int_table_color($reset_color=0, $return_result = false)
{
static $colorset;
if($reset_color)
{ $colorset="table_color2";
return;
}
if ($colorset == "table_color1")
$colorset = "table_color2";
else
$colorset = "table_color1";
$ret = "class=\"".$colorset."\"";
if($return_result)
return $ret;
else
print $ret;
}//Table Alternating colors
//Table Alternating colors with return
function int_table_color_ret($reset_color=0)
{
static $colorset;
if($reset_color)
{ $colorset="table_color2";
return;
}
if ($colorset == "table_color1")
$colorset = "table_color2";
else
$colorset = "table_color1";
return "class=\"".$colorset."\"";
}//Table Alternating colors
//***********************************
//Hint
function int_hint($caption)
{
global $imagesURL;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<span class="hint"><img src="$imagesURL/smicon7.gif" width="14" height="14" align="absmiddle">$caption</span>
<td>
</tr>
</table>
END;
}//Hint
function int_hint_red($caption)
{
global $imagesURL;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<span class="hint_red">$caption</span>
<td>
</tr>
</table>
END;
}//Hint
//***********************************
//Navigation String
function int_nav($caption)
{
global $pathtoroot;
global $imagespath;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#f0f0f0">
<tr>
<td><b class="text"><span class="navbar"><a class="navbar" href="">$caption</a></span></b></td>
</tr>
</table>
END;
}//Navigation String
//***********************************
//Print Out Images
function int_img($img)
{
global $images;
global $pathtoroot;
global $imagesURL;
$src = $imagesURL."/".$images[$img]['file'];
$alt = $images[$img]['alt'];
$width = $images[$img]['width'];
$height = $images[$img]['height'];
$name = $img;
//Set ID if needed
if ($img == 'img:tool:view')
$id = "ID=\"viewbutton\"";
- print "<img alt=\"$alt\" name=\"$name\" src=\"$src\" width=\"$width\" height=\"$height\" $id border=\"0\" align=\"absmiddle\">";
+ print "<img title=\"$alt\" name=\"$name\" src=\"$src\" width=\"$width\" height=\"$height\" $id border=\"0\" align=\"absmiddle\">";
}//Print Out Images
//***********************************
//Page Footer
function int_footer()
{
global $objSession;
if($objSession->HasSystemPermission("DEBUG.INFO"))
{
//phpinfo();
}
if( defined('REQUIRE_LAYER_HEADER') ) echo '</div>';
print <<<END
</body>
</html>
END;
}//Page Footer
function HomeEnv()
{
global $m_var_list_update;
$m_var_list_update["cat"]=0;
return BuildEnv();
}
function UpEnv()
{
global $m_var_list_update,$objCatList;
$current = $objCatList->CurrentCat();
$parent = $current->Get("ParentId");
$m_var_list_update["cat"]=$parent;
return BuildEnv();
}
function ModuleInclude($file)
{
global $pathtoroot;
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value.$file;
if(file_exists($path))
{
echo "<!-- $path -->";
@include_once($path);
}
}
}
function MultiEditButtons(&$ToolBar,$next,$prev,$Form,$StatusField, $url,$onClick, $ExtraVar="", $prev_phrase = 'Phrase Not Passed', $next_phrase = 'Phrase Not Passed')
{
global $adminURL;
$ToolBar->Add("divider");
if($prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$var="env=".BuildEnv()."&en=$prev&lpn=".GetVar('lpn');
if (strlen($ExtraVar))
$var.= $ExtraVar;
if ($onClick != 'LangSubmitMove') {
$link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');";
}
else {
$link = "javascript:$onClick('$url', '$prev')";
}
$ToolBar->Add("moveleft",$prev_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
//$onClick="";
$link="#";
$ToolBar->Add("moveleft",$prev_phrase,"#","","","","toolbar/tool_prev_f3.gif");
}
if($next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$var="env=".BuildEnv()."&en=$next".( isset($_REQUEST['lpn']) ? '&lpn='.$_REQUEST['lpn'] : '');
if (strlen($ExtraVar))
$var.= $ExtraVar;
if ($onClick != 'LangSubmitMove') {
$link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');";
}
else {
$link = "javascript:$onClick('$url', '$next')";
}
$ToolBar->Add("moveright",$next_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_next.gif");
}
else
{
$ToolBar->Add("moveright",$next_phrase,"#","","","","toolbar/tool_next_f3.gif");
}
}
function InsertButtons(&$ToolBar, $Buttons = Array(), $params = Array() )
{
foreach($Buttons as $button)
switch($button)
{
case 'save':
$ToolBar->Add( "img_save", "la_Save", "#",
"swap('img_save','toolbar/tool_select_f2.gif');",
"swap('img_save', 'toolbar/tool_select.gif');",
"edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',1,'&lpn=".$_REQUEST['lpn']."');","tool_select.gif");
break;
case 'cancel':
$ToolBar->Add( "img_cancel", "la_Cancel", "#",
"swap('img_cancel','toolbar/tool_cancel_f2.gif');",
"swap('img_cancel', 'toolbar/tool_cancel.gif');",
"edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',2,'&lpn=".$_REQUEST['lpn']."');","tool_cancel.gif");
break;
case 'edit':
break;
case 'delete':
break;
}
}
function GetTitle($item_phrase, $tab_phrase, $id, $item_name = false)
{
//gets correct caption for editing windows with tabs
//echo "In: $item_phrase, $tab_phrase, $id";
$is_new = (isset($_REQUEST['new']) && ($_REQUEST['new'] == 1)) || $id <= 0 ? 1 : 0;
$text = $is_new ? 'la_Text_Adding' : 'la_Text_Editing';
$text = admin_language($text).' '.admin_language($item_phrase);
if($is_new == 0) {
if ($item_name == false) {
$text .= ' #'.$id;
}
else {
if ($item_name != '') {
$text .= " '".$item_name."'";
}
}
}
if ($tab_phrase != '') {
$text .= ' - '.admin_language($tab_phrase);
}
return $text;
}
function MarkFields($form_name)
{
// mark specified form fields as required
?> <script language="JavaScript">MarkAsRequired(document.getElementById("<?php echo $form_name; ?>"));</script> <?php
}
?>
Property changes on: trunk/admin/include/elements.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.20
\ No newline at end of property
+1.21
\ No newline at end of property
Index: trunk/admin/include/sections.php
===================================================================
--- trunk/admin/include/sections.php (revision 1509)
+++ trunk/admin/include/sections.php (revision 1510)
@@ -1,635 +1,635 @@
<?php
$sections = array();
class clsSection
{
var $m_sections;
var $m_name;
var $m_title;
var $m_path;
var $m_file;
var $m_icon;
var $m_icon_small;
var $m_icon_list;
var $m_child;
var $m_parent;
var $m_left;
var $m_right;
var $m_notree = 0;
var $m_notabs=0;
var $m_nonavbar=0;
var $m_notitle=0;
var $m_toolbar=0;
var $m_description = NULL;
var $m_onclick=NULL;
var $m_key;
var $m_bar_title;
var $m_bar_title_plain_text = "";
function clsSection()
{
/* constructor */
}
function Get($name)
{
$var = "m_" . $name;
return isset($this->$var) ? $this->$var : '';
}
function Set($name, $value)
{
if (is_array($name))
{
for ($i=0; $i<sizeof($name); $i++)
{
$var = "m_" . $name[$i];
$this->$var = $value[$i];
}
}
else
{
$var = "m_" . $name;
$this->$var = $value;
}
}
function IsJavaScriptLink()
{
$file = $this->Get('file');
if(!$file) return false;
return (substr($file, 0, 10) == 'javascript' || $file == '#') ? true : false;
}
function IconURL($large=1)
{
global $rootURL;
if($large==1)
{
$url = $rootURL.$this->Get("icon");
}
elseif($large==2)
{
$url = $rootURL.$this->Get("icon_list");
}
else
$url = $rootURL.$this->Get("icon_small");
return $url;
}
function URL()
{
global $rootURL;
$env = BuildEnv();
if(!$this->IsJavaScriptLink())
{
$url = $rootURL.$this->Get("path").$this->Get("file");
if(strstr($url,"?"))
{
$url .= "&env=".$env;
}
else
$url .= "?env=".$env;
}
else
$url = $this->Get("file");
return $url;
}
/* functions to display navigation elements */
function tab($envar)
{
global $imagesURL;
$link = $this->URL();
if(!$this->IsJavaScriptLink())
{
if(!strstr($link,'env='))
$link .= '?'. $envar;
}
$onclick = $this->Get('onclick');
$caption = language($this->Get('name'));
if(strlen($this->Get('name')))
{
$o ="<!-- Tab: $caption -->
<td><table bgcolor=\"#009FF0\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" onclick=\"\">
<tr onclick=\"$onclick\">
- <td bgcolor=\"#009FF0\"><img alt=\"\" src=\"$imagesURL/tab_left.gif\" width=\"15\" height=\"23\"></td>
+ <td bgcolor=\"#009FF0\"><img title=\"\" src=\"$imagesURL/tab_left.gif\" width=\"15\" height=\"23\"></td>
<td nowrap bgcolor=\"#009FF0\" background=\"$imagesURL/tab_back.gif\" align=\"center\">
<a href=\"$link\" class=\"tab2\" onClick=\"$onclick\">$caption</a><br>
</td>
- <td bgcolor=\"#009FF0\"><img alt=\"\" src=\"$imagesURL/tab_right.gif\" width=\"15\" height=\"23\"></td>
+ <td bgcolor=\"#009FF0\"><img title=\"\" src=\"$imagesURL/tab_right.gif\" width=\"15\" height=\"23\"></td>
</tr>
</table></td>";
}
else
$o = '';
return $o;
}//Individual Tab
function active_tab()
{
global $imagesURL, $envar;
$link = $this->URL();
$onclick = $this->Get("onclick");
if(!$this->IsJavaScriptLink())
{
if(!strstr($link,"env="))
$link .= "?". $envar;
}
$caption = language($this->Get("name"));
if (strlen($caption)<=8)
$backgr = "$imagesURL/tab_active_back3.jpg";
else if (strlen($caption)<=20)
$backgr = "$imagesURL/tab_active_back2.jpg";
else
$backgr = "$imagesURL/tab_active_back.jpg";
$o = "<!-- Tab: $caption -->
<td><table bgcolor=\"#FFFB32\" background=\"$backgr\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>
- <td><img alt=\"\" src=\"$imagesURL/tab_active_left.gif\" width=\"15\" height=\"23\"></td>
+ <td><img title=\"\" src=\"$imagesURL/tab_active_left.gif\" width=\"15\" height=\"23\"></td>
<td nowrap align=\"center\" background=\"$imagesURL/tab_active_back.gif\">
<a href=\"$link\" class=\"tab\" onClick=\"$onclick\">$caption</a><br>
</td>
- <td><img alt=\"\" src=\"$imagesURL/tab_active_right.gif\" width=\"15\" height=\"23\"></td></tr>
+ <td><img title=\"\" src=\"$imagesURL/tab_active_right.gif\" width=\"15\" height=\"23\"></td></tr>
</table></td>";
return $o;
}//Active Tab
} /*clsSection*/
class clsSectionList
{
var $sections;
// var $section;
var $current;
function clsSectionList()
{
$this->sections = array();
$this->current = "default";
}
function GetSection($section)
{
if(is_array($this->sections) && strlen($section))
{
if(array_key_exists($section,$this->sections))
{
return $this->sections[$section];
}
else
return NULL;
}
else
return NULL;
}
function SetCurrentSection($section)
{
$this->current = $section;
}
function GetCurrentSection()
{
$ret = $this->GetSection($this->current);
if(!is_object($ret))
$ret = $this->GetSection("default");
return $ret;
}
function SimpleSection($module, $section_name, $tab_phrase, $title_phrase, $path, $script, $child,$parent,$left,$right)
{
// simplified method to add sections
global $pathtoroot;
$sn = explode(':', $section_name);
$img_path = $module.'/admin/images';
if( !isset($title_phrase) ) $title_phrase = $tab_phrase;
$this->AddSection( $section_name,$tab_phrase, $title_phrase,$path, $script,
$img_path.'/icon46_'.$sn[1].'.gif', $img_path.'/icon24_'.$sn[1].'.gif',
$child,$parent,$left,$right,0,'',1,null,null,null,$img_path.'/icon46_list_'.$sn[1].'.gif');
}
function AddSection($section,$name,$title,$path,$file,$icon,$icon_small, $child,$parent,$left,$right,
$notree=0,$onClick = "",$notabs=0,$nonavbar=0,$notitle=0,$toolbar=0,$icon_list="", $bar_title = "", $bar_title_plain_text = "")
{
if($file == "subitems.php")
$file .= "?section=$section";
$s = new clsSection();
$s->Set("name", $name);
$s->Set("title",$title);
$s->Set("path", $path);
$s->Set("file", $file);
$s->Set("icon", $icon);
$s->Set("icon_list", $icon_list);
$s->Set("icon_small", $icon_small);
$s->Set("child", $child);
$s->Set("parent", $parent);
$s->Set("left", $left);
$s->Set("right", $right);
$s->Set("notree", $notree);
$s->Set("notabs", $notabs);
$s->Set("nonavbar", $nonavbar);
$s->Set("notitle", $notitle);
$s->Set("toolbar", $toolbar);
$s->Set("description", NULL);
$s->Set("onclick", $onClick);
$s->Set("key",$section);
$s->Set("bar_title",$bar_title);
$s->Set("bar_title_plain_text", $bar_title_plain_text);
if($parent != NULL)
{
$p = $this->GetSection($parent);
if(is_object($p))
{
if(!strlen($p->Get("child")))
{
//echo "Setting child of $parent to $section<br>\n";
$p->Set("child", $section); //set the parent if none set!
$this->sections[$parent]=$p;
}
}
if(!strlen($left) && !strlen($right))
{
/* find first child w/ a null right value */
foreach($this->sections as $secname => $subsection)
{
if($subsection->Get("parent") == $parent)
{
if(!strlen($subsection->Get("right")))
{
$this->sections[$secname]->Set("right", $section);
$s->Set("left", $secname);
break;
}
}
}
}
}
$this->sections[$section]=$s;
}
function AddDescription($section,$desc)
{
$sec = $this->GetSection($section);
if(is_object($sec))
{
$sec->Set("description",$desc);
$this->sections[$section] = $sec;
}
}
function sectionURL($section)
{
return $this->sections[$section]->URL();
}
function SectionIconURL($section,$large=1)
{
return $this->sections[$section]->IconURL($large);
}
function BuildTree($element, $parent)
{
global $pathtoroot,$envar;
global $rootURL;
$org = $element;
$element = strtolower($element);
$j_el=str_replace("-","_",$element);
$j_el=str_replace(":","_",$j_el);
$j_par=str_replace("-","_",$parent);
$j_par=str_replace(":","_",$j_par);
$sec = $this->sections[$element];
if(is_object($sec))
{
$caption = $this->sections[$element]->Get("name");
if(strlen($caption)==0)
$caption = $this->sections[$element]->Get("title");
$caption = language($caption);
$child =$this->sections[$element]->Get("child");
$notree = "";
if( isset($this->sections[$child]) && is_object($this->sections[$child]) )
$notree = $this->sections[$child]->Get("notree");
if (($child == NULL) or ($notree==-1))
{
print "var item = insDoc($j_par, gLnk(0, \"".$caption."\", \"".$this->SectionURL($element)."\"));\n";
print "item.iconSrc = '".$this->SectionIconURL($element,0)."';\n";
if($this->sections[$element]->Get("right")!=NULL)
$this->BuildTree($this->sections[$element]->Get("right"), $parent);
return;
}
if ($child != NULL && $notree !=-1)
{ //print "$j_el = insFld($j_par, gFld(\"".$sections[$element]['name']."\"));\n";
print "var $j_el = insFld($j_par, gFld(\"".$caption."\",\"".$this->SectionURL($element)."\"));\n";
print $j_el . ".iconSrc='".$this->SectionIconURL($element,0)."';\n";
if($this->sections[$element]->Get("right")!=NULL)
$this->BuildTree($this->sections[$element]->Get("right"), $parent);
$parent = $element;
$this->BuildTree($this->sections[$element]->Get("child"), $parent);
}
}
}
function page_title()
{
global $imagesURL,$adminURL, $objConfig;
$o = "";
$sec = $this->GetCurrentSection();
if($sec->Get("notitle")!="1")
{
$caption = $sec->Get("title");
if(strlen($caption)==0)
{
if(strlen($sec->Get("parent")))
{
$p = $this->GetSection($sec->Get("parent"));
if(is_object($p))
{
$caption = $p->Get("title");
$icon = $p->IconURL(1);
}
}
}
else
$icon = $sec->IconURL(1);
$logout_link = $adminURL."/index.php";
if(strlen($caption))
{
if($sec->Get("key")=="in-portal:root")
{
$caption=stripslashes($objConfig->Get("Site_Name"));
}
else
{
$caption = admin_language($caption);
}
$bg_image = 'logo_bg.gif';
$replace_modules = Array('in-link','in-news','in-bulletin');
foreach($replace_modules as $r_module)
if( $this->IsModule($r_module) )
{
$bg_image = 'logo_bg_'.$r_module.'.gif';
break;
}
if( defined('REQUIRE_LAYER_HEADER') )
{
$o = "<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='".$imagesURL.'/'.$bg_image."'></div><img src='".$imagesURL."/spacer.gif' width=1 height=7>
<br><div style='z-Index:1; position:relative'>";
$o .= "<!-- ADMIN TITLE --><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">
<tr><td valign=\"top\" class=\"admintitle\" align=\"left\">
- <img alt=\"\" width=\"46\" height=\"46\" src=\"$icon\" align=\"absmiddle\">&nbsp;$caption<br>
+ <img title=\"\" width=\"46\" height=\"46\" src=\"$icon\" align=\"absmiddle\">&nbsp;$caption<br>
<img src='".$imagesURL."/spacer.gif' width=1 height=4><br>
</td></tr></table>";
}
else
{
$o = '<!-- ADMIN TITLE -->
<!-- <DIV style="position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;"> -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td valign="top" class="admintitle" align="left" style="background: url('.$imagesURL.'/'.$bg_image.') top right; background-repeat: no-repeat;">
- <img alt="" width="46" height="46" src="'.$icon.'" align="absmiddle">&nbsp;'.$caption.'<br>
+ <img title="" width="46" height="46" src="'.$icon.'" align="absmiddle">&nbsp;'.$caption.'<br>
<img src="'.$imagesURL.'/spacer.gif" width="1" height="4"><br>
</td>
</tr>
</table>
';
}
}
}
return $o;
}
function IsModule($module_name)
{
// checks if there is requested module used in right frame
// module folder match
$url_split = explode('/', $_SERVER['PHP_SELF']);
if( in_array($module_name, $url_split) ) return 1;
// module section match
$section = GetVar('section');
if($section)
{
$section = explode(':', $section);
if( $section[0] == $module_name ) return true;
}
return false;
}
function page_tabs($envar)
{
$showtabs=0;
$o = '';
$sec = $this->GetCurrentSection();
if ($sec->Get("notabs")!=1)
{
//get starting node
$node = $sec;
while (strlen($node->Get("left")))
{
$node = $this->GetSection($node->Get("left"));
}
if($node)
{
$o = "<!-- TABS --><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>
<td align=\"right\" width=\"100%\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"23\">
<tr>";
$showtabs=1;
}
//traverse and print tabs
while ( isset($node) && is_object($node) )
{
if ($node->Get("key") == $this->current)
$o .= $node->active_tab();
else
$o .= $node->tab($envar);
$right = $node->Get("right");
unset($node);
if(strlen($right))
$node = $this->GetSection($right);
}
if($showtabs)
{
$o .= "</tr></table></td></tr></table>";
}
}
return $o;
}
function section_header($envar,$navbar=NULL,$extra_title=NULL, $no_help = false, $OtherSection = '')
{
global $pathtoroot;
global $pathtolocal;
global $imagesURL;
global $adminURL;
global $objConfig;
$output = '';
$HelpIcon = $imagesURL."/blue_bar_help.gif";
$node = $this->GetCurrentSection();
if(is_object($node))
{
$helpURL = $adminURL.'/help/help.php?'.( substr($envar,0,3) == 'env' ? '' : 'env=').$envar.'&destform=popup';
$node_key = $node->Get('key');
$o = "<!-- SECTION NAVIGATOR -->";
//background="'.$imagesURL.'/tabnav_left.jpg"
if($no_help == false) $o .= '<form name="help_form" id="help_form" action="'.$helpURL.'" method="post"><input type="hidden" id="section" name="section" value=""></form>';
$o .= '<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">';
$o .= '<tr><TD class="header_left_bg" width="100%">';
//get path up to the parent node
while ( isset($node) && is_object($node) )
{
if(!strlen($extra_title))
{
$bar_title = $node->Get("bar_title");
$bar_title_plain_text = $node->Get("bar_title_plain_text");
if(strlen($bar_title) && !is_null($bar_title))
$caption = language($bar_title);
elseif (is_null($bar_title))
$caption = "";
else
$caption = language($node->Get("name"));
if (strlen($bar_title_plain_text))
$caption.= $bar_title_plain_text;
}
else
$caption = $extra_title;
$output = "<span class=\"tablenav_link\">$caption</span>";
unset($node);
}
$o .= $output;
if(strlen($navbar))
$o .= "::<b>".$navbar."</b>";
if($OtherSection) $node_key = $OtherSection;
$o .= "</td><td align=\"right\" class=\"tablenav\" background=\"$imagesURL/tabnav_back.jpg\" width=\"10\">";
if($no_help == false) $o .= "<a class=\"link\" onclick=\"ShowHelp('".$node_key."');\"><img src=\"$HelpIcon\" border=\"0\"></A>";
$o .= "</td></tr></table><!-- END SECTION NAVIGATOR -->";
}
return $o;
}
} /* clsSectionList */
$objSections = new clsSectionList();
$objSections->AddSection("in-portal:root", $objConfig->Get("Site_Name"), $objConfig->Get("Site_Name"), $admin."/","subitems.php",
$admin."/icons/icon46_site.gif", $admin."/icons/icon24_site.gif",
"in-portal:site", NULL, NULL,"in-portal:users",0,"",1, NULL,NULL,NULL, "", "la_section_overview");
$objSections->AddSection("in-portal:site", "la_tab_Site_Structure","la_title_Site_Structure", $admin."/","subitems.php",
$admin."/icons/icon46_struct.gif", $admin."/icons/icon24_struct.gif",
"in-portal:browse", "in-portal:root", NULL,"in-portal:users",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_struct.gif","la_selecting_categories");
$objSections->AddSection("in-portal:users","la_tab_Community","la_title_Community",$admin."/","subitems.php",
$admin."/icons/icon46_community.gif",$admin."/icons/icon24_community.gif", NULL,"in-portal:root","in-portal:site","in-portal:modules",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_community.gif","la_section_overview");
$objSections->AddSection("in-portal:modules","la_tab_ModulesSettings","la_title_Settings",$admin."/","subitems.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, "in-portal:root","in-portal:users","in-portal:reports",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif","la_section_overview");
$objSections->AddSection("in-portal:mod_status","la_tab_Modules","la_title_Module_Status",$admin."/modules/","mod_status.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, NULL,NULL,NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif");
$objSections->AddSection("in-portal:addmodule","la_tab_Modules","la_title_Add_Module",$admin."/modules/","addmodule.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, NULL,NULL,NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif");
$objSections->AddSection("in-portal:reports","la_tab_Reports","la_title_Reports",$admin."/","subitems.php",
$admin."/icons/icon46_summary_logs.gif",$admin."/icons/icon24_summary_logs.gif",NULL, "in-portal:root","in-portal:modules","in-portal:system",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_summary_logs.gif","la_section_overview");
$objSections->AddSection("in-portal:log_summary","la_tab_Summary","la_tab_Summary",$admin."/logs/","summary.php",
$admin."/icons/icon46_summary.gif",$admin."/icons/icon24_summary.gif",NULL,
"in-portal:reports",NULL,"in-portal:searchlog",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_summary.gif");
$objSections->AddSection("in-portal:searchlog","la_tab_SearchLog","la_tab_SearchLog",$admin."/logs/","searchlog.php",
$admin."/icons/icon46_search_log.gif",$admin."/icons/icon24_search_log.gif",
NULL,"in-portal:reports","in-portal:log_summary","in-portal:sessionlog",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_search_log.gif");
$objSections->AddSection("in-portal:sessionlog","la_tab_SessionLog","la_tab_SessionLog",$admin."/logs/","session_list.php",
$admin."/icons/icon46_sessions_log.gif",$admin."/icons/icon24_sessions_log.gif",
NULL,"in-portal:reports","in-portal:sessionlog",'in-portal:emaillog',0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_sessions_log.gif");
$objSections->AddSection("in-portal:emaillog","la_tab_EmailLog","la_tab_EmailLog",$admin."/logs/","email_log.php",
$admin."/icons/icon46_email_log.gif",$admin."/icons/icon24_email_log.gif",
NULL,"in-portal:reports","in-portal:emaillog",NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_email_log.gif");
/* Help */
$objSections->AddSection("in-portal:help","la_tab_Help","la_title_Help",$admin."/help/","manual.pdf",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"in-portal:root","in-portal:system",NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_help.gif");
/*
$objSections->AddSection("in-portal:help","la_tab_Help","la_title_Help",$admin."/help/topics/","download.html",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"in-portal:root","in-portal:system",NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_help.gif");
$objSections->AddSection("in-portal:help_overview","la_tab_Overview","la_title_Help",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"in-portal:help",NULL,"in-portal:help_ch1",NULL,NULL,NULL,NULL,NULL,NULL,$admin."/icons/icon46_list_help.gif");
$objSections->AddSection("in-portal:help_ch1","Chapter 1","Chapter 1",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"inportal:help","in-portal:help_overview","in-portal:help_ch2");
$objSections->AddSection("in-portal:help_ch2","Chapter 2","Chapter 2",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"inportal:help","in-portal:help_ch1",NULL);
*/
/* Help ends */
$objSections->AddSection("in-portal:item_select","la_title_Select_Item","Select Item",$admin."/","item_select.php","","",
NULL,NULL,NULL,0,"",1,1);
$objSections->AddSection("in-portal:rel_select","la_title_Select_Target_Item","Select Item",$admin."/","rel_select.php","","",
NULL,NULL,NULL,0,"",1,0,1,1);
$NewButtons = array();
/* each module will add to the array declared below, which contains the info for the
'new' button for the module's Browse data. The array is an array of arrays,
and the subarray should contain the following indexes:
ImagePath = URL to the directory containing the image
Action = Action attribute of the image (this is also the "base name" of the image
Alt = Image ALT value
Tab = If set, button will only be displayed when this div is active
*/
$m = GetModuleArray("admin");
if(is_array($m))
{
foreach($m as $key=>$value)
{
$mod = $pathtoroot . $value . "admin/include/navmenu.php";
include_once($mod);
}
}
$objSections->AddSection("default","","",$admin."/","#",NULL,NULL,NULL,NULL,NULL,NULL);
?>
Property changes on: trunk/admin/include/sections.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13
\ No newline at end of property
+1.14
\ No newline at end of property
Index: trunk/admin/advanced_view.php
===================================================================
--- trunk/admin/advanced_view.php (revision 1509)
+++ trunk/admin/advanced_view.php (revision 1510)
@@ -1,378 +1,378 @@
<?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="";
define('REQUIRE_LAYER_HEADER', 1);
$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(__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");
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
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"]);
//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");
$mod_prefixes = Array();
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if(file_exists($path))
{
//echo "<!-- $path -->";
$mod_prefixes[] = $key;
@include_once($path);
}
}
if(!defined('IS_INSTALL'))define('IS_INSTALL',0);
if(!IS_INSTALL)
{
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/index.php?logout=1");
die();
//require_once($pathtoroot."admin/login.php");
}
}
//Set Section
$section = 'in-portal:advanced_view';
//Set Environment Variable
// save last category visited
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
$objSession->SetVariable("HasChanges", 0);
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
// common "Advanced View" tab php functions: begin
function GetAdvView_SearchWord($prefix)
{
global $objSession;
return $objSession->GetVariable($prefix.'_adv_view_search');
}
function SaveAdvView_SearchWord($prefix)
{
global $objSession;
$SearchWord = $objSession->GetVariable($prefix.'_adv_view_search');
if( isset($_REQUEST['SearchWord']) )
{
$SearchWord = $_REQUEST['SearchWord'];
$objSession->SetVariable($prefix.'_adv_view_search', $SearchWord);
}
}
function ResetAdvView_SearchWord($prefix)
{
global $objSession;
$objSession->SetVariable($prefix.'_adv_view_search', '');
}
function ShowSearchForm($prefix, $envar, $TabID)
{
global $imagesURL;
$btn_prefix = $imagesURL.'/toolbar/icon16_search';
$SearchWord = GetAdvView_SearchWord($prefix);
echo '<form method="post" action="'.$_SERVER["PHP_SELF"].'?'.$envar.'" name="'.$prefix.'_adv_view_search" id="'.$prefix.'_adv_view_search">
<input type="hidden" name="Action" value="">
<table cellspacing="0" cellpadding="0">
<tr>
<td>'.admin_language('la_SearchLabel').'&nbsp;</td>
<td><input id="'.$prefix.'_SearchWord" type="text" value="'.inp_htmlize($SearchWord,1).'" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
<td>
<img
id="'.$TabID.'_imgSearch"
src="'.$btn_prefix.'.gif"
- alt="'.admin_language("la_ToolTip_Search").'"
+ title="'.admin_language("la_ToolTip_Search").'"
align="absMiddle"
onclick="SubmitSearch(\''.$prefix.'_adv_view_search\',\''.$prefix.'_adv_view_search\');"
onmouseover="this.src=\''.$btn_prefix.'_f2.gif\'"
onmouseout="this.src=\''.$btn_prefix.'.gif\'"
style="cursor:hand"
width="22"
height="22"
>
<img
id="imgSearchReset"
src="'.$btn_prefix.'_reset.gif"
- alt="'.admin_language("la_ToolTip_Search").'"
+ title="'.admin_language("la_ToolTip_Search").'"
align="absMiddle"
onclick="SubmitSearch(\''.$prefix.'_adv_view_search\',\''.$prefix.'_adv_view_search_reset\');"
onmouseover="this.src=\''.$btn_prefix.'_reset_f2.gif\'"
onmouseout="this.src=\''.$btn_prefix.'_reset.gif\'"
style="cursor:hand"
width="22"
height="22"
>&nbsp;
</td>
</tr>
</table>
</form>
<script language="javascript">
document.getElementById("'.$prefix.'_SearchWord").onkeydown = getKey;
</script>
';
}
// common "Advanced View" tab php functions: end
/* page header */
$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'+'/';
</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 = '';
int_SectionHeader();
$filter = false;
$bit_combo = $objModules->ExecuteFunction('GetModuleInfo', 'all_bitmask');
$bit_combo = $objModules->MergeReturn($bit_combo);
foreach($bit_combo['VarName'] as $mod_name => $VarName)
{
//echo "VarName: [$VarName] = [".$objConfig->Get($VarName)."], ALL = [".$bit_combo['Bits'][$mod_name]."]<br>";
if( $objConfig->Get($VarName) )
if( $objConfig->Get($VarName) != $bit_combo['Bits'][$mod_name] )
{
$filter = true;
break;
}
}
?>
</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="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:button action="edit" title="<?php echo admin_language("la_ToolTip_Edit"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="delete" title="<?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:button action="approve" title="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="decline" title="<?php echo admin_language("la_ToolTip_Decline"); ?>" 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/";?>">
+ <tb:button action="print" title="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="view" title="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</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 -->
</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">
<?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/advanced_view.php";
//echo "Including File: $path<br>";
if(file_exists($path))
{
//echo "\n<!-- $path -->\n";
include_once($path);
}
}
?>
<form method="post" action="advanced_view.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();
if(default_tab.length == 0)
{
cookie_start = theMainScript.GetCookie('active_tab');
if (cookie_start != null) start_tab = cookie_start;
if(start_tab!=null) toggleTabB(start_tab, true);
}
else
{
toggleTabB(default_tab,true);
}
</script>
<?php
$objSession->SetVariable("HasChanges", 0);
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/advanced_view.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13
\ No newline at end of property
+1.14
\ No newline at end of property
Index: trunk/admin/editor/FCKeditor/js/fck_toolbar.js
===================================================================
--- trunk/admin/editor/FCKeditor/js/fck_toolbar.js (revision 1509)
+++ trunk/admin/editor/FCKeditor/js/fck_toolbar.js (revision 1510)
@@ -1,335 +1,335 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License
* (http://www.opensource.org/licenses/lgpl-license.php)
*
* For further information go to http://www.fredck.com/FCKeditor/
* or contact fckeditor@fredck.com.
*
* fck_toolbar.js: Creates and handles the toolbar.
*
* Authors:
* Frederico Caldeira Knabben (fckeditor@fredck.com)
*/
//##
//## Command Type Enum
//##
TBCMD_DEC = 0 ;
TBCMD_DOC = 1 ;
TBCMD_CUSTOM = 2 ;
// -----------------------------------------------------------------
// -- TBToolbar class - The Main (upper level) toolbar object.
// -----------------------------------------------------------------
function TBToolbar()
{
this.Bands = new TBBandList() ; // The Toolbar Bands collection.
}
TBToolbar.prototype.GetHTML = TBToolbar_GetHTML ;
TBToolbar.prototype.LoadButtonsSet = TBToolbar_LoadButtonsSet ;
function TBToolbar_GetHTML()
{
var sHTML = '<TABLE width="100%" class="Toolbar" cellspacing="0" cellpadding="0" border="0" unselectable="on"><TR><TD>' ;
var oBand ;
for (iBand = 0 ; iBand < this.Bands.Array.length ; iBand++)
{
sHTML += '<TABLE class="Toolbar" cellspacing="0" cellpadding="0" border="0" unselectable="on"><TR>' ;
oBand = this.Bands.Array[iBand]
for (iItem = 0 ; iItem < oBand.Items.Array.length ; iItem++)
{
sHTML += '<TD>' + oBand.Items.Array[iItem].GetHTML() + '</TD>' ;
}
sHTML += '</TR></TABLE>' ;
}
return '</TD></TR></TABLE>' + sHTML ;
}
function TBToolbar_LoadButtonsSet(toolbarSetName)
{
var ToolbarSet = config.ToolbarSets[toolbarSetName] ;
if (! ToolbarSet)
{
alert('Toolbar set "' + toolbarSetName + '" doesn\'t exist') ;
return ;
}
this.Bands = new TBBandList() ;
var oBand ;
var sItem ;
for (iBand = 0 ; iBand < ToolbarSet.length ; iBand++)
{
oBand = this.Bands.Add() ;
for (iItem in ToolbarSet[iBand])
{
sItem = ToolbarSet[iBand][iItem] ;
if ((sItem) == '-')
oBand.Items.Add(new TBSeparator()) ;
else
oBand.Items.Add(oTB_Items[sItem]) ;
}
}
}
// -----------------------------------------------------------------
// -- TBBandList class - A collection of toolbar bands.
// -----------------------------------------------------------------
function TBBandList()
{
this.Array = new Array() ;
}
TBBandList.prototype.Add = TBBandList_Add ; // Adds a Band to the collection.
function TBBandList_Add(bandName)
{
var i = this.Array.length ;
this.Array[i] = new TBBand(bandName) ;
return this.Array[i] ;
}
// -----------------------------------------------------------------
// -- TBBand class - A toolbar band. It holds a group of items (buttons, combos, etc...).
// -----------------------------------------------------------------
function TBBand(bandName)
{
this.Name = bandName || "" ; // The Band name
this.Items = new TBItemList() ; // The Band Items collection.
}
// -----------------------------------------------------------------
// -- TBItemList class - A collection of items (TBButton's, TBCombo's, etc...).
// -----------------------------------------------------------------
function TBItemList()
{
this.Array = new Array() ;
}
TBItemList.prototype.Add = TBItemList_Add ; // Adds an Item to the collection.
function TBItemList_Add(objectItem)
{
var i = this.Array.length ;
this.Array[i] = objectItem ;
return this.Array[i] ;
}
// -----------------------------------------------------------------
// -- TBButton class - Represents a toolbar button.
// -----------------------------------------------------------------
function TBButton(name, toolTip, command, commandType, onEditingAction, width, height)
{
this.Name = name.toLowerCase() ;
this.ToolTip = toolTip || name ;
this.Width = width || 21 ;
this.Height = height || 21 ;
this.CommandType = commandType || TBCMD_DEC ;
this.Image = null ;
this.Active = false ;
switch (this.CommandType)
{
case TBCMD_DEC :
this.Command = "decCommand(" + command + ")" ;
this.CommandId = command ;
events.attachEvent('onEditing', this) ;
break ;
case TBCMD_DOC :
this.Command = "docCommand('" + command + "')" ;
this.CommandCode = command ;
events.attachEvent('onEditing', this) ;
break ;
default :
this.Command = command || "void(0)" ;
if (onEditingAction)
{
this.OnEditingAction = onEditingAction ;
events.attachEvent('onEditing', this) ;
}
break ;
}
}
TBButton.prototype.GetHTML = TBButton_GetHTML ;
TBButton.prototype.onEditing = TBButton_onEditing ;
function TBButton_GetHTML()
{
this.Active = true ;
return '<IMG id="btn' + this.Name + '" src="' + config.ToolbarImagesPath + 'button.' + this.Name + '.gif" width=' + this.Width
+ ' height=' + this.Height
+ ' onclick="' + this.Command + '"'
+ ' onload="TBButtonLoad(this,\'' + this.Name + '\');"'
+ ' onmouseover="TBButtonOver(this,\'' + this.Name + '\');"'
+ ' onmouseout="TBButtonOut(this,\'' + this.Name + '\');"'
+ ' ondrag="return false;"'
+ ' class="ButtonHidden"'
- + ' alt="' + this.ToolTip + '">' ;
+ + ' title="' + this.ToolTip + '">' ;
}
function TBButton_onEditing()
{
if (! this.Active) return ;
if (this.Image == null) this.Image = document.getElementById('btn' + this.Name) ;
if (this.Image && this.Image.Loaded)
{
var state ;
switch (this.CommandType)
{
case TBCMD_DEC :
state = checkDecCommand(this.CommandId) ;
break ;
case TBCMD_DOC :
state = checkDocCommand(this.CommandCode) ;
break ;
default :
if (this.OnEditingAction)
state = eval(this.OnEditingAction) ;
break ;
}
if (state == OLE_TRISTATE_UNCHECKED)
{
if (this.Image.onmouseover == null) this.Image.onmouseover = this.Image.BackupOnMouseOver ;
if (this.Image.onmouseout == null) this.Image.onmouseout = this.Image.BackupOnMouseOut ;
TBButtonOut(this.Image, this.Name) ;
}
else if (state == OLE_TRISTATE_GRAY)
{
this.Image.onmouseover = null ;
this.Image.onmouseout = null ;
if (this.Image.className != "ButtonOff") this.Image.className = "ButtonOff" ;
}
else
{
this.Image.onmouseout = null ;
TBButtonOver(this.Image, this.Name) ;
}
}
}
// -----------------------------------------------------------------
// -- TBCombo class - Represents a toolbar combo.
// -----------------------------------------------------------------
function TBCombo(name, command, label, options, values, onEditingAction, separator)
{
separator = separator ? separator : ';' ;
this.Name = name ;
this.Label = label || "" ;
this.Command = command ;
this.Options = options ? options.split( separator ) : new Array() ;
this.Values = values ? values.split( separator ) : new Array() ;
this.Active = false ;
if (onEditingAction)
{
this.onEditingAction = onEditingAction ;
events.attachEvent('onEditing', this) ;
}
}
TBCombo.prototype.GetHTML = TBCombo_GetHTML ;
TBCombo.prototype.onEditing = TBCombo_onEditing ;
function TBCombo_GetHTML()
{
this.Active = true ;
var sHTML = this.Label + '&nbsp;\n<SELECT id="cmb' + this.Name + '" onchange="' + this.Command + '">\n' ;
for (i in this.Options)
{
if (this.Values.length > 0)
sHTML += '<OPTION value="' + this.Values[i] + '">' + this.Options[i] + '</OPTION>\n' ;
else
sHTML += '<OPTION>' + this.Options[i] + '</OPTION>\n' ;
}
return sHTML + '</SELECT>' ;
}
function TBCombo_onEditing()
{
if (! this.Active) return ;
eval(this.onEditingAction) ;
}
var iElementNum = 0 ;
// -----------------------------------------------------------------
// -- TBCheckBox class - Represents a toolbar checkbox.
// -----------------------------------------------------------------
function TBCheckBox(name, command, label, eventToListen)
{
this.Name = name ;
this.Command = command ;
this.Label = label || "" ;
this.Checkboxes = null ;
if (eventToListen)
{
events.attachEvent(eventToListen, this) ;
this[eventToListen] = this.onEvent ;
}
}
TBCheckBox.prototype.GetHTML = TBCheckBox_GetHTML ;
TBCheckBox.prototype.onEvent = TBCheckBox_onEvent ;
function TBCheckBox_GetHTML()
{
return this.Label + '<INPUT name="chk' + this.Name + '" type=checkbox onclick="' + this.Command + '">' ;
}
function TBCheckBox_onEvent(checked)
{
if (this.Checkboxes == null) this.Checkboxes = document.getElementsByName('chk' + this.Name) ;
if (this.Checkboxes)
{
for (i = 0 ; i < this.Checkboxes.length ; i++)
{
this.Checkboxes[i].checked = checked ;
}
}
}
// -----------------------------------------------------------------
// -- TBSeparator class - Represents a toolbar items separator.
// -----------------------------------------------------------------
function TBSeparator()
{
this.Name = '' ;
}
TBSeparator.prototype.GetHTML = TBSeparator_GetHTML ;
function TBSeparator_GetHTML()
{
return '<IMG class="spacer" src="' + config.ToolbarImagesPath + 'separator.gif" width=5 height=22>' ;
}
// Behaviours
function TBButtonLoad(oImage, Name)
{
oImage.onload = null ;
oImage.className = "ButtonOut" ;
oImage.BackupOnMouseOver = oImage.onmouseover ;
oImage.BackupOnMouseOut = oImage.onmouseout ;
oImage.Loaded = true ;
}
function TBButtonOver(oImage, Name)
{
if (oImage.className != "ButtonOver") oImage.className = "ButtonOver" ;
}
function TBButtonOut(oImage, Name)
{
if (oImage.className != "ButtonOut") oImage.className = "ButtonOut" ;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/FCKeditor/js/fck_toolbar.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/head.php
===================================================================
--- trunk/admin/head.php (revision 1509)
+++ trunk/admin/head.php (revision 1510)
@@ -1,129 +1,129 @@
<?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");
//admin only util
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$localURL=$rootURL."kernel/";
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$pathtolocal = $pathtoroot;
//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");
//print_r($objSession);
$userid= $objSession->Get("PortalUserId");
if($userid!=-1)
{
$userobj=$objUsers->GetItem($userid);
$loginname= $userobj->Get("Login");
}
else
$loginname = "root";
$logout = $rootURL."admin/";
$mainpage = $rootURL."admin/subitems.php?"."env=".BuildEnv()."&section=in-portal:root";
$objLang = $objLanguages->GetItem($m_var_list["lang"]);
$charset = GetRegionalOption('Charset');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>HEAD</title>
<meta http-equiv="content-type" content="text/html;charset=<?php echo $charset; ?>">
<meta name="generator" content="Notepad">
<link rel="stylesheet" type="text/css" href="include/style.css">
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr>
<td valign="bottom">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="90">
<tr>
- <td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img alt="In-portal" src="images/globe.gif" width="84" height="91" border="0"></a></td>
- <td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img alt="In-portal" src="images/logo.gif" width="150" height="91" border="0"></a></td>
+ <td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img title="In-portal" src="images/globe.gif" width="84" height="91" border="0"></a></td>
+ <td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img title="In-portal" src="images/logo.gif" width="150" height="91" border="0"></a></td>
<td rowspan="3" width="100000" align="right">&nbsp;</td>
- <td width="400"><img alt="" src="images/blocks.gif" width="400" height="73"></td>
+ <td width="400"><img title="" src="images/blocks.gif" width="400" height="73"></td>
</tr>
<tr>
- <td align="right" background="images/version_bg.gif" class="head_version" valign="bottom"><img alt="" src="images/spacer.gif" width="1" height="10" align="absmiddle">
+ <td align="right" background="images/version_bg.gif" class="head_version" valign="bottom"><img title="" src="images/spacer.gif" width="1" height="10" align="absmiddle">
<?php echo prompt_language("la_Logged_in_as")." "; ?><B><?php echo $loginname." "; ?></B>
<a href="<?php echo $logout.'index.php?env='.BuildEnv().'&logout=1'; ?>" target="_parent"><img src="images/blue_bar_logout.gif" height="16" WIDTH="16" align="absmiddle" BORDER="0"></A></td>
</tr>
<tr>
- <td><img alt="" src="images/blocks2.gif" width="400" height="1"></td>
+ <td><img title="" src="images/blocks2.gif" width="400" height="1"></td>
</tr> <tr>
- <td bgcolor="black" colspan="4"><img alt="" src="images/spacer.gif" width="1" height="1"></td>
+ <td bgcolor="black" colspan="4"><img title="" src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
\ No newline at end of file
Property changes on: trunk/admin/head.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/admin/toolbar.php
===================================================================
--- trunk/admin/toolbar.php (revision 1509)
+++ trunk/admin/toolbar.php (revision 1510)
@@ -1,329 +1,329 @@
<?php
##############################################################
## In-portal :: Administration Interfaces :: Tool Bar ##
##############################################################
## 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. ##
##############################################################
class clsToolBarItem
{
var $m_img;
var $m_alt;
var $link;
var $onMouseOver;
var $onMouseOut;
var $onClick;
var $filename;
function clsToolBarItem()
{
}
function GetItem()
{
global $imagesURL;
$o = "";
if ($this->img=="divider")
{
$o .= "<img src=\"".$imagesURL."/toolbar/tool_divider.gif\" width=\"4\" height=\"32\" border=\"0\">\n";
}
else
{
if(strlen($this->link)>1)
{
$o .= "<a href=\"".$this->link."\" onMouseOut=\"".$this->onMouseOut."\"";
$o .= " onMouseOver=\"".$this->onMouseOver."\" onClick=\"".$this->onClick."\">\n";
- $o .= "<img ID=\"".$this->img."\" alt=\"".inp_htmlize(language($this->alt))."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\">";
+ $o .= "<img ID=\"".$this->img."\" title=\"".inp_htmlize(language($this->alt))."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\">";
$o .= "</a>\n";
}
else
{
- $o .= "<img ID=\"".$this->img."\" alt=\"".inp_htmlize(language($this->alt))."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\"";
+ $o .= "<img ID=\"".$this->img."\" title=\"".inp_htmlize(language($this->alt))."\" src=\"".$this->filename."\" width=\"32\" height=\"32\" border=\"0\"";
$o .= " onMouseOut=\"".$this->onMouseOut."\"";
$o .= " onMouseOver=\"".$this->onMouseOver."\" onClick=\"".$this->onClick."\">";
}
}
return $o;
}
function GetID()
{
// get image id (for javascript operations)
return $this->img;
}
}
class clsToolBar
{
var $Items;
var $m_section;
var $m_load_menu_func;
var $m_CheckClass;
var $m_CheckForm;
var $InitScript;
var $DoubleClickAction;
var $ContextMenu;
function clsToolBar()
{
$this->Items = array();
$this->InitScript = array();
$this->ContextMenu = array();
}
function Get($name)
{
$var = "m_" . $name;
return $this->$var;
}
function Set($name, $value)
{
if (is_array($name))
{
for ($i=0; $i<sizeof($name); $i++)
{ $var = "m_" . $name[$i];
$this->$var = $value[$i];
$this->m_dirtyFieldsMap[$name[$i]] = $value[$i];
echo "$var = ".$value[$i]."<br>\n";
}
}
else
{
$var = "m_" . $name;
$this->$var = $value;
$this->m_dirtyFieldsMap[$name] = $value;
}
}
function Add($img,$alt="",$link="",$MouseOver="",$MouseOut="",$onClick="", $filename="",$IsDblClick=FALSE,$ContextMenu=FALSE)
{
global $imagesURL;
$t = new clsToolBarItem();
$t->img = $img;
$t->alt = $alt;
$t->link = $link;
$t->onMouseOver = $MouseOver;
$t->onMouseOut = $MouseOut;
$t->onClick = $onClick;
if(strlen($filename)==0)
{
$t->filename = $imagesURL."/toolbar/tool_".$img.".gif";
}
else
{
if(substr($filename,0,4)=="http")
{
$t->filename = $filename;
}
else
{
if(substr($filename,0,8)!="toolbar/")
$filename = "toolbar/".$filename;
if(substr($filename,0,1)!="/")
$filename = "/".$filename;
$t->filename = $imagesURL.$filename;
}
}
array_push($this->Items,$t);
if($IsDblClick)
$this->DoubleClickAction=$onClick;
if($ContextMenu)
$this->ContextMenu[] = "contextMenu.addMenuItem('".admin_language($alt)."',\"$onClick\",\"\");";
return $t;
}
function AddToInitScript($s)
{
if(is_array($s))
{
for($i=0;$i<count($s);$i++)
array_push($this->InitScript,$s[$i]);
}
else
array_push($this->InitScript,$s);
}
function GetInitScript()
{
global $envar;
$s="";
if(count($this->InitScript)>0)
$s = implode("\n",$this->InitScript);
if(strlen($this->Get("CheckClass")))
{
$c = $this->Get("CheckClass")." = new CheckArray();\n";
$c .=$this->Get("CheckClass").".formname='".$this->Get("CheckForm")."';\n";
$c .=$this->Get("CheckClass").".envar='$envar';\n";
$s = $c.$s;
}
$s .= "\n".$this->GetActionHandlerScript();
// $s .= "\n".$this->Get("CheckClass").".setImages();\n";
return "<SCRIPT language=\"JavaScript\">$s</SCRIPT>";
}
function GetActionHandlerScript()
{
$o = '';
$o .= "function handleDoubleClick()\n{\n";
if(strlen($this->DoubleClickAction)>0)
{
$o .= " ".$this->DoubleClickAction."\n";
}
else {
$o .= 'return';
}
$o .= "}\n\n";
if(count($this->ContextMenu))
{
$o .= "function initContextMenu()\n{\n";
$o .= " window.contextMenu = new Menu(\"Context\");";
for($x=0;$x<count($this->ContextMenu);$x++)
{
$o .= " ".$this->ContextMenu[$x]."\n";
}
$o .= " window.triedToWriteMenus = false;\n window.contextMenu.writeMenus();\n return true;\n}\n";
}
return $o;
}
function Build()
{
global $imagesURL;
$btn_ids = Array();
$o = '<table border="0" cellpadding="0" cellspacing="0" width="100%" class="toolbar">';
- //$o .= '<tr><td><img alt="|" src="'.$imagesURL.'/toolbar_start.gif" width="10" height="50" border="0"></td>'."\n";
+ //$o .= '<tr><td><img title="|" src="'.$imagesURL.'/toolbar_start.gif" width="10" height="50" border="0"></td>'."\n";
foreach($this->Items as $t)
{
$o .= '<TD>'.$t->GetItem().'</TD>';
$btn_ids[] = $t->GetID();
}
$o .= '<TD width="100%"></TD></TR></TABLE>'."\n";
$btn_ids = "'".implode("','", $btn_ids)."'";
$o .= '<script language="javascript">
var toolbar_btns = Array('.$btn_ids.');
var i = 0, btn_count = toolbar_btns.length;
while(i < btn_count)
{
SetButtonStateByImage(toolbar_btns[i]);
i++;
}
</script>';
return $o;
}
function onLoadString()
{
return "";
}
}
class clsItemTabs
{
var $Tabs;
var $ItemCount;
function clsItemTabs()
{
$this->Tabs = array();
$this->ItemCount = array();
}
function SetItemCount($divname,$Value)
{
$this->ItemCount[$divname] = $Value;
}
function GetItemCount($divname)
{
return (int)$this->ItemCount[$divname];
}
function AddTab($Caption,$divname,$ItemCount,$selected,$numfunc="")
{
$t["caption"]=$Caption;
$t["divname"]=$divname;
$this->SetItemCount($divname,$ItemCount);
$t["selected"]=$selected;
$t["numfunc"]=$numfunc;
$this->Tabs[] = $t;
}
function TabItem($i)
{
global $imagesURL;
$t = $this->Tabs[$i];
if($t["selected"]==1)
{
$divimage="/divider_up.gif";
}
else
$divimage="/divider_dn.gif";
$div = $t["divname"];
$o .= "<td width=\"138\" height=\"22\" noWrap";
$o .= " background=\"".$imagesURL."/itemtabs/tab_inactive.gif\" ";
$o .= "tabHeaderOf=\"$div\" ";
$o .= "onclick=\"toggleTab('$div');\" style=\"cursor:hand\">\n";
$o .= " <img height=\"20\" src=\"".$imagesURL."/itemtabs/divider_empty.gif\" ";
$o .= "width=\"20\" border=\"0\" align=\"middle\">";
$o .= $t["caption"]."<span class=\"cats_stats\">";
$func = $t["numfunc"];
if(is_numeric($func))
{
$total = $func;
}
else
{
if(function_exists($func))
{
$total = $func();
}
}
if(!is_numeric($total))
$total = $this->GetItemCount($div);
if($total==$this->GetItemCount($div))
{
$o .= "(".$this->GetItemCount($div).")</span></td>\n";
}
else
$o .= "(".$this->GetItemCount($div)." / ".$total.")</span></td>\n";
return $o;
}
function tabRow()
{
$o = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=0>";
$o .= "<tr>";
for($i=0;$i<count($this->Tabs);$i++)
{
$o .= $this->TabItem($i);
}
$o .= "<td width=\"100%\"></td>";
//$o .= "<tr class=\"divider\">";
//$o .= "<td colspan=4><img src=\"".$imagesURL."/spacer.gif\" border=0 width=1 height=1></td>";
$o .= "</tr></table>";
return $o;
}
}
?>
Property changes on: trunk/admin/toolbar.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/help/install_help.php
===================================================================
--- trunk/admin/help/install_help.php (revision 1509)
+++ trunk/admin/help/install_help.php (revision 1510)
@@ -1,144 +1,144 @@
<?php
define('THIS_FILE', 'admin/help/install_help.php');
$pathtoroot = "";
if(!strlen($pathtoroot))
{
//$path=dirname(realpath(__FILE__));PATH_TRANSLATED
$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;
}
}
function GetPathChar($path = null)
{
if( !isset($path) ) $path = $GLOBALS['pathtoroot'];
$pos = strpos($path, ':');
return ($pos === false) ? "/" : "\\";
}
$path_char = GetPathChar();
$rootURL = 'http://'.dirname($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']);
$rootURL = str_replace('/help','',$rootURL);
$tmp = explode('/', $rootURL);
if( $tmp[ count($tmp) - 1 ] == $admin) unset( $tmp[ count($tmp) - 1 ] );
$rootURL = implode('/', $tmp).'/';
unset($tmp);
function print_pre($s)
{
echo '<pre>'.print_r($s, true).'</pre>';
}
$section = $_REQUEST['section'];
$section = explode(':', $section);
if($section[0] == 'in-portal') $section[0] = 'kernel';
$topic_path = str_replace(THIS_FILE, '', $_SERVER['PATH_TRANSLATED']).$section[0].'/admin/include/help/'.$section[1].'.txt';
//echo "TP: $topic_path<br>";
?>
<html>
<head>
<title>In-Portal - Help</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="<?php echo $rootURL; ?>include/style.css">
</head>
<body topmargin="0" leftmargin="8" marginheight="8" marginwidth="8" bgcolor="#FFFFFF">
<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='<?php echo $rootURL; ?>images/logo_bg.gif'>
</div>
<img src="<?php echo $rootURL; ?>images/spacer.gif" width="1" height="7"><br>
<div style='z-Index:1; position:relative'>
<!-- ADMIN TITLE -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td valign="top" class="admintitle" align="left">
- <img alt="" width="46" height="46" src="<?php echo $rootURL; ?>images/icon_install.gif" align="absmiddle">&nbsp;Installtion Help<br>
+ <img title="" width="46" height="46" src="<?php echo $rootURL; ?>images/icon_install.gif" align="absmiddle">&nbsp;Installtion Help<br>
<img src='<?php echo $rootURL; ?>images/spacer.gif' width=1 height=4><br>
</td></tr></table>
<!-- SECTION NAVIGATOR -->
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30"><tr>
<TD class="header_left_bg" width="100%">
<span class="tablenav_link">Install</span>
</td>
<td align="right" class="tablenav" background="<?php echo $rootURL; ?>images/tabnav_back.jpg" width="10">
</td>
</tr>
</table>
<!-- END SECTION NAVIGATOR -->
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr>
<td bgcolor="F6F6F6">
<div class="help_box">
<?php
if( file_exists($topic_path) )
{
echo file_get_contents($topic_path);
}
?>
</h3> </div>
</td>
</tr>
</table>
</body>
</html>
\ No newline at end of file
Property changes on: trunk/admin/help/install_help.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/cat_select.php
===================================================================
--- trunk/admin/cat_select.php (revision 1509)
+++ trunk/admin/cat_select.php (revision 1510)
@@ -1,386 +1,386 @@
<?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. ##
##############################################################
$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='z-Index:1; position:relative'>";
$pathtoroot="";
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;
}
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$cssURL = $adminURL."/include";
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$destform = $_GET["destform"];
$destfield = $_GET["destfield"];
RegisterEnv("destform",$destform);
RegisterEnv("destfield",$destfield);
RegisterEnv("source",$_GET["source"]);
$envar = "env=" . BuildEnv();
$m_var_list_update["cat"] = 0;
//$homeURL = $_SERVER["PHP_SELF"]."?".$envar;
$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
if( $GLOBALS['debuglevel'] ) echo $homeURL."<br>\n";
unset($m_var_list_update["cat"]);
if($objCatList->CurrentCategoryID()>0)
{
$c = $objCatList->CurrentCat();
$upURL = $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);
}
}
//Set Section
$section = 'in-portal:catselect';
//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";
$SearchType = $objSession->GetVariable("SearchType");
if(!strlen($SearchType))
$SearchType = "Categories";
$SearchLabel = "la_SearchLabel";
/* page header */
$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">
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
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>
<script language="JavaScript1.2">
var enableContextMenus= true;
var doubleClickAction = 'select';
function toggleTabB(tabId, atm)
{
var hl = document.getElementById("hidden_line");
var activeTabId;
if (activeTab) activeTabId = activeTab.id;
if (activeTabId == tabId)
{
var devider = document.getElementById("tabsDevider");
devider.style.display = "";
unselectAll(tabId);
var tab = document.getElementById(tabId);
tab.active = false;
activeTab = null;
collapseTab = tab;
toolbar.setTab(null);
showTab();
}
else
{
if (activeTab)
toggleTab(tabId, true)
else
toggleTab(tabId, atm)
if (hl) hl.style.display = "none";
}
tab_hdr = document.getElementById('tab_headers');
if (!tab_hdr) return;
// process all module tabs
var active_str = '';
for(var i = 0; i < tabIDs.length; i++)
{
var tabHeader;
TDs = tab_hdr.getElementsByTagName("TD");
for (var j = 0; j < TDs.length; j++)
if (TDs[j].getAttribute("tabHeaderOf") == tabIDs[i])
{
tabHeader = TDs[j];
break;
}
if (!tabHeader) continue;
var tab = document.getElementById(tabIDs[i]);
if (!tab) continue;
active_str = (tab.active) ? "tab_active" : "tab_inactive";
if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
// module tab is selected
SetBackground('l_' + tabId, "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabId, "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
else
{
// module tab is not selected
SetBackground('l_' +tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) continue;
images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
}
}
function toggleCategoriesB(tabHeader, instant)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories(instant);
var active_str = '$imagesURL'+'/itemtabs/' + (categories.active ? 'tab_active' : 'tab_inactive');
SetBackground('l_cat', active_str + '_l.gif');
SetBackground('m_cat', active_str + '.gif');
SetBackground('m1_cat', active_str + '.gif');
SetBackground('r_cat', active_str + '_r.gif');
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) return;
images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif";
}
</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;
int_SectionHeader();
?>
</div>
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<div name="toolBar" id="mainToolBar">
- <tb:button action="select" alt="<?php echo admin_language("la_ToolTip_Select"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <tb:button action="stop" alt="<?php echo admin_language("la_ToolTip_Cancel"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="select" title="<?php echo admin_language("la_ToolTip_Select"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="stop" title="<?php echo admin_language("la_ToolTip_Cancel"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <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:button action="upcat" title="<?php echo admin_language("la_ToolTip_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="homecat" title="<?php echo admin_language("la_ToolTip_Home"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
- <tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="view" title="<?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 print m_navbar( Array('admin' => 1) ); ?></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); ?>&nbsp;</td>
<td><input ID="SearchWord" type="text" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: #999999"></td>
- <td><img 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="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">&nbsp;
+ <td><img action="search_b" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif" title="<?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" title="<?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" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="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">&nbsp;
</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/";?>"-->
+ <!--tb:button action="search_b" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
+ <tb:button action="search_a" title="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
</td>
</tr>
</tbody>
</table>
<br>
<!-- CATEGORY DIVIDER -->
<?php
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
$objCatList->Clear();
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);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
?>
<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"); ?>:&nbsp;
</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>&nbsp;
</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>&nbsp;</td>
</tr>
</tbody>
</table>
<div class="divider" style="" id="categoriesDevider"><img width=1 height=1 src="images/spacer.gif"></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 print adListSubCats($objCatList->CurrentCategoryID(),"cat_select_element.tpl"); ?>
</form>
</div>
<BR>
<!-- CATEGORY OUTPUT END -->
</DIV>
<form method="post" action="cat_select.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">
<?php
//if($_GET["Selector"]=="radio")
echo " var single_select = true;";
?>
InitPage();
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/cat_select.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.8
\ No newline at end of property
Index: trunk/admin/install.php
===================================================================
--- trunk/admin/install.php (revision 1509)
+++ trunk/admin/install.php (revision 1510)
@@ -1,2034 +1,2034 @@
<?php
error_reporting(E_ALL);
define('BACKUP_NAME', 'dump(.*).txt'); // how backup dump files are named
$general_error = '';
$pathtoroot = "";
if(!strlen($pathtoroot))
{
$path=dirname(realpath(__FILE__));
//$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;
}
}
$path_char = GetPathChar();
//phpinfo(INFO_VARIABLES);
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
ini_set('include_path', '.');
if( file_exists($pathtoroot.'debug.php') && !defined('DEBUG_MODE') ) include_once($pathtoroot.'debug.php');
if(!defined('IS_INSTALL'))define('IS_INSTALL',1);
$admin = substr($path,strlen($pathtoroot));
$state = isset($_GET["state"]) ? $_GET["state"] : '';
if(!strlen($state))
{
$state = isset($_POST['state']) ? $_POST['state'] : '';
}
if (!defined("GET_LICENSE_URL")) {
define("GET_LICENSE_URL", "http://www.intechnic.com/myaccount/license.php");
}
include($pathtoroot.$admin."/install/install_lib.php");
$install_type = GetVar('install_type', true);
$force_finish = isset($_REQUEST['ff']) ? true : false;
$ini_file = $pathtoroot."config.php";
if(file_exists($ini_file))
{
$write_access = is_writable($ini_file);
$ini_vars = inst_parse_portal_ini($ini_file,TRUE);
foreach($ini_vars as $secname => $section)
{
foreach($section as $key => $value)
{
$key = "g_".str_replace('-', '', $key);
global $$key;
$$key = $value;
}
}
}
else
{
$state="";
$write_access = is_writable($pathtoroot);
if($write_access)
{
set_ini_value("Database", "DBType", "");
set_ini_value("Database", "DBHost", "");
set_ini_value("Database", "DBUser", "");
set_ini_value("Database", "DBUserPassword", "");
set_ini_value("Database", "DBName", "");
set_ini_value("Module Versions", "In-Portal", "");
save_values();
}
}
$titles[1] = "General Site Setup";
$configs[1] = "in-portal:configure_general";
$mods[1] = "In-Portal";
$titles[2] = "User Setup";
$configs[2] = "in-portal:configure_users";
$mods[2] = "In-Portal:Users";
$titles[3] = "Category Display Setup";
$configs[3] = "in-portal:configure_categories";
$mods[3] = "In-Portal";
// simulate rootURL variable: begin
$rootURL = 'http://'.dirname($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']);
$tmp = explode('/', $rootURL);
if( $tmp[ count($tmp) - 1 ] == $admin) unset( $tmp[ count($tmp) - 1 ] );
$rootURL = implode('/', $tmp).'/';
unset($tmp);
//echo "RU: $rootURL<br>";
// simulate rootURL variable: end
$db_savings = Array('dbinfo', 'db_config_save', 'db_reconfig_save'); //, 'reinstall_process'
if( isset($g_DBType) && $g_DBType && strlen($state)>0 && !in_array($state, $db_savings) )
{
require_once($pathtoroot."kernel/startup.php");
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//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");
}
function GetPathChar($path = null)
{
if( !isset($path) ) $path = $GLOBALS['pathtoroot'];
$pos = strpos($path, ':');
return ($pos === false) ? "/" : "\\";
}
function SuperStrip($str, $inverse = false)
{
$str = $inverse ? str_replace("%5C","\\",$str) : str_replace("\\","%5C",$str);
return stripslashes($str);
}
$skip_step = false;
require_once($pathtoroot.$admin."/install/inst_ado.php");
$helpURL = $rootURL.$admin.'/help/install_help.php?destform=popup&help_usage=install';
?>
<html>
<head>
<title>In-Portal Installation</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Notepad">
<link rel="stylesheet" type="text/css" href="include/style.css">
<LINK REL="stylesheet" TYPE="text/css" href="install/2col.css">
<SCRIPT LANGUAGE="JavaScript1.2">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function swap(imgid, src){
var ob = document.getElementById(imgid);
ob.src = 'images/' + src;
}
function Continue() {
document.iform1.submit();
}
function CreatePopup(window_name, url, width, height)
{
// creates a popup window & returns it
if(url == null && typeof(url) == 'undefined' ) url = '';
if(width == null && typeof(width) == 'undefined' ) width = 750;
if(height == null && typeof(height) == 'undefined' ) height = 400;
return window.open(url,window_name,'width='+width+',height='+height+',status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no');
}
function ShowHelp(section)
{
var frm = document.getElementById('help_form');
frm.section.value = section;
frm.method = 'POST';
CreatePopup('HelpPopup','<?php echo $rootURL.$admin; ?>/help/blank.html'); // , null, 600);
frm.target = 'HelpPopup';
frm.submit();
}
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="height: 100%">
<form name="help_form" id="help_form" action="<?php echo $helpURL; ?>" method="post"><input type="hidden" id="section" name="section" value=""></form>
<form enctype="multipart/form-data" name="iform1" id="iform1" method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr>
<td height="90">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="90">
<tr>
- <td rowspan="3" valign="top"><a href="http://www.in-portal.net" target="_top"><img alt="In-portal" src="images/globe.gif" width="84" height="91" border="0"></a></td>
- <td rowspan="3" valign="top"><a href="http://www.in-portal.net" target="_top"><img alt="In-portal" src="images/logo.gif" width="150" height="91" border="0"></a></td>
+ <td rowspan="3" valign="top"><a href="http://www.in-portal.net" target="_top"><img title="In-portal" src="images/globe.gif" width="84" height="91" border="0"></a></td>
+ <td rowspan="3" valign="top"><a href="http://www.in-portal.net" target="_top"><img title="In-portal" src="images/logo.gif" width="150" height="91" border="0"></a></td>
<td rowspan="3" width="100000" align="right">&nbsp;</td>
- <td width="400"><img alt="" src="images/blocks.gif" width="400" height="73"></td>
+ <td width="400"><img title="" src="images/blocks.gif" width="400" height="73"></td>
</tr>
- <tr><td align="right" background="images/version_bg.gif" class="head_version" valign="top"><img alt="" src="images/spacer.gif" width="1" height="14">In-Portal Version <?php echo GetMaxPortalVersion($pathtoroot.$admin)?>: English US</td></tr>
- <tr><td><img alt="" src="images/blocks2.gif" width="400" height="2"><br></td></tr>
- <tr><td bgcolor="black" colspan="4"><img alt="" src="images/spacer.gif" width="1" height="1"><br></td></tr>
+ <tr><td align="right" background="images/version_bg.gif" class="head_version" valign="top"><img title="" src="images/spacer.gif" width="1" height="14">In-Portal Version <?php echo GetMaxPortalVersion($pathtoroot.$admin)?>: English US</td></tr>
+ <tr><td><img title="" src="images/blocks2.gif" width="400" height="2"><br></td></tr>
+ <tr><td bgcolor="black" colspan="4"><img title="" src="images/spacer.gif" width="1" height="1"><br></td></tr>
</table>
</td>
</tr>
<?php
require_once($pathtoroot."kernel/include/adodb/adodb.inc.php");
if(!strlen($state))
$state = @$_POST["state"];
//echo $state;
if(strlen($state)==0)
{
$ado =& inst_GetADODBConnection();
$installed = $ado ? TableExists($ado,"ConfigurationAdmin,Category,Permissions") : false;
if(!minimum_php_version("4.1.2"))
{
$general_error = "You have version ".phpversion()." - please upgrade!";
//die();
}
if(!$write_access)
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "Install cannot write to config.php in the root directory of your in-portal installation ($pathtoroot).";
//die();
}
if(!is_writable($pathtoroot."themes/"))
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "In-portal's Theme directory must be writable (".$pathtoroot."themes/).";
//die();
}
if(!is_writable($pathtoroot."kernel/images/"))
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "In-portal's Image Upload directory must be writable (".$pathtoroot."kernel/images/).";
//die();
}
if(!is_writable($pathtoroot."kernel/images/pending"))
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "In-portal's Pending Image Upload directory must be writable (".$pathtoroot."kernel/images/pending).";
//die();
}
if(!is_writable($pathtoroot."admin/backupdata/"))
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "In-portal's Backup directory must be writable (".$pathtoroot."admin/backupdata/).";
//die();
}
if(!is_writable($pathtoroot."admin/export/"))
{
if ($general_error != '') {
$general_error .= '<br /><br />';
}
$general_error .= "In-portal's Exportd directory must be writable (".$pathtoroot."admin/export/).";
//die();
}
if($installed)
{
$state="reinstall";
}
else {
$state="dbinfo";
}
}
if($state=="reinstall_process")
{
$login_err_mesg = ''; // always init vars before use
if( !isset($g_License) ) $g_License = '';
$lic = base64_decode($g_License);
if(strlen($lic))
{
a83570933e44bc66b31dd7127cf3f23a($lic);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
}
$LoggedIn = FALSE;
if($_POST["UserName"]=="root")
{
$ado =& inst_GetADODBConnection();
$sql = "SELECT * FROM ".$g_TablePrefix."ConfigurationValues WHERE VariableName='RootPass'";
$rs = $ado->Execute($sql);
if($rs && !$rs->EOF)
{
$RootPass = $rs->fields["VariableValue"];
if(strlen($RootPass)>0)
$LoggedIn = ($RootPass==md5($_POST["UserPass"]));
}
}
else
{
$act = '';
if (ConvertVersion($g_InPortal) >= ConvertVersion("1.0.5")) {
$act = 'check';
}
$rfile = @fopen(GET_LICENSE_URL."?login=".md5($_POST['UserName'])."&password=".md5($_POST['UserPass'])."&action=$act&license_code=".base64_encode($g_LicenseCode)."&version=".GetMaxPortalVersion($pathtoroot.$admin)."&domain=".base64_encode($_SERVER['HTTP_HOST']), "r");
if (!$rfile) {
$login_err_mesg = "Unable to connect to the Intechnic server!";
$LoggedIn = false;
}
else {
$rcontents = '';
while (!feof($rfile)) {
$line = fgets($rfile, 10000);
$rcontents .= $line;
}
@fclose($rfile);
if (substr($rcontents, 0, 5) == 'Error') {
$login_err_mesg = substr($rcontents, 6);
$LoggedIn = false;
}
else {
$LoggedIn = true;
}
}
//$LoggedIn = ($i_User == $_POST["UserName"] && ($i_Pswd == $_POST["UserPass"]) && strlen($i_User)>0) || strlen($i_User)==0;
}
if($LoggedIn)
{
if (!(int)$_POST["inp_opt"]) {
$state="reinstall";
$inst_error = "Please select one of the options above!";
}
else {
switch((int)$_POST["inp_opt"])
{
case 0:
$inst_error = "Please select an option above";
break;
case 1:
/* clean out all tables */
$install_type = 4;
$ado =& inst_GetADODBConnection();
$filename = $pathtoroot.$admin."/install/inportal_remove.sql";
RunSchemaFile($ado,$filename);
// removing other tables
$tables = $ado->MetaTables();
foreach($tables as $tab_name) {
if (stristr($tab_name, $g_TablePrefix."ses_")) {
$sql = "DROP TABLE IF EXISTS $tab_name";
$ado->Execute($sql);
}
}
/* run install again */
$state="license";
break;
case 2:
$install_type = 3;
$state="dbinfo";
break;
case 3:
$install_type = 5;
$state="license";
break;
case 4:
$install_type = 6;
/* clean out all tables */
$ado =& inst_GetADODBConnection();
//$filename = $pathtoroot.$admin."/install/inportal_remove.sql";
//RunSchemaFile($ado,$filename);
/* run install again */
$state="restore_select";
break;
case 5:
$install_type = 7;
/* change DB config */
$state="db_reconfig";
break;
case 6:
$install_type = 8;
$state = "upgrade";
break;
case 7:
$install_type = 9;
$state = "fix_paths";
break;
}
}
}
else
{
$state="reinstall";
$login_error = $login_err_mesg;//"Invalid Username or Password - Try Again";
}
}
if ($state == "upgrade") {
$ado =& inst_GetADODBConnection();
$Modules = array();
$Texts = array();
if (ConvertVersion(GetMaxPortalVersion($pathtoroot.$admin)) >= ConvertVersion("1.0.5") && ($g_LicenseCode == '' && $g_License != '')) {
$state = 'reinstall';
$inst_error = "Your license must be updated before you can upgrade. Please don't use 'Existing License' option, instead either Download from Intechnic or Upload a new license file!";
}
else {
$sql = "SELECT Name, Version FROM ".$g_TablePrefix."Modules ORDER BY LoadOrder asc";
$rs = $ado->Execute($sql);
$i = 0;
while ($rs && !$rs->EOF) {
$p = strtolower($rs->fields['Name']);
if ($p == 'in-portal') {
$p = '';
}
$dir_name = $pathtoroot.$p."/admin";///install/upgrades/";
if($rs->fields['Version']!=$newver=GetMaxPortalVersion($dir_name))
{
////////////////////
$mod_name = strtolower($rs->fields['Name']);
$current_version = $rs->fields['Version'];
if ($mod_name == 'in-portal')$mod_name = '';
$dir_name = $pathtoroot.$mod_name."/admin/install/upgrades/";
$dir = @dir($dir_name);
$upgrades_arr = Array();
$new_version = '';
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file)) {
if (strstr($file, 'inportal_check_v')) {
$upgrades_arr[] = $file;
}
}
}
usort($upgrades_arr, "VersionSort");
$result=0;
$failCheck=1;
$stopCheck=2;
$CheckErrors = Array();
foreach($upgrades_arr as $file)
{
$file_tmp = str_replace("inportal_check_v", "", $file);
$file_tmp = str_replace(".php", "", $file_tmp);
if (ConvertVersion($file_tmp) > ConvertVersion($current_version)) {
$filename = $pathtoroot.$mod_name."/admin/install/upgrades/$file";
if(file_exists($filename))
{
include($filename);
if($result&2)break;
}
}
}
////////////////////
$Modules[] = Array('module'=>$rs->fields['Name'],'curver'=>$rs->fields['Version'],'newver'=>$newver,'error'=>$result!='pass');
// $Texts[] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".GetMaxPortalVersion($dir_name).")";
}
/*$dir = @dir($dir_name);
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file))
{
if (strstr($file, 'inportal_upgrade_v')) {
$file = str_replace("inportal_upgrade_v", "", $file);
$file = str_replace(".sql", "", $file);
//$sql = "SELECT count(*) AS count FROM ".$g_TablePrefix."Modules WHERE Name = '".$rs->fields['Name']."' AND Version = '$file'";
//$rs1 = $ado->Execute($sql);
if ($rs1->fields['count'] == 0 && ConvertVersion($file) > ConvertVersion($rs->fields['Version'])) {
if ($Modules[$i-1] == $rs->fields['Name']) {
$Texts[$i-1] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".$file.")";
$i--;
}
else {
$Texts[$i] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".$file.")";
$Modules[$i] = $rs->fields['Name'];
}
$i++;
}
}
}
}*/
$rs->MoveNext();
}
$include_file = $pathtoroot.$admin."/install/upgrade.php";
}
}
if ($state == "upgrade_process") {
$ado =& inst_GetADODBConnection();
$mod_arr = $_POST['modules'];
$mod_str = '';
foreach ($mod_arr as $tmp_mod) {
$mod_str .= "'$tmp_mod',";
}
$mod_str = substr($mod_str, 0, strlen($mod_str) - 1);
$sql = "SELECT Name FROM ".$g_TablePrefix."Modules WHERE Name IN ($mod_str) ORDER BY LoadOrder";
$rs = $ado->Execute($sql);
$mod_arr = array();
while ($rs && !$rs->EOF) {
$mod_arr[] = $rs->fields['Name'];
$rs->MoveNext();
}
foreach($mod_arr as $p)
{
$mod_name = strtolower($p);
$sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = '$p'";
$rs = $ado->Execute($sql);
$current_version = $rs->fields['Version'];
if ($mod_name == 'in-portal') {
$mod_name = '';
}
$dir_name = $pathtoroot.$mod_name."/admin/install/upgrades/";
$dir = @dir($dir_name);
$upgrades_arr = Array();
$new_version = '';
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file)) {
if (strstr($file, 'inportal_upgrade_v')) {
$upgrades_arr[] = $file;
}
}
}
usort($upgrades_arr, "VersionSort");
foreach($upgrades_arr as $file) {
$file_tmp = str_replace("inportal_upgrade_v", "", $file);
$file_tmp = str_replace(".sql", "", $file_tmp);
if (ConvertVersion($file_tmp) > ConvertVersion($current_version)) {
$filename = $pathtoroot.$mod_name."/admin/install/upgrades/$file";
//echo "Running: $filename<br>";
if(file_exists($filename))
{
RunSQLFile($ado, $filename);
}
}
}
set_ini_value("Module Versions", $p, GetMaxPortalVersion($pathtoroot.$mod_name."/admin/"));
save_values();
}
$state = 'languagepack_upgrade';
}
// upgrade language pack
if($state=='languagepack_upgrade')
{
$state = 'lang_install_init';
$_POST['lang'][] = 'english.lang';
$force_finish = true;
}
if ($state == 'fix_paths') {
$ado = inst_GetADODBConnection();
$sql = "SELECT * FROM ".$g_TablePrefix."ConfigurationValues WHERE VariableName = 'Site_Name' OR VariableName LIKE '%Path%'";
$path_rs = $ado->Execute($sql);
$include_file = $pathtoroot.$admin."/install/fix_paths.php";
}
if ($state == 'fix_paths_process') {
$ado = inst_GetADODBConnection();
//$state = 'fix_paths';
//$include_file = $pathtoroot.$admin."/install/fix_paths.php";
foreach($_POST["values"] as $key => $value) {
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '".$value."' WHERE VariableName = '".$key."'";
$ado->Execute($sql);
}
$state = "finish";
}
if($state=="db_reconfig_save")
{
$ini_vars = inst_parse_portal_ini($ini_file,TRUE);
foreach($ini_vars as $secname => $section)
{
foreach($section as $key => $value)
{
$key = "g_".str_replace("-", "", $key);
global $$key;
$$key = $value;
}
}
unset($ado);
$ado = VerifyDB('db_reconfig', 'finish', 'SaveDBConfig', true);
}
if($state=="db_reconfig")
{
$include_file = $pathtoroot.$admin."/install/db_reconfig.php";
}
if($state=="restore_file")
{
if($_POST["submit"]=="Update")
{
$filepath = $_POST["backupdir"];
$state="restore_select";
}
else
{
$filepath = stripslashes($_POST['backupdir']);
$backupfile = $filepath.$path_char.str_replace('(.*)', $_POST['backupdate'], BACKUP_NAME);
if(file_exists($backupfile) && is_readable($backupfile))
{
$ado =& inst_GetADODBConnection();
$show_warning = false;
if (!$_POST['warning_ok']) {
// Here we comapre versions between backup and config
$file_contents = file_get_contents($backupfile);
$file_tmp_cont = explode("#------------------------------------------", $file_contents);
$tmp_vers = $file_tmp_cont[0];
$vers_arr = explode(";", $tmp_vers);
$ini_values = inst_parse_portal_ini($ini_file);
foreach ($ini_values as $key => $value) {
foreach ($vers_arr as $k) {
if (strstr($k, $key)) {
if (!strstr($k, $value)) {
$show_warning = true;
}
}
}
}
//$show_warning = true;
}
if (!$show_warning) {
$filename = $pathtoroot.$admin.$path_char.'install'.$path_char.'inportal_remove.sql';
RunSchemaFile($ado,$filename);
$state="restore_run";
}
else {
$state = "warning";
$include_file = $pathtoroot.$admin."/install/warning.php";
}
}
else {
if ($_POST['backupdate'] != '') {
$include_file = $pathtoroot.$admin."/install/restore_select.php";
$restore_error = "$backupfile not found or could not be read";
}
else {
$include_file = $pathtoroot.$admin."/install/restore_select.php";
$restore_error = "No backup selected!!!";
}
}
}
//echo $restore_error;
}
if($state=="restore_select")
{
if( isset($_POST['backupdir']) ) $filepath = stripslashes($_POST['backupdir']);
$include_file = $pathtoroot.$admin."/install/restore_select.php";
}
if($state=="restore_run")
{
$ado =& inst_GetADODBConnection();
$FileOffset = (int)$_GET["Offset"];
if(!strlen($backupfile))
$backupfile = SuperStrip($_GET['File'], true);
$include_file = $pathtoroot.$admin."/install/restore_run.php";
}
if($state=="db_config_save")
{
set_ini_value("Database", "DBType",$_POST["ServerType"]);
set_ini_value("Database", "DBHost",$_POST["ServerHost"]);
set_ini_value("Database", "DBName",$_POST["ServerDB"]);
set_ini_value("Database", "DBUser",$_POST["ServerUser"]);
set_ini_value("Database", "DBUserPassword",$_POST["ServerPass"]);
set_ini_value("Database","TablePrefix",$_POST["TablePrefix"]);
save_values();
$ini_vars = inst_parse_portal_ini($ini_file,TRUE);
foreach($ini_vars as $secname => $section)
{
foreach($section as $key => $value)
{
$key = "g_".str_replace("-", "", $key);
global $$key;
$$key = $value;
}
}
unset($ado);
$ado = VerifyDB('dbinfo', 'license');
}
if($state=="dbinfo")
{
if ($install_type == '') {
$install_type = 1;
}
$include_file = $pathtoroot.$admin."/install/dbinfo.php";
}
if ($state == "download_license") {
$ValidLicense = FALSE;
$lic_login = isset($_POST['login']) ? $_POST['login'] : '';
$lic_password = isset($_POST['password']) ? $_POST['password'] : '';
if ($lic_login != '' && $lic_password != '') {
// Here we determine weather login is ok & check available licenses
$rfile = @fopen(GET_LICENSE_URL."?login=".md5($_POST['login'])."&password=".md5($_POST['password'])."&version=".GetMaxPortalVersion($pathtoroot.$admin)."&domain=".base64_encode($_SERVER['HTTP_HOST']), "r");
if (!$rfile) {
$get_license_error = "Unable to connect to the Intechnic server! Please try again later!";
$state = "get_license";
$include_file = $pathtoroot.$admin."/install/get_license.php";
}
else {
$rcontents = '';
while (!feof($rfile)) {
$line = fgets($rfile, 10000);
$rcontents .= $line;
}
@fclose($rfile);
if (substr($rcontents, 0, 5) == 'Error') {
$get_license_error = substr($rcontents, 6);
$state = "get_license";
$include_file = $pathtoroot.$admin."/install/get_license.php";
}
else {
if (substr($rcontents, 0, 3) == "SEL") {
$state = "download_license";
$license_select = substr($rcontents, 4);
$include_file = $pathtoroot.$admin."/install/download_license.php";
}
else {
// Here we get one license
$tmp_data = explode('Code==:', $rcontents);
$data = base64_decode(str_replace("In-Portal License File - do not edit!\n", "", $tmp_data[0]));
a83570933e44bc66b31dd7127cf3f23a($data);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
if($ValidLicense)
{
set_ini_value("Intechnic","License",base64_encode($data));
set_ini_value("Intechnic","LicenseCode",$tmp_data[1]);
save_values();
$state="domain_select";
$got_license = 1;
}
else {
$license_error="Invalid License File";
}
if(!$ValidLicense)
{
$state="license";
}
}
}
}
}
else if ($_POST['licenses'] == '') {
$state = "get_license";
$get_license_error = "Username and / or password not specified!!!";
$include_file = $pathtoroot.$admin."/install/get_license.php";
}
else {
// Here we download license
$rfile = @fopen(GET_LICENSE_URL."?license_id=".md5($_POST['licenses'])."&dlog=".md5($_POST['dlog'])."&dpass=".md5($_POST['dpass'])."&version=".GetMaxPortalVersion($pathtoroot.$admin)."&domain=".base64_encode($_POST['domain']), "r");
if (!$rfile) {
$get_license_error = "Unable to connect to the Intechnic server! Please try again later!";
$state = "get_license";
$include_file = $pathtoroot.$admin."/install/get_license.php";
}
else {
$rcontents = '';
while (!feof($rfile)) {
$line = fgets($rfile, 10000);
$rcontents .= $line;
}
@fclose($rfile);
if (substr($rcontents, 0, 5) == 'Error') {
$download_license_error = substr($rcontents, 6);
$state = "download_license";
$include_file = $pathtoroot.$admin."/install/download_license.php";
}
else {
$tmp_data = explode('Code==:', $rcontents);
$data = base64_decode(str_replace("In-Portal License File - do not edit!\n", "", $tmp_data[0]));
a83570933e44bc66b31dd7127cf3f23a($data);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
if($ValidLicense)
{
set_ini_value("Intechnic","License",base64_encode($data));
// old licensing script doen't return 2nd parameter (licanse code)
if( isset($tmp_data[1]) ) set_ini_value("Intechnic","LicenseCode",$tmp_data[1]);
save_values();
$state="domain_select";
}
else {
$license_error="Invalid License File";
}
if(!$ValidLicense)
{
$state="license";
}
}
}
}
}
if($state=="license_process")
{
$ValidLicense = FALSE;
$tmp_lic_opt = GetVar('lic_opt', true);
switch($tmp_lic_opt)
{
case 1: /* download from intechnic */
$include_file = $pathtoroot.$admin."/install/get_license.php";
$state = "get_license";
//if(!$ValidLicense)
//{
// $state="license";
//}
break;
case 2: /* upload file */
$file = $_FILES["licfile"];
if(is_array($file))
{
move_uploaded_file($file["tmp_name"],$pathtoroot."themes/tmp.lic");
@chmod($pathtoroot."themes/tmp.lic", 0666);
$fp = @fopen($pathtoroot."themes/tmp.lic","rb");
if($fp)
{
$lic = fread($fp,filesize($pathtoroot."themes/tmp.lic"));
fclose($fp);
}
$tmp_data = ae666b1b8279502f4c4b570f133d513e(FALSE,$pathtoroot."themes/tmp.lic");
$data = $tmp_data[0];
@unlink($pathtoroot."themes/tmp.lic");
a83570933e44bc66b31dd7127cf3f23a($data);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
if($ValidLicense)
{
set_ini_value("Intechnic","License",base64_encode($data));
set_ini_value("Intechnic","LicenseCode",$tmp_data[1]);
save_values();
$state="domain_select";
}
else
$license_error="Invalid License File";
}
if(!$ValidLicense)
{
$state="license";
}
break;
case 3: /* existing */
if(strlen($g_License))
{
$lic = base64_decode($g_License);
a83570933e44bc66b31dd7127cf3f23a($lic);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
if($ValidLicense)
{
$state="domain_select";
}
else
{
$state="license";
$license_error="Invalid or corrupt license detected";
}
}
else
{
$state="license";
$license_error="Missing License File";
}
if(!$ValidLicense)
{
$state="license";
}
break;
case 4:
//set_ini_value("Intechnic","License",base64_encode("local"));
//set_ini_value("Intechnic","LicenseCode",base64_encode("local"));
//save_values();
$state="domain_select";
break;
}
if($ValidLicense)
$state="domain_select";
}
if($state=="license")
{
$include_file = $pathtoroot.$admin."/install/sel_license.php";
}
if($state=="reinstall")
{
$ado =& inst_GetADODBConnection();
$show_upgrade = false;
$sql = "SELECT Name FROM ".$g_TablePrefix."Modules";
$rs = $ado->Execute($sql);
$modules = '';
while ($rs && !$rs->EOF) {
$modules .= strtolower($rs->fields['Name']).',';
$rs->MoveNext();
}
$mod_arr = explode(",", substr($modules, 0, strlen($modules) - 1));
foreach($mod_arr as $p)
{
if ($p == 'in-portal') {
$p = '';
}
$dir_name = $pathtoroot.$p."/admin/install/upgrades/";
$dir = @dir($dir_name);
//echo "<pre>"; print_r($dir); echo "</pre>";
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file))
{
if (strstr($file, 'inportal_upgrade_v')) {
$file = str_replace("inportal_upgrade_v", "", $file);
$file = str_replace(".sql", "", $file);
if ($p == '') {
$p = 'in-portal';
}
$sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = '".$p."'";
$rs = $ado->Execute($sql);
if (ConvertVersion($rs->fields['Version']) < ConvertVersion($file)) {
$show_upgrade = true;
}
}
}
}
}
if ( !isset($install_type) || $install_type == '') {
$install_type = 2;
}
$include_file = $pathtoroot.$admin."/install/reinstall.php";
}
if($state=="login")
{
$lic = base64_decode($g_License);
if(strlen($lic))
{
a83570933e44bc66b31dd7127cf3f23a($lic);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
}
if(!$ValidLicense)
{
$state="license";
}
else
if($i_User == $_POST["UserName"] || $i_Pswd == $_POST["UserPass"])
{
$state = "domain_select";
}
else
{
$state="getuser";
$login_error = "Invalid User Name or Password. If you don't know your username or password, contact Intechnic Support";
}
//die();
}
if($state=="getuser")
{
$include_file = $pathtoroot.$admin."/install/login.php";
}
if($state=="set_domain")
{
if( !is_array($i_Keys) || !count($i_Keys) )
{
$lic = base64_decode($g_License);
if(strlen($lic))
{
a83570933e44bc66b31dd7127cf3f23a($lic);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
}
}
if($_POST["domain"]==1)
{
$domain = $_SERVER['HTTP_HOST'];
if (strstr($domain, $i_Keys[0]['domain']) || de3ec1b7a142cccd0d51f03d24280744($domain)) {
set_ini_value("Intechnic","Domain",$domain);
save_values();
$state="runsql";
}
else {
$DomainError = 'Domain name selected does not match domain name in the license!';
$state = "domain_select";
}
}
else
{
$domain = str_replace(" ", "", $_POST["other"]);
if ($domain != '') {
if (strstr($domain, $i_Keys[0]['domain']) || de3ec1b7a142cccd0d51f03d24280744($domain)) {
set_ini_value("Intechnic","Domain",$domain);
save_values();
$state="runsql";
}
else {
$DomainError = 'Domain name entered does not match domain name in the license!';
$state = "domain_select";
}
}
else {
$DomainError = 'Please enter valid domain!';
$state = "domain_select";
}
}
}
if($state=="domain_select")
{
if(!is_array($i_Keys))
{
$lic = base64_decode($g_License);
if(strlen($lic))
{
a83570933e44bc66b31dd7127cf3f23a($lic);
$ValidLicense = ((strlen($i_User)>0) && (strlen($i_Pswd)>0));
}
}
$include_file = $pathtoroot.$admin."/install/domain.php";
}
if($state=="runsql")
{
$ado =& inst_GetADODBConnection();
$installed = TableExists($ado,"ConfigurationAdmin,Category,Permissions");
if(!$installed)
{
// create tables
$filename = $pathtoroot.$admin."/install/inportal_schema.sql";
RunSchemaFile($ado,$filename);
// insert default info
$filename = $pathtoroot.$admin."/install/inportal_data.sql";
RunSQLFile($ado,$filename);
$sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = 'In-Portal'";
$rs = $ado->Execute($sql);
set_ini_value("Module Versions", "In-Portal", $rs->fields['Version']);
save_values();
require_once $pathtoroot.'kernel/include/tag-class.php';
if( !is_object($objTagList) ) $objTagList = new clsTagList();
// install kernel specific tags
$objTagList->DeleteTags(); // delete all existing tags in db
// create 3 predifined tags (because there no functions with such names
$t = new clsTagFunction();
$t->Set("name","include");
$t->Set("description","insert template output into the current template");
$t->Create();
$t->AddAttribute("_template","tpl","Template to insert","",TRUE);
$t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
$t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
$t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
unset($t);
$t = new clsTagFunction();
$t->Set("name","perm_include");
$t->Set("description","insert template output into the current template if permissions are set");
$t->Create();
$t->AddAttribute("_template","tpl","Template to insert","",TRUE);
$t->AddAttribute("_noaccess","tpl","Template to insert if access is denied","",FALSE);
$t->AddAttribute("_permission","","Comma-separated list of permissions, any of which will grant access","",FALSE);
$t->AddAttribute("_module","","Used in place of the _permission attribute, this attribute verifies the module listed is enabled","",FALSE);
$t->AddAttribute("_system","bool","Must be set to true if any permissions in _permission list is a system permission","",FALSE);
$t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
$t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
$t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
unset($t);
$t = new clsTagFunction();
$t->Set("name","mod_include");
$t->Set("description","insert templates from all enabled modules. No error occurs if the template does not exist.");
$t->Create();
$t->AddAttribute("_template","tpl","Template to insert. This template path should be relative to the module template root directory","",TRUE);
$t->AddAttribute("_modules","","Comma-separated list of modules. Defaults to all enabled modules if not set","",FALSE);
$t->AddAttribute("_supresserror","bool","Supress missing template errors","",FALSE);
$t->AddAttribute("_dataexists","bool","Only include template output if content exists (content is defined by the tags in the template)","",FALSE);
$t->AddAttribute("_nodatatemplate","tpl","Template to include if the nodataexists condition is true","",FALSE);
$objTagList->ParseFile($pathtoroot.'kernel/parser.php'); // insert module tags
if( is_array($ItemTagFiles) )
foreach($ItemTagFiles as $file)
$objTagList->ParseItemFile($pathtoroot.$file);
$state="RootPass";
}
else {
$include_file = $pathtoroot.$admin."/install/install_finish.php";
$state="finish";
}
}
if ($state == "finish") {
$ado =& inst_GetADODBConnection();
$PhraseTable = $g_TablePrefix."ImportPhrases";
$EventTable = $g_TablePrefix."ImportEvents";
$ado->Execute("DROP TABLE IF EXISTS $PhraseTable");
$ado->Execute("DROP TABLE IF EXISTS $EventTable");
$include_file = $pathtoroot.$admin."/install/install_finish.php";
}
if($state=="RootSetPass")
{
$pass = $_POST["RootPass"];
if(strlen($pass)<4)
{
$PassError = "Root Password must be at least 4 characters";
$state = "RootPass";
}
else if ($pass != $_POST["RootPassConfirm"]) {
$PassError = "Passwords does not match";
$state = "RootPass";
}
else
{
$pass = md5($pass);
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$pass' WHERE VariableName='RootPass' OR VariableName='RootPassVerify'";
$ado =& inst_GetADODBConnection();
$ado->Execute($sql);
$state="modselect";
}
}
if($state=="RootPass")
{
$include_file = $pathtoroot.$admin."/install/rootpass.php";
}
if($state=="lang_install_init")
{
include_once($pathtoroot."kernel/include/xml.php");
$ado =& inst_GetADODBConnection();
if (TableExists($ado, "Language,Phrase")) {
$MaxInserts = 200;
$PhraseTable = $g_TablePrefix."ImportPhrases";
$EventTable = $g_TablePrefix."ImportEvents";
$sql = "CREATE TABLE $PhraseTable SELECT Phrase,Translation,PhraseType,LanguageId FROM ".$g_TablePrefix."Phrase WHERE PhraseId=-1";
$ado->Execute($sql);
$sql = "CREATE TABLE $EventTable SELECT Template,MessageType,EventId,LanguageId FROM ".$g_TablePrefix."EmailMessage WHERE EmailMessageId=-1";
$ado->Execute($sql);
$sql = "SELECT EventId,Event,Type FROM ".$g_TablePrefix."Events";
$rs = $ado->Execute($sql);
$Events = array();
while($rs && !$rs->EOF)
{
$Events[$rs->fields["Event"]."_".$rs->fields["Type"]] = $rs->fields["EventId"];
$rs->MoveNext();
}
if(count($_POST["lang"])>0)
{
$Langs = $_POST["lang"];
for($x=0;$x<count($Langs);$x++)
{
$lang = $Langs[$x];
$p = $pathtoroot.$admin."/install/langpacks/".$lang;
/* parse xml file */
$fp = fopen($p,"r");
$xml = fread($fp,filesize($p));
fclose($fp);
unset($objInXML);
$objInXML = new xml_doc($xml);
$objInXML->parse();
$objInXML->getTag(0,$name,$attribs,$contents,$tags);
if(is_array($tags))
{
foreach($tags as $t)
{
$LangRoot =& $objInXML->getTagByID($t);
$PackName = $LangRoot->attributes["PACKNAME"];
$l = $objLanguages->GetItemByField("PackName",$PackName);
if(is_object($l))
{
$LangId = $l->Get("LanguageId");
$NewLang = false;
}
else
{
$l = new clsLanguage();
$l->Set("Enabled",1);
$l->Create();
$NewLang = true;
$LangId = $l->Get("LanguageId");
}
foreach($LangRoot->children as $tag)
{
switch($tag->name)
{
case "PHRASES":
foreach($tag->children as $PhraseTag)
{
$Phrase = $ado->qstr($PhraseTag->attributes["LABEL"]);
$Translation = $ado->qstr(base64_decode($PhraseTag->contents));
$PhraseType = $PhraseTag->attributes["TYPE"];
$psql = "INSERT INTO $PhraseTable (Phrase,Translation,PhraseType,LanguageId) VALUES ($Phrase,$Translation,$PhraseType,$LangId)";
$ado->Execute($psql);
//echo "$psql <br>\n";
}
break;
case "DATEFORMAT":
$DateFormat = $tag->contents;
break;
case "TIMEFORMAT":
$TimeFormat = $tag->contents;
break;
case "DECIMAL":
$Decimal = $tag->contents;
break;
case "THOUSANDS":
$Thousands = $tag->contents;
break;
case "EVENTS":
foreach($tag->children as $EventTag)
{
$event = $EventTag->attributes["EVENT"];
$MsgType = strtolower($EventTag->attributes["MESSAGETYPE"]);
$template = base64_decode($EventTag->contents);
$Type = $EventTag->attributes["TYPE"];
$EventId = $Events[$event."_".$Type];
$esql = "INSERT INTO $EventTable (Template,MessageType,EventId,LanguageId) VALUES ('$template','$MsgType',$EventId,$LangId)";
$ado->Execute($esql);
//echo htmlentities($esql)."<br>\n";
}
break;
}
if($NewLang)
{
$l->Set("PackName",$PackName);
$l->Set("LocalName",$PackName);
$l->Set("DateFormat",$DateFormat);
$l->Set("TimeFormat",$TimeFormat);
$l->Set("DecimalPoint",$Decimal);
$l->Set("ThousandSep",$Thousands);
$l->Update();
}
}
}
}
}
$state="lang_install";
}
else {
$state="lang_select";
}
}
else {
$general_error = 'Database error! No language tables found!';
}
}
if($state=="lang_install")
{
/* do pack install */
$Offset = (int)$_GET["Offset"];
$Status = (int)$_GET["Status"];
$PhraseTable = $g_TablePrefix."ImportPhrases";
$EventTable = $g_TablePrefix."ImportEvents";
if($Status==0)
{
$Total = TableCount($PhraseTable,"",0);
}
else
{
$Total = TableCount($EventTable,"",0);
}
if($Status==0)
{
$Offset = $objLanguages->ReadImportTable($PhraseTable, 1,"0,1,2", $force_finish ? false : true, 200,$Offset);
if($Offset>=$Total)
{
$Offset=0;
$Status=1;
}
$next_step = GetVar('next_step', true);
if($force_finish == true) $next_step = 3;
$NextUrl = $_SERVER['PHP_SELF']."?Offset=$Offset&Status=$Status&state=lang_install&next_step=$next_step&install_type=$install_type";
if($force_finish == true) $NextUrl .= '&ff=1';
$include_file = $pathtoroot.$admin."/install/lang_run.php";
}
else
{
if(!is_object($objMessageList))
$objMessageList = new clsEmailMessageList();
$Offset = $objMessageList->ReadImportTable($EventTable, $force_finish ? false : true,100,$Offset);
if($Offset>$Total)
{
$next_step = GetVar('next_step', true);
if($force_finish == true) $next_step = 3;
$NextUrl = $_SERVER['PHP_SELF']."?Offset=$Offset&Status=$Status&State=lang_install&next_step=$next_step&install_type=$install_type";
if($force_finish == true) $NextUrl .= '&ff=1';
$include_file = $pathtoroot.$admin."/install/lang_run.php";
}
else
{
$db =&GetADODBConnection();
$prefix = $g_TablePrefix;
$db->Execute('DROP TABLE IF EXISTS '.$prefix.'ImportPhrases');
$db->Execute('DROP TABLE IF EXISTS '.$prefix.'ImportEvents');
if( !$force_finish )
{
$state = 'lang_default';
}
else
{
$_POST['next_step'] = 4;
$state = 'finish';
$include_file = $pathtoroot.$admin."/install/install_finish.php";
}
}
}
}
if($state=="lang_default_set")
{
// phpinfo(INFO_VARIABLES);
/*$ado =& inst_GetADODBConnection();
$PhraseTable = GetTablePrefix()."ImportPhrases";
$EventTable = GetTablePrefix()."ImportEvents";
$ado->Execute("DROP TABLE IF EXISTS $PhraseTable");
$ado->Execute("DROP TABLE IF EXISTS $EventTable");*/
$Id = $_POST["lang"];
$objLanguages->SetPrimary($Id);
$state="postconfig_1";
}
if($state=="lang_default")
{
$Packs = Array();
$objLanguages->Clear();
$objLanguages->LoadAllLanguages();
foreach($objLanguages->Items as $l)
{
$Packs[$l->Get("LanguageId")] = $l->Get("PackName");
}
$include_file = $pathtoroot.$admin."/install/lang_default.php";
}
if($state=="modinstall")
{
$doms = $_POST["domain"];
if(is_array($doms))
{
$ado =& inst_GetADODBConnection();
require_once $pathtoroot.'kernel/include/tag-class.php';
if( !isset($objTagList) || !is_object($objTagList) ) $objTagList = new clsTagList();
foreach($doms as $p)
{
$filename = $pathtoroot.$p.'/admin/install.php';
if(file_exists($filename) )
{
include($filename);
}
}
}
/* $sql = "SELECT Name FROM ".GetTablePrefix()."Modules";
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$p = $rs->fields['Name'];
$mod_name = strtolower($p);
if ($mod_name == 'in-portal') {
$mod_name = '';
}
$dir_name = $pathtoroot.$mod_name."/admin/install/upgrades/";
$dir = @dir($dir_name);
$new_version = '';
$tmp1 = 0;
$tmp2 = 0;
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file))
{
$file = str_replace("inportal_upgrade_v", "", $file);
$file = str_replace(".sql", "", $file);
if ($file != '' && !strstr($file, 'changelog') && !strstr($file, 'readme')) {
$tmp1 = str_replace(".", "", $file);
if ($tmp1 > $tmp2) {
$new_version = $file;
}
}
}
$tmp2 = $tmp1;
}
$version_nrs = explode(".", $new_version);
for ($i = 0; $i < $version_nrs[0] + 1; $i++) {
for ($j = 0; $j < $version_nrs[1] + 1; $j++) {
for ($k = 0; $k < $version_nrs[2] + 1; $k++) {
$try_version = "$i.$j.$k";
$filename = $pathtoroot.$mod_name."/admin/install/upgrades/inportal_upgrade_v$try_version.sql";
if(file_exists($filename))
{
RunSQLFile($ado, $filename);
set_ini_value("Module Versions", $p, $try_version);
save_values();
}
}
}
}
$rs->MoveNext();
}
*/
$state="lang_select";
}
if($state=="modselect")
{
/* /admin/install.php */
$UrlLen = (strlen($admin) + 12)*-1;
$pathguess =substr($_SERVER["SCRIPT_NAME"],0,$UrlLen);
$sitepath = $pathguess;
$esc_path = str_replace("\\","/",$pathtoroot);
$esc_path = str_replace("/","\\",$esc_path);
//set_ini_value("Site","DomainName",$_SERVER["HTTP_HOST"]);
//$g_DomainName= $_SERVER["HTTP_HOST"];
save_values();
$ado =& inst_GetADODBConnection();
if(substr($sitepath,0,1)!="/")
$sitepath="/".$sitepath;
if(substr($sitepath,-1)!="/")
$sitepath .= "/";
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$sitepath' WHERE VariableName='Site_Path'";
$ado->Execute($sql);
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$g_Domain' WHERE VariableName='Server_Name'";
$ado->Execute($sql);
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '".$_SERVER['DOCUMENT_ROOT'].$sitepath."admin/backupdata' WHERE VariableName='Backup_Path'";
$ado->Execute($sql);
$Modules = a48d819089308a9aeb447e7248b2587f();
if (count($Modules) > 0) {
$include_file = $pathtoroot.$admin."/install/modselect.php";
}
else {
$state = "lang_select";
$skip_step = true;
}
}
if($state=="lang_select")
{
$Packs = GetLanguageList();
$include_file = $pathtoroot.$admin."/install/lang_select.php";
}
if(substr($state,0,10)=="postconfig")
{
$p = explode("_",$state);
$step = $p[1];
if ($_POST['Site_Path'] != '') {
$sql = "SELECT Name, Version FROM ".$g_TablePrefix."Modules";
$rs = $ado->Execute($sql);
$modules_str = '';
while ($rs && !$rs->EOF) {
$modules_str .= $rs->fields['Name'].' ('.$rs->fields['Version'].'),';
$rs->MoveNext();
}
$modules_str = substr($modules_str, 0, strlen($modules_str) - 1);
$rfile = @fopen(GET_LICENSE_URL."?url=".base64_encode($_SERVER['HTTP_HOST'].$_POST['Site_Path'])."&modules=".base64_encode($modules_str)."&license_code=".base64_encode($g_LicenseCode)."&version=".GetMaxPortalVersion($pathtoroot.$admin)."&domain=".md5($_SERVER['HTTP_HOST']), "r");
if (!$rfile) {
//$get_license_error = "Unable to connect to the Intechnic server! Please try again later!";
//$state = "postconfig_1";
//$include_file = $pathtoroot.$admin."/install/postconfig.php";
}
else {
$rcontents = '';
while (!feof($rfile)) {
$line = fgets($rfile, 10000);
$rcontents .= $line;
}
@fclose($rfile);
}
}
if(strlen($_POST["oldstate"])>0)
{
$s = explode("_",$_POST["oldstate"]);
$oldstep = $s[1];
if($oldstep<count($configs))
{
$section = $configs[$oldstep];
$module = $mods[$oldstep];
$title = $titles[$oldstep];
$objAdmin = new clsConfigAdmin($module,$section,TRUE);
$objAdmin->SaveItems($_POST,TRUE);
}
}
$section = $configs[$step];
$module = $mods[$step];
$title = $titles[$step];
$step++;
if($step <= count($configs)+1)
{
$include_file = $pathtoroot.$admin."/install/postconfig.php";
}
else
$state = "theme_sel";
}
if($state=="theme_sel")
{
$objThemes->CreateMissingThemes();
$include_file = $pathtoroot.$admin."/install/theme_select.php";
}
if($state=="theme_set")
{
## get & define Non-Blocking & Blocking versions ##
$blocking_sockets = minimum_php_version("4.3.0")? 0 : 1;
$ado =& inst_GetADODBConnection();
$sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$blocking_sockets' WHERE VariableName='SocketBlockingMode'";
$ado->Execute($sql);
## get & define Non-Blocking & Blocking versions ##
$theme_id = $_POST["theme"];
$pathchar="/";
//$objThemes->SetPrimaryTheme($theme_id);
$t = $objThemes->GetItem($theme_id);
$t->Set("Enabled",1);
$t->Set("PrimaryTheme",1);
$t->Update();
$t->VerifyTemplates();
$include_file = $pathtoroot.$admin."/install/install_finish.php";
$state="finish";
}
if ($state == "adm_login") {
echo "<script>window.location='index.php';</script>";
}
// init variables
$vars = Array('db_error','restore_error','PassError','DomainError','login_error','inst_error');
foreach($vars as $var_name) ReSetVar($var_name);
switch($state)
{
case "modselect":
$title = "Select Modules";
$help = "<p>Select the In-Portal modules you wish to install. The modules listed to the right ";
$help .="are all modules included in this installation that are licensed to run on this server. </p>";
break;
case "reinstall":
$title = "Installation Maintenance";
$help = "<p>A Configuration file has been detected on your system and it appears In-Portal is correctly installed. ";
$help .="In order to work with the maintenance functions provided to the left you must provide the Intechnic ";
$help .="Username and Password you used when obtaining the license file residing on the server, or your admin Root password. ";
$help .=" <i>(Use Username 'root' if using your root password)</i></p>";
$help .= "<p>To removing your existing database and start with a fresh installation, select the first option ";
$help .= "provided. Note that this operation cannot be undone and no backups are made! Use at your own risk.</p>";
$help .="<p>If you wish to scrap your current installation and install to a new location, choose the second option. ";
$help .="If this option is selected you will be prompted for new database configuration information.</p>";
$help .="<p>The <i>Update License Information</i> option is used to update your In-Portal license data. Select this option if you have ";
$help .="modified your licensing status with Intechnic, or you have received new license data via email</p>";
$help .="<p>The <i>Fix Paths</i> option should be used when the location of the In-portal files has changed. For example, if you moved them from one folder to another. It will update all settings and ensure the program is operational at the new location.</p>";
break;
case "fix_paths":
$title = "Fix Paths";
$help = "<p>The <i>Fix Paths</i> option should be used when the location of the In-portal files has changed. For example, if you moved them from one folder to another. It will update all settings and ensure the program is operational at the new location.<p>";
break;
case "RootPass":
$title = "Set Admin Root Password";
$help = "<p>The Root Password is initially required to access the admin sections of In-Portal. ";
$help .="The root user cannot be used to access the front-end of the system, so it is recommended that you ";
$help .="create additional users with admin privlidges.</p>";
break;
case "finish":
$title = "Thank You!";
$help ="<P>Thanks for using In-Portal! Be sure to visit <A TARGET=\"_new\" HREF=\"http://www.in-portal.net\">www.in-portal.net</A> ";
$help.=" for the latest news, module releases and support. </p>";
break;
case "license":
$title = "License Configuration";
$help ="<p>A License is required to run In-Portal on a server connected to the Internet. You ";
$help.="can run In-Portal on localhost, non-routable IP addresses, or other computers on your LAN. ";
$help.="If Intechnic has provided you with a license file, upload it here. Otherwise select the first ";
$help.="option to allow Install to download your license for you.</p>";
$help.="<p>If a valid license has been detected on your server, you can choose the <i>Use Existing License</i> ";
$help.="and continue the installation process</p>";
break;
case "domain_select":
$title="Select Licensed Domain";
$help ="<p>Select the domain you wish to configure In-Portal for. The <i>Other</i> option ";
$help.=" can be used to configure In-Portal for use on a local domain.</p>";
$help.="<p>For local domains, enter the hostname or LAN IP Address of the machine running In-Portal.</p>";
break;
case "db_reconfig":
case "dbinfo":
$title="Database Configuration";
$help = "<p>In-Portal needs to connect to your Database Server. Please provide the database server type*, ";
$help .="host name (<i>normally \"localhost\"</i>), Database user name, and database Password. ";
$help .="These fields are required to connect to the database.</p><p>If you would like In-Portal ";
$help .="to use a table prefix, enter it in the field provided. This prefix can be any ";
$help .=" text which can be used in the names of tables on your system. The characters entered in this field ";
$help .=" are placed <i>before</i> the names of the tables used by In-Portal. For example, if you enter \"inp_\"";
$help .=" into the prefix field, the table named Category will be named inp_Category.</p>";
break;
case "lang_select":
$title="Language Pack Installation";
$help = "<p>Select the language packs you wish to install. Each language pack contains all the phrases ";
$help .="used by the In-Portal administration and the default template set. Note that at least one ";
$help .="pack <b>must</b> be installed.</p>";
break;
case "lang_default":
$title="Select Default Language";
$help = "<p>Select which language should be considered the \"default\" language. This is the language ";
$help .="used by In-Portal when a language has not been selected by the user. This selection is applicable ";
$help .="to both the administration and front-end.</p>";
break;
case "lang_install":
$title="Installing Language Packs";
$help = "<p>The language packs you have selected are being installed. You may install more languages at a ";
$help.="later time from the Regional admin section.</p>";
break;
case "postconfig_1":
$help = "<P>These options define the general operation of In-Portal. Items listed here are ";
$help .="required for In-Portal's operation.</p><p>When you have finished, click <i>save</i> to continue.</p>";
break;
case "postconfig_2":
$help = "<P>User Management configuration options determine how In-Portal manages your user base.</p>";
$help .="<p>The groups listed to the right are pre-defined by the installation process and may be changed ";
$help .="through the Groups section of admin.</p>";
break;
case "postconfig_3":
$help = "<P>The options listed here are used to control the category list display functions of In-Portal. </p>";
break;
case "theme_sel":
$title="Select Default Theme";
$help = "<P>This theme will be used whenever a front-end session is started. ";
$help .="If you intend to upload a new theme and use that as default, you can do so through the ";
$help .="admin at a later date. A default theme is required for session management.</p>";
break;
case "get_license":
$title="Download License from Intechnic";
$help ="<p>A License is required to run In-Portal on a server connected to the Internet. You ";
$help.="can run In-Portal on localhost, non-routable IP addresses, or other computers on your LAN.</p>";
$help.="<p>Here as you have selected download license from Intechnic you have to input your username and ";
$help.="password of your In-Business account in order to download all your available licenses.</p>";
break;
case "download_license":
$title="Download License from Intechnic";
$help ="<p>A License is required to run In-Portal on a server connected to the Internet. You ";
$help.="can run In-Portal on localhost, non-routable IP addresses, or other computers on your LAN.</p>";
$help.="<p>Please choose the license from the drop down for this site! </p> ";
break;
case "restore_select":
$title="Select Restore File";
$help = "<P>Select the restore file to use to reinstall In-Portal. If your backups are not performed ";
$help .= "in the default location, you can enter the location of the backup directory and click the ";
$help .="<i>Update</i> button.</p>";
case "restore_run":
$title= "Restore in Progress";
$help = "<P>Restoration of your system is in progress. When the restore has completed, the installation ";
$help .="will continue as normal. Hitting the <i>Cancel</i> button will restart the entire installation process. ";
break;
case "warning":
$title = "Restore in Progress";
$help = "<p>Please approve that you understand that you are restoring your In-Portal data base from other version of In-Portal.</p>";
break;
case "update":
$title = "Update In-Portal";
$help = "<p>Select modules from the list, you need to update to the last downloaded version of In-Portal</p>";
break;
}
$tmp_step = GetVar('next_step', true);
if (!$tmp_step) {
$tmp_step = 1;
}
if ( isset($got_license) && $got_license == 1) {
$tmp_step++;
}
$next_step = $tmp_step + 1;
if ($general_error != '') {
$state = '';
$title = '';
$help = '';
$general_error = $general_error.'<br /><br />Installation cannot continue!';
}
if ($include_file == '' && $general_error == '' && $state == '') {
$state = '';
$title = '';
$help = '';
$filename = $pathtoroot.$admin."/install/inportal_remove.sql";
RunSQLFile($ado,$filename);
$general_error = 'Unexpected installation error! <br /><br />Installation has been stopped!';
}
if ($restore_error != '') {
$next_step = 3;
$tmp_step = 2;
}
if ($PassError != '') {
$tmp_step = 4;
$next_step = 5;
}
if ($DomainError != '') {
$tmp_step--;
$next_step = $tmp_step + 1;
}
if ($db_error != '') {
$tmp_step--;
$next_step = $tmp_step + 1;
}
if ($state == "warning") {
$tmp_step--;
$next_step = $tmp_step + 1;
}
if ($skip_step) {
$tmp_step++;
$next_step = $tmp_step + 1;
}
?>
<tr height="100%">
<td valign="top">
<table cellpadding=10 cellspacing=0 border=0 width="100%" height="100%">
<tr valign="top">
<td style="width: 200px; background: #009ff0 url(images/bg_install_menu.gif) no-repeat bottom right; border-right: 1px solid #000">
- <img src="images/spacer.gif" width="180" height="1" border="0" alt=""><br>
+ <img src="images/spacer.gif" width="180" height="1" border="0" title=""><br>
<span class="admintitle-white">Installation</span>
<!--<ol class="install">
<li class="current">Licence Verification
<li>Configuration
<li>File Permissions
<li>Security
<li>Integrity Check
</ol>
</td>-->
<?php
$lic_opt = isset($_POST['lic_opt']) ? $_POST['lic_opt'] : false;
if ($general_error == '') {
?>
<?php if ($install_type == 1) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1) { ?>class="current"<?php } ?>>Database Configuration
<li <?php if ($tmp_step == 2 || $lic_opt == 1) { ?>class="current"<?php } ?>>Select License
<li <?php if ($tmp_step == 3 && $lic_opt != 1) { ?>class="current"<?php } ?>>Select Domain
<li <?php if ($tmp_step == 4 ) { ?>class="current"<?php } ?>>Set Root Password
<li <?php if ($tmp_step == 5) { ?>class="current"<?php } ?>>Select Modules to Install
<li <?php if ($tmp_step == 6) { ?>class="current"<?php } ?>>Install Language Packs
<li <?php if ($tmp_step == 7) { ?>class="current"<?php } ?>>Post-Install Configuration
<li <?php if ($tmp_step == 8) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 2) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<!--<li <?php if (($tmp_step == 2 && $login_error == '' && $inst_error == '') || $_POST['lic_opt'] == 1) { ?>class="current"<?php } ?>>Select License
<li <?php if ($tmp_step == 3 && $_POST['lic_opt'] != 1) { ?>class="current"<?php } ?>>Select Domain
<li <?php if ($tmp_step == 4) { ?>class="current"<?php } ?>>Set Root Password
<li <?php if ($tmp_step == 5) { ?>class="current"<?php } ?>>Select Modules to Install
<li <?php if ($tmp_step == 6) { ?>class="current"<?php } ?>>Install Language Packs
<li <?php if ($tmp_step == 7) { ?>class="current"<?php } ?>>Post-Install Configuration
<li <?php if ($tmp_step == 8) { ?>class="current"<?php } ?>>Finish-->
</ol>
<?php } else if ($install_type == 3) { ?>
<ol class="install">
<li>License Verification
<li <?php if ($tmp_step == 2) { ?>class="current"<?php } ?>>Database Configuration
<li <?php if ($tmp_step == 3 || $_POST['lic_opt'] == 1) { ?>class="current"<?php } ?>>Select License
<li <?php if ($tmp_step == 4 && $_POST['lic_opt'] != 1) { ?>class="current"<?php } ?>>Select Domain
<li <?php if ($tmp_step == 5) { ?>class="current"<?php } ?>>Set Root Password
<li <?php if ($tmp_step == 6) { ?>class="current"<?php } ?>>Select Modules to Install
<li <?php if ($tmp_step == 7) { ?>class="current"<?php } ?>>Install Language Packs
<li <?php if ($tmp_step == 8) { ?>class="current"<?php } ?>>Post-Install Configuration
<li <?php if ($tmp_step == 9) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 4) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if (($tmp_step == 2 && $login_error == '' && $inst_error == '') || $lic_opt == 1) { ?>class="current"<?php } ?>>Select License
<li <?php if ($tmp_step == 3 && $_POST['lic_opt'] != 1) { ?>class="current"<?php } ?>>Select Domain
<li <?php if ($tmp_step == 4) { ?>class="current"<?php } ?>>Set Root Password
<li <?php if ($tmp_step == 5) { ?>class="current"<?php } ?>>Select Modules to Install
<li <?php if ($tmp_step == 6) { ?>class="current"<?php } ?>>Install Language Packs
<li <?php if ($tmp_step == 7) { ?>class="current"<?php } ?>>Post-Install Configuration
<li <?php if ($tmp_step == 8) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 5) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if (($tmp_step == 2 && $login_error == '' && $inst_error == '') || $lic_opt == 1) { ?>class="current"<?php } ?>>Select License
<li <?php if ($tmp_step == 3 && $lic_opt != 1) { ?>class="current"<?php } ?>>Select Domain
<li <?php if ($tmp_step == 4) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 6) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if (($tmp_step == 2 && $login_error == '' && $inst_error == '') || $_GET['show_prev'] == 1 || $_POST['backupdir']) { ?>class="current"<?php } ?>>Select Backup File
<li <?php if ($tmp_step == 3 && $_POST['lic_opt'] != 1 && $_GET['show_prev'] != 1 && !$_POST['backupdir']) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 7) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if ($tmp_step == 2 && $login_error == '' && $inst_error == '') { ?>class="current"<?php } ?>>Database Configuration
<li <?php if ($tmp_step == 3) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 8) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if ($tmp_step == 2 && $login_error == '' && $inst_error == '') { ?>class="current"<?php } ?>>Select Modules to Upgrade
<li <?php if ($tmp_step == 3) { ?>class="current"<?php } ?>>Language Pack Upgrade
<li <?php if ($tmp_step == 4) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } else if ($install_type == 9) { ?>
<ol class="install">
<li <?php if ($tmp_step == 1 || $login_error != '' || $inst_error != '') { ?>class="current"<?php } ?>>License Verification
<li <?php if ($tmp_step == 2 && $login_error == '' && $inst_error == '') { ?>class="current"<?php } ?>>Fix Paths
<li <?php if ($tmp_step == 3) { ?>class="current"<?php } ?>>Finish
</ol>
<?php } ?>
<?php include($include_file); ?>
<?php } else { ?>
<?php include("install/general_error.php"); ?>
<?php } ?>
<td width="40%" style="border-left: 1px solid #000; background: #f0f0f0">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="subsectiontitle" style="border-bottom: 1px solid #000000; background-color:#999"><?php if( isset($title) ) echo $title;?></td>
</tr>
<tr>
<td class="text"><?php if( isset($help) ) echo $help;?></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="footer">
Powered by In-portal &copy; 1997-2005, Intechnic Corporation. All rights reserved.
- <br><img src="images/spacer.gif" width="1" height="10" alt="">
+ <br><img src="images/spacer.gif" width="1" height="10" title="">
</td>
</tr>
</table>
</form>
</body>
</html>
\ No newline at end of file
Property changes on: trunk/admin/install.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.75
\ No newline at end of property
+1.76
\ No newline at end of property
Index: trunk/admin/listview/columnheader.php
===================================================================
--- trunk/admin/listview/columnheader.php (revision 1509)
+++ trunk/admin/listview/columnheader.php (revision 1510)
@@ -1,147 +1,147 @@
<?php
class clsColumnHeader
{
var $field;
var $label;
var $searchable=1;
var $format="";
var $sortfield=0;
var $asc=1;
var $width="";
var $config_field;
var $config_sortorder;
var $FieldKey;
function clsColumnHeader($Field="",$Label="",$Searchable=1,$sortfield=0,$asc="",$width="",$config_field="",$config_sortorder="")
{
$this->field = $Field;
$this->label = $Label;
$this->searchable = $Searchable;
//$this->format = $Format;
$this->sortfield = $sortfield;
$this->asc=$asc;
$this->width=$width;
$this->config_field = $config_field;
$this->config_sortorder = $config_sortorder;
}
function PrintCol($nowrap)
{
global $adminURL;
if(strlen($this->width)>0)
{
$o = "<TD ".$nowrap.$this->width."\">";
}
else
$o = "<TD ".$nowrap.">";
if($this->sortfield)
{
if($this->asc=="desc")
{
$img_src = $adminURL."/images/list_arrow_dn.gif";
$new_asc = "asc";
}
else
{
$img_src = $adminURL."/images/list_arrow_up.gif";
$new_asc="desc";
}
$o .= "<A href=\"javascript:config_val('".$this->config_sortorder."','".$new_asc."');\" class=\"columntitle_small\">";
}
else
{
$o .= "<A href=\"javascript:config_val('".$this->config_field."','".$this->FieldKey."');\" class=\"columntitle_small\">";
$img_src = $adminURL."/images/list_arrow_rt.gif";
}
- $o .= "<IMG alt=\"\" name=\"imgColField".$this->field."\" src=\"".$img_src."\" border=\"0\" align=\"absmiddle\">";
+ $o .= "<IMG title=\"\" name=\"imgColField".$this->field."\" src=\"".$img_src."\" border=\"0\" align=\"absmiddle\">";
$o .= $this->label."</A></TD>";
return $o;
}
}
class clsColumnHeaderList
{
var $Columns;
var $SortField;
var $SortOrder;
var $nowrap = TRUE;
function clsColumnHeaderList()
{
$this->Columns= array();
$this->SortOrder = "";
}
function KeyFromField($Field)
{
$result = "";
foreach($this->Columns as $key=>$c)
{
if($c->field == $Field)
$result = $key;
}
return $result;
}
function SetSort($SortField,$SortOrder=1)
{
$this->SortField = $SortField;
$this->SortOrder = $SortOrder;
}
function Count()
{
return count($this->Columns);
}
function Item($key)
{
return $this->Columns[$key];
}
function Add($Field="",$Label="",$Searchable=1,$sortfield=0,$asc=1,$width="",$config_field,$config_sortorder,$key="")
{
$objNewMember = new clsColumnHeader($Field,$Label,$Searchable,$sortfield,$asc,$width,$config_field,$config_sortorder);
if(strlen($key))
{
$objNewMember->FieldKey = $key;
$this->Columns[$key] = $objNewMember;
}
else
{
$this->Columns[] = $objNewMember;
}
return $objNewMember;
}
function PrintColumns()
{
$o = "<TR class=\"subsectiontitle\">";
foreach($this->Columns as $c)
{
if($c->field==$this->SortField || ($c->FieldKey==$this->SortField))
{
$c->sortfield=1;
}
else
$c->sortfield=0;
$c->asc=$this->SortOrder;
if($this->nowrap)
{
$nowrap = " nowrap=\"nowrap\" ";
}
else
$nowrap = "";
$o .= $c->PrintCol($nowrap);
}
$o .= "</TR>";
return $o;
}
}
?>
Property changes on: trunk/admin/listview/columnheader.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property

Event Timeline