Index: trunk/themes/default/incs/inportal_main.css =================================================================== diff -u -N -r289 -r568 --- trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 289) +++ trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 568) @@ -773,8 +773,30 @@ .relevance-bar { border-color: red; border-width: 1px; - } +} + +.tab_active, .tab_inactive { + border: 1px solid #1C97F1; + width: 120px; + padding-top: 5px; + padding-bottom: 5px; +} + +.tab_inactive { + background: #EFF4FA; +} + +.tab_active { + background: #FFFFFF; + border-bottom: none; +} + +.tab_spacer { + border-bottom: 1px solid #1C97F1; +} + + /* debug output styles */ .debug_table { Index: trunk/themes/default/misc/right_loggedin.tpl =================================================================== diff -u -N -r13 -r568 --- trunk/themes/default/misc/right_loggedin.tpl (.../right_loggedin.tpl) (revision 13) +++ trunk/themes/default/misc/right_loggedin.tpl (.../right_loggedin.tpl) (revision 568) @@ -30,15 +30,21 @@ ">
"> + + &ResetPage=1">
+ &ResetPage=1"> + +
+ ">
"> ">
"> - +
Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -N -r561 -r568 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 561) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 568) @@ -643,6 +643,10 @@ var $BasePermission; var $Dummy = null; + // enshure that same sql won't be queried twice + var $QueryDone = false; + var $LastQuerySQL = ''; + function SetTable($action, $table_name = null) // new by Alex { // $action = {'live', 'restore','edit'} @@ -1025,7 +1029,7 @@ { $count++; $data = $result->fields; - $this->AddItemFromArray($data,TRUE); + $this->AddItemFromArray($data,TRUE); if( defined('ADODB_EXTENSION') && constant('ADODB_EXTENSION') > 0 ) adodb_movenext($result); else @@ -1449,6 +1453,8 @@ var $PageEnvarIndex; var $ListType; + var $LastLimitClause = ''; // used to store last limit cluse used in query + function clsItemList() { $this->clsItemCollection(); @@ -1617,9 +1623,9 @@ } - function GetPageLinkList($dest_template=NULL,$page = "",$PagesToList=10, $HideEmpty=TRUE) + function GetPageLinkList($dest_template=NULL,$page = "",$PagesToList=10, $HideEmpty=TRUE,$EnvSuffix = '') { - global $objConfig, $var_list_update, $var_list; + global $objConfig, $var_list_update, $var_list; $v= $this->PageEnvar; @@ -1667,7 +1673,7 @@ { ${$v}[$this->PageEnvarIndex] = $this->Page-$PagesToList; - $prev_url = $page."?env=".BuildEnv(); + $prev_url = $page."?env=".BuildEnv().$EnvSuffix; $o .= "<<"; } @@ -1676,7 +1682,7 @@ if($p!=$this->Page) { ${$v}[$this->PageEnvarIndex]=$p; - $href = $page."?env=".BuildEnv(); + $href = $page."?env=".BuildEnv().$EnvSuffix; $o .= " $p "; } else @@ -1688,7 +1694,7 @@ { ${$v}[$this->PageEnvarIndex]=$this->Page+$PagesToList; - $next_url = $page."?env=".BuildEnv(); + $next_url = $page."?env=".BuildEnv().$EnvSuffix; $o .= " >>"; } unset(${$v}[$this->PageEnvarIndex],$var_list_update["t"] ); Index: trunk/globals.php =================================================================== diff -u -N -r563 -r568 --- trunk/globals.php (.../globals.php) (revision 563) +++ trunk/globals.php (.../globals.php) (revision 568) @@ -201,17 +201,12 @@ Function QueryCount($sql) { - $countsql = "SELECT count(*) as TableCount ".substr($sql,strpos($sql," FROM ")); - if(strpos($countsql,"LIMIT")) - $countsql = substr($countsql,0,strpos($countsql,"LIMIT")); - if(strpos($countsql,"ORDER BY")) - $countsql = substr($countsql,0,strpos($countsql,"ORDER BY")); - - $db = &GetADODBConnection(); - $rs = $db->Execute($countsql); - //echo $countsql."
\n"; - $res = $rs->fields["TableCount"]; - return $res; + $sql = preg_replace('/SELECT(.*)FROM[ \n\r](.*)/is','SELECT COUNT(*) AS TableCount FROM $2', $sql); + $sql = preg_replace('/(.*)LIMIT(.*)/is','$1', $sql); + $sql = preg_replace('/(.*)ORDER BY(.*)/is','$1', $sql); + + $db =& GetADODBConnection(); + return $db->GetOne($sql); } function GetPageCount($ItemsPerPage,$NumItems) Index: trunk/kernel/include/portaluser.php =================================================================== diff -u -N -r553 -r568 --- trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 553) +++ trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 568) @@ -473,6 +473,12 @@ $ret = LangDate($d); } break; + + case 'send_pm_link': + $var_list_update['t'] = $element->GetAttributeByName('_Template'); + $ret = GetIndexURL()."?env=".BuildEnv()."&ToUser=".$this->Get('Login'); + break; + case "profile_link": /* @field:user.profile_link Index: trunk/themes/default/profile/view_profile.tpl =================================================================== diff -u -N -r13 -r568 --- trunk/themes/default/profile/view_profile.tpl (.../view_profile.tpl) (revision 13) +++ trunk/themes/default/profile/view_profile.tpl (.../view_profile.tpl) (revision 568) @@ -15,8 +15,12 @@   - "> + + "> "> + + "> +   Index: trunk/kernel/parser.php =================================================================== diff -u -N -r539 -r568 --- trunk/kernel/parser.php (.../parser.php) (revision 539) +++ trunk/kernel/parser.php (.../parser.php) (revision 568) @@ -3375,5 +3375,43 @@ $const_name = $attribs['_debugconst']; return defined($const_name) && (constant($const_name) == 1) ? 'yes' : ''; } + +function m_info($attribs = array()) +{ + switch ($attribs['_infotype']) + { + case 'site': + global $objConfig; + $ret = ThisDomain().$objConfig->Get('Site_Path'); + break; + + default: + $ret = ''; + break; + } + return $ret; +} + +function m_module_enabled($attribs = array()) +{ + global $objModules; + $module = $attribs['_module']; + // check if module is installed + $ModuleItem = $objModules->GetItemByField('Name', $module); + if( !is_object($ModuleItem) ) return ''; + + // module is enabled + $ret = $ModuleItem->Get('Loaded') == 1; + + // check if installed module is licensed + return $ret && _ModuleLicensed($module) ? 'yes' : ''; +} + +function m_recall($attribs = array()) +{ + global $objSession; + return $objSession->GetVariable($attribs['_name']); +} + ?> Index: trunk/kernel/include/parse.php =================================================================== diff -u -N -r537 -r568 --- trunk/kernel/include/parse.php (.../parse.php) (revision 537) +++ trunk/kernel/include/parse.php (.../parse.php) (revision 568) @@ -252,6 +252,7 @@ else { //$ret = "{Unknown Tag:" .$this->name."}"; + $ret = ''; } } return $ret; Index: trunk/themes/default/my_account.tpl =================================================================== diff -u -N -r13 -r568 --- trunk/themes/default/my_account.tpl (.../my_account.tpl) (revision 13) +++ trunk/themes/default/my_account.tpl (.../my_account.tpl) (revision 568) @@ -139,9 +139,25 @@
+
+ ">
+ + + &ResetPage=1"> +

+ +   + + +
+ +
+ +
+ ">
Index: trunk/kernel/action.php =================================================================== diff -u -N -r562 -r568 --- trunk/kernel/action.php (.../action.php) (revision 562) +++ trunk/kernel/action.php (.../action.php) (revision 568) @@ -1594,7 +1594,7 @@ $Template .= "\n"; } $Template = str_replace("\n\n","",$Template); - $Template .= "Subject: ".$_POST["subject"]."\n\n"; + $Template .= "Subject: "._unhtmlentities($_POST['subject'])."\n\n"; $Template .= $_POST["messageBody"]; $objMessages = new clsEmailMessageList(); $objMessages->SourceTable = $objSession->GetEditTable("EmailMessage"); Index: trunk/kernel/include/itemdb.php =================================================================== diff -u -N -r561 -r568 --- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 561) +++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 568) @@ -14,6 +14,8 @@ var $NoResourceId; var $debuglevel; + var $SelectSQL = 'SELECT * FROM %s WHERE %s'; + function clsItemDB() { $this->adodbConnection = &GetADODBConnection(); @@ -476,7 +478,7 @@ $conditions[] = "(`".$id_field[$i]."` = '".$Id[$i]."')"; $i++; } - $sql = sprintf('SELECT * FROM %s WHERE %s', $this->tablename, implode(' AND ', $conditions) ); + $sql = sprintf($this->SelectSQL, $this->tablename, implode(' AND ', $conditions) ); // --------- multiple ids allowed: end -------------------- if($this->debuglevel) echo "Load SQL: $sql
"; $result = $this->adodbConnection->Execute($sql); Index: trunk/admin/config/email_edit.php =================================================================== diff -u -N -r534 -r568 --- trunk/admin/config/email_edit.php (.../email_edit.php) (revision 534) +++ trunk/admin/config/email_edit.php (.../email_edit.php) (revision 568) @@ -213,7 +213,7 @@ > - +