Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 2:01 AM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: trunk/admin/browse.php
===================================================================
--- trunk/admin/browse.php (revision 373)
+++ trunk/admin/browse.php (revision 374)
@@ -1,471 +1,471 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
//$pathtoroot="";
$b_topmargin = "0";
//$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='position:absolute; width:100%;top:0px;' align='right'><img src='images/logo_bg.gif'></div><img src='images/spacer.gif' width=1 height=15><br><div style='z-Index:1; position:relative'>";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
$indexURL = $rootURL."index.php";
$m_var_list_update["cat"] = 0;
$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
unset($m_var_list_update["cat"]);
$envar = "env=" . BuildEnv();
if($objCatList->CurrentCategoryID()>0)
{
$c = $objCatList->CurrentCat();
$upURL = "javascript:AdminCatNav('".$c->Admin_Parent_Link()."');";
}
else
$upURL = $_SERVER["PHP_SELF"]."?".$envar;
//admin only util
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/browse/toolbar.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if(file_exists($path))
{
//echo "<!-- $path -->";
@include_once($path);
}
}
if(!$is_install)
{
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
}
//Set Section
$section = 'in-portal:browse';
//Set Environment Variable
//echo $objCatList->ItemsOnClipboard()." Categories on the clipboard<br>\n";
//echo $objTopicList->ItemsOnClipboard()." Topics on the clipboard<br>\n";
//echo $objLinkList->ItemsOnClipboard()." Links on the clipboard<br>\n";
//echo $objArticleList->ItemsOnClipboard()." Articles on the clipboard<br>\n";
// save last category visited
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
/* // for testing
$last_cat = $objSession->GetVariable('last_category');
$prev_cat = $objSession->GetVariable('prev_category');
echo "Last CAT: [$last_cat]<br>";
echo "Prev CAT: [$prev_cat]<br>";
*/
$SearchType = $objSession->GetVariable("SearchType");
if(!strlen($SearchType))
$SearchType = "all";
$SearchLabel = "la_SearchLabel";
if( GetVar('SearchWord') !== false ) $objSession->SetVariable('admin_seach_words', GetVar('SearchWord') );
$SearchWord = $objSession->GetVariable('admin_seach_words');
$objSession->SetVariable("HasChanges", 0);
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<<END
<script type="text/javascript">
if (window.opener != null) {
theMainScript.CloseAndRefreshParent();
}
</script>
END;
print <<<END
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/checkboxes_new.js"></script>
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
END;
load_module_styles();
if( !isset($list) ) $list = '';
if(($SearchType=="categories" || $SearchType="all") && strlen($list))
{
int_SectionHeader(NULL,NULL,NULL,admin_language("la_Title_SearchResults"));
}
else
int_SectionHeader();
$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:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="new_cat" alt="<?php echo admin_language("la_ToolTip_New_Category"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="editcat" alt="<?php echo admin_language("la_ToolTip_Edit_Current_Category"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<?php
foreach($NewButtons as $btn)
{
print "<tb:button action=\"".$btn["Action"]."\" alt=\"".$btn["Alt"]."\" ImagePath=\"".$btn["ImagePath"]."\" ";
if(strlen($btn["Tab"])>0)
print "tab=\"".$btn["Tab"]."\"";
print ">\n";
}
?>
<tb:button action="edit" alt="<?php echo admin_language("la_ToolTip_Edit"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="delete" alt="<?php echo admin_language("la_ToolTip_Delete"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="approve" alt="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="decline" alt="<?php echo admin_language("la_ToolTip_Decline"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="cut" alt="<?php echo admin_language("la_ToolTip_Cut"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="copy" alt="<?php echo admin_language("la_ToolTip_Copy"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="paste" alt="<?php echo admin_language("la_ToolTip_Paste"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="move_up" alt="<?php echo admin_language("la_ToolTip_Move_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="move_down" alt="<?php echo admin_language("la_ToolTip_Move_Down"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="print" alt="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
<tbody>
<tr>
<td><img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="navbar"><?php $attribs["admin"]=1; print m_navbar($attribs); ?></span>
</td>
<td align="right">
<FORM METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" NAME="admin_search" ID="admin_search"><INPUT ID="SearchScope" NAME="SearchScope" type="hidden" VALUE="<?php echo $objSession->GetVariable("SearchScope"); ?>"><INPUT ID="SearchType" NAME="SearchType" TYPE="hidden" VALUE="<?php echo $objSession->GetVariable("SearchType"); ?>"><INPUT ID="NewSearch" NAME="NewSearch" TYPE="hidden" VALUE="0"><INPUT TYPE="HIDDEN" NAME="Action" value="m_Exec_Search">
<table cellspacing="0" cellpadding="0"><tr>
<td><?php echo admin_language($SearchLabel); ?>&nbsp;</td>
<td><input ID="SearchWord" type="text" value="<?php echo $SearchWord; ?>" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
<td><img id="imgSearch" action="search_b" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif'" style="cursor:hand" width="22" width="22"><img action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16.gif'" style="cursor:hand">
<img action="search_c" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="document.all.SearchWord.value = ''; this.action = this.getAttribute('action'); actionHandler(this);" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif'" style="cursor:hand" width="22" width="22">&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/";?>"-->
</td>
</tr>
</tbody>
</table>
<?php if ($filter) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Filter")); ?>
</td>
</tr>
</table>
<?php } ?>
<br>
<!-- CATEGORY DIVIDER -->
<?php
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
$objCatList->Clear();
$IsSearch = FALSE;
if($SearchType == 'categories' || $SearchType == 'all')
{
$list = $objSession->GetVariable("SearchWord");
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
if(strlen($SearchQuery))
{
$SearchQuery = " (".$SearchQuery.") ";
if( strlen($CatScopeClause) ) $SearchQuery .= " AND ".$CatScopeClause;
$objCatList->LoadCategories($SearchQuery.$CategoryFilter,$OrderBy);
$IsSearch = TRUE;
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter, $OrderBy);
$TotalItemCount += $objCatList->QueryItemCount;
?>
<?php
$e = $Errors->GetAdminUserErrors();
if(count($e)>0)
{
echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">";
for($ex = 0; $ex<count($e);$ex++)
{
echo "<tr><td width=\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 int_footer(); ?>
Property changes on: trunk/admin/browse.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/email/do_send.php
===================================================================
--- trunk/admin/email/do_send.php (revision 373)
+++ trunk/admin/email/do_send.php (revision 374)
@@ -1,313 +1,313 @@
<?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="";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//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");
//Set Section
$section = 'in-portal:sendmail';
//Set Environment Variable
$envar = "env=" . BuildEnv();
$State = $_POST["EmailState"];
if(!strlen($State))
{
$State = $_GET["EmailState"];
}
$ado = GetADODBConnection();
$table = "ses_".$objSession->GetSessionKey()."_sendmail";
$MessagesPerPage =2;
$SendQueue = new clsEmailQueue($table,$MessagesPerPage);
$FromUser = $objUsers->GetItem($objSession->Get("PortalUserId"));
$FromAddr = $FromUser->Get("Email");
$FromName = $FromUser->Get("FirstName")." ".$FromUser->Get("LastName");
if(!strlen(trim($FromAddr)))
{
$FromAddr = $objConfig->Get("Default_FromAddr");
}
if(!strlen(trim($FromName)))
{
$FromName = "System Administrator";
}
$TargetURL = $_SERVER["PHP_SELF"]."?".$envar.'&destform=popup';
$CancelURL = $TargetURL."&EmailState=email_user_cancel";
/*Initialize page*/
switch($State)
{
case "email_single_send": /*single user send */
$PageTitle = admin_language("la_Title_SendInit");
$Subject = $_POST["subject"];
$Html = $_POST["messageHTML"];
$Text = strip_tags($_POST["messageTEXT"]);
if(is_array($_FILES))
{
$attatch = $_FILES["attatchment"];
if(strlen($attatch["name"]) >0 && $attatch["size"]>0)
{
$FileName = $attatch["name"];
$FileLoc = $attatch["tmp_name"];
}
else
{
$FileName = NULL;
$FileLoc = NULL;
}
}
else
{
$FileName = NULL;
$FileLoc = NULL;
}
$charset = "";
$TargetURL .= "&EmailState=email_send_complete";
break;
case "email_multi_send": /*Init multiuser send*/
$UserList = explode(",",$_POST["sendaddrs"]);
//echo $_POST["sendaddrs"]."<br>\n";
$Subject = $_POST["subject"];
$Html = $_POST["messageHTML"];
$Text = strip_tags($_POST["messageTEXT"]);
if(is_array($_FILES))
{
$attatch = $_FILES["attatchment"];
if(strlen($attatch["name"]) >0 && $attatch["size"]>0)
{
$FileName = $attatch["name"];
$FileLoc = $attatch["tmp_name"];
}
else
{
$FileName = NULL;
$FileLoc = NULL;
}
}
else
{
$FileName = NULL;
$FileLoc = NULL;
}
$charset = "";
$PageTitle = admin_language("la_Title_SendMailInit");
$TargetURL .="&EmailState=email_send_progress&Start=0&Total=".count($UserList);
break;
case "email_send_progress":
$total = $_GET["Total"];
$start = $_GET["Start"];
if($start < $total)
{
$pct = (int)(($start/$total)*100);
$NewStart = $start+$MessagesPerPage;
$TargetURL .= "&EmailState=email_send_progress&Start=$NewStart&Total=$total";
$PageTitle = admin_language("la_Title_SendMailProgress")." - ".$pct."% ".admin_language("la_Text_Complete");
}
else
{
$PageTitle = admin_language("la_Title_SendMailProgress");
$TargetURL .= "&EmailState=email_send_complete";
}
break;
case "email_send_complete":
$PageTitle = admin_language("la_Title_SendMailComplete");
$TargetURL="";
break;
case "email_user_cancel":
$PageTitle = admin_language("la_Title_SendMailCancel");
$TargetURL = "";
break;
}
int_header(NULL,NULL,admin_language("la_Title_PleaseWait"));
echo "\n";
/*do page functions */
// echo "Current State:". $State."<br>\n";
echo "<TABLE border=0 width=\"100%\" height=\"90%\"><TR><TD valign=\"top\" align=\"middle\">";
switch($State)
{
case "email_single_send": /*single user send */
$PageTitle = admin_language($Pagetitle);
$ToAddr = $_POST["sendaddrs"];
$SendQueue->SendMail($FromAddr,$FromName,$ToAddr,"",$Subject,$Text,$Html,$charset, "",$FileName,$FileLoc,0, NULL);
$o = "<TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .= int_subsection_title_ret($PageTitle);
$o .= "<TD COLSPAN=2>".admin_language("la_prompt_EmailInitMessage")."</TD></TR>";
$o .= "<TD ALIGN=\"middle\" COLSPAN=2></TD></TR>";
$o .= "</TABLE><input type=button CLASS=\"button\" VALUE=\"".admin_language("la_Cancel")."\" ONCLICK=\"document.location='".$CancelURL."';\">";
echo $o."\n";
break;
case "email_multi_send": /*Init multiuser send*/
/*Create storage Table for Queue */
$o = "<TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .= int_subsection_title_ret($PageTitle);
$o .= "<tr><TD COLSPAN=2>".admin_language("la_prompt_EmailInitMessage")."</TD></TR>";
$o .= "<TD ALIGN=\"middle\" COLSPAN=2></TD></TR>";
$o .= "</TABLE><input type=button CLASS=\"button\" VALUE=\"".admin_language("la_Cancel")."\" ONCLICK=\"document.location='".$CancelURL."';\">";
echo $o."\n";
$sql = "CREATE TABLE $table SELECT * FROM ".$objEmailQueue->SourceTable." WHERE queued=99";
$ado->Execute($sql);
//echo $sql."<br>\n";
for($i=0;$i<count($UserList);$i++)
{
$ToAddr = $UserList[$i];
//$From,$FromName,$To,$ToName,$Subject,$Text,$Html,$charset,$AttmFiles,$QueueOnly=0
$SendQueue->SendMail($FromAddr,$FromName,$ToAddr,"",$Subject,$Text,$Html,$charset, "",$FileName,$FileLoc,1, NULL);
}
break;
case "email_send_progress":
$sql = "SELECT * FROM $table LIMIT $start,".$MessagesPerPage;
// echo $sql."<br>\n";
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$data = $rs->fields;
$SendQueue->DeliverMail($data["toaddr"],$data["fromaddr"],$data["Subject"],$data["message"],$data["headers"],1);
$rs->MoveNext();
}
$o = "<TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .= int_subsection_title_ret($PageTitle);
$o .="<TR border=1><TD width=\"".$pct."%\" STYLE=\"background:url('".$adminURL."/images/progress_bar_segment.gif');\">&nbsp;</TD>";
$comp_pct = 100-$pct;
$o .= "<TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
$o .= "</TABLE>";
$o .= "<input type=button VALUE=\"".admin_language("la_Cancel")."\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">";
echo $o."\n";
break;
case "email_send_complete":
$sql = "DROP TABLE IF EXISTS $table";
$ado->Execute($sql);
$o = "<TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .= int_subsection_title_ret($PageTitle);
$o .= "<TR><TD COLSPAN=2>".admin_language("la_prompt_EmailCompleteMessage")."</TD></TR>";
$o .= "<TD ALIGN=\"middle\" COLSPAN=2></TD></TR>";
$o .= "</TABLE><input type=button VALUE=\"".admin_language("la_Close")."\" CLASS=\"button\" ONCLICK=\"window.close();\">";
echo $o."\n";
break;
case "email_user_cancel":
$o = "<TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .= int_subsection_title_ret($PageTitle);
$o .= "<TR><TD COLSPAN=2>".admin_language("la_prompt_EmailCancelMessage")."</TD></TR>";
$o .= "</TABLE><input type=button VALUE=\"".admin_language("la_Close")."\" CLASS=\"button\" ONCLICK=\"window.close();\">";
echo $o."\n";
break;
}
echo "</TD></TR></TABLE>";
if(strlen($TargetURL))
{
?>
<SCRIPT LANGUAGE="JavaScript">
document.location = '<?php echo $TargetURL; ?>';
</SCRIPT>
<?php
}
?>
<?php int_footer(); ?>
Property changes on: trunk/admin/email/do_send.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/email/sendmail.php
===================================================================
--- trunk/admin/email/sendmail.php (revision 373)
+++ trunk/admin/email/sendmail.php (revision 374)
@@ -1,191 +1,191 @@
<?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="";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
//echo "<pre>"; print_r($_POST); echo "</pre>";
$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";
//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");
//Set Section
$section = 'in-portal:sendmail';
//Set Environment Variable
$envar = "env=" . BuildEnv();
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_SendEmail","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"SendMail();",
$imagesURL."/toolbar/tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();",
$imagesURL."/toolbar/tool_stop.gif");
int_header($objListToolBar);
if(count(explode(",",$recip_ids))>1)
{
$action = "email_multi_send";
}
else
$action = "email_single_send";
if ($addr_list != '' || $addr_list != null) {
$addresses = implode(",",$addr_list);
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="sendmail" name="sendmail" action="<?php echo $adminURL."/email/do_send.php?env=".BuildEnv(); ?>&destform=popup" enctype="multipart/form-data" method=POST>
<INPUT TYPE="HIDDEN" NAME="EmailState" VALUE="<?php echo $action; ?>">
<?php int_subsection_title(admin_language("la_tab_General")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo admin_language("la_prompt_To"); ?></span></td>
<td>
<SPAN CLASS="text"><?php echo implode("; ", $reciplist); ?></SPAN>
<input type="hidden" name="sendto" class="text" value="<?php echo $recip_ids; ?>">
<INPUT TYPE="HIDDEN" NAME="sendaddrs" VALUE="<?php echo $addresses; ?>">
</td>
<td><span ID="valTo" class="validation_error"><?php echo admin_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo admin_language("la_prompt_Subject"); ?></span></td>
<td>
<input type="text" name="subject" class="text" size="60" value="<?php echo ""; ?>">
</td>
<td><span ID="valSubject" class="validation_error"><?php echo admin_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo admin_language("la_prompt_Attatchment"); ?></span></td>
<td>
<input type="file" name="attatchment" class="text" size="60">
</td>
<td></td>
</tr>
<?php int_subsection_title(admin_language("la_tab_Message")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo admin_language("la_prompt_html_version"); ?></span>
<br />
<a href="#">
<img src="<?php echo $rootURL; ?>admin/icons/icon24_link_editor.gif" style="cursor:hand" border="0"
ONCLICK="document.forms[0].elements[0].checked=true; OpenEditor('&section=<?php echo $section; ?>','sendmail','messageHTML');">
</a>
</td>
<td valign="top" COLSPAN=2>
<textarea name="messageHTML" id="messageHTML" rows="5" cols="60">Type your Message Here</textarea>
</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo admin_language("la_prompt_text_version"); ?></span></td>
<td valign="top" COLSPAN=2>
<textarea name="messageTEXT" id="messageTEXT" rows="5" cols="60">Type your Message Here</textarea>
</td>
</tr>
</FORM>
</TABLE>
<script language="JavaScript">
InitValidation();
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/email/sendmail.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/tree/tree.php
===================================================================
--- trunk/admin/tree/tree.php (revision 373)
+++ trunk/admin/tree/tree.php (revision 374)
@@ -1,175 +1,175 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<?php echo $adminURL."/include/style.css"; ?>">
<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 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>
</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.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/admin/tools/sql_result.php
===================================================================
--- trunk/admin/tools/sql_result.php (revision 373)
+++ trunk/admin/tools/sql_result.php (revision 374)
@@ -1,180 +1,180 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$envar = "env=" . BuildEnv();
$section = 'in-portal:sql_query';
$sec = $objSections->GetSection($section);
$parent = $objSections->GetSection($sec->Get("parent"));
$title = admin_language("la_tab_QueryDB");
//$saveURL = $admin."/browse.php";
$saveURL = $admin."/tools/sql_results.php";
$ParentUrl = $parent->URL();
if(strlen($ParentUrl)>0)
{
$cancelUrl = $ParentUrl;
}
else
$cancelUrl = $_SERVER['PHP_SELF']."?".$envar;
$action = "m_sql_query";
$sql_query = trim($objSession->GetVariable("LastSQLquery"));
//$objCatToolBar = new clsToolBar();
//$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('sqlform','$saveURL',1,'');","tool_select.gif");
//$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('category','$cancelURL',2,'');","tool_cancel.gif");
int_header(NULL,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php int_subsection_title(admin_language("la_prompt_sqlquery_result")); ?>
<tr <?php echo int_table_color(); ?>>
<TD colspan=3>
<?php echo stripslashes($SqlQuery); ?>
<input class="button" type=button value="<?php echo admin_language("la_prompt_edit_query"); ?>" onclick="history.go(-1);">
</td>
</tr>
<tr>
<?php
if($SqlErrorNum>0)
{
?>
<?php int_subsection_title(admin_language("la_prompt_sqlquery_error")); ?>
<tr <?php echo int_table_color(); ?>>
<TD colspan=3>
<?php echo stripslashes($SqlError); ?>
</td>
</tr>
<tr>
<?php
}
else
{
$ResultObject = new clsItemCollection();
$ResultObject->classname = "clsItemDB";
echo "<TR><TD colspan=3><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
while($SqlResult && !$SqlResult->EOF)
{
$ResultObject->AddItemFromArray($SqlResult->fields,TRUE);
$SqlResult->MoveNext();
}
$objListView = new clsListView(NULL,$ResultObject);
$fields = $SqlResult->FieldTypesArray();
if(is_array($fields))
{
$width = 100 / count($fields);
$width = "width=\"".$width."%\"";
foreach($fields as $f)
{
$name = $f->name;
$objListView->ColumnHeaders->Add($name,$name,1,0,"",$width,"", "",$name);
}
}
$objListView->PrintToolBar = FALSE;
$objListView->nowrap = FALSE;
$objListView->CurrentPageVar = "";
$objListView->PerPageVar = "";
$objListView->checkboxes=false;
echo $objListView->ColumnHeaders->PrintColumns();
if($ResultObject->NumItems()>0)
{
echo $objListView->PrintItems();
}
echo "</TABLE></TD></TR>";
}
?>
</TABLE>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/tools/sql_result.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/tools/server_info.php
===================================================================
--- trunk/admin/tools/server_info.php (revision 373)
+++ trunk/admin/tools/server_info.php (revision 374)
@@ -1,192 +1,192 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
$envar = "env=" . BuildEnv();
$section = 'in-portal:server_info';
$sec = $objSections->GetSection($section);
$parent = $objSections->GetSection($sec->Get("parent"));
if(strlen($ParentUrl)>0)
{
$cancelUrl = $ParentUrl;
}
else
$cancelUrl = $_SERVER['PHP_SELF']."?".$envar;
$cancelUrl = $admin."/subitems.php?section=in-portal:tools&".$envar;
//$title = admin_language("la_tab_QueryDB");
$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('sinfoform','','$cancelUrl',2,'');","tool_cancel.gif");
//td.php_info, th.php_info { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
$extra = "<style type=\"text/css\"><!--
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
th.php_info { border: 1px solid #000000; font-size: 75%; align: center; vertical-align: baseline;}
h1 {font-size: 150%; text-align: center;}
h2 {font-size: 125%; text-align: center;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
.h {background-color: #9999cc; font-weight: bold; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
.v {background-color: #cccccc; color: #000000; border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
i {color: #666666; background-color: #cccccc; }
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
//--></style>";
int_header($objCatToolBar,NULL,$title, NULL, $extra);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="sinfoform" name="sinfoform" action="" method=POST>
<!-- before phpinfo -->
<?php
ob_start();
phpinfo();
$php_info .= ob_get_contents();
ob_end_clean();
$php_info = str_replace(" width=\"600\"", " width=\"786\"", $php_info);
$php_info = str_replace("</body></html>", "", $php_info);
$php_info = str_replace('<a href="http://www.php.net/"><img border="0"', '<a href="http://www.php.net/"><img border="0" align="right" ', $php_info);
$php_info = str_replace(";", "; ", $php_info);
$php_info = str_replace(",", ", ", $php_info);
$php_info = str_replace("' '", " \<br>", $php_info);
$php_info = str_replace("'", "", $php_info);
// include_path:
$php_info = str_replace(".:/", "/", $php_info);
// paths:
$php_info = str_replace(":/", "<br>/", $php_info);
$php_info = str_replace("<br>//", "://", $php_info); // correct urls
// LS_COLORS and some paths:
$php_info = str_replace(";", "; ", $php_info);
$php_info = str_replace(",", ", ", $php_info);
// apache address :
$php_info = str_replace("&lt; ", "<", $php_info);
$php_info = str_replace("&gt;", ">", $php_info);
$php_info = str_replace('<a name', '<a style="color: #000000" name', $php_info);
// td styles
//$php_info = str_replace("<td", "<td class=\"php_info\"", $php_info);
//$php_info = str_replace("<th", "<th class=\"php_info\"", $php_info);
$offset = strpos($php_info, "<table");
print substr($php_info, $offset);
?>
<!-- after phpinfo -->
</FORM>
</TABLE>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/tools/server_info.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/tools/sql_query.php
===================================================================
--- trunk/admin/tools/sql_query.php (revision 373)
+++ trunk/admin/tools/sql_query.php (revision 374)
@@ -1,142 +1,142 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
$envar = "env=" . BuildEnv();
$section = 'in-portal:sql_query';
$sec = $objSections->GetSection($section);
$parent = $objSections->GetSection($sec->Get("parent"));
//$title = admin_language("la_tab_QueryDB");
$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
$script_name = $ro_perm ? 'sql_query' : 'sql_result';
$saveURL = $admin."/tools/".$script_name.".php";
$ParentUrl = $parent->URL();
if(strlen($ParentUrl)>0)
{
$cancelUrl = $ParentUrl;
}
else
$cancelUrl = $_SERVER['PHP_SELF']."?".$envar;
$cancelUrl = $admin."/subitems.php?section=in-portal:tools&".$envar;
$action = "m_sql_query";
$sql_query = trim($objSession->GetVariable("LastSQLquery"));
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('sqlform','','$saveURL',1,'');","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('sqlform','','$cancelUrl',2,'');","tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="sqlform" name="sqlform" action="" method=POST>
<?php int_subsection_title(admin_language("la_prompt_sqlquery_header")); ?>
<tr <?php echo int_table_color(); ?>>
<td colspan="3"><?php echo int_hint(admin_language("la_text_db_warning")); ?></td>
</tr>
<tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text" ID="prompt_sql_query"><?php echo admin_language("la_prompt_sqlquery"); ?></span></td>
<td valign="top"><span class="text">
<TEXTAREA ValidationType="exists" name="sql" cols="100" rows=10><?php echo $sql_query; ?></TEXTAREA>
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<input type="hidden" name="Action" value="<?php echo $action; ?>">
</FORM>
</TABLE>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/tools/sql_query.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/users/user_addimage.php
===================================================================
--- trunk/admin/users/user_addimage.php (revision 373)
+++ trunk/admin/users/user_addimage.php (revision 374)
@@ -1,343 +1,343 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");;
require_once($pathtoroot.$admin."/browse/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
unset($objEditItems);
$objEditItems = new clsImageList();
$objEditItems->SourceTable = $objSession->GetEditTable("Images");
if(isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$ImageId = $_POST["itemlist"][0];
}
else
{
$ImageId = $_POST["itemlist"];
}
$img = $objEditItems->GetItem($ImageId);
// print_r($img);
$action = "m_img_edit";
$name = $img->Get("Name");
}
else
{
$img = new clsImage();
$img->Set("ResourceId",$c->Get("ResourceId"));
$action = "m_img_add";
$name = "'New Image'";
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_image';
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_Text_Image");
$title .= " '".$name."'";
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('user','UserEditStatus','".$admin."/users/adduser_images.php',0);",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('user','UserEditStatus','".$admin."/users/adduser_images.php',-1);",$imagesURL."/toolbar/tool_cancel.gif");
//echo "<pre>"; print_r($objCatToolBar); echo "</pre>";
int_header($objCatToolBar,NULL,$title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<FORM enctype="multipart/form-data" ID="user" NAME="user" method="POST" ACTION="">
<?php int_subsection_title(prompt_language("la_Text_Image")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_ImageId"); ?></TD>
<TD><?php if ($img->Get("ImageId") != -1) echo $img->Get("ImageId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN class="text" id="prompt_imgName"><?php echo prompt_language("la_prompt_Name"); ?></SPAN></TD>
<TD><input type=text NAME="imgName" ValidationType="exists" tabindex="1" size="30" VALUE="<?php echo $img->parsetag("image_name"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN class="text" id="prompt_imgAlt"><?php echo prompt_language("la_prompt_AltName"); ?></SPAN></TD>
<TD><input type=text NAME="imgAlt" ValidationType="exists" size="30" tabindex="2" VALUE="<?php echo $img->parsetag("image_alt"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Status"); ?></TD>
<TD>
<input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==1) echo "CHECKED"; ?> VALUE="1"><?php echo prompt_language("la_Text_Enabled"); ?>
<input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==0) echo "CHECKED"; ?> VALUE="0"><?php echo prompt_language("la_Text_Disabled"); ?>
</TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Primary"); ?></TD>
<TD><input type=checkbox NAME="imgDefault" tabindex="4" <?php if($img->Get("DefaultImg")==1) echo "CHECKED"; ?> VALUE="1"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Priority"); ?></TD>
<TD><input type=text SIZE="5" NAME="imgPriority" tabindex="5" VALUE="<?php echo $img->Get("Priority"); ?>"></TD>
<TD></TD>
</TR>
<?php int_subsection_title(prompt_language("la_text_Thumbnail_Image")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
<?php
if($img->Get("LocalThumb")==1 || strlen($img->Get("LocalThumb"))==0)
{
$local="checked";
$remote = "";
}
else
{
$remote="checked";
$local = "";
}
?>
<TD>
<TABLE border=0>
<tr>
<TD>
<input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
</td>
<td>
<input type=FILE NAME="imgThumbFile" tabindex="7" VALUE=""> <br />
</td>
</tr>
<tr>
<td>
<input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
</td>
<td>
<input type=text size=32 NAME="imgThumbUrl" tabindex="8" VALUE="<?php echo $img->Get("ThumbUrl"); ?>"> <br />
</td>
</tr>
</table>
</TD>
<TD ALIGN="RIGHT">
<IMG SRC="<?php echo $img->ThumbURL(); ?>">
</TD>
</TR>
<?php int_subsection_title(prompt_language("la_Text_Full_Size_Image")); ?>
<TR <?php int_table_color(); ?>>
<TD><?php echo prompt_language("la_text_Same_As_Thumbnail"); ?></TD>
<?php
if(($img->Get("SameImages")=="1") || !$img->Get("ImageId") || ($img->Get("ImageId") == "-1"))
{
$checked = "CHECKED";
$disabled = "DISABLED=\"true\"";
}
?>
<TD><input type=checkbox id="imgSameImages" NAME="imgSameImages" tabindex="9" VALUE="1" <?php echo $checked; ?> ONCLICK="enableFullImage(this);"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?>>
<TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
<?php
if($img->Get("LocalImage")==1 || strlen($img->Get("LocalImage"))==0)
{
$local="checked";
$remote = "";
}
else
{
$remote="checked";
$local = "";
}
?>
<TD>
<TABLE border=0>
<tr>
<TD>
<input id="full1" type="radio" name="imgLocalFull" tabindex="10" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
</td>
<td>
<input type=FILE ID="imgFullFile" NAME="imgFullFile" tabindex="11" VALUE=""> <br />
</td>
</tr>
<tr>
<td>
<input id="full2" type="radio" name="imgLocalFull" tabindex="10" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
</td>
<td>
<input type=text size=32 ID="imgFullUrl" tabindex="12" NAME="imgFullUrl" VALUE="<?php echo $img->Get("Url"); ?>"> <br />
</td>
</tr>
</table>
</td>
<TD ALIGN="RIGHT">
<IMG SRC="<?php echo $img->FullURL(); ?>">
</TD>
</TR>
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<input type="hidden" name="UserEditStatus" VALUE="0">
<input type="hidden" name="DestDir" VALUE="<?php echo $DestDir; ?>">
<INPUT TYPE="hidden" NAME="ImageId" VALUE="<?php echo $img->Get("ImageId"); ?>">
<input TYPE="HIDDEN" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<script language="JavaScript">
enableFullImage(document.getElementById('imgSameImages'));
MarkAsRequired(document.getElementById("user"));
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/user_addimage.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/users/group_select.php
===================================================================
--- trunk/admin/users/group_select.php (revision 373)
+++ trunk/admin/users/group_select.php (revision 374)
@@ -1,251 +1,251 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
$section = 'in-portal:groupselect';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","GroupChecks");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"SelectSubmit();",
"tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$order = $objConfig->Get("GroupSelect_SortOrder");
$SelectorType = GetVar('Selector');
if(!$SelectorType) $SelectorType = 'checkbox';
$source = GetVar('source');
$objGroups->Page = GetVar('lpn');
if($source)
{
switch($source)
{
case "addcategory_permissions":
$SelectorType = "radio";
$ado = GetADODBConnection();
$sql = "SELECT Distinct(GroupId) FROM ".GetTablePrefix()."Permissions WHERE CatId=".$_GET["CatId"];
//$sql = "SELECT Distinct(p.GroupId) FROM ".GetTablePrefix()."Permissions AS p LEFT JOIN ".GetTablePrefix()."PortalGroup AS pg ON p.GroupId = pg.GroupId WHERE p.CatId=".$_GET["CatId"]." AND pg.Personal=0";
//echo "SQL 1: $sql<br>";
$rs = $ado->Execute($sql);
$inlist = array();
while($rs && !$rs->EOF)
{
array_push($inlist,$rs->fields["GroupId"]);
$rs->MoveNext();
}
if(count($inlist)>0)
{
$catlist = implode(",",$inlist);
$field = $objConfig->Get("GroupSelect_SortField");
if(!strlen($field))
$field = "Name";
$orderby = trim($field." ".$order);
$sql = "SELECT * FROM ".GetTablePrefix()."PortalGroup WHERE GroupId NOT IN (".$catlist.") AND Personal = 0 ORDER BY $orderby";
//echo "SQL 4: $sql<br>";
$objGroups->Query_Item($sql);
}
else
$objGroups->LoadGroups("Personal = 0",trim($objConfig->Get("GroupSelect_SortField")." ".$order));
break;
case "adduser_groups":
$SelectorType = "radio";
$ado = GetADODBConnection();
$sql = sprintf('SELECT GroupId FROM '.GetTablePrefix().'UserGroup WHERE PortalUserId = %s', $_GET["UserId"]);
$inlist = $ado->GetCol($sql);
if($inlist !== false)
{
$catlist = implode(',', $inlist);
$field = $objConfig->Get("GroupSelect_SortField");
if( !strlen($field) ) $field = "Name";
$orderby = $field." ".$order;
$sql = "SELECT * FROM ".GetTablePrefix()."PortalGroup WHERE GroupId NOT IN (".$catlist.") ORDER BY $orderby";
$objGroups->Query_Item($sql);
}
else
$objGroups->LoadGroups('',trim($objConfig->Get("GroupSelect_SortField")." ".$order));
break;
default:
$objGroups->LoadGroups('',trim($objConfig->Get("GroupSelect_SortField")." ".$order));
break;
}
}
else
{
//echo "Loading Groups..<br>\n";
$objGroups->LoadGroups("",trim($objConfig->Get("GroupSelect_SortField")." ".$order));
}
$objListView = new clsListView($objListToolBar,$objGroups);
$objListView->IdField = "ResourceId";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Name", admin_language("la_prompt_Name"),1,0,$order,"width=\"20%\"","GroupSelect_SortField","GroupSelect_SortOrder","Name");
$objListView->ColumnHeaders->Add("Description", admin_language("la_prompt_Description"),1,0,$order,"width=\"30%\"","GroupSelect_SortField","GroupSelect_SortOrder","Description");
$objListView->ColumnHeaders->SetSort($objConfig->Get("GroupSelect_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->CurrentPageVar = "Page_Grouplist";
$objListView->PerPageVar = "Perpage_Grouplist";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $objGroups->QueryItemCount;
$objListView->SelectorType = $SelectorType;
$objListView->extra_env = 'destform='.GetVar('destform').'&destfield='.GetVar('destfield').'&Selector='.GetVar('Selector');
$title = 'Select Group';
int_header($objListToolBar,NULL,$title);
$values = GetVar('values');
if($values) $current_value = explode(',', $values);
?>
<FORM method="POST" ACTION="" NAME="grouplistform" ID="grouplistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]; ?>" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/group_select.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/users/group_mail.php
===================================================================
--- trunk/admin/users/group_mail.php (revision 373)
+++ trunk/admin/users/group_mail.php (revision 374)
@@ -1,183 +1,183 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsGroupList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalGroup");
$objEditItems->EnablePaging = FALSE;
$GroupCount = 0;
if (isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$GroupList = implode(",",$_POST["itemlist"]);
$GroupCount = count($_POST["itemlist"]);
}
else
{
$a = explode($_POST["itemlist"]);
$GroupCount = count($a);
unset($a);
$GroupList = $_POST["itemlist"];
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_sendmail";
}
$envar = "env=" . BuildEnv();
$section = 'in-portal:editgroup_sendmail';
$title = prompt_language("la_Text_Send")." ".prompt_language("la_Text_Email")." ".prompt_language("la_Text_To")." $GroupCount ".prompt_language("la_Text_Groups");
echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('editgroup','".$admin."/users/user_groups.php',1);",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('editgroup','".$admin."/users/user_groups.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="mailgroup" name="mailgroup" action="" method=POST>
<tr <?php int_table_color(); ?>>
<td valign="top" colspan="3"><?php echo prompt_language("la_prompt_Enable_HTML"); ?>
<input type="checkbox" name="html_enable" value="1">
<br>
<?php int_hint(prompt_language("la_Warning_Enable_HTML")); ?>
</td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_EmailMessage")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_EmailSubject"); ?></span></td>
<td>
<input type="text" name="email_subject" class="text" size="30" value="">
</td>
<td><span ID="valSubject" class="validation_error"><?php echo prompt_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_EmailBody"); ?></span></td>
<td>
<textarea name="email_body" cols="30" rows="5" class="text"></textarea>
</td>
<td><span ID="valBody" class="validation_error"><?php echo prompt_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="idlist" value="<?php echo $GroupList; ?>">
<input type="hidden" name="IdType" VALUE="group">
<input type="button" name="submit1" value="<?php echo admin_language("la_Save"); ?>" class="button" onclick="edit_submit('editgroup','".$admin."/users/user_groups.php',1);">
<input type="button" name="submit3" value="<?php echo admin_language("la_Cancel"); ?>" class="button" onclick="edit_submit('editgroup','".$admin."/users/user_groups.php',2);">
</td>
</tr>
</FORM>
</table>
<SCRIPT LANGUAGE="JavaScript">
InitValidation();
</SCRIPT>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/group_mail.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/users/user_addpermission.php
===================================================================
--- trunk/admin/users/user_addpermission.php (revision 373)
+++ trunk/admin/users/user_addpermission.php (revision 374)
@@ -1,265 +1,265 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_user_sysperm";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_permission';
$PermModule = $_GET["module"];
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_tab_Permissions");
//$formaction = $adminURL."/user/adduser_custom.php?".$envar;
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/adduser_permissions.php',0);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/adduser_permissions.php',-1);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/user_addpermission.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'&module='.$_REQUEST['module'],'la_PrevUser','la_NextUser');
}
//echo "<pre>"; print_r($objCatToolBar); echo "</pre>";
int_header($objCatToolBar,NULL,$title);
?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><A CLASS="control_link" HREF="javascript:edit_submit('edituser','UserEditStatus','<?php echo $admin; ?>/users/adduser_permissions.php',0);"><?php echo prompt_language("la_Prompt_GeneralPermissions"); ?></A>&gt;<?php echo prompt_language("la_PermType_$PermModule"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<FORM NAME="edituser" ID="edituser" method="POST" ACTION="">
<TBODY>
<TR class="subsectiontitle">
<?php
echo "<TD>".prompt_language("la_prompt_Description")."</TD><TD>".prompt_language("la_ColHeader_PermInherited")."</TD><TD>".prompt_language("la_ColHeader_PermAccess")."</TD></TR>\n";
?>
</TR>
<?php
$UserGroup = $c->GetPersonalGroup();
$UserGroupExists = is_object($UserGroup);
$permlist = array();
$ado = GetADODBConnection();
$sql = "SELECT * FROM ".GetTablePrefix()."PermissionConfig AS pc LEFT JOIN ".GetTablePrefix()."Phrase AS p ON pc.Description = p.Phrase WHERE pc.ModuleId='$PermModule' AND p.LanguageId = ".$objSession->Get("Language")." ORDER BY p.Translation ASC";
//echo $sql;
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$desc = $rs->fields["Description"];
$Permission = $rs->fields["PermissionName"];
echo "<TR ".int_table_color_ret().">";
echo "<TD><IMG src=\"".$imagesURL."/itemicons/icon16_permission.gif\"> ";
echo prompt_language($desc)."</TD>";
$checked = "";
if($UserGroupExists)
{
$Inherit = ($UserGroup->HasSystemPermission($Permission)==-1);
}
else
$Inherit =TRUE;
if($Inherit)
{
$checked = " CHECKED";
$value = $c->HasSystemPermission($Permission);
}
else
$value = $UserGroup->HasSystemPermission($Permission);
echo " <TD><INPUT access=\"chk".$Permission."\" ONCLICK=\"SetAccessEnabled(this); \" TYPE=CHECKBOX name=\"inherit[]\" VALUE=\"".$Permission."\" $checked></TD>\n";
$checked = "";
$imgsrc="red";
if($value==1)
{
$checked = " CHECKED";
$imgsrc = "green";
$current = "true";
}
else
{
$imgsrc = "red";
$current = "false";
}
$disabled = "";
if($Inherit)
{
$InheritValue = $current;
$UnInheritValue = "false";
$disabled = "DISABLED=\"true\"";
}
else
{
$disabled = "";
$InheritValue = ($Value==1);
$UnInheritValue = ($Value !=1);
}
echo " <TD><INPUT $disabled InheritValue=\"$InheritValue\" UnInheritValue=\"$UnInheritValue\" ID=\"chk".$Permission."\" ONCLICK=\"SetPermImage(this); \" permimg=\"img".$Permission."\" TYPE=CHECKBOX name=\"permvalue[]\" VALUE=\"".$Permission."\" $checked>";
echo " <img ID=\"img".$Permission."\" SRC=\"$imagesURL/perm_".$imgsrc.".gif\">";
echo "</TD></TR>";
$permlist[]=$Permission;
$rs->MoveNext();
}
?>
</TBODY>
</TABLE>
<input type="hidden" name="ItemId" value="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_user_sysperm">
<input type="hidden" name="UserEditStatus" VALUE="0">
<input type="hidden" name="PermList" value="<?php echo implode(",",$permlist); ?>">
</FORM>
<FORM method="POST" NAME="save_edit" ID="save_edit">
<tr <?php int_table_color(); ?>>
<td colspan="3">
</td>
</tr>
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script>
//initSelectiorContainers();
<?php // echo $objCatToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/user_addpermission.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/users/banuser.php
===================================================================
--- trunk/admin/users/banuser.php (revision 373)
+++ trunk/admin/users/banuser.php (revision 374)
@@ -1,218 +1,218 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
$objCustomFields = new clsCustomFieldList(6);
$objRelList = new clsRelationshipList();
//Multiedit init
if ($_GET["new"] == 1)
{
$c = new clsPortalUser(NULL);
$c->Set("CreatedOn", time());
$c->Set("Status", 2);
$en = 0;
$action = "m_ban_user";
$objUsers->CreateEmptyEditTable("PortalUserId");
$objRelList->CreateEmptyEditTable("RelationshipId");
$objCustomDataList->CreateEmptyEditTable("CustomDataId");
}
else
{
$en = (int)$_GET["en"];
if (isset($_POST["itemlist"]))
{
$objUsers->CopyToEditTable("ResourceId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$first=1;
foreach($objEditItems->Items as $u)
{
$objItemTypes->BuildUserItemTable($u->Get("PortalUserId"),$first);
$first=0;
}
if(isset($_POST["itemlist"]))
{
/* make a copy of the relationship records */
$ids = $objEditItems->GetResourceIDList();
$objRelList->CopyToEditTable("SourceId",$ids);
$objCustomDataList->CopyToEditTable("ResourceId",$ids);
}
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_ban_user";
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:banuser';
$title = prompt_language("la_Text_Ban")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."'";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
/*
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"));
$objCatToolBar->Add("divider");
}
*/
int_header($objCatToolBar,NULL,strip_tags($title));
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="edituser" name="edituser" action="" method=POST>
<?php int_subsection_title(prompt_language("la_Text_BanUserFields")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top">
<input type=checkbox name="ban_login" VALUE="1"><?php prompt_language("la_ban_login"); ?>
<span ID="prompt_user_login" class="text"><?php echo prompt_language("la_prompt_Usermame"); ?></span></td>
<td>
<input type="text" name="user_login" class="text" size="20" value="<?php echo $c->parsetag("user_login"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top">
<input type=checkbox name="ban_email" VALUE="1"><?php prompt_language("la_ban_email"); ?>
<span ID="prompt_user_email" class="text"><?php echo prompt_language("la_prompt_Email"); ?></span>
</td>
<td>
<input type="text" name="user_email" class="text" size="30" value="<?php echo $c->parsetag("user_email"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top">
<input type=checkbox name="ban_ip" VALUE="1"><?php prompt_language("la_ban_ip"); ?>
<span ID="prompt_user_ip" class="text"><?php echo prompt_language("la_prompt_ip"); ?></span>
</td>
<td>
<input type="text" name="user_ip" class="text" size="30" value="<?php echo $c->Get("ip"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="user_id" value="<?php echo $c->Get("PortalUserId"); ?>">
<input type="hidden" name="UserEditStatus" VALUE="0">
</td>
</tr>
</td>
</tr>
</table>
</form>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/banuser.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/users/addgroup_permissions.php
===================================================================
--- trunk/admin/users/addgroup_permissions.php (revision 373)
+++ trunk/admin/users/addgroup_permissions.php (revision 374)
@@ -1,181 +1,181 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
unset($objEditItems);
$objEditItems = new clsGroupList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalGroup");
$objEditItems->EnablePaging = FALSE;
$en = (int)$_GET["en"];
$sql ="SELECT * FROM ".$objEditItems->SourceTable;
$objEditItems->Query_Item($sql);
//echo $sql."<br>\n";
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_group";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editgroup_permissions';
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',2);","tool_cancel.gif");
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Group")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Permissions");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/addgroup_permissions.php";
$StatusField = "GroupEditStatus";
$form = "editgroup";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevGroup','la_NextGroup');
}
int_header($objCatToolBar,NULL,$title);
?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><?php echo prompt_language("la_Prompt_SystemPermissions"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="editgroup" name="editgroup" action="" method=POST>
<?php
$Mod_names = array();
$Mod_ids = array();
$Mod_names[] = admin_language("la_PermType_Admin");
$Mod_ids[] = "Admin";
$Mod_names[] = admin_language("la_PermType_Front");
$Mod_ids[] = "Front";
$UserId = $c->Get("PortalUserId");
for($i=0;$i<count($Mod_ids);$i++)
{
$module = $Mod_names[$i];
$mod_id = $Mod_ids[$i];
echo "<TR ".int_table_color_ret().">";
echo "<TD><IMG src=\"".$imagesURL."/itemicons/icon16_permission.gif\"> ";
$getvar = "?env=".BuildEnv()."&en=$en&module=$mod_id";
echo "<A class=\"NAV_URL\" HREF=\"".$adminURL."/users/group_addpermission.php$getvar\">$module</A></TD>";
echo "</TR>";
}
?>
<input type="hidden" name="Action" value="m_noop">
<input type="hidden" name="GroupId" value="<?php echo $c->Get("ResourceId"); ?>">
<!-- <input type="hidden" name="PermList" value="<?php //echo implode(',', GetVar('PermList') ); ?>"> -->
<input type="hidden" name="GroupEditStatus" value="0">
</FORM>
</TABLE>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/addgroup_permissions.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/users/banlist_apply.php
===================================================================
--- trunk/admin/users/banlist_apply.php (revision 373)
+++ trunk/admin/users/banlist_apply.php (revision 374)
@@ -1,189 +1,189 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
$FrontEnd=2;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$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";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:banlist_apply";
$UsersPerLoad =30;
$ado = GetADODBConnection();
$UserIndex = (int)$_GET["UserIndex"];
if($UserIndex==0)
{
$table = $objUsers->SourceTable;
$NumUsers = TableCount($table,"",0);
}
else
{
$NumUsers = $_GET["NumUsers"];
$table = $objUsers->SourceTable;
}
$title = prompt_language("la_prompt_applyingbanlist");
if($UserIndex <= $NumUsers)
{
$title .= " $UserIndex / $NumUsers ".prompt_language("la_Text_complete");
}
else
$title .= " $NumUsers / $NumUsers ".prompt_language("la_Text_complete");
$sql = "SELECT * FROM $table LIMIT $UserIndex,$UsersPerLoad";
//echo $sql."<br>\n";
$objUsers->Query_Item($sql);
foreach($objUsers->Items as $u)
{
$BrokenRule = $u->CheckBanned();
if($BrokenRule)
$u->Deny(1); // 1 - IsBanned mark in db, 0 - No such mark
}
int_header(NULL,NULL,$title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(""); ?>
<?php
if($NumUsers==0)
{
$percent=100;
}
else
{
$percent = (int)(($UserIndex/$NumUsers) * 100);
}
if ($percent == 0)
{
echo "<TR>";
echo "<TD BGCOLOR=\"#FFFFFF\" width=\"100%\" >$percent";
echo "%</td></TR>";
}
else if ($percent < 60)
{
echo "<TR><TD BGCOLOR=\"#4682B2\" width=\"".$percent."%\" >";
$row2 = 100-$percent;
echo "</td> <TD BGCOLOR=\"#FFFFFF\" width=\"".$row2."%\" > $percent";
echo "%</td></TR>";
}
elseif ($percent == 100)
{
echo "<TR><TD BGCOLOR=\"#4682B2\" align=\"right\" width=\"100%\" ><FONT COLOR=\"#FFFFFF\">$percent%</FONT></td>";
}
else
{
echo "<TR><TD BGCOLOR=\"#4682B2\" align=\"right\" width=\"".$percent."%\" ><FONT COLOR=\"#FFFFFF\">$percent%</FONT>";
$row2 = 100-$percent;
echo "</td> <TD BGCOLOR=\"#FFFFFF\" width=\"".$row2."%\" ></td></TR>";
}
flush();
?>
</TABLE>
<?php
if($UserIndex >= $NumUsers)
{
$target = $adminURL."/users/user_list.php?env=".BuildEnv()."&ResetPage=1";
}
else
{
if (($NumUsers - $UserIndex) < $UsersPerLoad)
$next = $UserIndex + ($NumUsers - $UserIndex);
else
$next = $UserIndex + $UsersPerLoad;
$target = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&UserIndex=".$next."&NumUsers=$NumUsers";
}
//print "<A HREF=\"$target\">$target</A>";
print "<script language=\"javascript\">" ;
print "setTimeout(\"document.location='$target';\",40);";
print " </script>";
?>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/banlist_apply.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/users/addgroup.php
===================================================================
--- trunk/admin/users/addgroup.php (revision 373)
+++ trunk/admin/users/addgroup.php (revision 374)
@@ -1,208 +1,208 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsGroupList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalGroup");
$objEditItems->EnablePaging = FALSE;
$objCustomFields = new clsCustomFieldList(6);
//$objRelList = new clsRelationshipList();
//Multiedit init
if ($_GET["new"] == 1)
{
$c = new clsPortalGroup(NULL);
$c->Set("CreatedOn", time());
$c->Set("EndOn", time());
$en = 0;
$action = "m_add_group";
$objGroups->CreateEmptyEditTable("GroupId");
// $objRelList->CreateEmptyEditTable("RelationshipId");
$objCustomDataList->CreateEmptyEditTable("CustomDataId");
}
else
{
$en = (int)$_GET["en"];
if (isset($_POST["itemlist"]))
{
$objGroups->CopyToEditTable("GroupId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
if(isset($_POST["itemlist"]))
{
/* make a copy of the relationship records */
$ids = $objEditItems->GetResourceIDList();
$objCustomDataList->CopyToEditTable("ResourceId",$ids);
}
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_group";
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editgroup_general';
if (strlen($c->Get("Name")))
$editing_title = "'".$c->Get("Name")."' ";
else
$editing_title = "";
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Group")." $editing_title- ".prompt_language("la_tab_General");
//echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',2);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/addgroup.php";
$StatusField = "GroupEditStatus";
$form = "editgroup";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevGroup','la_NextGroup');
}
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="editgroup" name="editgroup" action="" method=POST>
<?php int_subsection_title(prompt_language("la_tab_Group")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_group_name" class="text"><?php echo prompt_language("la_prompt_GroupName"); ?></span></td>
<td>
<input type="text" ValidationType="exists" tabindex="1" name="group_name" class="text" size="20" value="<?php echo $c->parsetag("group_name"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_Comments"); ?></span></td>
<td>
<textarea name="group_comments" tabindex="2" cols="30" rows="5" class="text"><?php echo inp_textarea_unescape($c->Get("Description")); ?></textarea>
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="group_id" value="<?php echo $c->parsetag("group_id"); ?>">
<input type="hidden" name="GroupEditStatus" VALUE="0">
</td>
</tr>
</FORM>
</table>
<SCRIPT language="JavaScript">
MarkAsRequired(document.getElementById("editgroup"));
</SCRIPT>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/addgroup.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/users/user_list.php
===================================================================
--- trunk/admin/users/user_list.php (revision 373)
+++ trunk/admin/users/user_list.php (revision 374)
@@ -1,363 +1,363 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:user_list';
$envar = "env=" . BuildEnv();
$SortFieldVar = "User_SortField";
$SortOrderVar = "User_SortOrder";
$DefaultSortField = "Login";
$PerPageVar = "Perpage_User";
$CurrentPageVar = "Page_UserList";
$CurrentFilterVar = "User_View";
$ListForm = "userlistform";
$CheckClass = "UserChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_user", "la_ToolTip_New_User",$adminURL."/users/adduser.php?$envar&new=1","swap('new_user','toolbar/tool_new_user_f2.gif');",
"swap('new_user', 'toolbar/tool_new_user.gif');","");
$objListToolBar->Add("user_edit","la_ToolTip_Edit","#", "if (UserChecks.itemChecked()) swap('user_edit','toolbar/tool_edit_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_edit', 'toolbar/tool_edit.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('adduser', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "UserChecks.addImage('user_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("user_del","la_ToolTip_Delete","#", "if (UserChecks.itemChecked()) swap('user_del','toolbar/tool_delete_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_del', 'toolbar/tool_delete.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('user_list', 'm_delete_user');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("user_primary","la_ToolTip_PrimaryGroup","#", "if (UserChecks.itemChecked()) swap('user_primary','toolbar/tool_primary_user_group_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_primary', 'toolbar/tool_primary_user_group.gif');","if (UserChecks.itemChecked()) SelectPrimaryGroup();",
"tool_primary_user_group.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_primary','$imagesURL/toolbar/tool_primary_user_group.gif','$imagesURL/toolbar/tool_primary_user_group_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_app","la_ToolTip_Approve","#","if (UserChecks.itemChecked()) swap('user_app','toolbar/tool_approve_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_app', 'toolbar/tool_approve.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('user_list', 'm_approve_user');",
"tool_approve.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_app','$imagesURL/toolbar/tool_approve.gif','$imagesURL/toolbar/tool_approve_f3.gif',1); ";
$objListToolBar->Add("user_deny","la_ToolTip_Deny","#","if (UserChecks.itemChecked()) swap('user_deny','toolbar/tool_decline_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_deny', 'toolbar/tool_decline.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('user_list', 'm_deny_user');",
"tool_deny.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_deny','$imagesURL/toolbar/tool_decline.gif','$imagesURL/toolbar/tool_decline_f3.gif',1); ";
$objListToolBar->Add("user_ban","la_ToolTip_Ban","#","if (UserChecks.itemChecked()) swap('user_ban','toolbar/tool_ban_user_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_ban', 'toolbar/tool_ban_user.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('banuser', '');",
"tool_deny.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_ban','$imagesURL/toolbar/tool_ban_user.gif','$imagesURL/toolbar/tool_ban_user_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_mail","la_ToolTip_SendMail","#", "if (UserChecks.itemChecked()) swap('user_mail','toolbar/tool_e-mail_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_mail', 'toolbar/tool_e-mail.gif');","if (UserChecks.itemChecked()) openEmailPopup('','sendmail',$CheckClass);",
"tool_e-mail.gif",FALSE,TRUE);
$listImages[] = "UserChecks.addImage('user_mail','$imagesURL/toolbar/tool_e-mail.gif','$imagesURL/toolbar/tool_e-mail_f3.gif',1); ";
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for category view menu */
$Bit_Pending=4;
$Bit_Disabled=2;
$Bit_Valid=1;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_Pending");
/* determine current view menu settings */
$UserView = $objConfig->Get("User_View");
if(!is_numeric($UserView))
{
$UserView = $Bit_All; //Set all bits ON
$UserFilter = "";
}
if($UserView & $Bit_Valid)
$Status[] = 1;
if($UserView & $Bit_Disabled)
$Status[] = 0;
if($UserView & $Bit_Pending)
$Status[] = 2;
if(count($Status)>0)
{
$UserFilter = "Status IN (".implode(",",$Status).")";
}
else
$UserFilter = "Status = -1";
$order = $objConfig->Get($SortOrderVar);
$SearchWords = $objSession->GetVariable("UserSearchWord");
$where = "(ug.PrimaryGroup!=0 OR ug.PrimaryGroup IS NULL)";
$SearchWhere = $SearchWords ? $objUsers->AdminSearchWhereClause($SearchWords) : '';
if(strlen($SearchWhere))
{
$where .= " AND (".$SearchWhere.")";
}
if(strlen($UserFilter))
$where .= " AND (".$UserFilter.")";
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$sql = "SELECT u.*,g.Name as GroupName,ELT(u.status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ','".admin_language("la_Text_Pending")."') as UserStatus, ";
$sql .="FROM_UNIXTIME(u.CreatedOn,'%m-%d-%Y %H:%i:%s') as DateCreated FROM ".GetTablePrefix()."PortalUser as u ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as ug ON (u.PortalUserId=ug.PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (ug.GroupId=g.GroupId) WHERE $where";
if(!strlen($objConfig->Get($SortFieldVar)))
$objConfig->Set($SortFieldVar,$DefaultSortField);
$orderBy = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar));
if(strlen($orderBy))
$sql .=" ORDER BY ".$orderBy;
if( GetVar('resetpage') )
{
$page = 1;
$objSession->SetVariable($CurrentPageVar,1);
}
else
{
if( GetVar('lpn') )
{
$page = GetVar('lpn');
$objSession->SetVariable($CurrentPageVar, $page);
}
else
{
$page = $objSession->GetVariable($CurrentPageVar);
}
}
//$sql .=" ".GetLimitSQL($page,(int)$objConfig->Get($PerPageVar));
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
//echo "SQL: $sql<br>";
$objUsers->Query_Item($sql, false, 'set_first');
$objSession->SetVariable($CurrentPageVar, 1);
$itemcount = QueryCount($sql);
//$title = prompt_language("la_Text_ShowingUsers")." (".$objUsers->NumItems().")";
//removed by PSK 2004-10-21
if(strlen($SearchWords))
{
$title = prompt_language("la_Text_Search_Results")." (".$itemcount.")";
}
else
$title = prompt_language("la_Text_ShowingUsers")." (".$itemcount.")";
$objListView->SetListItems($objUsers);
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView->IdField = "ResourceId";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Login",admin_language("la_prompt_Username"),1,0,$order,"width=\"15%\"",$SortFieldVar,$SortOrderVar,"Login");
$objListView->ColumnHeaders->Add("LastName",admin_language("la_prompt_Last_Name"),1,0,$order,"width=\"15%\"",$SortFieldVar,$SortOrderVar,"LastName");
$objListView->ColumnHeaders->Add("FirstName",admin_language("la_prompt_First_Name"),1,0,$order,"width=\"15%\"",$SortFieldVar,$SortOrderVar,"FirstName");
$objListView->ColumnHeaders->Add("Email",admin_language("la_prompt_Email"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"Email");
$objListView->ColumnHeaders->Add("GroupName",admin_language("la_prompt_PrimaryGroup"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"GroupName");
$objListView->ColumnHeaders->Add("DateCreated",admin_language("la_prompt_CreatedOn"),1,0,$order,"width=\"15%\"",$SortFieldVar,$SortOrderVar,"u.DateCreated");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_user_search";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$UserView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objUsers->Items);$i++)
{
$u =& $objUsers->GetItemRefByIndex($i);
$objListView->RowIcons[] = $u->StatusIcon();
}
$objListToolBar->AddToInitScript("fwLoadMenus();");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="userlistform" ID="userlistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<FORM method=POST NAME="sendmail" ID="sendmail" target="sendmail" ACTION="<?php echo $adminURL."/email/sendmail.php?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="idlist" ID="idlist" VALUE="">
<INPUT TYPE="hidden" NAME="idtype" ID="idtype" VALUE="user">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="user_list.php?env=<?php echo BuildEnv(); ?>" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
<form ID="popup" method="post" action="user_list.php?env=<?php echo BuildEnv(); ?>" name="popup">
<INPUT TYPE="hidden" NAME="grouplist">
<input TYPE="hidden" NAME="Action" VALUE="m_user_primarygroup">
<input type="hidden" NAME="userlist">
</FORM>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/user_list.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/users/adduser_images.php
===================================================================
--- trunk/admin/users/adduser_images.php (revision 373)
+++ trunk/admin/users/adduser_images.php (revision 374)
@@ -1,333 +1,333 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
//Multiedit init
$en = GetVar('en');
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$objEditItems->EnablePaging = FALSE;
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_item_image";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_images';
$sec = $objSections->GetSection($section);
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_tab_Images");
$SortFieldVar = "Image_LV_Sortfield";
$SortOrderVar = "Image_LV_Sortorder";
$DefaultSortField = "FullName";
$PerPageVar = "Perpage_Images";
$CurrentPageVar = "Page_Images";
$CurrentFilterVar = "CatImg_View";
$ListForm = "imagelistform";
$CheckClass = "ImageChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
//Display header
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser_images.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
$objListToolBar->Add("divider");
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_img", "la_ToolTip_New_Image",$adminURL."/users/user_addimage.php?".$envar,"swap('new_img','toolbar/tool_new_image_f2.gif');",
"swap('new_img', 'toolbar/tool_new_image.gif');",
"","tool_new_image.gif");
$objListToolBar->Add("img_edit","Edit","#", "if (ImageChecks.itemChecked()) swap('img_edit','toolbar/tool_edit_f2.gif');",
"if (ImageChecks.itemChecked()) swap('img_edit', 'toolbar/tool_edit.gif');","if (ImageChecks.itemChecked()) ImageChecks.check_submit('user_addimage', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "ImageChecks.addImage('img_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("img_del","Delete","#", "if (ImageChecks.itemChecked()) swap('img_del','toolbar/tool_delete_f2.gif');",
"if (ImageChecks.itemChecked()) swap('img_del', 'toolbar/tool_delete.gif');","if (ImageChecks.itemChecked()) ImageChecks.check_submit('adduser_images', 'm_img_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "ImageChecks.addImage('img_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("img_move_up","la_ToolTip_Move_Up","#", "if (ImageChecks.itemChecked()) swap('img_move_up','toolbar/tool_move_up_f2.gif');",
"if (ImageChecks.itemChecked()) swap('img_move_up', 'toolbar/tool_move_up.gif');","if (ImageChecks.itemChecked()) ImageChecks.check_submit('adduser_images', 'm_img_move_up');",
"tool_move_up.gif",FALSE,TRUE);
$listImages[] = "ImageChecks.addImage('img_move_up','$imagesURL/toolbar/tool_move_up.gif','$imagesURL/toolbar/tool_move_up_f3.gif',1); ";
$objListToolBar->Add("img_move_down","la_ToolTip_Move_Down","#", "if (ImageChecks.itemChecked()) swap('img_move_down','toolbar/tool_move_down_f2.gif');",
"if (ImageChecks.itemChecked()) swap('img_move_down', 'toolbar/tool_move_down.gif');","if (ImageChecks.itemChecked()) ImageChecks.check_submit('adduser_images', 'm_img_move_down');",
"tool_move_down.gif",FALSE,TRUE);
$listImages[] = "ImageChecks.addImage('img_move_down','$imagesURL/toolbar/tool_move_down.gif','$imagesURL/toolbar/tool_move_down_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
$Img_AllValue = 3;
$Bit_Enabled=1;
$Bit_Disabled=2;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$ImgView = $objConfig->Get($CurrentFilterVar);
$imgFilter = '';
if(!is_numeric($ImgView))
{
$ImgView = $Img_AllValue;
}
else
{
if($ImgView & $Bit_Enabled)
$Filters[] = "img.Enabled=1";
if($ImgView & $Bit_Disabled)
$Filters[] = "img.Enabled=0";
if(count($Filters))
{
$imgFilter = implode(" OR ",$Filters);
}
else
$imgFilter = "ImageId = -1";
}
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$objImageList = new clsImageList();
$objImageList->SourceTable = $objSession->GetEditTable("Images");
$sql = "SELECT ELT(img.Enabled+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ') as Status, ";
$sql .="img.AltName as AltName, img.ImageId as ImageId, img.Enabled as Enabled, img.Priority as Priority, ";
$sql .="concat(img.Name,ELT(img.DefaultImg+1,'','<br>(".admin_language("la_prompt_Primary").") ')) as FullName, ";
$sql .="if(img.LocalImage=1,'(".admin_language("la_Text_Local").") ',img.Url) as ShowURL, concat( '<IMG src=\"',";
$sql .="IF (img.LocalThumb=1, CASE WHEN ( LENGTH( img.ThumbPath ) >0 AND img.LocalThumb =1 ) ";
$sql .="THEN concat('".$rootURL."',img.ThumbPath,'?".time()."') END , img.ThumbUrl), '\">') AS Preview ";
$sql .="FROM ".$objImageList->SourceTable." as img WHERE img.ResourceId=".$c->Get("ResourceId");
if(strlen($imgFilter))
$sql .= " AND ($imgFilter)";
$order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar));
$sql .=" ORDER BY Priority DESC";
if(strlen($order))
$sql .= ", ".$order;
$sql .=" ".GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar));
$objImageList->Query_Item($sql);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
for($i=0;$i<count($objImageList->Items);$i++)
{
$img =& $objImageList->GetItemRefByIndex($i);
$icon = $imagesURL."/itemicons/icon16_image_disabled.gif";
if($img->Get("Enabled")=="1")
{
$icon = $imagesURL."/itemicons/icon16_image.gif";
}
$img->Set("Icon",$icon);
}
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objImageList);
$objListView->IdField = "ImageId";
$order = $objConfig->Get("UserImage_LV_Sortfield");
$SortOrder=0;
if($objConfig->Get($SortOrderVar)=="asc")
$SortOrder=1;
$objListView->ColumnHeaders->Add("FullName",admin_language("la_ColHeader_Image"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"FullName");
$objListView->ColumnHeaders->Add("AltName",admin_language("la_ColHeader_AltValue"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"AltName");
$objListView->ColumnHeaders->Add("ShowURL",admin_language("la_ColHeader_Url"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"ShowURL");
$objListView->ColumnHeaders->Add("Status",admin_language("la_ColHeader_Enabled"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"Status");
$objListView->ColumnHeaders->Add("Preview",admin_language("la_ColHeader_Preview"),1,0,$order,"width=\"40%\"",$SortFieldVar,$SortOrderVar,"Preview");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->CurrentPageVar = "Page_Images";
$objListView->PerPageVar = "Perpage_Images";
$objListView->CheckboxName = "itemlist[]";
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$ImgView,$Img_AllValue);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objImageList->Items);$i++)
{
$img =& $objImageList->GetItemRefByIndex($i);
$objListView->RowIcons[] = $img->Get("Icon");
}
$objListToolBar->AddToInitScript("fwLoadMenus();\n");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="imagelistform" ID="imagelistform" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_item_image">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="5">
<input type=hidden NAME="Action" VALUE="save_user_edit">
<input type="hidden" name="UserEditStatus" VALUE="0">
</td>
</tr>
</FORM>
</TBODY>
</table>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/adduser_images.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/users/user_select.php
===================================================================
--- trunk/admin/users/user_select.php (revision 373)
+++ trunk/admin/users/user_select.php (revision 374)
@@ -1,308 +1,308 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
if(strlen($_GET["section"]))
{
$section = $_GET["section"];
}
else
$section = 'in-portal:userselect';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","UserChecks");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"SelectSubmit();",
"tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_cancel_f2.gif');",
"swap('cancel', 'toolbar/tool_cancel.gif');","window.close();","tool_cancel.gif");
//$objListToolBar->AddToInitScript($listImages);
$order = $objConfig->Get("UserSelect_SortOrder");
$SearchWords = $objSession->GetVariable("UserSelectSearchWord");
if(strlen($SearchWords))
$SearchWhere = $objUsers->AdminSearchWhereClause($SearchWords);
$where = strlen($SearchWhere) ? "AND $SearchWhere" : '';
$SelectorType = $_REQUEST["Selector"] ? $_REQUEST["Selector"] : 'checkbox';
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_UserSelect";
$objListView->PerPageVar = "Perpage_User";
if(strlen($_GET["source"])>0)
{
switch($_GET["source"])
{
case "addgroup_users":
$SelectorType = "radio";
$ado = GetADODBConnection();
$sql = "SELECT Distinct(PortalUserId) FROM ".GetTablePrefix()."UserGroup WHERE GroupId=".$_GET["GroupId"];
$rs = $ado->Execute($sql);
$inlist = array();
while($rs && !$rs->EOF)
{
array_push($inlist,$rs->fields["PortalUserId"]);
$rs->MoveNext();
}
if(count($inlist)>0)
{
$catlist = implode(",",$inlist);
$field = $objConfig->Get("UserSelect_SortField");
if(!strlen($field))
$field = "Login";
$orderby = $field." ".$order;
$sql = "SELECT u.*,g.Name as GroupName,ELT(u.status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ','".admin_language("la_Text_Pending")."') as UserStatus, ";
$sql .="FROM_UNIXTIME(u.CreatedOn,'%m-%d-%Y') as DateCreated FROM ".GetTablePrefix()."PortalUser as u ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as ug ON (u.PortalUserId=ug.PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (ug.GroupId=g.GroupId) WHERE ";
$sql .= "u.PortalUserId NOT IN (".$catlist.")";
//$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_UserSelect"),$objConfig->Get("Perpage_User"));
$objUsers->Query_Item($sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."PortalUser","PortalUserId NOT IN ($catlist)",0);
}
else
{
$sql = "SELECT u.*,g.Name as GroupName,ELT(u.status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ','".admin_language("la_Text_Pending")."') as UserStatus, ";
$sql .="FROM_UNIXTIME(u.CreatedOn,'%m-%d-%Y') as DateCreated FROM ".GetTablePrefix()."PortalUser as u ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as ug ON (u.PortalUserId=ug.PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (ug.GroupId=g.GroupId) WHERE ug.PrimaryGroup!=0";
//$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_UserSelect"),$objConfig->Get("Perpage_User"));
$objUsers->Query_Item($sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."PortalUser","PortalUserId NOT IN ($catlist)",0);
}
break;
}
}
else
{
$sql = "SELECT u.*,g.Name as GroupName,ELT(u.status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ','".admin_language("la_Text_Pending")."') as UserStatus, ";
$sql .="FROM_UNIXTIME(u.CreatedOn,'%m-%d-%Y') as DateCreated FROM ".GetTablePrefix()."PortalUser as u ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as ug ON (u.PortalUserId=ug.PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (ug.GroupId=g.GroupId) WHERE ug.PrimaryGroup!=0 $where";
//$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_UserSelect"),$objConfig->Get("Perpage_User"));
$objUsers->Query_Item($sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."PortalUser","PortalUserId NOT IN ($catlist)",0);
}
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView->SetListItems($objUsers);
if(strlen($_GET["IdField"])>0)
{
$objListView->IdField = $_GET["IdField"];
}
else
$objListView->IdField = "ResourceId";
if(strlen($_GET["ReturnField"])>0)
{
$ReturnField = $_GET["ReturnField"];
}
else
$ReturnField = $objListView->IdField;
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Login",admin_language("la_prompt_Username"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","Login");
$objListView->ColumnHeaders->Add("LastName",admin_language("la_prompt_Last_Name"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","LastName");
$objListView->ColumnHeaders->Add("FirstName",admin_language("la_prompt_First_Name"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","FirstName");
$objListView->ColumnHeaders->Add("Email",admin_language("la_prompt_Email"),1,0,$order,"width=\"20%\"","User_SortField","User_SortOrder","Email");
$objListView->ColumnHeaders->Add("GroupName",admin_language("la_prompt_PrimaryGroup"),1,0,$order,"width=\"20%\"","User_SortField","User_SortOrder","GroupName");
$objListView->ColumnHeaders->Add("DateCreated",admin_language("la_prompt_CreatedOn"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","DateCreated");
$objListView->ColumnHeaders->SetSort($objConfig->Get("User_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_userselect_search";
$objListView->CheckboxName = "itemlist[]";
$objListView->SelectorType=$SelectorType;
$objListView->TotalItemCount = $itemcount;
$vals = array_keys($_GET);
for($i=0;$i<count($vals);$i++)
{
$key = $vals[$i];
if($key != "env")
{
if(strlen($extra_env))
$extra_env .= "&";
$extra_env .= $key."=".$_GET[$key];
}
}
$objListView->extra_env = $extra_env;
for($i=0;$i<count($objUsers->Items);$i++)
{
$u =& $objUsers->GetItemRefByIndex($i);
$objListView->RowIcons[] = $u->StatusIcon();
}
int_header($objListToolBar);
if(strlen($_GET["values"]))
{
$current_value = explode(",",$_GET["values"]);
}
?>
<FORM method="POST" ACTION="" NAME="userlistform" ID="userlistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]; ?>" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php
echo $_SERVER["PHP_SELF"]."?env=".BuildEnv().PassVar($_GET,'destform','destfield','Selector','IdField');
?>">
<input type="hidden" name="destform" value="<?php echo $destform; ?>">
<input type="hidden" name="dosubmit" value="<?php echo $_REQUEST['dosubmit']; ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/user_select.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/users/user_groups.php
===================================================================
--- trunk/admin/users/user_groups.php (revision 373)
+++ trunk/admin/users/user_groups.php (revision 374)
@@ -1,287 +1,287 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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 = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:user_groups';
$envar = "env=" . BuildEnv();
$SortFieldVar = "Group_SortField";
$SortOrderVar = "Group_SortOrder";
$DefaultSortField = "Name";
$PerPageVar = "Perpage_Groups";
$CurrentPageVar = "Page_Groups";
$CurrentFilterVar = "Group_View";
$ListForm = "grouplistform";
$CheckClass = "GroupChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_group", "la_ToolTip_NewGroup",$adminURL."/users/addgroup.php?".$envar."&new=1","swap('new_group','toolbar/tool_new_group_f2.gif');",
"swap('new_group', 'toolbar/tool_new_group.gif');","","tool_new_group.gif");
$objListToolBar->Add("group_edit","la_ToolTip_Edit","#", "if (GroupChecks.itemChecked()) swap('group_edit','toolbar/tool_edit_f2.gif');",
"if (GroupChecks.itemChecked()) swap('group_edit', 'toolbar/tool_edit.gif');","if (GroupChecks.itemChecked()) GroupChecks.check_submit('addgroup', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "GroupChecks.addImage('group_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("group_del","la_ToolTip_Delete","#", "if (GroupChecks.itemChecked()) swap('group_del','toolbar/tool_delete_f2.gif');",
"if (GroupChecks.itemChecked()) swap('group_del', 'toolbar/tool_delete.gif');","if (GroupChecks.itemChecked()) GroupChecks.check_submit('user_groups', 'm_delete_group');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "GroupChecks.addImage('group_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("group_mail","la_ToolTip_SendMail","#", "if (GroupChecks.itemChecked()) swap('group_mail','toolbar/tool_e-mail_f2.gif');",
"if (GroupChecks.itemChecked()) swap('group_mail', 'toolbar/tool_e-mail.gif');","if (GroupChecks.itemChecked()) openEmailPopup('','sendmail',$CheckClass);",
"tool_e-mail.gif",FALSE,TRUE);
$listImages[] = "GroupChecks.addImage('group_mail','$imagesURL/toolbar/tool_e-mail.gif','$imagesURL/toolbar/tool_e-mail_f3.gif',1); ";
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for category view menu */
$Bit_Pending=4;
$Bit_Disabled=2;
$Bit_Valid=1;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_Pending");
/* determine current view menu settings */
$GroupView = $objConfig->Get("Group_View");
if(!is_numeric($GroupView))
{
$GroupView = $Bit_All; //Set all bits ON
$GroupFilter = "";
}
else
{
if($GroupView & $Bit_Valid)
$Status[] = 1;
if($GroupView & $Bit_Disabled)
$Status[] = 0;
if($GroupView & $Bit_Pending)
$Status[] = 2;
if(count($Status)>0)
{
$GroupFilter = "Status IN (".implode(",",$Status).")";
}
else
$GroupFilter = "Status = -1";
}
$order = $objConfig->Get($SortOrderVar);
$SearchWords = $objSession->GetVariable("GroupSearchWord");
if(strlen($SearchWords))
{
$where = " Personal=0 AND ". $objGroups->AdminSearchWhereClause($SearchWords);
}
else
$where = " Personal=0 ";
if(strlen($GroupFilter))
$where .= " AND $GroupFilter ";
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$orderBy = trim($objConfig->Get($SortFieldVar)." ".$order);
if(strlen($orderBy))
$orderBy = " ORDER BY ".$orderBy;
$sql = "SELECT g.GroupId as GroupId, g.name as GroupName,g.name as name, count(u.PortalUserId) as UserCount FROM ".GetTablePrefix()."PortalGroup as g ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as u ON g.GroupId=u.GroupId WHERE $where GROUP BY g.name".$orderBy;
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$GroupList = new clsGroupList();
$GroupList->Clear();
$GroupList->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."PortalGroup", $where,0);
if(strlen($SearchWords))
{
$title = prompt_language("la_Text_Search_Results")." (".$itemcount.")";
}
else
$title = prompt_language("la_Text_ShowingGroups")." (".$itemcount.")";
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$GroupList);
$objListView->IdField = "GroupId";
$objListView->ColumnHeaders->Add("GroupName", admin_language("la_prompt_GroupName"),1,0,$order,"width=\"50%\"",$SortFieldVar,$SortOrderVar,"GroupName");
$objListView->ColumnHeaders->Add("UserCount",admin_language("la_prompt_UserCount"),1,0,$order,"width=\"50%\"",$SortFieldVar,$SortOrderVar,"UserCount");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Group_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_group_search";
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$GroupView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
$objListToolBar->AddToInitScript("fwLoadMenus();");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="grouplistform" ID="grouplistform">
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM method=POST NAME="sendmail" ID="sendmail" TARGET="sendmail" ACTION="<?php echo $adminURL."/email/sendmail.php?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="idlist" ID="idlist" VALUE="">
<INPUT TYPE="hidden" NAME="idtype" ID="idtype" VALUE="group">
</FORM>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/user_groups.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/users/group_addpermission.php
===================================================================
--- trunk/admin/users/group_addpermission.php (revision 373)
+++ trunk/admin/users/group_addpermission.php (revision 374)
@@ -1,200 +1,200 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
unset($objEditItems);
$objEditItems = new clsGroupList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalGroup");
$objEditItems->EnablePaging = FALSE;
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_group";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editgroup_permissions';
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/addgroup_permissions.php',0);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('editgroup','GroupEditStatus','".$admin."/users/addgroup_permissions.php',-1);","tool_cancel.gif");
$PermModule = $_GET["module"];
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Group")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Permissions");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/group_addpermission.php";
$StatusField = "GroupEditStatus";
$form = "editgroup";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'&module='.$_REQUEST['module'],'la_PrevGroup','la_NextGroup');
}
int_header($objCatToolBar,NULL,$title);
?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><A CLASS="control_link" HREF="javascript:edit_submit('editgroup','GroupEditStatus','<?php echo $admin; ?>/users/addgroup_permissions.php',0);"><?php echo prompt_language("la_Prompt_GeneralPermissions"); ?></A>&gt;<?php echo prompt_language("la_PermType_$PermModule"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="editgroup" name="editgroup" action="" method=POST>
<TR class="subsectiontitle">
<?php
echo "<TD>".prompt_language("la_prompt_Description")."</TD><!--<TD>".prompt_language("la_ColHeader_PermInherited")."</TD>--><TD>".prompt_language("la_ColHeader_PermAccess")."</TD></TR>\n";
?>
</TR>
<?php
$GroupId= $c->Get("GroupId");
$ado = GetADODBConnection();
$sql = "SELECT * FROM ".GetTablePrefix()."PermissionConfig WHERE ModuleId='$PermModule'";
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$permlist = array();
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$Permission = $rs->fields["PermissionName"];
echo "<tr ".int_table_color_ret().">\n";
echo " <TD>".prompt_language($rs->fields["Description"])."</TD>\n";
$checked = "";
$value = $c->HasSystemPermission($Permission);
$disabled = "";
if($value==-1)
{
$checked = " checked";
// $disabled = "DISABLED=\"true\"";
}
//echo " <TD><INPUT access=\"chk".$Permission."\" ONCLICK=\"SetAccessEnabled(this); \" TYPE=CHECKBOX name=\"inherit[]\" VALUE=\"".$Permission."\" $checked></TD>\n";
$checked = "";
if($value==1)
{
$checked = "checked";
$imgsrc = "green";
}
else
$imgsrc = "red";
echo " <TD><INPUT $disabled InheritValue=\"false\" UnInheritValue=\"false\" ID=\"chk".$Permission."\" ONCLICK=\"SetPermImage(this); \" permimg=\"img".$Permission."\" TYPE=CHECKBOX name=\"permvalue[]\" VALUE=\"".$Permission."\" $checked>";
echo " <img ID=\"img".$Permission."\" SRC=\"$imagesURL/perm_".$imgsrc.".gif\"> </TD>";
echo "</TR>";
$permlist[]=$Permission;
$rs->MoveNext();
}
?>
<input type="hidden" name="Action" value="m_group_sysperm">
<input type="hidden" name="GroupId" value="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="PermList" value="<?php echo implode(",",$permlist); ?>">
<input type="hidden" name="GroupEditStatus" value="0">
</FORM>
</TABLE>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/group_addpermission.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/users/user_mail.php
===================================================================
--- trunk/admin/users/user_mail.php (revision 373)
+++ trunk/admin/users/user_mail.php (revision 374)
@@ -1,177 +1,177 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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 = $rootURL."/images";
$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
$GroupCount = 0;
if (isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$UserList = implode(",",$_POST["itemlist"]);
$UserCount = count($_POST["itemlist"]);
}
else
{
$a = explode($_POST["itemlist"]);
$userCount = count($a);
unset($a);
$UserList = $_POST["itemlist"];
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_sendmail";
}
$envar = "env=" . BuildEnv();
$section = 'in-portal:edituser_sendmail';
$title = prompt_language("la_Text_Send")." ".prompt_language("la_Text_Email")." ".prompt_language("la_Text_To")." $UserCount ".prompt_language("la_Text_Users");
echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
int_header(NULL,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="mailuser" name="mailuser" action="" method=POST>
<tr <?php int_table_color(); ?>>
<td valign="top" colspan="3"><?php echo prompt_language("la_prompt_Enable_HTML"); ?>
<input type="checkbox" name="html_enable" value="1">
<br>
<?php int_hint(prompt_language("la_Warning_Enable_HTML")); ?>
</td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_EmailMessage")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_EmailSubject"); ?></span></td>
<td>
<input type="text" name="email_subject" class="text" size="30" value="">
</td>
<td><span ID="valSubject" class="validation_error"><?php echo prompt_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_EmailBody"); ?></span></td>
<td>
<textarea name="email_body" cols="30" rows="5" class="text"></textarea>
</td>
<td><span ID="valBody" class="validation_error"><?php echo prompt_language("la_val_RequiredField"); ?></span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="idlist" value="<?php echo $UserList; ?>">
<input type="hidden" name="IdType" VALUE="user">
<input type="button" name="submit1" value="<?php echo admin_language("la_Save"); ?>" class="button" onclick="edit_submit('mailuser','<?php echo $admin; ?>/users/user_list.php',1);">
<input type="button" name="submit3" value="<?php echo admin_language("la_Cancel"); ?>" class="button" onclick="edit_submit('mailuser','<?php echo $admin; ?>/users/user_list.php',2);">
</td>
</tr>
</FORM>
</table>
<SCRIPT LANGUAGE="JavaScript">
InitValidation();
</SCRIPT>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/user_mail.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/users/addrule.php
===================================================================
--- trunk/admin/users/addrule.php (revision 373)
+++ trunk/admin/users/addrule.php (revision 374)
@@ -1,257 +1,257 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsBanRuleList();
$objEditItems->SourceTable = $objSession->GetEditTable("BanRules");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
if ($_GET["new"] == 1)
{
$c = new clsBanRule(NULL);
$c->Set("ItemType", 6);
$c->Set("Priority", 0);
$en = 0;
$action = "m_add_rule";
$objBanList->CreateEmptyEditTable("RuleId");
}
else
{
$en = (int)$_GET["en"];
if (isset($_POST["itemlist"]))
{
$objBanList->CopyToEditTable("RuleId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_rule";
}
//$envar = "env=".BuildEnv()."&en=$en&section=".$secvar;
if (strlen($secvar = $_GET["section"]))
$addSection = "&section=$secvar";
//echo "TEST: $secvar";
$section = 'in-portal:user_rule_edit';
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Rule");
//echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('rule','RuleEditStatus','".$admin."/config/edit_banlist.php',1,'$addSection&DataType=6');","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('rule','RuleEditStatus','".$admin."/config/edit_banlist.php',2,'$addSection&DataType=6');","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/addrule.php";
$StatusField = "RuleEditStatus";
$form = "rule";
MultiEditButtons($objCatToolBar, $en_next, $en_prev, $form, $StatusField, $url, $sec->Get("OnClick"), $addSection);
$objCatToolBar->Add("divider");
}
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="rule" name="rule" action="" method=POST>
<?php int_subsection_title(prompt_language("la_tab_Rule")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_rule_type" class="text"><?php echo prompt_language("la_prompt_RuleType"); ?></span></td>
<td>
<SELECT name="rule_type" tabindex="4">
<option value="0"<?php if($c->Get("RuleType")==0) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Deny"); ?></OPTION>
<option value="1"<?php if($c->Get("RuleType")==1) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Allow"); ?></OPTION>
</SELECT>
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_ItemField"); ?></span></td>
<td>
<SELECT name="rule_field" tabindex="5">
<option value="ip"<?php if($c->Get("ItemField")=="ip") echo " SELECTED"; ?>><?php echo admin_language("la_Text_IPAddress"); ?></OPTION>
<option value="Login"<?php if($c->Get("ItemField")=="Login") echo " SELECTED"; ?>><?php echo admin_language("la_Text_Login"); ?></OPTION>
<option value="Email"<?php if($c->Get("ItemField")=="Email") echo " SELECTED"; ?>><?php echo admin_language("la_Text_Email"); ?></OPTION>
<option value="FirstName"<?php if($c->Get("ItemField")=="FirstName") echo " SELECTED"; ?>><?php echo admin_language("la_Text_FirstName"); ?></OPTION>
<option value="LastName"<?php if($c->Get("ItemField")=="LastName") echo " SELECTED"; ?>><?php echo admin_language("la_Text_LastName"); ?></OPTION>
<option value="Address"<?php if($c->Get("ItemField")=="Address") echo " SELECTED"; ?>><?php echo admin_language("la_Text_Address"); ?></OPTION>
<option value="City"<?php if($c->Get("ItemField")=="City") echo " SELECTED"; ?>><?php echo admin_language("la_Text_City"); ?></OPTION>
<option value="State"<?php if($c->Get("ItemField")=="State") echo " SELECTED"; ?>><?php echo admin_language("la_Text_State"); ?></OPTION>
<option value="Zip"<?php if($c->Get("ItemField")=="Zip") echo " SELECTED"; ?>><?php echo admin_language("la_Text_Zip"); ?></OPTION>
<option value="Phone"<?php if($c->Get("ItemField")=="Phone") echo " SELECTED"; ?>><?php echo admin_language("la_Text_Phone"); ?></OPTION>
</SELECT>
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_ItemVerb"); ?></span></td>
<td>
<SELECT name="rule_verb" tabindex="6">
<option value="0"<?php if($c->Get("ItemVerb")==0) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Any"); ?></OPTION>
<option value="1"<?php if($c->Get("ItemVerb")==1) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Is"); ?></OPTION>
<option value="2"<?php if($c->Get("ItemVerb")==2) echo " SELECTED"; ?>><?php echo admin_language("la_Text_IsNot"); ?></OPTION>
<option value="3"<?php if($c->Get("ItemVerb")==3) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Contains"); ?></OPTION>
<option value="4"<?php if($c->Get("ItemVerb")==4) echo " SELECTED"; ?>><?php echo admin_language("la_Text_NotContains"); ?></OPTION>
<option value="5"<?php if($c->Get("ItemVerb")==5) echo " SELECTED"; ?>><?php echo admin_language("la_Text_GreaterThan"); ?></OPTION>
<option value="6"<?php if($c->Get("ItemVerb")==6) echo " SELECTED"; ?>><?php echo admin_language("la_Text_LessThan"); ?></OPTION>
<option value="7"<?php if($c->Get("ItemVerb")==7) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Exists"); ?></OPTION>
<option value="8"<?php if($c->Get("ItemVerb")==8) echo " SELECTED"; ?>><?php echo admin_language("la_Text_Unique"); ?></OPTION>
</SELECT>
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_rule_value" class="text"><?php echo prompt_language("la_prompt_ItemValue"); ?></span></td>
<td>
<input type="text" ValidationType="exists" tabindex="7" name="rule_value" class="text" size="20" value="<?php echo $c->Get("ItemValue"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_ErrorTag"); ?></span></td>
<td>
<input type="text" name="rule_error" tabindex="8" class="text" size="20" value="<?php echo $c->Get("ErrorTag"); ?>">
<?php if(strlen($c->Get("ErrorTag"))) echo prompt_language($c->Get("ErrorTag")); ?>
</td>
<td></td>
</tr>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Priority"); ?></TD>
<TD><input type=text SIZE="5" NAME="rule_priority" tabindex="9" VALUE="<?php echo $c->Get("Priority"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Status"); ?></TD>
<TD>
<input type="RADIO" NAME="rule_status" tabindex="10" <?php if($c->Get("Status")==1) echo "CHECKED"; ?> VALUE="1"><?php echo prompt_language("la_Text_Enabled"); ?>
<input type="RADIO" NAME="rule_status" tabindex="10" <?php if($c->Get("Status")==0) echo "CHECKED"; ?> VALUE="0"><?php echo prompt_language("la_Text_Disabled"); ?>
</TD>
<TD></TD>
</TR>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="rule_id" value="<?php echo $c->Get("RuleId"); ?>">
<input type="hidden" name="RuleEditStatus" VALUE="0">
<input type="hidden" name="rule_itemtype" VALUE=6>
</td>
</tr>
</FORM>
</table>
<SCRIPT language="JavaScript">
MarkAsRequired(document.getElementById("rule"));
</SCRIPT>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/addrule.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/users/adduser_custom.php
===================================================================
--- trunk/admin/users/adduser_custom.php (revision 373)
+++ trunk/admin/users/adduser_custom.php (revision 374)
@@ -1,234 +1,234 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = GetVar('en');
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_user";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_custom';
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_tab_Custom");
$formaction = $adminURL."/user/adduser_custom.php?".$envar;
//Display header
$sec = $objSections->GetSection($section);
$objListToolbar = new clsToolBar();
$objListToolbar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objListToolbar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser_custom.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objListToolbar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
}
int_header($objListToolbar,NULL,$title);
?>
<form ID="edituser" name="edituser" action="" method=POST>
<?php
$objCustomFields = new clsCustomFieldList(6);
$field_list = $objCustomFieldList->Query_CustomField("Type=6");
$objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData");
$objCustomDataList->LoadResource($c->Get("ResourceId"));
for($i=0;$i<$objCustomFields->NumItems(); $i++)
{
$field =& $objCustomFields->GetItemRefByIndex($i);
$fieldid = $field->Get("CustomFieldId");
$f = $objCustomDataList->GetDataItem($fieldid);
$fieldname = "CustomData[$fieldid]";
if(is_object($f))
{
$val_field = "<input type=\"text\" tabindex=\"".($i+1)."\" VALUE=\"".$f->Get("Value")."\" name=\"$fieldname\">";
$field->Set("Value", $val_field);
$field->Set("DataId",$f->Get("CustomDataId"));
}
else
{
$val_field = "<input type=\"text\" tabindex=\"".($i+1)."\" VALUE=\"\" name=\"$fieldname\">";
$field->Set("Value", $val_field);
$field->Set("DataId",0);
}
}
$objCustomFields->SortField = $objConfig->Get("CustomData_LV_Sortfield");;
$objCustomFields->SortItems($objConfig->Get("CustomData_LV_Sortorder")!="desc");
$objListView = new clsListView($objListToolbar,$objCustomFields);
$objListView->IdField = "DataId";
$order = $objConfig->Get("CustomData_LV_Sortfield");
$SortOrder=0;
if($objConfig->Get("CustomData_LV_Sortorder")=="asc")
$SortOrder=1;
$objListView->ColumnHeaders->Add("FieldName",admin_language("la_ColHeader_FieldName"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldName");
$objListView->ColumnHeaders->Add("FieldLabel",admin_language("la_ColHeader_FieldLabel"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldLabel");
$objListView->ColumnHeaders->Add("Value",admin_language("la_ColHeader_Value"),1,0,$order,"width=\"40%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","Value");
$objListView->ColumnHeaders->SetSort($objConfig->Get("CustomData_LV_Sortfield"), $objConfig->Get("CustomData_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = FALSE;
$objListView->PageURL = "javascript:page_submit('edituser','".$adminURL."/users/adduser_custom.php',0,'{TargetPage}');";
$objListView->CurrentPageVar = "Page_CustomData";
$objListView->PerPageVar = "Perpage_CustomData";
//$objListView->CheckboxName = "itemlist[]";
for($i=0;$i<count($objCustomFields->Items);$i++)
{
$objListView->RowIcons[] = $imagesURL."/itemicons/icon16_custom.gif";
}
$objListView->PageLinks = $objListView->PrintPageLinks();
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="ItemId" value="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_edit_custom_data">
<input type="hidden" name="UserEditStatus" VALUE="0">
</FORM>
<FORM method="POST" NAME="save_edit" ID="save_edit">
<tr <?php int_table_color(); ?>>
<td colspan="3">
</td>
</tr>
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/adduser_custom.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/users/adduser_permissions.php
===================================================================
--- trunk/admin/users/adduser_permissions.php (revision 373)
+++ trunk/admin/users/adduser_permissions.php (revision 374)
@@ -1,209 +1,209 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = GetVar('en');
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_user";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_permissions';
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_tab_Permissions");
$formaction = $adminURL."/user/adduser_permissions.php?".$envar;
//Display header
$sec = $objSections->GetSection($section);
//echo "<pre>"; print_r($sec); echo "</pre>";
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser_permissions.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
}
int_header($objCatToolBar,NULL,$title);
?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><?php echo prompt_language("la_Prompt_GeneralPermissions"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<FORM ID="edituser" NAME="edituser" method="POST" ACTION="">
<?php
$Mod_names = array();
$Mod_ids = array();
$Mod_names[] = admin_language("la_PermType_Admin");
$Mod_ids[] = "Admin";
$Mod_names[] = admin_language("la_PermType_Front");
$Mod_ids[] = "Front";
$UserId = $c->Get("PortalUserId");
for($i=0;$i<count($Mod_ids);$i++)
{
$module = $Mod_names[$i];
$mod_id = $Mod_ids[$i];
echo "<TR ".int_table_color_ret().">";
echo "<TD><IMG src=\"".$imagesURL."/itemicons/icon16_permission.gif\"> ";
$getvar = "?env=".BuildEnv()."&en=$en&module=$mod_id";
echo "<A class=\"NAV_URL\" HREF=\"".$adminURL."/users/user_addpermission.php$getvar\">$module</A></TD>";
echo "</TR>";
}
?>
</TBODY>
</TABLE>
<input type="hidden" name="ItemId" value="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_noop">
<input type="hidden" name="UserEditStatus" VALUE="0">
</FORM>
<FORM method="POST" NAME="save_edit" ID="save_edit">
<tr <?php int_table_color(); ?>>
<td colspan="3">
</td>
</tr>
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/users/adduser_permissions.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/users/adduser_groups.php
===================================================================
--- trunk/admin/users/adduser_groups.php (revision 373)
+++ trunk/admin/users/adduser_groups.php (revision 374)
@@ -1,323 +1,323 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)GetVar('en');
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_user";
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:edituser_groups';
$sec = $objSections->GetSection($section);
$envar = "env=" . BuildEnv() . "&en=$en";
$SortFieldVar = "UserGroup_SortOrder";
$SortOrderVar = "UserGroup_SortOrder";
$DefaultSortField = "Name";
$PerPageVar = "Perpage_Groups";
$CurrentPageVar = "Page_Groups";
$CurrentFilterVar = "Group_View";
$ListForm = "edituser";
$CheckClass = "GroupChecks";
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." '".$c->Get("Login")."' - ".prompt_language("la_tab_Groups");
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser_groups.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
$objListToolBar->Add("divider");
}
$listImages = array();
$objListToolBar->Add("new_group", "la_ToolTip_AddToGroup","","swap('new_group','toolbar/tool_usertogroup_f2.gif');",
"swap('new_group', 'toolbar/tool_usertogroup.gif');",
"OpenGroupSelector('$envar&source=adduser_groups&UserId=".$c->Get("PortalUserId")."&destform=group&destfield=grouplist');",
"tool_usertogroup.gif");
$objListToolBar->Add("user_del","la_ToolTip_DeleteFromGroup","#", "if (GroupChecks.itemChecked()) swap('user_del','toolbar/tool_delete_f2.gif');",
"if (GroupChecks.itemChecked()) swap('user_del', 'toolbar/tool_delete.gif');","if (GroupChecks.itemChecked()) GroupChecks.check_submit('adduser_groups', 'm_user_removegroup');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "GroupChecks.addImage('user_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$order = $objConfig->Get($SortOrderVar);
$GroupList = $c->GetGroupList();
$objGroups->Clear();
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for category view menu */
$Bit_Pending=4;
$Bit_Disabled=2;
$Bit_Valid=1;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_Pending");
/* determine current view menu settings */
$GroupView = $objConfig->Get($CurrentFilterVar);
if(!is_numeric($GroupView))
{
$GroupView = $Bit_All; //Set all bits ON
$GroupFilter = "";
}
else
{
if($GroupView & $Bit_Valid)
$Status[] = 1;
if($GroupView & $Bit_Disabled)
$Status[] = 0;
if($GroupView & $Bit_Pending)
$Status[] = 2;
if(count($Status)>0)
{
$GroupFilter = "Status IN (".implode(",",$Status).")";
}
else
$GroupFilter = "Status = -1";
}
$order = $objConfig->Get($SortOrderVar);
$SearchWords = $objSession->GetVariable("GroupSearchWord");
if(strlen($SearchWords))
{
$where = " AND ". $objGroups->AdminSearchWhereClause($SearchWords);
}
else
$where = '';
if(strlen($GroupFilter))
$where .= " AND $GroupFilter ";
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$orderBy = trim($objConfig->Get($SortFieldVar)." ".$order);
if(strlen($orderBy))
$orderBy = " ORDER BY ".$orderBy;
$sql = "SELECT g.GroupId as GroupId, g.name as GroupName, count(u.PortalUserId) as UserCount FROM ".GetTablePrefix()."PortalGroup as g ";
$sql .="INNER JOIN ".GetTablePrefix()."UserGroup as u ON g.GroupId=u.GroupId WHERE u.PortalUserId=".$c->Get("PortalUserId")." $where GROUP BY g.name".$orderBy;
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
//echo "SQL: $sql<br>";
$objGroups->Query_Item($sql);
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objGroups);
$objListView->IdField = "GroupId";
$objListView->ColumnHeaders->Add("GroupName", admin_language("la_prompt_GroupName"),1,0,$order,"width=\"50%\"",$SortFieldVar,$SortOrderVar,"GroupName");
$objListView->ColumnHeaders->Add("UserCount",admin_language("la_prompt_UserCount"),1,0,$order,"width=\"50%\"",$SortFieldVar,$SortOrderVar,"UserCount");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Group_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_group_search";
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$GroupView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
$objListToolBar->AddToInitScript("fwLoadMenus();");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="edituser" ID="edituser">
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
<INPUT TYPE="HIDDEN" NAME="UserId" VALUE="<?php echo $c->Get("PortalUserId"); ?>">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="5">
<input type=hidden NAME="Action" VALUE="save_user_edit">
<input type="hidden" name="UserEditStatus" VALUE="0">
</td>
</tr>
</FORM>
<FORM NAME="group" ID="group" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<INPUT TYPE="hidden" NAME="grouplist">
<input TYPE="hidden" NAME="Action" VALUE="m_user_addto_group">
<INPUT TYPE="HIDDEN" NAME="UserId" VALUE="<?php echo $c->Get("PortalUserId"); ?>">
</FORM>
<!-- CODE FOR VIEW MENU -->
<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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/adduser_groups.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/users/addgroup_users.php
===================================================================
--- trunk/admin/users/addgroup_users.php (revision 373)
+++ trunk/admin/users/addgroup_users.php (revision 374)
@@ -1,326 +1,326 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
unset($objEditItems);
$objEditItems = new clsGroupList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalGroup");
$objEditItems->EnablePaging = FALSE;
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_group";
$envar = "env=" . BuildEnv() . "&en=$en";
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:editgroup_users';
$sec = $objSections->GetSection($section);
$SortFieldVar = "User_SortField";
$SortOrderVar = "User_SortOrder";
$DefaultSortField = "Login";
$PerPageVar = "Perpage_User";
$CurrentPageVar = "Page_UserList";
$CurrentFilterVar = "User_View";
$ListForm = "editgroup";
$CheckClass = "UserChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('editgroup','GroupEditStatus','".$admin."/users/user_groups.php',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/addgroup_users.php";
$StatusField = "GroupEditStatus";
$form = "editgroup";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevGroup','la_NextGroup');
$objListToolBar->Add("divider");
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_group", "la_ToolTip_AddUserToGroup","","swap('new_group','toolbar/tool_usertogroup_f2.gif');",
"swap('new_group', 'toolbar/tool_usertogroup.gif');",
"OpenUserSelector('','','$envar&source=addgroup_users&GroupId=".$c->Get("GroupId")."&destform=popup&destfield=userlist&Selector=radio&dosubmit=1');",
"tool_usertogroup.gif");
$objListToolBar->Add("user_del","la_ToolTip_RemoveUserFromGroup","#", "if (UserChecks.itemChecked()) swap('user_del','toolbar/tool_delete_f2.gif');",
"if (UserChecks.itemChecked()) swap('user_del', 'toolbar/tool_delete.gif');","if (UserChecks.itemChecked()) UserChecks.check_submit('addgroup_users', 'm_group_removeuser');",
"tool_delete.gif");
$listImages[] = "UserChecks.addImage('user_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for category view menu */
$Bit_Pending=4;
$Bit_Disabled=2;
$Bit_Valid=1;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_Pending");
/* determine current view menu settings */
$UserView = $objConfig->Get("User_View");
if(!is_numeric($UserView))
{
$UserView = $Bit_All; //Set all bits ON
$UserFilter = "";
}
if($UserView & $Bit_Valid)
$Status[] = 1;
if($UserView & $Bit_Disabled)
$Status[] = 0;
if($UserView & $Bit_Pending)
$Status[] = 2;
if(count($Status)>0)
{
$UserFilter = "Status IN (".implode(",",$Status).")";
}
else
$UserFilter = "Status = -1";
$GroupUsers = $c->GetUserList();
if(count($GroupUsers)>0)
{
$list = implode(",",$GroupUsers);
$where = "u.PortalUserId IN ($list) ";
}
else
$where = "u.PortalUserId = -1 ";
$order = $objConfig->Get("User_SortOrder");
$SearchWords = $objSession->GetVariable("UserGroupSearchWord");
if(strlen($SearchWords))
{
$where .= $objUsers->AdminSearchWhereClause($SearchWords);
}
$sql = "SELECT u.*,g.Name as GroupName,ELT(u.status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ','".admin_language("la_Text_Pending")."') as UserStatus, ";
$sql .="FROM_UNIXTIME(u.CreatedOn,'%m-%d-%Y') as DateCreated FROM ".GetTablePrefix()."PortalUser as u ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as ug ON (u.PortalUserId=ug.PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (ug.GroupId=g.GroupId) WHERE ug.PrimaryGroup!=0";
if(strlen($where))
$sql .= " AND ".$where;
//$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_Userlist"),$objConfig->Get("Perpage_User"));
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_Userlist";
$objListView->PerPageVar = "Perpage_User";
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objUsers->Query_Item($sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."PortalUser","PortalUserId IN ($list)",0);
$objListView->SetListItems($objUsers);
$objListView->IdField = "ResourceId";
$objListView->PageLinkTemplate = $pathtoroot. $admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Login",admin_language("la_prompt_Username"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","Login");
$objListView->ColumnHeaders->Add("LastName",admin_language("la_prompt_Last_Name"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","LastName");
$objListView->ColumnHeaders->Add("FirstName",admin_language("la_prompt_First_Name"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","FirstName");
$objListView->ColumnHeaders->Add("Email",admin_language("la_prompt_Email"),1,0,$order,"width=\"20%\"","User_SortField","User_SortOrder","Email");
$objListView->ColumnHeaders->Add("GroupName",admin_language("la_prompt_PrimaryGroup"),1,0,$order,"width=\"20%\"","User_SortField","User_SortOrder","GroupName");
$objListView->ColumnHeaders->Add("DateCreated",admin_language("la_prompt_CreatedOn"),1,0,$order,"width=\"15%\"","User_SortField","User_SortOrder","DateCreated");
$objListView->ColumnHeaders->SetSort($objConfig->Get("User_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_usergroup_search";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
for($i=0;$i<count($objUsers->Items);$i++)
{
$u =& $objUsers->GetItemRefByIndex($i);
$objListView->RowIcons[] = $u->StatusIcon();
}
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$UserView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Group")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Users");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="editgroup" ID="editgroup">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
<INPUT TYPE="HIDDEN" NAME="GroupId" VALUE="<?php echo $c->Get("GroupId"); ?>">
<input type="hidden" name="GroupEditStatus" VALUE="0">
</FORM>
<FORM NAME="popup" ID="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="hidden" NAME="userlist">
<input TYPE="hidden" NAME="Action" VALUE="m_group_add_user">
<INPUT TYPE="HIDDEN" NAME="GroupId" VALUE="<?php echo $c->Get("GroupId"); ?>">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="5">
<input type=hidden NAME="Action" VALUE="save_user_edit">
<input type="hidden" name="GroupEditStatus" VALUE="0">
</td>
</tr>
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/users/addgroup_users.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/users/adduser.php
===================================================================
--- trunk/admin/users/adduser.php (revision 373)
+++ trunk/admin/users/adduser.php (revision 374)
@@ -1,376 +1,376 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
$objEditItems = new clsUserManager();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
$objCustomFields = new clsCustomFieldList(6);
$objRelList = new clsRelationshipList();
$objImages = new clsImageList();
//$objUserGroupsList = new clsUserGroupList();
//Multiedit init
if ( GetVar('new') == 1)
{
$c = new clsPortalUser(NULL);
$c->Set("CreatedOn", time());
$c->Set("Status", 2);
$en = 0;
$action = "m_add_user";
$objUsers->CreateEmptyEditTable("PortalUserId");
$objRelList->CreateEmptyEditTable("RelationshipId");
$objCustomDataList->CreateEmptyEditTable("CustomDataId");
$objImages->CreateEmptyEditTable("ResourceId");
//$objUserGroupsList->CreateEmptyEditTable("PortalUserId");
}
else
{
$en = GetVar('en');
if (isset($_POST["itemlist"]))
{
$objUsers->CopyToEditTable("ResourceId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$first=1;
foreach($objEditItems->Items as $u)
{
$objItemTypes->BuildUserItemTable($u->Get("PortalUserId"),$first);
$first=0;
}
if(isset($_POST["itemlist"]))
{
/* make a copy of the relationship records */
$ids = $objEditItems->GetResourceIDList();
$objRelList->CopyToEditTable("SourceId",$ids);
$objCustomDataList->CopyToEditTable("ResourceId",$ids);
$objImages->CopyToEditTable("ResourceId",$ids);
//$objUserGroupsList->CopyToEditTable("PortalUserId", $ids);
}
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_user";
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_general';
if (strlen($c->Get("Login")))
$editing_title = "'".$c->Get("Login")."' ";
else
$editing_title = "";
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_User")." $editing_title- ".prompt_language("la_tab_General");
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('edituser','UserEditStatus','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
}
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="edituser" name="edituser" action="" method=POST>
<?php int_subsection_title(prompt_language("la_Text_User")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_login" class="text"><?php echo prompt_language("la_prompt_Usermame"); ?></span></td>
<td>
<input type="text" tabindex="1" name="user_login" ID="user_login" class="text" ValidationType="exists" size="20" value="<?php echo isset($dupe_user) && $dupe_user ? $dupe_user : $c->parsetag("user_login"); ?>">
<span class="validation_error"><?php if( isset($dupe_user) && $dupe_user ) echo admin_language($lvErrorString); ?></span>
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_password" class="text"><?php echo prompt_language("la_prompt_Password"); ?></span></td>
<td>
<input type="password" id="password" tabindex="2" name="password" class="text" ValidationType="password" size="20" value="">
<?php if( !GetVar('new') ) echo prompt_language("la_password_info"); ?>
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_password_verify" class="text"><?php echo prompt_language("la_prompt_PasswordRepeat"); ?></span></td>
<td>
<input type="password" id="password_verify" tabindex="4" name="password_verify" class="text" size="20" value="">
</td>
<td></td>
</tr>
<?php int_subsection_title(prompt_language("la_prompt_PersonalInfo")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_firstname" class="text"><?php echo prompt_language("la_prompt_FirstName"); ?></span></td>
<td>
<input type="text" name="user_firstname" class="text" tabindex="5" size="30" value="<?php echo $c->parsetag("user_firstname"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_lastname" class="text"><?php echo prompt_language("la_prompt_LastName"); ?></span></td>
<td>
<input type="text" name="user_lastname" class="text" tabindex="6" size="30" value="<?php echo $c->parsetag("user_lastname"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_user_email" class="text"><?php echo prompt_language("la_prompt_Email"); ?></span></td>
<td>
<input type="text" ValidationType="exists" name="user_email" tabindex="7" ID="user_email" class="text" size="30" value="<?php echo $c->parsetag("user_email"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><SPAN id="prompt_user_dob" class="text"><?php echo prompt_language("la_prompt_birthday"); ?></SPAN></td>
<td>
<input type="text" ValidationType="date,exists" tabindex="8" name="user_dob" id="user_dob_selector" datepickerIcon="<?php echo $adminURL; ?>/images/ddarrow.gif" class="text" size="20" value="<?php echo $c->parsetag("user_dob"); ?>">
<span class="small"><?php echo prompt_language("la_prompt_DateFormat"); ?></span></td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_phone" class="text"><?php echo prompt_language("la_prompt_Phone"); ?></span></td>
<td>
<input type="text" name="user_phone" tabindex="9" class="text" size="30" value="<?php echo $c->parsetag("user_phone"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_street" class="text"><?php echo prompt_language("la_prompt_Street"); ?></span></td>
<td>
<input type="text" name="user_street" tabindex="10" class="text" size="40" value="<?php echo $c->parsetag("user_street"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_city" class="text"><?php echo prompt_language("la_prompt_City"); ?></span></td>
<td>
<input type="text" name="user_city" class="text" tabindex="11" size="30" value="<?php echo $c->parsetag("user_city"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_state" class="text"><?php echo prompt_language("la_prompt_State"); ?></span></td>
<td>
<input type="text" name="user_state" class="text" tabindex="12" size="20" value="<?php echo $c->parsetag("user_state"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_zip" class="text"><?php echo prompt_language("la_prompt_Zip"); ?></span></td>
<td>
<input type="text" name="user_zip" class="text" size="15" tabindex="13" value="<?php echo $c->parsetag("user_zip"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_user_country" class="text"><?php echo prompt_language("la_prompt_Country"); ?></span></td>
<td>
<input type="text" name="user_country" class="text" tabindex="14" size="30" value="<?php echo $c->parsetag("user_country"); ?>">
</td>
<td><span class="text">&nbsp;</span></td>
</tr>
<?php int_subsection_title(prompt_language("la_prompt_Properties")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_status" class="text"><?php echo prompt_language("la_prompt_Status"); ?></span></td>
<td>
<input type="radio" name="status" class="text" tabindex="15" value="1" <?php if($c->Get("Status") == 1) echo "checked"; ?>><?php echo prompt_language("la_val_Active"); ?>
<input type="radio" name="status" class="text" tabindex="15" value="2" <?php if($c->Get("Status") == 2) echo "checked"; ?>><?php echo prompt_language("la_val_Pending"); ?>
<input type="radio" name="status" class="text" tabindex="15" value="0" <?php if($c->Get("Status") == 0) echo "checked"; ?>><?php echo prompt_language("la_val_Disabled"); ?>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><SPAN id="prompt_user_date" class="text"><?php echo prompt_language("la_prompt_CreatedOn"); ?></SPAN></td>
<td>
<input type="text" name="user_date" id="user_date_selector" tabindex="16" datepickerIcon="<?php echo $adminURL; ?>/images/ddarrow.gif" class="text" size="20" value="<?php echo $c->parsetag("user_date"); ?>">
<span class="small"><?php echo prompt_language("la_prompt_DateFormat"); ?></span></td>
<td></td>
</tr>
<?php
$CustomFieldUI = $objCustomFields->GetFieldUIList(TRUE);
if($CustomFieldUI->NumItems()>0)
{
$objCustomDataList->SetTable('edit');
if((int)$c->Get("ResourceId")>0)
$objCustomDataList->LoadResource($c->Get("ResourceId"));
$headings = $CustomFieldUI->GetHeadingList();
//echo "<PRE>";print_r($objCustomFields); echo "</PRE>";
for($i=0;$i<=count($headings);$i++)
{
$h = $headings[$i];
if(strlen($h))
{
int_subsection_title(prompt_language($h));
$Items = $CustomFieldUI->GetHeadingItems($h);
foreach($Items as $f)
{
if ($f->TabIndex)
$n = substr($f->name,1);
$cfield = $objCustomFields->GetItemByField("FieldName",$n,FALSE);
if(is_object($cfield))
{
$cv = $objCustomDataList->GetDataItem($cfield->Get("CustomFieldId"));
if(is_object($cv))
{
$f->default_value = $cv->Get("Value");
}
}
print "<tr ".int_table_color_ret().">\n";
print " <td valign=\"top\"><span class=\"text\">".$f->GetPrompt()."</span></td>\n";
print " <td nowrap>".$f->ItemFormElement(17)."</TD>";
if(is_object($f->NextItem))
{
$n = $f->NextItem;
print " <td>".$n->ItemFormElement(17)."</TD>";
}
else
print " <td><span class=\"text\">&nbsp;</span></td>\n";
print "</tr>\n";
}
}
}
$objCustomDataList->SetTable('live');
}
?>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="user_id" value="<?php echo $c->Get("PortalUserId"); ?>">
<input type="hidden" name="UserEditStatus" VALUE="0">
</td>
</tr>
</td>
</tr>
</table>
</form>
<script src="<?php echo $adminURL; ?>/include/calendar.js"></script>
<SCRIPT language="JavaScript">
initCalendar("user_date_selector", CalDateFormat);
initCalendar("user_dob_selector", CalDateFormat);
</SCRIPT>
<?php
MarkFields('edituser');
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/users/adduser.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/users/adduser_items.php
===================================================================
--- trunk/admin/users/adduser_items.php (revision 373)
+++ trunk/admin/users/adduser_items.php (revision 374)
@@ -1,310 +1,310 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key => $value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if( file_exists($path) ) include_once($path);
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("PortalUser");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = GetVar('en');
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
$objImageList = new clsImageList();
$objImageList->Query_Images("ResourceId=".$c->Get("ResourceId"),"");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_item_list";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:edituser_items';
$sec = $objSections->GetSection($section);
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_User")." '".$c->Get("Login")."' - ".admin_language("la_tab_Images");
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','".$admin."/users/user_list.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','".$admin."/users/user_list.php',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ImageChecks");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/users/adduser_items.php";
$StatusField = "UserEditStatus";
$form = "edituser";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevUser','la_NextUser');
$objListToolBar->Add("divider");
}
$listImages = array();
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_User")." '".$c->Get("Login")."' - ".admin_language("la_tab_ItemList");
int_header($objListToolBar,NULL, $title);
?>
<form name="edituser" ID="edituser" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
if( GetVar('lpn') )
{
$objSession->SetVariable("Page_Items",(int)$_GET["lpn"]);
$page = (int)$_GET["lpn"];
}
else
{
$page = $objSession->GetVariable("Page_Items");
}
$objItems = new clsMultiTypeList();
$table = $objSession->GetEditTable("UserItems"); //$objSession->GetSessionKey()."_UserItems";
$objItems->SourceTable = $table;
// ==== build sql depending on modules installed: begin ====
$prefix = GetTablePrefix();
$modules = $objModules->GetModuleList();
$sql_source = $objModules->ExecuteFunction('GetModuleInfo', 'rel_list');
$sql_templates['ItemName'] = 'IFNULL('.$prefix."%s.%s,' ')";
$sql_templates['TableJoin'] = 'LEFT JOIN '.$prefix."%1\$s ON ".$prefix."%1\$s.ResourceId = ut.ResourceId";
$sql_templates['ItemType'] = "IF(ut.ItemType = %s, '%s', %s)";
$sql = "SELECT TRIM(CONCAT(%s)) AS ItemName, %s AS ItemTypeStr, ut.ItemType as ItemType, ".
'ut.ResourceId as ItemId FROM '.$table." ut %s ".
'WHERE ut.PortalUserId = '.$c->Get("PortalUserId");
$sql_parts = Array();
$sql_parts['ItemType'] = "''";
foreach($modules as $module)
{
$sql_parts['ItemName'][] = sprintf($sql_templates['ItemName'], $sql_source[$module]['MainTable'], $sql_source[$module]['ItemNameField']);
$sql_parts['TableJoin'][] = sprintf($sql_templates['TableJoin'], $sql_source[$module]['MainTable']);
$sql_parts['ItemType'] = sprintf( $sql_templates['ItemType'],
$sql_source[$module]['TargetType'],
admin_language($sql_source[$module]['ItemNamePhrase']),
$sql_parts['ItemType']);
}
$sql = sprintf($sql, implode(', ',$sql_parts['ItemName']), $sql_parts['ItemType'], implode(' ',$sql_parts['TableJoin']));
// ==== build sql depending on modules installed: end ====
if(strlen($itemFilter))
$sql .= " AND ($itemFilter)";
$countwhere = "PortalUserId=".$c->Get("PortalUserId");
if(strlen($itemFilter))
$countwhere .= " AND ($itemFilter)";
$itemcount = TableCount($table,$countwhere,0);
if(strlen(trim($objConfig->Get("UserItem_LV_Sortfield"))))
{
$order = " ORDER BY ". $objConfig->Get("UserItem_LV_Sortfield")." ".$objConfig->Get("UserItem_LV_Sortorder");
}
else
$order = "";
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_Items";
$objListView->PerPageVar = "Perpage_Items";
$objItems->Query_Item($sql, $objListView->GetLimitSQL() );
for($i=0;$i<count($objItems->Items);$i++)
{
$item =& $objItems->GetItemRefByIndex($i);
$n = $item->Get("ItemName");
$type = $item->Get("ItemType");
$url = $objItemTypes->GetTypeEditUrl($type);
if(strlen($url))
{
$url .= "?env=".BuildEnv()."&newsession=1&item=".$item->Get("ItemId")."&return=".$admin."/users/adduser_items.php";
$url = "<A TARGET=\"editwin\" HREF=\"".$url."\">$n</A>";
$item->Set("ItemName",$url);
}
}
$objListView->SetListItems($objItems);
$objListView->IdField = "ResourceId";
$order = $objConfig->Get("UserItem_LV_Sortfield");
$SortOrder=0;
if($objConfig->Get("UserItem_LV_Sortorder")=="asc")
$SortOrder=1;
$objListView->ColumnHeaders->Add("ItemName",admin_language("la_ColHeader_Item"),1,0,$order,"width=\"20%\"","UserItem_LV_Sortfield","UserItem_LV_Sortorder" ,"ItemName");
$objListView->ColumnHeaders->Add("ItemTypeStr",admin_language("la_ColHeader_ItemType"),1,0,$order,"width=\"20%\"","UserItem_LV_Sortfield","UserItem_LV_Sortorder","ItemType");
//$objListView->ColumnHeaders->Add("DateCreated",admin_language("la_prompt_CreatedOn"),1,0,$order,"width=\"20%\"","UserItem_LV_Sortfield","UserItem_LV_Sortorder","DateCreated");
$objListView->ColumnHeaders->SetSort($objConfig->Get("UserItem_LV_Sortfield"), $objConfig->Get("UserItem_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = FALSE;
$objListView->CheckboxName = "";
$objListView->TotalItemCount = $itemcount;
/* for($i=0;$i<count($objImageList->Items);$i++)
{
$img =& $objImageList->GetItemRefByIndex($i);
$objListView->RowIcons[] = $img->Get("Icon");
}
*/
//$objListView->SliceItems();
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_item_image">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="5">
<input type=hidden NAME="Action" VALUE="save_user_edit">
<input type="hidden" name="UserEditStatus" VALUE="0">
</td>
</tr>
</FORM>
</TBODY>
</table>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
//initSelectiorContainers()
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/users/adduser_items.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/relation_select.php
===================================================================
--- trunk/admin/relation_select.php (revision 373)
+++ trunk/admin/relation_select.php (revision 374)
@@ -1,401 +1,401 @@
<?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($_SERVER['SCRIPT_FILENAME']));
+ $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 */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
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: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:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
<tbody>
<tr>
<td><img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="navbar"><?php print m_navbar(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"></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>
</tr></table>
</FORM>
<!--tb:button action="search_b" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
</td>
</tr>
</tbody>
</table>
<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();
//toggleTabB(start_tab, true);
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/relation_select.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/logs/summary.php
===================================================================
--- trunk/admin/logs/summary.php (revision 373)
+++ trunk/admin/logs/summary.php (revision 374)
@@ -1,220 +1,220 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
$section = 'in-portal:log_summary';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ListChecks");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("log_refresh", "la_ToolTip_Refresh","#","swap('log_refresh','toolbar/tool_refresh_f2.gif');",
"swap('log_refresh', 'toolbar/tool_refresh.gif');","window.location.reload(true);",
"tool_refresh.gif", TRUE, TRUE);
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$objSummary = new clsStatList();
$order = $objConfig->Get("Summary_SortOrder");
$SearchWords = $objSession->GetVariable("SummarySearchWord");
$where = 'AdminSummary = 2';
$orderBy = trim($objConfig->Get("Summary_SortField")." ".$objConfig->Get("Summary_SortOrder"));
$objListView = new clsListView($objListToolBar);
$objSummary->Page = $objListView->GetPage(); // $objSession->GetVariable("Page_Summary");
//$objSummary->debuglevel = 1;
$objSummary->ProcessList($where, $orderBy, $SearchWords ? false : true);
// filter items by $SearchWords varible
$i = 0;
if($SearchWords)
{
$bad_ids = Array();
if( $objSummary->NumItems() > 0 ) $id_field = $objSummary->Items[0]->IdField();
while($i < $objSummary->NumItems() )
{
if( !$objSummary->ItemLike($i, $SearchWords) )
{
$bad_ids[] = $objSummary->Items[$i]->Get( $objSummary->Items[$i]->IdField() );
$objSummary->DeleteItem($i--);
}
$i++;
}
$where = sprintf('%s AND (%s NOT IN (%s))', $where, $id_field, implode(',',$bad_ids));
$objSummary->ProcessList($where, $orderBy, true);
}
$itemcount = TableCount(GetTablePrefix()."StatItem", $where,0);
$objListView->SetListItems($objSummary);
$objListView->IdField = "StatItemId";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Module",admin_language("la_prompt_Module"),1,0,$order,"width=\"20%\"","Summary_SortField","Summary_SortOrder","Module");
$objListView->ColumnHeaders->Add("ListLabel",admin_language("la_prompt_Parameter"),1,0,$order,"width=\"20%\"","Summary_SortField","Summary_SortOrder","ListLabel");
$objListView->ColumnHeaders->Add("Value",admin_language("la_prompt_Value"),1,0,$order,"width=\"30%\"","Summary_SortField","Summary_SortOrder","ValueSQL");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Summary_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_summary_search";
$objListView->CurrentPageVar = "Page_Summary";
$objListView->PerPageVar = "Perpage_StatItem";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
//$objListView->RefreshPageVar();
$objListView->ConfigureViewMenu("Summary_SortField","Summary_SortOrder","Module",
"",0,0);
$title = admin_language("la_Showing_Stats")." (".$itemcount.")";
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="searchlistform" ID="searchlistform">
<?php print $objListView->PrintList(); ?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/logs/summary.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/logs/session_list.php
===================================================================
--- trunk/admin/logs/session_list.php (revision 373)
+++ trunk/admin/logs/session_list.php (revision 374)
@@ -1,291 +1,291 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $adminURL."/images";
//admin only includes
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:sessionlog';
$envar = "env=" . BuildEnv();
$SortFieldVar = "Session_SortField";
$SortOrderVar = "Session_SortOrder";
$DefaultSortField = "UserName";
$PerPageVar = "Perpage_Sessions";
$CurrentPageVar = "Page_Sessions";
$CurrentFilterVar = "Session_View";
$ListForm = "sessionlistform";
$CheckClass = "UserChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("log_refresh", "la_ToolTip_Refresh","#","swap('log_refresh','toolbar/tool_refresh_f2.gif');",
"swap('log_refresh', 'toolbar/tool_refresh.gif');","window.location.reload(true);",
"tool_refresh.gif");
$objListToolBar->Add("log_reset","la_ToolTip_Reset","#", "if (UserChecks.itemChecked()) swap('log_reset','toolbar/tool_disconnect_f2.gif');",
"if (UserChecks.itemChecked()) swap('log_reset', 'toolbar/tool_disconnect.gif');","if (UserChecks.itemChecked()) $CheckClass.check_submit('session_list', 'm_session_delete');",
"tool_disconnect.gif",TRUE,TRUE);
$listImages[] = "$CheckClass.addImage('log_reset','$imagesURL/toolbar/tool_disconnect.gif','$imagesURL/toolbar/tool_disconnect_f3.gif',1);\n ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for category view menu */
$Bit_Active=1;
$Bit_Inactive=2;
$Bit_Guest=4;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Active");
$FilterLabels[1] = admin_language("la_Text_Expired");
$FilterLabels[2] = admin_language("la_Text_Guest");
if($_GET["resetpage"]==1)
$objSession->SetVariable("Page_Sessions","1");
/* determine current view menu settings */
$SessionView = $objConfig->Get("Session_View");
if(!is_numeric($SessionView))
{
$SessionView = $Bit_All; //Set all bits ON
$SessionFilter = "";
}
$filter = array();
$status=array();
if($SessionView & $Bit_Active)
{
$status[] = 1;
}
if($SessionView & Bit_Inactive)
{
$status[] = 0;
}
if(count($status>0))
{
$filter[] = "us.Status IN (".join($status,",").")";
}
if(!($SessionView & $Bit_Guest))
$filter[] = "p.Login IS NOT NULL";
$SessionFilter = join(" AND ",$filter);
$order = $objConfig->Get("Session_SortOrder");
$SearchWords = $objSession->GetVariable("SessionSearchWord");
if(strlen($SearchWords))
{
$where = $objSession->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
if(strlen($SessionFilter)>0)
{
if(strlen($where))
$where.= " AND ";
$where.=$SessionFilter;
}
//echo $where;
$sql = "SELECT us.*,if (p.Login IS NULL,'".admin_language("la_Text_Guest")."',p.Login) as UserName, ";
$sql .="if(g.Name IS NULL,'".admin_language("la_Text_GuestUsers")."',g.Name) as GroupName, ";
$sql .="ELT(us.Status+1,'".admin_language("la_Text_Expired")."','".admin_language("la_Text_Active")."') as SessionStatus, ";
$sql .="FROM_UNIXTIME(us.LastAccessed,'%m-%d-%Y') as DateCreated ";
$sql .="FROM ".GetTablePrefix()."UserSession ";
$sql .=" as us LEFT JOIN ".GetTablePrefix()."PortalUser as p USING (PortalUserId) ";
$sql .="LEFT JOIN ".GetTablePrefix()."UserGroup as u ON (p.PortalUserId=u.PortalUserId AND u.PrimaryGroup=1) ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON (u.GroupId=g.GroupId) ";
$sql .= " WHERE us.Status = 1 ";
if(strlen($where)) {
$sql .= "AND ".$where;
}
$orderBy = trim($objConfig->Get("Session_SortField")." ".$objConfig->Get("Session_SortOrder"));
if(strlen($orderBy))
$sql .=" ORDER BY ".$orderBy;
//$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_Sessionlist"),$objConfig->Get("Perpage_Sessionlist"));
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_Sessionlist";
$objListView->PerPageVar = "Perpage_Sessionlist";
$objUsers->Query_Item( $sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."UserSession", $where,0);
$objListView->SetListItems($objUsers);
$objListView->IdField = "SessionKey";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("UserName",admin_language("la_prompt_Username"),1,0,$order,"width=\"35%\"","Session_SortField","Session_SortOrder","UserName");
$objListView->ColumnHeaders->Add("GroupName",admin_language("la_prompt_PrimaryGroup"),1,0,$order,"width=\"20%\"","Session_SortField","Session_SortOrder","GroupName");
$objListView->ColumnHeaders->Add("SessionStatus",admin_language("la_prompt_Status"),1,0,$order,"width=\"10%\"","Session_SortField","Session_SortOrder","SessionStatus");
$objListView->ColumnHeaders->Add("IpAddress",admin_language("la_prompt_IPAddress"),1,0,$order,"width=\"15%\"","Session_SortField","Session_SortOrder","IPAddress");
$objListView->ColumnHeaders->Add("DateCreated",admin_language("la_prompt_CreatedOn"),1,0,$order,"width=\"20%\"","Session_SortField","Session_SortOrder","us.LastAccessed");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Session_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_session_search";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$SessionView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
$title = admin_language("la_Show_Log")." (".$objUsers->NumItems().")";
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="sessionlistform" ID="sessionlistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/logs/session_list.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/logs/searchlog.php
===================================================================
--- trunk/admin/logs/searchlog.php (revision 373)
+++ trunk/admin/logs/searchlog.php (revision 374)
@@ -1,214 +1,214 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
$section = 'in-portal:searchlog';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ListChecks");
$objListToolBar->Set("CheckForm","searchlistform");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("log_refresh", "la_ToolTip_Refresh","#","swap('log_refresh','toolbar/tool_refresh_f2.gif');",
"swap('log_refresh', 'toolbar/tool_refresh.gif');","window.location.reload(true);",
"tool_refresh.gif", FALSE, TRUE);
$objListToolBar->Add("log_reset","la_ToolTip_Reset","#", "if (ListChecks.itemChecked()) swap('log_reset','toolbar/tool_reset_f2.gif');",
"if (ListChecks.itemChecked()) swap('log_reset', 'toolbar/tool_reset.gif');","if (ListChecks.itemChecked()) ListChecks.check_submit('searchlog','m_keyword_reset');",
"tool_reset.gif", TRUE, TRUE);
$listImages[] = "ListChecks.addImage('log_reset','$imagesURL/toolbar/tool_reset.gif','$imagesURL/toolbar/tool_reset_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
/*$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
*/
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$objSearchList = new clsSearchLogList();
$order = $objConfig->Get("SearchLog_SortOrder");
$SearchWords = $objSession->GetVariable("KeywordSearchWord");
if(strlen($SearchWords))
{
$where = $objSearchWords->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$sql = "SELECT ELT(sl.SearchType+1,'".admin_language("la_Text_Simple")."','".admin_language("la_Text_Advanced")."') as TextType,sl.* FROM ".GetTablePrefix()."SearchLog as sl";
if(strlen($where))
$sql .= " WHERE ".$where;
$orderBy = trim($objConfig->Get("SearchLog_SortField")." ".$objConfig->Get("SearchLog_SortOrder"));
if(strlen($orderBy))
$sql .=" ORDER BY ".$orderBy;
$sql .=" ".GetLimitSQL($objSession->GetVariable("Page_SearchLog"),$objConfig->Get("Perpage_SearchLog"));
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo $sql."<br>\n";
$objSearchList->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."SearchLog", $where,0);
$objListView = new clsListView($objListToolBar,$objSearchList);
$objListView->IdField = "SearchLogId";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("TextType",admin_language("la_prompt_SearchType"),1,0,$order,"width=\"20%\"","SearchLog_SortField","SearchLog_SortOrder","TextType");
$objListView->ColumnHeaders->Add("Keyword",admin_language("la_prompt_Keyword"),1,0,$order,"width=\"20%\"","SearchLog_SortField","SearchLog_SortOrder","Keyword");
$objListView->ColumnHeaders->Add("Indices",admin_language("la_prompt_Frequency"),1,0,$order,"width=\"30%\"","SearchLog_SortField","SearchLog_SortOrder","Indices");
$objListView->ColumnHeaders->SetSort($objConfig->Get("SearchLog_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_searchword_search";
$objListView->CurrentPageVar = "Page_SearchLog";
$objListView->PerPageVar = "Perpage_SearchLog";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu("SearchLog_SortField","SearchLog_SortOrder","TextType","","",0);
$title = admin_language("la_Show_Log")." (".$itemcount.")";
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL,$title, NULL, $h);
?>
<FORM method="POST" ACTION="" NAME="searchlistform" ID="searchlistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/logs/searchlog.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/logs/email_log.php
===================================================================
--- trunk/admin/logs/email_log.php (revision 373)
+++ trunk/admin/logs/email_log.php (revision 374)
@@ -1,244 +1,244 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $adminURL."/images";
//admin only includes
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = 'in-portal:emaillog';
$envar = "env=" . BuildEnv();
$SortFieldVar = "EmailsL_SortField";
$SortOrderVar = "EmailsL_SortOrder";
$DefaultSortField = "UserName";
$PerPageVar = "Perpage_EmailsL";
$CurrentPageVar = "Page_EmailsL";
$CurrentFilterVar = "EmailsL_View";
$ListForm = "emaillistform";
$CheckClass = "UserChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("log_refresh", "la_ToolTip_Refresh","#","swap('log_refresh','toolbar/tool_refresh_f2.gif');",
"swap('log_refresh', 'toolbar/tool_refresh.gif');","window.location.reload(true);",
"tool_refresh.gif");
$objListToolBar->Add("log_reset","la_ToolTip_Reset","#", "swap('log_reset','toolbar/tool_reset_f2.gif');",
"swap('log_reset', 'toolbar/tool_reset.gif');","$CheckClass.check_submit('email_log', 'm_purge_email_log');",
"tool_reset.gif",TRUE,TRUE);
//$listImages[] = "$CheckClass.addImage('log_reset','$imagesURL/toolbar/tool_disconnect.gif','$imagesURL/toolbar/tool_disconnect_f3.gif',1);\n ";
//$listImages[] = "$CheckClass.addImage('log_reset','$imagesURL/toolbar/tool_disconnect.gif','$imagesURL/toolbar/tool_disconnect_f3.gif',1);\n ";
$objListToolBar->Add("divider");
$objListToolBar->Add("user_print", "la_ToolTip_Print","#","swap('user_print','toolbar/tool_print_f2.gif');",
"swap('user_print', 'toolbar/tool_print.gif');","window.print();","tool_print.gif");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
if($_GET["resetpage"]==1)
$objSession->SetVariable("Page_EmailsL","1");
$order = $objConfig->Get("EmailsL_SortOrder");
$SearchWords = $objSession->GetVariable("EmailsLSearchWord");
if(strlen($SearchWords))
{
$where = $objSession->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
if(strlen($SessionFilter)>0)
{
if(strlen($where))
$where.= " AND ";
$where.=$SessionFilter;
}
$sql = "SELECT EmailLogId, fromuser, addressto, subject, event, FROM_UNIXTIME(timestamp,'%m-%d-%Y %H:%i:%s') as time_sent FROM ".GetTablePrefix()."EmailLog";
if(strlen($where)) {
$sql .= "AND ".$where;
}
$orderBy = trim($objConfig->Get("EmailsL_SortField")." ".$objConfig->Get("EmailsL_SortOrder"));
if ($orderBy == 'asc') {
$objConfig->Set("EmailsL_SortField", "time_sent");
$orderBy = "time_sent ".$orderBy;
}
if ($orderBy == 'desc') {
$objConfig->Set("EmailsL_SortField", "time_sent");
$orderBy = "time_sent ".$orderBy;
}
if(strlen($orderBy))
$sql .=" ORDER BY ".$orderBy;
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_EmailsL";
$objListView->PerPageVar = "Perpage_EmailsL";
$objUsers->Query_Item( $sql, $objListView->GetLimitSQL() );
$itemcount = TableCount(GetTablePrefix()."EmailLog", $where,0);
$objListView->SetListItems($objUsers);
$objListView->IdField = "EmailLogId";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("fromuser",admin_language("la_prompt_FromUsername"),1,0,$order,"width=\"35%\"","EmailsL_SortField","EmailsL_SortOrder","fromuser");
$objListView->ColumnHeaders->Add("addressto",admin_language("la_prompt_AddressTo"),1,0,$order,"width=\"20%\"","EmailsL_SortField","EmailsL_SortOrder","addressto");
$objListView->ColumnHeaders->Add("subject",admin_language("la_prompt_Subject"),1,0,$order,"width=\"10%\"","EmailsL_SortField","EmailsL_SortOrder","subject");
$objListView->ColumnHeaders->Add("event",admin_language("la_prompt_Event"),1,0,$order,"width=\"15%\"","EmailsL_SortField","EmailsL_SortOrder","event");
$objListView->ColumnHeaders->Add("time_sent",admin_language("la_prompt_SentOn"),1,0,$order,"width=\"20%\"","EmailsL_SortField","EmailsL_SortOrder","time_sent");
$objListView->ColumnHeaders->SetSort($objConfig->Get("EmailsL_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_emaillog_search";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$SessionView,$Bit_All);
$title = admin_language("la_Show_EmailLog")." (".$objUsers->NumItems().")";
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<FORM method="POST" ACTION="" NAME="emaillistform" ID="emaillistform">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/logs/email_log.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/modules/addmodule.php
===================================================================
--- trunk/admin/modules/addmodule.php (revision 373)
+++ trunk/admin/modules/addmodule.php (revision 374)
@@ -1,210 +1,210 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//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");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
$section = 'in-portal:addmodule';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$order = $objConfig->Get("Module_SortOrder");
$orderBy = trim($objConfig->Get("Module_SortField")." ".$order);
if(strlen($orderBy))
{
$orderBy = " ORDER BY LoadOrder,".$orderBy;
}
else
$orderBy = " ORDER BY LoadOrder";
$objModules->Clear();
$sql = "SELECT * FROM ".GetTablePrefix()."Modules";
$objModules->Query_Item($sql);
$objModList = new clsModList();
$path = $pathtoroot;
$new = array();
if ($dir = @opendir($path))
{
while (($file = readdir($dir)) !== false)
{
if($file !="." && $file !=".." && substr($file,0,1)!="_")
{
if(is_dir($path.$pathchar.$file))
{
$inst_file = $path.$pathchar.$file.$pathchar.$admin."/install.php";
if(file_exists($inst_file))
{
if(!$objModules->ModuleInstalled($file))
{
$new[$file] = $inst_file;
}
}
}
}
}
closedir($dir);
}
foreach($new as $mod => $file)
{
$m = new clsModule();
unset($data);
$data = array();
$status= admin_language("la_text_ready_to_install");
$data["Url"] = "<A HREF=\"".$rootURL.$mod."/admin/install.php?env=".BuildEnv()."&redirect=1\">$status</A>";
$data["Name"] = $mod;
$objModList->AddItemFromArray($data);
}
$itemcount = $objModList->NumItems();
$title = admin_language("la_Text_Install")." ".admin_language("la_Text_Modules")." (".$itemcount.")";
$objListView = new clsListView(NULL,$objModList);
$objListView->IdField = "Name";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Name", admin_language("la_prompt_Available_Modules"),1,0,$order,"width=\"50%\"","Module_SortField","Module_SortOrder","Name");
$objListView->ColumnHeaders->Add("Url",admin_language("la_prompt_Install_Status"),1,0,$order,"width=\"50%\"","Module_SortField","Module_SortOrder","Version");
$objListView->ColumnHeaders->SetSort("Name",$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = FALSE;
$objListView->checkboxes= FALSE;
$objListView->SearchAction="";
$objListView->CurrentPageVar = "Page_Modules";
$objListView->PerPageVar = "Perpage_Modules";
$objListView->CheckboxName = "";
$objListView->TotalItemCount = $itemcount;
$objListView->SelectorType="none";
int_header(null,NULL,$title);
?>
<FORM method="POST" ACTION="" NAME="modlistform" ID="modlistform">
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers()
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/modules/addmodule.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/modules/mod_status.php
===================================================================
--- trunk/admin/modules/mod_status.php (revision 373)
+++ trunk/admin/modules/mod_status.php (revision 374)
@@ -1,205 +1,205 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
//admin only util
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$pathtolocal = $pathtoroot;
//Set Section
$section = 'in-portal:mod_status';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//Display header
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ModChecks");
$objListToolBar->Set("CheckForm","modlistform");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add( "mod_enable",
"la_ToolTip_Enable",
"#",
"if (ModChecks.itemChecked()) swap('mod_enable','toolbar/tool_approve_f2.gif');",
"if (ModChecks.itemChecked()) swap('mod_enable', 'toolbar/tool_approve.gif');",
"if (ModChecks.itemChecked()) ModChecks.check_submit('mod_status', 'm_mod_enable');",
"tool_approve.gif");
$listImages[] = "ModChecks.addImage('mod_enable','$imagesURL/toolbar/tool_approve.gif','$imagesURL/toolbar/tool_approve_f3.gif',1); ";
$objListToolBar->Add( "mod_disable",
"la_ToolTip_Disable",
"#",
"if (ModChecks.itemChecked()) swap('mod_disable','toolbar/tool_decline_f2.gif');",
"if (ModChecks.itemChecked()) swap('mod_disable', 'toolbar/tool_decline.gif');",
"if (ModChecks.itemChecked()) ModChecks.check_submit('mod_status', 'm_mod_disable');",
"tool_decline.gif");
$listImages[] = "ModChecks.addImage('mod_disable','$imagesURL/toolbar/tool_decline.gif','$imagesURL/toolbar/tool_decline_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
$order = $objConfig->Get("Module_SortOrder");
$orderBy = trim($objConfig->Get("Module_SortField")." ".$order);
if(strlen($orderBy))
{
$orderBy = " ORDER BY LoadOrder,".$orderBy;
}
else
$orderBy = " ORDER BY LoadOrder";
$where = '';
$sql = "SELECT m.Name as Name,m.Version as Version, ";
$sql .="ELT(m.Loaded+1,'".admin_language("la_Text_Disabled")."','".admin_language("la_Text_Enabled")."') as Status ";
$sql .="FROM ".GetTablePrefix()."Modules as m ".$where." ".$orderBy;
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objModules->Clear();
$objModules->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."Modules", $where,0);
$title = admin_language("la_Text_Modules")." (".$itemcount.")";
$objListView = new clsListView($objListToolBar,$objModules);
$objListView->IdField = "Name";
$objListView->PageLinkTemplate = $pathtoroot.$admin."/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Name", admin_language("la_prompt_Name"),1,0,$order,"width=\"50%\"","Module_SortField","Module_SortOrder","Name");
$objListView->ColumnHeaders->Add("Status",admin_language("la_prompt_Status"),1,0,$order,"width=\"50%\"","Module_SortField","Module_SortOrder","Status");
$objListView->ColumnHeaders->Add("Version",admin_language("la_Text_Version"),1,0,$order,"width=\"50%\"","Module_SortField","Module_SortOrder","Version");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Module_SortField"),$order);
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = FALSE;
$objListView->SearchAction="";
$objListView->CurrentPageVar = "Page_Modules";
$objListView->PerPageVar = "Perpage_Modules";
$objListView->CheckboxName = "itemlist[]";
$objListView->TotalItemCount = $itemcount;
int_header($objListToolBar,NULL,$title);
?>
<FORM method="POST" ACTION="" NAME="modlistform" ID="modlistform">
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?env=".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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
<?php
if( GetVar('Refresh') == 1 )
echo "window.parent.frames.menu.location = window.parent.frames.menu.location;\n";
?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/modules/mod_status.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/category/addpermission_modules.php
===================================================================
--- trunk/admin/category/addpermission_modules.php (revision 373)
+++ trunk/admin/category/addpermission_modules.php (revision 374)
@@ -1,293 +1,293 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
//admin only util
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
if(isset($_GET["en"]))
{
$c = $objEditItems->GetItemByIndex($en);
}
else
{
$c = new clsCategory($m_var_list["cat"]);
}
if(!is_object($c))
{
$c = new clsCategory();
$c->Set("CategoryId",0);
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_permissions";
$envar = "env=" . BuildEnv() . "&en=$en";
//$section = 'in-portal:editcategory_permissions';
$section = 'in-portal:catperm_modules';
if(count($_POST))
{
if($_POST["Action"]=="m_edit_permissions")
{
$GroupId = $_POST["GroupId"];
$g = $objGroups->GetItem($GroupId);
}
else
{
if(!is_array($_POST["itemlist"]))
{
$g = $objGroups->GetItemByField("ResourceId", $_POST["itemlist"]);
if(is_object($g))
$GroupId = $g->Get("GroupId");
}
else
{
$g = $objGroups->GetItemByField("ResourceId", $_POST["itemlist"][0]);
$GroupId = $g->Get("GroupId");
}
}
}
else
{
$GroupId = $_GET["GroupId"];
$g = $objGroups->GetItem($GroupId);
}
$objPermList = new clsPermList($c->Get("CategoryId"),$GroupId);
$ado = GetADODBConnection();
$sql = "SELECT DISTINCT(ModuleId) FROM ".GetTablePrefix()."PermissionConfig";
$rs = $ado->Execute($sql);
$Modules = array();
while($rs && !$rs->EOF)
{
$data = $rs->fields;
$Modules[] = $data["ModuleId"];
$rs->MoveNext();
}
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
//int_SectionHeader();
if($c->Get("CategoryId")!=0)
{
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Permissions");
$title .= " ".admin_language("la_text_for")." '".$g->parsetag("group_name")."'";
}
else
{
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Root")." ".admin_language("la_Text_Category")." - "."' - ".admin_language("la_tab_Permissions");
$title .= " ".admin_language("la_text_for")." '".$g->parsetag("group_name")."'";
}
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','$admin/category/addcategory_permissions.php',0);",$imagesURL."/toolbar/tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','CatEditStatus','".$admin."/category/addcategory_permissions.php',-1);", $imagesURL."/toolbar/tool_cancel.gif");
$sec =& $objSections->GetSection($section);
if($c->Get("CategoryId")==0)
{
$sec->Set("left",NULL);
$sec->Set("right",NULL);
}
int_header($objListToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><?php echo admin_language("la_Prompt_CategoryPermissions"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<FORM ID="category" NAME="category" method="POST" ACTION="">
<?php
for($i=0;$i<count($Modules);$i++)
{
$module = $Modules[$i];
if($module != "Admin" && $module != "Front")
{
echo "<TR ".int_table_color_ret().">";
echo "<TD><IMG src=\"".$imagesURL."/itemicons/icon16_permission.gif\"> ";
$getvar = "?env=".BuildEnv()."&module=$module&GroupId=$GroupId";
echo "<A class=\"NAV_URL\" HREF=\"".$adminURL."/category/addpermission.php$getvar\">$module</A></TD>";
echo "</TR>";
}
}
?>
</TBODY>
</TABLE>
<input type="hidden" name="ParentId" value="<?php echo $c->Get("ParentId"); ?>">
<input type="hidden" name="CategoryId" value="<?php echo $c->parsetag("cat_id"); ?>">
<input type="hidden" name="GroupId" value ="<?php echo $GroupId; ?>">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type=hidden NAME="Action" VALUE="save_cat_edit">
</td>
</tr>
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addpermission_modules.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/category/addcategory_images.php
===================================================================
--- trunk/admin/category/addcategory_images.php (revision 373)
+++ trunk/admin/category/addcategory_images.php (revision 374)
@@ -1,347 +1,347 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
/* ------------------------------------- Edit Table --------------------------------------------------- */
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_item_image";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_images';
$sec = $objSections->GetSection($section);
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Images");
$SortFieldVar = "Image_LV_Sortfield";
$SortOrderVar = "Image_LV_Sortorder";
$DefaultSortField = "FullName";
$PerPageVar = "Perpage_Images";
$CurrentPageVar = "Page_Images";
$CurrentFilterVar = "CatImg_View";
$ListForm = "imagelistform";
$CheckClass = "PermChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$saveURL = $admin."/category/category_maint.php";
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','CatEditStatus','$saveURL',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','CatEditStatus','".$cancelURL."',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/category/addcategory_images.php";
$StatusField = "CatEditStatus";
$form = "category";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
$objListToolBar->Add("divider");
}
$listImages = array();
$objListToolBar->Add("new_img", "la_ToolTip_New_Image",$adminURL."/category/addimage.php?".$envar,"swap('new_img','toolbar/tool_new_image_f2.gif');",
"swap('new_img', 'toolbar/tool_new_image.gif');",
"","tool_new_image.gif");
$objListToolBar->Add("img_edit","la_ToolTip_Edit","#", "if (PermChecks.itemChecked()) swap('img_edit','toolbar/tool_edit_f2.gif');",
"if (PermChecks.itemChecked()) swap('img_edit', 'toolbar/tool_edit.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addimage', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "PermChecks.addImage('img_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1);\n";
$objListToolBar->Add("img_del","la_ToolTip_Delete","#", "if (PermChecks.itemChecked()) swap('img_del','toolbar/tool_delete_f2.gif');",
"if (PermChecks.itemChecked()) swap('img_del', 'toolbar/tool_delete.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_images', 'm_img_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('img_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1);\n ";
$objListToolBar->Add("divider");
$objListToolBar->Add("img_move_up","la_ToolTip_Move_Up","#", "if (PermChecks.itemChecked()) swap('img_move_up','toolbar/tool_move_up_f2.gif');",
"if (PermChecks.itemChecked()) swap('img_move_up', 'toolbar/tool_move_up.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_images', 'm_img_move_up');",
"tool_move_up.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('img_move_up','$imagesURL/toolbar/tool_move_up.gif','$imagesURL/toolbar/tool_move_up_f3.gif',1);\n ";
$objListToolBar->Add("img_move_down","la_ToolTip_Move_Down","#", "if (PermChecks.itemChecked()) swap('img_move_down','toolbar/tool_move_down_f2.gif');",
"if (PermChecks.itemChecked()) swap('img_move_down', 'toolbar/tool_move_down.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_images', 'm_img_move_down');",
"tool_move_down.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('img_move_down','$imagesURL/toolbar/tool_move_down.gif','$imagesURL/toolbar/tool_move_down_f3.gif',1);\n ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
$Img_AllValue = 3;
$Bit_Enabled=1;
$Bit_Disabled=2;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$ImgView = $objConfig->Get($CurrentFilterVar);
if(!is_numeric($ImgView))
{
$ImgView = $Img_AllValue;
}
else
{
if($ImgView & $Bit_Enabled)
$Filters[] = "img.Enabled=1";
if($ImgView & $Bit_Disabled)
$Filters[] = "img.Enabled=0";
if(count($Filters))
{
$imgFilter = implode(" OR ",$Filters);
}
else
$imgFilter = "ImageId = -1";
}
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$objImageList = new clsImageList();
$objImageList->SourceTable = $objSession->GetEditTable("Images");
$sql = "SELECT ELT(img.Enabled+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ') as Status, ";
$sql .="img.AltName as AltName, img.ImageId as ImageId, img.Enabled as Enabled, img.Priority as Priority, ";
$sql .="concat(img.Name,ELT(img.DefaultImg+1,'','<br>(".admin_language("la_prompt_Primary").") ')) as FullName, ";
$sql .="if(img.LocalImage=1,'(".admin_language("la_Text_Local").") ',img.Url) as ShowURL, concat( '<IMG src=\"',";
$sql .="IF (img.LocalThumb=1, CASE WHEN ( LENGTH( img.ThumbPath ) >0 AND img.LocalThumb =1 ) ";
$sql .="THEN concat('".$rootURL."',img.ThumbPath,'?".time()."') END , img.ThumbUrl), '\">') AS Preview ";
$sql .="FROM ".$objImageList->SourceTable." as img WHERE img.ResourceId=".$c->Get("ResourceId");
if(strlen($imgFilter))
$sql .= " AND ($imgFilter)";
$order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar));
$sql .=" ORDER BY Priority DESC";
if(strlen($order))
$sql .= ", ".$order;
$sql .=" ".GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar));
$objImageList->Query_Item($sql);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
for($i=0;$i<count($objImageList->Items);$i++)
{
$img =& $objImageList->GetItemRefByIndex($i);
$icon = $imagesURL."/itemicons/icon16_image_disabled.gif";
if($img->Get("Enabled")=="1")
{
$icon = $imagesURL."/itemicons/icon16_image.gif";
}
$img->Set("Icon",$icon);
}
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objImageList);
$objListView->IdField = "ImageId";
$SortOrder=0;
if($objConfig->Get($SortOrderVar)=="asc")
$SortOrder=1;
$objListView->ColumnHeaders->Add("FullName",language("la_ColHeader_Image"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"FullName");
$objListView->ColumnHeaders->Add("AltName",language("la_ColHeader_AltValue"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"AltName");
$objListView->ColumnHeaders->Add("ShowURL",language("la_ColHeader_Url"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"ShowURL");
$objListView->ColumnHeaders->Add("Status",language("la_ColHeader_Enabled"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"Status");
$objListView->ColumnHeaders->Add("Preview",language("la_ColHeader_Preview"),1,0,$order,"width=\"40%\"",$SortFieldVar,$SortOrderVar,"Preview");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->CurrentPageVar = "Page_Images";
$objListView->PerPageVar = "Perpage_Images";
$objListView->CheckboxName = "itemlist[]";
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$ImgView,$Img_AllValue);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objImageList->Items);$i++)
{
$img =& $objImageList->GetItemRefByIndex($i);
$objListView->RowIcons[] = $img->Get("Icon");
}
$objListToolBar->AddToInitScript("fwLoadMenus();\n");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<form name="imagelistform" ID="imagelistform" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_item_image">
</FORM>
</TBODY>
</table>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<input type=hidden NAME="Action" VALUE="save_category_edit">
<INPUT TYPE="hidden" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script language="JavaScript1.2" src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script language="JavaScript1.2">
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/category/addcategory_images.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/category/addimage.php
===================================================================
--- trunk/admin/category/addimage.php (revision 373)
+++ trunk/admin/category/addimage.php (revision 374)
@@ -1,355 +1,355 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditCat);
$objEditCat = new clsCatList();
$objEditCat->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable);
$itemcount=$objEditCat->NumItems();
$c = $objEditCat->GetItemByIndex($en);
unset($objEditItems);
$objEditItems = new clsImageList();
$objEditItems->SourceTable = $objSession->GetEditTable("Images");
if(isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$ImageId = $_POST["itemlist"][0];
}
else
{
$ImageId = $_POST["itemlist"];
}
$img = $objEditItems->GetItem($ImageId);
$img->Pending=TRUE;
$action = "m_img_edit";
$name = $img->Get("Name");
}
else
{
$img = new clsImage();
$img->Set("ResourceId",$c->Get("ResourceId"));
$img->Set("ImageId",$img->FieldMin("ImageId")-1);
$img->Pending=TRUE;
$img->tablename = $objEditItems->SourceTable;
$action = "m_img_add";
$name = "'New Image'";
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:cat_imageedit';
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('category','CatEditStatus','".$admin."/category/addcategory_images.php',0);",$imagesURL."/toolbar/tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('category','CatEditStatus','".$admin."/category/addcategory_images.php',-1);", $imagesURL."/toolbar/tool_cancel.gif");
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Category")." '".$c->Get("Name")."' - ".prompt_language("la_Text_Image");
$title .= " '".$name."'";
int_header($objListToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<FORM enctype="multipart/form-data" ID="category" NAME="category" method="POST" ACTION="">
<?php int_subsection_title(prompt_language("la_Text_Image")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_ImageId"); ?></TD>
<TD><?php if ($img->Get("ImageId") != -1) echo $img->Get("ImageId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN class="text" id="prompt_imgName"><?php echo prompt_language("la_prompt_Name"); ?></SPAN></TD>
<TD><input type=text tabindex="1" ValidationType="exists" NAME="imgName" size="30" VALUE="<?php echo $img->parsetag("image_name"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN class="text" id="prompt_imgAlt"><?php echo prompt_language("la_prompt_AltName"); ?></SPAN></TD>
<TD><input type=text ValidationType="exists" tabindex="2" NAME="imgAlt" size="30" VALUE="<?php echo $img->parsetag("image_alt"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Status"); ?></TD>
<TD>
<input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==1) echo "CHECKED"; ?> VALUE="1"><?php echo prompt_language("la_Text_Enabled"); ?>
<input type=RADIO NAME="imgEnabled" tabindex="3" <?php if($img->Get("Enabled")==0) echo "CHECKED"; ?> VALUE="0"><?php echo prompt_language("la_Text_Disabled"); ?>
</TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Primary"); ?></TD>
<TD><input type=checkbox NAME="imgDefault" tabindex="4" <?php if($img->Get("DefaultImg")==1) echo "CHECKED"; ?> VALUE="1"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Priority"); ?></TD>
<TD><input type=text SIZE="5" NAME="imgPriority" tabindex="5" VALUE="<?php echo $img->Get("Priority"); ?>"></TD>
<TD></TD>
</TR>
<?php int_subsection_title(prompt_language("la_text_Thumbnail_Image")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
<?php
if($img->Get("LocalThumb")==1 || strlen($img->Get("LocalThumb"))==0)
{
$local="checked";
$remote = "";
}
else
{
$remote="checked";
$local = "";
}
?>
<TD>
<TABLE border=0>
<tr>
<TD>
<input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
</td>
<td>
<input type=FILE NAME="imgThumbFile" tabindex="7" VALUE=""> <br />
</td>
</tr>
<tr>
<td>
<input type="radio" name="imgLocalThumb" tabindex="6" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
</td>
<td>
<input type=text size=32 NAME="imgThumbUrl" tabindex="8" VALUE=""> <br />
</td>
</tr>
</table>
</TD>
<TD ALIGN="RIGHT">
<IMG SRC="<?php echo $img->ThumbURL(); ?>">
</TD>
</TR>
<?php int_subsection_title(prompt_language("la_Text_Full_Size_Image")); ?>
<TR <?php int_table_color(); ?>>
<TD><?php echo prompt_language("la_text_Same_As_Thumbnail"); ?></TD>
<?php
if(($img->Get("SameImages")=="1") || !$img->Get("ImageId") || ($img->Get("ImageId") == "-1"))
{
$checked = "CHECKED";
$disabled = "DISABLED=\"true\"";
}
?>
<TD><input type=checkbox id="imgSameImages" NAME="imgSameImages" tabindex="9" VALUE="1" <?php echo $checked; ?> ONCLICK="enableFullImage(this);"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?>>
<TD><?php echo prompt_language("la_prompt_Location"); ?></TD>
<?php
if($img->Get("LocalImage")==1 || strlen($img->Get("LocalImage"))==0)
{
$local="checked";
$remote = "";
}
else
{
$remote="checked";
$local = "";
}
?>
<TD>
<TABLE border=0>
<tr>
<TD>
<input id="full1" type="radio" name="imgLocalFull" tabindex="10" <?php echo $local; ?> VALUE="1"><?php echo prompt_language("la_prompt_upload"); ?>:
</td>
<td>
<input type=FILE ID="imgFullFile" NAME="imgFullFile" tabindex="11" VALUE=""> <br />
</td>
</tr>
<tr>
<td>
<input id="full2" type="radio" name="imgLocalFull" tabindex="10" <?php echo $remote; ?> VALUE="0"> <?php echo prompt_language("la_prompt_remote_url"); ?>:
</td>
<td>
<input type=text size=32 ID="imgFullUrl" NAME="imgFullUrl" tabindex="12" VALUE=""> <br />
</td>
</tr>
</table>
</td>
<TD ALIGN="RIGHT">
<IMG SRC="<?php echo $img->FullURL(); ?>">
</TD>
</TR>
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
<input type="hidden" name="DestDir" VALUE="<?php echo $DestDir; ?>">
<INPUT TYPE="hidden" NAME="ImageId" VALUE="<?php echo $img->Get("ImageId"); ?>">
<input TYPE="HIDDEN" NAME="ResourceId" VALUE="<?php echo $c->Get("ResourceId"); ?>">
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<script language="JavaScript">
enableFullImage(document.getElementById('imgSameImages'));
MarkAsRequired(document.getElementById("category"));
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addimage.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/category/addcategory_custom.php
===================================================================
--- trunk/admin/category/addcategory_custom.php (revision 373)
+++ trunk/admin/category/addcategory_custom.php (revision 374)
@@ -1,256 +1,256 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_category";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_custom';
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Custom");
$formaction = $rootURL.$admin."/category/addcategory_custom.php?".$envar;
//echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$ListForm = "permlistform";
$CheckClass = "PermChecks";
$objCatToolBar->Set("CheckClass",$CheckClass);
$objCatToolBar->Set("CheckForm",$ListForm);
$saveURL = $admin."/category/category_maint.php";
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','$saveURL',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','CatEditStatus','".$cancelURL."',2);","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/category/addcategory_custom.php";
$StatusField = "CatEditStatus";
$form = "category";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
}
int_header($objCatToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<form id="category" name="category" action="" method=POST>
<?php
$objCustomFields = new clsCustomFieldList(1);
$objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData");
$objCustomDataList->LoadResource($c->Get("ResourceId"));
for($i=0;$i<$objCustomFields->NumItems(); $i++)
{
$field =& $objCustomFields->GetItemRefByIndex($i);
$fieldid = $field->Get("CustomFieldId");
$f = $objCustomDataList->GetDataItem($fieldid);
$fieldname = "CustomData[$fieldid]";
if(is_object($f))
{
$val_field = "<input type=\"text\" tabindex=\"".($i+1)."\" VALUE=\"".$f->Get("Value")."\" name=\"$fieldname\">";
$field->Set("Value", $val_field);
$field->Set("DataId",$f->Get("CustomDataId"));
}
else
{
$val_field = "<input type=text tabindex=\"".($i+1)."\" VALUE=\"\" name=\"$fieldname\">";
$field->Set("Value", $val_field);
$field->Set("DataId",0);
}
}
$objCustomFields->SortField = $objConfig->Get("CustomData_LV_Sortfield");;
$objCustomFields->SortItems($objConfig->Get("CustomData_LV_Sortorder")!="desc");
$objListView = new clsListView($objCatToolBar,$objCustomFields);
$objListView->IdField = "DataId";
$order = $objConfig->Get("CustomData_LV_Sortfield");
$SortOrder=0;
if($objConfig->Get("CustomData_LV_Sortorder")=="asc")
$SortOrder=1;
$objListView->ColumnHeaders->Add("FieldName",admin_language("la_ColHeader_FieldName"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldName");
$objListView->ColumnHeaders->Add("FieldLabel",admin_language("la_ColHeader_FieldLabel"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldLabel");
$objListView->ColumnHeaders->Add("Value",admin_language("la_ColHeader_Value"),1,0,$order,"width=\"40%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","Value");
$objListView->ColumnHeaders->SetSort($objConfig->Get("CustomData_LV_Sortfield"), $objConfig->Get("CustomData_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = FALSE;
$objListView->CurrentPageVar = "Page_CustomData";
$objListView->PerPageVar = "Perpage_CustomData";
//$objListView->CheckboxName = "itemlist[]";
for($i=0;$i<count($objCustomFields->Items);$i++)
{
$objListView->RowIcons[] = $imagesURL."/itemicons/icon16_custom.gif";
}
$objListView->PageLinks = $objListView->PrintPageLinks();
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input type="hidden" name="ItemId" value="<?php echo $c->Get("ResourceId"); ?>">
<input type="hidden" name="Action" value="m_edit_custom_data">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<FORM id="save_edit" method="POST" NAME="save_edit" ID="save_edit">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php //echo $objCatToolBar->Get("CheckClass").".setImages();"; ?>
MarkAsRequired(document.getElementById("category"));
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addcategory_custom.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/category/addcategory_permissions.php
===================================================================
--- trunk/admin/category/addcategory_permissions.php (revision 373)
+++ trunk/admin/category/addcategory_permissions.php (revision 374)
@@ -1,275 +1,275 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
if(isset($_GET["en"]))
{
$c = $objEditItems->GetItemByIndex($en);
}
if(!is_object($c))
{
$c = new clsCategory($m_var_list["cat"]);
$c->Set("CategoryId",$m_var_list["cat"]);
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_category";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_permissions';
$sec =& $objSections->GetSection($section);
if($c->Get("CategoryId")==0)
{
$sec->Set("left",NULL);
$sec->Set("right",NULL);
}
if($c->Get("CategoryId")!=0)
{
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Permissions");
}
else
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Root")." ".admin_language("la_Text_Category")." - ".admin_language("la_tab_Permissions");
$SortFieldVar = "GroupPerm_SortField";
$SortOrderVar = "GroupPerm_SortOrder";
$DefaultSortField = "FullName";
$PerPageVar = "Perpage_Grouplist";
$CurrentPageVar = "Page_Grouplist";
$CurrentFilterVar = "CatImg_View";
$ListForm = "permlistform";
$CheckClass = "PermChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$saveURL = $admin."/category/category_maint.php";
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','CatEditStatus','$saveURL',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','CatEditStatus','".$cancelURL."',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/category/addcategory_permissions.php";
$StatusField = "CatEditStatus";
$form = "category";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
$objListToolBar->Add("divider");
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_perm", "la_ToolTip_New_Permission","#","swap('new_perm','toolbar/tool_new_permission_f2.gif');",
"swap('new_perm', 'toolbar/tool_new_permission.gif');",
"OpenGroupSelector('$envar&source=addcategory_permissions&CatId=".$c->Get("CategoryId")."&destform=popup&destfield=itemlist');",
"tool_new_permission.gif");
$objListToolBar->Add("perm_edit","Edit","#", "if (PermChecks.itemChecked()) swap('perm_edit','toolbar/tool_edit_f2.gif');",
"if (PermChecks.itemChecked()) swap('perm_edit', 'toolbar/tool_edit.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addpermission_modules', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "PermChecks.addImage('perm_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("perm_del","Delete","#", "if (PermChecks.itemChecked()) swap('perm_del','toolbar/tool_delete_f2.gif');",
"if (PermChecks.itemChecked()) swap('perm_del', 'toolbar/tool_delete.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_permissions', 'm_perm_delete_group');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('perm_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->AddToInitScript($listImages);
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$objGroupList = new clsGroupList();
$order = $objConfig->Get("Group_SortOrder");
$objGroupList->Clear();
$sql = "SELECT ResourceId, g.name as Name, ELT(g.Personal+1,'Group ','User ') as UserGroup FROM ".GetTablePrefix()."Permissions as p ";
$sql .="LEFT JOIN ".GetTablePrefix()."PortalGroup as g ON p.GroupId=g.GroupId WHERE p.CatId=".(int)$c->Get("CategoryId")." GROUP BY Name";
//$sql = "SELECT GroupId, count(*) as PermCount FROM ".GetTablePrefix()."Permissions WHERE CatId=".$c->Get("CategoryId")." GROUP BY GroupId";
$objGroupList->Query_Item($sql);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objGroupList);
$objListView->IdField = "ResourceId";
$objListView->PageLinkTemplate = $pathtoroot. "admin/templates/user_page_link.tpl";
$objListView->ColumnHeaders->Add("Name",admin_language("la_prompt_Name"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"Name");
$objListView->ColumnHeaders->Add("UserGroup",admin_language("la_Colheader_GroupType"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"UserGroup");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar),$order);
$objListView->PrintToolBar = FALSE;
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
int_header($objListToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<FORM method="POST" ACTION="" NAME="<?php echo $ListForm; ?>" ID="<?php echo $ListForm; ?>">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
<INPUT TYPE="hidden" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
</FORM>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<input type="hidden" NAME="Action" VALUE="save_category_edit">
<INPUT TYPE="hidden" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<FORM NAME="popup" ID="popup" METHOD="POST" ACTION="addpermission_modules.php?<?php echo $envar; ?>">
<INPUT TYPE="hidden" NAME="itemlist">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addcategory_permissions.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/category/addpermission.php
===================================================================
--- trunk/admin/category/addpermission.php (revision 373)
+++ trunk/admin/category/addpermission.php (revision 374)
@@ -1,405 +1,405 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
//admin only util
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if(!is_object($c))
{
$c = new clsCategory();
$c->Set("CategoryId",0);
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_permissions";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:catperm_setperm';
$Module = $_GET["module"];
$GroupId = $_GET["GroupId"];
$g = $objGroups->GetItem($GroupId);
$objPermList = new clsPermList($c->Get("CategoryId"),$GroupId);
$objPermList->LoadPermTree($c);
$objParentPerms = new clsPermList($c->Get("ParentId"),$GroupId);
$p = $objCatList->GetCategory($c->Get("ParentId"));
$objParentPerms->LoadPermTree($p);
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
//int_SectionHeader();
//$back_url = $rootURL."admin/category/addpermission_modules.php?env=".BuildEnv()."&GroupId=$GroupId";
$back_url = "javascript:do_edit_save('category','CatEditStatus','".$admin."/category/addpermission_modules.php',0);";
if($c->Get("CategoryId")>0)
{
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Category")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Permissions");
$title .= " ".prompt_language("la_text_for")." '".$g->parsetag("group_name")."'";
}
else
{
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Root")." ".prompt_language("la_Text_Category")." - "."' - ".prompt_language("la_tab_Permissions");
$title .= " ".prompt_language("la_text_for")." '".$g->parsetag("group_name")."'";
}
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','".$admin."/category/addpermission_modules.php',0);",$imagesURL."/toolbar/tool_select.gif");
//$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','admin/category/addpermission_modules.php',-1);", $imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Add("img_cancel", "la_Cancel",$back_url,"swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","", $imagesURL."/toolbar/tool_cancel.gif");
$sec =& $objSections->GetSection($section);
if($c->Get("CategoryId")==0)
{
$sec->Set("left",NULL);
$sec->Set("right",NULL);
}
int_header($objListToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="navbar"><A CLASS="control_link" HREF="<?php echo $back_url; ?>">
<?php echo prompt_language("la_Prompt_CategoryPermissions")."</A>&gt;"; ?></span>
<SPAN CLASS="NAV_CURRENT_ITEM"><?php echo $Module; ?></SPAN>
</td>
</TR>
</TBODY>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<FORM ID="category" NAME="category" method="POST" ACTION="">
<TBODY>
<TR class="subsectiontitle">
<?php
echo "<TD>".prompt_language("la_prompt_Description")."</TD>";
if($c->Get("CategoryId")!=0)
{
echo "<TD>".prompt_language("la_ColHeader_PermInherited")."</TD>";
}
echo "<TD>".prompt_language("la_ColHeader_PermAccess")."</TD>\n";
if($c->Get("CategoryId")!=0)
{
echo "<td>".prompt_language("la_ColHeader_InheritFrom")."</TD>";
}
?>
</TR>
<?php
if($c->Get("CategoryId")>0)
{
$ParentCatList = "0".$c->Get("ParentPath");
}
else
$ParentCatList = "0".$c->GetParentField("ParentPath","","");
$ParentCats = explode("|",$ParentCatList);
$ParentCats = array_reverse($ParentCats);
$sql = "SELECT * FROM ".GetTablePrefix()."PermissionConfig WHERE ModuleId='$Module'";
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$perm = $rs->fields;
$Permission = $perm["PermissionName"];
$Desc = $perm["Description"];
echo "<TR ".int_table_color_ret().">\n";
echo "<TD>".prompt_language("$Desc")." [$Permission]</TD>";
$p = $objPermList->GetPermByName($Permission);
$checked = "";
$MatchCatPath = "";
if(is_object($p))
{
//echo $p->Get("Permission")." Found<br>\n";
if($p->Inherited)
{
$checked = " CHECKED";
$MatchCatPath = "";
if($c->Get("CategoryId")>0)
{
$MatchedCat = $objPermList->GetDefinedCategory($Permission,$GroupId);
}
else
$MatchedCat = $objParentPerms->GetDefinedCategory($Permission,$GroupId);
if(is_numeric($MatchedCat))
{
if($MatchedCat!=0)
{
$mcat = $objCatList->GetCategory($MatchedCat);
$MatchCatPath = language($objConfig->Get("Root_Name")).">".$mcat->Get("CachedNavbar");
}
else
$MatchCatPath = language($objConfig->Get("Root_Name"));
}
else
$MatchCatPath = "";
}
}
else
$checked = " CHECKED";
if($c->Get("CategoryId")!=0)
{
echo " <TD><INPUT access=\"chk".$Permission."\" ONCLICK=\"SetAccessEnabled(this); \" TYPE=CHECKBOX name=\"inherit[]\" VALUE=\"".$Permission."\" $checked></TD>\n";
}
else
{
if(is_object($p))
$p->Inherited = FALSE;
}
$checked = "";
$imgsrc="red";
if(is_object($p))
{
if($p->Get("PermissionValue"))
{
$checked = " CHECKED";
$imgsrc = "green";
$current = "true";
}
else
{
$imgsrc = "red";
$current = "false";
}
$disabled = "";
if($p->Inherited)
{
if($c->Get("CategoryId")!=0)
{
$InheritValue = $current;
$UnInheritValue = "false";
$disabled = "DISABLED=\"true\"";
}
else
{
$disabled = "";
$UnInheritValue = "false";
$InheritValue="false";
}
}
else
{
$disabled = "";
if($p->Get("PermissionValue"))
{
$InheritValue = "false"; //need to look this up!
}
else
$InheritValue = "false";
$UnInheritValue = $current;
}
}
else
{
if($c->Get("CategoryId")!=0)
{
$disabled = "DISABLED=\"true\"";
$InheritValue = "false";
$UnInheritValue = "false";
$Matched = FALSE;
$MatchCatPath = "";
$MatchedCat = $objPermList->GetDefinedCategory($Permission,$GroupId);
if(is_numeric($MatchedCat))
{
if($MatchedCat>0)
{
$mcat = $objCatList->GetCategory($MatchedCat);
$MatchCatPath =language($objConfig->Get("Root_Name")).">".$mcat->Get("CachedNavbar");
}
else
$MatchCatPath = language($objConfig->Get("Root_Name"));
}
else
$MatchCatPath = "";
}
else
{
$disabled = "";
$UnInheritValue = "false";
$InheritValue="false";
}
}
echo " <TD><INPUT $disabled InheritValue=\"$InheritValue\" UnInheritValue=\"$UnInheritValue\" ID=\"chk".$Permission."\" ONCLICK=\"SetPermImage(this); \" permimg=\"img".$Permission."\" TYPE=CHECKBOX name=\"permvalue[]\" VALUE=\"".$Permission."\" $checked>";
echo " <img ID=\"img".$Permission."\" SRC=\"$imagesURL/perm_".$imgsrc.".gif\">";
echo " </TD>\n";
if($c->Get("CategoryId")!=0)
echo "<TD>$MatchCatPath</TD>";
echo "</TR>\n";
$rs->MoveNext();
}
?>
</TBODY>
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_edit_permissions">
<input type="hidden" NAME="GroupId" VALUE="<?php echo $GroupId; ?>">
<input TYPE="HIDDEN" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
<input TYPE="HIDDEN" NAME="Module" VALUE="<?php echo $Module; ?>">
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addpermission.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/category/addcategory.php
===================================================================
--- trunk/admin/category/addcategory.php (revision 373)
+++ trunk/admin/category/addcategory.php (revision 374)
@@ -1,381 +1,381 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
unset($objEditItems);
if($_REQUEST['item'])
{
// smulate like normal edit button pressed
$tmp_cat =& $objCatList->GetItemByField('ResourceId', $_REQUEST['item']);
$_POST['catlist'][] = $tmp_cat->UniqueId();
}
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
$objCustomFields = new clsCustomFieldList(1);
$objCustomDataList = new clsCustomDataList();
$objRelList = new clsRelationshipList();
$objImages = new clsImageList();
//Multiedit init
if ($_GET["new"] == 1)
{
$c = new clsCategory(NULL);
$c->Set("CreatedOn", time());
$c->Set("EndOn", time());
$c->Set("ParentId",$objCatList->CurrentCategoryID());
$c->Set("NewItem",2); //auto
$c->Set("Status",2); //pending
$en = 0;
$action = "m_add_category";
$objCatList->CreateEmptyEditTable("CategoryId");
$objRelList->CreateEmptyEditTable("RelationshipId");
$objCustomDataList->CreateEmptyEditTable("CustomDataId");
$objImages->CreateEmptyEditTable("ResourceId");
$TitleVerb = prompt_language("la_Text_Adding");
}
else
{
if(isset($_POST["catlist"]))
{
$cats = $_POST["catlist"];
$objCatList->CopyToEditTable("CategoryId",$cats);
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
/* make a copy of the relationship records */
$ids = $objEditItems->GetResourceIDList();
$objRelList->CopyToEditTable("SourceId", $ids);
$objCustomDataList->CopyToEditTable("ResourceId",$ids);
$objImages->CopyToEditTable("ResourceId", $ids);
$c = $objEditItems->GetItemByIndex(0);
$itemcount=$objEditItems->NumItems();
$en = 0;
}
else
{
if($_GET["item"])
{
/*shortcut to edit link */
$objCatList->CopyToEditTable("ResourceId",$_GET["item"]);
$backurl = $_GET["return"];
}
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
//$ids = $objEditItems->GetResourceIDList();
//$objRelList->CopyToEditTable("SourceId", $ids);
//$objCustomDataList->CopyToEditTable("ResourceId",$ids);
//$objImages->CopyToEditTable("ResourceId", $ids);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
}
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_category";
$TitleVerb = prompt_language("la_Text_Editing");
}
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_general';
if (strlen($c->Get("Name")))
$editing_category_title = "'".$c->Get("Name")."' ";
else
$editing_category_title = "";
$title = $TitleVerb." ".prompt_language("la_Text_Category")." $editing_category_title- ".prompt_language("la_tab_General");
//$saveURL = $admin."/browse.php";
$saveURL = $admin."/category/category_maint.php";
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('category','CatEditStatus','$saveURL',1,'');","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('category','CatEditStatus','$cancelURL',2,'');","tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/category/addcategory.php";
$StatusField = "CatEditStatus";
$form = "category";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
}
int_header($objCatToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="category" name="category" action="" method=POST>
<tr <?php int_table_color(1); ?>>
<td valign="top" colspan="3"><?php echo prompt_language("la_prompt_Enable_HTML"); ?>
<input type="checkbox" name="html_enable" value="1" checked>
<br>
<?php int_hint(prompt_language("la_Warning_Enable_HTML")); ?>
</td>
</tr>
<?php int_subsection_title(prompt_language("la_Text_Category")); ?>
<?php if( $c->Get("CategoryId") > 0 ) { ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_CategoryId"); ?></span></td>
<td valign="top"><span class="text"><?php echo $c->Get("CategoryId"); ?></span></td>
<td><span class="text">&nbsp;</span></td>
</tr>
<?php } ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_cat_name" class="text"><?php echo prompt_language("la_prompt_Name"); ?></span></td>
<td>
<input type="text" name="cat_name" ValidationType="exists" tabindex="1" class="text" size="30" value="<?php echo $c->parsetag("cat_name"); ?>">
</td>
<td></td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span ID="prompt_cat_desc" class="text"><?php echo prompt_language("la_prompt_Description"); ?></span>
<br />
<a href="#">
<img src="<?php echo $rootURL; ?>admin/icons/icon24_link_editor.gif" style="cursor:hand" border="0"
ONCLICK="document.forms[0].elements[0].checked=true; OpenEditor('&section=<?php echo $section; ?>','category','cat_desc');">
</a>
</td>
<td>
<textarea name="cat_desc" tabindex="2" ValidationType="exists" cols="60" rows="5" class="text"><?php echo inp_textarea_unescape($c->parsetag("cat_desc")); ?></textarea>
</td>
<td></td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_Properties")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_status" class="text"><?php echo prompt_language("la_prompt_Status"); ?></span></td>
<td>
<input type="radio" tabindex="3" name="status" class="text" value="1" <?php if($c->Get("Status") == 1) echo "checked"; ?>><?php echo prompt_language("la_val_Active"); ?>
<input type="radio" tabindex="3" name="status" class="text" value="2" <?php if($c->Get("Status") == 2) echo "checked"; ?>><?php echo prompt_language("la_val_Pending"); ?>
<input type="radio" tabindex="3" name="status" class="text" value="0" <?php if($c->Get("Status") == 0) echo "checked"; ?>><?php echo prompt_language("la_val_Disabled"); ?>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_itemnew" class="text"><?php echo prompt_language("la_prompt_New"); ?></span></td>
<td>
<input type="radio" tabindex="4" name="itemnew" class="text" value="2" <?php if($c->Get("NewItem") == 2) echo "checked"; ?>><?php echo prompt_language("la_val_Auto"); ?>
<input type="radio" tabindex="4" name="itemnew" class="text" value="1" <?php if($c->Get("NewItem") == 1) echo "checked"; ?>><?php echo prompt_language("la_val_Always"); ?>
<input type="radio" tabindex="4" name="itemnew" class="text" value="0" <?php if($c->Get("NewItem") == 0) echo "checked"; ?>><?php echo prompt_language("la_val_Never"); ?>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_cat_pick" class="text"><?php echo prompt_language("la_prompt_EditorsPick"); ?></span></td>
<td>
<input type="checkbox" tabindex="5" name="cat_pick" class="text" value="1" <?php if($c->Get("EditorsPick") == 1) echo "checked"; ?>>
</td>
<td class="text">&nbsp;</td>
</tr>
<TR <?php int_table_color(); ?> >
<TD><span id="prompt_Priority" class="text"><?php echo prompt_language("la_prompt_Priority"); ?></span></TD>
<TD><input type=text SIZE="5" tabindex="6" NAME="Priority" VALUE="<?php echo $c->Get("Priority"); ?>"></TD>
<TD>&nbsp;</TD>
</TR>
<tr <?php int_table_color(); ?>>
<td valign="top" ID="prompt_cat_date" class="text"> <?php echo prompt_language("la_prompt_CreatedOn"); ?> </td>
<td>
<input type="text" ValidationType="date,exists" tabindex="7" name="cat_date" id="cat_date_selector" datepickerIcon="../images/ddarrow.gif" class="text" size="20" value="<?php echo $c->parsetag("cat_date"); ?>">
<span class="small"><?php echo prompt_language("la_prompt_DateFormat"); ?></span></td>
<td></td>
</tr>
<?php int_subsection_title(prompt_language("la_Sectionheader_MetaInformation")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_meta_keywords" class="text"><?php echo prompt_language("la_prompt_MetaKeywords"); ?></span></td>
<td>
<input type="text" name="meta_keywords" tabindex="8" class="text" size="30" value="<?php echo $c->parsetag("cat_metakeywords"); ?>">
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top"><span id="prompt_meta_desc" class="text"><?php echo prompt_language("la_prompt_MetaDescription"); ?></span></td>
<td>
<textarea name="meta_desc" tabindex="9" cols="60" rows="2" class="text"><?php echo inp_textarea_unescape($c->parsetag("cat_metadesc")); ?></textarea>
</td>
<td class="text">&nbsp;</td>
</tr>
<?php
$CustomFieldUI = $objCustomFields->GetFieldUIList(TRUE);
if($CustomFieldUI->NumItems()>0)
{
$objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData");
if((int)$c->Get("ResourceId")>0)
{
$objCustomDataList->LoadResource($c->Get("ResourceId"));
}
$headings = $CustomFieldUI->GetHeadingList();
//echo "<PRE>";print_r($objCustomFields); echo "</PRE>";
for($i=0;$i<=count($headings);$i++)
{
$h = $headings[$i];
if(strlen($h))
{
int_subsection_title(prompt_language($h));
$Items = $CustomFieldUI->GetHeadingItems($h);
foreach($Items as $f)
{
$n = substr($f->name,1);
$cfield = $objCustomFields->GetItemByField("FieldName",$n,FALSE);
if(is_object($cfield))
{
$cv = $objCustomDataList->GetDataItem($cfield->Get("CustomFieldId"));
if(is_object($cv))
{
$f->default_value = $cv->Get("Value");
}
}
print "<tr ".int_table_color_ret().">\n";
print " <td valign=\"top\" class=\"text\">".$f->GetPrompt()."</td>\n";
print " <td nowrap>".$f->ItemFormElement()."</TD>";
if(is_object($f->NextItem))
{
$n = $f->NextItem;
print " <td>".$n->ItemFormElement()."</TD>";
}
else
print " <td><span class=\"text\">&nbsp;</span></td>\n";
print "</tr>\n";
}
}
}
}
?>
<input type="hidden" name="ParentId" value="<?php echo $c->Get("ParentId"); ?>">
<input type="hidden" name="CategoryId" value="<?php echo $c->parsetag("cat_id"); ?>">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
</table>
<script src="<?php echo $adminURL; ?>/include/calendar.js"></script>
<SCRIPT language="JavaScript">
initCalendar("cat_date_selector", CalDateFormat);
</SCRIPT>
<FORM method="POST" NAME="save_edit" ID="save_edit">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<?php
MarkFields('category');
int_footer();
?>
Property changes on: trunk/admin/category/addcategory.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/category/addcategory_relations.php
===================================================================
--- trunk/admin/category/addcategory_relations.php (revision 373)
+++ trunk/admin/category/addcategory_relations.php (revision 374)
@@ -1,434 +1,434 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key => $value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if( file_exists($path) ) include_once($path);
}
/* ------------------------------------- Edit Table --------------------------------------------------- */
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_category";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_relations';
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Relations");
$SortFieldVar = "Relation_LV_Sortfield";
$SortOrderVar = "Relation_LV_Sortorder";
$DefaultSortField = "ItemName";
$PerPageVar = "Perpage_Relations";
$CurrentPageVar = "Page_Relations";
$CurrentFilterVar = "CatRel_View";
$ListForm = "permlistform";
$CheckClass = "PermChecks";
$saveURL = $admin."/category/category_maint.php";
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
//echo $envar."<br>\n";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','CatEditStatus','$saveURL',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','CatEditStatus','".$cancelURL."',2);","tool_cancel.gif");
if($itemcount == 1) $objListToolBar->Add("divider");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
//Display header
$sec = $objSections->GetSection($section);
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/category/addcategory_relations.php";
$StatusField = "CatEditStatus";
$form = "category";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
$objListToolBar->Add("divider");
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_rel", "la_ToolTip_New_Relation","#".$envar,"swap('new_rel','toolbar/tool_new_relation_f2.gif');",
"swap('new_rel', 'toolbar/tool_new_relation.gif');",
"OpenItemSelector('$envar&source=addcategory_relations&CatId=".$c->Get("CategoryId")."&destform=popup&destfield=itemlist&Selector=radio');",
"tool_new_relation.gif",FALSE,FALSE);
$objListToolBar->Add("rel_edit","la_ToolTip_Edit","#", "if (PermChecks.itemChecked()) swap('rel_edit','toolbar/tool_edit_f2.gif');",
"if (PermChecks.itemChecked()) swap('rel_edit', 'toolbar/tool_edit.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addrelation', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "PermChecks.addImage('rel_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("rel_del","la_ToolTip_Delete","#", "if (PermChecks.itemChecked()) swap('rel_del','toolbar/tool_delete_f2.gif');",
"if (PermChecks.itemChecked()) swap('rel_del', 'toolbar/tool_delete.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_relations', 'm_rel_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('rel_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("rel_move_up","la_ToolTip_Move_Up","#", "if (PermChecks.itemChecked()) swap('rel_move_up','toolbar/tool_move_up_f2.gif');",
"if (PermChecks.itemChecked()) swap('rel_move_up', 'toolbar/tool_move_up.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_relations', 'm_rel_move_up');",
"tool_move_up.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('rel_move_up','$imagesURL/toolbar/tool_move_up.gif','$imagesURL/toolbar/tool_move_up_f3.gif',1); ";
$objListToolBar->Add("rel_move_down","la_ToolTip_Move_Down","#", "if (PermChecks.itemChecked()) swap('rel_move_down','toolbar/tool_move_down_f2.gif');",
"if (PermChecks.itemChecked()) swap('rel_move_down', 'toolbar/tool_move_down.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addcategory_relations', 'm_rel_move_down');",
"tool_move_down.gif",FALSE,TRUE);
$listImages[] = "PermChecks.addImage('rel_move_down','$imagesURL/toolbar/tool_move_down.gif','$imagesURL/toolbar/tool_move_down_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
$Rel_AllValue = 255;
$Bit_Categories = 1;
$Bit_Links = 2;
$Bit_News = 4;
$Bit_Topics = 8;
$Bit_OneWay = 16;
$Bit_Recip = 32;
$Bit_Enabled=64;
$Bit_Disabled=128;
$FilterLabels[0] = admin_language("la_Text_Category");
$FilterLabels[1] = admin_language("la_Text_Links");
$FilterLabels[2] = admin_language("la_Text_Articles");
$FilterLabels[3] = admin_language("la_Text_Topics");
$FilterLabels[4] = admin_language("la_Text_OneWay");
$FilterLabels[5] = admin_language("la_Text_Reciprocal");
$FilterLabels[6] = admin_language("la_Text_Enabled");
$FilterLabels[7] = admin_language("la_Text_Disabled");
$RelView = $objConfig->Get($CurrentFilterVar);
if(!is_numeric($RelView))
{
$RelView = $Rel_AllValue;
}
else
{
$RelTypes = array();
if($RelView & $Bit_Categories)
$RelTypes[] = 1;
if($RelView & $Bit_Links)
$RelTypes[] = 4;
if($RelView & $Bit_News)
$RelTypes[] = 2;
if($RelView & $Bit_Topics)
$RelTypes[] = 3;
$RelFilters = array();
if(count($RelTypes))
{
$TypeFilter = "rel.TargetType IN (".implode(",",$RelTypes).")";
}
$RelTypes = array();
if($RelView & $Bit_OneWay)
$RelTypes[] = 0;
if($RelView & $Bit_Recip)
$RelTypes[] = 1;
if(count($RelTypes))
$RelFilters[] = "rel.Type IN (".implode(",",$RelTypes).")";
if($RelView & $Bit_Enabled)
$RelFilters[] = "rel.Enabled=1";
if($RelView & $Bit_Disabled)
$RelFilters[] = "rel.Enabled=0";
if(count($RelFilters))
{
$RelFilter = $TypeFilter." AND (". implode(" OR ",$RelFilters).")";
}
else
$RelFilter = $TypeFilter;
}
//$r =& $c->RelationObject();
$objRelList = new clsRelationshipList();
$objRelList->SourceTable = $objSession->GetEditTable("Relationship");
$reltable = $objRelList->SourceTable;
// ==== build sql depending on modules installed: begin ====
$prefix = GetTablePrefix();
$modules = $objModules->GetModuleList();
$sql_source = $objModules->ExecuteFunction('GetModuleInfo', 'rel_list');
$sql_templates['ItemName'] = 'IFNULL('.$prefix."%s.%s,' ')";
$sql_templates['TableJoin'] = 'LEFT JOIN '.$prefix."%1\$s ON ".$prefix."%1\$s.ResourceId = rel.TargetId";
$sql_templates['TargetName'] = "IF(rel.TargetType = %s, '%s', %s)";
$sql = "SELECT TRIM(CONCAT(%s)) AS ItemName, %s AS ItemType,".
GetELT('rel.Type+1', Array('la_Text_OneWay','la_Text_Reciprocal')).' AS RelationType,'.
"RelationshipId, rel.Priority AS Priority, rel.Type as Type, rel.Enabled as Enabled,".
GetELT('rel.Enabled+1', Array('la_Text_Disabled','la_Text_Enabled')).' AS Status '.
'FROM '.$reltable.' AS rel %s WHERE rel.SourceId = '.$c->Get('ResourceId');
$sql_parts = Array();
$sql_parts['TargetName'] = "''";
foreach($modules as $module)
{
$sql_parts['ItemName'][] = sprintf($sql_templates['ItemName'], $sql_source[$module]['MainTable'], $sql_source[$module]['ItemNameField']);
$sql_parts['TableJoin'][] = sprintf($sql_templates['TableJoin'], $sql_source[$module]['MainTable']);
$sql_parts['TargetName'] = sprintf( $sql_templates['TargetName'],
$sql_source[$module]['TargetType'],
admin_language($sql_source[$module]['ItemNamePhrase']),
$sql_parts['TargetName']);
}
$sql = sprintf($sql, implode(', ',$sql_parts['ItemName']), $sql_parts['TargetName'], implode(' ',$sql_parts['TableJoin']));
// ==== build sql depending on modules installed: end ====
if(strlen($RelFilter))
{
$sql .= " AND (".$RelFilter.")";
}
$SearchWords = $objSession->GetVariable("CatRelSearchWord");
if(strlen($SearchWords))
{
$where = $objRelList->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
if(strlen($where))
$sql .= " AND ($where)";
if(strlen(trim($objConfig->Get($SortFieldVar))))
{
$order = " ORDER BY rel.Priority DESC, ".$objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar);
}
else
$order = " ORDER BY rel.Priority DESC";
if($objConfig->Get($CurrentPageVar)>0)
{
$objRelList->Page = $objConfig->Get($CurrentPageVar);
}
if($objConfig->Get($PerPageVar)>0)
{
$objListView->PerPage = $objConfig->Get($PerPageVar);
}
$sql .= $order." ".$objRelList->GetLimitSQL();
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objRelList->Query_Item($sql);
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objRelList);
$objListView->IdField = "RelationshipId";
$objListView->ColumnHeaders->Add("ItemName",admin_language("la_ColHeader_Item"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"ItemName");
$objListView->ColumnHeaders->Add("ItemType",admin_language("la_ColHeader_ItemType"),1,0,$order,"width=\"20%\"",$SortFieldVar,$SortOrderVar,"ItemType");
$objListView->ColumnHeaders->Add("RelationType",admin_language("la_prompt_RelationType"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"RelationType");
$objListView->ColumnHeaders->Add("Status",admin_language("la_prompt_Status"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"Status");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_rel_search";
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$RelView,$Rel_AllValue);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objRelList->Items);$i++)
{
$rel =& $objRelList->GetItemRefByIndex($i);
$objListView->RowIcons[] = $rel->Admin_Icon();
}
$objListToolBar->AddToInitScript("fwLoadMenus();\n");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<FORM method="POST" ACTION="" NAME="<?php echo $ListForm; ?>" ID="<?php echo $ListForm; ?>">
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="">
<INPUT TYPE="hidden" NAME="CategoryId" VALUE="<?php echo $c->Get("CategoryId"); ?>">
<INPUT TYPE="hidden" NAME="SourceId" VALUE = "<?php echo $c->Get("ResourceId"); ?>">
</FORM>
<FORM NAME="popup" ID="popup" METHOD="POST" ACTION="addrelation.php?<?php echo $envar; ?>">
<INPUT TYPE="hidden" NAME="TargetId"><INPUT TYPE="hidden" NAME="TargetType">
<INPUT TYPE="hidden" NAME="Action" value="m_add_relation_form">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type=hidden NAME="Action" VALUE="save_category_edit">
<input type="hidden" name="CatEditStatus" VALUE="0">
</td>
</tr>
</FORM>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<!-- END CODE-->
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/category/addcategory_relations.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/category/addrelation.php
===================================================================
--- trunk/admin/category/addrelation.php (revision 373)
+++ trunk/admin/category/addrelation.php (revision 374)
@@ -1,276 +1,276 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditCat);
$objEditCat = new clsCatList();
$objEditCat->SourceTable = $objSession->GetEditTable("Category");
//Multiedit init
$en = (int)$_GET["en"];
$objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable);
$itemcount=$objEditCat->NumItems();
$c = $objEditCat->GetItemByIndex($en);
unset($objEditItems);
$objEditItems = new clsRelationshipList();
$objEditItems->SourceTable = $objSession->GetEditTable("Relationship");
if(isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$RelationId = $_POST["itemlist"][0];
}
else
{
$RelationId = $_POST["itemlist"];
}
$Rel = new clsRelationship();
$Rel->tablename = $objEditItems->SourceTable;
$Rel->LoadExpanded($RelationId);
$action = "m_edit_relation";
}
else
{
$Rel = new clsRelationship();
$Rel->Set("SourceType","1");
$Rel->Set("SourceId",$c->Get("ResourceId"));
$Rel->Set("TargetId",$_POST["TargetId"]);
$Rel->Set("TargetType",$_POST["TargetType"]);
$Rel->Set("Type","0");
$Rel->Set("Enabled","1");
$action = "m_add_relation";
}
$item = $Rel->GetTargetItemData();
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_relation';
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Category")." '".$c->Get("Name")."' - ".prompt_language("la_Text_Relation");
$title .= " ".prompt_language("la_Text_to")." '".$item["TitleField"]."'";
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','".$admin."/category/addcategory_relations.php',0);",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','CatEditStatus','".$admin."/category/addcategory_relations.php',-1);",$imagesURL."/toolbar/tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
<tr>
<td valign="top">
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
</td>
</tr>
</table>
<?php } ?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<FORM ID="category" NAME="category" method="POST" ACTION="">
<?php int_subsection_title("Relation"); ?>
<TR <?php int_table_color(); ?> >
<TD>
<span class="text"><?php echo prompt_language("la_prompt_RelationId"). ":</span></TD><TD>".$Rel->Get("RelationshipId"); ?>
</TD>
<TD>&nbsp;</TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><span class="text"><?php echo prompt_language("la_prompt_Item"); ?></SPAN></TD>
<TD>
<IMG src="<?php echo $Rel->Admin_Icon(); ?>" align="absmiddle"><SPAN id="TargetName"><?php echo $item["TitleField"]; ?></SPAN> <SPAN ID="TargetTypeName">(<?php echo prompt_language("la_Text_".$item["SourceTable"]); ?>)</SPAN>
</TD>
<TD>&nbsp;</TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><span class="text"><?php echo prompt_language("la_prompt_Type"); ?></SPAN></TD>
<TD>
<?php
$Recip = "";
$OneWay = "";
if($Rel->Get("Type")=="1")
{
$Recip = " CHECKED";
}
else
$OneWay = " CHECKED";
?>
<input type="radio" name="RelType" VALUE=1 <?php echo $Recip; ?>><?php echo prompt_language("la_Text_Reciprocal"); ?>
<input type="radio" name="RelType" VALUE=0 <?php echo $OneWay; ?>><?php echo prompt_language("la_Text_OneWay"); ?>
</TD>
<TD>&nbsp;</TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><span class="text"><?php echo prompt_language("la_prompt_Enabled"); ?></SPAN></TD>
<TD>
<?php
$checked = "";
if($Rel->Get("Enabled")=="1")
{
$checked = " CHECKED";
}
?>
<input type="checkbox" VALUE="1" name="Enabled" <?php echo $checked; ?>>
</TD>
<TD>&nbsp;</TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><span class="text"><?php echo prompt_language("la_prompt_Priority"); ?></SPAN></TD>
<TD>
<INPUT TYPE="TEXT" SIZE="5" NAME="priority" VALUE="<?php echo $Rel->Get("Priority"); ?>">
</TD>
<TD>&nbsp;</TD>
</TR>
<input type="hidden" name="TargetId" value ="<?php echo $Rel->Get("TargetId"); ?>">
<input type="hidden" name="TargetType" value ="<?php echo $Rel->Get("TargetType"); ?>">
<input type="hidden" name="SourceType" value ="<?php echo $Rel->Get("SourceType"); ?>">
<input type="hidden" name="SourceId" value ="<?php echo $c->Get("ResourceId"); ?>">
<INPUT TYPE="hidden" NAME="RelationshipId" VALUE="<?php echo $Rel->Get("RelationshipId"); ?>">
<input type="hidden" name="Action" value="<?php echo $action; ?>">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
</TABLE>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type=hidden NAME="Action" VALUE="save_cat_edit">
</td>
</tr>
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/category/addrelation.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/category/addcategory_customfields.php
===================================================================
--- trunk/admin/category/addcategory_customfields.php (revision 373)
+++ trunk/admin/category/addcategory_customfields.php (revision 374)
@@ -1,223 +1,223 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsCatList();
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
$objCustomFields = new clsCustomFieldList(TYPE_CATEGORY,$objSession->GetEditTable("CustomField"));
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
echo $itemcount . " items loaded..<br>\n";
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_category";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:editcategory_custom';
$formaction = $adminURL."/category/addcategory_custom.php?".$envar;
//echo $envar."<br>\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','".$admin."/browse.php',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','".$admin."/browse.php',2);","tool_cancel.gif");
if($en_prev or $en_next)
{
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$_SERVER["PHP_SELF"].$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),"#","","","","tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_next";
$link=$_SERVER["PHP_SELF"].$var;
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","tool_next.gif");
}
else
{
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","tool_next_f3.gif");
}
int_header($objCatToolBar,NULL,$title);
}
else
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php
foreach($objCustomFields->Items as $f)
{
$o .= "<TR ". int_table_color_ret().">";
$o .= "<TD valign=\"top\"><span class=\"text\"><input type=checkbox NAME=\"dellist[]\" VALUE=\"".$f->Get("CustomFieldId")."\">";
$o .= $f->Get("FieldName")."</TD>";
$o .= "<td valign=\"top\"><span class=\"text\">".$f->Get("FieldLabel")."</TD>";
$o .= "</TR>";
}
?>
<?php if(strlen($o)) { ?>
<FORM method=POST action="<?php echo $formaction; ?>" NAME="delcustom">
<?php int_subsection_title("Custom Defined Fields"); ?>
<?php print $o; ?>
<tr <?php int_table_color(); ?>>
<TD COLSPAN=3>
<input TYPE="SUBMIT" VALUE="Delete Checked Fields">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_del_custom_field">
</TD></TR>
<?php } ?>
</FORM>
<?php int_subsection_title("New Custom Field"); ?>
<tr <?php int_table_color(); ?>>
<td COLSPAN=3>
<FORM method=POST action="<?php echo $formaction; ?>" NAME="addcustom">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_add_custom_field">
<INPUT TYPE="HIDDEN" NAME="DataType" VALUE="<?php echo TYPE_CATEGORY; ?>">
New Custom Field Name:<INPUT TYPE="TEXT" NAME="FieldName">
Label: <INPUT TYPE="TEXT" NAME="FieldLabel">
<INPUT TYPE="SUBMIT" VALUE="Add Field" CLASS="buttton">
</FORM>
</TD></TR>
</table>
<FORM NAME="save_edit_buttons" ID="save_edit_buttons" method="POST" ACTION="">
<input type=hidden NAME="Action" VALUE="save_cat_edit">
<input type="hidden" name="CatEditStatus" VALUE="0">
</FORM>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/category/addcategory_customfields.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/subitems.php
===================================================================
--- trunk/admin/subitems.php (revision 373)
+++ trunk/admin/subitems.php (revision 374)
@@ -1,186 +1,186 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $path=dirname(realpath(__FILE__));
if(strlen($path))
{
/* determine the OS type for path parsing */
$pos = strpos($path,":");
if ($pos === false)
{
$gOS_TYPE="unix";
$pathchar = "/";
}
else
{
$gOS_TYPE="win";
$pathchar="\\";
}
$p = $path.$pathchar;
/*Start looking for the root flag file */
while(!strlen($pathtoroot) && strlen($p))
{
$sub = substr($p,strlen($pathchar)*-1);
if($sub==$pathchar)
{
$filename = $p."root.flg";
}
else
$filename = $p.$pathchar."root.flg";
if(file_exists($filename))
{
$pathtoroot = $p;
}
else
{
$parent = realpath($p.$pathchar."..".$pathchar);
if($parent!=$p)
{
$p = $parent;
}
else
$p = "";
}
}
if(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
//echo "Admin: $admin <br>\n";
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL=$rootURL.$admin;
$imagesURL = $adminURL."/images";
$cssURL = $adminURL."/include";
$jsURL = $adminURL."/include/subitems";
//admin only util
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
//require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
$section = $_GET["section"];
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
$incs = array();
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$inc = $pathtoroot.$value."admin/include/summary/".$sectionname.".php";
//echo "<pre>". $inc ."</pre><BR>";
if(file_exists($inc))
$incs[] = $inc;
}
$envar = BuildEnv();
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
clear_checkboxes=0;
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<<END
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$cssURL/subitems.css">
<script src="$jsURL/listitems.js"></script>
<script src="$jsURL/imgbuttons.js"></script>
<script src="$jsURL/navboxes.js"></script>
END;
int_SectionHeader();
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td valign="top">
<table cellspacing="0" cellpadding="2" border="0" width="100%" CLASS="tableborder_full">
<?php
$parent = $objSections->GetSection($section);
$sub = $objSections->GetSection($parent->Get("child"));
while(is_object($sub))
{
echo "<tr isListItem=\"true\" ". int_table_color_ret(). ">\n";
echo " <td class=\"subitem_icon\">";
echo " <img ALIGN=\"left\" src=\"".$sub->IconURL(2)."\" border=\"0\">";
echo " </td>";
echo " <td class=\"subitem_description\"><a href=\"".$sub->URL()."\" class=\"dLink\">";
$lang_tag = "la_Description_".$sub->Get("key");
echo admin_language($sub->Get("name"))."</A>";
echo prompt_language($lang_tag); //$sub->Get("description");
echo " </td>\n";
echo "</tr>\n";
$sub = $objSections->GetSection($sub->Get("right"));
}
?>
</TABLE>
</TD>
<?php
if(count($incs)>0)
{
?>
<td width="1"><img src="<?php echo $imagesURL; ?>/spacer.gif" width="4" height="1"></td>
<td width="269" valign="top" class="boxContainer">
<?php
// including each module summaries here
for($i=0;$i<count($incs);$i++)
include($incs[$i]);
?>
</TD>
<?php
}
?>
</TR>
</TABLE>
<?php
if(count($incs)>0)
{
?>
<script>
init();
</script>
<?php
}
?>
<form ID="viewmenu" NAME="viewmenu" method="post" action="user_list.php?env=<?php echo BuildEnv(); ?>" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
<?php int_footer(); ?>
Property changes on: trunk/admin/subitems.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/advanced_view.php
===================================================================
--- trunk/admin/advanced_view.php (revision 373)
+++ trunk/admin/advanced_view.php (revision 374)
@@ -1,365 +1,365 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
//$pathtoroot="";
$b_topmargin = "0";
//$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='position:absolute; width:100%;top:0px;' align='right'><img src='images/logo_bg.gif'></div><img src='images/spacer.gif' width=1 height=15><br><div style='z-Index:1; position:relative'>";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
$indexURL = $rootURL."index.php";
$m_var_list_update["cat"] = 0;
$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
unset($m_var_list_update["cat"]);
//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(!$is_install)
{
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
}
//Set Section
$section = 'in-portal: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)
{
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="SearchWord" type="text" value="'.$SearchWord.'" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
<td>
<img
id="imgSearch"
src="'.$btn_prefix.'.gif"
alt="'.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").'"
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>';
}
// common "Advanced View" tab php functions: end
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<<END
<script type="text/javascript">
if (window.opener != null) {
theMainScript.CloseAndRefreshParent();
}
</script>
END;
print <<<END
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/checkboxes_new.js"></script>
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
END;
load_module_styles();
if( !isset($list) ) $list = '';
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:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="approve" alt="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="decline" alt="<?php echo admin_language("la_ToolTip_Decline"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="print" alt="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</td>
</tr>
</tbody>
</table>
<?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 int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/advanced_view.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/editor/FCKeditor/css/fck_editorarea.php
===================================================================
--- trunk/admin/editor/FCKeditor/css/fck_editorarea.php (revision 373)
+++ trunk/admin/editor/FCKeditor/css/fck_editorarea.php (revision 374)
@@ -1,100 +1,100 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$csspath = $pathtoroot."themes/";
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
if(!is_object($CurrentTheme))
{
$CurrentTheme = $objThemes->GetItem($m_var_list["theme"]);
$theme = $CurrentTheme->Get("Name");
}
if(is_object($CurrentTheme))
{
}
else
{
$theme = "default";
}
$csspath .= $theme."/incs/style.css";
//echo "Reading $csspath <br>\n";
if(file_exists($csspath))
{
readfile($csspath);
}
?>
\ No newline at end of file
Property changes on: trunk/admin/editor/FCKeditor/css/fck_editorarea.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/editor/FCKeditor/fckeditor.php
===================================================================
--- trunk/admin/editor/FCKeditor/fckeditor.php (revision 373)
+++ trunk/admin/editor/FCKeditor/fckeditor.php (revision 374)
@@ -1,156 +1,156 @@
<?php
/*
* 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.
*
* fckeditor.php: PHP pages integration.
*
* Authors:
* Frederico Caldeira Knabben (fckeditor@fredck.com)
*/
// The editor base path
// You have to update it with you web site configuration
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
$FCKeditorBasePath = $rootURL.$admin."/editor/FCKeditor/" ;
class FCKeditor
{
var $ToolbarSet ;
var $Value ;
var $CanUpload ;
var $CanBrowse ;
function FCKeditor()
{
$this->ToolbarSet = '' ;
$this->Value = '' ;
$this->CanUpload = 'none' ;
$this->CanBrowse = 'none' ;
}
function CreateFCKeditor($instanceName, $width, $height)
{
echo $this->ReturnFCKeditor($instanceName, $width, $height) ;
}
function ReturnFCKeditor($instanceName, $width, $height)
{
// $grstr = htmlentities( $this->Value ) ;
$grstr = htmlspecialchars( $this->Value ) ;
$strEditor = "" ;
if ( $this->IsCompatible() )
{
global $FCKeditorBasePath ;
$sLink = $FCKeditorBasePath . "fckeditor.html?FieldName=$instanceName" ;
if ( $this->ToolbarSet != '' )
$sLink = $sLink . "&Toolbar=$this->ToolbarSet" ;
if ( $this->CanUpload != 'none' )
{
if ($this->CanUpload == true)
$sLink = $sLink . "&Upload=true" ;
else
$sLink = $sLink . "&Upload=false" ;
}
if ( $this->CanBrowse != 'none' )
{
if ($this->CanBrowse == true)
$sLink = $sLink . "&Browse=true" ;
else
$sLink = $sLink . "&Browse=false" ;
}
$strEditor .= "<IFRAME src=\"$sLink\" width=\"$width\" height=\"$height\" frameborder=\"no\" scrolling=\"no\"></IFRAME>" ;
$strEditor .= "<INPUT type=\"hidden\" id=\"$instanceName\" name=\"$instanceName\" value=\"$grstr\">" ;
}
else
{
$strEditor .= "<TEXTAREA id=\"$instanceName\" name=\"$instanceName\" rows=\"4\" cols=\"40\" style=\"WIDTH: $width; HEIGHT: $height\" wrap=\"virtual\">$grstr</TEXTAREA>" ;
}
return $strEditor;
}
function IsCompatible()
{
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
if ( is_integer( strpos($sAgent, 'MSIE') ) && is_integer( strpos($sAgent, 'Windows') ) && !is_integer( strpos($sAgent, 'Opera') ) )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 1) ;
return ($iVersion >= 5) ;
} else {
return FALSE ;
}
}
}
?>
Property changes on: trunk/admin/editor/FCKeditor/fckeditor.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/editor/FCKeditor/filemanager/browse/inportal/browse.php
===================================================================
--- trunk/admin/editor/FCKeditor/filemanager/browse/inportal/browse.php (revision 373)
+++ trunk/admin/editor/FCKeditor/filemanager/browse/inportal/browse.php (revision 374)
@@ -1,394 +1,394 @@
<?php
/*
* 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.
*
* browse.php: Browse function.
*
* Authors:
* Frederic TYNDIUK (http://www.ftls.org/ - tyndiuk[at]ftls.org)
*/
// Init var :
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$IMAGES_BASE_URL = $rootURL."kernel/images/";
$IMAGES_BASE_DIR = $pathtoroot."kernel/images/";
// End int var
// Thanks : php dot net at phor dot net
function walk_dir($path) {
if ($dir = opendir($path)) {
while (false !== ($file = readdir($dir)))
{
if ($file[0]==".") continue;
if (is_dir($path."/".$file))
$retval = array_merge($retval,walk_dir($path."/".$file));
else if (is_file($path."/".$file))
$retval[]=$path."/".$file;
}
closedir($dir);
}
return $retval;
}
function CheckImgExt($filename) {
$img_exts = array("gif","jpg", "jpeg","png");
foreach($img_exts as $this_ext) {
if (preg_match("/\.$this_ext$/", $filename)) {
return TRUE;
}
}
return FALSE;
}
foreach (walk_dir($IMAGES_BASE_DIR) as $file) {
$file = preg_replace("#//+#", '/', $file);
$IMAGES_BASE_DIR = preg_replace("#//+#", '/', $IMAGES_BASE_DIR);
$file = preg_replace("#$IMAGES_BASE_DIR#", '', $file);
if (CheckImgExt($file)) {
$files[] = $file; //adding filenames to array
}
}
sort($files); //sorting array
// generating $html_img_lst
foreach ($files as $file) {
$html_img_lst .= "<a href=\"javascript:getImage('$file');\">$file</a><br>\n";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>Image Browser</TITLE>
<LINK rel="stylesheet" type="text/css" href="<?php echo $adminURL; ?>/editor/FCKeditor/css/fck_dialog.css">
<SCRIPT language="javascript">
var sImagesPath = "<?php echo $IMAGES_BASE_URL; ?>";
var sActiveImage = "" ;
function getImage(imageName)
{
sActiveImage = sImagesPath + imageName ;
imgPreview.src = sActiveImage ;
}
function ok()
{
window.setImage(sActiveImage) ;
window.close() ;
}
</SCRIPT>
</HEAD>
<BODY bottommargin="5" leftmargin="5" topmargin="5" rightmargin="5">
<TABLE cellspacing="1" cellpadding="1" border="0" width="100%" class="dlg" height="100%">
<TR height="100%">
<TD>
<TABLE cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
<TR>
<TD width="45%" valign="top">
<table cellpadding="0" cellspacing="0" height="100%" width="100%">
<tr>
<td width="100%">File : </td>
</tr>
<tr height="100%">
<td>
<DIV class="ImagePreviewArea"><?php echo $html_img_lst ?></DIV>
</td>
</tr>
</table>
</TD>
<TD width="10%" >&nbsp;&nbsp;&nbsp;</TD>
<TD>
<table cellpadding="0" cellspacing="0" height="100%" width="100%">
<tr>
<td width="100%">Preview : </td>
</tr>
<tr>
<td height="100%" align="center" valign="middle">
<DIV class="ImagePreviewArea"><IMG id="imgPreview" border=1"></DIV>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD align="center">
<INPUT style="WIDTH: 80px" type="button" value="OK" onclick="ok();"> &nbsp;&nbsp;&nbsp;&nbsp;
<INPUT style="WIDTH: 80px" type="button" value="Cancel" onclick="window.close();"><BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Property changes on: trunk/admin/editor/FCKeditor/filemanager/browse/inportal/browse.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/editor/FCKeditor/filemanager/upload/php/upload.php
===================================================================
--- trunk/admin/editor/FCKeditor/filemanager/upload/php/upload.php (revision 373)
+++ trunk/admin/editor/FCKeditor/filemanager/upload/php/upload.php (revision 374)
@@ -1,296 +1,296 @@
<?php
/*
* 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.
*
* upload.php: Basic file upload manager for the editor. You have
* to have set a directory called "userimages" in the root folder
* of your web site.
*
* Authors:
* Frederic TYNDIUK (http://www.ftls.org/ - tyndiuk[at]ftls.org)
*/
// Init var :
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$UPLOAD_BASE_URL = $rootURL."kernel/images/";
$UPLOAD_BASE_DIR = $pathtoroot."kernel/images/";
// End int var
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>File Uploader</TITLE>
<LINK rel="stylesheet" type="text/css" href="<?php echo $adminURL; ?>/editor/FCKeditor/css/fck_dialog.css">
</HEAD>
<BODY><form>
<TABLE eight="100%" width="100%">
<TR>
<TD align=center valign=middle><B>
Upload in progress...
<font color='red'><BR><BR>
<?php
if (file_exists($UPLOAD_BASE_DIR.$HTTP_POST_FILES['FCKeditor_File']['name'])) {
echo "Error : File ".$HTTP_POST_FILES['FCKeditor_File']['name']." exists, can't overwrite it...";
echo '<BR><BR><INPUT type="button" value=" Cancel " onclick="window.close()">';
} else {
if (is_uploaded_file($HTTP_POST_FILES['FCKeditor_File']['tmp_name'])) {
$savefile = $UPLOAD_BASE_DIR.$HTTP_POST_FILES['FCKeditor_File']['name'];
if (move_uploaded_file($HTTP_POST_FILES['FCKeditor_File']['tmp_name'], $savefile)) {
chmod($savefile, 0666);
?>
<SCRIPT language=javascript>window.opener.setImage('<?php echo $UPLOAD_BASE_URL.$HTTP_POST_FILES['FCKeditor_File']['name']; ?>') ; window.close();</SCRIPT>";
<?php
}
} else {
echo "Error : ";
switch($HTTP_POST_FILES['FCKeditor_File']['error']) {
case 0: //no error; possible file attack!
echo "There was a problem with your upload.";
break;
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
echo "The file you are trying to upload is too big.";
break;
case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
echo "The file you are trying to upload is too big.";
break;
case 3: //uploaded file was only partially uploaded
echo "The file you are trying upload was only partially uploaded.";
break;
case 4: //no file was uploaded
echo "You must select an image for upload.";
break;
default: //a default error, just in case! :)
echo "There was a problem with your upload.";
break;
}
}
echo '<BR><BR><INPUT type="button" value=" Cancel " onclick="window.close()">';
} ?>
</font></B></TD>
</TR>
</TABLE>
</form></BODY>
</HTML>
Property changes on: trunk/admin/editor/FCKeditor/filemanager/upload/php/upload.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/editor/editor.php
===================================================================
--- trunk/admin/editor/editor.php (revision 373)
+++ trunk/admin/editor/editor.php (revision 374)
@@ -1,175 +1,175 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/editor/FCKeditor/fckeditor.php");
$style_sheet_global = $adminURL."/include/style.css";
?>
<html>
<head>
<title>Online Editor</title>
<?php print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n"; ?>
<?php require_once($pathtoroot.$admin."/include/mainscript.php"); ?>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" marginheight="0" style="overflow:auto">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" align="center"><tr><td align="left" valign="top">
<?php
$section=$_GET["section"];
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"document.frm.submit();","tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
$title = "Online HTML Editor";
$objSections->SetCurrentSection($section);
print $objSections->section_header($envar,NULL,$title);
$TargetForm = $_GET["TargetForm"];
$TargetField = $_GET["TargetField"];
echo $objListToolBar->Build();
?>
<form name="frm" action="javascript:update_opener();">
<?php
$oFCKeditor = new FCKeditor();
$oFCKeditor->Value = '' ;
$oFCKeditor->CreateFCKeditor( 'Content', '100%','80%' ) ;
?>
</FORM>
</td></tr></table>
</form>
</body>
<script>
<?php
print <<<END
function update_content()
{
if (window.opener)
{
if (!window.opener.closed)
{
bf = window.opener.document.$TargetForm;
current = bf.$TargetField.value;
//f = document.getElementById('editform');
d = document.getElementById('Content');
d.value = current;
}
else
window.close()
}
else
window.close()
}
function update_opener()
{
d = document.getElementById('Content');
if (d.form)
if (d.form.onsubmit)
d.form.onsubmit()
if (!window.opener) return;
if (!window.opener.closed)
bf.$TargetField.value = d.value;
//alert('Setting bf.$TargetField.value to'+d.value);
window.close();
}
END;
?>
setTimeout('update_content();',100);
</script>
</html>
Property changes on: trunk/admin/editor/editor.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/head.php
===================================================================
--- trunk/admin/head.php (revision 373)
+++ trunk/admin/head.php (revision 374)
@@ -1,129 +1,129 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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"]);
?>
<!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=iso-8859-1">
<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" width="100000" align="right">&nbsp;</td>
<td width="400"><img alt="" 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">
<?php echo prompt_language("la_Logged_in_as")." "; ?><B><?php echo $loginname." "; ?></B>
<a href="<?php echo $logout."login.php?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>
</tr> <tr>
<td bgcolor="black" colspan="4"><img alt="" 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.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/help/credits.php
===================================================================
--- trunk/admin/help/credits.php (revision 373)
+++ trunk/admin/help/credits.php (revision 374)
@@ -1,190 +1,190 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$ado = GetADODBConnection();
$title = "In-Portal ".language("la_Credits_Title");
/* page header */
print <<<END
<html>
<head>
<title>$title</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<!--
<script src="$adminURL/include/dw_scrollObj.js" type="text/javascript"></script>
<script src="$adminURL/include/dw_hoverscroll.js" type="text/javascript"></script>
-->
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
function initScrollLayer()
{
var i = 0;
x = 4;
function scrolldiv() {
document.getElementById('scrollImg').scrollTop += x;
i++;
if (i > 100) {
if (x > 0) {
x = -4;
}
else {
x = 4;
}
i = 0;
}
//alert('again');
window.setTimeout(scrolldiv, 150);
}
window.setTimeout(scrolldiv, 500);
}
</script>
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
</head>
END;
if ((int)$m_var_list["lang"])
{
$objLanguages->Query_Item("SELECT * FROM ".$objLanguages->SourceTable." WHERE Enabled=1 AND LanguageId=".(int)$m_var_list["lang"]);
foreach ($objLanguages->Items as $l)
{
$lang_name = " ".$l->Get("LocalName");
}
}
?>
<!-- onload="initScrollLayer()" -->
<body onload="initScrollLayer()" marginheight="0" marginwidth="0" marginleft="0" margintop="0" bgcolor="white" style="background-repeat: no-repeat;" background="<?php echo $imagesURL."/about.jpg";?>">
<TABLE cellSpacing="0" cellPadding="0" width="100%" height="100%">
<tr>
<TD align="center" width="0%">
<TABLE cellSpacing="0" cellPadding="0" width="95%">
<tr>
<TD align="center" width="95%" class="small">
<BR><BR><BR><BR><BR><BR><BR><BR><BR><br><br><br>
<span class="text">In-Portal <?php echo language("la_Text_Version").":".$kernel_version.$lang_name; ?></SPAN>
<BR><BR>
<div id="wn">
<div class="small" id="content" width="432" height="146" align="center">
<div id="scrollImg" style="position: relative; overflow: hidden; height: 190px; width: 270px">
<?php
$inc_path = $pathtoroot.$admin.'/help/';
include $inc_path.'credits.txt';
?>
<br><br>
</div>
<?php
echo '<hr>';
include $inc_path.'legal_warning.txt';
?>
</div>
</div>
<BR><BR>
<input type="button" value="<?php echo language("la_button_ok"); ?>" onclick="window.close()"></TD>
</TR>
</table>
</TD>
</TR>
</TABLE>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/help/credits.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/help/install_help.php
===================================================================
--- trunk/admin/help/install_help.php (revision 373)
+++ trunk/admin/help/install_help.php (revision 374)
@@ -1,144 +1,144 @@
<?php
define('THIS_FILE', 'admin/help/install_help.php');
$pathtoroot = "";
if(!strlen($pathtoroot))
{
- //$path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));PATH_TRANSLATED
- $path=dirname(realpath($_SERVER['PATH_TRANSLATED']));
+ //$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['SERVER_NAME'].$_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 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.3
\ No newline at end of property
+1.4
\ No newline at end of property
Index: trunk/admin/help/help.php
===================================================================
--- trunk/admin/help/help.php (revision 373)
+++ trunk/admin/help/help.php (revision 374)
@@ -1,137 +1,137 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$baseURL = $_SERVER['DOCUMENT_ROOT'].$path_char.$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$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");
$section = $_REQUEST["section"];
$envar = BuildEnv();
int_help_header();
$section = explode(':', $section);
if($section[0] == 'in-portal') $section[0] = 'kernel';
$topic_path = $baseURL.$section[0].'/'.$admin.'/include/help/'.$section[1].'.txt';
// for debugging: save new help content
if( GetVar('action') == 'save_help' )
{
error_reporting(E_ALL);
$fp = fopen($topic_path, 'w');
fwrite($fp, stripslashes(GetVar('help_content')) );
fclose($fp);
}
$help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');
if($section[0] == 'kernel') $section[0] = 'in-portal';
?>
<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 $help_data;
else
echo defined('DEBUG_HELP') ? 'missing section help file <b>'.$section[1].'.txt</b><br>' : admin_language('la_help_in_progress');
?>
</div>
<?php
if( defined('DEBUG_HELP') )
{
?>
<br><input type="button" onclick="document.save_help.submit();" value="Save Changes" style="font-weight: bolder; background-color: #F6F6F6;"><br>
<form name="save_help" id="save_help" method="post" action="<?php echo $_SERVER['PHP_SELF'].'?env='.$envar; ?>">
<textarea id="help_content" name="help_content" rows="15" cols="85"><?php echo $help_data; ?></textarea>
<input type="hidden" name="section" value="<?php echo implode(':',$section); ?>">
<input type="hidden" name="action" value="save_help">
<?php if( GetVar('help_usage') ) { ?>
<input type="hidden" name="help_usage" value="<?php echo GetVar('help_usage'); ?>">
<?php } ?>
</form>
<?php
}
?>
</td>
</tr>
</table>
<? int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/help/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/tag_listing.php
===================================================================
--- trunk/admin/tag_listing.php (revision 373)
+++ trunk/admin/tag_listing.php (revision 374)
@@ -1,184 +1,184 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
include_once($pathtoroot."kernel/include/tag-class.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/images";
$adminURL = $rootURL.$admin;
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot."admin/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot."admin/toolbar.php");
//Set Section
$section = "in-portal:tag_library";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save",
"la_Save",
"#",
"swap('img_save','toolbar/tool_select_f2.gif');",
"swap('img_save', 'toolbar/tool_select.gif');",
"javascript:history.back();",
"tool_select.gif");
$objCatToolBar->Add("img_cancel",
"la_Cancel",
"#",
"swap('img_cancel','toolbar/tool_cancel_f2.gif');",
"swap('img_cancel', 'toolbar/tool_cancel.gif');",
"javascript:history.back();",
"tool_cancel.gif");
$extra_styles = '<STYLE type="text/css">
<!--
.tag-listing {
border-collapse: collapse;
padding: 0px;
margin: 0px;
border: 0px;
background-color: #f6f6f6;
}
.tag-listing-row {font: 11px verdana}
.b-element {font: bold 13px}
.i-element {font: oblique 12px; background: #ebebeb;}
.header {
background: #999;
color: #fff;
}
-->
</STYLE>';
$title = admin_language("la_tag_library");
int_header($objCatToolBar,NULL,$title,NULL,$extra_styles);
$objTagList = new clsTagList();
$objTagList->Clear();
$objTagList->Query_Item("SELECT * FROM ".$objTagList->SourceTable);
?>
<table class="tag-listing" border="0" width="100%">
<?php
if($objTagList->NumItems()>0)
{
foreach($objTagList->Items as $i)
{
$i->LoadAttribs(); //echo " ".$i->attribs->NumItems()." Attributes<br>\n";
if( $i->Get("name") )
{
?>
<tr class="header">
<td class="b-element" colspan="2">
<?php echo ($i->Get("scope") != "global") ? $i->Get("scope").'.'.$i->Get("name") : $i->Get("name"); ?>
</td>
</tr>
<tr class="tag-listing-row">
<td colspan="2" class="i-element"><?php echo $i->Get("description"); ?></td>
</tr>
<tr class="tag-listing-row">
<td class="b-element" width="90%">Attributes:</td>
<td class="b-element" width="10%">Source example:</td>
</tr>
<tr>
<td>
<?php if( $i->attribs->NumItems() > 0 ) { // has attributes ?>
<!-- attributes listing: begin -->
<table border="0" width="100%" class="tag-listing">
<?php
foreach($i->attribs->Items as $a)
{
?>
<tr class="tag-listing-row">
<td valign="top"><?php echo $a->Get("Name").'['.$a->Get("AttrType").']'; ?></td>
<td><?php echo $a->Get("Description"); ?></td>
</tr>
<?php
}
?>
</table>
<!-- attributes listing: end -->
<?php } else{ ?>&nbsp; <?php } ?>
</td>
<td>
<!-- example -->
<?php
$example = $i->Get('example');
echo $example ? $example : '&nbsp;';
?>
</td>
</tr>
<?php
}
}
}
?>
</table>
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/tag_listing.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/cat_select.php
===================================================================
--- trunk/admin/cat_select.php (revision 373)
+++ trunk/admin/cat_select.php (revision 374)
@@ -1,385 +1,385 @@
<?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($_SERVER['SCRIPT_FILENAME']));
+ $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 */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
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: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:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
<tbody>
<tr>
<td><img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="navbar"><?php print m_navbar(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>
</tr></table>
</FORM>
<!--tb:button action="search_b" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
</td>
</tr>
</tbody>
</table>
<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.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/admin/install.php
===================================================================
--- trunk/admin/install.php (revision 373)
+++ trunk/admin/install.php (revision 374)
@@ -1,1887 +1,1887 @@
<?php
error_reporting(0);
define("GET_LICENSE_URL", "http://www.intechnic.com/myaccount/license.php");
define('BACKUP_NAME', 'dump(.*).txt'); // how backup dump files are named
$general_error = '';
$pathtoroot = "";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
- //$path=dirname(realpath($_SERVER['PATH_TRANSLATED']));
+ $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;
}
if( file_exists($pathtoroot.'debug.php') && !defined('DEBUG_MODE') ) include_once($pathtoroot.'debug.php');
$is_install = TRUE;
$admin = substr($path,strlen($pathtoroot));
$state = isset($_GET["state"]) ? $_GET["state"] : '';
if(!strlen($state))
{
$state = isset($_POST['state']) ? $_POST['state'] : '';
}
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['SERVER_NAME'].$_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);
}
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" width="100000" align="right">&nbsp;</td>
<td width="400"><img alt="" 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>
</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."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))
{
inst_ParseLicense($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['SERVER_NAME']), "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);
/* 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;
}
}
}
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 (str_replace('.', '', GetMaxPortalVersion($pathtoroot.$admin)) >= 105 && ($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";
$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/";
$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'];
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);
$new_version = '';
$tmp1 = 0;
$tmp2 = 0;
while ($file = $dir->read()) {
if ($file != "." && $file != ".." && !is_dir($dir_name.$file)) {
if (strstr($file, 'inportal_upgrade_v')) {
$file_tmp = str_replace("inportal_upgrade_v", "", $file);
$file_tmp = str_replace(".sql", "", $file);
if (ConvertVersion($file_tmp) > ConvertVersion($current_version)) {
$filename = $pathtoroot.$mod_name."/admin/install/upgrades/$file";
//echo "Trying Version: $try_version<br>";
if(file_exists($filename))
{
RunSQLFile($ado, $filename);
set_ini_value("Module Versions", $p, $try_version);
save_values();
}
/* $tmp1 = str_replace(".", "", $file);
if ($tmp1 > $tmp2) {
$new_version = $file;
}*/
}
}
//$tmp2 = $tmp1;
}
}
}
$state = 'languagepack_upgrade';
}
// upgrade language pack
if($state=='languagepack_upgrade')
{
$state = 'lang_install_init';
$_POST['lang'][] = 'english.lang';
$force_finish = true;
}
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['SERVER_NAME']), "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]));
inst_ParseLicense($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]));
inst_ParseLicense($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");
$fp = @fopen($pathtoroot."themes/tmp.lic","rb");
if($fp)
{
$lic = fread($fp,filesize($pathtoroot."themes/tmp.lic"));
fclose($fp);
}
$tmp_data = inst_LoadLicense(FALSE,$pathtoroot."themes/tmp.lic");
$data = $tmp_data[0];
@unlink($pathtoroot."themes/tmp.lic");
inst_ParseLicense($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);
inst_ParseLicense($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))
{
inst_ParseLicense($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))
{
inst_ParseLicense($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']) || inst_IsLocalSite($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']) || inst_IsLocalSite($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))
{
inst_ParseLicense($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") {
$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 = GetTablePrefix()."ImportPhrases";
$EventTable = GetTablePrefix()."ImportEvents";
$sql = "CREATE TABLE $PhraseTable SELECT Phrase,Translation,PhraseType,LanguageId FROM ".GetTablePrefix()."Phrase WHERE PhraseId=-1";
$ado->Execute($sql);
$sql = "CREATE TABLE $EventTable SELECT Template,MessageType,EventId,LanguageId FROM ".GetTablePrefix()."EmailMessage WHERE EmailMessageId=-1";
$ado->Execute($sql);
$sql = "SELECT EventId,Event,Type FROM ".GetTablePrefix()."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 = GetTablePrefix()."ImportPhrases";
$EventTable = GetTablePrefix()."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
{
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=="lang_select")
{
$Packs = GetLanguageList();
$include_file = $pathtoroot.$admin."/install/lang_select.php";
}
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["SERVER_NAME"]);
//$g_DomainName= $_SERVER["SERVER_NAME"];
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 = inst_GetModuleList();
$include_file = $pathtoroot.$admin."/install/modselect.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['SERVER_NAME'].$_POST['Site_Path'])."&modules=".base64_encode($modules_str)."&license_code=".base64_encode($g_LicenseCode)."&version=".GetMaxPortalVersion($pathtoroot.$admin)."&domain=".md5($_SERVER['SERVER_NAME']), "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>";
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;
}
?>
<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>
<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 } ?>
<?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-2004, Intechnic Corporation. All rights reserved.
<br><img src="images/spacer.gif" width="1" height="10" alt="">
</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.44
\ No newline at end of property
+1.45
\ No newline at end of property
Index: trunk/admin/index.php
===================================================================
--- trunk/admin/index.php (revision 373)
+++ trunk/admin/index.php (revision 374)
@@ -1,153 +1,153 @@
<?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 = "";
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
}
}
if (!file_exists($pathtoroot."/config.php")) {
echo "In-Portal is probably not installed, or configuration file is missing.<br>";
echo "Please use the installation script to fix the problem.<br><br>";
echo "<a href='install.php'>Go to installation script</a><br><br>";
flush();
die();
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo "<PRE>"; print_r($_POST); echo "</PRE>";
require_once($pathtoroot."/kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = substr($path,strlen($pathtoroot));
$objConfig->Set("AdminDirectory",$admin,0,TRUE);
$objConfig->Save();
//echo "Setting admin to $admin <br>\n";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
require_once($pathtoroot.$admin."/login.php");
}
$envar = "env=" . BuildEnv();
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
$pathtolocal = $pathtoroot;
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="kwrite">
<link rel="stylesheet" type="text/css" href="include/style.css">
<title>In-portal Administration</title>
</head>
<script type="text/javascript">
window.name = 'main_frame';
</script>
<script language="JavaScript1.2">
lala = navigator.appVersion.substring(0,1);
if (navigator.appName == "Netscape") {
if (lala != "5") {
document.write("<frameset rows='96,*' framespacing='0' scrolling='no' frameborder='0'>");
} else {
document.write("<frameset rows='95,*' framespacing='0' scrolling='no' frameborder='0'>");
}
} else {
document.write("<frameset rows='94,*' framespacing='0' scrolling='no' frameborder='0'>");
}
</script>
<!--<frameset rows="92,*" border="0">-->
<frame src="head.php?<?php echo $envar; ?>" name="head" scrolling="no" noresize>
<frameset cols="200,*" border="0">
<frame src="tree/tree.php?<?php echo $envar; ?>" name="menu" target="_main" noresize scrolling="auto" marginwidth="0" marginheight="0">
<frame src="subitems.php?<?php echo $envar."&section=in-portal:root"; ?>" name="main" marginwidth="0" marginheight="0" frameborder="NO" noresize scrolling="auto">
</frameset>
</frameset>
<noframes>
<body bgcolor="#ffffff">
<p></p>
</body>
</noframes>
</html>
\ No newline at end of file
Property changes on: trunk/admin/index.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/relations/item_type.php
===================================================================
--- trunk/admin/relations/item_type.php (revision 373)
+++ trunk/admin/relations/item_type.php (revision 374)
@@ -1,127 +1,127 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$m = GetModuleArray();
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//echo "[".$_GET["mod"]."]<br>\n";
$localURL=$rootURL.$m[$_GET["mod"]];
//admin only util
$pathtolocal = $pathtoroot.$m[$_GET["mod"]];
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."/include/toolbar.php");
//Set Section
$section = '';
//Set Environment Variable
$envar = "env=" . BuildEnv();
//echo $envar."<br>\n";//&mod=n&destform=ItemAddForm&destfield=ItemList
$formaction = $localURL."admin/item_select.php?".$envar;
//Display header
int_header(NULL);
?>
<FORM method="POST" ACTION="" onSubmit="this.action=this.TargetURL.value;">
<INPUT TYPE="HIDDEN" NAME="TargetAction" VALUE="<?php echo $_GET["TargetAction"]; ?>">
<INPUT TYPE="HIDDEN" NAME="SourceId" VALUE="<?php echo $_GET["SourceId"]; ?>">
<INPUT TYPE="HIDDEN" NAME="SourceType" VALUE="<?php echo $_GET["SourceType"]; ?>">
<H1>Add Item Relationship</H1>
Select the type of item to relate:<BR>
<SELECT name="TargetURL">
<OPTION value="<?php echo $rootURL."kernel/admin/item_select.php?".$envar; ?>">Category
<OPTION value="<?php echo $rootURL."in-news/admin/item_select.php?".$envar; ?>">News Article
<OPTION VALUE="<?php echo $rootURL."in-bulletin/admin/item_select.php?".$envar; ?>">Forum Topic
<OPTION VALUE="<?php echo $rootURL."in-link/admin/item_select.php?".$envar; ?>">Link
<OPTION value="<?php echo $rootURL."in-survey/admin/item_select.php?".$envar; ?>">Survey
</SELECT>
<INPUT TYPE="SUBMIT" VALUE="Select">
</FORM>
<?php print int_footer(); ?>
Property changes on: trunk/admin/relations/item_type.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/backup/export1.php
===================================================================
--- trunk/admin/backup/export1.php (revision 373)
+++ trunk/admin/backup/export1.php (revision 374)
@@ -1,103 +1,103 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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/";
$imagesURL = $rootURL."admin/images";
$adminURL = $rootURL.$admin;
//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");
//Set Section
$section = "in-portal:export";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$title = admin_language("la_performing_export");
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php int_subsection_title(admin_language("la_Prompt_Step_One")); ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2">
<span class=\"text\"><?php echo prompt_language("la_Text_ComingSoon");?></span>
</TD>
</TR>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/export1.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/backup/restore1.php
===================================================================
--- trunk/admin/backup/restore1.php (revision 373)
+++ trunk/admin/backup/restore1.php (revision 374)
@@ -1,194 +1,194 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
//Set Section
$section = "in-portal:restore";
//Set Environment Variable
$envar = "env=" . BuildEnv();
global $tables;
unset($tables);
if($_POST["Action"]=="update")
{
$newpath= $_POST["backup_path"];
$newpath = str_replace('\\\\','\\',$newpath);
$objConfig->Set("Backup_Path",$newpath);
$objConfig->Save();
}
$filepath=$objConfig->Get("Backup_Path");
$limit = 100;
$success =0;
$objSession->SetVariable("restore_filepath",$filepath);
$objSession->SetVariable("restore_success",0);
$objSession->SetVariable("restore_todo","");
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
if (true)
{
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$PHP_SELF.$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif");
}
if(true)
{
$MouseOver="if (document.restore1.agree.checked == true) swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="if (document.restore1.agree.checked == true) swap('moveright', 'toolbar/tool_next.gif');";
$var="?env=".BuildEnv()."&en=$en_next";
$link2=$rootURL."admin/backup/restore2.php".$var;
$onClick="document.location= '$link2';";
$onClick="if (document.restore1.agree.checked == true) document.restore1.submit();";
$link="#";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
}
int_header($objCatToolBar,NULL,$title);
}
$SubmitUrl = $ro_perm ? $adminURL.'/backup/restore1.php?'.$envar : $adminURL."/install.php";
//$SubmitUrl = $adminURL."/install.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="restore1" TARGET="<?php echo $ro_perm ? 'main' : '_top'; ?>" METHOD="POST" action="<?php echo $SubmitUrl; ?>">
<?php int_subsection_title(prompt_language("la_Prompt_Warning")); ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2"><span class=\"text\"><?php echo prompt_language("la_Text_Restore_Heading"); ?>
</span>
</TD>
</TR>
<TR <?php echo int_table_color(); ?>>
<td width=\"60%\" valign=\"top\"><span class=\"text\"><?php echo prompt_language("la_prompt_Root_Password"); ?></span></td>
<TD >
<INPUT type="password" name="UserPass" class="text" size="50" value=''>
</TD>
</TR>
<tr <?php echo int_table_color(); ?>>
<TD COLSPAN="2">
<?php
//$text = 'Running this utility will affect your database. '.
// 'Please be advised that you can use this utility '.
// 'at your own risk. Intechnic Corporation can not '.
// 'be held liable for any corrupt data or data loss. '.
// 'Please make sure to back up your database(s) before '.
// 'running this utility.';
echo int_hint(prompt_language("la_text_disclaimer_part1")." ".prompt_language("la_text_disclaimer_part2"));
?>
</TD>
</tr>
<tr>
<td COLSPAN="2">
<input type="checkbox" id="agree" value="0" name="agree" onclick="if (document.restore1.agree.checked == true) swap('moveright', 'toolbar/tool_next.gif'); else swap('moveright', 'toolbar/tool_next_f3.gif'); "><label for="agree"><?php echo admin_language("la_Text_IAgree"); ?></label>
</td>
</tr>
<input type=hidden name="state" value="reinstall_process">
<input type=hidden name="install_type" value="8">
<input type=hidden name="next_step" value="2">
<input type=hidden name="UserName" value="root">
<input type=hidden name="inp_opt" value="4">
</FORM>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/restore1.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/backup/restore2.php
===================================================================
--- trunk/admin/backup/restore2.php (revision 373)
+++ trunk/admin/backup/restore2.php (revision 374)
@@ -1,206 +1,206 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
//Set Section
$section = "in-portal:restore";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$formaction = $rootURL."admin/backup/restore3.php?".$envar;
$formaction = "restore3.php?".$envar;
$restoreexit = $rootURL."admin/backup/restore4.php?".$envar;
$conn = GetAdodbConnection();
$totalfiles = $objSession->GetVariable("restore_files_num");
$filepath = $objConfig->Get("Backup_Path");
if (true)
{
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv();
$link=$PHP_SELF.$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$var="?env=".BuildEnv();
$link=$rootURL."admin/backup/restore1.php".$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
$MouseOver="if (document.restore2.backupdate.value) swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="if (document.restore2.backupdate.value) swap('moveright', 'toolbar/tool_next.gif');";
$var="?env=".BuildEnv();
$onClick="restore_submit('restore2','$formaction');";
$link="#";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
}
//$link2=$rootURL."admin/backup/restore3.php".$var;
//$onClick="document.location= '$link2';";
//$onClick="restore_submit('restore2','$formaction');";
//$MouseOver="swap('img_edit','toolbar/tool_edit_f2.gif');";
//$MouseOut="swap('img_edit', 'toolbar/tool_edit.gif');";
//$objCatToolBar->Add("img_edit","la_ToolTip_Restore","#", $MouseOver,$MouseOut,$onClick,
// "tool_edit.gif");
$link3=$rootURL."admin/backup/restore2.php".$var;
$objCatToolBar->Add("img_del","la_ToolTip_Delete","#", "swap('img_del','toolbar/tool_delete_f2.gif');",
"swap('img_del', 'toolbar/tool_delete.gif');","restore_delete();",
"tool_delete.gif");
int_header($objCatToolBar,NULL,$title);
//phpinfo(INFO_VARIABLES);
function getDirList ($dirName)
{
global $objSession;
$filedates = array();
$d = dir($dirName);
while($entry = $d->read())
{
if ($entry != "." && $entry != "..")
{
if (!is_dir($dirName."/".$entry) && eregi("dump",$entry))
{
$shortversion=chopchop($entry);
$filedate[]=$shortversion;
}
}
}
$d->close();
rsort($filedate);
return $filedate;
}
function chopchop ($filename)
{
$p = pathinfo($filename);
$ext = $p["extension"];
$filename;
$filename= ereg_replace("dump","",$filename);
$filename= ereg_replace($ext,"",$filename);
return $filename;
}
?>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<?php int_subsection_title(admin_language("la_Prompt_Restore_Filechoose")); ?>
<TBODY>
<tr BGCOLOR="#e0e0da">
<td WIDTH="100%" CLASS="navar">
<img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="NAV_CURRENT_ITEM"><?php echo admin_language("la_Prompt_Backup_Date"); ?></span>
</td>
</TR>
</TBODY>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 class="tableborder" width="100%">
<TBODY>
<FORM NAME="restore2" ID="restore2" method="POST" action="<?php echo $adminURL."/backup/restore2.php?".$envar; ?>">
<?php
$datearray=getDirList($filepath);
foreach($datearray as $key => $value)
{
echo "<TR ". int_table_color_ret().">";
$onClick = "swap('moveright', 'toolbar/tool_next.gif');";
echo "<TD valign=\"top\"><span class=\"text\"><input type=radio NAME=\"backupdate\" onclick=\"$onClick\" VALUE=\"".$value."\" >";
echo date("F j, Y, g:i a",$value)."</TD>";
}
?>
<input TYPE="hidden" NAME="Action" VALUE="">
</FORM>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/restore2.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/backup/backup1.php
===================================================================
--- trunk/admin/backup/backup1.php (revision 373)
+++ trunk/admin/backup/backup1.php (revision 374)
@@ -1,199 +1,199 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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/";
$imagesURL = $rootURL."admin/images";
$adminURL = $rootURL.$admin;
//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");
//Set Section
$section = "in-portal:backup";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY");
global $tables;
unset($tables);
if($_POST["Action"]=="update" && !$ro_perm)
{
$newpath= $_POST["backup_path"];
$newpath = str_replace('\\\\','\\',$newpath);
$objConfig->Set("Backup_Path",$newpath);
$objConfig->Save();
}
//initializes default
$objSession->SetVariable("backup_start",0);
$objSession->SetVariable("backup_tnumber","start");
$date=time();
$filepath=$objConfig->Get("Backup_Path");
$filename="dump".$date.".txt";
//$filename= $filepath."".$filename;
$limit = 100;
$success =0;
$objSession->SetVariable("backup_filename",$filename);
$objSession->SetVariable("backup_limit",$limit);
$objSession->SetVariable("backup_success",$success);
$objSession->SetVariable("backup_total",0);
$objSession->SetVariable("backup_subitem",0);
$objSession->SetVariable("backup_totalsub",0);
$objSession->SetVariable("backup_key","");
$objSession->SetVariable("backup_tnumber","start");
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$backpath = $objConfig->Get("Backup_Path");
if(!strlen($backpath))
{
$backpath = $pathtoroot.$admin."/backupdata";
$objConfig->Set("Backup_Path",$backpath);
$objConfig->Save();
}
$writable = is_writable($backpath);
if (true)
{
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$PHP_SELF.$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link = "#";
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif");
}
if(true)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$var="?env=".BuildEnv()."&en=$en_next";
$script_name = $ro_perm ? 'backup1' : 'backup2';
$link2 = $rootURL."admin/backup/".$script_name.".php".$var;
$onClick="document.location= '$link2';";
$link="#";
if ($writable) {
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,$onClick,"tool_next.gif");
}
else {
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),"#","","","","tool_next_f3.gif");
}
}
$title = admin_language("la_performing_backup")." - ".admin_language("la_Step")." 1";
int_header($objCatToolBar,NULL,$title);
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="backup1" METHOD="POST" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<?php int_subsection_title(admin_language("la_Prompt_Step_One")); ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2">
<span class=\"text\"><?php echo prompt_language("la_Text_Backup_Info");?></span>
</TD>
</TR>
<TR <?php echo int_table_color(); ?>>
<td width=\"60%\" valign=\"top\"><span class=\"text\"><?php echo prompt_language("la_prompt_Backup_Path"); ?></span>
<?php
if(!$writable)
echo "<br /><span class=\"error\">".prompt_language("la_Text_backup_access")."</SPAN>";
?>
</td>
<TD>
<INPUT type="text" name="backup_path" class="text" size="50" value='<?php echo $objConfig->Get("Backup_Path"); ?>'><input TYPE="hidden" NAME="Action" VALUE="update"> <input type="submit" name="submit" value="Update" class="button">
</TD>
</TR>
</FORM>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/backup1.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/backup/restore3.php
===================================================================
--- trunk/admin/backup/restore3.php (revision 373)
+++ trunk/admin/backup/restore3.php (revision 374)
@@ -1,179 +1,179 @@
<?php
//@set_time_limit(600);
$admin = 1;
$restore_inport = 1;
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
require_once($pathtoroot.$admin."/install/install_lib.php");
$conn = GetAdodbConnection();
$section = "in-portal:restore";
int_header(NULL);
//echo "FileOffset: $FileOffset <br>\n";
if(count($_POST))
{
$filename = "dump".$_POST["backupdate"]."txt";
$filename = $objConfig->Get("Backup_Path")."/".$filename;
}
else
$filename = $_GET["Filename"];
$FileOffset = (int)$_GET["Offset"];
//echo "FileOffset: $FileOffset <br>\n";
if(!file_exists($filename))
{
echo prompt_language("la_restore_file_not_found")." : $filename";
exit();
}
if(!is_readable($filename))
{
echo prompt_language("la_restore_access_denied");
exit();
}
$TotalSize = filesize($filename);
$MaxLines = 200;
$PageTitle = admin_language("la_text_Restore_in_progress");
$CancelURL = $rootURL ."admin/backup/restore1.php?env=".BuildEnv();
stats($PageTitle,$FileOffset,$TotalSize);
//echo "FileOffset: $FileOffset <br>\n";
if($FileOffset < $TotalSize)
{
$FileOffset = RunRestoreFile($conn,$filename,$FileOffset,$MaxLines);
if($FileOffset>-1)
{
if($FileOffset ==0)
$FileOffset = $TotalSize;
$url = $_SERVER['PHP_SELF']."?env=".BuildEnv()."&Offset=$FileOffset&Filename=$filename";
}
else
{
switch($FileOffset)
{
case -1:
$error = prompt_language("la_restore_file_error");
break;
case -2:
$error = prompt_language("la_restore_read_error");
break;
default:
$error = "(".$FileOffset.") ".prompt_language("la_restore_unknown_error");
break;
}
echo $error;
die();
}
}
else
$url = $adminURL."/backup/restore4.php?env=".BuildEnv();
reload($url);
echo "</BODY>";
echo "</HTML>";
function stats($caption,$myprogress,$totalnum)
{
global $rootURL, $CancelURL;
if($totalnum>0)
{
$pct=round(($myprogress/ $totalnum)*100);
}
else
$pct = 100;
$o .="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableborder\">";
echo "\n";
$o .= int_subsection_title_ret($caption."-".$pct."%");
$o .= "<TR><TD align=\"middle\"><br />";
$o .= " <TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .=" <TR border=1><TD width=\"".$pct."%\" STYLE=\"background:url('".$rootURL."admin/images/progress_bar_segment.gif');\">&nbsp;</TD>";
$comp_pct = 100-$pct;
$o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
$o .= " </TABLE>";
$o .= " <BR /><input type=button VALUE=\"".admin_language("la_Cancel")."\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">";
echo $o."\n";
echo "</TD></TR></TABLE>";
}
function reload($url)
{
print "<script language=\"javascript\">" ;
print "setTimeout(\"document.location='$url';\",40);";
print " </script>";
echo "<A HREF=\"$url\">$url </A>";
}
?>
Property changes on: trunk/admin/backup/restore3.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/backup/backup2.php
===================================================================
--- trunk/admin/backup/backup2.php (revision 373)
+++ trunk/admin/backup/backup2.php (revision 374)
@@ -1,328 +1,328 @@
<?php
//@set_time_limit(600);
$backup_inport = 1;
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
global $tables;
unset($tables);
//$m = GetModuleArray();
//foreach($m as $key => $value)
//{
// $mod = $pathtoroot . $value . "admin/include/backup.php";
// require_once($mod);
//}
$section = "in-portal:backup_toolbar";
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$title = admin_language("la_performing_backup")." - ".admin_language("la_Step")." 2";
int_header(NULL,NULL,$title);
/*******************************BEGINNING*********************************/
$conn = GetAdodbConnection();
$tables = $conn->MetaTables(); // array_keys($tables);
//echo "<pre>"; print_r($tables); echo "</pre>";
$prefix = GetTablePrefix();
//if(strlen($prefix))
//{
for($x=0;$x<count($tables);$x++)
{
if(substr($tables[$x],0,strlen($prefix))==$prefix)
{
if (!strstr($tables[$x], 'ses_')) {
$TableNames[] = $tables[$x];
}
}
}
//}
$num_tables = count($TableNames);
$tables = $TableNames;
$TableIndex = (int)$_GET["TableIndex"];
$SqlStart = (int)$_GET["Start"];
$filename=$objSession->GetVariable("backup_filename");
$filepath=$objConfig->Get("Backup_Path");
$filename = $filepath."/".$filename;
$PageTitle = admin_language("la_text_Backup_in_progress");
$CancelURL = $rootURL ."admin/backup/backup1.php?".$envar ;
if ($success==1)
{
finish();
}
$CurrentTable = $TableNames[$TableIndex];
$NumItems = TableCount($CurrentTable,"",0);
$caption = admin_language("la_Text_backing_up")." ".$CurrentTable." (".$NumItems." ".admin_language("la_Text_Rows").") ";
stats($caption,$SqlStart,$NumItems);
$out = array();
$caption = admin_language("la_Text_Table")." ".$TableIndex." ".admin_language("lu_of")." ".$num_tables." ";
stats($caption,$TableIndex,$num_tables);
if($SqlStart==0 && $TableIndex==0)
{
for($x=0;$x<count($TableNames);$x++) {
if (!strstr($TableNames[$x], 'ses_')) {
$out[] = GetTableCreate($conn,$TableNames[$x]);
}
}
}
if (!strstr($CurrentTable, 'ses_')) {
$RowCount = insert_data($CurrentTable,$SqlStart,50,"");
}
$fp = fopen($filename,"a");
if (filesize($filename) == 0) {
$ado = GetADODBConnection();
$sql = "SELECT Name, Version FROM ".GetTablePrefix()."Modules";
$r = $ado->Execute($sql);
while ($r && !$r->EOF) {
$version = $r->fields['Version'];
fwrite($fp, "# ".$r->fields['Name']." Version: $version;\n");
$r->MoveNext();
}
fwrite($fp, "#------------------------------------------\n\n");
}
if($fp)
{
fwrite($fp,implode("\n",$out));
fwrite($fp,"\n");
fclose($fp);
}
else
{
echo "Error opening $filename <br>\n";
exit();
}
$SqlStart += $RowCount;
if($SqlStart>=$NumItems)
{
$SqlStart = 0;
$TableIndex++;
}
if($TableIndex < $num_tables)
{
$url = $adminURL."/backup/backup2.php?".$envar."&TableIndex=$TableIndex&Start=$SqlStart";
}
else
{
$url = $adminURL."/backup/backup3.php?".$envar;
}
reload($url);
echo "</BODY></HTML>\n";
//extracts the rows of data from tables using limits
function insert_data($table, $start, $limit, $mywhere)
{
global $out;
$conn = GetAdodbConnection();
if ($mywhere !="")
{
$whereclause= " WHERE ".$mywhere." ";
}
else
{
$whereclause = "";
}
$rs = $conn->Execute("SELECT * from $table $whereclause LIMIT $start, $limit");
$prefix = GetTablePrefix();
$rowcount = 0;
while($rs && !$rs->EOF)
{
$temp=$conn->GetInsertSQL($rs,$rs->fields);
$temp=ereg_replace("\n","\\n", $temp);
$temp=ereg_replace("\r","\\r", $temp);
if(strlen($prefix))
{
$temp = str_replace("INSERT INTO $prefix","INSERT INTO ",$temp);
}
$out[] = $temp;
$rs->MoveNext();
$rowcount++;
}
return $rowcount;
}
function GetTableCreate($conn, $table, $crlf="\n")
{
$schema_create = 'DROP TABLE IF EXISTS ' . $table . ';' . $crlf;
$schema_create .="# --------------------------------------------------------".$crlf;
$conn->Execute("SET SQL_QUOTE_SHOW_CREATE = 0");
$result = $conn->Execute("SHOW CREATE TABLE $table");
if($result && !$result->EOF)
{
$tmpres = $result->fields; // mysql_fetch_array($result);
$pos = strpos($tmpres["Create Table"], ' (');
$pos2 = strpos($tmpres["Create Table"], '(');
if ($pos2 != $pos + 1)
{
$pos = $pos2;
$tmpres["Create Table"] = str_replace(",", ",\n ", $tmpres["Create Table"]);
}
$tmpres["Create Table"] = substr($tmpres["Create Table"], 0, 13)
. (($use_backquotes) ? $tmpres["Table"] : $tmpres["Table"])
. substr($tmpres["Create Table"], $pos);
$tmpres["Create Table"] = str_replace("\n", $crlf, $tmpres["Create Table"]);
if (preg_match_all('((,\r?\n[\s]*(CONSTRAINT|FOREIGN[\s]*KEY)[^\r\n,]+)+)', $tmpres["Create Table"], $regs)) {
if (!isset($sql_constraints)) {
if (isset($GLOBALS['no_constraints_comments'])) {
$sql_constraints = '';
} else {
$sql_constraints = $crlf . '#' . $crlf
. '# ' . $GLOBALS['strConstraintsForDumped'] . $crlf
. '#' . $crlf;
}
}
if (!isset($GLOBALS['no_constraints_comments'])) {
$sql_constraints .= $crlf .'#' . $crlf .'# ' . $GLOBALS['strConstraintsForTable'] . ' ' . $table . $crlf . '#' . $crlf;
}
$sql_constraints .= 'ALTER TABLE $table $crlf '
. preg_replace('/(,\r?\n|^)([\s]*)(CONSTRAINT|FOREIGN[\s]*KEY)/', '\1\2ADD \3', substr($regs[0][0], 2))
. ";\n";
$tmpres["Create Table"] = preg_replace('((,\r?\n[\s]*(CONSTRAINT|FOREIGN[\s]*KEY)[^\r\n,]+)+)', '', $tmpres["Create Table"]);
}
$schema_create .= $tmpres["Create Table"];
}
unset($rs);
if(strlen($schema_create))
{
$schema_create = str_replace("DROP TABLE IF EXISTS ".GetTablePrefix(),"DROP TABLE ",$schema_create);
$schema_create = str_replace("CREATE TABLE ".GetTablePrefix(),"CREATE TABLE ",$schema_create);
while(strlen($schema_create && substr($schema_create,-1)!=")"))
{
$schema_create = substr($schema_create,0,-1);
}
}
$schema_create .= "\n# --------------------------------------------------------\n";
return $schema_create;
}
function stats($caption,$myprogress,$totalnum)
{
global $rootURL, $CancelURL,$PageTitle;
if($totalnum>0)
{
$pct=round(($myprogress/ $totalnum)*100);
}
else
$pct = 100;
$o .="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableborder\">";
echo "\n";
$o .= int_subsection_title_ret($caption."-".$pct."%");
$o .= "<TR><TD align=\"middle\"><br />";
$o .= " <TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .=" <TR border=1><TD width=\"".$pct."%\" STYLE=\"background:url('".$rootURL."admin/images/progress_bar_segment.gif');\">&nbsp;</TD>";
$comp_pct = 100-$pct;
$o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
$o .= " </TABLE>";
$o .= " <BR /><input type=button VALUE=\"".admin_language("la_Cancel")."\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."';\">";
echo $o."\n";
echo "</TD></TR></TABLE>";
}
function reload($url)
{
print "<script language=\"javascript\">" ;
print "setTimeout(\"document.location='$url';\",40);";
print " </script>";
//echo "<A HREF=\"$url\">Next </A>";
}
?>
\ No newline at end of file
Property changes on: trunk/admin/backup/backup2.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/backup/restore4.php
===================================================================
--- trunk/admin/backup/restore4.php (revision 373)
+++ trunk/admin/backup/restore4.php (revision 374)
@@ -1,136 +1,136 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
$error = $objSession->GetVariable("restore_error");
$objSession->SetVariable("restore_error","");
$success=0;
$success=$objSession->GetVariable("restore_success");
$objSession->SetVariable("restore_success",0);
$section = "in-portal:restore";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
if (true)
{
if(true)
{
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$adminURL."/backup/restore1.php".$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
if(true)
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),"#","","","","tool_next_f3.gif");
}
int_header($objCatToolBar,NULL,$title);
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="restore4" METHOD="POST" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<?php int_subsection_title(admin_language("la_Prompt_Restore_Status")); ?>
<?php if ($success==0) { ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2"><span class=\"text\"><?php echo admin_language("la_Prompt_Restore_Success");?>
</span>
</TD>
</TR>
<?php } else { ?>
<tr <?php echo int_table_color(); ?>>
<TD>
<img src="../images/smicon7.gif" border="0">
</TD>
<td >
<span class=\"small\"><?php echo admin_language("la_Prompt_Restore_Failed"); echo " ".$error; ?>
</span>
</td>
</tr>
<?php } ?>
</FORM>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/restore4.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/backup/backup3.php
===================================================================
--- trunk/admin/backup/backup3.php (revision 373)
+++ trunk/admin/backup/backup3.php (revision 374)
@@ -1,123 +1,123 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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";
$adminURL = $rootURL.$admin;
$localURL=$rootURL."kernel/";
$imagesURL = $rootURL."admin/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");
$filename= $objSession->GetVariable("backup_filename");
$filepath=$objSession->GetVariable("Backup_Path");
$filename= $filepath."/".$filename;
$error = $objSession->GetVariable("backup_error");
$success=0;
$success=$objSession->GetVariable("backup_success");
$objSession->SetVariable("backup_start",0);
$objSession->SetVariable("backup_tnumber",0);
$section = "in-portal:backup";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$var="?env=".BuildEnv();
$link=$rootURL."admin/backup/backup1.php".$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),"#","","","","tool_next_f3.gif");
$title = admin_language("la_performing_backup")." - ".admin_language("la_Step")." 3";
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="backup1" METHOD="POST" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<?php int_subsection_title(prompt_language("la_Prompt_Backup_Status")); ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2"><span class=\"text\"> <?php echo prompt_language("la_Text_BackupComplete"); ?>
<BR /> <?php echo $filename;?> <?php echo filesize($filename)." ".prompt_language("la_text_Bytes"); ?>
</span>
</TD>
</TR>
</FORM>
</TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/backup/backup3.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/config/addlang_export_result.php
===================================================================
--- trunk/admin/config/addlang_export_result.php (revision 373)
+++ trunk/admin/config/addlang_export_result.php (revision 374)
@@ -1,158 +1,158 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$localURL=$rootURL."kernel/";
$browseURL = $adminURL."/browse";
//$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$objLangList = new clsLanguageList();
if (isset($_POST["itemlist"]))
{
$LangIds = implode(",",$_POST["itemlist"]);
$sql = "SELECT * FROM ".$objLangList->SourceTable." WHERE LanguageId IN ($LangIds)";
$objLangList->Query_Item($sql);
$names = array();
foreach($objLangList->Items as $l)
{
$names[] = $l->Get("PackName");
}
$names = implode(",",$names);
}
$action = "m_lang_export";
$section = "in-portal:lang_export";
$envar = "env=".BuildEnv();
$title = prompt_language("la_Text_Export")." ".prompt_language("la_Text_Languages")." ".prompt_language("la_Text_Results");
int_header($objCatToolBar,NULL,$title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<?php
if($ExportResult)
{
?>
<TR <?php int_table_color(); ?> >
<TD>
<SPAN id="prompt_filename" class="text"><?php echo prompt_language("la_prompt_download_export"); ?></SPAN></TD>
<TD><I><SPAN id="rootpath" CLASS="text">
<A HREF="<?php echo $adminURL."/export/".$_POST["filename"]; ?>"><?php echo $ExportFilename; ?></A></SPAN></TD>
<TD></TD>
</TR>
<?php
}
else
{
?>
<TR <?php int_table_color(); ?> >
<TD>
<?php echo admin_language("la_prompt_export_error"); ?></A>
</td>
<TD></TD>
<TD></TD>
</TR>
<?php
}
?>
<TR <?php int_table_color(); ?> >
<TD>
<A HREF="<?php echo $adminURL."/config/config_lang.php?".$envar; ?>"><?php echo admin_language("la_prompt_Continue"); ?></A>
</td>
<TD></TD>
<TD></TD>
</TR>
Property changes on: trunk/admin/config/addlang_export_result.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/config/addtheme_templates.php
===================================================================
--- trunk/admin/config/addtheme_templates.php (revision 373)
+++ trunk/admin/config/addtheme_templates.php (revision 374)
@@ -1,310 +1,310 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsThemeList();
$objEditItems->SourceTable = $objSession->GetEditTable("Theme");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
$ThemeId = $c->Get("ThemeId");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_edit_theme_templates";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:theme_templates';
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","FileChecks");
$objListToolBar->Set("CheckForm","theme");
//Display header
$sec = $objSections->GetSection($section);
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/config/addtheme_templates.php";
$StatusField = "ThemeEditStatus";
$form = "theme";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"));
$objListToolBar->Add("divider");
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
// addtemplate.php
/*
$objListToolBar->Add( "new_template",
"la_ToolTip_New_Template",
$adminURL."/config/edit_template.php?".$envar,
"swap('new_template','toolbar/tool_new_template_f2.gif');",
"swap('new_template', 'toolbar/tool_new_template.gif');",
"",
"tool_new_template.gif");
*/
$objListToolBar->Add( "new_template",
"la_ToolTip_New_Template",
"#",
"swap('new_template','toolbar/tool_new_template_f2.gif');",
"swap('new_template', 'toolbar/tool_new_template.gif');",
"OpenTemplateAdd($ThemeId);",
"tool_new_template.gif");
$objListToolBar->Add( "template_edit",
"la_ToolTip_Edit",
"#",
"if (FileChecks.itemChecked()) swap('template_edit','toolbar/tool_edit_f2.gif');",
"if (FileChecks.itemChecked()) swap('template_edit', 'toolbar/tool_edit.gif');",
"if (FileChecks.itemChecked()) OpenTemplateEdit($ThemeId);",
"tool_edit.gif",
TRUE,
TRUE);
$listImages[] = "FileChecks.addImage('template_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("template_del","la_ToolTip_Delete","#", "if (FileChecks.itemChecked()) swap('template_del','toolbar/tool_delete_f2.gif');",
"if (FileChecks.itemChecked()) swap('template_del', 'toolbar/tool_delete.gif');","if (FileChecks.itemChecked()) FileChecks.check_submit('addtheme_templates', 'm_template_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "FileChecks.addImage('template_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("template_preview","la_ToolTip_Preview","#", "if (FileChecks.itemChecked()) swap('template_preview','toolbar/tool_preview_template_f2.gif');",
"if (FileChecks.itemChecked()) swap('template_preview', 'toolbar/tool_preview_template.gif');",
"if (FileChecks,itemChecked()) OpenTemplatePreview();",
"tool_preview_template.gif",FALSE,TRUE);
$listImages[] = "FileChecks.addImage('template_preview','$imagesURL/toolbar/tool_preview_template.gif','$imagesURL/toolbar/tool_preview_template_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->Add("divider");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();\n");
$c->VerifyTemplates();
$objThemeFiles = new clsThemeFileList();
$order = trim($objConfig->Get("Template_LV_Sortfield")." ".$objConfig->Get("Template_LV_Sortorder"));
$SearchWords = $objSession->GetVariable("TemplateSearchWord");
if(strlen($SearchWords))
{
$where = $objThemeFiles->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$sql = "SELECT t.*,t.Description as Description, ELT(t.FileType+1,'".admin_language("la_Text_BuiltIn")."','".admin_language("la_Text_Custom")."') as Type ";
$sql .= "FROM ".GetTablePrefix()."ThemeFiles as t WHERE t.ThemeId=".$c->Get("ThemeId")." ";
if(strlen($where))
$sql .= "AND ".$where." ";
if(strlen($order))
$sql .= "ORDER BY ".$order." ";
if(isset($_GET["lpn"]))
$objSession->SetVariable("Page_Template",$_GET["lpn"]);
$sql .= GetLimitSQL($objSession->GetVariable("Page_Template"),$objConfig->Get("Perpage_Template"));
$objThemeFiles->Query_Item($sql);
$ThemeDir = strtolower($c->Get("Name")).$pathchar;
$itemcount = QueryCount($sql);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar,$objThemeFiles);
$objListView->IdField = "FileId";
$order = $objConfig->Get("Template_LV_Sortfield");
$objListView->ColumnHeaders->Add("FilePath",admin_language("la_prompt_Module"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","FilePath");
$objListView->ColumnHeaders->Add("FileName",admin_language("la_prompt_Template"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","FileName");
$objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","Description");
$objListView->ColumnHeaders->Add("Type",admin_language("la_prompt_Type"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","Type");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Template_LV_Sortfield"), $objConfig->Get("Template_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = "Page_Template";
$objListView->PerPageVar = "Perpage_Template";
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_template_file_search";
$objListView->extra_env = "en=".(int)$en;
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu("Template_LV_Sortfield","Template_LV_Sortorder","Module",
"",0,0);
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Template");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="theme" ID="theme" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_template">
<input type="hidden" name="ThemeEditStatus" VALUE="0">
</FORM>
<FORM>
<TR <?php int_table_color(); ?> >
<td colspan="3">
</td>
</tr>
</FORM>
</TABLE>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addtheme_templates.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/config/addlang.php
===================================================================
--- trunk/admin/config/addlang.php (revision 373)
+++ trunk/admin/config/addlang.php (revision 374)
@@ -1,322 +1,322 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$objMessages = new clsEmailMessageList();
unset($objEditItems);
$objEditItems = new clsLanguageList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
$objEditItems->EnablePaging = FALSE;
$objPhraseList = new clsPhraseList();
$objPhraseList->EnablePaging = FALSE;
if ($_GET["new"] == 1)
{
$c = new clsLanguage(NULL);
$c->Set("DecimalPoint",".");
$c->Set("ThousandSep",",");
$c->Set("DateFormat","m-d-Y");
$c->Set("TimeFormat","g:i:s a");
$en = 0;
$action = "m_lang_add";
$name = prompt_language("la_Text_New");
$objLanguages->CreateEmptyEditTable("LanguageId");
$objPhraseList->CreateEmptyEditTable("PhraseId");
$objMessages->CreateEmptyEditTable($_POST["itemlist"]);
}
else
{
$en = (int)$_GET["en"];
if (isset($_POST["itemlist"]))
{
$objLanguages->CopyToEditTable("LanguageId",$_POST["itemlist"]);
$objPhraseList->CopyToEditTable("LanguageId",$_POST["itemlist"]);
$objMessages->CopyToEditTable("LanguageId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_lang_edit";
$name = $c->Get("LocalName");
}
$section = "in-portal:lang_general";
$envar = "env=".BuildEnv();
$title = prompt_language("la_Text_Configuration")." - ".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_General");
//Display header
$sec = $objSections->GetSection($section);
$objListToolbar = new clsToolBar();
$objListToolbar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',1);",$imagesURL."/toolbar/tool_select.gif");
$objListToolbar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $admin."/config/addlang.php";
$objListToolbar->Add("divider");
$form = "language";
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="env=".BuildEnv()."&en=$en_prev";
$link = "javascript:edit_submit('$form','$url',0,'$var');";
$objListToolbar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objListToolbar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),"#","","","","toolbar/tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="env=".BuildEnv()."&en=$en_next";
$link = "javascript:edit_submit('$form','$url',0,'$var');";
$objListToolbar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_next.gif");
}
else
{
$objListToolbar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_next_f3.gif");
}
}
int_header($objListToolbar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="language" NAME="language" method="POST" ACTION="">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD class="text"><?php echo prompt_language("la_prompt_LanguageId"); ?></TD>
<TD><?php echo $c->Get("LanguageId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_packname" class="text"><?php echo prompt_language("la_prompt_PackName"); ?></SPAN></TD>
<TD><input type=text ValidationType="exists" tabindex="1" NAME="packname" VALUE="<?php echo $c->Get("PackName"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_localname"><?php echo prompt_language("la_prompt_LocalName"); ?></SPAN></TD>
<TD><input type=text ValidationType="exists" tabindex="2" NAME="localname" VALUE="<?php echo $c->Get("LocalName"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_theme_icon"><?php echo prompt_language("la_prompt_icon_url"); ?></SPAN></TD>
<TD><input type=text NAME="icon" tabindex="3" VALUE="<?php echo $c->Get("IconUrl"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_dateformat"><?php echo prompt_language("la_prompt_lang_dateformat"); ?></SPAN></TD>
<TD><input type=text NAME="date_format" tabindex="4" VALUE="<?php echo $c->Get("DateFormat"); ?>">
<?php if(strlen($c->Get("DateFormat"))) echo prompt_language("la_Text_example").":".date($c->Get("DateFormat")); ?>
</TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_timeformat"><?php echo prompt_language("la_prompt_lang_timeformat"); ?></SPAN></TD>
<TD><input type=text NAME="time_format" tabindex="5" VALUE="<?php echo $c->Get("TimeFormat"); ?>">
<?php if(strlen($c->Get("TimeFormat"))) echo prompt_language("la_Text_example").":".date($c->Get("TimeFormat")); ?>
</TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_lang_decimal"><?php echo prompt_language("la_prompt_decimal"); ?></SPAN></TD>
<TD><input type=text ValidationType="exists" tabindex="6" NAME="decimal" VALUE="<?php echo $c->Get("DecimalPoint"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_lang_thousand"><?php echo prompt_language("la_prompt_thousand"); ?></SPAN></TD>
<TD><input type=text NAME="thousand" tabindex="7" VALUE="<?php echo $c->Get("ThousandSep"); ?>"></TD>
<TD></TD>
</TR>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_Enabled"); ?></td>
<td>
<input type="checkbox" name="enabled" tabindex="8" class="text" value="1" <?php if($c->Get("Enabled") == 1) echo "checked"; ?>>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_Primary"); ?></td>
<td>
<input type="checkbox" name="primary" tabindex="9" class="text" value="1" <?php if($c->Get("PrimaryLang") == 1) echo "checked"; ?>>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_CopyLabels"); ?></td>
<td>
<input type="checkbox" name="importlabels" tabindex="10" class="text" value="1">
<SELECT NAME="srcpack">
<OPTION VALUE="0">--<?php echo prompt_language("la_prompt_Select_Source"); ?>
<?php
$ado = GetADODBConnection();
$sql = "SELECT * FROM ".GetTablePrefix()."Language";
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
echo "<OPTION VALUE=\"".$rs->fields["LanguageId"]."\">".$rs->fields["PackName"]."\n";
$rs->MoveNext();
}
?>
</SELECT>
</td>
<td class="text">
</td>
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<INPUT TYPE="hidden" NAME="LanguageId" VALUE="<?php echo $c->Get("LanguageId"); ?>">
<input type="hidden" name="LangEditStatus" VALUE="0">
</tr>
</TABLE>
</FORM>
<!-- CODE FOR VIEW MENU -->
<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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addlang.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/config/config_search.php
===================================================================
--- trunk/admin/config/config_search.php (revision 373)
+++ trunk/admin/config/config_search.php (revision 374)
@@ -1,227 +1,227 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
//admin only util
$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";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
if(strlen($_GET["module"])==0)
{
$module="In-Portal";
}
else
{
$module=$_GET["module"];
}
if(strlen($_GET["section"])==0)
{
$section="System";
}
else
{
$section=$_GET["section"];
}
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$envar = "module=$module&section=$section&env=" . BuildEnv();
//$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Tab_Search");
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","document.configform.submit();","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","history.back();","tool_cancel.gif");
$ParentSection = $sec->Get("parent");
$ParentSec = $objSections->GetSection($ParentSection);
$ParentUrl = $ParentSec->URL();
if($ParentSec->Get("parent"))
{
$SubmitUrl = $ParentUrl;
}
else
$SubmitUrl = $_SERVER['PHP_SELF']."?".$envar;
int_header($objCatToolBar,NULL,$title);
?>
<form name="configform" ID="configform" action="<?php echo $SubmitUrl; ?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
$objSearchFields = new clsSearchConfigList($module);
$headings = $objSearchFields->GetHeadingList();
for($i=0;$i<=count($headings);$i++)
{
$h = $headings[$i];
if(strlen($h))
{
int_subsection_title(prompt_language($h));
$Items = $objSearchFields->GetHeadingItems($h);
foreach($Items as $c)
{
print "<tr ".int_table_color_ret().">\n";
print "<TD>".prompt_language($c->Get("DisplayName"))."</TD>\n";
$checked = "";
if((int)$c->Get("SimpleSearch")==1)
$checked = " CHECKED";
print "<TD class=\"text\">";
print prompt_language("la_prompt_SimpleSearch");
print "<INPUT TYPE=checkbox NAME=\"simple[".$c->Get("SearchConfigId")."]\" VALUE=\"1\"$checked>";
print "&nbsp;&nbsp;".prompt_language("la_prompt_weight")."&nbsp;<input type=\"text\" size=3 NAME=\"pri[".$c->Get("SearchConfigId")."]\" VALUE=\"".(int)$c->Get("Priority")."\">";
print "</TD>\n";
$checked = "";
if((int)$c->Get("AdvancedSearch")==1)
$checked = " CHECKED";
print "<TD class=\"text\"><INPUT TYPE=checkbox NAME=\"advanced[".$c->Get("SearchConfigId")."]\" VALUE=\"1\"$checked>";
print prompt_language("la_prompt_AdvancedSearch")."</TD>\n";
print "</TR>\n";
}
int_subsection_title(prompt_language($h)."&nbsp;".prompt_language("la_prompt_relevence_settings"));
print "<tr ".int_table_color_ret().">\n";
print "<TD colspan=4>";
print prompt_language("la_prompt_required_field_increase");
$cfg_var = strtolower(prompt_language($h,1));
$cfg = "SearchRel_Increase_".$cfg_var;
$value = $objConfig->Get($cfg);
if(!is_numeric($value))
$value = (int)$objConfig->Get("SearchRel_DefaultIncrease");
print "<input type=\"text\" size=3 name=\"req_increase[$cfg_var]\" VALUE=\"$value\">%";
print "</TD></TR>";
print "<tr ".int_table_color_ret().">\n";
print "<TD colspan=4>";
print prompt_language("la_prompt_relevence_percent");
$cfg = "SearchRel_Keyword_".$cfg_var;
$value = $objConfig->Get($cfg);
if(!is_numeric($value))
$value = (int)$objConfig->Get("SearchRel_DefaultKeyword");
print " <input type=\"text\" size=3 name=\"rel_keyword[$cfg_var]\" VALUE=\"$value\">% ";
print prompt_language("la_text_keyword")." ";
$cfg = "SearchRel_Pop_".$cfg_var;
$value = $objConfig->Get($cfg);
if(!is_numeric($value))
$value = (int)$objConfig->Get("SearchRel_DefaultPop");
print "&nbsp;&nbsp;&nbsp;<input type=\"text\" size=3 name=\"rel_pop[$cfg_var]\" VALUE=\"$value\">% ";
print prompt_language("la_text_popularity");
$cfg = "SearchRel_Rating_".$cfg_var;
$value = $objConfig->Get($cfg);
if(!is_numeric($value))
$value = (int)$objConfig->Get("SearchRel_DefaultRating");
print "&nbsp;&nbsp;&nbsp;<input type=\"text\" size=3 name=\"rel_rating[$cfg_var]\" VALUE=\"$value\">% ";
print prompt_language("la_prompt_Rating");
}
}
?>
<tr <?php int_table_color(); ?>>
<td colspan="3">
<input type="hidden" name="Action" value="m_SearchConfig_Edit">
<INPUT TYPE="hidden" NAME="module" VALUE="<?php echo $module; ?>">
</td>
</tr>
</TBODY>
</TABLE>
</FORM>
Property changes on: trunk/admin/config/config_search.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/config/addlang_export.php
===================================================================
--- trunk/admin/config/addlang_export.php (revision 373)
+++ trunk/admin/config/addlang_export.php (revision 374)
@@ -1,162 +1,162 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$localURL=$rootURL."kernel/";
$browseURL = $adminURL."/browse";
//$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$objLangList = new clsLanguageList();
if (isset($_POST["itemlist"]))
{
$LangIds = implode(",",$_POST["itemlist"]);
$sql = "SELECT * FROM ".$objLangList->SourceTable." WHERE LanguageId IN ($LangIds)";
$objLangList->Query_Item($sql);
$names = array();
foreach($objLangList->Items as $l)
{
$names[] = $l->Get("PackName");
}
$names = implode(",",$names);
}
$action = "m_lang_export";
$section = "in-portal:lang_export";
$envar = "env=".BuildEnv();
$title = prompt_language("la_Text_Export")." ".prompt_language("la_Text_Languages")." - ".$names." - ".admin_language("la_Step")." 1";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('language','LangEditStatus','".$admin."/config/addlang_export_result.php',1);",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="language" NAME="language" method="POST" ACTION="">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD>
<SPAN id="prompt_filename" class="text"><?php echo prompt_language("la_prompt_ExportFileName"); ?></SPAN></TD>
<TD><I><SPAN id="rootpath" CLASS="text"><?php echo $pathtoroot.$admin."/export/"; ?></SPAN></i><input ID="filename" type=text NAME="filename" VALUE=""></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_localname"><?php echo prompt_language("la_prompt_LoadLangTypes"); ?></SPAN></TD>
<TD>
<input type=checkbox NAME="langtypes[]" VALUE="1" CHECKED><?php echo prompt_language("la_Text_FrontEnd"); ?>
<input type=checkbox NAME="langtypes[]" VALUE="2" CHECKED><?php echo prompt_language("la_Text_Admin"); ?>
<input type=checkbox NAME="langtypes[]" VALUE="0" CHECKED><?php echo prompt_language("la_Text_Both"); ?>
</TD>
<TD></TD>
</TR>
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<INPUT TYPE="HIDDEN" NAME="LangList" VALUE="<?php echo $LangIds; ?>">
<input type="hidden" name="LangEditStatus" VALUE="0">
</TABLE>
</FORM>
<!-- CODE FOR VIEW MENU -->
<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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addlang_export.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/config/module_email.php
===================================================================
--- trunk/admin/config/module_email.php (revision 373)
+++ trunk/admin/config/module_email.php (revision 374)
@@ -1,376 +1,376 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
//admin only util
$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";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
//$objEditItems = new clsPhraseList();
//$objEditItems->SourceTable = $objSession->GetEditTable("Language");
/* -------------------------------------- Section configuration ------------------------------------------- */
$section = $_GET["section"];
$sec = $objSections->GetSection($section);
$module = $_GET["module"];
$envar = "env=" . BuildEnv()."&module=$module&section=$section";
//$title = prompt_language("la_Text_Configuration")." - '".$module."' - ".prompt_language("la_tab_EmailEvents");
$SortFieldVar = "Event_LV_SortField";
$SortOrderVar = "Event_LV_SortOrder";
$DefaultSortField = "Description";
$PerPageVar = "Perpage_Event";
$CurrentPageVar = "Page_Event";
$CurrentFilterVar = "EmailEvent_View";
$ListForm = "language";
$CheckClass = "EmailChecks";
//echo $envar."<br>\n";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","EmailChecks");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
$listImages = array();
/*
$objListToolBar->Add("email_edit", "la_ToolTip_Edit","#","if (EmailChecks.itemChecked()) swap('email_edit','toolbar/tool_edit_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_edit', 'toolbar/tool_edit.gif');",
"EmailChecks.check_submit('email_edit', '');",
"tool_edit.gif");
$listImages[] = "EmailChecks.addImage('email_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
*/
$EditVar = "env=".BuildEnv();
$objListToolBar->Add("email_user", "la_ToolTip_Email_UserSelect","#","if (EmailChecks.itemChecked()) swap('email_user','toolbar/tool_usertogroup_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_user', 'toolbar/tool_usertogroup.gif');",
"OpenUserSelector('EventId',$CheckClass,'".$EditVar."&Selector=radio&destform=userpopup&destfield=FromUserId&IdField=PortalUserId&dosubmit=1');",
"tool_usertogroup.gif",TRUE,TRUE);
$listImages[] = "EmailChecks.addImage('email_user','$imagesURL/toolbar/tool_usertogroup.gif','$imagesURL/toolbar/tool_usertogroup_f3.gif',1); ";
$objListToolBar->Add("email_enable", "la_ToolTip_Email_Enable","#","if (EmailChecks.itemChecked()) swap('email_enable','toolbar/tool_approve_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_enable', 'toolbar/tool_approve.gif');",
"EmailChecks.check_submit('module_email', 'm_emailevent_enable');",
"tool_approve.gif",FALSE,TRUE);
$listImages[] = "EmailChecks.addImage('email_enable','$imagesURL/toolbar/tool_approve.gif','$imagesURL/toolbar/tool_approve_f3.gif',1); ";
$objListToolBar->Add("email_disable", "la_ToolTip_Email_Disable","#","if (EmailChecks.itemChecked()) swap('email_disable','toolbar/tool_deny_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_disable', 'toolbar/tool_deny.gif');",
"EmailChecks.check_submit('module_email', 'm_emailevent_disable');",
"tool_deny.gif",FALSE,TRUE);
$listImages[] = "EmailChecks.addImage('email_disable','$imagesURL/toolbar/tool_deny.gif','$imagesURL/toolbar/tool_deny_f3.gif',1); ";
$objListToolBar->Add("email_front", "la_ToolTip_Email_FrontOnly","#","if (EmailChecks.itemChecked()) swap('email_front','toolbar/tool_frontend_mail_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_front', 'toolbar/tool_frontend_mail.gif');",
"EmailChecks.check_submit('module_email', 'm_emailevent_frontonly');",
"tool_frontend_mail.gif",FALSE,TRUE);
$listImages[] = "EmailChecks.addImage('email_front','$imagesURL/toolbar/tool_frontend_mail.gif','$imagesURL/toolbar/tool_frontend_mail_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$objEvents = new clsEventList();
//$objEvents->SourceTable = $objSession->GetEditTable("Events");
$order = trim($objConfig->Get("Event_LV_SortField")." ".$objConfig->Get("Event_LV_SortOrder"));
$SearchWords = $objSession->GetVariable("EmailEventSearchWord");
$where = "(Module='$module')";
if(strlen($SearchWords))
$where .= ' AND '.$objEvents->AdminSearchWhereClause($SearchWords);
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
$ViewNormal=1;
$Bit_Disabled=2;
$Bit_Enabled=1;
$Bit_FrontOnly=4;
$Bit_All = 7;
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_FrontOnly");
/* determine current view menu settings */
$MsgView = $objConfig->Get("EmailEvent_View");
$ViewNormal=0;
if(!is_numeric($MsgView))
{
$MsgView = $Bit_All; //Set all bits ON
$MsgFilter = "";
}
unset($Status);
$Status = array();
if($MsgView & $Bit_Disabled)
$Status[] = 0;
if($MsgView & $Bit_Enabled)
$Status[] = 1;
if($MsgView & $Bit_FrontOnly)
$Status[] = 2;
if(count($Status)>0)
{
$MsgFilter = "Enabled IN (".implode(",",$Status).")";
}
else
$MsgFilter = "Enabled = -1";
$UserTable = GetTablePrefix()."PortalUser";
$EventTable = GetTablePrefix()."Events";
$MessageTable = GetTablePrefix()."EmailMessage";
$sql = "SELECT e.Description as Description, e.Module as Module, e.EventId as EventId, ";
$sql .="ELT(e.Enabled+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")."','".admin_language("la_Text_FrontOnly")." ') as EmailStatus, ";
$sql .="ELT(e.Type+1,'".admin_language("la_Text_User")." ','".admin_language("la_Text_Admin")." ') as EventType, ";
$sql .="u.Login as FromUser FROM $EventTable as e LEFT JOIN $UserTable as u ON (e.FromUserId=u.PortalUserId) WHERE $where ";
if(strlen($MsgFilter))
$sql .= "AND $MsgFilter ";
if(strlen(trim($objConfig->Get($SortFieldVar))))
{
$order = " ORDER BY ".$objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar);
}
else
$order = "";
if($objConfig->Get($CurrentPageVar)>0)
{
$objEvents->Page = $objConfig->Get($CurrentPageVar);
}
if($objConfig->Get($PerPageVar)>0)
{
$objListView->PerPage = $objConfig->Get($PerPageVar);
}
$sql .= $order." ";
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objEvents->Query_Item($sql, $objListView->GetLimitSQL() );
$itemcount = TableCount($objEvents->SourceTable, $where, 0);
$objListView->SetListItems($objEvents);
$objListView->IdField = "EventId";
$order = $objConfig->Get($PerPageVar);
$objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"50%\"",$SortFieldVar,$SortOrderVar,"Description");
//$objListView->ColumnHeaders->Add("Module",admin_language("la_prompt_Module"),1,0,$order,"width=\"10%\"","Email_LV_SortField","Email_LV_SortOrder","Module");
$objListView->ColumnHeaders->Add("EventType",admin_language("la_prompt_Type"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"EventType");
$objListView->ColumnHeaders->Add("EmailStatus",admin_language("la_prompt_Status"),1,0,$order,"width=\"10%\"",$SortFieldVar,$SortOrderVar,"EmailStatus");
$objListView->ColumnHeaders->Add("FromUser",admin_language("la_prompt_FromUser"),1,0,$order,"width=\"15%\"",$SortFieldVar,$SortOrderVar,"FromUser");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_emailevent_search";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$MsgView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objEvents->Items);$i++)
{
$e =& $objEvents->GetItemRefByIndex($i);
$e->Set("Description",prompt_language($e->Get("Description")));
}
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_email_edit">
<input type="hidden" name="LangEditStatus" VALUE="0">
</FORM>
<FORM>
<TR <?php int_table_color(); ?> >
<td colspan="3">
</td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup">
<INPUT TYPE="HIDDEN" NAME="MessageId" value="">
<INPUT TYPE="HIDDEN" NAME="LanguageId" value="">
<INPUT TYPE="HIDDEN" NAME="Enabled" value="">
<INPUT TYPE="HIDDEN" NAME="Template" value="">
<INPUT TYPE="HIDDEN" NAME="MessageType" value="">
<INPUT TYPE="HIDDEN" NAME="Subscribed" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_edit">
</FORM>
<FORM NAME="userpopup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="userpopup">
<INPUT TYPE="HIDDEN" NAME="EventId" value="">
<INPUT TYPE="HIDDEN" NAME="FromUserId" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_user">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/module_email.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/config/email_edit.php
===================================================================
--- trunk/admin/config/email_edit.php (revision 373)
+++ trunk/admin/config/email_edit.php (revision 374)
@@ -1,252 +1,252 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
//$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");
//require_once($pathtoroot.$admin."/listview/listview.php");
require_once($pathtoroot.$admin."/editor/FCKeditor/fckeditor.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$objLangEdit = new clsLanguageList();
$objLangEdit->SourceTable = $objSession->GetEditTable("Language");
$objLangEdit->EnablePaging = FALSE;
$en = (int)$_GET["en"];
$objLangEdit->Query_Item("SELECT * FROM ".$objLangEdit->SourceTable);
$itemcount=$objLangEdit->NumItems();
$l = $objLangEdit->GetItemByIndex($en);
$LangId = $l->Get("LanguageId");
unset($objEditItems);
$objEditItems = new clsEmailMessageList();
$objEditItems->SourceTable = $objSession->GetEditTable("EmailMessage");
$objEditItems->EnablePaging = FALSE;
if(is_array($_POST["itemlist"]))
{
$EventId = $_POST["itemlist"][0];
}
else
{
$EventId = $_POST["itemlist"];
}
$m = $objEditItems->GetMessage($EventId,$LangId);
$objEvents = new clsEventList();
$ev = $objEvents->GetItem($EventId);
if($m===FALSE)
{
$m = new clsEmailMessage();
$m->tablename = $objEditItems->SourceTable;
$m->Set("EventId",$EventId);
$m->Set("LanguageId",$LangId);
$id = (int)GetMinValue($m->tablename,"EmailMessageId");
$m->Set("EmailMessageId",$id-1);
$m->Create();
$m->Set("EmailMessageId",$id-1);
$m->headers = explode("\n",$objConfig->Get("Smtp_DefaultHeaders"));
}
else
{
$m->ReadTemplate();
}
$subject = $m->subject;
if(strlen($subject))
$subject = substr($subject,strpos($subject,":")+2);
$action = "m_emailevent_edit";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:lang_email';
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
$objListToolBar = new clsToolBar();
$objListToolBar->Add("msg_save", "la_Save","#","swap('msg_save','toolbar/tool_select_f2.gif');", "swap('msg_save', 'toolbar/tool_select.gif');","edit_submit('language','LangEditStatus','".$admin."/config/addlang_email.php',0);",$imagesURL."/toolbar/tool_select.gif");
$objListToolBar->Add("msg_cancel", "la_Cancel","#","swap('msg_cancel','toolbar/tool_cancel_f2.gif');", "swap('msg_cancel', 'toolbar/tool_cancel.gif');","msg_submit('language','".$admin."/config/addlang_email.php');", $imagesURL."/toolbar/tool_cancel.gif");
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_MailEvent")." '".prompt_language($ev->Get("Description"))."'";
if($ev->Get("Type")==0)
{
$title .= " - ".prompt_language("la_Text_User");
}
else
$title .= " - ".prompt_language("la_Text_Admin");
int_header($objListToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form ID="language" name="langage" action="" method=POST>
<input type="hidden" name="LangEditStatus" VALUE="0">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_edit">
<INPUT TYPE="HIDDEN" NAME="MessageId" VALUE="<?php echo $m->Get("EmailMessageId"); ?>">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_Subject"); ?></span></td>
<td>
<input type="text" tabindex="1" name="subject" class="text" size="60" value="<?php echo $subject; ?>">
</td>
<td></td>
</tr>
<TR <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_sendmethod"); ?></SPAN></TD>
<TD><span class="text">
<input type="RADIO" tabindex="2" NAME="sendhtml" VALUE="0" <?php if($m->Get("MessageType")!="html") echo "CHECKED"; ?>><?php echo prompt_language("la_prompt_plaintext"); ?>
<INPUT TYPE="RADIO" tabindex="2" NAME="sendhtml" VALUE="1" <?php if($m->Get("MessageType")=="html") echo "CHECKED"; ?>><?php echo prompt_language("la_prompt_html"); ?>
</span>
</td>
<td></td>
</TR>
<tr <?php int_table_color(); ?>>
<td valign="top"><span class="text"><?php echo prompt_language("la_prompt_headers"); ?></span></td>
<td>
<textarea name="headers" tabindex="3" id="headers" rows="5" cols="60"><?php echo implode("\n",$m->headers); ?></textarea>
</td>
<td></td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_Message")); ?>
<tr <?php int_table_color(); ?>>
<td valign="top" COLSPAN=3>
<?php
// $oFCKeditor = new FCKeditor();
// $oFCKeditor->Value = $m->body;
// $oFCKeditor->CreateFCKeditor( 'messageBody', '100%',300 ) ;
?>
<TEXTAREA name="messageBody" rows=20 cols=85><?php echo $m->body; ?></TEXTAREA>
</td>
</tr>
</FORM>
</TABLE>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/email_edit.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/config/missing_label_search.php
===================================================================
--- trunk/admin/config/missing_label_search.php (revision 373)
+++ trunk/admin/config/missing_label_search.php (revision 374)
@@ -1,270 +1,270 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
$FrontEnd=2;
require_once($pathtoroot."kernel/startup.php");
class clsLangParser extends clsTemplateList
{
function clsLangParser($TemplateRoot)
{
$this->clsTemplateList($TemplateRoot);
}
function ParseTag($raw)
{
$res = "";
//echo "Tag:".htmlentities($raw).":<br>\n";
if(strlen(trim($raw))>0)
{
$tag = new clsHtmlTag($raw);
switch($tag->name)
{
case "include":
case "perm_include":
$res = "<!-- include skipped -->";
break;
case "mod_include":
$res = "<!-- include skipped -->";
break;
default:
//if($tag->name=="m_language")
$res = $tag->Execute();
break;
}
unset($tag);
}
return $res;
}
}
//admin only util
$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";
$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:missing_label_search";
$FilesPerLoad = 20;
$ado = GetADODBConnection();
if($_GET["LangId"])
{
$LangId = $_GET["LangId"];
$ThemeId = $_GET["theme"];
$table = $objSession->GetSessionTable("_".$ThemeId."_labels");
@$ado->Execute("DROP TABLE IF EXISTS $table ");
$Phrases = new clsPhraseList();
$query = "SELECT * FROM ".$Phrases->SourceTable." WHERE PhraseId = -1";
$insert = "CREATE TABLE ".$table." ".$query;
$ado->Execute($insert);
$FileIndex = 0;
$objThemeFiles = new clsThemeFileList($ThemeId);
$NumFiles = TableCount($objThemeFiles->SourceTable,"ThemeId=$ThemeId",0);
$objSession->SetVariable("Missing_ThemeId",$ThemeId);
$objSession->SetVariable("Missing_LangId",$LangId);
}
else
{
$ThemeId = $objSession->GetVariable("Missing_ThemeId");
$table = $objSession->GetSessionKey()."_".$ThemeId."_labels";
$objThemeFiles = new clsThemeFileList($ThemeId);
$LangId = $objSession->GetVariable("Missing_LangId");
$FileIndex = $_GET["File"];
$NumFiles = $_GET["NumFiles"];
}
$l = $objLanguages->GetItem($LangId);
$name = $l->Get("PackName");
$objThemeList = new clsThemeList();
$Theme = $objThemeList->GetItem($ThemeId);
$theme_name = $Theme->Get("Name");
$sql = "SELECT * FROM $table";
$rs = $ado->Execute($sql);
$found = array();
while($rs && !$rs->EOF)
{
$p = $rs->fields["Phrase"];
if(!in_array($p,$found))
$found[] = $p;
$rs->MoveNext();
}
$subtitle = prompt_language("la_prompt_Theme").": ".$theme_name;
$title = prompt_language("la_Text_Scanning")." ".prompt_language("la_Text_Templates");
int_header(NULL,NULL,$title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title($subtitle); ?>
<?php
if($NumFiles==0)
{
$percent=100;
}
else
{
$percent = (int)(($FileIndex/$NumFiles) * 100);
}
if ($percent == 0)
{
echo "<TR>";
echo "<TD BGCOLOR=\"#FFFFFF\" width=\"100%\" >$percent";
echo "%</td></TR>";
}
else if ($percent < 60)
{
echo "<TR><TD BGCOLOR=\"#4682B2\" width=\"".$percent."%\" >";
$row2 = 100-$percent;
echo "</td> <TD BGCOLOR=\"#FFFFFF\" width=\"".$row2."%\" > $percent";
echo "%</td></TR>";
}
else if ($percent == 100)
{
echo "<TR><TD BGCOLOR=\"#4682B2\" align=\"right\" width=\"100%\" ><FONT COLOR=\"#FFFFFF\">$percent%</FONT></td>";
}
else
{
echo "<TR><TD BGCOLOR=\"#4682B2\" align=\"right\" width=\"".$percent."%\" ><FONT COLOR=\"#FFFFFF\">$percent%</FONT>";
$row2 = 100-$percent;
echo "</td> <TD BGCOLOR=\"#FFFFFF\" width=\"".$row2."%\" ></td></TR>";
}
$sql = "SELECT * FROM ".$objThemeFiles->SourceTable." WHERE ThemeId=$ThemeId LIMIT $FileIndex,$FilesPerLoad";
$TemplateRoot = $Theme->ThemeDirectory()."/";
$objTemplate = new clsLangParser($TemplateRoot);
$objTemplate->SkipIncludes=1;
//$ForceLanguage = $LangId;
$LogPhraseLookups = TRUE;
$rs = $ado->Execute($sql);
while($rs && !$rs->EOF)
{
$path = "";
$p = $rs->fields["FilePath"];
if(strlen(trim($p)))
$path .= $p."/";
$path .= $rs->fields["FileName"];
$path = substr($path,0,-4);
//echo "Parsing $path <br>\n";
$html = $objTemplate->ParseTemplate($path);
//echo htmlentities($html)."<br>\n";
$rs->MoveNext();
}
if(is_array($MissingList))
{
for($x=0;$x<count($MissingList);$x++)
{
$next = $x + $FileIndex;
if(!in_array($MissingList[$x],$found))
{
$sql = "INSERT INTO $table (PhraseId,Phrase,Translation,PhraseType,LanguageId) VALUES (";
$sql .= $next.",'".$MissingList[$x]."','',1,$LangId)";
//echo $sql."<br>\n";
$ado->Execute($sql);
}
}
}
if($FileIndex >=$NumFiles)
{
$target = $adminURL."/config/missing_label_edit.php?env=".BuildEnv()."&lpn=1";
}
else
{
$next = $FileIndex+$FilesPerLoad;
$target = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&File=".$next."&NumFiles=$NumFiles";
}
?>
</TABLE>
<?php int_footer(); ?>
<?php
flush();
print "<script language=\"javascript\">";
print " location.href='$target';";
print " </script>";
//print "<A HREF=\"$target\">$target</A>";
?>
Property changes on: trunk/admin/config/missing_label_search.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/config/importlang_progress.php
===================================================================
--- trunk/admin/config/importlang_progress.php (revision 373)
+++ trunk/admin/config/importlang_progress.php (revision 374)
@@ -1,329 +1,329 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
$FrontEnd=2;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$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";
// $pathtolocal = $pathtoroot."in-link/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
include_once($pathtoroot."kernel/include/xml.php");
$section = "in-portal:lang_import";
$ado = GetADODBConnection();
$MaxInserts = 200;
$PhraseTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportPhrases";
$EventTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportEvents";
$OverWrite = $_POST['overwrite'];
if(count($_POST)>0)
{
$Offset = 0;
$CurrentLang=0;
$file = $_FILES["lang_file"];
if(is_array($file))
{
if((int)$file["size"]>0)
{
move_uploaded_file($file["tmp_name"],$pathtoroot.$admin."/export/".$file["name"]);
$filename = $pathtoroot.$admin."/export/".$file["name"];
if(file_exists($filename))
{
/* parse xml file */
$fp = @fopen($filename,"r");
$xml = @fread($fp,filesize($filename));
@fclose($fp);
$objInXML = new xml_doc($xml);
$objInXML->parse();
$sql = "CREATE TABLE $PhraseTable SELECT Phrase,Translation,PhraseType,LanguageId FROM ".GetTablePrefix()."Phrase WHERE PhraseId=-1";
$ado->Execute($sql);
$sql = "CREATE TABLE $EventTable SELECT Template,MessageType,EventId,LanguageId FROM ".GetTablePrefix()."EmailMessage WHERE EmailMessageId=-1";
$ado->Execute($sql);
//$sql = "ALTER TABLE $EventTable ADD `Type` INT(11) default 0";
//$ado->Execute($sql);
$sql = "SELECT EventId,Event,Type FROM ".GetTablePrefix()."Events";
$rs = $ado->Execute($sql);
$Events = array();
while($rs && !$rs->EOF)
{
$Events[$rs->fields["Event"]."_".$rs->fields["Type"]] = $rs->fields["EventId"];
$rs->MoveNext();
}
$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");
}
else
{
$l = new clsLanguage();
$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();
}
}
}
$Types = implode(",",$_POST["langtypes"]);
$objSession->SetVariable("lang_types",$Types);
$objSession->SetVariable("lang_overwrite",(int)$_POST["overwrite"]);
$Total = TableCount($PhraseTable,"PhraseType IN ($Types)",0);
$objSession->SetVariable("phrase_total",$Total);
$Total = TableCount($EventTable,"",0);
$objSession->SetVariable("event_total",$Total);
$Offset = 0;
$Status = 0;
//unlink($filename);
}
}
}
}
}
else
{
$Offset = (int)$_GET["Offset"];
$Status = (int)$_GET["Status"];
$OverWrite = $objSession->GetVariable("lang_overwrite");
$Types = $objSession->GetVariable("lang_types");
if($Status==0)
{
$Total = $objSession->GetVariable("phrase_total");
}
else
$Total = $objSession->GetVariable("event_total");
}
//echo $Total;
if ($Total == "") {
$url = $adminURL."/config/importlang.php?env=".BuildEnv()."&importerror=1";
Header("Location: $url");
//reload($url);
}
$title = admin_language("la_Text_LangImport")." - ".admin_language("la_Step")." 2";
int_header(NULL,NULL, $title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php
if($Status==0)
{
$Total = $objSession->GetVariable("phrase_total");
stats(prompt_language("la_lang_import_progress"),$Offset,$Total);
$Offset = $objLanguages->ReadImportTable($PhraseTable,1,$Types,$OverWrite,$MaxInserts,$Offset);
if($Offset<$Total)
{
$url = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&Offset=$Offset&Status=0";
}
else
{
if($objSession->GetVariable("event_total")>0)
{
$url = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&Offset=0&Status=1";
}
else
$url = $adminURL."/config/config_lang.php?env=".BuildEnv();
}
reload($url);
}
else
{
$Total = $objSession->GetVariable("event_total");
$Offset = $objMessageList->ReadImportTable($EventTable,$OverWrite,$MaxInserts,$Offset);
if($Offset<$Total)
{
$url = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&Offset=$Offset&Status=1";
}
else
{
$ado->Execute("DROP TABLE IF EXISTS $PhraseTable");
$ado->Execute("DROP TABLE IF EXISTS $EventTable");
$url = $adminURL."/config/config_lang.php?env=".BuildEnv();
}
stats(prompt_language("la_event_import_progress"),$Offset,$Total);
reload($url);
}
function stats($caption,$myprogress,$totalnum)
{
global $rootURL, $CancelURL, $PageTitle;
if($totalnum>0)
{
$pct=round(($myprogress/ $totalnum)*100);
}
else
$pct = 100;
$o .="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableborder\">";
echo "\n";
$o .= int_subsection_title_ret($caption." - ".$pct."%");
$o .= "<TR><TD align=\"middle\"><br />";
$o .= " <TABLE CLASS=\"tableborder_full\" width=\"75%\">";
$o .=" <TR border=1><TD width=\"".$pct."%\" STYLE=\"background:url('".$rootURL."admin/images/progress_bar_segment.gif');\">&nbsp;</TD>";
$comp_pct = 100-$pct;
$o .= " <TD bgcolor=#FFFFFF width=\"".$comp_pct."%\"></TD></TR>";
$o .= " </TABLE>";
$o .= " <BR /><input type=button VALUE=\"".admin_language("la_Cancel")."\" CLASS=\"button\" ONCLICK=\"document.location='".$CancelURL."config_lang.php?env=".BuildEnv()."&action=cancel';\">";
echo $o."\n";
echo "</TD></TR></TABLE>";
}
function reload($url)
{
print "<script language=\"javascript\">" ;
print "setTimeout(\"document.location='$url';\",100);";
print " </script>";
//echo "<A HREF=\"$url\">Next </A>";
}
?>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/importlang_progress.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/config/addlang_email.php
===================================================================
--- trunk/admin/config/addlang_email.php (revision 373)
+++ trunk/admin/config/addlang_email.php (revision 374)
@@ -1,398 +1,398 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
unset($objEditItems);
$objEditItems = new clsPhraseList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
$name = $c->Get("PackName");
$LangId = $c->Get("LanguageId");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_phrase_edit";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:lang_email';
$sec = $objSections->GetSection($section);
$SortFieldVar = "LangEmail_LV_SortField";
$SortOrderVar = "LangEmail_LV_SortOrder";
$DefaultSortField = "Description";
$PerPageVar = "Perpage_LangEmail";
$CurrentPageVar = "Page_LangEmail";
$CurrentFilterVar = "LangEmailEvent_View";
$ListForm = "language";
$CheckClass = "EmailChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',1);",$imagesURL."/toolbar/tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
if ( isset($en_prev) || isset($en_next) )
{
$objListToolBar->Add("divider");
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),"#","","","","tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_next";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next.gif");
}
else
{
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next_f3.gif");
}
}
$objListToolBar->Add("divider");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$EditEnv = $envar."&Lang=".$c->Get("LanguageId");
$objListToolBar->Add("email_edit", "la_ToolTip_Edit","#","if (EmailChecks.itemChecked()) swap('email_edit','toolbar/tool_edit_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_edit', 'toolbar/tool_edit.gif');",
"if (EmailChecks.itemChecked()) EmailChecks.check_submit('email_edit', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "EmailChecks.addImage('email_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
/*
$objListToolBar->Add("email_user", "la_ToolTip_Email_UserSelect","#","if (EmailChecks.itemChecked()) swap('email_user','toolbar/tool_usertogroup_f2.gif');",
"if (EmailChecks.itemChecked()) swap('email_user', 'toolbar/tool_usertogroup.gif');",
"OpenUserSelector('$envar&Selector=radio&destform=userpopup&destfield=FromUserId&IdField=PortalUserId',$LangId);",
"tool_usertogroup.gif");
$listImages[] = "EmailChecks.addImage('email_user','$imagesURL/toolbar/tool_usertogroup.gif','$imagesURL/toolbar/tool_usertogroup_f3.gif',1); ";
*/
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
$ViewNormal=1;
$Bit_Disabled=2;
$Bit_Enabled=1;
$Bit_FrontOnly=4;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Enabled");
$FilterLabels[1] = admin_language("la_Text_Disabled");
$FilterLabels[2] = admin_language("la_Text_FrontOnly");
/* determine current view menu settings */
$MsgView = $objConfig->Get($CurrentFilterVar);
if(!is_numeric($MsgView))
{
$MsgView = $Bit_All; //Set all bits ON
$MsgFilter = "";
}
if($MsgView & $Bit_Disabled)
$Status[] = 0;
if($MsgView & $Bit_Enabled)
$Status[] = 1;
if($MsgView & $Bit_FrontOnly)
$Status[] = 2;
if(count($Status)>0)
{
$MsgFilter = "Enabled IN (".implode(",",$Status).")";
}
else
$MsgFilter = "Enabled = -1";
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$objEvents = new clsEventList();
$order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar));
$SearchWords = $objSession->GetVariable("LangEmailEventSearchWord");
if(strlen($SearchWords))
{
$where = $objEvents->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$UserTable = GetTablePrefix()."PortalUser";
$EventTable = GetTablePrefix()."Events";
$MessageTable = GetTablePrefix()."EmailMessage";
$sql = "SELECT e.Description as Description, e.Module as Module, e.EventId as EventId, ";
$sql .="ELT(e.Enabled+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ', '".admin_language("la_Text_FrontOnly")." ') as EventStatus, ";
$sql .="ELT(e.Type+1,'".admin_language("la_Text_User")." ','".admin_language("la_Text_Admin")." ') as EventType, ";
$sql .="u.Login as FromUser FROM $EventTable as e LEFT JOIN $UserTable as u ON (e.FromUserId=u.PortalUserId) ";
$FullWhere = "";
if(strlen($where))
{
$FullWhere = "WHERE $where ";
}
if(strlen($MsgFilter))
{
if(!strlen($FullWhere))
{
$FullWhere = "WHERE $MsgFilter ";
}
else
$FullWhere .= " AND ($MsgFilter) ";
}
$sql .= $FullWhere;
if(strlen($objConfig->Get($SortFieldVar)))
$sql .= "ORDER BY ".$order." ";
if(isset($_GET["lpn"]))
$objSession->SetVariable($CurrentPageVar,$_GET["lpn"]);
$sql .= GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar));
//echo $sql;
$objEvents->Query_Item($sql);
$itemcount = TableCount($objEvents->SourceTable, $where,0);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objEvents);
$objListView->IdField = "EventId";
$order = $objConfig->Get("LangEmail_LV_SortField");
$objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"50%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","Description");
$objListView->ColumnHeaders->Add("Module",admin_language("la_prompt_Module"),1,0,$order,"width=\"15%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","Module");
$objListView->ColumnHeaders->Add("EventType",admin_language("la_prompt_Type"),1,0,$order,"width=\"10%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","EventType");
$objListView->ColumnHeaders->Add("EventStatus",admin_language("la_prompt_Status"),1,0,$order,"width=\"10%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","EventStatus");
//$objListView->ColumnHeaders->Add("FromUser",admin_language("la_prompt_FromUser"),1,0,$order,"width=\"15%\"","Email_LV_SortField","Email_LV_SortOrder","FromUser");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_langemailevent_search";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$MsgView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objEvents->Items);$i++)
{
$e =& $objEvents->GetItemRefByIndex($i);
$e->Set("Description",prompt_language($e->Get("Description")));
}
$title = prompt_language("la_Text_Configuration")." - '".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_EmailEvents");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_email_edit">
<input type="hidden" name="LangEditStatus" VALUE="0">
</FORM>
<FORM>
<TR <?php int_table_color(); ?> >
<td colspan="3">
</td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup">
<INPUT TYPE="HIDDEN" NAME="MessageId" value="">
<INPUT TYPE="HIDDEN" NAME="LanguageId" value="">
<INPUT TYPE="HIDDEN" NAME="Enabled" value="">
<INPUT TYPE="HIDDEN" NAME="Template" value="">
<INPUT TYPE="HIDDEN" NAME="MessageType" value="">
<INPUT TYPE="HIDDEN" NAME="Subscribed" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_edit">
</FORM>
<FORM NAME="userpopup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="userpopup">
<INPUT TYPE="HIDDEN" NAME="MessageId" value="">
<INPUT TYPE="HIDDEN" NAME="LanguageId" value="<?php echo $c->Get("LanguageId"); ?>">
<INPUT TYPE="HIDDEN" NAME="FromUserId" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_user">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addlang_email.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/config/edit_banlist.php
===================================================================
--- trunk/admin/config/edit_banlist.php (revision 373)
+++ trunk/admin/config/edit_banlist.php (revision 374)
@@ -1,238 +1,238 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL=$rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$FieldType = $_GET["DataType"];
$section = $_GET["section"];
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objBanList = new clsBanRuleList();
$envar = "section=$section&DataType=$FieldType&env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","RuleChecks");
$objListToolBar->Set("CheckForm","configform");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_rule", "la_ToolTip_New_Rule",$adminURL."/users/addrule.php?$envar&new=1","swap('new_rule','toolbar/tool_new_rule_f2.gif');",
"swap('new_rule', 'toolbar/tool_new_rule.gif');","",$imagesURL."/toolbar/tool_new_rule.gif");
$objListToolBar->Add("apply_rules", "la_ToolTip_Apply_Rules",$adminURL."/users/banlist_apply.php?$envar","swap('apply_rules','toolbar/tool_apply_rules_f2.gif');",
"swap('apply_rules', 'toolbar/tool_apply_rules.gif');","",$imagesURL."/toolbar/tool_apply_rules.gif");
$objListToolBar->Add("rule_edit","la_ToolTip_Edit","#", "if (RuleChecks.itemChecked()) swap('rule_edit','toolbar/tool_edit_f2.gif');",
"if (RuleChecks.itemChecked()) swap('rule_edit', 'toolbar/tool_edit.gif');","if (RuleChecks.itemChecked()) RuleChecks.check_submit('../users/addrule', '');",
"tool_edit.gif", TRUE, TRUE);
$listImages[] = "RuleChecks.addImage('rule_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("rule_del","la_ToolTip_Delete","#", "if (RuleChecks.itemChecked()) swap('rule_del','toolbar/tool_delete_f2.gif');",
"if (RuleChecks.itemChecked()) swap('rule_del', 'toolbar/tool_delete.gif');","if (RuleChecks.itemChecked()) RuleChecks.check_submit('edit_banlist', 'm_rule_delete');",
"tool_delete.gif", FALSE, TRUE);
$listImages[] = "RuleChecks.addImage('rule_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("move_up","la_ToolTip_Move_Up","#", "if (RuleChecks.itemChecked()) swap('move_up','toolbar/tool_move_up_f2.gif');",
"if (RuleChecks.itemChecked()) swap('move_up', 'toolbar/tool_move_up.gif');","if (RuleChecks.itemChecked()) RuleChecks.check_submit('edit_banlist', 'm_rule_move_up');",
"tool_move_up.gif");
$listImages[] = "RuleChecks.addImage('move_up','$imagesURL/toolbar/tool_move_up.gif','$imagesURL/toolbar/tool_move_up_f3.gif',1); ";
$objListToolBar->Add("move_down","la_ToolTip_Move_Down","#", "if (RuleChecks.itemChecked()) swap('move_down','toolbar/tool_move_down_f2.gif');",
"if (RuleChecks.itemChecked()) swap('move_down', 'toolbar/tool_move_down.gif');","if (RuleChecks.itemChecked()) RuleChecks.check_submit('edit_banlist', 'm_rule_move_down');",
"tool_move_down.gif");
$listImages[] = "RuleChecks.addImage('move_down','$imagesURL/toolbar/tool_move_down.gif','$imagesURL/toolbar/tool_move_down_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus(); \n");
$where = "ItemType = ".$FieldType;
$SearchWords = $objSession->GetVariable("RuleSearchWord");
if(strlen($SearchWords))
{
$where .= " AND ".$objBanList->AdminSearchWhereClause($SearchWords);
}
$order = trim($objConfig->Get("BanRules_LV_Sortfield")." ".$objConfig->Get("BanRules_LV_Sortorder"));
$sql = "SELECT ELT(r.Status+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ') as Status, ";
$sql .= "ELT(r.RuleType+1,'".admin_language("la_Text_Deny")." ','".admin_language("la_Text_Allow")." ') as RuleType, ";
$sql .= "ELT(r.ItemVerb+1,'".admin_language("la_Text_Any")." ','".admin_language("la_Text_Is")." ','".admin_language("la_Text_IsNot")." ','".admin_language("la_text_Contains");
$sql .= " ','".admin_language("la_Text_NotContains")." ','".admin_language("la_Text_GreaterThan")." ','".admin_language("la_Text_LessThan");
$sql .= " ','".admin_language("la_Text_Exists")." ','".admin_language("la_Text_Unique")."') as ItemVerb, r.RuleId as RuleId, ";
$sql .= "r.ItemValue as ItemValue, r.ItemField as ItemField, r.Priority as Priority FROM ".$objBanList->SourceTable." as r ";
$sql .= "WHERE $where ORDER BY Priority DESC";
if(strlen($order))
$sql .= ", ".$order;
// echo $sql;
$objBanList->Query_Item($sql);
$objListView = new clsListView($objListToolBar,$objBanList);
$objListView->IdField = "RuleId";
$order = $objConfig->Get("BanRules_LV_Sortfield");
$objListView->ColumnHeaders->Add("RuleType",admin_language("la_ColHeader_RuleType"),1,0,$order,"width=\"30%\"","BanRules_LV_Sortfield","BanRules_LV_Sortorder","RuleType");
$objListView->ColumnHeaders->Add("ItemField",admin_language("la_ColHeader_ItemField"),1,0,$order,"width=\"30%\"","BanRules_LV_Sortfield","BanRules_LV_Sortorder","ItemField");
$objListView->ColumnHeaders->Add("ItemVerb",admin_language("la_ColHeader_ItemVerb"),1,0,$order,"width=\"30%\"","BanRules_LV_Sortfield","BanRules_LV_Sortorder","ItemVerb");
$objListView->ColumnHeaders->Add("ItemValue",admin_language("la_ColHeader_ItemValue"),1,0,$order,"width=\"30%\"","BanRules_LV_Sortfield","BanRules_LV_Sortorder","ItemValue");
$objListView->ColumnHeaders->Add("Status",admin_language("la_ColHeader_Status"),1,0,$order,"width=\"30%\"","BanRules_LV_Sortfield","BanRules_LV_Sortorder","Status");
$objListView->ColumnHeaders->SetSort($objConfig->Get("BanRules_LV_Sortfield"), $objConfig->Get("BanRules_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->SearchBar=TRUE;
$objListView->SearchAction = "m_rule_search";
$objListView->CurrentPageVar = "Page_BanRules";
$objListView->PerPageVar = "Perpage_BanRules";
$objListView->CheckboxName = "itemlist[]";
$objListView->extra_env = "section=$section&DataType=$FieldType";
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0);
// $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_BanRules");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="configform" ID="configform" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="DataType" VALUE="<?php echo $FieldType; ?>">
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_custom">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&section=$section&DataType=6"; ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/edit_banlist.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/config/config_lang.php
===================================================================
--- trunk/admin/config/config_lang.php (revision 373)
+++ trunk/admin/config/config_lang.php (revision 374)
@@ -1,240 +1,240 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:configure_lang";
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$envar = "env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","LangChecks");
$objListToolBar->Set("CheckForm","languages");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_lang", "la_ToolTip_New_LangPack",$adminURL."/config/addlang.php?$envar&new=1","swap('new_lang','toolbar/tool_new_language_f2.gif');",
"swap('new_lang', 'toolbar/tool_new_language.gif');","",$imagesURL."/toolbar/tool_new_language.gif");
$objListToolBar->Add("import_lang", "la_ToolTip_Import_LangPack",$adminURL."/config/importlang.php?$envar","swap('import_lang','toolbar/tool_import_language_f2.gif');",
"swap('import_lang', 'toolbar/tool_import_language.gif');","",$imagesURL."/toolbar/tool_import_language.gif");
$objListToolBar->Add("lang_edit","la_ToolTip_Edit","#", "if (LangChecks.itemChecked()) swap('lang_edit','toolbar/tool_edit_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_edit', 'toolbar/tool_edit.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "LangChecks.addImage('lang_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("lang_del","la_ToolTip_Delete","#", "if (LangChecks.itemChecked()) swap('lang_del','toolbar/tool_delete_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_del', 'toolbar/tool_delete.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('config_lang', 'm_lang_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "LangChecks.addImage('lang_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("lang_export","la_ToolTip_Export","#", "if (LangChecks.itemChecked()) swap('lang_export','toolbar/tool_export_language_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_export', 'toolbar/tool_export_language.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang_export', '');",
"tool_export_language.gif");
$listImages[] = "LangChecks.addImage('lang_export','$imagesURL/toolbar/tool_export_language.gif','$imagesURL/toolbar/tool_export_language_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus(); \n");
$objLang = new clsLanguageList();
$SearchWords = $objSession->GetVariable("LangSearchWord");
if(strlen($SearchWords))
{
$where = $objLang->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$order = trim($objConfig->Get("Lang_LV_Sortfield")." ".$objConfig->Get("Lang_LV_Sortorder"));
$sql = "SELECT l.*,ELT(l.Enabled+1,'".admin_language("la_Text_Disabled")."','".admin_language("la_Text_Enabled")."') as Status ";
$sql .= "FROM ".GetTablePrefix()."Language as l ";
if(strlen($where))
$sql .= "WHERE ".$where." ";
if(strlen($order))
$sql .= "ORDER BY ".$order;
$sql .= GetLimitSQL($objSession->GetVariable("Page_LV_Lang"),$objConfig->Get("Perpage_LV_Lang"));
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objLanguages->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."Language", $where,0);
$objListView = new clsListView($objListToolBar,$objLanguages);
$objListView->IdField = "LanguageId";
$order = $objConfig->Get("Lang_LV_Sortfield");
$objListView->ColumnHeaders->Add("PackName",admin_language("la_prompt_PackName"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","PackName");
$objListView->ColumnHeaders->Add("LocalName",admin_language("la_prompt_Name"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","LocalName");
$objListView->ColumnHeaders->Add("Status",admin_language("la_ColHeader_Status"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","Status");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Lang_LV_Sortfield"), $objConfig->Get("Lang_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = "Page_LV_Lang";
$objListView->PerPageVar = "Perpage_LV_lang";
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_lang_search";
$objListView->TotalItemCount = $itemcount;
for($i=0;$i<count($objLanguages->Items);$i++)
{
$objListView->RowIcons[] = $objLanguages->Items[$i]->AdminIcon();
}
if ($_GET['action'] == "cancel") {
$ado = GetADODBConnection();
$PhraseTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportPhrases";
$EventTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportEvents";
$ado->Execute("DROP TABLE IF EXISTS $PhraseTable");
$ado->Execute("DROP TABLE IF EXISTS $EventTable");
}
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0);
$title = prompt_language("la_Text_Configuration")." - ".prompt_language("la_tab_Regional")." ".prompt_language("la_Text_Settings");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL,$title, NULL, $h);
?>
<form name="languages" ID="languages" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" name="Action" value="m_config_lang">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/config_lang.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/config/edit_customfields.php
===================================================================
--- trunk/admin/config/edit_customfields.php (revision 373)
+++ trunk/admin/config/edit_customfields.php (revision 374)
@@ -1,210 +1,210 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
//admin only util
$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";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$FieldType = $_GET["DataType"];
$section = $_GET["section"];
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objCustomFields = new clsCustomFieldList($FieldType);
$envar = "section=$section&DataType=$FieldType&env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","FieldChecks");
$objListToolBar->Set("CheckForm","configform");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_field", "la_ToolTip_New_CustomField",$adminURL."/config/addcustomfield.php?$envar&new=1","swap('new_field','toolbar/tool_forum_new_custom_f2.gif');",
"swap('new_field', 'toolbar/tool_forum_new_custom.gif');","",$imagesURL."/toolbar/tool_forum_new_custom.gif");
$objListToolBar->Add("field_edit","la_ToolTip_Edit","#", "if (FieldChecks.itemChecked()) swap('field_edit','toolbar/tool_edit_f2.gif');",
"if (FieldChecks.itemChecked()) swap('field_edit', 'toolbar/tool_edit.gif');","if (FieldChecks.itemChecked()) FieldChecks.check_submit('addcustomfield', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "FieldChecks.addImage('field_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("field_del","la_ToolTip_Delete","#", "if (FieldChecks.itemChecked()) swap('field_del','toolbar/tool_delete_f2.gif');",
"if (FieldChecks.itemChecked()) swap('field_del', 'toolbar/tool_delete.gif');","if (FieldChecks.itemChecked()) FieldChecks.check_submit('edit_customfields', 'm_customfield_delete');",
"tool_delete.gif", FALSE, TRUE);
$listImages[] = "FieldChecks.addImage('field_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
//$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_CustomFields");
$where = "Type = ".$FieldType;
$order = trim($objConfig->Get("CustomConfig_LV_Sortfield")." ".$objConfig->Get("CustomConfig_LV_Sortorder"));
$objCustomFields->Query_CustomField($where,$order);
$objListView = new clsListView($objListToolBar,$objCustomFields);
$objListView->IdField = "CustomFieldId";
$order = $objConfig->Get("CustomConfig_LV_Sortfield");
$objListView->ColumnHeaders->Add("FieldName",admin_language("la_ColHeader_FieldName"),1,0,$order,"width=\"30%\"","CustomConfig_LV_Sortfield","CustomConfig_LV_Sortorder","FieldName");
$objListView->ColumnHeaders->Add("FieldLabel",admin_language("la_ColHeader_FieldLabel"),1,0,$order,"width=\"30%\"","CustomConfig_LV_Sortfield","CustomConfig_LV_Sortorder","FieldLabel");
$objListView->ColumnHeaders->SetSort($objConfig->Get("CustomConfig_LV_Sortfield"), $objConfig->Get("CustomConfig_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = "Page_CustomData";
$objListView->PerPageVar = "Perpage_CustomData";
$objListView->CheckboxName = "itemlist[]";
$objListView->extra_env = "section=$section&DataType=$FieldType";
for($i=0;$i<count($objCustomFields->Items);$i++)
{
$objListView->RowIcons[] = $imagesURL."/itemicons/icon16_custom.gif";
}
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL,$title, NULL, $h);
?>
<form name="configform" ID="configform" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
$objListView->PageLinks = $objListView->PrintPageLinks(); /* call this before we slice! */
$objListView->SliceItems();
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="DataType" VALUE="<?php echo $FieldType; ?>">
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_custom">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/edit_customfields.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/config/edit_config.php
===================================================================
--- trunk/admin/config/edit_config.php (revision 373)
+++ trunk/admin/config/edit_config.php (revision 374)
@@ -1,171 +1,171 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
if (!admin_login())
{
if(!headers_sent())
setcookie("sid"," ",time()-3600);
$objSession->Logout();
header("Location: ".$adminURL."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//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");
$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 = $_GET["section"];
$module = $_GET["module"];
//echo $module." - ".$section."<br>\n";
//Set Environment Variable
$envar = "env=" . BuildEnv()."&section=$section&module=$module";
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","if(SubmitFunc) { config_submit('edit_config'); } else document.edit_config.submit();","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","history.back();","tool_cancel.gif");
$sec = $objSections->GetSection($section);
$ParentSection = $sec->Get("parent");
$ParentSec = $objSections->GetSection($ParentSection);
$ParentUrl = $ParentSec->URL();
if($ParentSec->Get("parent"))
{
//$SubmitUrl = $ParentUrl."&section=$section&module=$module";
$SubmitUrl = $ParentUrl;
//echo "Submitting Parent ($ParentUrl) to: $SubmitUrl <br>\n";
}
else
$SubmitUrl = $_SERVER['PHP_SELF']."?".$envar;
int_header($objCatToolBar,NULL,$title);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="edit_config" ID="edit_config" action="<?php echo $SubmitUrl; ?>" method=POST>
<?php
$objAdmin = new clsConfigAdmin($module,$section);
$objAdmin->Clear();
$objAdmin->LoadItems(TRUE);
$headings = $objAdmin->GetHeadingList();
for($i=0;$i<=count($headings);$i++)
{
$h = $headings[$i];
if(strlen($h))
{
int_subsection_title(prompt_language($h));
$Items = $objAdmin->GetHeadingItems($h);
foreach($Items as $c)
{
print "<tr ".int_table_color_ret().">\n";
print " <td width=\"60%\" valign=\"top\"><span class=\"text\">".$c->GetPrompt()."</span></td>\n";
print " <td nowrap>".$c->ItemFormElement()."</TD>";
if(is_object($c->NextItem))
{
$n = $c->NextItem;
print " <td>".$n->ItemFormElement()."</TD>";
}
else
print " <td><span class=\"text\">&nbsp;</span></td>\n";
print "</tr>\n";
}
}
}
?>
<tr <?php int_table_color(); ?>>
<td colspan="4">
<input type="hidden" name="Action" value="m_config_edit">
<input type="hidden" name="module" value="<?php echo $module; ?>">
<input type="hidden" name="section" value="<?php echo $section; ?>">
</td>
</tr>
</FORM></TABLE>
<?php
int_footer();
?>
Property changes on: trunk/admin/config/edit_config.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/config/addtheme.php
===================================================================
--- trunk/admin/config/addtheme.php (revision 373)
+++ trunk/admin/config/addtheme.php (revision 374)
@@ -1,244 +1,244 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsThemeList();
$objEditItems->SourceTable = $objSession->GetEditTable("Theme");
$objEditItems->EnablePaging = FALSE;
if ($_GET["new"] == 1)
{
$c = new clsTheme(NULL);
$en = 0;
$action = "m_theme_add";
$name = prompt_language("la_Text_NewTheme");
$objThemes->CreateEmptyEditTable("ThemeId");
}
else
{
$en = (int)$_GET["en"];
if (isset($_POST["itemlist"]))
{
$objThemes->CopyToEditTable("ThemeId",$_POST["itemlist"]);
}
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_theme_edit";
$name = $c->Get("Name");
}
$section = "in-portal:theme_general";
$envar = "env=".BuildEnv();
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme")." -'".$name."'";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',1);","/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl.$admin."/config/addtheme.php";
$StatusField = "ThemeEditStatus";
$form = "theme";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"));
$objCatToolBar->Add("divider");
}
int_header($objCatToolBar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="theme" NAME="theme" method="POST" ACTION="">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_ThemeId"); ?></TD>
<TD><?php echo $c->Get("ThemeId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_name" CLASS="text"><?php echo prompt_language("la_prompt_Name"); ?></SPAN></TD>
<TD><input type=text ValidationType="exists" NAME="name" VALUE="<?php echo $c->Get("Name"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_description"><?php echo prompt_language("la_prompt_Description"); ?></SPAN></TD>
<TD><input type=text NAME="description" VALUE="<?php echo $c->Get("Description"); ?>"></TD>
<TD></TD>
</TR>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_Enabled"); ?></td>
<td>
<input type="checkbox" name="enabled" class="text" value="1" <?php if($c->Get("Enabled") == 1) echo "checked"; ?>>
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_lang_cache_timeout"); ?></td>
<td>
<input type=text NAME="CacheTimeout" VALUE="<?php echo $c->Get("CacheTimeout"); ?>">
</td>
<td class="text">&nbsp;</td>
</tr>
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_Primary"); ?></td>
<td>
<input type="checkbox" name="primary" class="text" value="1" <?php if($c->Get("PrimaryTheme") == 1) echo "checked"; ?>>
</td>
<td class="text">&nbsp;</td>
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<INPUT TYPE="hidden" NAME="ThemeId" VALUE="<?php echo $c->Get("ThemeId"); ?>">
<input TYPE="HIDDEN" NAME="DataType" VALUE="<?php echo $DataType; ?>">
<input type="hidden" name="ThemeEditStatus" VALUE="0">
</FORM>
</tr>
<FORM>
<TR <?php int_table_color(); ?> >
<td colspan="3">
</td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addtheme.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/config/addlang_labels.php
===================================================================
--- trunk/admin/config/addlang_labels.php (revision 373)
+++ trunk/admin/config/addlang_labels.php (revision 374)
@@ -1,410 +1,410 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsPhraseList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
$name = $c->Get("PackName");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_phrase_edit";
/* -------------------------------------- Section configuration ------------------------------------------- */
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:lang_labels';
$sec = $objSections->GetSection($section);
$SortFieldVar = "Phrase_LV_Sortfield";
$SortOrderVar = "Phrase_LV_Sortorder";
$DefaultSortField = "Phrase";
$PerPageVar = "Perpage_Phrase";
$CurrentPageVar = "Page_Phrase";
$CurrentFilterVar = "Lang_View";
$ListForm = "language";
$CheckClass = "LangChecks";
/* ------------------------------------- Configure the toolbar ------------------------------------------- */
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',1);","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass",$CheckClass);
$objListToolBar->Set("CheckForm",$ListForm);
if ( isset($en_prev) || isset($en_next) )
{
$objListToolBar->Add("divider");
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev&lpn=1";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),"#","","","","tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_next&lpn=1";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next.gif");
}
else
{
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next_f3.gif");
}
}
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_label", "la_ToolTip_New_label","#","swap('new_label','toolbar/tool_new_language_var_f2.gif');",
"swap('new_label', 'toolbar/tool_new_language_var.gif');",
"OpenPhraseEditor('&destform=popup&LanguageId=".$c->Get("LanguageId")."');",
"tool_new_language_var.gif");
$objListToolBar->Add("label_edit","la_ToolTip_Edit","#", "if (LangChecks.itemChecked()) swap('label_edit','toolbar/tool_edit_f2.gif');",
"if (LangChecks.itemChecked()) swap('label_edit', 'toolbar/tool_edit.gif');",
"if (LangChecks.itemChecked()) EditPhrase();",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "LangChecks.addImage('label_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("label_del","la_ToolTip_Delete","#", "if (LangChecks.itemChecked()) swap('label_del','toolbar/tool_delete_f2.gif');",
"if (LangChecks.itemChecked()) swap('label_del', 'toolbar/tool_delete.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang_labels', 'm_phrase_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "LangChecks.addImage('label_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus();");
$CurrentLangId = $c->Get("LanguageId");
/* ----------------------------------------- Set the View Filter ---------------------------------------- */
/* bit place holders for view menu */
$Bit_Front=1;
$Bit_Admin=2;
$Bit_Both = 4;
$Bit_All = 7;
$FilterLabels = array();
$FilterLabels[0] = admin_language("la_Text_Front");
$FilterLabels[1] = admin_language("la_Text_Admin");
$FilterLabels[2] = admin_language("la_Text_Both");
if(!is_object($objThemeList))
{
$objThemeList = new clsThemeList();
}
if($objThemeList->NumItems()==0)
$objThemeList->LoadThemes();
/* determine current view menu settings */
$LangView = $objConfig->Get($CurrentFilterVar);
if(!is_numeric($LangView))
{
$LangView = $Bit_All; //Set all bits ON
$LangFilter = "";
}
if($LangView & $Bit_Both)
$Status[] = 2;
if($LangView & $Bit_Admin)
$Status[] = 1;
if($LangView & $Bit_Front)
$Status[] = 0;
if(count($Status)>0)
{
$LangFilter = "p.PhraseType IN (".implode(",",$Status).")";
}
else
$LangFilter = "p.PhraseType = -1";
$objPhrases = new clsPhraseList();
$objPhrases->SourceTable = $objSession->GetEditTable("Phrase");
$order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar));
$SearchWords = $objSession->GetVariable("PhraseSearchWord");
if(strlen($SearchWords))
{
$where = $objPhrases->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$primary = $objLanguages->GetPrimary();
/* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/
$ptable = GetTablePrefix()."Phrase";
$sql = "SELECT distinct(p.Phrase) as Phrase,p.Translation as Translation,ELT(p.PhraseType+1,'".admin_language("la_Text_Front")."','".admin_language("la_Text_Admin")."','".admin_language("la_Text_Both")."') as Type, ";
$sql .="pri.Translation as PrimaryValue, p.PhraseId as PhraseId ";
$sql .= "FROM ".$objPhrases->SourceTable." as p LEFT JOIN $ptable as pri ON (p.Phrase=pri.Phrase AND pri.LanguageId=1) WHERE p.LanguageId=".$c->Get("LanguageId")." ";
if(strlen($where))
$sql .= "AND ".$where." ";
if(strlen($LangFilter))
{
$sql .= " AND $LangFilter ";
}
if(strlen($order))
$sql .= "ORDER BY ".$order." ";
if(isset($_GET["lpn"]))
$objSession->SetVariable($CurrentPageVar,$_GET["lpn"]);
$sql .= GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar));
//echo $sql;
$objPhrases->Query_Item($sql);
$itemcount = QueryCount($sql);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
/* ---------------------------------------- Configure the list view ---------------------------------------- */
$objListView = new clsListView($objListToolBar,$objPhrases);
$objListView->IdField = "PhraseId";
$order = $objConfig->Get($SortOrderVar);
$objListView->ColumnHeaders->Add("Phrase",admin_language("la_prompt_Label"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Phrase");
$objListView->ColumnHeaders->Add("Translation",admin_language("la_prompt_Value"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Translation");
$objListView->ColumnHeaders->Add("PrimaryValue",admin_language("la_prompt_PrimaryValue"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"PrimaryValue");
$objListView->ColumnHeaders->Add("Type",admin_language("la_prompt_Type"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Type");
$objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = $CurrentPageVar;
$objListView->PerPageVar = $PerPageVar;
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_phrase_search";
$objListView->TotalItemCount = $itemcount;
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,
$CurrentFilterVar,$LangView,$Bit_All);
foreach($FilterLabels as $Bit=>$Label)
{
$objListView->AddViewMenuFilter($Label,$Bit);
}
for($i=0;$i<count($objPhrases->Items);$i++)
{
$objListView->RowIcons[] = $objPhrases->Items[$i]->AdminIcon();
}
$title = admin_language("la_Text_Configuration")." - '".$name."' ".admin_language("la_Text_Pack")." - ".admin_language("la_tab_Labels")." ($itemcount)";
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL, $title,NULL,$h);
?>
<form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_phrase">
<input type="hidden" name="LangEditStatus" VALUE="0">
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<!-- CODE FOR TEMPLATE MENU -->
<form ID="templatemenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="templatemenu">
<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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup">
<INPUT TYPE="HIDDEN" NAME="phrase" value="">
<INPUT TYPE="HIDDEN" NAME="languageid" value="">
<INPUT TYPE="HIDDEN" NAME="phraseid" value="">
<INPUT TYPE="HIDDEN" NAME="phrasetype" value="">
<INPUT TYPE="HIDDEN" NAME="transvalue" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_phrase_edit">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
function EditPhrase()
{
if(LangChecks.countChecks() > 0)
{
var retval = LangChecks.getItemList();
OpenPhraseEditor('&destform=popup&PhraseId='+retval);
}
}
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addlang_labels.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/config/importlang.php
===================================================================
--- trunk/admin/config/importlang.php (revision 373)
+++ trunk/admin/config/importlang.php (revision 374)
@@ -1,185 +1,185 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$objMessages = new clsEmailMessageList();
unset($objEditItems);
$objEditItems = new clsLanguageList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
$objEditItems->EnablePaging = FALSE;
$objPhraseList = new clsPhraseList();
$section = "in-portal:lang_import";
$envar = "env=".BuildEnv();
$title = prompt_language("la_Title_LanguageImport")." - ".admin_language("la_Step")." 1";
$script_name = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ? 'config_lang' : 'importlang_progress';
$post = $adminURL.'/config/'.$script_name.'.php?'.$envar;
//Display header
if ($_GET['importerror'] != '1') {
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('language','".$admin."/config/".$script_name.".php',1);",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif");
}
int_header($objCatToolBar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="language" NAME="language" method="POST" ACTION="xren<?php echo $post; ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_lang_import">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<?php if ($_GET['importerror'] == 1) { ?>
<TR <?php int_table_color(); ?> >
<TD>
<?php echo admin_language("la_prompt_import_error"); ?></A>
</TD>
<TD></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD>
<A HREF="<?php echo $adminURL."/config/config_lang.php?".$envar; ?>"><?php echo admin_language("la_prompt_Continue"); ?></A>
</td>
<TD></TD>
<TD></TD>
</TR>
<?php } else { ?>
<TR <?php int_table_color(); ?> >
<TD class="text"><?php echo prompt_language("la_prompt_LanguageFile"); ?></TD>
<TD><INPUT TYPE="FILE" name="lang_file"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_localname"><?php echo prompt_language("la_prompt_LoadLangTypes"); ?></SPAN></TD>
<TD><input type=checkbox NAME="langtypes[]" VALUE="0" CHECKED> <?php echo prompt_language("la_Text_FrontEnd"); ?>
<input type=checkbox NAME="langtypes[]" VALUE="1" CHECKED><?php echo prompt_language("la_Text_Admin"); ?>
<input type=checkbox NAME="langtypes[]" VALUE="2" CHECKED><?php echo prompt_language("la_Text_Both"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_localname"><?php echo prompt_language("la_prompt_overwritephrases"); ?></SPAN></TD>
<TD><input type=checkbox NAME="overwrite" VALUE="1"><i><?php echo prompt_language("la_importlang_phrasewarning"); ?></i></TD>
<td></td>
</tr>
<?php } ?>
</TABLE>
</FORM>
<!-- CODE FOR VIEW MENU -->
<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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/importlang.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/config/missing_label_edit.php
===================================================================
--- trunk/admin/config/missing_label_edit.php (revision 373)
+++ trunk/admin/config/missing_label_edit.php (revision 374)
@@ -1,306 +1,306 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsPhraseList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
//$c = $objEditItems->GetItemByIndex($en);
$LangId = $objSession->GetVariable("Missing_LangId");
$c = $objLanguages->GetItem($LangId);
$name = $c->Get("PackName");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_phrase_edit";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:missing_lang_labels';
//echo $envar."<br>\n";
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","save_labels();","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","window.close();",$imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","LangChecks");
//Display header
$sec = $objSections->GetSection($section);
if ( isset($en_prev) || isset($en_next) )
{
$objListToolBar->Add("divider");
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),"#","","","","tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_next";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next.gif");
}
else
{
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next_f3.gif");
}
}
$CurrentLangId = $c->Get("LanguageId");
$title = prompt_language("la_Text_Configuration")." - '".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_MissingLabels");
int_header($objListToolBar,NULL, $title);
$ThemeId = $objSession->GetVariable("Missing_ThemeId");
$table = $objSession->GetSessionTable("_".$ThemeId."_labels");
$objPhrases = new clsPhraseList();
$objPhrases->SourceTable = $table;
$order = trim($objConfig->Get("Phrase_LV_Sortfield")." ".$objConfig->Get("Phrase_LV_Sortorder"));
$primary = $objLanguages->GetPrimary();
$ptable = GetTablePrefix()."Phrase";
$sql = "SELECT distinct(e.Phrase) as Phrase, ";
$sql .= "concat('<INPUT TYPE=TEXT name=\"Phrase[',e.Phrase,']\" VALUE=\"',e.Translation,'\">') as Translation, ";
$sql .="p.Translation as PrimaryValue, e.PhraseId as PhraseId ";
$sql .= "FROM $table as e LEFT JOIN $ptable as p ON (e.Phrase=p.Phrase AND p.LanguageId=$primary) WHERE e.LanguageId=".$c->Get("LanguageId")." ";
if(strlen($where))
$sql .= "AND ".$where." ";
if(strlen($order))
$sql .= "ORDER BY ".$order." ";
if(isset($_GET["lpn"]))
$objSession->SetVariable("m_Page_Phrase",$_GET["lpn"]);
$sql .= GetLimitSQL($objSession->GetVariable("m_Page_Phrase"),$objConfig->Get("Perpage_Phrase"));
$objPhrases->Query_Item($sql);
$itemcount = TableCount($table, $where,0);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView = new clsListView($objListToolBar, $objPhrases);
$objListView->IdField = "PhraseId";
$order = $objConfig->Get("Phrase_LV_Sortfield");
$objListView->ColumnHeaders->Add("Phrase",admin_language("la_prompt_Label"),1,0,$order,"width=\"30%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","Phrase");
$objListView->ColumnHeaders->Add("Translation",admin_language("la_prompt_Value"),1,0,$order,"width=\"40%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","Translation");
$objListView->ColumnHeaders->Add("PrimaryValue",admin_language("la_prompt_PrimaryValue"),1,0,$order,"width=\"30%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","PrimaryValue");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Phrase_LV_Sortfield"), $objConfig->Get("Phrase_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = FALSE;
$objListView->CurrentPageVar = "m_Page_Phrase";
$objListView->PerPageVar = "Perpage_Phrase";
$objListView->PageURL = "javascript:setPage({TargetPage});";
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = FALSE;
$objListView->SearchAction="";
$objListView->TotalItemCount = $itemcount;
for($i=0;$i<count($objPhrases->Items);$i++)
{
$objListView->RowIcons[] = $objPhrases->Items[$i]->AdminIcon();
}
?>
<form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_missing_phrase">
<input type="hidden" name="LangId" value="<?php echo $CurrentLangId; ?>">
<input type="hidden" name="ThemeId" value="<?php echo $ThemeId; ?>">
<input type="hidden" name="MissingLangEditStatus" VALUE="0">
</FORM>
<FORM>
<TR <?php int_table_color(); ?> >
<td colspan="3">
</td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<!-- CODE FOR TEMPLATE MENU -->
<form ID="templatemenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="templatemenu">
<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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup">
<INPUT TYPE="HIDDEN" NAME="phrase" value="">
<INPUT TYPE="HIDDEN" NAME="languageid" value="">
<INPUT TYPE="HIDDEN" NAME="phraseid" value="">
<INPUT TYPE="HIDDEN" NAME="phrasetype" value="">
<INPUT TYPE="HIDDEN" NAME="transvalue" value="">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_phrase_edit">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/missing_label_edit.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/config/edit_template.php
===================================================================
--- trunk/admin/config/edit_template.php (revision 373)
+++ trunk/admin/config/edit_template.php (revision 374)
@@ -1,297 +1,297 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
require_once($pathtoroot."kernel/include/tag-class.php");
$objTagList = new clsTagList();
$objTagList->LoadGlobalTags();
$section = "in-portal:template_editor";
$ThemeId = GetVar('ThemeId');
$FileId = GetVar('FileId');
if(!$_POST['Action'] || !is_object($f) ) $f = new clsThemeFile($FileId);
if($FileId)
{
$theme = new clsTheme( $f->Get("ThemeId") ); // create theme from file
$f->LoadFileContents(false);
$name = $f->Get("FileName");
$Action="m_template_edit";
}
else
{
if($ThemeId) // if theme is set
{
$theme = new clsTheme($ThemeId);
$f->Set("ThemeId",$ThemeId);
$f->Set("FilePath",$theme->Get("name"));
$name = "New Template";
$Action = "m_template_add";
}
}
if( is_object($f) && isset($_POST['Action']) )
{
// aka SetFieldsFromHash
//print_pre($_POST);
//echo "SetFields From POST<br>";
$f->Set( Array('FileName','Description','Contents'),
Array(basename($_POST['name']), $_POST['Description'], $_POST['contents']) );
}
$objTemplateCheck = new clsTemplateChecker($theme->ThemeDirectory()."/");
if(count($f->Contents)>0)
{
$fullname = $f->Get("FilePath")."/".$name;
$TemplateType = $objTemplateCheck->GetTemplateType($fullname);
}
else
$TemplateType="new";
if(is_object($theme))
{
$theme->GetFileList("","FilePath,FileName");
$AllThemeFiles = $theme->Files->Items;
}
if($ThemeId)
{
$m_var_list_update["theme"]=$ThemeId;
$cat = 0;
$template = "index";
if(is_object($f))
{
$p = $f->Get("FilePath");
if(strlen($p))
{
if(substr($p,0,1)=="/")
$p = substr($p,1);
$p .= "/";
$mod = $objModules->GetModuleByPath($p);
if(is_object($mod))
{
$cat = $mod->Get("RootCat");
$template=$mod->Get("TemplatePath")."index";
}
}
}
$m_var_list_update["t"] = $template;
$m_var_list_update["cat"] = $cat;
$PreviewUrl ="http://".ThisDomain().$objConfig->Get("Site_Path")."index.php?env=".BuildEnv();
}
unset($objEditItems);
$envar = "env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ThemeChecks");
$objListToolBar->Add("select", "la_ToolTip_Save","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"SelectSubmit();",
"tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Close","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
$objListToolBar->Add("divider");
$objListToolBar->Add("template_preview","la_ToolTip_Preview","#", "swap('template_preview','toolbar/tool_preview_template_f2.gif');",
"swap('template_preview', 'toolbar/tool_preview_template.gif');",
"ShowPreview('$PreviewUrl');","tool_preview_template.gif");
//$objListToolBar->AddToInitScript("fwLoadMenus();");
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme")." '".$theme->Get("Name")."' - ".prompt_language("la_Text_Template");
$title .= " '".$name."'";
$path = $f->FullPath();
if(!is_writable($path))
$title .= " (".admin_language("la_text_ReadOnly").")";
int_header($objListToolBar,NULL,$title);
?>
<TABLE cellSpacing="0" cellPadding="2" width="100%" border="0" class="tableborder">
<form name="template" ID="template" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<?php if( $f->HasError() ) { ?>
<TR <?php int_table_color(); ?> style="color: red;">
<TD>ERROR:</TD>
<TD><?php echo $f->ErrorMsg(); ?></TD>
<TD></TD>
</TR>
<?php } ?>
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_FileId"); ?></TD>
<TD><?php echo $f->Get("FileId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_name" CLASS="text"><?php echo prompt_language("la_prompt_FileName"); ?></SPAN></TD>
<TD><input type="text" NAME="name" <?php if($Action == 'm_template_edit') echo 'Readonly'; ?> VALUE="<?php echo $f->Get("FileName"); ?>"> <?php if($Action == 'm_template_edit') echo '&nbsp;(read only)'; ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_description" CLASS="text"><?php echo prompt_language("la_prompt_Description"); ?></SPAN></TD>
<TD><input type="text" NAME="Description" VALUE="<?php echo $f->Get("Description"); ?>"></TD>
<TD></TD>
</TR>
<!--
<tr <?php int_table_color(); ?>>
<td valign="top" class="text"><?php echo prompt_language("la_prompt_EnableCache"); ?></td>
<td>
<input type="checkbox" name="enable_cache" class="text" value="1" <?php if($f->Get("EnableCache") == 1) echo "checked"; ?>>
<input type=text NAME="cache_timeout" VALUE="<?php echo $f->Get("CacheTimeout"); ?>">
</td>
<td class="text">&nbsp;</td>
</tr>
-->
<?php int_subsection_title(prompt_language("la_Text_Template")); ?>
<tr <?php int_table_color(); ?> >
<td colspan="3">
Item Tags:
<SELECT id="itemtags" name="itemtags" onChange="TagSelectChange(this,'tagattribs',true);"></select>
&nbsp;
<a href="javascript:InsertTag('itemtags');">Insert Tag</a>
&nbsp;
Global Tags:
<SELECT id="taglib" name="taglib" onChange="TagSelectChange(this,'tagattribs',true);"></select>
&nbsp;
<a href="javascript:InsertTag('taglib');">Insert Tag</a>
</td>
</tr>
<TR <?php int_table_color(); ?> >
<td colspan="3" align="center">
<textarea NAME="contents" id="contents" rows="20" cols="95" nowrap><?php echo $f->Get('Contents'); ?></textarea>
</td>
</TR>
<tr <?php int_table_color(); ?> >
<td colspan="3">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="30%" align="left" id="taghelp">&nbsp;</td>
<td width="70%" align="left" id="tagexample">&nbsp;</td>
<!--<td width="33%" align="left" id="attrhelp">&nbsp;</td>-->
<!--<td id="tagattribs" valign="top">&nbsp;</td>-->
</tr>
</table>
</td>
</tr>
<TR <?php int_table_color(); ?> >
<td colspan="3">
<input type="hidden" NAME="Action" VALUE="<?php echo $Action; ?>">
<INPUT TYPE="hidden" NAME="ThemeId" VALUE="<?php echo $f->Get("ThemeId"); ?>">
<INPUT TYPE="hidden" NAME="FileId" VALUE="<?php echo $f->Get("FileId"); ?>">
<INPUT TYPE="hidden" NAME="FilePath" VALUE="<?php echo $f->Get("FilePath"); ?>">
<input type="hidden" name="ThemeEditStatus" VALUE="0">
</td>
</tr>
</FORM>
</TABLE>
<SCRIPT language="JavaScript">
init('template','contents');
LoadTags('taglib','global',false);
LoadTags('itemtags','global',true);
</SCRIPT>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/edit_template.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/config/edit_label.php
===================================================================
--- trunk/admin/config/edit_label.php (revision 373)
+++ trunk/admin/config/edit_label.php (revision 374)
@@ -1,328 +1,328 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
if(count($_POST)>0 && !$_GET['PhraseId'] && $add_error == '')
{
echo "<SCRIPT language=\"JavaScript\">\n";
echo " if(window.opener) window.opener.location=window.opener.location;\n";
echo " window.close();";
echo "</SCRIPT>";
die();
}
$section = "in-portal:phrase_editor";
$ids = $_GET["PhraseId"];
if(strlen($ids))
{
$ids = str_replace("[","",$ids);
$ids = str_replace("]","",$ids);
$ids = str_replace("\"","",$ids);
$ids = str_replace("\\","",$ids);
$PhraseIds = explode(",",$ids);
}
else
{
$LangId = $_GET["LanguageId"];
}
$EditDirect = (int)$_GET["direct"];
if($EditDirect)
{
$NewLabel = $_GET["label"];
if(!$LangId)
{
$LangId = $objSession->Get("Language");
}
}
unset($objEditItems);
if (count($PhraseIds) > 1) {
$print_list = true;
}
else {
$ado = GetADODBConnection();
$sql = "SELECT PhraseId FROM ".$objSession->GetEditTable("Phrase");
if ($LangId) {
$sql .= " WHERE LanguageId = $LangId";
}
$rs = $ado->Execute($sql);
if (!$_GET['en']) {
$selected_id = $PhraseIds[0];
}
else {
$selected_id = $_GET['PhraseId'];
}
$PhraseIdList = '';
while ($rs && !$rs->EOF) {
$PhraseIdList .= $rs->fields['PhraseId'].",";
$rs->MoveNext();
}
$PhraseIdList = substr($PhraseIdList, 0, strlen($PhraseIdList));
$PhraseIdArr = explode(",", $PhraseIdList);
$print_list = false;
}
$envar = "env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ThemeChecks");
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"LangSubmit();",
"tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
if (!$print_list) {
$x = -1;
foreach ($PhraseIdArr as $key => $value) {
if ($value == $selected_id) {
$x = $key;
}
}
if ($x <= 0) {
$en_next = $PhraseIdArr[$x+1];
$en_prev = false;
}
else if ($x >= count($PhraseIdArr) - 1) {
$en_next = false;
$en_prev = $PhraseIdArr[$x - 1];
}
else {
$en_next = $PhraseIdArr[$x+1];
$en_prev = $PhraseIdArr[$x-1];
}
$url = "edit_label.php?$envar&en=0";
$form = "frmPhrase";
MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,1,$url, "LangSubmitMove");
}
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Label");
int_header($objListToolBar,NULL,$title);
?>
<form name="frmPhrase" ID="frmPhrase" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php
if(!is_object($objPhraseList))
{
$objPhraseList = new clsPhraseList();
}
if(!$EditDirect)
$objPhraseList->SourceTable = $objSession->GetEditTable("Phrase");
$count_ids = 1;
if ($print_list) {
$count_ids = count($PhraseIds);
}
else {
foreach($PhraseIdArr as $key => $value) {
if ($value == $selected_id) {
$PhraseIds[0] = $value;
}
}
}
for($x=0;$x<$count_ids;$x++)
{
$p = $objPhraseList->GetItem($PhraseIds[$x]);
//echo "<pre>"; print_r($p); echo "</pre>";
if(!$LangId)
$LangId = $p->Get("LanguageId");
if(is_object($p) && ($selected_id != '' || $count_ids > 1))
{
echo int_subsection_title_ret(admin_language("la_tab_General").": ".GetPrimaryTranslation($p->Get("Phrase")));
echo "<TR ".int_table_color_ret()." >\n";
echo " <TD>".admin_language("la_prompt_PhraseId")."</TD>\n";
echo " <TD>".$p->Get("PhraseId")."</TD>\n";
echo " <TD></TD>\n";
echo "</TR>\n";
echo "<TR ".int_table_color_ret()." >\n";
echo " <TD>".admin_language("la_prompt_Label")."</TD>\n";
echo " <TD><input size=60 type=text tabindex=\"1\" ValidationType=\"exists\" NAME=\"name[".$p->Get("PhraseId")."]\" VALUE=\"".$p->Get("Phrase")."\"></TD>\n";
echo " <TD></TD>\n";
echo "</TR>\n";
echo "<TR ".int_table_color_ret()." >\n";
echo " <TD>".admin_language("la_prompt_Value")."</TD>\n";
echo " <TD><input size=60 type=text tabindex=\"2\" ValidationType=\"exists\" NAME=\"translation[".$p->Get("PhraseId")."]\" VALUE=\"".$p->Get("Translation")."\"></TD>\n";
echo " <TD></TD>\n";
echo "</TR>\n";
echo "<TR ".int_table_color_ret()." >\n";
echo " <TD>".admin_language("la_prompt_PhraseType")."</TD>\n";
echo " <TD COLSPAN=2>\n";
echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"0\"";
if($p->Get("PhraseType")==0)
echo "CHECKED";
echo ">";
echo admin_language("la_Text_Front");
echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"1\"";
if($p->Get("PhraseType")==1)
echo "CHECKED";
echo ">";
echo admin_language("la_Text_Admin");
echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"2\"";
if($p->Get("PhraseType")==2)
echo "CHECKED";
echo ">";
echo admin_language("la_Text_Both");
echo " </TD>\n";
echo "</TR>\n";
unset($p);
}
}
?>
<?php
if(strlen($NewLabel)>0)
{
"::".$PriTrans = GetPrimaryTranslation($NewLabel);
}
?>
<?php if ($_GET['PhraseId'] == '') { ?>
<?php int_subsection_title(admin_language("la_tab_General").":: New Phrase ".$PriTrans); ?>
<TR <?php int_table_color(); ?> >
<td><?php echo admin_language("la_prompt_Label"); ?></td>
<td><input type=text size=60 tabindex="4" NAME="name[0]" VALUE="<?php echo $_POST['name'][0]; ?>"></td>
<td></td>
</tr>
<TR <?php int_table_color(); ?> >
<td><?php echo admin_language("la_prompt_Value"); ?></td>
<td><input type=text size=60 tabindex="5" NAME="translation[0]" VALUE="<?php echo $_POST['translation'][0]; ?>"></td>
<td></td>
</tr>
<TR <?php int_table_color(); ?> >
<TD><?php echo admin_language("la_prompt_PhraseType"); ?></TD>
<TD COLSPAN=2>
<input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="0">
<?php echo admin_language("la_Text_Front"); ?>
<input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="1">
<?php echo admin_language("la_Text_Admin"); ?>
<input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="2">
<?php echo admin_language("la_Text_Both"); ?>
</TD>
</tr>
<tr>
<td colspan="3" align="center"><font color="#FF0000"><?php echo $add_error; ?></font></td>
</tr>
<INPUT type=hidden name="Action1" VALUE="new">
<?php } ?>
<INPUT TYPE=HIDDEN NAME="LanguageId" VALUE="<?php echo $LangId; ?>">
<INPUT type=hidden name="Action" VALUE="m_phrase_edit">
<input type=hidden name="direct" VALUE="<?php echo $EditDirect; ?>">
</FORM>
</TABLE>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/edit_label.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/config/config_theme.php
===================================================================
--- trunk/admin/config/config_theme.php (revision 373)
+++ trunk/admin/config/config_theme.php (revision 374)
@@ -1,229 +1,229 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:configure_themes";
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$envar = "env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","ThemeChecks");
$objListToolBar->Set("CheckForm","theme");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_theme", "la_ToolTip_New_Theme",$adminURL."/config/addtheme.php?$envar&new=1","swap('new_theme','toolbar/tool_new_theme_f2.gif');",
"swap('new_theme', 'toolbar/tool_new_theme.gif');","",$imagesURL."/toolbar/tool_new_theme.gif");
$objListToolBar->Add("theme_edit","la_ToolTip_Edit","#", "if (ThemeChecks.itemChecked()) swap('theme_edit','toolbar/tool_edit_f2.gif');",
"if (ThemeChecks.itemChecked()) swap('theme_edit', 'toolbar/tool_edit.gif');","if (ThemeChecks.itemChecked()) ThemeChecks.check_submit('addtheme', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "ThemeChecks.addImage('theme_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("theme_del","la_ToolTip_Delete","#", "if (ThemeChecks.itemChecked()) swap('theme_del','toolbar/tool_delete_f2.gif');",
"if (ThemeChecks.itemChecked()) swap('theme_del', 'toolbar/tool_delete.gif');","if (ThemeChecks.itemChecked()) ThemeChecks.check_submit('config_theme', 'm_theme_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "ThemeChecks.addImage('theme_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("theme_primary","la_ToolTip_Primary","#", "if (ThemeChecks.itemChecked()) swap('theme_primary','toolbar/tool_primary_theme_f2.gif');",
"if (ThemeChecks.itemChecked()) swap('theme_primary', 'toolbar/tool_primary_theme.gif');","if (ThemeChecks.itemChecked()) ThemeChecks.check_submit('config_theme', 'm_theme_primary');",
"tool_primary_theme.gif");
$listImages[] = "ThemeChecks.addImage('theme_primary','$imagesURL/toolbar/tool_primary_theme.gif','$imagesURL/toolbar/tool_primary_theme_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus(); \n");
$objThemes->CreateMissingThemes();
$SearchWords = $objSession->GetVariable("ThemeSearchWord");
if(strlen($SearchWords))
{
$where = $objThemes->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$order = trim($objConfig->Get("Theme_LV_Sortfield")." ".$objConfig->Get("Theme_LV_Sortorder"));
$sql = "SELECT t.*,ELT(t.enabled+1,'".admin_language("la_Text_Disabled")."','".admin_language("la_Text_Enabled")."') as Status ";
$sql .= "FROM ".GetTablePrefix()."Theme as t ";
if(strlen($where))
$sql .= "WHERE ".$where." ";
if(strlen($order))
$sql .= " ORDER BY ".$order;
$objListView = new clsListView($objListToolBar);
$objListView->CurrentPageVar = "Page_LV_Themes";
$objListView->PerPageVar = "Perpage_LV_Themes";
$sql .= ' '.$objListView->GetLimitSQL();
$objThemes->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."Theme", $where,0);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."<br>\n";
$objListView->SetListItems($objThemes);
$objListView->IdField = "ThemeId";
$order = $objConfig->Get("Theme_LV_Sortfield");
$objListView->ColumnHeaders->Add("Name",admin_language("la_prompt_Name"),1,0,$order,"width=\"30%\"","Theme_LV_Sortfield","Theme_LV_Sortorder","Name");
$objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"30%\"","Theme_LV_Sortfield","Theme_LV_Sortorder","Description");
$objListView->ColumnHeaders->Add("Status",admin_language("la_ColHeader_Status"),1,0,$order,"width=\"30%\"","Theme_LV_Sortfield","Theme_LV_Sortorder","Status");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Theme_LV_Sortfield"), $objConfig->Get("Theme_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_theme_search";
$objListView->TotalItemCount = $itemcount;
for($i=0;$i<count($objThemes->Items);$i++)
{
$objListView->RowIcons[] = $objThemes->Items[$i]->AdminIcon();
}
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0);
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme");
$h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n";
int_header($objListToolBar,NULL,$title, NULL, $h);
?>
<form name="theme" ID="theme" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST>
<table cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<tbody>
<?php
print $objListView->PrintList();
?>
<input TYPE="hidden" NAME="DataType" VALUE="<?php echo $FieldType; ?>">
<input type="hidden" NAME="section" VALUE="<?php echo $section; ?>">
<input type="hidden" name="Action" value="m_config_custom">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form ID="viewmenu" 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>
<FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>">
<INPUT TYPE="HIDDEN" NAME="Action" VALUE="">
<INPUT TYPE="HIDDEN" NAME="list_search">
</FORM>
<script src="<?php echo $adminURL; ?>/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?>
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/config/config_theme.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/config/addcustomfield.php
===================================================================
--- trunk/admin/config/addcustomfield.php (revision 373)
+++ trunk/admin/config/addcustomfield.php (revision 374)
@@ -1,261 +1,261 @@
<?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. ##
##############################################################
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
$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");
require_once($pathtoroot.$admin."/listview/listview.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
$FieldType = (int)$_GET["DataType"];
if($FieldType==0)
$FieldType = (int)$_POST["DataType"];
$objCustomFields = new clsCustomFieldList($FieldType);
//$objEditItems->SourceTable = $objSession->GetEditTable("Images");
if(isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$FieldId = $_POST["itemlist"][0];
}
else
{
$FieldId = $_POST["itemlist"];
}
$c = $objCustomFields->GetItem($FieldId);
$action = "m_customfield_edit";
$name = $c->Get("FieldName");
}
else
{
$c = new clsCustomField();
$c->Set("Type",$DataType);
$action = "m_customfield_add";
$name = prompt_language("la_Text_NewField");
}
$section = $_GET["section"];
if(strlen($section)==0)
$section = $_POST["section"];
$section_env = "section=$section&DataType=$FieldType";
$envar = "$section_env&env=".BuildEnv();
$ado = GetADODBConnection();
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.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;
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_CustomField")." ".prompt_language("la_text_for")." ".prompt_language("la_Text_DataType_".$_GET["DataType"]);
$title .= " '".$name."'";
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","submit_form('customfield','','".$admin."/config/edit_customfields.php',0,'&$section_env');",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","submit_form('customfield','','".$admin."/config/edit_customfields.php',-1,'&$section_env');",$imagesURL."/toolbar/tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="customfield" NAME="customfield" method="POST" ACTION="">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_FieldId"); ?></TD>
<TD><?php echo $c->Get("CustomFieldId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldname"><?php echo prompt_language("la_prompt_FieldName"); ?></SPAN></TD>
<TD><input ValidationType="exists" tabindex="1" type=text NAME="fieldname" VALUE="<?php echo $c->Get("FieldName"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldlabel"><?php echo prompt_language("la_prompt_FieldLabel"); ?></SPAN></TD>
<td><?php if(strlen($c->Get("FieldName"))) echo "lu_fieldcustom__".$c->Get("FieldName"); ?>:
<?php echo prompt_language("lu_fieldcustom__".$c->Get("FieldName"),0); ?>
</td>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<td colspan="3">
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<INPUT TYPE="hidden" NAME="CustomFieldId" VALUE="<?php echo $c->Get("CustomFieldId"); ?>">
<input TYPE="HIDDEN" NAME="DataType" VALUE="<?php echo $_GET["DataType"]; ?>">
</td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_AdminUI")); ?>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_generaltab"><?php echo prompt_language("la_prompt_showgeneraltab"); ?></SPAN></TD>
<TD><input type=checkbox NAME="generaltab" tabindex="2" VALUE="1" <?php if ($c->Get("OnGeneralTab")) echo "CHECKED"; ?>></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_heading"><?php echo prompt_language("la_prompt_heading"); ?></SPAN></TD>
<TD><input type=text NAME="heading" tabindex="3" VALUE="<?php echo $c->Get("Heading"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldprompt"><?php echo prompt_language("la_prompt_FieldPrompt"); ?></SPAN></TD>
<TD><input type=text NAME="fieldprompt" tabindex="4" VALUE="<?php echo $c->Get("Prompt"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_input_type"><?php echo prompt_language("la_prompt_InputType"); ?></SPAN></TD>
<td>
<SELECT name="input_type" tabindex="5">
<option VALUE="text" <?php if($c->Get("ElementType")=="text") echo "SELECTED"; ?>><?php echo admin_language("la_type_text"); ?></OPTION>
<option VALUE="select" <?php if($c->Get("ElementType")=="select") echo "SELECTED"; ?>><?php echo admin_language("la_type_select"); ?></OPTION>
<option VALUE="radio" <?php if($c->Get("ElementType")=="radio") echo "SELECTED"; ?>><?php echo admin_language("la_type_radio"); ?></OPTION>
<option VALUE="password" <?php if($c->Get("ElementType")=="password") echo "SELECTED"; ?>><?php echo admin_language("la_type_password"); ?></OPTION>
<option VALUE="textarea" <?php if($c->Get("ElementType")=="textarea") echo "SELECTED"; ?>><?php echo admin_language("la_type_textarea"); ?></OPTION>
<option VALUE="label" <?php if($c->Get("ElementType")=="label") echo "SELECTED"; ?>><?php echo admin_language("la_type_label"); ?></OPTION>
</SELECT>
</td>
<td></td>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_valuelist"><?php echo prompt_language("la_prompt_valuelist"); ?></SPAN></TD>
<TD><input type=text tabindex="6" NAME="valuelist" VALUE="<?php echo $c->Get("ValueList"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD></TD>
<td><?php echo prompt_language("la_valuelist_help"); ?></td>
<td></td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addcustomfield.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/import/step1.php
===================================================================
--- trunk/admin/import/step1.php (revision 373)
+++ trunk/admin/import/step1.php (revision 374)
@@ -1,153 +1,153 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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";
//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");
//Set Section
$section = "in-portal:main_import";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
// Clean Up Import DB Connection Variables
$objSession->SetVariable("import_sql_type",""); // sql server type
$objSession->SetVariable("import_server",""); // sql server address
$objSession->SetVariable("import_db",""); // database name
$objSession->SetVariable("import_user",""); // connection user
$objSession->SetVariable("import_pass",""); // connection password
$objSession->SetVariable("error_importing",""); // connection error
// Clean Up Last Step Variables
$objSession->SetVariable('import_table_prefix','');
$objSession->SetVariable('user_admin_names','');
$objSession->SetVariable('user_regular_names','');
$objSession->SetVariable('user_admin_values','');
$objSession->SetVariable('user_regular_values','');
$objSession->SetVariable('catnavbar','');
$objSession->SetVariable('init_cat','');
$objSession->SetVariable('user_input1',''); // in use ?
$objSession->SetVariable('user_input2',''); // in use ?
$objSession->SetVariable('importtodo','');
$var="?env=".BuildEnv();
// Prev Button (no use at a time :)
$MouseOver="";
$MouseOut="";
$onClick="";
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif");
// Next Button
$MouseOver="if( UsedAgreed() ) swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="if( UsedAgreed() ) swap('moveright', 'toolbar/tool_next.gif');";
$link2=$adminURL."/import/step2.php".$var;
$onClick="if( UsedAgreed() ) document.location= '$link2';";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),'#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
$title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 1";
int_header($objCatToolBar,NULL,$title,' onload="PageOnLoad(1);"');
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<form name="import_form" METHOD="POST" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<?php int_subsection_title(admin_language("la_Prompt_Warning")); ?>
<TR <?php echo int_table_color(); ?>>
<TD COLSPAN="2"><span class=\"text\">This utility allows you to import data from other databases and applications, including third party products and earlier versions of this software.
</span>
</TD>
</TR>
<tr <?php echo int_table_color(); ?>>
<TD>
<?php
echo int_hint(prompt_language("la_text_disclaimer_part1")." ".prompt_language("la_text_disclaimer_part2"));
?>
</td>
</tr>
<tr>
<td COLSPAN="2">
<input type="checkbox" value="0" id="agree" name="agree" onclick="if( UsedAgreed() ) swap('moveright', 'toolbar/tool_next.gif'); else swap('moveright', 'toolbar/tool_next_f3.gif'); "><label for="agree"><?php echo admin_language("la_Text_IAgree"); ?></label>
</td>
</tr>
</FORM>
</TABLE>
<?php
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/import/step1.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/import/step2.php
===================================================================
--- trunk/admin/import/step2.php (revision 373)
+++ trunk/admin/import/step2.php (revision 374)
@@ -1,135 +1,135 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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";
//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");
//Set Section
$section = "in-portal:main_import";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$var = '?env='.BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
// Previous Button
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$link = $adminURL.'/import/step1.php'.$var;
$objCatToolBar->Add('moveleft','la_ToolTip_PreviousStep', $link, $MouseOver, $MouseOut,'','tool_prev.gif');
// Next Button
$MouseOver = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut = "if( ChoiseMade('import_form','choose') !== false ) swap('moveright', 'toolbar/tool_next.gif');";
if($ro_perm)
{
$click_url = $adminURL."/import/step1.php".$var;
$onClick = "if( ChoiseMade('import_form','choose') ) document.location= '$click_url'; ";
}
else
{
$click_url = $adminURL."/import/step3.php".$var;
$onClick = "ImportRedirect('import_form', ChoiseMade('import_form','choose'), '$click_url');";
}
$objCatToolBar->Add("moveright",'la_ToolTip_NextStep','#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
// header
$title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 2";
int_header($objCatToolBar,NULL,$title);
?>
<form name="import_form" id="import_form" method="post" action="<?php echo $click_url; ?>">
<input type="hidden" name="import_id" id="import_id" value="">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php int_subsection_title("Import Source"); ?>
<tr <?php echo int_table_color(); ?>>
<td><span class="text">Select the program you are importing the data from:</span></td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td>
<?php
foreach($import_scripts as $id => $iscript)
echo '<input type="radio" name="choose" id="ch'.$id.'" value="'.$id.'" onclick="swap(\'moveright\', \'toolbar/tool_next.gif\')"'.(!$iscript['enabled'] ? ' disabled="true"' : '').'><span class="text"><label for="ch'.$id.'">'.$iscript['label'].'</label></span><br />'."\n";
?>
</td>
</tr>
</table>
</form>
<?php
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/import/step2.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/import/step3.php
===================================================================
--- trunk/admin/import/step3.php (revision 373)
+++ trunk/admin/import/step3.php (revision 374)
@@ -1,155 +1,155 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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";
//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");
//Set Section
$section = "in-portal:main_import";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$var = "?env=".BuildEnv();
if( isset($_POST['import_id']) ) $objSession->SetVariable('ImportScriptID', $_POST['import_id']);
$import_script = GetImportScript( $objSession->GetVariable('ImportScriptID') );
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
// Previous Button
$MouseOver = "swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut = "swap('moveleft', 'toolbar/tool_prev.gif');";
$link = $adminURL."/import/step2.php".$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
// Next Button
$MouseOver = "swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut = "swap('moveright', 'toolbar/tool_next.gif');";
$link2 = $adminURL."/import/step4.php".$var;
$onClick = "document.import_form.submit();";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),'#',$MouseOver,$MouseOut,$onClick,"tool_next.gif");
// Header
$title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 3";
int_header($objCatToolBar,NULL,$title);
?>
<form name="import_form" METHOD="POST" action='<?php echo $adminURL."/import/step4.php".$var ; ?>' >
<input type="hidden" name="Action" value="checkconn">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php int_subsection_title(admin_language("la_prompt_DatabaseSettings").' - '.$import_script['label']); ?>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo $import_script['field_prefix'].' '.admin_language("la_prompt_SqlType"); ?></span></td>
<td>
<select name="db_sql_type" style="width: 197px;">
<option value="mysql" selected>MySQL</option>
</select>
</td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo $import_script['field_prefix'].' '.admin_language("la_prompt_Server"); ?></span></td>
<td>
<input type="text" name="db_server" class="text" size="30" value="<?php echo $objSession->GetVariable("import_server"); ?>">
</td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo $import_script['field_prefix'].' '.admin_language("la_prompt_DbName"); ?></span></td>
<td>
<input type="text" name="db_db" class="text" size="30" value="<?php echo $objSession->GetVariable("import_db"); ?>">
</td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo $import_script['field_prefix'].' '.admin_language("la_prompt_DbUsername"); ?></span></td>
<td>
<input type="text" name="db_user" class="text" size="30" value="<?php echo $objSession->GetVariable("import_user"); ?>">
</td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo $import_script['field_prefix'].' '.admin_language("la_prompt_DbPass"); ?></span></td>
<td>
<input type="password" name="db_pass" class="text" size="30" value="<?php echo $objSession->GetVariable("import_pass"); ?>">
</td>
</tr>
<tr>
<td colspan="2"><span class="error"><?php echo $objSession->GetVariable("error_importing"); ?></span></td>
</tr>
</table>
</form>
<?php
int_footer();
?>
\ No newline at end of file
Property changes on: trunk/admin/import/step3.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/import/step4.php
===================================================================
--- trunk/admin/import/step4.php (revision 373)
+++ trunk/admin/import/step4.php (revision 374)
@@ -1,224 +1,224 @@
<?php
if(!strlen($pathtoroot))
{
- $path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
+ $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;
//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";
//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");
//Set Section
$section = "in-portal:main_import";
//Set Environment Variable
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
//check if the previous input is correct
if( $_POST["Action"] == 'checkconn')
{
// save supplied connection info
$objSession->SetVariable("import_sql_type", $_POST["db_sql_type"]);
$objSession->SetVariable("import_server", $_POST["db_server"]);
$objSession->SetVariable("import_db", $_POST["db_db"]);
$objSession->SetVariable("import_user", $_POST["db_user"]);
$objSession->SetVariable("import_pass", $_POST["db_pass"]);
$objSession->SetVariable("error_importing", '');
// get them for using here
$db_sql_type = $objSession->GetVariable("import_sql_type");
$db_server = $objSession->GetVariable("import_server");
$db_db = $objSession->GetVariable("import_db");
$db_user = $objSession->GetVariable("import_user");
$db_pass = $objSession->GetVariable("import_pass");
// check supplied connection
$linkconn = ADONewConnection($db_sql_type);
if( !$linkconn->PConnect($db_server, $db_user, $db_pass, $db_db) || !$db_server || !$db_db )
{
$objSession->SetVariable("error_importing","Error: The connection to the DB failed please check your settings");
header('Location: step3.php?'.$envar);
}
unset($linkconn);
}
$import_script = GetImportScript( $objSession->GetVariable('ImportScriptID') );
$var = "?env=".BuildEnv();
// Previous Button
$MouseOver = "swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut = "swap('moveleft', 'toolbar/tool_prev.gif');";
$link = $adminURL."/import/step3.php".$var;
$objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
// Next Button
$MouseOver = "swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut = "swap('moveright', 'toolbar/tool_next.gif');";
$formaction = $rootURL.$import_script['module'].'/'.$admin.'/import/'.$import_script['url'].'.php?'.$envar;
$onClick = "if( !CheckFinalForm('import_form') ) alert('Please fill in all of the fields'); else import_submit('import_form','$formaction'); ";
$objCatToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Step"),'#',$MouseOver,$MouseOut,$onClick,"tool_next.gif");
// Header
$title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 4";
int_header($objCatToolBar,NULL,$title);
?>
<form id="import_form" name="import_form" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>">
<input type="hidden" name="Action" value="m_save_import_config">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<?php int_subsection_title("Matching Fields - Intechnic In-Portal "); ?>
<!-- script common fields: begin -->
<?php
if( $import_script['id'] == 'in-link' )
{
?>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_AdminId"); ?></span></td>
<td>
<b><?php echo $objSession->GetVariable("user_admin_names"); ?></b>
<input type="hidden" name="user_admin" size="15" class="text" value="<?php echo $objSession->GetVariable("user_admin_values"); ?>">
<input type="hidden" name="grouplist1" value="<?php echo $objSession->GetVariable('grouplist1'); ?>">
<a href="#"><img src="../images/icon_users_sm.gif" style="cursor:hand;" border="0" onclick="OpenGroupSelector('<?php echo $envar; ?>&en=0&destform=import_form&destfield=grouplist1&Selector=radio');"></a>
</td>
</tr>
<?php
}
?>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_RegUserId"); ?></span></td>
<td>
<b><?php echo $objSession->GetVariable("user_regular_names"); ?></b>
<input type="hidden" name="user_regular" size="15" class="text" value="<?php echo $objSession->GetVariable("user_regular_values"); ?>">
<input type="hidden" name="grouplist2" value="<?php echo $objSession->GetVariable('grouplist2'); ?>">
<a href="#"><img src="../images/icon_users_sm.gif" style="cursor:hand;" border="0" onclick="OpenGroupSelector('<?php echo $envar; ?>&en=0&destform=import_form&destfield=grouplist2&Selector=radio');"></a>
</td>
</tr>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php
echo admin_language("la_prompt_InitImportCat");
$catid = $objSession->GetVariable('categoryid');
$path = prompt_language($objConfig->Get("Root_Name"));
if($catid > 0)
{
$c = $objCatList->GetItemByField('ResourceId', $catid);
$path .= "&gt;".$c->GetCachedNavBar();
}
?>
</td>
<td>
<b><?php echo $path; ?></b>
<input type="hidden" name="init_cat" size="15" class="text" value="<?php echo $objSession->GetVariable("categoryid"); ?>">
<a href="#"><img src="<?php echo $imagesURL; ?>/folder.gif" style="cursor:hand;" border="0" ONCLICK="OpenCatSelector('<?php echo $envar; ?>&source=inlinkimport4&continue_sess=1&destform=import_form&destfield=categorylist&Selector=radio');"></a>
<input type="hidden" name="categorylist" value="<?php echo $objSession->GetVariable('categorylist'); ?>">
</td>
</tr>
<!-- script common fields: end -->
<!-- script spefific fields: begin -->
<?php
if( $import_script['id'] == 'in-link' )
{
if( GetVar('link_image') ) $objSession->SetVariable('link_image', GetVar('link_image') );
?>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_Import_ImageName"); ?></span></td>
<td>
<input type="text" name="link_image" class="text" size="30" value="<?php echo $objSession->GetVariable('link_image'); ?>">
</td>
</tr>
<?php
}
if( $import_script['module'] == 'in-bulletin' )
{
if( GetVar('bb_prefix') ) $objSession->SetVariable('import_table_prefix', GetVar('bb_prefix') );
?>
<tr <?php echo int_table_color(); ?>>
<td width="60%" valign="top"><span class="text"><?php echo admin_language("la_prompt_Import_Prefix"); ?></span></td>
<td>
<input type="text" name="bb_prefix" class="text" size="30" value="<?php echo $objSession->GetVariable('import_table_prefix'); ?>">
</td>
</tr>
<?php
}
?>
<!-- script spefific fields: end -->
</table>
</form>
<?php
int_footer();
?>
Property changes on: trunk/admin/import/step4.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property

Event Timeline