Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 1, 6:30 PM

in-portal

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
Index: trunk/kernel/include/modules.php
===================================================================
--- trunk/kernel/include/modules.php (revision 35)
+++ trunk/kernel/include/modules.php (revision 36)
@@ -1,898 +1,897 @@
<?php
/* List of installed modules and module-specific variables
Copyright 2002, Intechnic Corporation, All rights reserved
*/
setcookie("CookiesTest", "1");
$ExtraVars = array();
function ParseEnv()
{
global $env, $var_list, $mod_prefix,$objSession, $SessionQueryString;
/* parse individual sections */
$env = isset($_GET['env']) ? $_GET['env'] : '';
if ($env == "")
{
$var_list["t"] = "index";
if(is_array($mod_prefix))
{
foreach($mod_prefix as $key => $value)
{
if(strlen($key))
{
$parser_name = $key . "_ParseEnv";
if(function_exists($parser_name))
{
@$parser_name();
}
}
}
}
}
else
{
$envsections = explode(":", $env);
foreach($mod_prefix as $key => $value)
{
if(strlen($key))
{
$parsed=FALSE;
$parser_name = $key . "_ParseEnv";
for($i=1; $i<sizeof($envsections); $i++)
{
$pieces = explode("-", $envsections[$i]);
if(substr($pieces[0],0,strlen($key))==$key)
{
$parsed=TRUE;
if(function_exists($parser_name))
{
$parser_name($envsections[$i]);
}
}
}
if(!$parsed)
{
if(function_exists($parser_name))
{
@$parser_name();
}
}
}
}
$req_vars = explode("-", $envsections[0]);
$sid = $req_vars[0];
if(!$SessionQueryString)
{
if(!strlen($sid) || $sid=="_")
{
if($sid != "_")
$sid = $_COOKIE["sid"];
}
else
$SessionQueryString = TRUE;
}
$var_list["sid"] = $sid;
$var_list["t"] = $req_vars[1];
if( isset($_GET['dest']) )
$var_list['dest'] = $_GET['dest'];
}
}
function LoadEnv()
{
global $env, $var_list, $mod_prefix,$objSession;
$env = $_GET["env"];
// echo "Loading Variables..<br>\n";
if ($env != "")
{
$envsections = explode(":", $env);
foreach($mod_prefix as $key => $value)
{
if(strlen($key))
{
$parsed=FALSE;
for($i=1; $i<sizeof($envsections); $i++)
{
$pieces = explode("-", $envsections[$i]);
if(substr($pieces[0],0,strlen($key))==$key)
{
$parsed=TRUE;
break;
}
}
if(!$parsed)
{
$parser_name = $key . "_LoadEnv";
//echo $parser_name;
if(function_exists($parser_name))
{
$parser_name();
}
}
else
{
$parser_name = $key . "_SaveEnv";
//echo $parser_name;
if(function_exists($parser_name))
{
$parser_name($envsections[$i]);
}
}
}
}
}
}
function BuildEnv()
{
global $var_list,$m_var_list, $var_list_update, $mod_prefix, $objSession, $objConfig,
$ExtraVars, $objThemes, $CurrentTheme, $SessionQueryString, $FrontEnd;
static $theme;
$env = "";
//echo "Query String: $SessionQueryString<br>\n";
if(($objConfig->Get("CookieSessions")==0 || !$FrontEnd || ($objConfig->Get("CookieSessions")==2 && $SessionQueryString==TRUE)))
{
if(!$objSession->UseTempKeys)
{
$sessionkey = $objSession->GetSessionKey();
}
else
$sessionkey = $objSession->Get("CurrentTempKey");
$env = $sessionkey;
}
$env .= "-";
if (isset($var_list_update["t"]))
{
if($var_list_update["t"]=="_referer_")
{
$var_list_update["t"] =$objSession->GetVariable("Template_Referer");
}
$t = $var_list_update["t"];
if(!is_numeric($t))
{
if(!is_object($theme))
$theme = $objThemes->GetItem($m_var_list["theme"]);
$id = $theme->GetTemplateId($t);
$var_list_update["t"] = $id;
}
$env .= $var_list_update["t"];
}
else
{
$t = $var_list["t"];
if(!is_numeric($t))
{
if(!is_object($theme))
$theme = $objThemes->GetItem($m_var_list["theme"]);
$id = $theme->GetTemplateId($t);
$t = $id;
}
$env .= $t;
}
if(is_array($mod_prefix))
{
foreach($mod_prefix as $key => $value)
{
$builder_name = $key . "_BuildEnv";
if(function_exists($builder_name))
$env .= $builder_name();
}
}
$extra = "";
$keys = array_keys($ExtraVars);
if(is_array($keys))
{
for($i=0;$i<count($keys);$i++)
{
$key = $keys[$i];
$e = "&".$key."=".$ExtraVars[$key];
$extra .= $e;
$e = "";
}
}
$env .= $extra;
return $env;
}
function CategoryActionFunc($basename,$CatList)
{
global $mod_prefix;
foreach($mod_prefix as $key => $value)
{
$function_name = $key."_".$basename;
if(function_exists($function_name))
{
$function_name($CatList);
}
}
}
function RegisterEnv($Var,$Value)
{
global $ExtraVars;
$ExtraVars[$Var] = $Value;
}
function UnregisterEnv($Var)
{
global $ExtraVars;
unset($ExtraVars[$Var]);
}
function ModuleTagPrefix($name)
{
global $modules_loaded;
$ret = "";
foreach($modules_loaded as $prefix=>$mod_name)
{
if($name==$mod_name)
{
$ret = $prefix;
break;
}
}
return $ret;
}
function ModuleEnabled($name)
{
global $template_path;
$a = array_keys($template_path);
if(in_array($name,$a))
return TRUE;
return FALSE;
}
function GetModuleArray($array_name="mod_prefix")
{
switch($array_name)
{
case "mod_prefix":
global $mod_prefix;
return $mod_prefix;
break;
case "admin":
global $mod_prefix, $modules_loaded;
$mod = array();
if(is_array($mod_prefix) && is_array($modules_loaded))
{
foreach ($mod_prefix as $key=>$value)
{
if(_ModuleLicensed($modules_loaded[$key]) || $key=="m")
{
$mod[$key] = $value;
}
}
}
return $mod;
break;
case "loaded":
global $modules_loaded;
return $modules_loaded;
break;
case "template":
global $template_path;
return $template_path;
case "rootcat":
global $mod_root_cats;
return $mod_root_cats;
break;
}
}
function admin_login()
{
global $objSession,$login_error, $objConfig,$g_Allow,$g_Deny;
//echo "<pre>"; print_r($objSession); echo "</pre>";
$env_arr = explode('-', $_GET['env']);
$get_session_key = $env_arr[0];
-
if(!$objSession->ValidSession() || ($objSession->GetSessionKey() != $get_session_key && $_POST['adminlogin'] != 1)) {
if ($_GET['expired'] == 1) {
$login_error = admin_language("la_text_sess_expired");
}
return FALSE;
//echo "Expired<br>";
}
-
+
if ($objSession->HasSystemPermission("ADMIN") == 1)
return TRUE;
if(count($_POST)==0 || $_POST["adminlogin"]!=1)
return FALSE;
$login=$_POST["login"];
$password = $_POST["password"];
if (strlen($login) && strlen($password))
{
if(!_IpAccess($_SERVER['REMOTE_ADDR'],$g_Allow,$g_Deny))
{
$login_error = admin_language("la_text_address_denied");
return FALSE;
}
$valid = $objSession->Login($login, md5($password));
$hasperm = ($objSession->HasSystemPermission("ADMIN") == 1);
if (($login=="root" || $hasperm) && $valid)
{
if(_ValidateModules())
{
return TRUE;
}
else
$login_error = "Missing or invalid In-Portal License";
}
else
{
if(!$hasperm && $valid)
{
$login_error = admin_language("la_text_nopermissions");
}
else
{
$login_error = admin_language("la_Text_Access_Denied");
}
return FALSE;
}
}
else
{
if(!strlen($login))
{
$login_error = admin_language("la_Text_Missing_Username");
}
else
if(!strlen($password))
$login_error = admin_language("la_Text_Missing_Password");
return FALSE;
}
}
#---------------------------------------------------------------------------
function _EnableCookieSID()
{
global $var_list, $objConfig;
if((!$_COOKIE["sid"] && $objConfig->Get("CookieSessions")>0 && strlen($var_list["sid"])<2 && !headers_sent())
|| strlen($_COOKIE["sid"])>0)
{
return TRUE;
}
else
return FALSE;
}
function _IsSpider($UserAgent)
{
global $robots, $pathtoroot;
$lines = file($pathtoroot."robots_list.txt");
if(!is_array($robots))
{
$robots = array();
for($i=0;$i<count($lines);$i++)
{
$l = $lines[$i];
$p = explode("\t",$l,3);
$robots[] = $p[2];
}
}
return in_array($UserAgent,$robots);
}
function _StripDomainHost($d)
{
$dotcount = substr_count($d,".");
if($dotcount==3)
{
$IsIp = TRUE;
for($x=0;$x<strlen($d);$x++)
{
if(!is_numeric(substr($d,$x,1)) && substr($d,$x,1)!=".")
{
$IsIp = FALSE;
break;
}
}
}
if($dotcount>1 && !$IsIp)
{
$p = explode(".",$d);
$ret = $p[count($p)-2].".".$p[count($p)-1];
}
else
$ret = $d;
return $ret;
}
function _MatchIp($ip1,$ip2)
{
$matched = TRUE;
$ip = explode(".",$ip1);
$MatchIp = explode(".",$ip2);
for($i=0;$i<count($ip);$i++)
{
if($i==count($MatchIp))
break;
if(trim($ip[$i]) != trim($MatchIp[$i]) || trim($ip[$i])=="*")
{
$matched=FALSE;
break;
}
}
return $matched;
}
function _IpAccess($IpAddress,$AllowList,$DenyList)
{
$allowed = explode(",",$AllowList);
$denied = explode(",",$DenyList);
$MatchAllowed = FALSE;
for($x=0;$x<count($allowed);$x++)
{
$ip = explode(".",$allowed[$x]);
$MatchAllowed = _MatchIp($IpAddress,$allowed[$x]);
if($MatchAllowed)
break;
}
$MatchDenied = FALSE;
for($x=0;$x<count($denied);$x++)
{
$ip = explode(".",$denied[$x]);
$MatchDenied = _MatchIp($IpAddress,$denied[$x]);
if($MatchDenied)
break;
}
$Result = (($MatchAllowed && !$MatchDenied) || (!$MatchAllowed && !$MatchDenied) ||
($MatchAllowed && $MatchDenied));
return $Result;
}
function _ValidateModules()
{
global $i_Keys, $objConfig, $g_License;
$lic = base64_decode($g_License);
_ParseLicense($lic);
$modules = array();
//echo "License: ".$lic."<br>";
$domain = _GetDomain();
//echo "Domain: ".$domain."<br>";
if(!_IsLocalSite($domain))
{
$domain = _StripDomainHost($domain);
//echo "New domain: $domain<br>";
//echo "<pre>"; print_r($i_Keys); echo "</pre>";
for($x=0;$x<count($i_Keys);$x++)
{
$key = $i_Keys[$x];
if(strlen(stristr($key["domain"],$domain)))
{
$modules = explode(",",$key["mod"]);
//echo "Modules: $modules";
}
}
if(count($modules)>0)
{
return TRUE;
}
}
else
return TRUE;
return FALSE;
}
function _ModuleLicensed($name)
{
global $i_Keys, $objConfig, $pathtoroot;
$vars = parse_ini_file($pathtoroot."config.php");
while($key = key($vars))
{
$key = "g_".$key;
global $$key;
$$key = current($vars); //variable variables
if(strlen($$key)>80)
{
$lic = base64_decode($$key);
}
next($vars);
}
//$lic = base64_decode($g_License);
_ParseLicense($lic);
$modules = array();
if(!_IsLocalSite(_GetDomain()))
{
for($x=0;$x<count($i_Keys);$x++)
{
$key = $i_Keys[$x];
if(strlen(stristr(_GetDomain(),$key["domain"])))
{
//echo "ok<br>";
$modules = explode(",",$key["mod"]);
}
}
if(in_array($name,$modules)) {
//echo "ok<br>";
return TRUE;
}
}
else {
return TRUE;
}
return FALSE;
}
function _GetDomain()
{
global $objConfig, $g_Domain;
if($objConfig->Get("DomainDetect"))
{
$d = $_SERVER['HTTP_HOST'];
}
else
$d = $g_Domain;
return $d;
}
function _keyED($txt,$encrypt_key)
{
$encrypt_key = md5($encrypt_key);
$ctr=0;
$tmp = "";
for ($i=0;$i<strlen($txt);$i++)
{
if ($ctr==strlen($encrypt_key)) $ctr=0;
$tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1);
$ctr++;
}
return $tmp;
}
function _decrypt($txt,$key)
{
$txt = _keyED($txt,$key);
$tmp = "";
for ($i=0;$i<strlen($txt);$i++)
{
$md5 = substr($txt,$i,1);
$i++;
$tmp.= (substr($txt,$i,1) ^ $md5);
}
return $tmp;
}
function LoadFromRemote()
{
return "";
}
function DLid()
{
global $lid;
echo $lid."\n";
die();
}
function _LoadLicense($LoadRemote=FALSE)
{
global $pathtoroot, $objConfig;
$f = $pathtoroot."intechnic.php";
if(file_exists($f))
{
$contents = file($f);
$data = base64_decode($contents[1]);
}
else
if($LoadRemote)
return $LoadFromRemote;
return $data;
}
function _VerifyKey($domain,$k)
{
$key = md5($domain);
$lkey = substr($key,0,strlen($key)/2);
$rkey = substr($key,strlen($key)/2);
$r = $rkey.$lkey;
if($k==$r)
return TRUE;
return FALSE;
}
function _ParseLicense($txt)
{
global $i_User, $i_Pswd, $i_Keys;
$data = _decrypt($txt,"beagle");
$i_Keys = array();
$lines = explode("\n",$data);
for($x=0;$x<count($lines);$x++)
{
$l = $lines[$x];
$p = explode("=",$l,2);
switch($p[0])
{
case "Username":
$i_User = $p[1];
break;
case "UserPass":
$i_Pswd = $p[1];
break;
default:
if(substr($p[0],0,3)=="key")
{
$parts = explode("|",$p[1]);
if(_VerifyKey($parts[0],$parts[1]))
{
unset($K);
$k["domain"]=$parts[0];
$k["key"]=$parts[1];
$k["desc"]=$parts[2];
$k["mod"]=$parts[3];
$i_Keys[] = $k;
}
}
break;
}
}
}
function _IsLocalSite($domain)
{
$localb = FALSE;
if(substr($domain,0,3)=="172")
{
$b = substr($domain,0,6);
$p = explode(".",$domain);
$subnet = $p[1];
if($p[1]>15 && $p[1]<32)
$localb=TRUE;
}
if($domain=="localhost" || $domain=="127.0.0.1" || substr($domain,0,7)=="192.168" ||
substr($domain,0,3)=="10." || $localb || strpos($domain,".")==0)
{
return TRUE;
}
return FALSE;
}
LogEntry("Loading Modules\n");
/* get the module list from the database */
$adodbConnection = GetADODBConnection();
$sql = "SELECT Name, Path, Var,TemplatePath, RootCat from ".GetTablePrefix()."Modules where Loaded=1 ORDER BY LoadOrder";
$rs = $adodbConnection->Execute($sql);
while($rs && !$rs->EOF)
{
$key = $rs->fields["Var"];
$mod_prefix[$key] = $rs->fields["Path"];
$modules_loaded[$key] = $rs->fields["Name"];
$name = $rs->fields["Name"];
$template_path[$name] = $rs->fields["TemplatePath"];
$mod_root_cats[$name] = $rs->fields["RootCat"];
// echo $key . "=". $modules_loaded[$key]."<br>\n";
$rs->MoveNext();
}
LogEntry("Loading Module Parser scripts\n");
/* for each module enabled, load up parser.php */
//foreach($mod_prefix as $key => $value)
$LogLevel++;
if(is_array($mod_prefix))
{
foreach($mod_prefix as $key => $value)
{
$mod = $pathtoroot . $value . "parser.php";
// LogEntry("Loading parser $mod \n");
require_once($mod);
}
}
$LogLevel--;
LogEntry("Finished Loading Module Parser scripts\n");
/*now each module gets a look at the environment string */
$SessionQueryString = FALSE;
if(!isset($FrontEnd)) $FrontEnd = false;
if($FrontEnd != 1)
$SessionQueryString = TRUE;
if(is_array($mod_prefix))
ParseEnv();
/* create the session object */
$ip = $_SERVER["REMOTE_ADDR"];
if ( !isset($var_list['sid']) ) $var_list['sid'] = '';
if ( !isset($_GET['env']) ) $_GET['env'] = '';
if(strlen($var_list["sid"])==0 && strlen($_GET["env"])>0 && $objConfig->Get("CookieSessions")==2)
{
if(_IsSpider($_SERVER["HTTP_USER_AGENT"]))
{
$UseSession = FALSE;
}
else
{
/* switch user to GET session var */
if (!$_COOKIE['sid']) {
$SessionQueryString = TRUE;
}
//else {
//$SessionQueryString = FALSE;
//}
$UseSession = TRUE;
}
}
else {
$UseSession = TRUE;
}
if($var_list["sid"]=="_")
$var_list["sid"]="";
/*setup action variable*/
$Action = isset($_REQUEST['Action']) ? $_REQUEST['Action'] : '';
if($Action=="m_logout")
{
$u = new clsUserSession($var_list["sid"] ,($SessionQueryString && $FrontEnd==1));
$u->Logout();
unset($u);
$var_list_update["t"] = "index";
$var_list["t"] = "";
$var_list["sid"]="";
setcookie("login","",time()-3600);
setcookie("sid","",time()-3600);
}
$CookieTest = isset($_COOKIE["CookiesTest"]) ? $_COOKIE["CookiesTest"] : '';
$HTTP_REFERER = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
if ( ($CookieTest == 1) || !strstr($HTTP_REFERER, $_SERVER['SERVER_NAME'].$objConfig->Get("Site_Path"))) {
$SessionQueryString = FALSE;
}
if ($FrontEnd != 1) {
$SessionQueryString = TRUE;
}
$objSession = new clsUserSession($var_list["sid"],($SessionQueryString && $FrontEnd==1));
if($UseSession)
{
if(!$objSession->ValidSession())
{
/* Get rid of Invalid Session and make a brand new one*/
// echo "Dumping Session ".$var_list["sid"]."<br>";
unset($var_list["sid"]);
$objSession->GetNewSession();
$var_list["sid"] = $objSession->GetSessionKey();
$var_list_update["sid"]=$objSession->GetSessionKey();
if(is_numeric($m_var_list["theme"]))
$objSession->SetThemeName($m_var_list["theme"]);
if($objConfig->Get("CookieSessions")>0 && !$SessionQueryString && !headers_sent())
setcookie("sid",$var_list["sid"]);
//echo "New Session: ".$objSession->GetSessionKey()."<br>\n";
if(isset($_COOKIE["login"]) && $Action != "m_logout" && $FrontEnd==1)
{
$parts = explode("|",$_COOKIE["login"]);
$username = $parts[0];
$pass = $parts[1];
$objSession->Login($username,$pass);
}
}
else
{ //echo "Update Session<br>";
if($objSession->Get("Language")!=$m_var_list["lang"])
{
$objSession->Set("Language",$m_var_list["lang"]);
}
$objSession->LoadSessionData();
$objSession->UpdateAccessTime();
$objSession->Update();
LoadEnv();
}
}
if(is_numeric($var_list["t"]))
{
if( !isset($CurrentTheme) ) $CurrentTheme = null;
if(!is_object($CurrentTheme))
$CurrentTheme = $objThemes->GetItem($m_var_list["theme"]);
$var_list["t"] = $CurrentTheme->GetTemplateById($var_list["t"]);
$objSession->Set("Theme",$CurrentTheme->Get("Name"));
}
/*create the global current user object */
$UserID=$objSession->Get("PortalUserId");
$objCurrentUser = new clsPortalUser($UserID);
$objLanguageCache = new clsLanguageCache($m_var_list["lang"]);
/* include each module's action.php script */
LogEntry("Loading Module action scripts\n");
## Global Referer Template
$_local_t = $var_list["t"];
if(is_array($mod_prefix))
{
foreach($mod_prefix as $key => $value)
{
if($FrontEnd==0 || !is_numeric($FrontEnd) || $FrontEnd==2)
{
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
if(_ModuleLicensed($modules_loaded[$key]))
{
$mod = $pathtoroot.$value."module_init.php";
if(file_exists($mod))
require_once($mod);
$mod = $pathtoroot . $value . "action.php";
if(file_exists($mod))
require_once($mod);
$mod = $pathtoroot . $value . "searchaction.php";
if(file_exists($mod))
require_once($mod);
}
}
if($FrontEnd==1 || $FrontEnd==2)
{
$mod = $pathtoroot.$value."module_init.php";
if(file_exists($mod))
require_once($mod);
$mod = $pathtoroot . $value . "frontaction.php";
if(file_exists($mod))
require_once($mod);
}
}
}
if( !isset($SearchPerformed) ) $SearchPerformed = false;
if($SearchPerformed == true) $objSearch->BuildIndexes();
LogEntry("Finished Loading Module action scripts\n");
?>
Property changes on: trunk/kernel/include/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/kernel/include/usersession.php
===================================================================
--- trunk/kernel/include/usersession.php (revision 35)
+++ trunk/kernel/include/usersession.php (revision 36)
@@ -1,1110 +1,1111 @@
<?php
class clsUserSession
{
//Common DB operation class variables
var $m_dirtyFieldsMap = array();
//Identity
var $m_SessionKey;
var $m_CurrentTempKey;
var $m_PrevTempKey;
//Required attributes
var $m_LastAccessed;
var $m_PortalUserId;
var $m_Language;
var $m_Theme;
var $m_GroupId;
var $adodbConnection;
var $m_Errors;
var $m_GroupList;
var $PermCache;
var $SysPermCache;
var $PermCacheGroups;
var $CurrentUser;
var $UseTempKeys;
function clsUserSession($id=NULL, $TempKeys=FALSE)
{
global $objConfig, $objLanguages, $objThemes, $m_var_list;
$this->m_Errors = new clsErrorManager();
$this->adodbConnection = GetADODBConnection();
$this->PermCache = array();
$this->PermCacheGroups ="";
$this->UseTempKeys = $TempKeys;
if(!$this->UseTempKeys || strlen($id)==0)
{
//echo "with cookies";
if( !isset($_SERVER['HTTP_REFERER']) ) $_SERVER['HTTP_REFERER'] = '';
+
if(strlen($id) && (strstr($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'].$objConfig->Get("Site_Path")) || $_GET['destform'] == 'popup' || $_GET['continue_sess'] == 1))
{
$this->Set("SessionKey",$id);
return $this->LoadFromDatabase($id);
}
else
{
$this->Set("PortalUserId", 0);
$this->Set("Language", $objLanguages->GetPrimary());
$ThemeId = $m_var_list["theme"];
$this->SetThemeName($ThemeId);
//$this->Set("Theme", $objConfig->Get("Default_Theme"));
$this->Set("GroupList",0);
$this->Set("SessionKey","");
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
}
}
else
{
//echo "without cookies";
return $this->LoadFromTempKey($id);
}
}
function CopyToNewSession()
{
$OldKey = $this->GetSessionKey();
$this->GetNewSession();
if($OldKey != $this->GetSessionKey())
{
$this->Set("PortalUserId",$this->Get("PortalUserId"));
$this->Set("GroupId",$this->Get("GroupId"));
$this->Set("GroupList",$this->Get("GroupList"));
$this->Set("Language",$this->Get("Language"));
$this->Set("tz",$this->Get("tz"));
$this->Set("LastAccessed",date("U"));
$this->Update();
}
}
function Get($name)
{
$var = "m_" . $name;
return isset($this->$var) ? $this->$var : '';
}
function Set($name, $value)
{
if (is_array($name))
{
for ($i=0; $i<sizeof($name); $i++)
{ $var = "m_" . $name[$i];
$this->$var = $value[$i];
$this->m_dirtyFieldsMap[$name[$i]] = $value[$i];
}
}
else
{
$var = "m_" . $name;
$this->$var = $value;
$this->m_dirtyFieldsMap[$name] = $value;
//echo "Set: $var = $value <br>\n";
}
}
function Validate()
{
$dataValid = true;
if(!isset($this->m_LastAccessed))
{
$this->m_Errors->AddError("error.fieldIsRequired",'LastAccessed',"","",get_class($this),"Validate");
$dataValid = false;
}
if(!isset($this->m_PortalUserId))
{
$this->m_Errors->AddError("error.fieldIsRequired",'PortalUserId',"","",get_class($this),"Validate");
$dataValid = false;
}
if(!isset($this->m_Language))
{
$this->m_Errors->AddError("error.fieldIsRequired",'Language',"","",get_class($this),"Validate");
$dataValid = false;
}
if(!isset($this->m_Theme))
{
$this->m_Errors->AddError("error.fieldIsRequired",'Theme',"","",get_class($this),"Validate");
$dataValid = false;
}
return $dataValid;
}
function Delete()
{
if(!isset($this->m_SessionKey))
{
$this->m_Errors->AddError("error.AppError",NULL,'Internal error: Delete requires set id',"",get_class($this),"Delete");
return false;
}
//Delete associated adata first
$sql = sprintf("DELETE FROM ".GetTablePrefix()."SessionData WHERE SessionKey = '%s'", $this->Get("SessionKey"));
$this->adodbConnection->Execute($sql);
$sql = sprintf("DROP TABLE %s%s_search",GetTablePrefix(), $this->Get("SessionKey"));
$this->adodbConnection->Execute($sql);
$sql = sprintf("DELETE FROM ".GetTablePrefix()."UserSession WHERE SessionKey = '%s'", $this->Get("SessionKey"));
$this->adodbConnection->Execute($sql);
if ($this->adodbConnection->Execute($sql) === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Delete");
return false;
}
$this->Set("SessionKey","");
$this->Set("SessionDataLoaded",false);
return true;
}
function Update()
{
global $objConfig;
//$this->Set("LastAccessed",date("U"));
$this->Set("IpAddress",$_SERVER["REMOTE_ADDR"]);
if(!isset($this->m_SessionKey))
{
$this->m_Errors->AddError("error.AppError",NULL,'Internal error: Update requires set id',"",get_class($this),"Update");
return false;
}
if(!is_numeric($this->Get("PortalUserId")))
{
$this->Set("PortalUserId",0);
}
if(!strlen($this->Get("GroupList")))
{
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
}
if(count($this->m_dirtyFieldsMap) == 0)
return true;
$sql = "UPDATE ".GetTablePrefix()."UserSession SET ";
$first = 1;
foreach ($this->m_dirtyFieldsMap as $key => $value)
{
if($first)
{
$sql = sprintf("%s %s=%s",$sql,$key,$this->adodbConnection->qstr($value));
$first = 0;
}
else
{
$sql = sprintf("%s, %s=%s",$sql,$key,$this->adodbConnection->qstr($value));
}
}
$sql = sprintf("%s WHERE SessionKey = '%s'",$sql, $this->Get("SessionKey"));
//echo $sql;
if ($this->adodbConnection->Execute($sql) === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Update");
return false;
}
return true;
}
function Create()
{
global $objConfig;
$this->Set("LastAccessed", time());
if(!is_numeric($this->Get("PortalUserId")))
{
$this->Set("PortalUserId",0);
}
if(!strlen($this->Get("GroupList")))
{
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
}
$sql = "INSERT INTO ".GetTablePrefix()."UserSession (";
$first = 1;
foreach ($this->m_dirtyFieldsMap as $key => $value)
{
if($first)
{
$sql = sprintf("%s %s",$sql,$key);
$first = 0;
}
else
{
$sql = sprintf("%s, %s",$sql,$key);
}
}
$sql = sprintf('%s ) VALUES (',$sql);
$first = 1;
foreach ($this->m_dirtyFieldsMap as $key => $value)
{
if($first)
{
$sql = sprintf("%s %s",$sql,$this->adodbConnection->qstr($value));
$first = 0;
}
else
{
$sql = sprintf("%s, %s",$sql,$this->adodbConnection->qstr($value));
}
}
$sql = sprintf('%s)',$sql);
//echo $sql."<br>\n";
if ($this->adodbConnection->Execute($sql) === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Create");
return false;
}
return true;
}
function LoadFromTempKey($id=NULL)
{
global $objLanguages, $objConfig,$m_var_list;
$referer = $_SERVER["HTTP_REFERER"];
//echo "Referer: $referer <br>\n";
if(strlen($referer) && strpos($referer,"env="))
{
$keystart = strpos($referer,"env=")+4;
$referer = substr($referer,$keystart);
$keyend = strpos($referer,"-");
$LastKey = substr($referer,0,$keyend);
if(strlen($LastKey))
{
$sql = "SELECT * FROM ".GetTablePrefix()."UserSession WHERE (CurrentTempKey = '$id' OR PrevTempKey='$id' OR CurrentTempKey='$LastKey' OR PrevTempKey='$LastKey') ";
}
else
$sql = "SELECT * FROM ".GetTablePrefix()."UserSession WHERE CurrentTempKey = '$id' AND PrevTempKey IS NULL";
}
else
$sql = "SELECT * FROM ".GetTablePrefix()."UserSession WHERE CurrentTempKey = '$id' AND PrevTempKey IS NULL";
$result = $this->adodbConnection->Execute($sql);
if ($result === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromDatabase");
return false;
}
$data = $result->fields;
if (is_array($data))
{
foreach($data as $field => $value)
{
$mname = "m_" . $field;
$this->$mname = $data[$field];
}
if($this->Get("CurrentTempKey")) {
$this->Set("PrevTempKey",$this->Get("CurrentTempKey"));
$this->UseTempKeys=TRUE;
}
if (!$this->Get("CurrentTempKey") || !strstr($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'].$objConfig->Get("Site_Path"))) {
//$this->Set("PrevTempKey",$this->Get("CurrentTempKey"));
//$this->Set("CurrentTempKey",$this->GetUniqueKey());
$this->UseTempKeys=FALSE;
$this->Set("PortalUserId", 0);
$this->Set("Language", $objLanguages->GetPrimary());
$ThemeId = $m_var_list["theme"];
$this->SetThemeName($ThemeId);
//$this->Set("Theme", $objConfig->Get("Default_Theme"));
$this->Set("GroupList",0);
$this->Set("SessionKey","");
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
}
//$this->UseTempKeys=TRUE;
$this->Update();
return true;
}
else
{
$this->Set("PortalUserId", 0);
$this->Set("Language", $objLanguages->GetPrimary());
$ThemeId = $m_var_list["theme"];
$this->SetThemeName($ThemeId);
//$this->Set("Theme", $objConfig->Get("Default_Theme"));
$this->Set("GroupList",0);
$this->Set("SessionKey","");
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
$this->Set("CurrentTempKey",$this->GetUniqueKey());
return false;
}
}
function LoadFromDatabase($id)
{
if(!isset($id))
{
$this->m_Errors->AddError("error.AppError",NULL,'Internal error: LoadFromDatabase id',"",get_class($this),"LoadFromDatabase");
return false;
}
$sql = sprintf("SELECT * FROM ".GetTablePrefix()."UserSession WHERE SessionKey = '%s'",$id);
$result = $this->adodbConnection->Execute($sql);
if ($result === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"LoadFromDatabase");
return false;
}
$data = $result->fields;
if (is_array($data))
{
foreach($data as $field => $value)
{
$mname = "m_" . $field;
$this->$mname = $data[$field];
}
return true;
}
else
{
return false;
}
}
function Login($userLogin, $userPassword)
{
global $expired, $objConfig;
if($userLogin=="root")
{
$rootpass = $objConfig->Get("RootPass");
if($rootpass!=$userPassword)
{
return FALSE;
}
else
{
if(!strlen($this->GetSessionKey()))
$this->GetNewSession();
$this->Set("PortalUserId",-1);
$this->Update();
return TRUE;
}
}
else
{
$pre = GetTablePrefix();
$sql = "SELECT *,MD5(".$pre."PortalUser.Password) as md5pw FROM ".$pre."PortalUser LEFT JOIN ".$pre."UserGroup USING (PortalUserId) "
."LEFT JOIN ".$pre."PortalGroup ON (".$pre."UserGroup.GroupId=".$pre."PortalGroup.GroupId)
WHERE
".$pre."PortalUser.Login='$userLogin' AND ".$pre."PortalUser.Status=1
AND (".$pre."PortalUser.Password='$userPassword' OR MD5(".$pre."PortalUser.Password)='$userPassword' OR ".$pre."PortalUser.Password='".md5($userPassword)."')
ORDER BY ".$pre."UserGroup.PrimaryGroup DESC, ".$pre."PortalGroup.Personal DESC";
//echo $sql."<br>\n";
$result = $this->adodbConnection->Execute($sql);
if ($result === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Login");
return false;
}
if($result->EOF)
return false;
}
if(!strlen($this->GetSessionKey()))
{
$this->GetNewSession();
}
$this->Set("PortalUserId", $result->fields["PortalUserId"]);
if(strlen($result->fields["tz"])>0)
$this->Set("tz",$result->fields["tz"]);
$PrimaryGroup=0;
$PersonalGroup=0;
$GroupList = array();
while($result && !$result->EOF)
{
$skipadd=0;
$g = $result->fields["GroupId"];
if($result->fields["PrimaryGroup"]==1)
{
$PrimaryGroup = $g;
$skipadd=1;
}
if($result->fields["Personal"]==1)
{
$PersonalGroup=$g;
$skipadd=0;
}
if(!$skipadd)
$GroupList[] = $g;
$result->MoveNext();
}
$extra_groups = implode(",",$GroupList);
if($PrimaryGroup)
$extra_groups = $PrimaryGroup.",".$extra_groups;
if($PersonalGroup)
{
$this->Set("GroupId",$PersonalGroup);
//$extra_groups .= ",".$PersonalGroup;
}
else
{
$this->Set("GroupId",$PrimaryGroup);
}
$this->Set("GroupList", $extra_groups);
$this->Set("LastAccessed",date("U"));
$this_login = $this->GetPersistantVariable("ThisLogin");
$this->SetPersistantVariable("LastLogin", $this_login);
$this->SetPersistantVariable("ThisLogin", time());
$this->ResetSysPermCache();
$this->PermCache = array();
$this->Update();
return true;
}
function Logout()
{
global $objConfig;
$this->Set("PortalUserId", 0);
$this->Set("GroupId", $objConfig->Get("User_GuestGroup"));
#$this->SetPersistantVariable("LastLogin", time());
$this->Set("GroupList",$objConfig->Get("User_GuestGroup"));
$this->Set("IpAddress",$_SERVER['REMOTE_ADDR']);
$this->DeleteSessionData($this->GetSessionKey());
$this->Update();
$this->Delete();
$this->ResetSysPermCache();
$this->PermCache = array();
}
function SetVariable( $variableName, $variableValue)
{
global $objConfig, $FrontEnd;
$objConfig->Set($variableName,$variableValue,2);
//if(!(int)$FrontEnd==1)
//{
$sessionkey = $this->GetSessionKey();
$sql = "SELECT * FROM ".GetTablePrefix()."SessionData WHERE VariableName='$variableName' AND SessionKey='$sessionkey'";
$rs = $this->adodbConnection->Execute($sql);
if($rs && !$rs->EOF)
{
$sql = "UPDATE ".GetTablePrefix()."SessionData SET VariableValue='$variableValue' WHERE VariableName='$variableName' AND SessionKey='$sessionkey'";
}
else
$sql = "INSERT INTO ".GetTablePrefix()."SessionData (VariableName,VariableValue,SessionKey) VALUES ('$variableName','$variableValue','$sessionkey')";
$this->adodbConnection->Execute($sql);
// echo "<BR>UPDATE: $sql<BR>";
//}
}
function SetPersistantVariable($variableName, $variableValue)
{
global $objConfig;
$userid = (int)$this->Get("PortalUserId");
if($userid > 0)
{
if(!is_object($this->CurrentUser))
$this->CurrentUser = $objUsers->GetItem($this->Get("PortalUserId"));
if(!$this->CurrentUser->VarsLoaded)
$this->CurrentUser->LoadPersistantVars();
$this->CurrentUser->SetPersistantVariable($variableName, $variableValue);
}
else
$this->SetVariable($variableName,$variableValue);
}
function GetPersistantVariable($variableName)
{
global $objConfig, $objUsers;
if(is_numeric($this->Get("PortalUserId")))
{
if(!is_object($this->CurrentUser))
$this->CurrentUser = $objUsers->GetItem($this->Get("PortalUserId"));
if(!$this->CurrentUser->VarsLoaded)
$this->CurrentUser->LoadPersistantVars();
$val = $this->CurrentUser->GetPersistantVariable($variableName);
}
if(!strlen($val))
$val = $objConfig->Get($variableName);
return $val;
}
function GetVariable($variableName)
{
global $objConfig;
return $objConfig->Get($variableName);
}
function LoadSessionData()
{
global $objConfig, $objUsers;
if(is_numeric($this->Get("PortalUserId")))
{
if(!is_object($this->CurrentUser))
$this->CurrentUser = $objUsers->GetItem($this->Get("PortalUserId"));
if(!$this->CurrentUser->VarsLoaded)
$this->CurrentUser->LoadPersistantVars();
$sql = "SELECT VariableName, VariableValue FROM ".GetTablePrefix()."SessionData where SessionKey='" . $this->Get("SessionKey") . "'";
//echo $sql."<br>\n";
$result = $this->adodbConnection->Execute($sql);
while ($result && !$result->EOF)
{
$data = $result->fields;
//echo "<PRE>"; print_r($data); echo "</PRE>";
$objConfig->Set($data["VariableName"],$data["VariableValue"],FALSE);
$result->MoveNext();
}
}
if((int)$this->GetPersistantVariable("Language"))
$this->Set("Language",$objConfig->Get("Language"));
$this->DeleteExpiredSessions();
return true;
}
function DeleteSessionData($key)
{
$sql = "DELETE FROM ".GetTablePrefix()."SessionData WHERE SessionKey='$key'";
$this->adodbConnection->Execute($sql);
}
function SaveSessionData()
{
global $objConfig;
//echo "Saving Session Data..<br>\n";
if($this->SessionEnabled())
{
$data = $objConfig->GetDirtySessionValues(2); //session data
//echo "<PRE>"; print_r($data); echo "</PRE>";
$sessionkey = $this->GetSessionKey();
foreach($data as $field=>$value)
{
$sql = "UPDATE ".GetTablePrefix()."SessionData SET VariableValue='$value' WHERE VariableName='$field' AND SessionKey='$sessionkey'";
$this->adodbConnection->Execute($sql);
//echo $sql."<br>\n";
if($this->adodbConnection->Affected_Rows()==0)
{
$sql = "INSERT INTO ".GetTablePrefix()."SessionData (VariableName,VariableValue,SessionKey) VALUES ('$field','$value','$sessionkey')";
$this->adodbConnection->Execute($sql);
}
// echo $sql."<br>\n";
}
}
}
function DeleteEditTables()
{
$tables = $this->adodbConnection->MetaTables();
$sql = "SHOW TABLES";
//echo "<PRE>";print_r($tables); echo "</PRE>";
for($i=0;$i<count($tables);$i++)
{
$t = strtoupper($tables[$i]);
$p = strtoupper(GetTablePrefix()."ses_ad");
$k = substr($t,0,strlen($p));
if($k == $p && strpos($t,"FD_")>0)
{
$key = "AD".strtoupper(substr($t,strlen($p),strpos($t,"FD_")-strlen($p)))."FD";
$sql = "SELECT * FROM ".GetTablePrefix()."UserSession WHERE SessionKey='$key'";
//echo $sql."<br>\n";
$rs = $this->adodbConnection->Execute($sql);
if(!$rs || $rs->EOF)
{
//echo "Dropping Table $tables[$i] <br>\n";
@$this->adodbConnection->Execute("DROP TABLE ".$tables[$i]);
}
}
}
}
function DeleteExpiredSessions()
{
global $objConfig;
$cutoff = time()-$objConfig->Get("SessionTimeout");
$thiskey = $this->GetSessionKey();
$sql = "SELECT SessionKey from ".GetTablePrefix()."UserSession WHERE LastAccessed<$cutoff AND SessionKey != '$thiskey'";
$result = $this->adodbConnection->Execute($sql);
$keys = array();
while ($result && !$result->EOF)
{
$keys[] = "SessionKey='" . $result->fields["SessionKey"] . "'";
$result->MoveNext();
}
if(count($keys)>0)
{
$keywhere = implode(" OR ", $keys);
$sql = "DELETE FROM ".GetTablePrefix()."SessionData WHERE $keywhere";
//echo $sql;
$this->adodbConnection->Execute($sql);
$this->adodbConnection->Execute("DELETE FROM ".GetTablePrefix()."UserSession WHERE LastAccessed<$cutoff");
$this->DeleteEditTables();
}
}
function SetSysPermCache()
{
unset($this->SysPermCache);
$GroupList = $this->Get("GroupList");
if(strlen($GroupList) && $GroupList !="0")
{
$this->SysPermCache = array();
$sql = "SELECT * FROM ".GetTablePrefix()."Permissions WHERE Type=1 AND PermissionValue=1 AND GroupId IN (".$GroupList.")";
//echo $sql."<br>\n";
$rs = $this->adodbConnection->Execute($sql);
while($rs && !$rs->EOF)
{
$val = $rs->fields["PermissionValue"];
if($val==1)
$this->SysPermCache[$rs->fields["Permission"]] = 1;
$PermList[] = $rs->fields["Permission"];
$rs->MoveNext();
}
if( isset($PermList) && count($PermList) > 0) // I think this is never issued (comment by Alex)
$this->SetVariable("SysPerm",implode(",",$PermList));
}
}
function GetSysPermCache()
{
$perms = trim($this->GetVariable("SysPerm"));
if(!strlen($perms))
{
$this->SetSysPermCache();
}
else
{
$p = explode(",",$perms);
$this->SysPermCache = array();
for($i=0;$i<count($p);$i++)
{
$n = $p[$i];
$this->SysPermCache[$n]=1;
}
}
}
function SysPermCacheLoaded()
{
return (isset($this->SysPermCache));
}
function ResetSysPermCache()
{
// echo "Resetting Perm Cache<br>\n";
$this->SetVariable("SysPerm","");
unset($this->SysPermCache);
//$this->SysPermCache=array();
}
function HasSystemPermission($PermissionName)
{
global $objGroups;
if($this->Get("PortalUserId")==-1 && ($PermissionName=="ADMIN" || $PermissionName=="LOGIN"))
return TRUE;
//echo "Looking up $PermissionName:".$this->Get("GroupList")."<br>\n";
//echo $this->Get("GroupList")." - ".$this->PermCacheGroups;
$GroupList = $this->Get("GroupList");
if(substr($GroupList,-1)==",")
{
$GroupList = substr($GroupList,0,-1);
$this->Set("GroupList",$GroupList);
}
if($this->Get("GroupList")!=$this->PermCacheGroups)
$this->ResetSysPermCache();
if(!$this->SysPermCacheLoaded())
{
//echo "Loading Perm Cache<br>\n";
$this->GetSysPermCache();
$this->PermCacheGroups = $this->Get("GroupList");
}
//echo "SysPerm $PermissionName: ". $this->SysPermCache[$PermissionName]."<br>\n";
return isset($this->SysPermCache[$PermissionName]) ? $this->SysPermCache[$PermissionName] == 1 : false;
}
function HasCatPermission($PermissionName,$CatId=NULL)
{
global $objCatList, $objUsers;
$PermSet =FALSE;
$Value = 0;
if($this->Get("PortalUserId")==-1)
return TRUE;
if(!strlen($PermissionName))
return FALSE;
$GroupList = $this->Get("GroupList");
if(substr($GroupList,-1)==",")
{
$GroupList = substr($GroupList,0,-1);
$this->Set("GroupList",$GroupList);
}
if(!strlen($this->Get("SessionKey")))
$this->Set("GroupId",0);
if(strlen(trim($GroupList)))
{
if(strlen($this->Get("GroupId")))
{
$GroupList = $this->Get("GroupId").",".$GroupList;
}
}
else
{
$GroupList = $this->Get("GroupId");
}
if($CatId == NULL)
{
$CatId = $objCatList->CurrentCategoryID();
}
$Cat = &$objCatList->GetCategory($CatId);
$Value="";
for($p=0;$p<count($this->PermCache);$p++)
{
$pItem = $this->PermCache[$p];
if($pItem["perm"]==$PermissionName && $pItem["cat"]==$CatId)
{
$Value=$pItem["value"];
break;
}
}
if(is_object($Cat) && !is_numeric($Value))
{
$Value = 0;
$CatList = $Cat->Get("ParentPath");
$CatList = substr($CatList,1,-1);
$CatList = str_replace("|",",",$CatList);
if(strlen($CatList))
{
$CatList ="0,".$CatList;
}
else
$CatList = "0";
$sql = "SELECT * FROM ".GetTablePrefix()."Permissions WHERE Permission LIKE '$PermissionName' AND CatId IN ($CatList) AND GroupId IN ($GroupList)";
// echo $sql."<br>\n";
$rs = $this->adodbConnection->Execute($sql);
$PermValue = array();
while($rs && !$rs->EOF)
{
$index = $rs->fields["CatId"];
if(!is_numeric($PermValue[$index]))
$PermValue[$index] = $rs->fields["PermissionValue"];
$rs->MoveNext();
}
$cats = array_reverse(explode(",",$CatList));
for($c=0;$c<count($cats);$c++)
{
$index = $cats[$c];
if(is_numeric($PermValue[$index]))
{
$Value = $PermValue[$index];
break;
}
}
$perm = array();
$perm["perm"] = $PermissionName;
$perm["cat"] = $CatId;
$perm["value"] = $Value;
array_push($this->PermCache, $perm);
}
//echo $GroupList." Has Permission $PermissionName = $Value<br>\n";
return $Value;
}
function HasCatPermInList($PermList,$CatId=NULL, $System=FALSE)
{
$value = 0;
if(strlen($PermList))
{
$plist = explode(",",$PermList);
$value=0;
for($p=0;$p<count($plist);$p++)
{
if($this->HasCatPermission($plist[$p]))
{
$value = 1;
break;
}
else
{
if($System)
{
if($this->HasSystemPermission($plist[$p]))
{
$value = 1;
break;
}
}
}
}
}
return $value;
}
function GetACLClause()
{
$GroupList = $this->Get("GroupList");
if(strlen($GroupList))
$Groups = explode(",",$GroupList);
$acl_where = "";
if(@count($Groups)>0 && is_array($Groups))
{
$acl_where = array();
for($i=0;$i<count($Groups);$i++)
{
$g = $Groups[$i];
if(strlen($g)>0)
$acl_where[] = "(FIND_IN_SET($g,acl) OR ((NOT FIND_IN_SET($g,dacl)) AND acl='')) ";
}
if(count($acl_where))
{
$acl_where = "(".implode(" OR ",$acl_where).")";
}
else
$acl_where = "(FIND_IN_SET(0,acl))";
}
else
$acl_where = "(FIND_IN_SET(0,acl))";
return $acl_where;
}
function GetEditTable($base_table)
{
$prefix = GetTablePrefix();
if(strlen($prefix))
{
if(substr($base_table,0,strlen($prefix))!=$prefix)
$base_table = $prefix.$base_table;
}
$table = $prefix."ses_".$this->GetSessionKey()."_edit_".$base_table;
//echo "Table: $table <br>\n";
return $table;
}
function GetSessionTable($base_table,$name)
{
$prefix = GetTablePrefix();
if(strlen($prefix))
{
if(substr($base_table,0,strlen($prefix))!=$prefix)
$base_table = $prefix.$base_table;
}
$table = $prefix."ses_".$this->GetSessionKey()."_".$name.$base_table;
//echo "Table: $table <br>\n";
return $table;
}
function GetSearchTable($base_table="")
{
$prefix = GetTablePrefix();
if(strlen($base_table))
{
if(strlen($prefix))
{
if(substr($base_table,0,strlen($prefix))!=$prefix)
$base_table = $prefix.$base_table;
}
$table = $prefix."ses_".$this->GetSessionKey()."_search_".$base_table;
}
else
$table = $this->GetSessionTable('Search',''); //$prefix."ses_".$this->GetSessionKey()."_search";
return $table;
}
function GetTotalSessions()
{
# $time = time() - 900;
$sql = "SELECT count(*) as SesCount FROM ".GetTablePrefix()."UserSession";
$result = $this->adodbConnection->Execute($sql);
if ($result === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"GetTotalSessions");
return false;
}
return $result->fields["SesCount"];
}
function Query_UserSession($whereClause,$orderByClause)
{
$resultSet = array();
$sql = "SELECT ".GetTablePrefix()."* FROM ".GetTablePrefix()."UserSession ";
if(isset($whereClause))
$sql = sprintf('%s WHERE %s',$sql,$whereClause);
if(isset($orderByClause))
$sql = sprintf('%s ORDER BY %s',$sql,$orderByClause);
$result = $this->adodbConnection->Execute($sql);
if ($result === false)
{
$this->m_Errors->AddError("error.DatabaseError",NULL,$this->adodbConnection->ErrorMsg(),"",get_class($this),"Query_UserSession");
return false;
}
while (!$result->EOF)
{
$item = new clsUserSession(NULL);
$item->Set("SessionKey",$result->fields["SessionKey"]);
$item->Set("LastAccessed", $result->fields["LastAccessed"]);
$item->Set("PortalUserId", $result->fields["PortalUserId"]);
$item->Set("Language", $result->fields["Language"]);
$item->Set("Theme" , $result->fields["Theme"]);
array_push($resultSet,$item);
$result->MoveNext();
}
return $resultSet;
}
function GetUniqueKey()
{
while(true)
{
/* create the new session key here */
mt_srand(100000000*(double)microtime());
$sessionId=strtoupper(sprintf("AD%xFD",mt_rand(100000000,999999999))); //9 digit hex session id
$query = "select SessionKey from ".GetTablePrefix()."UserSession ";
$query .= "where SessionKey='$sessionId' OR CurrentTempKey='$sessionId' OR PrevTempKey='$sessionId'";
$rs = $this->adodbConnection->Execute($query);
if($rs->EOF)
break;
if($i>100)
{
return "";
}
$i++;
}
//echo "Getting Unique Key: $sessionId<br>";
return $sessionId;
}
function GetNewSession()
{
global $sessionId, $objConfig, $objLanguages, $m_var_list;
$i=0;
if($this->Get("PortalUserId")>0 || $objConfig->Get("GuestSessions")==1)
{
//echo "Creating Session<br>\n";
$sessionId = $this->GetUniqueKey();
$this->Set("SessionKey", $sessionId);
$this->Set("CurrentTempKey",$sessionId);
if($m_var_list["lang"])
{
$this->Set("Language",$m_var_list["lang"]);
}
else
$this->Set("Language", $objLanguages->GetPrimary());
$this->SetThemeName();
//$this->Set("Theme", $objConfig->Get("Default_Theme"));
$this->UpdateAccessTime();
$this->Set("IpAddress", $_SERVER['REMOTE_ADDR'] );
$this->Create();
}
else
$this->Set("SessionKey","");
}
function SessionEnabled()
{
$res = FALSE;
$key = $this->GetSessionKey();
if(strlen($key)>0)
$res = TRUE;
return $res;
}
function GetSessionKey()
{
return $this->Get("SessionKey");
}
function SetThemeName($id=0)
{
global $objThemes;
if($id==0)
$id = $objThemes->GetPrimaryTheme();
$Theme = $objThemes->GetItem($id);
$name = $Theme->Get("Name");
$this->Set("Theme",$name);
//$this->Update();
}
function ValidSession($SessionKey=NULL)
{
global $objConfig;
$a = $this->Get("LastAccessed");
$cutoff = time()-$objConfig->Get("SessionTimeout");
//echo $a." ".$cutoff."<br>";
//$ip = ($_SERVER['REMOTE_ADDR'] == $this->Get("IpAddress"));
//echo $this->Get("IpAddress");
//$ip = TRUE;
if ($a < $cutoff) {
//$this->UpdateAccessTime();
}
return ($a >= $cutoff);
}
function UpdateAccessTime()
{
$now = time();
$this->Set("LastAccessed",$now);
}
function InSpamControl($ResourceId,$DataType=NULL)
{
static $ClearStat;
if(!$ClearStat)
$this->PurgeSpamControl();
$ClearStat=1;
if(strlen($DataType))
$DataType="'".$DataType."'";
$sql = "SELECT count(*) as SpamCount FROM ".GetTablePrefix()."SpamControl WHERE ItemResourceId=$ResourceId AND DataType=$DataType";
if($this->Get("PortalUserId")==0)
{
$sql .= " AND PortalUserId=0 AND IPaddress='".$_SERVER["REMOTE_ADDR"]."'";
}
else
{
$sql .= " AND PortalUserId=".$this->Get("PortalUserId");
}
$rs = $this->adodbConnection->Execute($sql);
$value = (int)$rs->fields["SpamCount"];
if($value>0)
{
return TRUE;
}
else
return FALSE;
}
function AddToSpamControl($ResourceId,$secstoexpire,$DataType=NULL)
{
$expire = adodb_date("U") + $secstoexpire;
if(strlen($DataType))
$DataType = "'".$DataType."'";
$sql = "INSERT INTO ".GetTablePrefix()."SpamControl (ItemResourceId,IPaddress,Expire,PortalUserId,DataType) VALUES (";
$sql .= $ResourceId.",'".$_SERVER["REMOTE_ADDR"]."',$expire,".$this->Get("PortalUserId").",$DataType)";
//echo $sql;
$this->adodbConnection->Execute($sql);
}
function PurgeSpamControl()
{
$sql = "DELETE FROM ".GetTablePrefix()."SpamControl WHERE Expire<".adodb_date("U");
$this->adodbConnection->Execute($sql);
}
}/* clsUserSession */
?>
Property changes on: trunk/kernel/include/usersession.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/include/style.css
===================================================================
--- trunk/admin/include/style.css (revision 35)
+++ trunk/admin/include/style.css (revision 36)
@@ -1,430 +1,436 @@
.CURRENT_PAGE {font-size:12px; background-color: #C4C4C4; font-family: verdana; font-weight:bold; padding-left:1px; padding-right:1px}
.NAV_URL {font-size:12px; color: #1F569A; font-family: verdana; font-weight:bold; }
.NAV_ARROW {font-size:12px; color: #1F569A; font-family: verdana; font-weight:normal; padding-left:3px; padding-right:3px}
.NAV_CURRENT_ITEM {font-size:12px; color:#666666; font-family: verdana; font-weight:normal; font-weight:bold; }
.priority {color: #ff0000; padding-left:1px; padding-right:1px; font-size:11px; }
.validation_error {
FONT-WEIGHT: bold;
FONT-SIZE: 12px;
FONT-FAMILY: verdana, arial;
TEXT-DECORATION: none;
color: red;
}
.checksection {
BORDER-RIGHT: 1px; BORDER-TOP: 1px; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 1px; BORDER-BOTTOM: 1px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #acacac
}
.text {
FONT-WEIGHT: normal; FONT-SIZE: 12px; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.small {
FONT-SIZE: 9px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.tab {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: verdana, arial, helvetica; TEXT-DECORATION: none
}
.tab2 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff; FONT-FAMILY: verdana, arial, helvetica; TEXT-DECORATION: none
}
.tab2:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: verdana, arial, helvetica; TEXT-DECORATION: none
}
.tab:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: verdana, arial, helvetica; TEXT-DECORATION: none
}
.tab_border {
BORDER-RIGHT: #000000 0px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 0px solid; BORDER-BOTTOM: #000000 0px solid
}
.table_tab {
FONT-WEIGHT: bold; FONT-SIZE: 20px; COLOR: #ffffff; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #666666; TEXT-DECORATION: none
}
.button {
FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND: url(../images/button_back.gif) #f9eeae repeat-x; COLOR: black; FONT-FAMILY: arial, verdana; TEXT-DECORATION: none
}
.button1 {
FONT-SIZE: 9px; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #a3d799
}
.button2 {
FONT-SIZE: 9px; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #fe8b7e
}
.button3 {
FONT-SIZE: 9px; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #999999
}
.buttonsmall {
FONT-SIZE: 9px; CURSOR: hand; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f9eeae
}
.toolbar {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f0f1eb
}
.actionborder_full {
BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.actiontitle {
FONT-SIZE: 8pt; COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #999999
}
.action_link {
FONT-SIZE: 10px; COLOR: black; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.action_link:hover {
FONT-SIZE: 10px; COLOR: #009ff0; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.pagenav {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #e0e0da
}
.navbar {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #006699; FONT-FAMILY: verdana, arial, sans-serif; TEXT-DECORATION: none
}
.navbar:hover {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #009ff0; FONT-FAMILY: verdana, arial, sans-serif; TEXT-DECORATION: none
}
.navbar_selected {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #ffffff; FONT-FAMILY: verdana, arial, sans-serif; BACKGROUND-COLOR: #006699; TEXT-DECORATION: none
}
.tablenav {
FONT-WEIGHT: bold;
FONT-SIZE: 14px;
COLOR: white;
FONT-FAMILY: verdana, arial;
BACKGROUND-COLOR: #73c4f5;
TEXT-DECORATION: none;
}
.tablenav_link {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: white; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.tablenav_link:hover {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ffcc00; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.selection {
BACKGROUND-COLOR: #c6d6ef
}
.error {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #ff0000; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.error2 {
FONT-WEIGHT: bold; FONT-SIZE: 7pt; COLOR: #ff0000; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.disabled_text {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #CCCCCC; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.marg {
MARGIN: 5px
}
.table_header_text {
MARGIN-BOTTOM: 2px; MARGIN-LEFT: 5px
}
.table_text {
PADDING-RIGHT: 8px; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; PADDING-TOP: 8px
}
.divider {
BACKGROUND-COLOR: #999999
}
.divider_tab {
BACKGROUND-COLOR: #999999
}
.admintitle, .admintitle-white {
FONT-WEIGHT: bold; FONT-SIZE: 20px; COLOR: #009ff0; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.admintitle-white {
color: #fff
}
.tabletitle {
FONT-WEIGHT: bold; FONT-SIZE: 17px; COLOR: white; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #73c4f5; TEXT-DECORATION: none
}
.subsectiontitle {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: white; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none; height: 24px
}
.subsectiontitle:hover {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ffcc00; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none
}
.columntitle {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: white; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none
}
.columntitle:hover {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #ffcc00; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none
}
.columntitle_small {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: white; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none
}
.columntitle_small:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffcc00; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #999999; TEXT-DECORATION: none
}
.permissions1 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #bb0000; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions1:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #bb0000; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions2 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #c8601a; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions2:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #c8601a; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions3 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ea8c00; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions3:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ea8c00; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions4 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #e6b800; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions4:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #e6b800; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions5 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #92bc2e; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions5:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #92bc2e; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions6 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #339900; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions6:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #339900; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.permissions1_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #bb0000; TEXT-DECORATION: none
}
.permissions2_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #c8601a; TEXT-DECORATION: none
}
.permissions3_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ea8c00; TEXT-DECORATION: none
}
.permissions4_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #e6b800; TEXT-DECORATION: none
}
.permissions5_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #92bc2e; TEXT-DECORATION: none
}
.permissions6_cell {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #339900; TEXT-DECORATION: none
}
.table_color1 {
FONT-WEIGHT: normal; FONT-SIZE: 14px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #f6f6f6; TEXT-DECORATION: none
}
.table_color2 {
FONT-WEIGHT: normal; FONT-SIZE: 14px; COLOR: black; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ebebeb; TEXT-DECORATION: none
}
.head_version {
PADDING-RIGHT: 5px; FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: white; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.form_note {
FONT-WEIGHT: normal; FONT-SIZE: 10px; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.tree_head {
FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: white; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.tree_head_credits {
FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: white; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
.tree_head_credits:hover {
FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: white; FONT-FAMILY: verdana, arial; TEXT-DECORATION: none
}
H1.selector {
FONT-WEIGHT: bold; FONT-SIZE: 18pt; FONT-FAMILY: Arial
}
BODY {
SCROLLBAR-FACE-COLOR: #009ffd; FONT-SIZE: 12px; SCROLLBAR-HIGHLIGHT-COLOR: #009ffd; SCROLLBAR-SHADOW-COLOR: #009ffd; COLOR: #000000; SCROLLBAR-3DLIGHT-COLOR: #333333; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #88d2f8; FONT-FAMILY: Verdana, Arial, Helvetica, Sans-serif; SCROLLBAR-DARKSHADOW-COLOR: #333333;
OVERFLOW-X: auto; OVERFLOW-Y: auto;
}
TD {
FONT-SIZE: 10pt; FONT-FAMILY: verdana,helvetica; TEXT-DECORATION: none
}
.tableborder {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.tableborder_full {
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
FONT-SIZE: 10pt;
BORDER-LEFT: #000000 1px solid;
BORDER-BOTTOM: #000000 1px solid;
FONT-FAMILY: Arial, Helvetica, sans-serif;
background-image: url(../images/tab_middle.gif);
background-repeat: repeat-x;
}
.header_left_bg {
background-image: url(../images/tabnav_left.jpg);
background-repeat: no-repeat;
}
.tableborder_full_a {
BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
A {
COLOR: #006699; TEXT-DECORATION: none
}
A:hover {
COLOR: #009ff0; TEXT-DECORATION: none
}
.control_link {font-size:12px; color: #1F569A; font-family: verdana; font-weight:bold; }
.control_link:hover {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #009ff0; FONT-FAMILY: verdana, arial
}
.header_link {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #003399; FONT-FAMILY: verdana, arial
}
.header_link:hover {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #009ff0; FONT-FAMILY: verdana, arial
}
.tree {
FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: helvetica, arial, verdana, helvetica; TEXT-DECORATION: none
}
.cat {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #003399; FONT-FAMILY: arial, helvetica, sans-serif
}
.cat:hover {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #009ff0; FONT-FAMILY: arial, helvetica, sans-serif
}
.catsub {
FONT-SIZE: 8pt; COLOR: #000090; FONT-FAMILY: arial, helvetica, sans-serif
}
.catsub:hover {
FONT-SIZE: 8pt; COLOR: #9d9ddc; FONT-FAMILY: arial, helvetica, sans-serif
}
.cat_no {
FONT-SIZE: 10px; COLOR: #707070; FONT-FAMILY: arial, verdana, sans-serif
}
.cat_desc {
FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: arial,verdana,sans-serif
}
.cat_new {
FONT-SIZE: 12px; VERTICAL-ALIGN: super; COLOR: blue; FONT-FAMILY: arial, verdana, sans-serif
}
.cat_pick {
FONT-SIZE: 12px; VERTICAL-ALIGN: super; COLOR: #009900; FONT-FAMILY: arial, helvetica, sans-serif
}
.cats_stats {
FONT-SIZE: 11px; COLOR: #707070; FONT-FAMILY: arial,verdana,sans-serif;
}
.cat_detail {
FONT-SIZE: 8pt; COLOR: #707070; FONT-FAMILY: arial,verdana,sans-serif
}
.cat_fullpath {
FONT-SIZE: 8pt; COLOR: #707070; FONT-FAMILY: arial,verdana,sans-serif
}
.action1 {
FONT-SIZE: 12px; COLOR: #006600; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action1:link {
FONT-SIZE: 12px; COLOR: #006600; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action1:unknown {
FONT-SIZE: 12px; COLOR: #006600; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action1:unknown {
FONT-SIZE: 12px; COLOR: #006600; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action1:hover {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action2 {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #990000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action2:link {
FONT-SIZE: 12px; COLOR: #990000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action2:unknown {
FONT-SIZE: 12px; COLOR: #990000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action2:unknown {
FONT-SIZE: 12px; COLOR: #990000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action2:hover {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action3 {
FONT-SIZE: 12px; COLOR: #a27900; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action3:link {
FONT-SIZE: 12px; COLOR: #a27900; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action3:unknown {
FONT-SIZE: 12px; COLOR: #a27900; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action3:unknown {
FONT-SIZE: 12px; COLOR: #a27900; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action3:hover {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action4 {
FONT-SIZE: 12px; COLOR: #800080; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action4:link {
FONT-SIZE: 12px; COLOR: #800080; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action4:unknown {
FONT-SIZE: 12px; COLOR: #800080; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action4:unknown {
FONT-SIZE: 12px; COLOR: #800080; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action4:hover {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action5 {
FONT-SIZE: 12px; COLOR: #0079a2; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action5:link {
FONT-SIZE: 12px; COLOR: #0079a2; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action5:unknown {
FONT-SIZE: 12px; COLOR: #0079a2; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action5:unknown {
FONT-SIZE: 12px; COLOR: #0079a2; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.action5:hover {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.hint {
FONT-SIZE: 12px; COLOR: #666666; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.hint_red {
FONT-SIZE: 10px; COLOR: #FF0000; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.tabTable {
background-color: #d7d7d7;
border-width: 1px;
border-style: solid;
border-color: black;
}
.navbar_link {
FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #006699; FONT-FAMILY: verdana, arial, sans-serif; TEXT-DECORATION: underline;
}
form{
display : inline;
}
.admintitle-white {
color: #fff
}
.tableborder {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.tableborder_full {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.tableborder_full_a {
BORDER-RIGHT: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif
}
.link
{
cursor: hand;
+}
+
+.help_box
+{
+ padding: 5px 10px 5px 10px;
+
}
\ No newline at end of file
Property changes on: trunk/admin/include/style.css
___________________________________________________________________
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/include/mainscript.php
===================================================================
--- trunk/admin/include/mainscript.php (revision 35)
+++ trunk/admin/include/mainscript.php (revision 36)
@@ -1,510 +1,514 @@
<?php
global $imagesURL,$objConfig,$adminURL,$rootURL, $en;
$group_select = $adminURL."/users/group_select.php";
$item_select = $adminURL."/relation_select.php";
$user_select = $adminURL."/users/user_select.php";
$cat_select = $adminURL."/cat_select.php";
$missing_edit = $adminURL."/config/missing_label_search.php";
$lang_Filter = language("la_Text_Filter");
$lang_View = language("la_Text_View");
$lang_Sort = language("la_Text_Sort");
$lang_Select = language("la_Text_Select");
$lang_Unselect = language("la_Text_Unselect");
$lang_Invert = language("la_Text_Invert");
$lang_PerPage = language("la_prompt_PerPage");
$lang_All = language("la_Text_All");
$lang_Asc = language("la_common_ascending");
$lang_Desc = language("la_common_descending");
$lang_Disabled = language("la_Text_Disabled");
$lang_Enabled = language("la_Text_Enabled");
$lang_Pending = language("la_Text_Pending");
$lang_Default = language("la_Text_Default");
$lang_CreatedOn = language("la_prompt_CreatedOn");
$lang_None = language("la_Text_None");
$lang_PerPage = language("la_prompt_PerPage");
$lang_Views = language("la_Text_Views");
$lang_URL = language("la_ColHeader_Url");
$lang_Status = language("la_prompt_Status");
$lang_Name = language("la_prompt_Name");
$lang_MoveDn = language("la_prompt_MoveDown");
$lang_MoveUp = language("la_prompt_MoveUp");
$lang_Delete = language("la_prompt_Delete");
$lang_Edit = language("la_prompt_Edit");
$errormsg = language("la_validation_AlertMsg");
$env2 = BuildEnv();
if(is_numeric($en))
{
$env2 = BuildEnv() . "&en=$en";
}
$editor_url = $adminURL."/editor/editor.php?env=$env2";
$email_url = $adminURL."/email/sendmail.php?env=$env2";
$phrase_edit = $adminURL."/config/edit_label.php?env=".$env2;
$submit_done = isset($_REQUEST['submit_done']) ? 1 : 0; // returns form submit status
$Cal = GetDateFormat();
if(strpos($Cal,"y"))
{
$Cal = str_replace("y","yy",$Cal);
}
else
$Cal = str_replace("Y","y",$Cal);
$Cal = str_replace("m","mm",$Cal);
$Cal = str_replace("n","m",$Cal);
$Cal = str_replace("d","dd",$Cal);
$format = GetStdFormat(GetDateFormat());
$yearpos = (int)DateFieldOrder($format,"year");
$monthpos = (int)DateFieldOrder($format,"month");
$daypos = (int)DateFieldOrder($format,"day");
$ampm = "false";
if($objConfig->Get("ampm_time")=="1")
{
$ampm = "true";
}
require_once($pathtoroot.$admin."/lv/js/js_lang.php");
print <<<END
<script type="text/javascript" src="$adminURL/lv/js/in-portal.js"></script>
<script language="Javascript">
var CurrentTab= new String();
var lang_Filter = "$lang_Filter";
var lang_Sort = "$lang_Sort";
var lang_Select = "$lang_Select";
var lang_Unselect = "$lang_Unselect";
var lang_Invert = "$lang_Invert";
var lang_PerPage = "$lang_PerPage";
var lang_All = "$lang_All";
var lang_Asc = "$lang_Asc";
var lang_Desc = "$lang_Desc";
var lang_Disabled = "$lang_Disabled";
var lang_Pending = "$lang_Pending";
var lang_Default = "$lang_Default";
var lang_CreatedOn = "$lang_CreatedOn";
var lang_View = "$lang_View";
var lang_Views = "$lang_Views";
var lang_None = "$lang_None";
var lang_PerPage = "$lang_PerPage";
var lang_Enabled = "$lang_Enabled";
var lang_URL = "$lang_URL";
var lang_Status = "$lang_Status";
var lang_Name = "$lang_Name";
var lang_Edit = "$lang_Edit";
var lang_Delete = "$lang_Delete";
var lang_MoveUp = "$lang_MoveUp";
var lang_MoveDn = "$lang_MoveDn";
var ampm = $ampm;
var listview_clear=1;
var CalDateFormat = "$Cal";
var yearpos = $yearpos;
var monthpos = $monthpos;
var daypos = $daypos;
var ErrorMsg = '$errormsg';
//en = $en
var rootURL = '$rootURL';
function clear_list_checkboxes()
{
var inputs = document.getElementsByTagName("INPUT");
for (var i = 0; i < inputs.length; i++)
if (inputs[i].type == "checkbox" && inputs[i].getAttribute("isSelector"))
{
inputs[i].checked=false;
}
}
function getRealLeft(el) {
xPos = el.offsetLeft;
tempEl = el.offsetParent;
while (tempEl != null) {
xPos += tempEl.offsetLeft;
tempEl = tempEl.offsetParent;
}
return xPos;
}
function getRealTop(el) {
yPos = el.offsetTop;
tempEl = el.offsetParent;
while (tempEl != null) {
yPos += tempEl.offsetTop;
tempEl = tempEl.offsetParent;
}
return yPos;
}
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, module_name){
// swaps toobar icons from kernel
// admin or from module specified
var ob = document.getElementById(imgid);
if(ob)
{
var s = src;
s = s.slice(0,4);
if(s=='http')
{
ob.src = src;
}
else
{
if(module_name == null)
ob.src = '$adminURL' + '/images/' + src;
else
{
ob.src = '$rootURL' + module_name + '/$admin/images/' + src;
}
}
}
}
function flip(val)
{
if (val == 0)
return 1;
else
return 0;
}
function config_val(field, val2,url){
//alert('Setting ' + field + ' to ' + val2);
if(url)
document.viewmenu.action=url;
document.viewmenu.Action.value = "m_SetVariable";
document.viewmenu.fieldname.value = field;
document.viewmenu.varvalue.value = val2;
document.viewmenu.submit();
}
function session_val(field, val2){
//alert('Setting ' + field + ' to ' + val2);
document.viewmenu.Action.value = "m_SetSessionVariable";
document.viewmenu.fieldname.value = field;
document.viewmenu.varvalue.value = val2;
document.viewmenu.submit();
}
function Submit_ListSearch(action)
{
f = document.getElementById('ListSearchForm');
s = document.getElementById('ListSearchWord');
if(f)
{
f.Action.value = action;
f.list_search.value = s.value;
f.submit();
}
}
function ValidTime(time_str)
{
var valid = true;
if( trim(time_str) == '' ) return true; // is valid in case if not entered
time_str = time_str.toUpperCase();
parts = time_str.split(/\s*[: ]\s*/);
hour = parseInt(parts[0]);
minute = parseInt(parts[1]);
sec = parseInt(parts[2]);
if(ampm == true)
{
amstr = parts[3];
var am_valid = (amstr == 'AM' || amstr == 'PM');
if(am_valid && hour > 12) valid = false;
if(amstr == 'PM' && hour <= 12) hour = hour + 12;
if(hour == 24) hour = 0;
if(!am_valid) valid = false;
}
valid = valid && (hour > -1 && hour < 24);
valid = valid && (minute > -1 && minute < 60);
valid = valid && (sec > -1 && sec < 60);
return valid;
}
function DaysInMonth(month,year)
{
timeA = new Date(year, month,1);
timeDifference = timeA - 86400000;
timeB = new Date(timeDifference);
return timeB.getDate();
}
function ValidDate(date_str)
{
var valid = true;
if( trim(date_str) == '' ) return true; // is valid in case if not entered
parts = date_str.split(/\s*\D\s*/);
year = parts[yearpos-1];
month = parts[monthpos-1];
day = parts[daypos-1];
valid = (year>0);
valid = valid && ((month>0) && (month<13));
valid = valid && (day<DaysInMonth(month,year)+1);
return valid;
}
function trim(str)
{
return str.replace(/(^\s*)|(\s*$)/g,'');
}
function ValidateNumber(aValue, aNumberType)
{
var valid = true;
if( trim(aValue) == '' ) return true;
return (parseInt(aValue) == aValue);
}
function OpenEditor(extra_env,TargetForm,TargetField)
{
var url = '$editor_url';
url = url+'&TargetForm='+TargetForm+'&TargetField='+TargetField+'&destform=popup';
if(extra_env.length>0)
url = url+extra_env;
window.open(url,"html_edit","width=800,height=575,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}
function BitStatus(Value,bit)
{
var val = Math.pow(2,bit);
if((Value & val))
{
return 1;
}
else
return 0;
}
function FlipBit(ValueName,Value,bit)
{
var val = Math.pow(2,bit);
//alert("Setting bit "+bit);
if(BitStatus(Value,bit))
{
Value = Value - val;
}
else
Value = Value + val;
session_val(ValueName,Value);
}
function PerPageSelected(Value,PageCount)
{
if(Value==PageCount)
{
return 2;
}
else
return 0;
}
function RadioIsSelected(Value1,Value2)
{
if(Value1 == Value2)
{
return 2;
}
else
return 0;
}
function OpenItemSelector(envstr)
{
//alert(envstr);
window.open('$item_select?'+envstr,"groupselect","width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}
function OpenUserSelector(CheckIdField,Checks,envstr)
{
if(Checks) var retval = Checks.getItemList();
f = document.getElementById('userpopup');
if(f)
{
if(CheckIdField)
f.elements[CheckIdField].value = retval;
}
SessionPrepare('$user_select', envstr, 'userselect');
}
function SessionPrepare(url, get_str, window_name)
{
var params = ExtractParams(get_str);
if(params['destform'])
{
if(params['destform'] == 'popup')
{
CreatePopup(window_name, url + '?' + get_str);
return true;
}
else
var frm = CreateFakeForm();
}
else
var frm = CreateFakeForm();
if(!frm) return false;
frm.destform.value = params['destform'];
params['destform'] = 'popup';
get_str = MergeParams(params);
CreatePopup(window_name);
frm.target = window_name;
frm.method = 'POST';
frm.action = url + '?' + get_str;
frm.submit();
}
function addField(form, type, name, value)
{
// create field in form
var field = document.createElement("INPUT");
field.type = type;
field.name = name;
field.id = name;
field.value = value;
form.insertBefore(field, form.nextSibling);
}
function CreateFakeForm()
{
if($submit_done == 0)
{
var theBody = document.getElementsByTagName("BODY");
if(theBody.length == 1)
{
var frm = document.createElement("FORM");
frm.name = "fake_form";
frm.id = "fake_form";
frm.method = "post";
theBody[0].insertBefore(frm, theBody[0].nextSibling);
addField(frm, 'hidden', 'submit_done', 1);
addField(frm, 'hidden', 'destform', '');
return document.getElementById('fake_form');
}
}
return false;
}
-function CreatePopup(window_name, url)
+function CreatePopup(window_name, url, width, height)
{
// creates a popup window & returns it
- if(url == null) url = '';
- return window.open(url,window_name,'width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no');
+ 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');
+ CreatePopup('HelpPopup','$rootURL$admin/help/blank.html', null, 600);
frm.target = 'HelpPopup';
frm.submit();
}
function ExtractParams(get_str)
{
// extract params into associative array
var params = get_str.split('&');
var result = Array();
var temp_var;
var i = 0;
var params_count = params.length;
while(i < params_count)
{
temp_var = params[i].split('=');
result[temp_var[0]] = temp_var[1];
i++;
}
return result;
}
function MergeParams(params)
{
// join splitted params into GET string
var key;
var result = '';
for(key in params)
result += key + '=' + params[key] + '&';
if(result.length) result = result.substring(0, result.length - 1);
return result;
}
function show_props(obj, objName)
{
var result = "";
for (var i in obj) {
result += objName + "." + i + " = " + obj[i] + "\\n";
}
return result;
}
function OpenGroupSelector(envstr)
{
//alert(envstr);
SessionPrepare('$group_select', envstr, 'groupselect');
//window.open('$group_select?'+envstr,"groupselect","width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}
function OpenCatSelector(envstr)
{
//alert(envstr);
window.open('$cat_select?'+envstr,"catselect","width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}
function openEmailPopup(envar,form,Checks)
{
var email_url='$email_url';
var url = email_url+envar;
if(Checks.itemChecked())
{
f = document.getElementById(form);
if(f)
{
window.open('',"sendmail","width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
f.idlist.value = Checks.getItemList();
f.submit();
}
}
}
function OpenPhraseEditor(extra_env)
{
//SessionPrepare('$phrase_edit', extra_env, 'phrase_edit');
var url = '$phrase_edit'+extra_env+'&destform=popup';
window.open(url,"phrase_edit","width=750,height=400,status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}
var env = '$env2';
var SubmitFunc = false;
</script>
END;
?>
Property changes on: trunk/admin/include/mainscript.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/include/elements.php
===================================================================
--- trunk/admin/include/elements.php (revision 35)
+++ trunk/admin/include/elements.php (revision 36)
@@ -1,563 +1,607 @@
<?php
##############################################################
##In-portal :: Administration Interfaces :: Common Elements ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
if( !isset($is_install) ) $is_install = false;
if(!$is_install)
{
if (!admin_login())
{
if(!headers_sent()) {
setcookie("sid"," ",time()-3600);
echo "Test";
}
$objSession->Logout();
header("Location: ".$adminURL."/login.php");
die();
//require_once($pathtoroot."admin/login.php");
}
}
global $admin,$pathtoroot, $objConfig;
if(!strlen($admin))
{
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
{
$admin = "admin";
}
}
require_once($pathtoroot.$admin."/include/sections.php");
$envar = "env=" . BuildEnv();
/* this function loads the javascript for each module's toolbar */
function load_module_javascript($sectionname)
{
global $adminURL, $pathtoroot;
echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/browse/fw_menu.js\"></SCRIPT>\n";
echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/include/tabs.js\"></SCRIPT>\n";
echo "<script language=\"JavaScript1.2\" src=\"$adminURL/include/checkarray.js\"></script>\n";
global $objConfig, $ItemTabs;
$m = GetModuleArray("admin");
echo "<!-- ".count($m)."-->";
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/toolbar/".$sectionname.".php";
if(file_exists($path))
{
echo "\n<!-- $path -->\n";
include_once($path);
}
else
echo "\n<!-- $path not found -->\n";
}
}
function load_module_styles()
{
global $objConfig, $ItemTabs,$rootURL,$pathtoroot;
$m = GetModuleArray("admin");
echo "<!-- module styles (".count($m).")-->";
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/style.css";
if(file_exists($path))
{
$inc = $rootURL.$value."admin/include/style.css";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$inc\">\n";
}
}
}
//***********************************
//Page Header
function int_header($toolbar=NULL,$NavBarText=NULL,$ExtraTitle=NULL,$onLoad=NULL, $ExtraHead=NULL)
{
global $pathtoroot;
global $pathtolocal;
global $section;
global $objSections;
global $rootURL;
global $localURL;
global $adminURL;
global $envar;
global $admin;
global $metatag;
$style_sheet_global = $adminURL."/include/style.css";
$style_sheet_local = $localURL."admin/include/style.css";
$ExtraTitle = htmlentities($ExtraTitle);
if (is_object($toolbar))
{
if(file_exists($pathtolocal."admin/include/toolbar.php"))
require_once ($pathtolocal."admin/include/toolbar.php");
//Aray of the preloaded elems
//$int_toolbar_preload = array();
print "<html><head><title>In-portal</title>\n";
if(strlen($metatag))
{
print $metatag."\n";
}
else
{
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">\n";
print "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n";
}
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n";
load_module_styles();
require_once($pathtoroot.$admin."/include/mainscript.php");
//require_once($pathtolocal."admin/include/script.js");
print $ExtraHead;
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname);
if(is_object($toolbar))
print $toolbar->GetInitScript();
print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\"";
//*** Preload toolbar images
if(strlen($onLoad))
{
print $onLoad;
}
else
print " ONLOAD=\"clear_list_checkboxes();\"";
//*** Preload toolbar images
if(is_object($toolbar))
{
if (strlen($toolbar->Get("CheckClass")))
{
print $toolbar->onLoadString().">";
}
else
print " >";
$menufunc = $toolbar->Get("load_menu_func");
if (strlen($menufunc))
{
print "<script language=\"JavaScript1.2\">$menufunc</script>";
}
}
else
print " >";
}
else
{
print "<html><head><title>In-Portal </title>";
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">";
print "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">";
load_module_styles();
require_once ($pathtoroot.$admin."/include/mainscript.php");
//require_once ($pathtolocal."admin/include/script.js");
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname);
print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">";
}
if(strlen($section)>0)
{
$objSections->SetCurrentSection($section);
$sec = $objSections->GetCurrentSection();
if ($sec->Get("notitle") != 1) print $objSections->page_title();
print $objSections->page_tabs($envar);
if ($sec->Get("nonavbar") != 1) //Section Navigatior
print $objSections->section_header($envar,$NavBarText,$ExtraTitle);
//Toolbar if appropriate
if ( isset($sections[$section]) && ($sections[$section]['toolbar']==1) || ( is_object($toolbar) ) )
print $toolbar->Build();
}
}//Page Header
+// HELP Page Header
+function int_help_header()
+{
+ global $pathtoroot;
+ global $pathtolocal;
+ global $section;
+ global $objSections;
+ global $rootURL;
+ global $localURL;
+ global $adminURL;
+ global $envar;
+ global $admin;
+ global $metatag;
+
+ $style_sheet_global = $adminURL."/include/style.css";
+ $style_sheet_local = $localURL."admin/include/style.css";
+
+ $ExtraTitle = htmlentities($ExtraTitle);
+
+ // TOOLBAR:
+ print "<html><head><title>In-Portal - Help</title>";
+ print "<meta http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">";
+ print "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
+ print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">";
+ load_module_styles();
+ require_once ($pathtoroot.$admin."/include/mainscript.php");
+
+ print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">";
+
+
+ if(strlen($section)>0)
+ {
+ $objSections->SetCurrentSection($section);
+ $sec = $objSections->GetCurrentSection();
+
+ if ($sec->Get("notitle") != 1) print $objSections->page_title();
+
+ if ($sec->Get("nonavbar") != 1) //Section Navigatior
+ print $objSections->section_header($envar,$NavBarText,$ExtraTitle, true);
+
+ }
+}// HELP Page Header
+
+
function int_SectionHeader($toolbar=NULL,$onLoad=NULL,$NavBarText=NULL,$ExtraTitle=NULL)
{
global $pathtoroot;
global $pathtolocal;
global $section, $sections;
global $objSections;
global $rootURL;
global $adminURL,$admin;
global $localURL;
global $envar;
global $b_topmargin;
if (!isset($b_topmargin))
$b_topmargin = 8;
$sectionname = explode(":", $section);
$sectionname = $sectionname[sizeof($sectionname)-1];
load_module_javascript($sectionname);
if(is_object($toolbar))
print $toolbar->GetInitScript();
print "</head><body topmargin=\"$b_topmargin\" leftmargin=\"8\" marginheight=\"$b_topmargin\" marginwidth=\"8\" bgcolor=\"#FFFFFF\"";
//*** Preload toolbar images
if(strlen($onLoad))
{
print $onLoad;
}
else
print " onload=\"if (clear_checkboxes) clear_checkboxes();\"";
print ">";
global $b_header_addon;
if (isset($b_header_addon)) echo $b_header_addon;
if(strlen($section)>0)
{
$objSections->SetCurrentSection($section);
$sec = $objSections->GetCurrentSection();
if ($sec->Get("notitle")!=1)
print $objSections->page_title();
print $objSections->page_tabs($envar);
//Section Navigatior
if ($sec->Get("nonavbar")!=1)
{
if (is_null($ExtraTitle))
$ExtraTitle = "";
print $objSections->section_header($envar,$NavBarText,$ExtraTitle);
}
//Toolbar if appropriate
if( isset($sections[$section]) )
if($sections[$section]['toolbar'] == 1 || (is_object($toolbar)) )
print $toolbar->Build();
}
}//Section Page Header
//***********************************
//SubSection Title
function int_subsection_title($caption)
{
int_table_color(1);
print <<<END
<!-- Subsection Title -->
<tr class="subsectiontitle">
<td colspan="5">$caption</td>
</tr>
END;
}
function int_subsection_title_install($caption)
{
int_table_color(1);
print <<<END
<!-- Subsection Title -->
<tr class="subsectiontitle">
<td colspan="3">$caption</td>
</tr>
END;
}
function int_subsection_title_ret($caption)
{
int_table_color_ret(1);
$o = "<!-- Subsection Title --><tr class=\"subsectiontitle\"><td colspan=\"5\">$caption</td></tr>";
return $o;
}
//SubSection Title
//***********************************
//Table Alternating colors
function int_table_color($reset_color=0)
{
static $colorset;
if($reset_color)
{ $colorset="table_color2";
return;
}
if ($colorset == "table_color1")
$colorset = "table_color2";
else
$colorset = "table_color1";
print "class=\"".$colorset."\"";
}//Table Alternating colors
//Table Alternating colors with return
function int_table_color_ret($reset_color=0)
{
static $colorset;
if($reset_color)
{ $colorset="table_color2";
return;
}
if ($colorset == "table_color1")
$colorset = "table_color2";
else
$colorset = "table_color1";
return "class=\"".$colorset."\"";
}//Table Alternating colors
//***********************************
//Hint
function int_hint($caption)
{
global $imagesURL;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<span class="hint"><img src="$imagesURL/smicon7.gif" width="14" height="14" align="absmiddle">$caption</span>
<td>
</tr>
</table>
END;
}//Hint
function int_hint_red($caption)
{
global $imagesURL;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<span class="hint_red">$caption</span>
<td>
</tr>
</table>
END;
}//Hint
//***********************************
//Navigation String
function int_nav($caption)
{
global $pathtoroot;
global $imagespath;
print <<<END
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#f0f0f0">
<tr>
<td><b class="text"><span class="navbar"><a class="navbar" href="">$caption</a></span></b></td>
</tr>
</table>
END;
}//Navigation String
//***********************************
//Print Out Images
function int_img($img)
{
global $images;
global $pathtoroot;
global $imagesURL;
$src = $imagesURL."/".$images[$img]['file'];
$alt = $images[$img]['alt'];
$width = $images[$img]['width'];
$height = $images[$img]['height'];
$name = $img;
//Set ID if needed
if ($img == 'img:tool:view')
$id = "ID=\"viewbutton\"";
print "<img alt=\"$alt\" name=\"$name\" src=\"$src\" width=\"$width\" height=\"$height\" $id border=\"0\" align=\"absmiddle\">";
}//Print Out Images
//***********************************
//Page Footer
function int_footer()
{
global $objSession;
if($objSession->HasSystemPermission("DEBUG.INFO"))
{
//phpinfo();
}
print <<<END
</body>
</html>
END;
}//Page Footer
function HomeEnv()
{
global $m_var_list_update;
$m_var_list_update["cat"]=0;
return BuildEnv();
}
function UpEnv()
{
global $m_var_list_update,$objCatList;
$current = $objCatList->CurrentCat();
$parent = $current->Get("ParentId");
$m_var_list_update["cat"]=$parent;
return BuildEnv();
}
function ModuleInclude($file)
{
global $pathtoroot;
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value.$file;
if(file_exists($path))
{
echo "<!-- $path -->";
@include_once($path);
}
}
}
function MultiEditButtons(&$ToolBar,$next,$prev,$Form,$StatusField, $url,$onClick, $ExtraVar="", $prev_phrase = 'Phrase Not Passed', $next_phrase = 'Phrase Not Passed')
{
global $adminURL;
$ToolBar->Add("divider");
if($prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$var="env=".BuildEnv()."&en=$prev&lpn=".$_REQUEST['lpn'];
if (strlen($ExtraVar))
$var.= $ExtraVar;
if ($onClick != 'LangSubmitMove') {
$link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');";
}
else {
$link = "javascript:$onClick('$url', '$prev')";
}
$ToolBar->Add("moveleft",$prev_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
//$onClick="";
$link="#";
$ToolBar->Add("moveleft",$prev_phrase,"#","","","","toolbar/tool_prev_f3.gif");
}
if($next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$var="env=".BuildEnv()."&en=$next".( isset($_REQUEST['lpn']) ? '&lpn='.$_REQUEST['lpn'] : '');
if (strlen($ExtraVar))
$var.= $ExtraVar;
if ($onClick != 'LangSubmitMove') {
$link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');";
}
else {
$link = "javascript:$onClick('$url', '$next')";
}
$ToolBar->Add("moveright",$next_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_next.gif");
}
else
{
$ToolBar->Add("moveright",$next_phrase,"#","","","","toolbar/tool_next_f3.gif");
}
}
function InsertButtons(&$ToolBar, $Buttons = Array(), $params = Array() )
{
foreach($Buttons as $button)
switch($button)
{
case 'save':
$ToolBar->Add( "img_save", "la_Save", "#",
"swap('img_save','toolbar/tool_select_f2.gif');",
"swap('img_save', 'toolbar/tool_select.gif');",
"edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',1,'&lpn=".$_REQUEST['lpn']."');","tool_select.gif");
break;
case 'cancel':
$ToolBar->Add( "img_cancel", "la_Cancel", "#",
"swap('img_cancel','toolbar/tool_cancel_f2.gif');",
"swap('img_cancel', 'toolbar/tool_cancel.gif');",
"edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',2,'&lpn=".$_REQUEST['lpn']."');","tool_cancel.gif");
break;
case 'edit':
break;
case 'delete':
break;
}
}
function GetTitle($item_phrase, $tab_phrase, $id)
{
// gets correct caption for editing windows with tabs
//echo "In: $item_phrase, $tab_phrase, $id";
$is_new = ($_REQUEST['new'] == 1) ? 1 : 0;
$text = $is_new ? 'la_Text_Adding' : 'la_Text_Editing';
$text = admin_language($text).' '.admin_language($item_phrase);
if($is_new == 0) $text .= ' #'.$id;
$text .= ' - '.admin_language($tab_phrase);
return $text;
}
function MarkFields($form_name)
{
// mark specified form fields as required
?> <script language="JavaScript">MarkAsRequired(document.getElementById("<?php echo $form_name; ?>"));</script> <?php
}
?>
Property changes on: trunk/admin/include/elements.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/include/tabs.js
===================================================================
--- trunk/admin/include/tabs.js (revision 35)
+++ trunk/admin/include/tabs.js (revision 36)
@@ -1,262 +1,261 @@
//parses input tags looking for validation attributes
function DataIsValid(f)
{
var ValType = '';
var span_id = '';
var form_result = true;
var field_result = true;
var j = 0;
for (var i = 0; i < f.elements.length; i++)
{
ValType = '';
Field = f.elements[i];
ValType = Field.getAttribute('ValidationType');
if(ValType)
{
ValType = TransformValidationType(ValType); // for capability with old forms
span_id = 'prompt_' + Field.name;
span = document.getElementById(span_id);
if(span)
{
field_result = true;
ValType = ValType.split(',');
j = 0;
while(j < ValType.length)
{
//alert('Validating ['+Field.name+'] as ['+ValType[j]+']');
if(ValType[j] == 'password')
{
var repasswd = document.getElementById(Field.name + '_verify');
if(repasswd)
{
field_result &= ValidateField(Field.value, ValType[j], repasswd.value);
document.getElementById('prompt_' + Field.name + '_verify').className = field_result ? 'text' : 'validation_error';
}
}
else
field_result &= ValidateField(Field.value, ValType[j]);
j++;
}
span.className = field_result ? 'text' : 'validation_error';
form_result &= field_result;
}
}
}
return form_result;
}
function TransformValidationType(OldType)
{
// replace old validation types with new
// on the fly in case if we have some forms
// that still use old validation types
var NewType = '';
switch(OldType)
{
case 'optional_date':
NewType = 'date';
break;
default:
NewType = OldType;
break;
}
return NewType;
}
function ValidateField(FieldValue, ValidateAs, RePasswdValue)
{
// validate FieldValue based on ValidateAs rule specified;
// in case if password field compare it with RePasswdValue
var result = true;
switch(ValidateAs)
{
case 'exists': // field is required
if(FieldValue.length == 0) result = false;
break;
case 'integer': // field must be integer number
result = ValidateNumber(FieldValue, ValidateAs);
break;
case 'password': // validate as password field
result = (FieldValue == RePasswdValue) || (FieldValue.length == 0);
break;
case 'date': // text must be a formatted date
result = ValidDate(FieldValue);
break;
case 'time': // text must be a formatted time
result = ValidTime(FieldValue);
break;
}
return result;
}
function MarkAsRequired(f)
{
var ValType = '';
var span_id = '';
var result = true;
for (var i = 0; i < f.elements.length; i++)
{
ValType = '';
Field = f.elements[i];
ValType = Field.getAttribute('ValidationType');
if(ValType)
{
ValType = ValType.split(',');
if( InArray(ValType,'exists') !== false )
{
span_id = 'prompt_' + Field.name;
span = document.getElementById(span_id);
span.innerHTML = span.innerHTML + '<span class="error">*</span>';
}
}
}
}
function InArray(aArray, aValue)
{
// checks if element in array
var k = 0;
while(k < aArray.length)
{
if(aArray[k] == aValue) return k;
k++;
}
return false;
}
//Used to submit the form when a tab is clicked on
function edit_submit(formname, status_field, targetURL, save_value, env_str, new_target)
{
var full_env = env;
if(env_str != null) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
var valid = false;
if(save_value != 2 && save_value !=-1)
{
valid = DataIsValid(f);
}
else
{
var a = f.Action;
if(a)
{
a.value='';
}
}
if(valid || save_value==2 || save_value==-1)
{
f.action = rootURL + targetURL + '?' + full_env;
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
if(new_target != null && typeof(new_target) != 'undefined') f.target = new_target;
f.submit();
}
else
if(!valid)
alert(ErrorMsg);
}
else
alert('Form '+formname+' was not found.');
}
//Used when the save or cancel buttin is hit
function do_edit_save(formname, status_field, targetURL, save_value,env_str)
{
var full_env = env;
if(env_str != null) full_env += env_str;
-
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
f.action = rootURL + targetURL + '?' + full_env;
//alert(f.action);
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
f.submit();
}
else
alert('Form '+formname+' was not found.');
}
function jump_to_url(targetURL,env_str)
{
var full_env = env;
if(env_str != null) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
document.location = rootURL + targetURL + '?' + full_env;
}
// -------------------------------------------------------------------------------------------------------------
function submit_form(formname, status_field, targetURL, save_value,env_str)
{
// by Alex, submits form.
var full_env = env;
if(env_str != null) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
var valid = false;
if(save_value != 2 && save_value !=-1)
{
valid = DataIsValid(f);
}
else
{
var a = f.Action;
if(a)
{
a.value='';
}
}
if(valid || save_value==2 || save_value==-1)
{
f.action = rootURL + targetURL + '?' + full_env;
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
f.submit();
}
else
if(!valid)
alert(ErrorMsg);
}
else
alert('Form '+formname+' was not found.');
}
\ No newline at end of file
Property changes on: trunk/admin/include/tabs.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/include/sections.php
===================================================================
--- trunk/admin/include/sections.php (revision 35)
+++ trunk/admin/include/sections.php (revision 36)
@@ -1,591 +1,591 @@
<?php
$sections = array();
class clsSection
{
var $m_sections;
var $m_name;
var $m_title;
var $m_path;
var $m_file;
var $m_icon;
var $m_icon_small;
var $m_icon_list;
var $m_child;
var $m_parent;
var $m_left;
var $m_right;
var $m_notree = 0;
var $m_notabs=0;
var $m_nonavbar=0;
var $m_notitle=0;
var $m_toolbar=0;
var $m_description = NULL;
var $m_onclick=NULL;
var $m_key;
var $m_bar_title;
var $m_bar_title_plain_text = "";
function clsSection()
{
/* constructor */
}
function Get($name)
{
$var = "m_" . $name;
return isset($this->$var) ? $this->$var : '';
}
function Set($name, $value)
{
if (is_array($name))
{
for ($i=0; $i<sizeof($name); $i++)
{
$var = "m_" . $name[$i];
$this->$var = $value[$i];
}
}
else
{
$var = "m_" . $name;
$this->$var = $value;
}
}
function IsJavaScriptLink()
{
$file = $this->Get('file');
if(!$file) return false;
return (substr($file, 0, 10) == 'javascript' || $file == '#') ? true : false;
}
function IconURL($large=1)
{
global $rootURL;
if($large==1)
{
$url = $rootURL.$this->Get("icon");
}
elseif($large==2)
{
$url = $rootURL.$this->Get("icon_list");
}
else
$url = $rootURL.$this->Get("icon_small");
return $url;
}
function URL()
{
global $rootURL;
$env = BuildEnv();
if(!$this->IsJavaScriptLink())
{
$url = $rootURL.$this->Get("path").$this->Get("file");
if(strstr($url,"?"))
{
$url .= "&env=".$env;
}
else
$url .= "?env=".$env;
}
else
$url = $this->Get("file");
return $url;
}
/* functions to display navigation elements */
function tab($envar)
{
global $imagesURL;
$link = $this->URL();
if(!$this->IsJavaScriptLink())
{
if(!strstr($link,"env="))
$link .= "?". $envar;
}
$onclick = $this->Get("onclick");
$caption = language($this->Get("name"));
if(strlen($this->Get("name")))
{
$o ="<!-- Tab: $caption -->
<td><table bgcolor=\"#009FF0\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" onclick=\"\">
<tr onclick=\"$onclick\">
<td bgcolor=\"#009FF0\"><img alt=\"\" src=\"$imagesURL/tab_left.gif\" width=\"15\" height=\"23\"></td>
<td nowrap bgcolor=\"#009FF0\" background=\"$imagesURL/tab_back.gif\" align=\"center\">
<a href=\"$link\" class=\"tab2\" onClick=\"$onclick\">$caption</a><br>
</td>
<td bgcolor=\"#009FF0\"><img alt=\"\" src=\"$imagesURL/tab_right.gif\" width=\"15\" height=\"23\"></td>
</tr>
</table></td>";
}
return $o;
}//Individual Tab
function active_tab()
{
global $imagesURL, $envar;
$link = $this->URL();
$onclick = $this->Get("onclick");
if(!$this->IsJavaScriptLink())
{
if(!strstr($link,"env="))
$link .= "?". $envar;
}
$caption = language($this->Get("name"));
if (strlen($caption)<=8)
$backgr = "$imagesURL/tab_active_back3.jpg";
else if (strlen($caption)<=20)
$backgr = "$imagesURL/tab_active_back2.jpg";
else
$backgr = "$imagesURL/tab_active_back.jpg";
$o = "<!-- Tab: $caption -->
<td><table bgcolor=\"#FFFB32\" background=\"$backgr\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>
<td><img alt=\"\" src=\"$imagesURL/tab_active_left.gif\" width=\"15\" height=\"23\"></td>
<td nowrap align=\"center\" background=\"$imagesURL/tab_active_back.gif\">
<a href=\"$link\" class=\"tab\" onClick=\"$onclick\">$caption</a><br>
</td>
<td><img alt=\"\" src=\"$imagesURL/tab_active_right.gif\" width=\"15\" height=\"23\"></td></tr>
</table></td>";
return $o;
}//Active Tab
} /*clsSection*/
class clsSectionList
{
var $sections;
// var $section;
var $current;
function clsSectionList()
{
$this->sections = array();
$this->current = "default";
}
function GetSection($section)
{
if(is_array($this->sections) && strlen($section))
{
if(array_key_exists($section,$this->sections))
{
return $this->sections[$section];
}
else
return NULL;
}
else
return NULL;
}
function SetCurrentSection($section)
{
$this->current = $section;
}
function GetCurrentSection()
{
$ret = $this->GetSection($this->current);
if(!is_object($ret))
$ret = $this->GetSection("default");
return $ret;
}
function AddSection($section,$name,$title,$path,$file,$icon,$icon_small, $child,$parent,$left,$right,
$notree=0,$onClick = "",$notabs=0,$nonavbar=0,$notitle=0,$toolbar=0,$icon_list="", $bar_title = "", $bar_title_plain_text = "")
{
if($file == "subitems.php")
$file .= "?section=$section";
$s = new clsSection();
$s->Set("name", $name);
$s->Set("title",$title);
$s->Set("path", $path);
$s->Set("file", $file);
$s->Set("icon", $icon);
$s->Set("icon_list", $icon_list);
$s->Set("icon_small", $icon_small);
$s->Set("child", $child);
$s->Set("parent", $parent);
$s->Set("left", $left);
$s->Set("right", $right);
$s->Set("notree", $notree);
$s->Set("notabs", $notabs);
$s->Set("nonavbar", $nonavbar);
$s->Set("notitle", $notitle);
$s->Set("toolbar", $toolbar);
$s->Set("description", NULL);
$s->Set("onclick", $onClick);
$s->Set("key",$section);
$s->Set("bar_title",$bar_title);
$s->Set("bar_title_plain_text", $bar_title_plain_text);
if($parent != NULL)
{
$p = $this->GetSection($parent);
if(is_object($p))
{
if(!strlen($p->Get("child")))
{
//echo "Setting child of $parent to $section<br>\n";
$p->Set("child", $section); //set the parent if none set!
$this->sections[$parent]=$p;
}
}
if(!strlen($left) && !strlen($right))
{
/* find first child w/ a null right value */
foreach($this->sections as $secname => $subsection)
{
if($subsection->Get("parent") == $parent)
{
if(!strlen($subsection->Get("right")))
{
$this->sections[$secname]->Set("right", $section);
$s->Set("left", $secname);
break;
}
}
}
}
}
$this->sections[$section]=$s;
}
function AddDescription($section,$desc)
{
$sec = $this->GetSection($section);
if(is_object($sec))
{
$sec->Set("description",$desc);
$this->sections[$section] = $sec;
}
}
function sectionURL($section)
{
return $this->sections[$section]->URL();
}
function SectionIconURL($section,$large=1)
{
return $this->sections[$section]->IconURL($large);
}
function BuildTree($element, $parent)
{
global $pathtoroot,$envar;
global $rootURL;
$org = $element;
$element = strtolower($element);
$j_el=str_replace("-","_",$element);
$j_el=str_replace(":","_",$j_el);
$j_par=str_replace("-","_",$parent);
$j_par=str_replace(":","_",$j_par);
$sec = $this->sections[$element];
if(is_object($sec))
{
$caption = $this->sections[$element]->Get("name");
if(strlen($caption)==0)
$caption = $this->sections[$element]->Get("title");
$caption = language($caption);
$child =$this->sections[$element]->Get("child");
$notree = "";
if( isset($this->sections[$child]) && is_object($this->sections[$child]) )
$notree = $this->sections[$child]->Get("notree");
if (($child == NULL) or ($notree==-1))
{
print "var item = insDoc($j_par, gLnk(0, \"".$caption."\", \"".$this->SectionURL($element)."\"));\n";
print "item.iconSrc = '".$this->SectionIconURL($element,0)."';\n";
if($this->sections[$element]->Get("right")!=NULL)
$this->BuildTree($this->sections[$element]->Get("right"), $parent);
return;
}
if ($child != NULL && $notree !=-1)
{ //print "$j_el = insFld($j_par, gFld(\"".$sections[$element]['name']."\"));\n";
print "var $j_el = insFld($j_par, gFld(\"".$caption."\",\"".$this->SectionURL($element)."\"));\n";
print $j_el . ".iconSrc='".$this->SectionIconURL($element,0)."';\n";
if($this->sections[$element]->Get("right")!=NULL)
$this->BuildTree($this->sections[$element]->Get("right"), $parent);
$parent = $element;
$this->BuildTree($this->sections[$element]->Get("child"), $parent);
}
}
}
function page_title()
{
global $imagesURL,$adminURL, $objConfig;
$o = "";
$sec = $this->GetCurrentSection();
if($sec->Get("notitle")!="1")
{
$caption = $sec->Get("title");
if(strlen($caption)==0)
{
if(strlen($sec->Get("parent")))
{
$p = $this->GetSection($sec->Get("parent"));
if(is_object($p))
{
$caption = $p->Get("title");
$icon = $p->IconURL(1);
}
}
}
else
$icon = $sec->IconURL(1);
$logout_link = $adminURL."/index.php";
if(strlen($caption))
{
if($sec->Get("key")=="in-portal:root")
{
$caption=$objConfig->Get("Site_Name");
}
else
{
$caption = admin_language($caption);
}
$bg_image = 'logo_bg.gif';
$replace_modules = Array('in-link','in-news','in-bulletin');
foreach($replace_modules as $r_module)
if( $this->IsModule($r_module) )
{
$bg_image = 'logo_bg_'.$r_module.'.gif';
break;
}
$o = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'>
<div style='position:absolute; width:100%;top:0px;' align='right'>
<img src='".$imagesURL.'/'.$bg_image."'></div><img src='".$imagesURL."/spacer.gif' width=1 height=7>
<br><div style='z-Index:1; position:relative'>";
$o .= "<!-- ADMIN TITLE --><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">
<tr><td valign=\"top\" class=\"admintitle\" align=\"left\">
<img alt=\"\" width=\"46\" height=\"46\" src=\"$icon\" align=\"absmiddle\">&nbsp;$caption<br>
<img src='".$imagesURL."/spacer.gif' width=1 height=4><br>
</td></tr></table>";
}
}
return $o;
}
function IsModule($module_name)
{
// checks if there is requested module used in right frame
// module folder match
$url_split = explode('/', $_SERVER['PHP_SELF']);
if( in_array($module_name, $url_split) ) return 1;
// module section match
if( isset($_REQUEST['section']) )
{
$section = explode(':', $_GET['section']);
if( $section[0] == $module_name ) return true;
}
return false;
}
function page_tabs($envar)
{
$showtabs=0;
$o = '';
$sec = $this->GetCurrentSection();
if ($sec->Get("notabs")!=1)
{
//get starting node
$node = $sec;
while (strlen($node->Get("left")))
{
$node = $this->GetSection($node->Get("left"));
}
if($node)
{
$o = "<!-- TABS --><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>
<td align=\"right\" width=\"100%\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"23\">
<tr>";
$showtabs=1;
}
//traverse and print tabs
while ( isset($node) && is_object($node) )
{
if ($node->Get("key") == $this->current)
$o .= $node->active_tab();
else
$o .= $node->tab($envar);
$right = $node->Get("right");
unset($node);
if(strlen($right))
$node = $this->GetSection($right);
}
if($showtabs)
{
$o .= "</tr></table></td></tr></table>";
}
}
return $o;
}
- function section_header($envar,$navbar=NULL,$extra_title=NULL)
+ function section_header($envar,$navbar=NULL,$extra_title=NULL, $no_help = false)
{
global $pathtoroot;
global $pathtolocal;
global $imagesURL;
global $adminURL;
global $objConfig;
$output = '';
$HelpIcon = $imagesURL."/blue_bar_help.gif";
$node = $this->GetCurrentSection();
if(is_object($node))
{
- $helpURL = $adminURL."/help/help.php?env=$envar&dstform=popup";
+ $helpURL = $adminURL.'/help/help.php?'.( substr($envar,0,3) == 'env' ? '' : 'env=').$envar.'&destform=popup';
$node_key = $node->Get('key');
$o = "<!-- SECTION NAVIGATOR -->";
//background="'.$imagesURL.'/tabnav_left.jpg"
- $o .= '<form name="help_form" id="help_form" action="'.$helpURL.'" method="post"><input type="hidden" id="section" name="section" value=""></form>';
+ if($no_help == false) $o .= '<form name="help_form" id="help_form" action="'.$helpURL.'" method="post"><input type="hidden" id="section" name="section" value=""></form>';
$o .= '<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">';
$o .= '<tr><TD class="header_left_bg" width="100%">';
//get path up to the parent node
while ( isset($node) && is_object($node) )
{
if(!strlen($extra_title))
{
$bar_title = $node->Get("bar_title");
$bar_title_plain_text = $node->Get("bar_title_plain_text");
if(strlen($bar_title) && !is_null($bar_title))
$caption = language($bar_title);
elseif (is_null($bar_title))
$caption = "";
else
$caption = language($node->Get("name"));
if (strlen($bar_title_plain_text))
$caption.= $bar_title_plain_text;
}
else
$caption = $extra_title;
$output = "<span class=\"tablenav_link\">$caption</span>";
unset($node);
}
$o .= $output;
if(strlen($navbar))
$o .= "::<b>".$navbar."</b>";
$o .= "</td><td align=\"right\" class=\"tablenav\" background=\"$imagesURL/tabnav_back.jpg\" width=\"10\">";
- $o .= "<a class=\"link\" onclick=\"ShowHelp('".$node_key."');\"><img src=\"$HelpIcon\" border=\"0\"></A></TD>";
- $o .= "</tr></table><!-- END SECTION NAVIGATOR -->";
+ if($no_help == false) $o .= "<a class=\"link\" onclick=\"ShowHelp('".$node_key."');\"><img src=\"$HelpIcon\" border=\"0\"></A>";
+ $o .= "</td></tr></table><!-- END SECTION NAVIGATOR -->";
}
return $o;
}
} /* clsSectionList */
$objSections = new clsSectionList();
$objSections->AddSection("in-portal:root", $objConfig->Get("Site_Name"), $objConfig->Get("Site_Name"), $admin."/","subitems.php",
$admin."/icons/icon46_site.gif", $admin."/icons/icon24_site.gif",
"in-portal:site", NULL, NULL,"in-portal:users",0,"",1, NULL,NULL,NULL, "", "la_section_overview");
$objSections->AddSection("in-portal:site", "la_tab_Site_Structure","la_title_Site_Structure", $admin."/","subitems.php",
$admin."/icons/icon46_struct.gif", $admin."/icons/icon24_struct.gif",
"in-portal:browse", "in-portal:root", NULL,"in-portal:users",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_struct.gif","la_selecting_categories");
$objSections->AddSection("in-portal:users","la_tab_Community","la_title_Community",$admin."/","subitems.php",
$admin."/icons/icon46_community.gif",$admin."/icons/icon24_community.gif", NULL,"in-portal:root","in-portal:site","in-portal:modules",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_community.gif","la_section_overview");
$objSections->AddSection("in-portal:modules","la_tab_ModulesSettings","la_title_Settings",$admin."/","subitems.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, "in-portal:root","in-portal:users","in-portal:reports",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif","la_section_overview");
$objSections->AddSection("in-portal:mod_status","la_tab_Modules","la_title_Module_Status",$admin."/modules/","mod_status.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, NULL,NULL,NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif");
$objSections->AddSection("in-portal:addmodule","la_tab_Modules","la_title_Add_Module",$admin."/modules/","addmodule.php",
$admin."/icons/icon46_modules.gif",$admin."/icons/icon24_modules.gif",NULL, NULL,NULL,NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_modules.gif");
$objSections->AddSection("in-portal:reports","la_tab_Reports","la_title_Reports",$admin."/","subitems.php",
$admin."/icons/icon46_summary_logs.gif",$admin."/icons/icon24_summary_logs.gif",NULL, "in-portal:root","in-portal:modules","in-portal:system",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_summary_logs.gif","la_section_overview");
$objSections->AddSection("in-portal:log_summary","la_tab_Summary","la_tab_Summary",$admin."/logs/","summary.php",
$admin."/icons/icon46_summary.gif",$admin."/icons/icon24_summary.gif",NULL,
"in-portal:reports",NULL,"in-portal:searchlog",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_summary.gif");
$objSections->AddSection("in-portal:searchlog","la_tab_SearchLog","la_tab_SearchLog",$admin."/logs/","searchlog.php",
$admin."/icons/icon46_search_log.gif",$admin."/icons/icon24_search_log.gif",
NULL,"in-portal:reports","in-portal:log_summary","in-portal:sessionlog",0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_search_log.gif");
$objSections->AddSection("in-portal:sessionlog","la_tab_SessionLog","la_tab_SessionLog",$admin."/logs/","session_list.php",
$admin."/icons/icon46_sessions_log.gif",$admin."/icons/icon24_sessions_log.gif",
NULL,"in-portal:reports","in-portal:sessionlog",NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_sessions_log.gif");
/* Help */
$objSections->AddSection("in-portal:help","la_tab_Help","la_title_Help",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"in-portal:root","in-portal:system",NULL,0,"",1,NULL,NULL,NULL,$admin."/icons/icon46_list_help.gif");
$objSections->AddSection("in-portal:help_overview","la_tab_Overview","la_title_Help",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"in-portal:help",NULL,"in-portal:help_ch1",NULL,NULL,NULL,NULL,NULL,NULL,$admin."/icons/icon46_list_help.gif");
$objSections->AddSection("in-portal:help_ch1","Chapter 1","Chapter 1",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"inportal:help","in-portal:help_overview","in-portal:help_ch2");
$objSections->AddSection("in-portal:help_ch2","Chapter 2","Chapter 2",$admin."/help/","help.php",
$admin."/icons/icon46_help.gif",$admin."/icons/icon24_help.gif",
NULL,"inportal:help","in-portal:help_ch1",NULL);
/* Help ends */
$objSections->AddSection("in-portal:item_select","la_title_Select_Item","Select Item",$admin."/","item_select.php","","",
NULL,NULL,NULL,0,"",1,1);
$objSections->AddSection("in-portal:rel_select","la_title_Select_Target_Item","Select Item",$admin."/","rel_select.php","","",
NULL,NULL,NULL,0,"",1,0,1,1);
$NewButtons = array();
/* each module will add to the array declared below, which contains the info for the
'new' button for the module's Browse data. The array is an array of arrays,
and the subarray should contain the following indexes:
ImagePath = URL to the directory containing the image
Action = Action attribute of the image (this is also the "base name" of the image
Alt = Image ALT value
Tab = If set, button will only be displayed when this div is active
*/
$m = GetModuleArray("admin");
if(is_array($m))
{
foreach($m as $key=>$value)
{
$mod = $pathtoroot . $value . "admin/include/navmenu.php";
include_once($mod);
}
}
$objSections->AddSection("default","","",$admin."/","#",NULL,NULL,NULL,NULL,NULL,NULL);
?>
Property changes on: trunk/admin/include/sections.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@user_groups.txt
===================================================================
--- trunk/admin/help/topics/in-portal@user_groups.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@user_groups.txt (revision 36)
@@ -0,0 +1 @@
+This section lists all user groups and allows the administrator to manage them. It also displays the member count for each group.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@user_groups.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editcategory_custom.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editcategory_custom.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editcategory_custom.txt (revision 36)
@@ -0,0 +1,2 @@
+The custom tab displays all custom fields defined for categories, and allows the administrator to edit them. The custom fields are set up on the Custom Settings page, described in the section V.2.1.5 of this manual.
+ The only information that can be entered for a custom field is the "Value".
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editcategory_custom.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@configuration_email.txt
===================================================================
--- trunk/admin/help/topics/in-portal@configuration_email.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@configuration_email.txt (revision 36)
@@ -0,0 +1,2 @@
+
+ This section lists all possible In-portal platform category events. Each event has a description, a type – ‘User' or ‘Admin', a status – ‘Enabled', ‘Front-end Only', and a ‘From/To User'. The description hints about when the event occurs. The type indicates whether the email notification will be sent to the front-end user, or the administrator. The status ‘Enabled' signifies that the email notifications for this event are enabled for both the front-end and the administrative console. The Front-end Only' status means that the notifications will be sent only when the event occurs on the front end. The ‘Disabled' status means no notifications will be sent when this event occurs. The ‘From/To User' field specifies the ‘From' email for front-end user notifications, and the ‘To' email for the administrative notifications. The other, matching pair of addresses (‘To' for the front, and ‘From' for the admin) is automatically determined by the system based on who initiated the event. The event notification status can be changed by clicking on the toolbar buttons – ‘Enable' to enable the notification, ‘Disable' to disable it, and ‘Front Only' (icon with a monitor) to set to ‘Front-end Only' status.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@configuration_email.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editcategory_permissions.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editcategory_permissions.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editcategory_permissions.txt (revision 36)
@@ -0,0 +1,10 @@
+This tab allows you to control the permissions of the current category. The first list displays all groups, which have permissions already associated with this category. If a group is not shown, that means that its permissions will be inherited from the parent category. To add a new group definition, click on the ‘New Permission' button (icon with a yellow lock and a little sun). A new page will pop-up, prompting you to select the group which you want to add. Only those groups will be shown which don't yet exist in the group list.
+ Once you add or edit a group, you will be directed to the page defining the permissions. The permissions are broken down by type, one for the In-portal platform permissions, and one for each of the installed modules. The ‘Inherited' check box specifies that a particular permission is inherited from the parent, and therefore cannot be defined for this category. The ‘Access' check box shows whether a permission is set or unset in the current category. Next to the check box, you will also see a green or a red circle. These circles indicate the active permission state for the category – red means unset, and the green – set. This is especially useful in for the inherited permissions – you don't have to look up the parent category to find out what the value of a particular permission is. The last column, ‘Inherited From', shows the category name and full path that defines the permission for the current category. It may be an immediate parent, or any other grandparent category in the tree – all the way up to the ‘Home' category. The ‘Home' category does not have the inheritance options, since it is the highest category in the tree, and does not have any other category to inherit the settings from. The list of In-portal platform permissions is as follows:
+<ul>
+ <li> View Category – controls whether a user can view the subcategories in this category.
+ <li> Add Category – controls whether a user can add categories inside this category.
+ <li> Delete Category – controls whether a user can delete categories inside this category.
+ <li> Add Pending Category – controls whether a user can add categories inside this category, but in pending mode – awaiting administrator's approval before they become active.
+ <li> Modify Category – controls whether a user can modify categories inside this category.
+ <li> Allow favorites – controls whether a user can utilize the Favorites function on the items in this category. The favorites feature works like a bookmark – it allows users to mark the items they find useful, and they will be displayed in ‘My Favorites' section in their account on the front end.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editcategory_permissions.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_custom.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_custom.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_custom.txt (revision 36)
@@ -0,0 +1,3 @@
+The custom tab displays all custom fields defined for users, and allows the administrator to edit them. The custom fields are set up on the Custom Fields page, described in the section V.2.2.5 of this manual.
+ The only information that can be entered for a custom field is the "Value".
+
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_custom.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_permissions.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_permissions.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_permissions.txt (revision 36)
@@ -0,0 +1,14 @@
+The permissions tab allows the administrator to assign individual permissions to the user. This is recommended only for exceptional situations, as it complicates user permission management. The standard way of assigning permissions, is to configure a group with the desired set of permissions, and then assign the user to it.
+ The permissions are broken down by type, one for the In-portal administrative console permissions, and one for the front-end. The ‘Inherited' check box specifies that a particular permission is inherited from a group that this user belongs to, and therefore cannot be defined for this user. The ‘Access' check box shows whether a permission is set or unset for the current user. Next to the check box, you will also see a green or a red circle. These circles indicate the active permission state for the user – red means unset, and the green – set. This is especially useful in for the inherited permissions – you do not have to look up all of the groups this user belongs to, to find out what the value of a particular permission is.<br><br> The list of the administrative console permissions is as follows:
+<ul>
+ <li> Admin Login – this permission allows the user to log in, and to use the administrative console. This permission should be assigned with caution.
+ <li> Append phpinfo to all pages (Debug) – All permissions, marked with (debug) are used for testing purposes when the code has been modified. They are not necessary, and sometimes distracting, for the daily usage of the console. This permission will display the PHP info page at the top of each page.
+ <li> Change User Profiles – this permission will allow the user to view and change other users' profiles on the front end.
+ <li> Display Item List Queries (Debug) – this debug permission will display the SQL queries above on each list page, after each list operation is performed.
+ <li> Display Item Queries (Debug) – this debug permission will display the SQL queries for all other actions.
+ <li> Show Language Tags – this permission will show undefined language variables in the administrative console as links. The link will open up a pop-up for creation of that language variable in the current regional pack. This is a useful permission for enhancing and debugging translations.
+</ul>
+ The list of the front-end permissions is as follows:
+<ul>
+ <li> Allow Login – this permission will allow a registered user to log into the front end of the In-portal site. It is equivalent, for all intents and purposes, to setting a front-end only user's status to ‘Pending' or ‘Disabled'. The only difference is for users with administrative privileges – ‘Pending' or ‘Disabled' user will not be able to log into the administrative console as well, regardless of their ‘Admin Login' permission setting.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_permissions.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editcategory_general.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editcategory_general.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editcategory_general.txt (revision 36)
@@ -0,0 +1,13 @@
+<ul>
+<li> Enable HTML? – this check box enables or disables HTML code in the category name and the category description. When checked, it will render the HTML (for example, a &lt;B&gt; tag will actually make the text bold). When unchecked, it will display the HTML as regular text (the &lt;B&gt; tag will appear exactly as ‘&lt;B&gt;'). This is very important, since some HTML tags can break the page layout, and in some instances can be a security weakness (the Java Script, for example).
+<li> Category ID - this is a read-only field that displays the internal system ID. It is of a small importance, other than the fact that it's a truly unique identifier of a category – there can never be two categories with the same ID.
+<li> Name - this is the category name
+<li> Description - this is the category description
+<li> ‘Editor' – this icon that looks like a notepad and a pen, will pop up the online HTML editor for the category description. It will only work if the Enable HTML check box is checked.
+<li> Status – this is the category status
+<li> New – this is the control for the ‘New' flag. The ‘auto' setting will let the system set the ‘new' flag automatically, based on the number of days since its creation and a setting; ‘always' will enable the flag, and ‘never' will disable it.
+<li> Editor's Pick – this sets the Editor's pick flag
+<li> Created on – this is the creation date. It can be either entered directly into the field, or you can use the calendar tool to select a date. The ‘Calendar' button is an icon to the right of the field that looks like a date book page. To the right of the ‘Calendar' button there is a hint that shows the current date format. This format may change, if a different Regional package is activated.
+<li> META keywords – this field contains the META keywords that will be displayed on the front end of the In-portal site, in the special HTML “meta” tags. These particular keywords will be displayed when the current category is entered.
+META description – similar to the META keywords, but for the META description HTML tag. Both are useful for search engine recognition of the page, as well as alternative descriptions of the category that will not be visible to a human visitor.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editcategory_general.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_general.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_general.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_general.txt (revision 36)
@@ -0,0 +1,18 @@
+This form contains all of the user information.
+<ul>
+ <li> Username* - this field contains the unique user name.
+ <li> Password – this field contains the user password. When editing an existing user, the password field will be blank. Leave it blank, if you do not want to change the password. For extra protection, nobody can see the user's existing password, including the administrator. The password can only be reset (either in this from, or from the front – end, the ‘Forgot Password' function.)
+ <li> Repeat Password – this field is used when resetting the user's password. Please re-type the password entered in the field above. If the passwords don't match, an error will occur and you will not be able to save the form.
+ <li> First Name – this field contains user's first name.
+ <li> Last Name – this field contains user's last name.
+ <li> Email* - this field contains user's email address. It is a required field, because without it the user will not be able to reset their password and receive the system email notifications.
+ <li> Date of Birth* - this field contains the user's date of birth. It is a required field, due to United States COPPA regulations, which state that all persons under the age of 13 must obtain parental consent before submitting their personal information on a web site. For more information about COPPA, please visit <a href="http://www.ftc.gov/bcp/conline/pubs/buspubs/coppa.htm">http://www.ftc.gov/bcp/conline/pubs/buspubs/coppa.htm </a>. The date can be either entered manually, in accordance with the date format of the current regional package, or selected with the help of the calendar tool to the right of the field.
+ <li> Phone - this field contains user's phone number.
+ <li> Street - this field contains user's street address.
+ <li> City - this field contains user's city.
+ <li> State - this field contains user's state or province.
+ <li> Zip - this field contains user's postal code.
+ <li> Country - this field contains user's country.
+ <li> Status – this flag contains the user's status – enabled, disabled or pending.
+ <li> Created On - this field contains the date when the user was created. The date can be either entered manually, in accordance with the date format of the current regional package, or selected with the help of the calendar tool to the right of the field.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_general.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editgroup_users.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editgroup_users.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editgroup_users.txt (revision 36)
@@ -0,0 +1 @@
+This tab lists all group members. It also allows to add a new member to the group and to remove the existing members. To add a new member, click on the ‘Add User to Group' button. A new page with a list of all users will pop up.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editgroup_users.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_groups.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_groups.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_groups.txt (revision 36)
@@ -0,0 +1,2 @@
+This tab allows the administrator to assign the user to one or more groups. It also lists all groups to which the user is currently assigned, along with the user count in each group.
+ To assign a new group, click on the ‘Add User to Group' button (user icon with a green arrow to the right). This button will pop-up a group selector.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_groups.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_items.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_items.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_items.txt (revision 36)
@@ -0,0 +1 @@
+This tab lists all items owned by the user. Each item's name and type is displayed. It is not possible to add or remove items on this tab – it must be done through the "Edit" form of each specific item. The link on the item's name will pop up the "Edit" form as a short cut.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_items.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@configure_categories.txt
===================================================================
--- trunk/admin/help/topics/in-portal@configure_categories.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@configure_categories.txt (revision 36)
@@ -0,0 +1,12 @@
+This section allows the administrator to define the default values for various In-portal platform settings.
+<ul>
+ <li> Order categories by – this setting specifies the default primary sort order for category listings. It applies both on the front end, and in the administrative console – in the catalog. The first dropdown allows to select the field (an attribute of the category element), and the second dropdown – the direction.
+ <li> And then by – this setting specifies the default secondary sort order. It is set in the same way as the primary, and used when the primary order values are ambiguous. For example, when the primary sort value is ‘Category Name', the secondary order will be used to sort among categories with the same name.
+ <li> Number of categories per page – specifies the default number of categories shown per page. This value applies both to the front end and to the administrative console. In the latter, this value can be changed for each session through the View menu.
+ <li> Categories Per Page (Shortlist) – this setting is similar to the ‘ Number of categories per page', but it applies to the front end, short category lists only. It can be overridden by setting the tag attributes in the appropriate templates.
+ <li> Number of days for a cat. to be NEW – specifies the number of days, from the date of creation, during which the category will be automatically marked ‘New' by the system. This setting will only apply to the categories with the ‘New' flag set to ‘Automatic'.
+ <li> Display editor PICKs above regular categories – this setting will force all categories, marked as ‘Editor's pick' to be displayed above the other categories, regardless of their priority or sort order. Among themselves, ‘Editor's pick' categories will be sorted according to the regular rules.
+ <li> Root category name (language variable) – this setting specifies the name of the language variable which contains the name of the root category. By default, the root category name is ‘Home' in English, and the label name is ‘lu_rootcategory_name'. There is rarely a need to change the name of the variable – since the name of the category itself can be simply changed by changing the value of the variable.
+ <li> Default META Keywords – this field contains the default META keywords value, which is displayed on the home page, or whenever a category does not have them defined. For more information, see the section describing General Category settings - V.2.1.1.1.1 .
+ <li> Default META description - this field contains the default META description value, which is displayed on the home page, or whenever a category does not have them defined. For more information, see the section describing General Category settings - V.2.1.1.1.1 .
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@configure_categories.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_image.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_image.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_image.txt (revision 36)
@@ -0,0 +1,13 @@
+<ul>
+ <li> Image ID – a read-only field, the internal system ID of the image, guaranteed to be unique throughout the system. It is blank when a new image is created.
+ <li> Name – this field contains the image name, used in In-tags to designate the image.
+ <li> Alt Value – this field contains the text value, which will be displayed in the ‘alt' tag of the image on the front end, inside the page HTML code, and when a mouse pointer is hovered over the image (in Internet Explorer).
+ <li> Status – this field contains the status of the image, enabled or disabled.
+ <li> Primary – this flag designates the primary image. There can be only one primary image per list (for one category). When you check this box on an image, the previous primary image is unset (if there is more than one image in the list).
+ <li> Priority – this field contains the numerical priority of the image.
+ <li> Thumbnail location (upload from PC) – Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the ‘in-portal/kernel/images' directory.
+ <li> Thumbnail location (remote URL) – Here you can enter a remote URL address of an image. It will be linked from the remote server.
+ <li> Same As Thumbnail – This check box sets the full-size image to be the same as the thumbnail image. When this option is checked, you cannot upload a full-size image.
+ <li> Thumbnail location (upload from PC) - Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the ‘in-portal/kernel/images' directory.
+ <li> Thumbnail location (remote URL) - Here you can enter a remote URL address of an image. It will be linked to from the remote server.
+</ul>
Property changes on: trunk/admin/help/topics/in-portal@edituser_image.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_permission.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_permission.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_permission.txt (revision 36)
@@ -0,0 +1,14 @@
+The permissions tab allows the administrator to assign individual permissions to the user. This is recommended only for exceptional situations, as it complicates user permission management. The standard way of assigning permissions, is to configure a group with the desired set of permissions, and then assign the user to it.
+ The permissions are broken down by type, one for the In-portal administrative console permissions, and one for the front-end. The ‘Inherited' check box specifies that a particular permission is inherited from a group that this user belongs to, and therefore cannot be defined for this user. The ‘Access' check box shows whether a permission is set or unset for the current user. Next to the check box, you will also see a green or a red circle. These circles indicate the active permission state for the user – red means unset, and the green – set. This is especially useful in for the inherited permissions – you do not have to look up all of the groups this user belongs to, to find out what the value of a particular permission is.<br><br> The list of the administrative console permissions is as follows:
+<ul>
+ <li> Admin Login – this permission allows the user to log in, and to use the administrative console. This permission should be assigned with caution.
+ <li> Append phpinfo to all pages (Debug) – All permissions, marked with (debug) are used for testing purposes when the code has been modified. They are not necessary, and sometimes distracting, for the daily usage of the console. This permission will display the PHP info page at the top of each page.
+ <li> Change User Profiles – this permission will allow the user to view and change other users' profiles on the front end.
+ <li> Display Item List Queries (Debug) – this debug permission will display the SQL queries above on each list page, after each list operation is performed.
+ <li> Display Item Queries (Debug) – this debug permission will display the SQL queries for all other actions.
+ <li> Show Language Tags – this permission will show undefined language variables in the administrative console as links. The link will open up a pop-up for creation of that language variable in the current regional pack. This is a useful permission for enhancing and debugging translations.
+</ul>
+ The list of the front-end permissions is as follows:
+<ul>
+ <li> Allow Login – this permission will allow a registered user to log into the front end of the In-portal site. It is equivalent, for all intents and purposes, to setting a front-end only user's status to ‘Pending' or ‘Disabled'. The only difference is for users with administrative privileges – ‘Pending' or ‘Disabled' user will not be able to log into the administrative console as well, regardless of their ‘Admin Login' permission setting.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_permission.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@configuration_search.txt
===================================================================
--- trunk/admin/help/topics/in-portal@configuration_search.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@configuration_search.txt (revision 36)
@@ -0,0 +1,10 @@
+This section allows the administrator to configure the front end search options, and the advanced search options.
+ At the top, this section lists all fields, representing category attributes. Next to each field, there is a ‘Simple Search' checkbox, which includes this field in the simple search query. By default, only the ‘Name' and the ‘Description' fields are included. In general, it makes sense to include only the fields, which may contain text in them, otherwise when a visitor searches for a text keyword, the non-textual fields will be not searchable. Next there is a ‘Weight' text box, in which the administrator can designate the importance of each field during a search. The fields with a larger weight will be more important then the fields with the lower weight. This is used when calculating the category relevance to the search keyword, for sorting of the results. The last column is the ‘Advanced Search' check. It designated whether a particular field should be displayed on the ‘Advanced Search' page, and should the visitors be able to search on it. By default, all fields are included.
+ Below the list of fields are the Category Relevance settings.
+<ul>
+ <li> Increase importance if field contains a required keyword by – this specifies the percentage by which the weight of a field will increase, when a required keyword is found in that field. A required keyword is one that is preceded with a ‘+' in the search key phrase.
+ <li> Search Relevance depends on _ % keyword – the percentage of relevance that comes from the keyword being found in that category.
+ <li> Search Relevance depends on _ % popularity - the percentage of relevance that is based on the category popularity.
+ <li> Search Relevance depends on _ % rating - the percentage of relevance that is based on the category rating.
+</ul>
+ Below, the same forms repeat for user fields and for category custom fields, along with their respective relevance settings. Some of the search settings are not used in the current version – they are reserved for a future use.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@configuration_search.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editgroup_permissions.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editgroup_permissions.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editgroup_permissions.txt (revision 36)
@@ -0,0 +1,15 @@
+The permissions tab allows the administrator to assign permissions to the group. This is the recommended way of managing user permissions.
+ The permissions are broken down by type, one for the In-portal administrative console permissions, and one for the front-end. The "Access" check box shows whether a permission is set or unset for the current group. Next to the check box, you will also see a green or a red circle. These circles indicate the active permission state for the group – red means unset, and the green – set. <br><br>The list of the administrative console permissions is as follows:
+<ul>
+<li> Admin Login – this permission allows the group member to log in, and to use the administrative console. This permission should be assigned with caution.
+ <li> Append phpinfo to all pages (Debug) – All permissions, marked with (debug) are used for testing purposes when the code has been modified. They are not necessary, and sometimes distracting, for the daily usage of the console. This permission will display the PHP info page at the top of each page.
+ <li> Change User Profiles – this permission will allow the group member to view and change other users' profiles on the front end.
+ <li> Display Item List Queries (Debug) – this debug permission will display the SQL queries above on each list page, after each list operation is performed.
+ <li> Display Item Queries (Debug) – this debug permission will display the SQL queries for all other actions.
+ <li> Show Language Tags – this permission will show undefined language variables in the administrative console as links. The link will open up a pop-up for creation of that language variable in the current regional pack. This is a useful permission for enhancing and debugging translations.
+</ul>
+ The list of the front-end permissions is as follows:
+<ul>
+ <li> Allow Login – this permission will allow the group member to log into the front end of the In-portal site. It is equivalent, for all intents and purposes, to setting a front-end only user's status to "Pending" or "Disabled". The only difference is for users with administrative privileges – "Pending" or "Disabled" user will not be able to log into the administrative console as well, regardless of their "Admin Login" permission setting.
+</ul>
+
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editgroup_permissions.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editgroup_general.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editgroup_general.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editgroup_general.txt (revision 36)
@@ -0,0 +1,5 @@
+The general tab lists all general group information.
+<ul>
+ <li> Group Name* - this field contains the required name of the group. Everywhere in the administrative console, the groups are referred to by their names. The group name must be unique.
+ <li> Comments – this field contains notes, visible only to the administrator and only on this page. They are useful for keeping short descriptions about the group and its purpose.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editgroup_general.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@configuration_custom.txt
===================================================================
--- trunk/admin/help/topics/in-portal@configuration_custom.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@configuration_custom.txt (revision 36)
@@ -0,0 +1,11 @@
+This section allows the administrator to manage the category custom fields. The category custom fields are useful when you need to store additional information about the categories. In the earlier example about a directory of cars, the categories may have such custom fields, as the engine displacement range, price range, years of manufacturing of the model, etc. All custom fields will be automatically used in the administrative console, in the Category Management section. You will need to edit the theme templates for them to appear on the front-end.
+<ul>
+ <li> Field Id – this is a read-only field displaying the unique system ID of the custom field.
+ <li> Field Name – sets the internal name of the custom field. This is the name you would use to refer to the custom field in the In-tags when designing templates.
+ <li> Field Label – this is a read-only field, which displays the language variable name associated with the label of that field, and the value of the variable in the current language (after the colon). The label is used on the front end, and in the administrative console, to describe the field to the user who is entering information into it.
+ <li> Show on the general tab – this setting controls whether the custom field will be also displayed on the General tab in the administrative console, when editing the categories. It is a short cut for frequently used custom fields. All settings below apply only when this is checked.
+ <li> Heading – this field contains the language variable of the section heading, under which the field appear on the general tab.
+ <li> Field Prompt – this field contains the language variable, which text will appear as the hint bind the field.
+ <li> Input Type – this drop down allows the administrator to designate the type of the information stored in the custom field, by specifying the HTML control to be used on the General form.
+ <li> List of Values – this field contains all choices for the above HTML controls of type ‘radio button' or ‘drop down'. The choices must be in the format: “value1 = language variabe1, value2=language variable2”. For example, to create a drop down with three choices (One, Two, Three) and their respective numerical values, this field would contain the following: “1=la_one,2=la_two,3=la_three).
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@configuration_custom.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editcategory_relations.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editcategory_relations.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editcategory_relations.txt (revision 36)
@@ -0,0 +1,8 @@
+This page contains a list of all relations of this category. To create a new relation, click the ‘New' button (two opposite green arrows with a sun). This will pop up a category picker, where you can choose one category.
+<ul>
+ <li> Relation ID – a read-only field, the internal system ID of the relation, guaranteed to be unique throughout the system. It is blank when a new relation is created.
+ <li> Item – a read only field, the destination item type ‘category'. Categories can only be related to categories.
+ <li> Type – ‘reciprocal' designates a two-way relation, and ‘one way' – a one-way relation.
+ <li> Enabled – the status flag of the relation.
+ <li> Priority – the numerical priority of the relation.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editcategory_relations.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@site.txt
===================================================================
--- trunk/admin/help/topics/in-portal@site.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@site.txt (revision 36)
@@ -0,0 +1 @@
+This section will provide you with a page-by-page walkthrough of the administrative console of the In-portal platform, describing the purpose of each page and the fields on it.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@site.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@editcategory_images.txt
===================================================================
--- trunk/admin/help/topics/in-portal@editcategory_images.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@editcategory_images.txt (revision 36)
@@ -0,0 +1,15 @@
+
+ This tab contains all images associated with the category. To create a new image, click on the ‘New' button (the icon like the Windows GIF icon with a little sun). This will open a new page where you fill out the image details.
+<ul>
+ <li> Image ID – a read-only field, the internal system ID of the image, guaranteed to be unique throughout the system. It is blank when a new image is created.
+ <li> Name – this field contains the image name, used in In-tags to designate the image.
+ <li> Alt Value – this field contains the text value, which will be displayed in the ‘alt' tag of the image on the front end, inside the page HTML code, and when a mouse pointer is hovered over the image (in Internet Explorer).
+ <li> Status – this field contains the status of the image, enabled or disabled.
+ <li> Primary – this flag designates the primary image. There can be only one primary image per list (for one category). When you check this box on an image, the previous primary image is unset (if there is more than one image in the list).
+ <li> Priority – this field contains the numerical priority of the image.
+ <li> Thumbnail location (upload from PC) – Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the ‘in-portal/kernel/images' directory.
+ <li> Thumbnail location (remote URL) – Here you can enter a remote URL address of an image. It will be linked from the remote server.
+ <li> Same As Thumbnail – This check box sets the full-size image to be the same as the thumbnail image. When this option is checked, you cannot upload a full-size image.
+ <li> Thumbnail location (upload from PC) - Using this control, you can upload an image from the workstation you are at to the In-portal server. The image will be stored in the ‘in-portal/kernel/images' directory.
+ <li> Thumbnail location (remote URL) - Here you can enter a remote URL address of an image. It will be linked to from the remote server.
+</ul>
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@editcategory_images.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@edituser_images.txt
===================================================================
--- trunk/admin/help/topics/in-portal@edituser_images.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@edituser_images.txt (revision 36)
@@ -0,0 +1 @@
+This tab contains all images associated with the user. To create a new image, click on the ‘New' button (the icon like the Windows GIF icon with a little sun). This will open a new page where you fill out the image details.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@edituser_images.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/topics/in-portal@user_list.txt
===================================================================
--- trunk/admin/help/topics/in-portal@user_list.txt (nonexistent)
+++ trunk/admin/help/topics/in-portal@user_list.txt (revision 36)
@@ -0,0 +1 @@
+This section lists all In-portal users. It allows managing users, setting primary group for a user, approving and disabling users, banning users and sending out mass emails to the users.
\ No newline at end of file
Property changes on: trunk/admin/help/topics/in-portal@user_list.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/blank.html
===================================================================
--- trunk/admin/help/blank.html (nonexistent)
+++ trunk/admin/help/blank.html (revision 36)
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <title>Loading Help</title>
+ </head>
+ <body>
+ </body>
+</html>
+
\ No newline at end of file
Property changes on: trunk/admin/help/blank.html
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/help/help.php
===================================================================
--- trunk/admin/help/help.php (revision 35)
+++ trunk/admin/help/help.php (revision 36)
@@ -1,100 +1,130 @@
<?php
if(!strlen($pathtoroot))
{
$path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
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();
+
+$topic_path = $baseURL.$admin.'/help/topics/'.str_replace(':','@',$section).'.txt';
-$m = GetModuleArray();
-foreach($m as $key=>$value)
+// for debugging: save new help content
+if( GetVar('action') == 'save_help' )
{
- $path = $pathtoroot.$value."admin/include/subitems.php";
- if(file_exists($path))
- {
- //echo "<!-- $path -->";
- include_once($path);
- }
+ error_reporting(E_ALL);
+ $fp = fopen($topic_path, 'w');
+ fwrite($fp, stripslashes(GetVar('help_content')) );
+ fclose($fp);
}
-$section = $_GET["section"];
+$help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');
-$envar = BuildEnv();
-int_header();
?>
-<h1>Not Implemented</H1>
-<?php int_footer(); ?>
-
+<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>'.str_replace(':','@',$section).'.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 $section; ?>">
+ <input type="hidden" name="action" value="save_help">
+ </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.1
\ No newline at end of property
+1.2
\ No newline at end of property

Event Timeline