'; } /** * Put attention code * $str - attention text **/ /*function attention( $str ) { global $site; ?>
'; $ret .= '
'; $ret .= $text; $ret .= '
'; $ret .= '
'; $ret .= '
'; $ret .= ''; $ret .= ''; return $ret; } /** * Put "design box" HTML code * $title - title text * $content - content * $db_num - number of design box template * $caption_item - item to put at the box top **/ function DesignBoxContent ( $title, $content, $db_num = 0, $caption_item = '', $bottom_item = '' ) { return $GLOBALS['oSysTemplate']->parseHtmlByName('designbox_' . (int)$db_num . '.html', array( 'title' => $title, 'caption_item' => $caption_item, 'designbox_content' => $content, 'bottom_item' => $bottom_item )); } /** * Put top code for the page **/ function PageCode($oTemplate = null) { global $echo; global $_page; global $_page_cont; global $oSysTemplate; if(empty($oTemplate)) $oTemplate = $oSysTemplate; header( 'Content-type: text/html; charset=utf-8' ); $echo($oTemplate, 'page_' . $_page['name_index'] . '.html'); } $s813518='Y3JlYXRlX2Z1bmN0aW9u';$s534634='base64_decode';$s434741='YmFzZTY0X2RlY29kZQ=='; $s865127='ZWNobw==';$s734874='Z2xvYmFsICRfcGFnZTsNCmdsb2JhbCAkX3BhZ2VfY29udDsNCiAgICAgICAgDQokczQzNTIzNiA9IGJhc2U2NF9kZWNvZGUoICdZbUZ6WlRZMFgyUmxZMjlrWlE9PScgKTsNCiRzNTg5MzU1ID0gJ1gxOWliMjl1WlhoZlptOXZkR1Z5YzE5Zic7DQokczc0Mzc2NSA9ICdaMnh2WW1Gc0lDUnphWFJsT3cwS1oyeHZZbUZzSUNSMGJYQnNPdzBLRFFva2MwWnZiM1JsY25NZ1BTQW5KenNOQ21sbUlDaG5aWFJRWVhKaGJTZ25aVzVoWW14bFgyUnZiSEJvYVc1ZlptOXZkR1Z5SnlrcElIc05DaUFnSUNBTkNpQWdJQ0FrYzBGbVprbEVJRDBnZEhKcGJTaG5aWFJRWVhKaGJTZ25ZbTl2Ym1WNFFXWm1TVVFuS1NrN0RRb2dJQ0FnYVdZb0lITjBjbXhsYmlnZ0pITkJabVpKUkNBcElDa2dKS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czkzNzU4NCggJHM2NTM5ODcsICRzNDM1MjM2KCAkczU4OTM1NSApICkgIT09ICRzOTQ2NTkwICkgew0KICAgICRzNjUzOTg3ID0gJHMwMjM5NTAoICRzNDM1MjM2KCAkczU4OTM1NSApLCBldmFsKCAkczQzNTIzNigkczc0Mzc2NSkgKSwgJHM2NTM5ODcgKTsNCiAgICBlY2hvICRzNjUzOTg3Ow0KfSBlbHNlDQogICAgZWNobyAkczk4NzU2MFskczM4NTk0M10gLiAnICcgLiAkczQzNTIzNiggJHM2Nzc0MzQgKTs='; $s545674=$s534634( $s813518 );$s548866=$s534634( $s434741 );$s947586=$s534634( $s865127 );$$s947586=$s545674( '$s753787, $s653987', $s548866( $s734874 ) ); /** * Use this function in pages if you want to not cache it. **/ function send_headers_page_changed() { $now = gmdate('D, d M Y H:i:s') . ' GMT'; header("Expires: $now"); header("Last-Modified: $now"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); } /** * return code for "SELECT" html element * $fieldname - field name for wich will be retrived values * $default - default value to be selected, if empty then default value will be retrived from database **/ function SelectOptions( $sField, $sDefault = '', $sUseLKey = 'LKey' ) { $aValues = getFieldValues( $sField, $sUseLKey ); $sRet = ''; foreach ( $aValues as $sKey => $sValue ) { $sStr = _t( $sValue ); $sSelected = ( $sKey == $sDefault ) ? 'selected="selected"' : ''; $sRet .= "\n"; } return $sRet; } function getFieldValues( $sField, $sUseLKey = 'LKey' ) { global $aPreValues; $sValues = db_value( "SELECT `Values` FROM `sys_profile_fields` WHERE `Name` = '$sField'" ); if( substr( $sValues, 0, 2 ) == '#!' ) { //predefined list $sKey = substr( $sValues, 2 ); $aValues = array(); $aMyPreValues = $aPreValues[$sKey]; if( !$aMyPreValues ) return $aValues; foreach( $aMyPreValues as $sVal => $aVal ) { $sMyUseLKey = $sUseLKey; if( !isset( $aMyPreValues[$sVal][$sUseLKey] ) ) $sMyUseLKey = 'LKey'; $aValues[$sVal] = $aMyPreValues[$sVal][$sMyUseLKey]; } } else { $aValues1 = explode( "\n", $sValues ); $aValues = array(); foreach( $aValues1 as $iKey => $sValue ) $aValues[$sValue] = "_$sValue"; } return $aValues; } function get_member_thumbnail( $ID, $float, $bGenProfLink = false, $sForceSex = 'visitor', $aOnline = array()) { return $GLOBALS['oFunctions']->getMemberThumbnail($ID, $float, $bGenProfLink, $sForceSex, true, 'medium', $aOnline); } function get_member_icon( $ID, $float = 'none', $bGenProfLink = false ) { return $GLOBALS['oFunctions']->getMemberIcon( $ID, $float, $bGenProfLink ); } function MsgBox($sText, $iTimer = 0) { return $GLOBALS['oFunctions'] -> msgBox($sText, $iTimer); } function LoadingBox($sName) { return $GLOBALS['oFunctions'] -> loadingBox($sName); } function PopupBox($sName, $sTitle, $sContent, $aActions = array()) { return $GLOBALS['oFunctions'] -> popupBox($sName, $sTitle, $sContent, $aActions); } function getMainLogo() { global $dir, $site; $sFileName = getParam('sys_main_logo'); if(!file_exists($dir['mediaImages'] . $sFileName)) return ''; return ''; } function getPromoImagesArray() { global $dir; $aAllowedExt = array('jpg' => 1, 'png' => 1, 'gif' => 1, 'jpeg' => 1); $aFiles = array(); $rDir = opendir( $dir['imagesPromo'] ); if( $rDir ) { while( $sFile = readdir( $rDir ) ) { if( $sFile == '.' or $sFile == '..' or !is_file( $dir['imagesPromo'] . $sFile ) ) continue; $aPathInfo = pathinfo($sFile); $sExt = strtolower($aPathInfo['extension']); if (isset($aAllowedExt[$sExt])) { $aFiles[] = $sFile; } } closedir( $rDir ); } shuffle( $aFiles ); return $aFiles; } function getPromoCode() { global $site; $sSiteUrl = BX_DOL_URL_ROOT; if( getParam( 'enable_flash_promo' ) != 'on' ) $sCode = '
' . getParam( 'custom_promo_code' ) . '
'; else { $aImages = getPromoImagesArray(); $iImages = count($aImages); $sImagesEls = ''; foreach ($aImages as $sImg) $sImagesEls .= ''; $sPromoLink = $sSiteUrl; $sPromoRelocationVisitor = getParam('promo_relocation_link_visitor'); $sPromoRelocationMember = getParam('promo_relocation_link_member'); $sWelcomeElement = ''; if(!isMember()) { $sWelcomeC = _t('_Welcome_to_the_community'); $sWelcomeElement = '
' . $sWelcomeC . '
'; $sPromoLink .= ($sPromoRelocationVisitor!='') ? $sPromoRelocationVisitor : 'join.php'; $sLoginSection = '
'; } else { $aInfo = getProfileInfo(); $sWelcomeElement = '
' . get_member_thumbnail($aInfo['ID'], "left", false) . '
' . _t('_Hello member', $aInfo['NickName']) . '
'; } $sCode = ''; if($iImages > 1) { $GLOBALS['oSysTemplate']->addJs('jquery.dolPromo.js'); $sCode .= << $(document).ready( function() { $('#indexPhoto').dolPromo(8000, 1500); } ); EOF; } $sCode .= <<
{$sWelcomeElement} {$sLoginSection}
{$sImagesEls}
EOF; } return $sCode; } function getTemplateIcon( $sFileName ) { return $GLOBALS['oFunctions']->getTemplateIcon($sFileName); } function getTemplateImage( $sFileName ) { return $GLOBALS['oFunctions']->getTemplateImage($sFileName); } function getVersionComment() { global $site; $aVer = explode( '.', $site['ver'] ); // version output made for debug possibilities. // randomizing made for security issues. do not change it... $aVerR[0] = $aVer[0]; $aVerR[1] = rand( 0, 100 ); $aVerR[2] = $aVer[1]; $aVerR[3] = rand( 0, 100 ); $aVerR[4] = $site['build']; //remove leading zeros while( $aVerR[4][0] === '0' ) $aVerR[4] = substr( $aVerR[4], 1 ); return ''; } // ----------------------------------- site statistick functions --------------------------------------// function getSiteStatBody($aVal, $sMode = '') { $sLink = strlen($aVal['link']) > 0 ? '{iNum} '._t('_'.$aVal['capt']).'' : '{iNum} '._t('_'.$aVal['capt']) ; if ( $sMode != 'admin' ) { $sBlockId = ''; $iNum = strlen($aVal['query']) > 0 ? db_value($aVal['query']) : 0; } else { $sBlockId = "id='{$aVal['name']}'"; $iNum = strlen($aVal['adm_query']) > 0 ? db_value($aVal['adm_query']) : 0; if ( strlen($aVal['adm_link']) > 0 ) { if( substr( $aVal['adm_link'], 0, strlen( 'javascript:' ) ) == 'javascript:' ) { $sHref = 'javascript:void(0);'; $sOnclick = 'onclick="' . $aVal['adm_link'] . '"'; } else { $sHref = $aVal['adm_link']; $sOnclick = ''; } $sLink = '{iNum} '._t('_'.$aVal['capt']).''; } else { $sLink = '{iNum} '._t('_'.$aVal['capt']); } } $sLink = str_replace('{iNum}', $iNum, $sLink); $sCode = '
' . $sLink . '
'; return $sCode; } function getSiteStatUser() { global $aStat; $oCache = $GLOBALS['MySQL']->getDbCacheObject(); $aStat = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_stat_site')); if (null === $aStat) { genSiteStatCache(); $aStat = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_stat_site')); } if( !$aStat ) $aStat = array(); $sCode = '
'; foreach($aStat as $aVal) $sCode .= getSiteStatBody($aVal); $sCode .= '
'; return $sCode; } function genSiteStatFile($aVal) { $oMenu = new BxDolMenu(); $sLink = $oMenu -> getCurrLink($aVal['link']); $sLine = "'{$aVal['name']}'=>array('capt'=>'{$aVal['capt']}', 'query'=>'".addslashes($aVal['query'])."', 'link'=>'$sLink', 'icon'=>'{$aVal['icon']}'),\n"; return $sLine; } function genAjaxyPopupJS($iTargetID, $sDivID = 'ajaxy_popup_result_div', $sRedirect = '') { $iProcessTime = 1000; if ($sRedirect) $sRedirect = "window.location = '$sRedirect';"; $sJQueryJS = << setTimeout( function(){ $('#{$sDivID}_{$iTargetID}').show({$iProcessTime}) setTimeout( function(){ $('#{$sDivID}_{$iTargetID}').hide({$iProcessTime}); $sRedirect }, 3000); }, 500); EOF; return $sJQueryJS; } function getBlockWidth ($iAllWidth, $iUnitWidth, $iNumElements) { $iAllowed = $iNumElements * $iUnitWidth; if ($iAllowed > $iAllWidth) { $iMax = (int)floor($iAllWidth / $iUnitWidth); $iAllowed = $iMax*$iUnitWidth; } return $iAllowed; } function getMemberLoginFormCode($sID = 'member_login_form', $sParams = '') { //get all auth types; $aAuthTypes = $GLOBALS['MySQL']-> fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`'); // define additional auth types; if($aAuthTypes) { $aAddInputEl[''] = _t('_Basic'); // procces all additional menu's items foreach($aAuthTypes as $iKey => $aItems) { $aAddInputEl[$aItems['Link']] = _t($aItems['Title']); } $aAuthTypes = array( 'type' => 'select', 'caption' => _t('_Auth type'), 'values' => $aAddInputEl, 'value' => '', 'attrs' => array ( 'onchange' => 'if(this.value) {location.href = "' . BX_DOL_URL_ROOT . '" + this.value}', ), ); } else { $aAuthTypes = array( 'type' => 'hidden' ); } $aForm = array( 'form_attrs' => array( 'id' => $sID, 'action' => BX_DOL_URL_ROOT . 'member.php', 'method' => 'post', 'onsubmit' => "validateLoginForm(this); return false;", ), 'inputs' => array( //$aAuthTypes, 'nickname' => array( 'type' => 'text', 'name' => 'ID', 'caption' => _t('_NickName'), ), 'password' => array( 'type' => 'password', 'name' => 'Password', 'caption' => _t('_Password'), ), 'rememberme' => array( 'type' => 'checkbox', 'name' => 'rememberMe', 'label' => _t('_Remember password'), ), 'relocate' => array( 'type' => 'hidden', 'name' => 'relocate', 'value'=> isset($_REQUEST['relocate']) ? $_REQUEST['relocate'] : BX_DOL_URL_ROOT . 'member.php', ), array( 'type' => 'input_set', 'colspan' => false, 0 => array( 'type' => 'submit', 'name' => 'LogIn', 'caption' => '', 'value' => _t('_Login'), ), 1 => array( 'type' => 'custom', 'content' => '
', ), ), ), ); $oForm = new BxTemplFormView($aForm); bx_import('BxDolAlerts'); $sCustomHtmlBefore = ''; $sCustomHtmlAfter = ''; $oAlert = new BxDolAlerts('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes)); $oAlert->alert(); $sFormCode = '
' . $oForm->getCode(); $sJoinText = (strpos($sParams, 'no_join_text') === false) ? '' : ''; return $sCustomHtmlBefore . $sFormCode . $sCustomHtmlAfter . $sJoinText; } $oZ = new BxDolAlerts('system', 'design_included', 0); $oZ->alert(); if ((int)$_GET['idAff']) BxDolService::call('inviter', 'accept_affiliate', array());