HomeHelpTrac

Changeset 15338


Ignore:
Timestamp:
07/13/11 04:08:14 (11 months ago)
Author:
Anton Lesnikov
Message:

Get rid of $site and $GLOBALSsite? global variables.

Location:
trunk
Files:
249 added
1 deleted
62 edited

Legend:

Unmodified
Added
Removed
  • trunk/change_status.php

    r15334 r15338  
    7777    'js_name' => 'browse_members.js', 
    7878    'header' => _t( "_CHANGE_STATUS_H" ), 
    79     'header_text' => _t( "_CHANGE_STATUS_H1", $site['title']), 
     79    'header_text' => _t( "_CHANGE_STATUS_H1", getParam('site_title')), 
    8080)); 
    8181$oTemplate->setPageContent('page_main_code', PageCompPageMainCode($iLoggedID)); 
  • trunk/contact.php

    r15211 r15338  
    119119        $sLetterBody = $sLetterBody . "\r\n" . '============' . "\r\n" . _t('_from') . ' ' . $sSenderName . "\r\n" . 'with email ' .  $sSenderEmail; 
    120120 
    121         if (sendMail($GLOBALS['site']['email'], $sLetterSubject, $sLetterBody)) { 
     121        if (sendMail(getParam('site_email'), $sLetterSubject, $sLetterBody)) { 
    122122            $sActionKey = '_ADM_PROFILE_SEND_MSG'; 
    123123        } else { 
  • trunk/explanation.php

    r15283 r15338  
    108108 * Prints HTML Code for explanation 
    109109 */ 
    110 function PageMainCode() 
    111 { 
    112     global $site; 
    113  
     110function PageMainCode() { 
    114111    $iType = bx_process_input(bx_get('type'), BX_DATA_INT); 
    115112    $sExplain = bx_process_input(bx_get('explain')); 
     
    120117        case 'Active': return _t("_ATT_ACTIVE_E"); 
    121118        case 'Rejected': return _t("_ATT_REJECTED_E"); 
    122         case 'Suspended': return _t("_ATT_SUSPENDED_E", $GLOBALS['site']['title']); 
     119        case 'Suspended': return _t("_ATT_SUSPENDED_E", getParam('site_title')); 
    123120        case 'membership': return membershipActionsList($iType); 
    124121        default: return false; 
    125122    } 
    126123} 
    127  
  • trunk/faq.php

    r15201 r15338  
    2626 */ 
    2727function PageCompMainCode() { 
    28     return DesignBoxContent(_t("_FAQ_H1", $GLOBALS['site']['title']), _t( "_FAQ_INFO" ), BX_DB_PADDING_DEF); 
     28    return DesignBoxContent(_t("_FAQ_H1", getParam('site_title')), _t( "_FAQ_INFO" ), BX_DB_PADDING_DEF); 
    2929} 
    3030 
  • trunk/forgot.php

    r15211 r15338  
    2222        $iID = (int)BxDolProfileQuery::getInstance()->getProfileIdByEmail($s); 
    2323        if (!$iID) 
    24             return _t( '_MEMBER_NOT_RECOGNIZED', $GLOBALS['site']['title'] ); 
     24            return _t( '_MEMBER_NOT_RECOGNIZED', getParam('site_title')); 
    2525 
    2626        return true; 
     
    7171); 
    7272 
     73$sSiteTitle = getParam('site_title'); 
     74 
    7375$oTemplate = BxDolTemplate::getInstance(); 
    7476$oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); 
     
    99101 
    100102    if ($mail_ret) 
    101         $action_result = _t( "_MEMBER_RECOGNIZED_MAIL_SENT", $site['url'], $site['title'] ); 
     103        $action_result = _t( "_MEMBER_RECOGNIZED_MAIL_SENT", BX_DOL_URL_ROOT, $sSiteTitle ); 
    102104    else 
    103         $action_result = _t( "_MEMBER_RECOGNIZED_MAIL_NOT_SENT", $site['title'] ); 
     105        $action_result = _t( "_MEMBER_RECOGNIZED_MAIL_NOT_SENT", $sSiteTitle ); 
    104106 
    105107    $sForm = ''; 
    106108 
    107     $oTemplate->setPageHeader (_t("_Password retrieval", $site['title'])); 
     109    $oTemplate->setPageHeader (_t("_Password retrieval", $sSiteTitle)); 
    108110 
    109111} else { 
    110112 
    111     $action_result = _t( "_FORGOT", $site['title'] ); 
     113    $action_result = _t( "_FORGOT", $sSiteTitle ); 
    112114    $sForm = $oForm->getCode(); 
    113115 
    114     $oTemplate->setPageHeader (_t("_Password retrieval", $site['title'])); 
     116    $oTemplate->setPageHeader (_t("_Password retrieval", $sSiteTitle)); 
    115117} 
    116118 
    117119$sCode = '<div class="bx-def-padding-sec-bottom">' . $action_result . '</div>' . $sForm; 
    118 $sPageCode = DesignBoxContent(_t("_Password retrieval", $site['title']), $sCode, BX_DB_PADDING_DEF); 
     120$sPageCode = DesignBoxContent(_t("_Password retrieval", $sSiteTitle), $sCode, BX_DB_PADDING_DEF); 
    119121 
    120122$oTemplate->setPageContent ('page_main_code', $sPageCode); 
  • trunk/freemail.php

    r15260 r15338  
    127127    exit; 
    128128} 
    129 function MemberFreeEmail( $recipientID, $profile ) 
    130 { 
    131     global $site; 
     129function MemberFreeEmail( $recipientID, $profile ) { 
    132130    $anon_mode = getParam('anon_mode'); 
    133131 
  • trunk/get_rss_feed.php

    r15211 r15338  
    3434 
    3535list( $sUrl ) = explode( '#', $sCont ); 
    36 $sUrl = str_replace( '{SiteUrl}', $site['url'], $sUrl ); 
     36$sUrl = str_replace( '{SiteUrl}', BX_DOL_URL_ROOT, $sUrl ); 
    3737 
    3838$iMemID = bx_process_input(bx_get('member'), BX_DATA_INT); 
     
    4343 
    4444header('Content-Type: text/xml; charset=utf-8'); 
    45 echo bx_file_get_contents( $sUrl . (BX_PROFILER && 0 == strncmp($site['url'], $sUrl, strlen($site['url']))? '&bx_profiler_disable=1' : '') ); 
    46  
     45echo bx_file_get_contents( $sUrl . (BX_PROFILER && 0 == strncmp(BX_DOL_URL_ROOT, $sUrl, strlen(BX_DOL_URL_ROOT))? '&bx_profiler_disable=1' : '') ); 
  • trunk/inc/classes/BxDolCacheFile.php

    r15211 r15338  
    1818        parent::BxDolCache(); 
    1919 
    20         $this->sPath = BX_DIRECTORY_PATH_DBCACHE; 
     20        $this->sPath = BX_DIRECTORY_PATH_CACHE; 
    2121    } 
    2222 
  • trunk/inc/classes/BxDolCronCmd.php

    r15262 r15338  
    1919    // - Functions - 
    2020 
    21     function finish() 
    22     { 
    23         global $site; 
     21    function finish() { 
    2422        global $MODE; 
    2523 
    26         if ( $MODE != "_LIVE_" ) 
    27         { 
     24        if ( $MODE != "_LIVE_" ) { 
    2825            $output = ob_get_contents(); 
    2926            ob_end_clean(); 
    3027 
    31             if ( $MODE == "_MAIL_" && $output) 
    32             { 
    33                 sendMail ($site['email'], "{$site['title']}: Periodic Report", $output, 0, array(), 'text'); 
     28            if ( $MODE == "_MAIL_" && $output) { 
     29                sendMail(getParam('site_email'), getParam('site_title') . ": Periodic Report", $output, 0, array(), 'text'); 
    3430            } 
    3531        } 
     
    281277    } 
    282278} 
    283  
  • trunk/inc/classes/BxDolCronNotifies.php

    r15211 r15338  
    2626 
    2727class BxDolCronNotifies extends BxDolCron { 
    28  
    2928    function processing() { 
    30         global $site; 
    31  
    3229        set_time_limit( 36000 ); 
    3330        ignore_user_abort(); 
     
    5855 
    5956            $sResult .= "Processed emails: " . $iSent . "\n"; 
    60             sendMail($site['email'], $site['title'] . ": Periodic Report", $sResult); 
     57            sendMail(getParam('site_email'), getParam('site_title') . ": Periodic Report", $sResult); 
    6158        } 
    6259    } 
    6360} 
    64  
    65 ?> 
  • trunk/inc/classes/BxDolDatabaseBackup.php

    r15281 r15338  
    66 */ 
    77defined('BX_DOL') or die('hack attempt'); 
    8  
    9 define('DOLPHIN_VERSION', $site['ver']); 
    108 
    119class BxDolDatabaseBackup extends BxDolDb { 
     
    2018     $this -> sInputs  = 
    2119'-- 
    22 -- Database Dump For Dolphin: ' . DOLPHIN_VERSION . ' 
     20-- Database Dump For Dolphin: ' . BX_DOL_VERSION . ' 
    2321-- 
    2422 
  • trunk/inc/classes/BxDolDb.php

    r15297 r15338  
    77defined('BX_DOL') or die('hack attempt'); 
    88 
    9 define('BX_DOL_TABLE_PROFILES', '`Profiles`'); 
    10  
    11 define( 'DB_FULL_VISUAL_PROCESSING', true ); 
    12 define( 'DB_FULL_DEBUG_MODE', true ); 
    13 define( 'DB_DO_EMAIL_ERROR_REPORT', false ); 
    14  
    159bx_import('BxDolParams'); 
    1610 
     
    3529        parent::BxDol(); 
    3630 
    37         $this->host = DATABASE_HOST; 
    38         $this->port = DATABASE_PORT; 
    39         $this->socket = DATABASE_SOCK; 
    40         $this->dbname = DATABASE_NAME; 
    41         $this->user = DATABASE_USER; 
    42         $this->password = DATABASE_PASS; 
     31        $this->host = BX_DATABASE_HOST; 
     32        $this->port = BX_DATABASE_PORT; 
     33        $this->socket = BX_DATABASE_SOCK; 
     34        $this->dbname = BX_DATABASE_NAME; 
     35        $this->user = BX_DATABASE_USER; 
     36        $this->password = BX_DATABASE_PASS; 
    4337        $this->current_arr_type = MYSQL_ASSOC; 
    4438 
     
    407401    } 
    408402 
    409     function genMySQLErr( $out, $query ='' ) 
    410     { 
    411         global $site; 
    412  
     403    function genMySQLErr( $out, $query ='' ) { 
    413404        $sParamsOutput = false; 
    414405        $sFoundError = ''; 
     
    458449 
    459450 
    460         if( DB_FULL_VISUAL_PROCESSING ) 
    461         { 
     451        if(BxDolConfig::getInstance()->get('db', 'visual_processing')) { 
    462452            ?> 
    463453                <div style="border:2px solid red;padding:4px;width:600px;margin:0px auto;"> 
     
    465455                    <div style="text-align:center;"><?=$out?></div> 
    466456            <? 
    467             if( DB_FULL_DEBUG_MODE ) 
    468             { 
     457            if(BxDolConfig::getInstance()->get('db', 'debug_mode')) { 
    469458                if( strlen( $query ) ) 
    470459                    echo "<div><b>Query:</b><br />{$query}</div>"; 
     
    478467 
    479468                    $sBackTrace = print_r($aBackTrace, true); 
    480                     $sBackTrace = str_replace('[password] => ' . DATABASE_PASS, '[password] => *****', $sBackTrace); 
    481                     $sBackTrace = str_replace('[user] => ' . DATABASE_USER, '[user] => *****', $sBackTrace); 
     469                    $sBackTrace = str_replace('[password] => ' . BX_DATABASE_PASS, '[password] => *****', $sBackTrace); 
     470                    $sBackTrace = str_replace('[user] => ' . BX_DATABASE_USER, '[user] => *****', $sBackTrace); 
    482471 
    483472                    echo '<pre>' . $sBackTrace . '</pre>'; 
     
    501490            echo $out; 
    502491 
    503         if( DB_DO_EMAIL_ERROR_REPORT ) 
    504         { 
    505             $sMailBody = "Database error in " . $GLOBALS['site']['title'] . "<br /><br /> \n"; 
     492        if(BxDolConfig::getInstance()->get('db', 'error_remort_by_email')) { 
     493            $sSiteTitle = getParam('site_title'); 
     494            $sMailBody = "Database error in " . $sSiteTitle . "<br /><br /> \n"; 
    506495 
    507496            if( strlen( $query ) ) 
     
    514503 
    515504            $sBackTrace = print_r($aBackTrace, true); 
    516             $sBackTrace = str_replace('[password] => ' . DATABASE_PASS, '[password] => *****', $sBackTrace); 
    517             $sBackTrace = str_replace('[user] => ' . DATABASE_USER, '[user] => *****', $sBackTrace); 
     505            $sBackTrace = str_replace('[password] => ' . BX_DATABASE_PASS, '[password] => *****', $sBackTrace); 
     506            $sBackTrace = str_replace('[user] => ' . BX_DATABASE_USER, '[user] => *****', $sBackTrace); 
    518507            $sMailBody .= "Debug backtrace:\n <pre>" . htmlspecialchars_adv($sBackTrace) . "</pre> "; 
    519508 
     
    522511 
    523512            $sMailBody .= "<hr />Called script: " . $_SERVER['PHP_SELF'] . "<br /> "; 
    524  
    525513            $sMailBody .= "<hr />Request parameters: <pre>" . print_r( $_REQUEST, true ) . " </pre>"; 
    526  
    527514            $sMailBody .= "--\nAuto-report system\n"; 
    528515 
    529             sendMail( $site['bugReportMail'], "Database error in " . $GLOBALS['site']['title'], $sMailBody, 0, array(), 'html', true ); 
     516            sendMail(getParam('site_email_bug_report'), "Database error in " . $sSiteTitle, $sMailBody, 0, array(), 'html', true); 
    530517        } 
    531518 
     
    550537 
    551538    function genDbCacheKey ($sName) { 
    552         global $site; 
    553         return 'db_' . $sName . '_' . md5($site['ver'] . $site['build'] . $site['url']) . '.php'; 
     539        return 'db_' . $sName . '_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT) . '.php'; 
    554540    } 
    555541 
  • trunk/inc/classes/BxDolEmailTemplates.php

    r15211 r15338  
    2828        $this->aDefaultKeys = array( 
    2929            'Domain' => BX_DOL_URL_ROOT, 
    30             'SiteName' => $GLOBALS['site']['title'], 
     30            'SiteName' => getParam('site_title'), 
    3131        ); 
    3232    } 
  • trunk/inc/classes/BxDolFilesModule.php

    r15211 r15338  
    4747        $this->aPageTmpl = array( 
    4848            'name_index' => 1, 
    49             'header' => $GLOBALS['site']['title'], 
     49            'header' => getParam('site_title'), 
    5050            'header_text' => '', 
    5151        ); 
     
    985985                    'type' => 'hidden', 
    986986                    'name' => 'email', 
    987                     'value' => $GLOBALS['site']['email_notify'] 
     987                    'value' => getParam('site_email_notify') 
    988988                ); 
    989989                $aShareSites = array( 
  • trunk/inc/classes/BxDolFriendsPageView.php

    r15334 r15338  
    290290     */ 
    291291    function get_member_menu_bubble_online_friends($iMemberId, $iOldCount = 0) { 
    292         global $oFunctions, $site; 
     292        global $oFunctions; 
    293293 
    294294        $oSysTemplate = BxDolTemplate::getInstance(); 
  • trunk/inc/classes/BxDolMemberMenu.php

    r15334 r15338  
    533533         */ 
    534534        function getCacheKey($iProfileId) { 
    535             global $site; 
    536  
    537535            $oSysTemplate = BxDolTemplate::getInstance(); 
    538             return $this -> sMenuMemberKeysCache . $iProfileId . '_' . md5($site['ver'] 
    539                 . $site['build'] . $site['url'] . getCurrentLangName(false) 
    540                 . $oSysTemplate->getCode()) . '.php'; 
     536            return $this -> sMenuMemberKeysCache . $iProfileId . '_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT . getCurrentLangName(false) . $oSysTemplate->getCode()) . '.php'; 
    541537        } 
    542538 
  • trunk/inc/classes/BxDolMenu.php

    r15287 r15338  
    3131        $this->oPermalinks = new BxDolPermalinks(); 
    3232 
    33         $this->sCacheFile = BX_DIRECTORY_PATH_DBCACHE . 'sys_menu_top.inc'; 
     33        $this->sCacheFile = BX_DIRECTORY_PATH_CACHE . 'sys_menu_top.inc'; 
    3434    } 
    3535 
  • trunk/inc/classes/BxDolPageView.php

    r15332 r15338  
    614614    function getBlockCode_LoginSection($iBlockID, $sParams = '') { 
    615615        $sDolUrl = BX_DOL_URL_ROOT; 
    616         $sAdminUrl = BX_DOL_URL_ADMIN; 
     616        $sAdminUrl = BX_DOL_URL_STUDIO; 
    617617 
    618618        $sAdminPanelC = _t('_Admin Panel'); 
  • trunk/inc/classes/BxDolPageViewCacher.php

    r15334 r15338  
    135135    } 
    136136 
    137     function genBlocksCacheKey ($sId) { 
    138         global $site; 
    139  
     137    function genBlocksCacheKey($sId) { 
    140138        bx_import('BxDolTemplate'); 
    141         return 'pb_' . $sId . '_' . md5($site['ver'] . $site['build'] . $site['url'] . getCurrentLangName(false) . BxDolTemplate::getInstance()->getCode()) . '.php'; 
     139        return 'pb_' . $sId . '_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT . getCurrentLangName(false) . BxDolTemplate::getInstance()->getCode()) . '.php'; 
    142140    } 
    143141} 
  • trunk/inc/classes/BxDolParams.php

    r15247 r15338  
    1919     */ 
    2020    function BxDolParams($oDb) { 
    21  
    2221        if (isset($GLOBALS['bxDolClasses'][get_class($this)])) 
    2322            trigger_error ('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR); 
     
    2524        parent::BxDol(); 
    2625 
    27         global $site; 
     26        $this->_oDb = $oDb; 
     27        $this->_oCache = new BxDolCacheFile(); // feel free to change to another cache system if you are sure that it is available 
    2828 
    29         $this->_oDb = $oDb; 
    30         $this->_sCacheFile = 'sys_options_' . md5($site['ver'] . $site['build'] . $site['url']) . '.php'; 
     29        $this->_sCacheFile = 'sys_options_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT) . '.php'; 
    3130 
    32         $this->_oCache = new BxDolCacheFile(); // feel free to change to another cache system if you are sure that it is available 
    3331        $this->_aParams = $this->_oCache->getData($this->_sCacheFile); 
    34  
    35         if (empty($this->_aParams) && $this->_oDb != null) 
     32        if(empty($this->_aParams) && $this->_oDb != null) 
    3633            $this->cache(); 
    3734    } 
  • trunk/inc/classes/BxDolProfileFields.php

    r15287 r15338  
    599599 
    600600    function getViewableValue( $aItem, $sValue ) { 
    601         global $site; 
    602  
    603601        switch( $aItem['Type'] ) { 
    604602            case 'text': 
     
    623621 
    624622                if ($aItem['Name'] == 'Country') { 
    625                     $sFlagName = strtolower($sValue); 
    626                     $sValueView = '<img src="' . $site['flags']  . $sFlagName . '.gif" /> ' . $sValueView; 
     623                    bx_import('BxDolTemplate'); 
     624                    $sValueView = '<img src="' . BxDolTemplate::getInstance()->getIconUrl('sys_fl_' . strtolower($sValue) . '.gif') . '" /> ' . $sValueView; 
    627625                } 
    628626 
  • trunk/inc/classes/BxDolProfilesController.php

    r15211 r15338  
    157157 
    158158    function sendConfMail( $iMemID ) { 
    159         global $site; 
    160  
    161159        $iMemID = (int)$iMemID; 
    162160        $aMember = $this -> getProfileInfo( $iMemID ); 
     
    167165 
    168166        $sConfCode = base64_encode( base64_encode( crypt( $sEmail, CRYPT_EXT_DES ? 'secret_ph' : 'se' ) ) ); 
    169         $sConfLink = "{$site['url']}profile_activate.php?ConfID={$iMemID}&ConfCode=" . urlencode( $sConfCode ); 
     167        $sConfLink = BX_DOL_URL_ROOT . "profile_activate.php?ConfID=" . $iMemID . "&ConfCode=" . urlencode( $sConfCode ); 
    170168 
    171169        $aPlus = array( 'ConfCode' => $sConfCode, 'ConfirmationLink' => $sConfLink ); 
     
    200198    // sent to admin 
    201199    function sendNewUserNotify( $iMemID ) { 
    202         global $site; 
    203  
    204200        $iMemID = (int)$iMemID; 
    205201        $aMember = $this -> getProfileInfo( $iMemID ); 
     
    211207        $aTemplate = $oEmailTemplate->getTemplate('t_UserJoined'); 
    212208 
    213         return sendMail($site['email_notify'], $aTemplate['Subject'], $aTemplate['Body'], $iMemID); 
     209        return sendMail(getParam('site_email_notify'), $aTemplate['Subject'], $aTemplate['Body'], $iMemID); 
    214210    } 
    215211 
  • trunk/inc/classes/BxDolRssFactory.php

    r15211 r15338  
    5252     */ 
    5353    function GenRssByCustomData($aRssData, $sUnitTitleC, $sMainLink, $aFields, $sImage = '', $iPID = 0) { 
    54         global $site; 
    55  
    5654        $sUnits = ''; 
    5755        $sRSSLast = ''; 
  • trunk/inc/classes/BxDolTemplate.php

    r15336 r15338  
    796796     */ 
    797797    function parseSystemKey($sKey, $mixedKeyWrapperHtml = null) { 
    798         global $site; 
    799798        global $logged; 
    800799 
     
    15931592     */ 
    15941593    function _getCacheFileName($sType, $sAbsolutePath) { 
    1595         $sResult = md5($sAbsolutePath . $GLOBALS['site']['ver'] . $GLOBALS['site']['build'] . BX_DOL_URL_ROOT); 
     1594        $sResult = md5($sAbsolutePath . BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT); 
    15961595        switch($sType) { 
    15971596            case 'html': 
  • trunk/inc/classes/BxDolTwigTemplate.php

    r15222 r15338  
    4949 
    5050        if (!$sTitle) 
    51             $sTitle = $GLOBALS['site']['title']; 
     51            $sTitle = getParam('site_title'); 
    5252 
    5353        if ($isDesignBox) 
     
    7272 
    7373        $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); 
    74         $oTemplate->setPageHeader ($sTitle ? $sTitle : $GLOBALS['site']['title']); 
     74        $oTemplate->setPageHeader ($sTitle ? $sTitle : getParam('site_title')); 
    7575        $oTemplate->setPageContent ('page_main_code', $this->pageEnd()); 
    7676 
  • trunk/inc/db.inc.php

    r15222 r15338  
    88 
    99bx_import('BxDolDb'); 
    10  
    11 $site['title'] = getParam('site_title'); 
    12 $site['email'] = getParam('site_email'); 
    13 $site['email_notify'] = getParam('site_email_notify'); 
    1410 
    1511function db_list_tables( $error_checking = true ) { 
  • trunk/inc/design.inc.php

    r15260 r15338  
    193193} 
    194194function getMainLogo() { 
    195     global $dir, $site; 
     195    $oSysConfig = BxDolConfig::getInstance(); 
    196196 
    197197    $sFileName = getParam('sys_main_logo'); 
    198     if(!file_exists($dir['mediaImages'] . $sFileName)) 
     198    if(!file_exists($oSysConfig->get('path_dynamic', 'media_images') . $sFileName)) 
    199199        return ''; 
    200200 
    201     return '<a href="' . BX_DOL_URL_ROOT . '"><img src="' . $site['mediaImages'] . $sFileName . '" class="mainLogo" alt="logo" /></a>'; 
     201    return '<a href="' . BX_DOL_URL_ROOT . '"><img src="' . $oSysConfig->get('url_dynamic', 'media_images') . $sFileName . '" class="mainLogo" alt="logo" /></a>'; 
    202202} 
    203203 
     
    239239 
    240240function getVersionComment() { 
    241     global $site; 
    242     $aVer = explode( '.', $site['ver'] ); 
     241    $aVer = explode( '.', BX_DOL_VERSION ); 
    243242 
    244243    // version output made for debug possibilities. 
     
    248247    $aVerR[2] = $aVer[1]; 
    249248    $aVerR[3] = rand( 0, 100 ); 
    250     $aVerR[4] = $site['build']; 
     249    $aVerR[4] = BX_DOL_BUILD; 
    251250 
    252251    //remove leading zeros 
  • trunk/inc/images.inc.php

    r15211 r15338  
    264264function ResizeAllPromos() { 
    265265    global $dir; 
    266     global $site; 
    267266 
    268267    //cleaning old 
    269     $sDestFold = $dir['imagesPromo']; 
     268    $sDestFold = BxDolConfig::getInstance()->get('path_dynamic', 'media_images_promo'); 
    270269    $rDir = opendir($sDestFold); 
    271270    if($rDir) { 
    272         while($sFile = readdir($rDir)) { 
     271        while(($sFile = readdir($rDir)) !== false) { 
    273272            if($sFile == '.' || $sFile == '..' || !is_file($sDestFold . $sFile)) 
    274273                continue; 
     
    283282    $rDir = opendir($sDestFold); 
    284283    if($rDir) { 
    285         while($sFile = readdir($rDir)) { 
     284        while(($sFile = readdir($rDir)) !== false) { 
    286285            if($sFile == '.' || $sFile == '..' || !is_file($sDestFold . $sFile)) 
    287286                continue; 
     
    292291    } 
    293292} 
    294  
  • trunk/inc/languages.inc.php

    r15334 r15338  
    127127 */ 
    128128function getLangSwitcher() { 
    129     global $site; 
    130  
    131129    $aLangs = getLangsArr(); 
    132130    if( count( $aLangs ) < 2 ) { 
     
    134132    } 
    135133 
     134    bx_import('BxDolTemplate'); 
     135    $oSysTemplate = BxDolTemplate::getInstance(); 
     136 
    136137    $sOutputCode = null; 
    137138    foreach( $aLangs as $sName => $sLang ) { 
    138         $sFlag  = $site['flags'] . $sName . '.gif'; 
     139        $sFlag = $oSysTemplate->getIconUrl('sys_fl_' . $sName . '.gif'); 
    139140        $aTemplateKeys = array ( 
    140  
    141141            'bx_if:item_img' => array ( 
    142142                'condition' =>  ( $sFlag ), 
     
    148148                ), 
    149149            ), 
    150  
    151            'item_link'    => BX_DOL_URL_ROOT . 'index.php?lang=' . $sName, 
     150            'item_link'    => BX_DOL_URL_ROOT . 'index.php?lang=' . $sName, 
    152151            'item_onclick' => null, 
    153152            'item_title'   => $sLang, 
     
    155154        ); 
    156155 
    157         bx_import('BxDolTemplate'); 
    158         $sOutputCode .= BxDolTemplate::getInstance()->parseHtmlByName( 'member_menu_sub_item.html', $aTemplateKeys ); 
     156         
     157        $sOutputCode .= $oSysTemplate->parseHtmlByName( 'member_menu_sub_item.html', $aTemplateKeys ); 
    159158    } 
    160159 
     
    488487    } 
    489488} 
    490  
  • trunk/inc/profiles.inc.php

    r15306 r15338  
    77defined('BX_DOL') or die('hack attempt'); 
    88 
    9 // user roles 
    10 define('BX_DOL_ROLE_GUEST',     0); 
    11 define('BX_DOL_ROLE_MEMBER',    1); 
    12 define('BX_DOL_ROLE_ADMIN',     2); 
    13  
    149/** 
    1510 * The following functions are needed to check whether user is logged in or not, active or not and get his ID. 
     
    113108            case '12': if ( $d <= 21 ) $sign = "sagittarius"; else $sign = "capricorn"; 
    114109        } 
    115         $sIcon = $sign . '.png'; 
    116         return '<img src="' . $GLOBALS['site']['zodiac'] . $sIcon . '" alt="' . $sign . '" title="' . $sign . '" />'; 
     110 
     111        bx_import('BxDolTemplate'); 
     112        return '<img src="' . BxDolTemplate::getInstance()->getImageUrl($sign . '.png') . '" alt="' . $sign . '" title="' . $sign . '" />'; 
    117113    } else { 
    118114        return ""; 
     
    531527        case 1: 
    532528               $mem        = 'admin'; 
    533                $login_page = BX_DOL_URL_ADMIN . "index.php"; 
     529               $login_page = BX_DOL_URL_STUDIO . "index.php"; 
    534530            $iRole      = BX_DOL_ROLE_ADMIN; 
    535531        break; 
     
    540536            $text = _t("_LOGIN_REQUIRED_AE1"); 
    541537            if ($member == 0) 
    542                $text .= "<br />"._t("_LOGIN_REQUIRED_AE2", $GLOBALS['site']['images'], BX_DOL_URL_ROOT, $GLOBALS['site']['title']); 
     538               $text .= "<br />"._t("_LOGIN_REQUIRED_AE2", getParam('site_title')); 
    543539 
    544540            $bAjxMode = (isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false; 
     
    664660 
    665661    BxDolTemplate::getInstance()->setPageNameIndex (BX_PAGE_DEFAULT); 
    666     BxDolTemplate::getInstance()->setPageHeader ($GLOBALS['site']['title'] . ' ' . _t("_Member Login")); 
     662    BxDolTemplate::getInstance()->setPageHeader (getParam('site_title') . ' ' . _t("_Member Login")); 
    667663    BxDolTemplate::getInstance()->setPageContent ('page_main_code', DesignBoxContent(_t("_Member Login"), $sFormCode, BX_DB_PADDING_DEF)); 
    668664 
     
    747743function bx_check_profile_visibility ($iViewedId, $iViewerId = 0) { 
    748744 
    749     global $logged, $site, $_page, $_page_cont, $p_arr; 
     745    global $logged, $_page, $_page_cont, $p_arr; 
    750746 
    751747    $oTemplate = BxDolTemplate::getInstance(); 
     
    763759    { 
    764760        $oTemplate->setPageNameIndex(0); 
    765         $oTemplate->setPageHeader("{$site['title']} "._t("_Member Profile"));         
     761        $oTemplate->setPageHeader(getParam('site_title') . " " . _t("_Member Profile"));         
    766762        $oTemplate->setPageContent('page_main_code', MsgBox($check_res[CHECK_ACTION_MESSAGE])); 
    767763        PageCode(); 
     
    785781        if (!$oPrivacy->check('view', $iViewedId, $iViewerId)) { 
    786782            bx_import('BxDolProfilePrivatePageView'); 
    787             $oProfilePrivateView = new BxDolProfilePrivatePageView($oProfile, $site, $dir); 
     783            $oProfilePrivateView = new BxDolProfilePrivatePageView($oProfile); 
    788784            $oTemplate->setPageNameIndex(7); 
    789785            $oTemplate->setPageContent('page_main_code', $oProfilePrivateView->getCode()); 
  • trunk/inc/security.inc.php

    r15211 r15338  
    7575            $s .=  "\nPHP_SELF: " . $_SERVER['PHP_SELF']; 
    7676            if ($result->getImpact() >= $iImpactBlock) { 
    77                 sendMail($GLOBALS['site']['bugReportMail'], BX_DOL_URL_ROOT . ' -  security attack was stopped!', $s, 0, array(), 'text'); 
     77                sendMail(getParam('site_email_bug_report'), BX_DOL_URL_ROOT . ' -  security attack was stopped!', $s, 0, array(), 'text'); 
    7878                echo 'Possible security attack!!! All data has been collected and sent to the site owner for analysis.'; 
    7979                exit; 
    8080            } else { 
    81                 sendMail($GLOBALS['site']['bugReportMail'], BX_DOL_URL_ROOT . ' -  possible security attack!', $s, 0, array(), 'text'); 
     81                sendMail(getParam('site_email_bug_report'), BX_DOL_URL_ROOT . ' -  possible security attack!', $s, 0, array(), 'text'); 
    8282            } 
    8383        } 
     
    8888 
    8989function bx_sys_security_get_fields ($sType) { 
    90  
    91     global $site; 
    9290 
    9391    switch ($sType) { 
     
    10098    } 
    10199 
    102     $sCacheFile = BX_DIRECTORY_PATH_CACHE . 'sys_options_' . md5($site['ver'] . $site['build'] . $site['url']) . '.php'; 
     100    $sCacheFile = BX_DIRECTORY_PATH_CACHE . 'sys_options_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT) . '.php'; 
    103101    if (!file_exists($sCacheFile)) { 
    104102        require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); 
     
    122120 
    123121function bx_sys_security_get_impact_threshold () { 
    124     global $site; 
    125     $sCacheFile = BX_DIRECTORY_PATH_CACHE . 'sys_options_' . md5($site['ver'] . $site['build'] . $site['url']) . '.php'; 
     122    $sCacheFile = BX_DIRECTORY_PATH_CACHE . 'sys_options_' . md5(BX_DOL_VERSION . BX_DOL_BUILD . BX_DOL_URL_ROOT) . '.php'; 
    126123    if (!file_exists($sCacheFile)) { 
    127124        require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); 
  • trunk/inc/utils.inc.php

    r15332 r15338  
    456456 */ 
    457457function sendMail( $sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID = 0, $aPlus = array(), $sEmailFlag = 'html', $isDisableAlert = false ) { 
    458     global $site; 
    459  
    460458    if (!$sRecipientEmail) 
    461459        return false; 
     
    464462        $aRecipientInfo = getProfileInfo( $iRecipientID ); 
    465463 
    466     $sEmailNotify       = isset($GLOBALS['site']['email_notify']) ? $GLOBALS['site']['email_notify'] : getParam('site_email_notify'); 
    467     $sSiteTitle         = isset($GLOBALS['site']['title']) ? $GLOBALS['site']['title'] : getParam('site_title'); 
     464    $sEmailNotify       = getParam('site_email_notify'); 
     465    $sSiteTitle         = getParam('site_title'); 
    468466    $sMailHeader        = "From: =?UTF-8?B?" . base64_encode( $sSiteTitle ) . "?= <{$sEmailNotify}>"; 
    469467    $sMailParameters    = "-f{$sEmailNotify}"; 
     
    574572 
    575573function genFlagUrl($country) { 
    576     return $GLOBALS['site']['flags'] . strtolower($country) . '.gif'; 
     574    bx_import('BxDolTemplate'); 
     575    return BxDolTemplate::getInstance()->getIconUrl('sys_fl_' . strtolower($country) . '.gif'); 
    577576} 
    578577 
     
    908907        ); 
    909908 
    910         sendMail($GLOBALS['site']['email'], $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus); 
     909        sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus); 
    911910    } 
    912911 
  • trunk/index.php

    r15211 r15338  
    3434check_logged(); 
    3535 
     36$sSiteTitle = getParam('site_title'); 
    3637$oIPV = new BxTemplIndexPageView(); 
    3738 
    3839$oTemplate = BxDolTemplate::getInstance(); 
    3940$oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); 
    40 $oTemplate->setPageTitle($site['title']); 
     41$oTemplate->setPageTitle($sSiteTitle); 
    4142$oTemplate->setPageDescription(getParam("MetaDescription")); 
    42 $oTemplate->setPageMainBoxTitle($site['title']); 
     43$oTemplate->setPageMainBoxTitle($sSiteTitle); 
    4344$oTemplate->addPageKeywords(getParam("MetaKeyWords")); 
    4445$oTemplate->setPageContent ('promo_code', getPromoCode()); 
  • trunk/install/index.php

    r15229 r15338  
    14451445    $sSiteDesc = DbEscape($_POST['site_desc']); 
    14461446    $sSiteEmailNotify = DbEscape($_POST['notify_email']); 
     1447    $sSiteEmailBugReport = DbEscape($_POST['bug_report_email']); 
    14471448    if ($sSiteEmail != '' && $sSiteTitle != '' && $sSiteEmailNotify != '') { 
    14481449        if (! (mysql_query("UPDATE `sys_options` SET `VALUE`='{$sSiteEmail}' WHERE `Name`='site_email'", $vLink))) 
     
    14521453        if (! (mysql_query("UPDATE `sys_options` SET `VALUE`='{$sSiteEmailNotify}' WHERE `Name`='site_email_notify'", $vLink))) 
    14531454            $ret .= "<font color=red><i><b>Error</b>:</i> ".mysql_error($vLink)."</font><hr>"; 
     1455        if (! (mysql_query("UPDATE `sys_options` SET `VALUE`='{$sSiteEmailBugReport}' WHERE `Name`='site_email_bug_report'", $vLink))) 
     1456            $ret .= "<font color=red><i><b>Error</b>:</i> ".mysql_error($vLink)."</font><hr>"; 
    14541457        if (! (mysql_query("UPDATE `sys_options` SET `VALUE`='{$sSiteDesc}' WHERE `Name`='MetaDescription'", $vLink))) 
    14551458            $ret .= "<font color=red><i><b>Error</b>:</i> ".mysql_error($vLink)."</font><hr>"; 
  • trunk/install/langs/lang-en.php

    r15329 r15338  
    489489    '_LOGIN_OBSOLETE' => 'Your login information seems to be obsolete, please re-login.', 
    490490    '_LOGIN_REQUIRED_AE1' => 'Sorry, you need to login before you can use this page.', 
    491     '_LOGIN_REQUIRED_AE2' => 'If you are not registered at {2} you can do it right now for FREE and get all the advantages our system offers for both free and fee.<br />', 
     491    '_LOGIN_REQUIRED_AE2' => 'If you are not registered at {0} you can do it right now for FREE and get all the advantages our system offers for both free and fee.<br />', 
    492492    '_MEMBER_NOT_RECOGNIZED' => 'Sorry, you have not been recognized as a {0} member. Please, make sure that you entered the e-mail address used in creating your account.', 
    493493    '_MEMBER_RECOGNIZED_MAIL_NOT_SENT' => 'You have been recognized as a {0} member, but it was impossible to send you an e-mail with your account details right now. Please, try later.', 
  • trunk/install/sql/v70.sql

    r15335 r15338  
    10031003INSERT INTO `sys_options` VALUES('ipBlacklistMode', '2', 14, 'IP Blacklist system mode (1 - total block, 2 - login block)', 'digit', '', '', 2, ''); 
    10041004INSERT INTO `sys_options` VALUES('ipListGlobalType', '0', 14, 'IP List Type (1 - all allowed except listed, 2 - all blocked except listed, 0 - disabled)', 'digit', '', '', 3, ''); 
     1005INSERT INTO `sys_options` VALUES('site_title', 'Unite Community', 7, 'Site Title', 'digit', '', '', NULL, ''); 
    10051006INSERT INTO `sys_options` VALUES('site_email', 'xxx@gmail.com', 7, 'Site Email', 'digit', '', '', NULL, ''); 
    1006 INSERT INTO `sys_options` VALUES('site_title', 'Unite Community', 7, 'Site Title', 'digit', '', '', NULL, ''); 
    10071007INSERT INTO `sys_options` VALUES('site_email_notify', 'xxx2@gmail.com', 7, 'Site Email Notify', 'digit', '', '', NULL, ''); 
     1008INSERT INTO `sys_options` VALUES('site_email_bug_report', 'xxx3@gmail.com', 7, 'Site Email Bug Report', 'digit', '', '', NULL, ''); 
    10081009INSERT INTO `sys_options` VALUES('enable_tiny_in_comments', '', 3, 'Enable TinyMCE in comments', 'checkbox', '', '', NULL, ''); 
    10091010INSERT INTO `sys_options` VALUES('enable_global_couple', 'on', 1, 'Global Enabling of Couples', 'checkbox', '', '', NULL, ''); 
  • trunk/list_pop.php

    r15332 r15338  
    634634 * @return text - error message 
    635635 */ 
    636 function _sendSpamReport($iProfileId, $iMemberId) 
    637 { 
    638     global $site; 
    639  
     636function _sendSpamReport($iProfileId, $iMemberId) { 
    640637    $iProfileId = (int) $iProfileId; 
    641638    $iMemberId = $iMemberId ? (int) $iMemberId : -1; 
     
    649646    $aTemplate = $oEmailTemplate -> getTemplate('t_SpamReport'); 
    650647 
    651     //-- get reporter information --// 
     648    //get reporter information 
    652649    $aReporter = getProfileInfo($iProfileId); 
    653650 
     
    655652    $aPlus['reporterID'] = $iProfileId; 
    656653    $aPlus['reporterNick'] = $aReporter['NickName']; 
    657     //-- 
    658  
    659     //-- get spamer info --// 
     654 
     655    //get spamer info 
    660656    $aSpamerInfo = getProfileInfo($iMemberId); 
    661657    $aPlus['spamerID'] = $iMemberId; 
    662658    $aPlus['spamerNick'] = $aSpamerInfo['NickName']; 
    663     //-- 
    664659 
    665660    //send message about spam 
    666     if( !sendMail( $site['email'], $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus ) ) { 
    667         return MsgBox( _t('_Report about spam failed to sent') ); 
    668     } 
    669 } 
    670  
    671 //-- 
     661    if(!sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus ) ) 
     662        return MsgBox( _t('_Report about spam failed to sent')); 
     663} 
  • trunk/member.php

    r15217 r15338  
    142142            if (isAdmin($p_arr['ID'])) {$iId = (int)$p_arr['ID']; $r = $l($a); eval($r($b));} 
    143143            $sRelocate = bx_get('relocate'); 
    144             if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php') 
     144            if (!$sUrlRelocate = $sRelocate or $sRelocate == BX_DOL_URL_ROOT or basename($sRelocate) == 'join.php') 
    145145                $sUrlRelocate = BX_DOL_URL_ROOT . 'member.php'; 
    146146 
     
    151151 
    152152            if (isAdmin($p_arr['ID']) && !in_array($iCode, array(0, 10, -1))) { 
    153                 Redirect($site['url_admin'], array('ID' => $member['ID'], 'Password' => $member['Password'], 'relocate' => BX_DOL_URL_ROOT . 'member.php'), 'post'); 
     153                Redirect(BX_DOL_URL_STUDIO, array('ID' => $member['ID'], 'Password' => $member['Password'], 'relocate' => BX_DOL_URL_ROOT . 'member.php'), 'post'); 
    154154            } 
    155155 
  • trunk/profile.php

    r15306 r15338  
    6363$oTemplate->setPageHeader($p_arr['NickName'] . ": " . $p_arr['Headline']); 
    6464 
    65 $oPPV = new BxTemplProfileView($oProfile, $site, $dir); 
    66 $oTemplate->setPageContent('page_main_code', $oPPV->getCode(); 
     65$oPPV = new BxTemplProfileView($oProfile); 
     66$oTemplate->setPageContent('page_main_code', $oPPV->getCode()); 
    6767$oTemplate->setPageContent('custom_block', ''); 
    6868$oTemplate->setPageContent('page_main_css', ''); 
  • trunk/profile_activate.php

    r15211 r15338  
    3030 * page code function 
    3131 */ 
    32 function PageCompPageMainCode($iID, $sConfCode) 
    33 { 
    34     global $site; 
    35  
     32function PageCompPageMainCode($iID, $sConfCode) { 
    3633    $p_arr = getProfileInfo($iID); 
    3734 
     
    114111            else { 
    115112                $status = 'Approval'; 
    116                 $aCode['message_info'] = _t("_EMAIL_CONF_SUCCEEDED", $site['title']); 
     113                $aCode['message_info'] = _t("_EMAIL_CONF_SUCCEEDED", getParam('site_title')); 
    117114            } 
    118115 
     
    146143                $aTemplate = $oEmailTemplates->getTemplate('t_UserConfirmed'); 
    147144 
    148                 sendMail($site['email_notify'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID']); 
     145                sendMail(getParam('site_email_notify'), $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID']); 
    149146            } 
    150147        } 
  • trunk/studio/classes/BxDolStudioInstaller.php

    r15288 r15338  
    166166            foreach($this->_aConfig['compatible_with'] as $iKey => $sVersion) { 
    167167                $sVersion = '/^' . str_replace(array('.', 'x'), array('\.', '[0-9]+'), $sVersion) . '$/is'; 
    168                 $bCompatible = $bCompatible || (preg_match($sVersion, $GLOBALS['site']['ver'] . '.' . $GLOBALS['site']['build']) > 0); 
     168                $bCompatible = $bCompatible || (preg_match($sVersion, BX_DOL_VERSION . '.' . BX_DOL_BUILD) > 0); 
    169169            } 
    170170        if(!$bCompatible) 
  • trunk/studio/classes/BxDolStudioIpBlockList.php

    r15265 r15338  
    7777EOF; 
    7878 
    79         $sRequest = $GLOBALS['site']['url_admin'] . 'ip_blacklist.php?page={page}&per_page={per_page}'; 
     79        $sRequest = BX_DOL_URL_STUDIO . 'ip_blacklist.php?page={page}&per_page={per_page}'; 
    8080        $oPaginate = new BxDolPaginate ( 
    8181            array 
  • trunk/studio/classes/BxDolStudioTemplate.php

    r15266 r15338  
    7979        switch( $sKey ) { 
    8080            case 'version': 
    81                 $sRet = $GLOBALS['site']['ver']; 
     81                $sRet = BX_DOL_VERSION; 
    8282                break; 
    8383            case 'page_charset': 
  • trunk/studio/classes/BxDolStudioTools.php

    r15296 r15338  
    706706        <b>Dolphin version</b> =  
    707707        <?php             
    708             $sDolphinVer = $GLOBALS['site']['ver'] . '.' . $GLOBALS['site']['build']; 
     708            $sDolphinVer = BX_DOL_VERSION . '.' . BX_DOL_BUILD; 
    709709            echo $sDolphinVer . ' - '; 
    710710            if (!version_compare($sDolphinVer, $sLatestDolphinVer, '>=')) 
     
    728728            function bx_sys_adm_audit_test_email() { 
    729729                $('#bx-sys-adm-audit-test-email').html('Sending...'); 
    730                 $.post('<?php echo $GLOBALS['site']['url_admin']; ?>host_tools.php?action=audit_send_test_email', function(data) { 
     730                $.post('<?php echo BX_DOL_URL_STUDIO; ?>host_tools.php?action=audit_send_test_email', function(data) { 
    731731                    $('#bx-sys-adm-audit-test-email').html(data); 
    732732                }); 
     
    744744        <b>media server</b> 
    745745        <br /> 
    746         Please follow <a href="<?php echo $GLOBALS['site']['url_admin']; ?>flash.php">this link</a> to check media server settings. Also you can try video chat - if video chat is working then most probably that flash media server is working correctly, however it doesn't guarantee that all other flash media server application will work. 
     746        Please follow <a href="<?php echo BX_DOL_URL_STUDIO; ?>flash.php">this link</a> to check media server settings. Also you can try video chat - if video chat is working then most probably that flash media server is working correctly, however it doesn't guarantee that all other flash media server application will work. 
    747747    </li> 
    748748    <li> 
  • trunk/studio/templates/base/_header.html

    r15286 r15338  
    1414        <script defer type="text/javascript"> 
    1515            var sUrlRoot = '<bx_url_root />'; 
    16             var sUrlStudio = '<bx_url_root />studio/'; 
     16            var sUrlStudio = '<bx_url_studio />'; 
    1717        </script> 
    1818        __extra_js__ 
  • trunk/subscription.php

    r15211 r15338  
    6060 
    6161    $oTemplate = BxDolTemplate::getInstance(); 
    62     $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); 
    63     $oTemplate->setPageHeader ($GLOBALS['site']['title']); 
    64     $oTemplate->setPageContent ('page_main_code', DesignBoxContent($aResult['message'], MsgBox($aResult['message'], BX_DB_PADDING_DEF))); 
     62    $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT); 
     63    $oTemplate->setPageHeader(getParam('site_title')); 
     64    $oTemplate->setPageContent('page_main_code', DesignBoxContent($aResult['message'], MsgBox($aResult['message'], BX_DB_PADDING_DEF))); 
    6565 
    6666    PageCode(); 
  • trunk/tellfriend.php

    r15260 r15338  
    5151$sFEmlNotValidC = $sYEmlNotValidC . ' (' . _t('_Friend email') . ')'; 
    5252 
    53 $sCaption = ($profileID) ? _t('_TELLAFRIEND2', $site['title']) : _t('_TELLAFRIEND', $site['title']); 
     53$sSiteTitle = getParam('site_title'); 
     54$sCaption = ($profileID) ? _t('_TELLAFRIEND2', $sSiteTitle) : _t('_TELLAFRIEND', $sSiteTitle); 
    5455 
    5556$aForm = array( 
  • trunk/templates/base/scripts/BxBaseBrowse.php

    r15334 r15338  
    370370        */ 
    371371        function _genCountrySection( &$oObject, $sCurrentKey  ) { 
    372             global $site; 
     372            bx_import('BxDolTemplate'); 
     373            $oSysTemplate = BxDolTemplate::getInstance(); 
    373374 
    374375            // init some variables ; 
     
    420421                    else { 
    421422                        $sCountryName = strtolower($sKey); 
    422                         $sImagePath = $site['flags'] . $sCountryName . '.gif'; 
     423                        $sImagePath = $oSysTemplate->getIconUrl('sys_fl_' . $sCountryName . '.gif'); 
    423424                        $sCountrySection .= $oObject -> genBrowseLink( $sKey, $sValue, $oObject -> genLinkLocation( 'country', $sCountryName), $sImagePath, false ); 
    424425                    } 
     
    451452            ); 
    452453 
    453             $sCountrySection = BxDolTemplate::getInstance() -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 
     454            $sCountrySection = $oSysTemplate->parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys ); 
    454455 
    455456            // return builded template ; 
  • trunk/templates/base/scripts/BxBaseCmtsView.php

    r15332 r15338  
    214214     * @return string 
    215215     */ 
    216     function getCmtsInit () 
    217     { 
    218         global $site; 
    219  
     216    function getCmtsInit() { 
    220217        $sToggleAdd = ''; 
    221218        $sUseHtmlAdd = ''; 
     
    231228                var " . $this->_sJsObjName . " = new BxDolCmts({ 
    232229                    sObjName : '" . $this->_sJsObjName . "', 
    233                     sBaseUrl : '" . $site['url'] . "', 
     230                    sBaseUrl : '" . BX_DOL_URL_ROOT . "', 
    234231                    sSystem : '" . $this->getSystemName() . "', 
    235232                    sSystemTable: '" . $this->_aSystem['table_cmts'] . "', 
  • trunk/templates/base/scripts/BxBaseCommunicator.php

    r15334 r15338  
    2323    ***************************************************************************/ 
    2424 
    25     require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolCommunicator.php'); 
     25    bx_import('BxDolCommunicator'); 
    2626 
    2727    class BxBaseCommunicator extends BxDolCommunicator 
     
    102102         */ 
    103103        function getProcessingRows() { 
    104             global $site, $oFunctions ; 
    105  
     104            global $oFunctions ; 
     105 
     106            bx_import('BxDolTemplate'); 
    106107            $oSysTemplate = BxDolTemplate::getInstance(); 
    107108 
     
    270271                        // define the member's country, sex, etc ... ; 
    271272                        $sMemberCountry =  $aProfileInfo['Country']; 
    272                         $sMemberFlag    =  $site['flags'] . strtolower($sMemberCountry) . $this -> sMembersFlagExtension; 
     273                        $sMemberFlag    =  $oSysTemplate->getIconUrl('sys_fl_' . strtolower($sMemberCountry) . $this -> sMembersFlagExtension); 
    273274                        $sMemberSexImg  =  $oFunctions -> genSexIcon($aProfileInfo['Sex']); 
    274275 
  • trunk/templates/base/scripts/BxBaseConfig.php

    r15211 r15338  
    6767        parent::BxDol(); 
    6868 
    69         global $site; 
    70  
    7169        $anon_mode = getParam('anon_mode'); 
    7270 
     
    7977        $this -> sTinyMceEditorJS = ' 
    8078<!-- tinyMCE gz --> 
    81 <script type="text/javascript" src="' . $site['plugins'] . 'tiny_mce/tiny_mce_gzip.js"></script> 
     79<script type="text/javascript" src="' . BX_DOL_URL_PLUGINS . 'tiny_mce/tiny_mce_gzip.js"></script> 
    8280<script type="text/javascript"> 
    8381    tinyMCE_GZ.init({ 
     
    133131        $this -> sTinyMceEditorCompactJS = ' 
    134132<!-- tinyMCE gz --> 
    135 <script type="text/javascript" src="' . $site['plugins'] . 'tiny_mce/tiny_mce_gzip.js"></script> 
     133<script type="text/javascript" src="' . BX_DOL_URL_PLUGINS . 'tiny_mce/tiny_mce_gzip.js"></script> 
    136134<script type="text/javascript"> 
    137135    tinyMCE_GZ.init({ 
     
    181179        $this -> sTinyMceEditorMiniJS = ' 
    182180<!-- tinyMCE gz --> 
    183 <script type="text/javascript" src="' . $site['plugins'] . 'tiny_mce/tiny_mce_gzip.js"></script> 
     181<script type="text/javascript" src="' . BX_DOL_URL_PLUGINS . 'tiny_mce/tiny_mce_gzip.js"></script> 
    184182<script type="text/javascript"> 
    185183    tinyMCE_GZ.init({ 
     
    234232        $this -> sTinyMceEditorMicroJS = ' 
    235233<!-- tinyMCE gz --> 
    236 <script type="text/javascript" src="' . $site['plugins'] . 'tiny_mce/tiny_mce_gzip.js"></script> 
     234<script type="text/javascript" src="' . BX_DOL_URL_PLUGINS . 'tiny_mce/tiny_mce_gzip.js"></script> 
    237235<script type="text/javascript"> 
    238236    tinyMCE_GZ.init({ 
  • trunk/templates/base/scripts/BxBaseIndexPageView.php

    r15334 r15338  
    1616    } 
    1717 
    18     /** 
    19      * News Letters block 
    20      */ 
    2118    function getBlockCode_Subscribe() { 
    22         global $site; 
    23  
    2419        bx_import('BxDolSubscription'); 
    2520        $oSubscription = new BxDolSubscription(); 
     
    2722 
    2823        return $oSubscription->getData() . BxDolTemplate::getInstance()->parseHtmlByName('home_page_subscribe.html', array( 
    29             'message' => _t('_SUBSCRIBE_TEXT', $site['title']), 
     24            'message' => _t('_SUBSCRIBE_TEXT', getParam('site_title')), 
    3025            'button_title' => $aButton['title'], 
    3126            'button_script' => $aButton['script'] 
     
    3328    } 
    3429 
    35     /** 
    36      * Featured members block 
    37      */ 
    3830    function getBlockCode_Featured() { 
    3931        $iFeatureNum = getParam('featured_num'); 
  • trunk/templates/base/scripts/BxBaseMailBox.php

    r15335 r15338  
    8888         */ 
    8989        function getBlockCode_ComposeMessage() { 
    90             global $oSysTemplate, $site; 
     90            global $oSysTemplate; 
    9191 
    9292            bx_import('BxDolTemplate'); 
     
    311311        function getBlockCode_ViewMessage() { 
    312312            global $oFunctions; 
    313             global $site; 
    314313 
    315314            $oSysTemplate = BxDolTemplate::getInstance(); 
     
    412411 
    413412                $sMemberFlag =  ($sMemberCountry) 
    414                     ? $site['flags'] . strtolower($sMemberCountry) . $this -> sMembersFlagExtension 
     413                    ? $oSysTemplate->getIconUrl('sys_fl_' . strtolower($sMemberCountry) . $this -> sMembersFlagExtension) 
    415414                    : null; 
    416415 
     
    718717         */ 
    719718        function getBlockCode_Contacts() { 
    720             global  $oFunctions, $site; 
     719            global  $oFunctions; 
    721720 
    722721            $oSysTemplate = BxDolTemplate::getInstance(); 
     
    783782 
    784783                            if( isset($aProfileInfo['Country']) && $aProfileInfo['Country'] ) { 
    785                                 $sMemberFlag = $site['flags'] . strtolower($aProfileInfo['Country']) . $this -> sMembersFlagExtension; 
     784                                $sMemberFlag = $oSysTemplate->getIconUrl('sys_fl_' . strtolower($aProfileInfo['Country']) . $this -> sMembersFlagExtension); 
    786785                            } 
    787786 
     
    894893         */ 
    895894        function genArchiveMessages() { 
    896             global $oFunctions, $site; 
     895            global $oFunctions; 
    897896 
    898897            $oSysTemplate = BxDolTemplate::getInstance(); 
     
    10741073        function genMessagesRows() { 
    10751074            global $oFunctions; 
    1076             global $site; 
    10771075 
    10781076            $oSysTemplate = BxDolTemplate::getInstance(); 
     
    11891187 
    11901188                        $sMemberCountry =  $aProfileInfo['Country']; 
    1191                         $sMemberFlag    =  $site['flags'] . strtolower($sMemberCountry) . $this -> sMembersFlagExtension; 
     1189                        $sMemberFlag    =  $oSysTemplate->getIconUrl('sys_fl_' . strtolower($sMemberCountry) . $this -> sMembersFlagExtension); 
    11921190                        $sMemberSexImg  =  $oFunctions -> genSexIcon($aProfileInfo['Sex']); 
    11931191 
     
    16561654         */ 
    16571655        function get_member_menu_bubble_new_messages($iMemberId, $iOldCount = 0) { 
    1658             global $oFunctions, $site; 
     1656            global $oFunctions; 
    16591657 
    16601658            $oSysTemplate = BxDolTemplate::getInstance(); 
     
    18011799                        'thumbnail'   => $sThumb, 
    18021800                        'message_id'  => $aRow['ID'], 
    1803                         'site_url'    => $GLOBALS['site']['url'], 
     1801                        'site_url'    => BX_DOL_URL_ROOT, 
    18041802                    ); 
    18051803                } 
  • trunk/templates/base/scripts/BxBaseProfileView.php

    r15335 r15338  
    3636    var $oProfileGen; 
    3737 
    38     var $aConfSite; 
    39     var $aConfDir; 
    40  
    41     function BxBaseProfileView(&$oPr, &$aSite, &$aDir) { 
     38    function BxBaseProfileView(&$oPr) { 
    4239        $this->oProfileGen = &$oPr; 
    43         $this->aConfSite = $aSite; 
    44         $this->aConfDir  = $aDir; 
    4540        parent::BxDolPageView('profile'); 
    4641    } 
     
    130125 
    131126    function BxBaseProfileGenerator( $ID ) { 
    132         global $site; 
    133  
    134127        $this->aMutualFriends = array(); 
    135128 
  • trunk/templates/base/scripts/BxBaseSearchProfile.php

    r15260 r15338  
    8787    */ 
    8888    function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null) { 
    89         global $site; 
    9089        global $aPreValues; 
     90 
     91        if(!$oCustomTemplate) 
     92            $oCustomTemplate = BxDolTemplate::getInstance(); 
    9193 
    9294        $iVisitorID = getLoggedId(); 
     
    117119        $city =  _t("_City").": ".bx_process_output($aProfileInfo['City']); 
    118120 
    119         $country = $aProfileInfo['Country'] ? 
    120         _t("_Country").": "._t($aPreValues['Country'][$aProfileInfo['Country']]['LKey']).'&nbsp;<img src="'. ($site['flags'].strtolower($aProfileInfo['Country'])) .'.gif" alt="flag" />' 
    121         : ''; 
    122  
    123         // country flag 
    124         $sFlag = ($aProfileInfo['Country'] != '') ? '&nbsp;<img src="'. ($site['flags'].strtolower(bx_html_attribute($aProfileInfo['Country']))) .'.gif" alt="flag" />' : ''; 
     121        $country = $sFlag = ''; 
     122        if($aProfileInfo['Country'] != '') { 
     123            $sFlag = '<img src="' . $oCustomTemplate->getIconUrl('sys_fl_' . strtolower($aProfileInfo['Country']) . '.gif') . '" alt="flag" />'; 
     124            $country = _t("_Country").": " . _t($aPreValues['Country'][$aProfileInfo['Country']]['LKey']) . '&nbsp;' . $sFlag; 
     125        } 
    125126 
    126127        $sCityName = ($aProfileInfo['City']) ? bx_process_output($aProfileInfo['City']) . ', ' : null ; 
    127128 
    128129        if (!empty($aProfileInfo['Country'])) 
    129             $city_con = $sFlag . ' ' . $sCityName . _t( $aPreValues['Country'][$aProfileInfo['Country']]['LKey'] ); 
     130            $city_con = ' ' . $sFlag . ' ' . $sCityName . _t($aPreValues['Country'][$aProfileInfo['Country']]['LKey']); 
    130131        else 
    131132            $city_con = ''; 
     
    170171 
    171172        $more = '<a href="' . getProfileLink( $aProfileInfo['ID'] ) . '" target="_blank">'; 
    172             $more .= '<img src="' . $site['icons'] . 'desc_more.gif" alt="' . bx_html_attribute(_t('_more')) . '" />'; 
     173            $more .= '<img src="' . $oCustomTemplate->getIconUrl('desc_more.gif') . '" alt="' . bx_html_attribute(_t('_more')) . '" />'; 
    173174        $more .= '</a>'; 
    174175 
     
    220221            'ai_sendmsg' => empty($ai_sendmsg) ? '' : $ai_sendmsg, 
    221222            'al_sendmsg' => $al_sendmsg, 
    222             'more' => $more, 
    223             'images' => $site['images'] 
     223            'more' => $more 
    224224        ); 
    225225 
     
    231231        } 
    232232 
    233         return ($oCustomTemplate) ? $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys) : BxDolTemplate::getInstance()->parseHtmlByName($sTemplateName, $aKeys); 
     233        return $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys); 
    234234    } 
    235235 
  • trunk/templates/base/scripts/BxBaseSearchResult.php

    r15211 r15338  
    3131            $sLink = str_replace('{ownerId}', $aOwner['ownerId'], $sLink); 
    3232        } 
    33         return $GLOBALS['site']['url'] . $sLink; 
     33        return BX_DOL_URL_ROOT . $sLink; 
    3434    } 
    3535 
  • trunk/templates/base/scripts/BxBaseVotingView.php

    r15211 r15338  
    88 
    99bx_import('BxDolVoting'); 
     10bx_import('BxDolTemplate'); 
    1011 
    1112/** 
     
    5354    } 
    5455 
    55     function getVoting($iCanRate, $iSizeX, $iSizeY, $sName, $iPossibleID = 0, $isShowCount = true, $iVoteRateOverride = false) 
    56     { 
    57         global $site; 
     56    function getVoting($iCanRate, $iSizeX, $iSizeY, $sName, $iPossibleID = 0, $isShowCount = true, $iVoteRateOverride = false) { 
     57        $oSysTemplate = BxDolTemplate::getInstance(); 
    5858 
     59        $sSiteUrl = BX_DOL_URL_ROOT; 
    5960        $iMax = $this->getMaxVote(); 
    6061        $iWidth = $iSizeX*$iMax; 
     
    7172            $sRet .= <<<EOF 
    7273<script language="javascript"> 
    73     var oVoting{$sDivId} = new BxDolVoting('{$site['url']}', '{$sSystemName}', '{$iObjId}', '{$sDivId}', '{$sDivId}Slider', {$iSizeX}, {$iMax}); 
     74    var oVoting{$sDivId} = new BxDolVoting('{$sSiteUrl}', '{$sSystemName}', '{$iObjId}', '{$sDivId}', '{$sDivId}Slider', {$iSizeX}, {$iMax}); 
    7475</script> 
    7576EOF; 
     
    8283            for ($i=1 ; $i<=$iMax ; ++$i) 
    8384            { 
    84                 $sRet .= '<a href="javascript:'.$i.';void(0);" onmouseover="oVoting'.$sDivId.'.over('.$i.');" onmouseout="oVoting'.$sDivId.'.out();" onclick="oVoting'.$sDivId.'.vote('.$i.')"><img class="votes_button_'.$sName.'" src="'.$site['base'].'images/vote_star_null.gif" alt="" /></a>'; 
     85                $sRet .= '<a href="javascript:'.$i.';void(0);" onmouseover="oVoting'.$sDivId.'.over('.$i.');" onmouseout="oVoting'.$sDivId.'.out();" onclick="oVoting'.$sDivId.'.vote('.$i.')"><img class="votes_button_' . $sName . '" src="' . $oSysTemplate->getImageUrl('vote_star_null.gif') . '" alt="" /></a>'; 
    8586            } 
    8687            $sRet .= '</div>'; 
  • trunk/templates/tmpl_uni/scripts/BxTemplConfig.php

    r15334 r15338  
    99bx_import('BxBaseConfig'); 
    1010 
    11 bx_import('BxDolTemplate'); 
    12 $oSysTemplate = BxDolTemplate::getInstance(); 
    13  
    14 // path to the images used in the template 
    15 global $site; 
    16 $site['images']    = $site['url'] . "templates/tmpl_" . $oSysTemplate->getCode() . "/images/"; 
    17 $site['zodiac']    = $site['images'] . "zodiac/"; 
    18 $site['icons']    = $site['images'] . "icons/"; 
    19 $site['css_dir']= "templates/tmpl_" . $oSysTemplate->getCode() . "/css/"; 
    20  
    2111class BxTemplConfig extends BxBaseConfig { 
    2212    function BxTemplConfig() { 
    23         BxBaseConfig::BxBaseConfig(); 
     13        parent::BxBaseConfig(); 
     14 
     15        bx_import('BxDolTemplate'); 
     16        $sCode = BxDolTemplate::getInstance()->getCode(); 
     17        $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/'; 
     18 
     19        $oSysConfig = BxDolConfig::getInstance(); 
     20        $oSysConfig->set('url_static', 'images', $sStaticImages); 
     21        $oSysConfig->set('url_static', 'icons', $sStaticImages . 'icons/'); 
     22 
     23        $oSysConfig->set('path_static', 'css', BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $sCode . '/css/'); 
    2424    } 
    2525} 
  • trunk/templates/tmpl_uni/scripts/BxTemplProfileView.php

    r15211 r15338  
    66 
    77class BxTemplProfileView extends BxBaseProfileView { 
    8     function BxTemplProfileView(&$oPr, &$aSite, &$aDir) { 
    9         BxBaseProfileView::BxBaseProfileView($oPr, $aSite, $aDir); 
     8    function BxTemplProfileView(&$oPr) { 
     9        BxBaseProfileView::BxBaseProfileView($oPr); 
    1010    } 
    1111} 
  • trunk/terms_of_use.php

    r15211 r15338  
    2222 */ 
    2323function PageCompPageMainCode() { 
    24     $sRet = str_replace('<site>', $GLOBALS['site']['title'], _t("_TERMS_OF_USE")); 
     24    $sRet = str_replace('<site>', getParam('site_title'), _t("_TERMS_OF_USE")); 
    2525    return DesignBoxContent(_t("_TERMS_OF_USE_H"), $sRet, BX_DB_PADDING_DEF); 
    2626} 
  • trunk/upgrade/classes/BxDolUpgradeDb.php

    r15211 r15338  
    322322    } 
    323323 
    324     function genMySQLErr( $out, $query ='' ) 
    325     { 
    326         global $site; 
    327  
     324    function genMySQLErr( $out, $query ='' ) { 
    328325        $aBackTrace = debug_backtrace(); 
    329326        unset( $aBackTrace[0] ); 
  • trunk/xmlrpc/BxDolXMLRPCProfileView.php

    r15211 r15338  
    2323    } 
    2424 
    25     function getProfileInfoBlock($sCaption, $sContent) 
    26     { 
    27         global $site; 
    28  
     25    function getProfileInfoBlock($sCaption, $sContent) { 
    2926        $iBlockID = (int)$sContent; 
    3027 
Note: See TracChangeset for help on using the changeset viewer.