I have this error appearing on my site:
Parse error: syntax error, unexpected ',', expecting ')' in /home/gq123/public_html/inc/design.inc.php on line 2643
I've been asking for help but it is still unresolved.
So, I want to try and do it myself.
I went to the server, found the file, opened it in Dreamweaver and ran the debugger.
It gave me this:
'; } /** * Put attention code * $str - attention text **/ function attention( $str ) { global $site; ?>
|
'; $ret .= '
'; $ret .= '
'; $ret .= ''; $ret .= ''; return $ret; } // design box $fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_0.html" ); $f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_0.html", "r" ); $templ_designbox0 = fread ( $f, $fs ); fclose ( $f ); $fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_1.html" ); $f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_1.html", "r" ); $templ_designbox1 = fread ( $f, $fs ); fclose ( $f ); $fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_2.html" ); $f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_2.html", "r" ); $templ_designbox2 = fread ( $f, $fs ); fclose ( $f ); /** * Put "design box" HTML code * $title - title text * $width - width in pixels * $height - height in pixels * $align - align or other formatter * for example: "align=center" * $db_num - number of design box template (for "act" skin only) **/ function DesignBoxContent ( $title, $content, $db_num = 0, $caption_item = '' ) { global $site; global $templ_designbox0; global $templ_designbox1; global $templ_designbox2; global $dbh_letters; global $tmpl; switch ($dbh_letters) { case "upper": $f = "strtoupper"; break; case "lower": $f = "strtolower"; break; case "fupper": $f = "ucfirst"; break; case "aupper": $f = "ucwords"; break; default: $f = "sprintf"; } if ( strlen($height) ) $height = " height=\"$height\" "; if ($db_num == 2) // && !$templ_designbox2 ) { $templ = $templ_designbox2; } elseif( $db_num == 1) // && !$templ_designbox1 ) { $templ = $templ_designbox1; } else//if( !$templ_designbox0 ) { $templ = $templ_designbox0; } // replace path to the images $s = $site['images']; $s = str_replace ( $site['url'], "", $site['images'] ); $templ = str_replace ( $s, $site['images'], $templ ); // replace template variables $templ = str_replace ( "__title__", $f($title), $templ ); $templ = str_replace ( "__caption_item__", $caption_item, $templ ); $templ = str_replace ( "__designbox_content__", $content, $templ ); $templ = str_replace ( "__images__", $site['images'], $templ ); if ( function_exists( 'colors_select' ) ) $templ = str_replace ( "__designBoxColor__", colors_select(), $templ ); if ($tmpl == 'act') { if ($index_db_color_randomize == 1) { $templ = str_replace ( "__db_color__", get_active_color(), $templ ); } else { $templ = str_replace ( "__db_color__", $index_db_color, $templ ); } } return $templ; } /** * Put "design box" with border HTML code * $title - title text * $width - width in pixels * $height - height in pixels * $align - align or other formatter * for example: "align=center" **/ function DesignBoxContentBorder ( $title, $content, $caption_item='' ) { global $site; global $dir; global $tmpl; global $service_db_color; global $dbh_letters; switch ($dbh_letters) { case "upper": $f_case = "strtoupper"; break; case "lower": $f_case = "strtolower"; break; case "fupper": $f_case = "ucfirst"; break; case "aupper": $f_case = "ucwords"; break; default: $f_case = "sprintf"; } // design box with border: reading template $fs = filesize ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_border.html" ); $f = fopen ( "{$dir['root']}templates/tmpl_{$tmpl}/designbox_border.html", "r" ); $templ_designbox_border = fread ( $f, $fs ); fclose ( $f ); $templ = $templ_designbox_border; // replace template variables $templ = str_replace ( "__title__", $f_case($title), $templ ); $templ = str_replace ( "__caption_item__", $caption_item, $templ ); $templ = str_replace ( "__designbox_content__", $content, $templ ); return $templ; } /** * members statistic block */ function PageCompMemberStatN( $w, $h) { global $site; global $prof; global $tmpl; $free_mode = getParam("free_mode") == "on" ? 1 : 0; // members statistics $total_c = strlen( $_POST['total_c'] ) ? $_POST['total_c'] : getParam( "default_country" ); $total_c2 = strlen( $_POST['total_c2'] ) ? $_POST['total_c2'] : getParam( "default_country" ); $total_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active'" ); $total_arr_week = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(LastReg)) <= 7" ); $total_arr_gold = db_arr( "SELECT COUNT(DISTINCT IDMember) FROM ProfileMemLevels INNER JOIN Profiles ON Profiles.ID = ProfileMemLevels.IDMember WHERE (DateExpires IS NULL OR DateExpires > NOW()) AND (DateStarts IS NULL OR DateStarts <= NOW()) AND (Profiles.Status = 'Active')" ); $total_c_arr = db_arr( "SELECT COUNT(ID) FROM `Profiles` WHERE Status = 'Active' AND `Country` = '". process_db_input($total_c) ."'" ); $total_members = $total_arr[0]; $total_c_members = $total_c_arr[0]; $total_c_members_onl = get_users_online_number('c', $total_c2 ); $total_arr_chatting = get_users_online_number('t'); $members_online = get_users_online_number(); $c_arr = $prof[countries]; $out = ""; $out .= '
';
$out .= "";
$out .= "\n";
$out .= "\n";
$out .= "\n";
$out .= "\n";
$out .= "\n";
$out .= '';
$out .= "\n";
$out .= "
"; $out .= ""; $out .= "\n"; $out .= "\n"; $out .= "\n"; $out .= "\n"; if ( !$free_mode ) $out .= "\n"; $out .= "\n"; $out .= "\n"; if ($tmpl == 'g4') $out .= ""; $out .= ''; $out .= "\n"; $out .= '
|
'; return DesignBoxContent ( _t("_members"), $w, $out, $h ); } /** * Put top code for the page **/ function PageCode( $admintmpl=0 ) { global $dir; global $site; global $_page; global $_page_comp; global $logged; global $langHTMLCharset; global $tmpl; global $ADMIN; global $tmi_letters; global $dbh_letters; global $max_thumb_height; global $max_thumb_width; global $_page_cont; $ni = $_page['name_index']; global $oTemplConfig; $oTemplMenu = new BxTemplMenu( $oTemplConfig ); $free_mode = getParam("free_mode") == "on" ? 1 : 0; // reading templates if(!$admintmpl) { $fn = "{$dir['root']}templates/tmpl_{$tmpl}/page_{$ni}.html"; if ( !file_exists($fn) ) $fn = "{$dir['root']}templates/tmpl_{$tmpl}/default.html"; } else $fn = "{$dir['root']}admin/tmpl_admin.html"; $templ = file_get_contents( $fn ); // process includes (multi-level) do { $templ1 = $templ; $templ = preg_replace_callback( "/__include (.*)__/", "TmplInclude", $templ1 ); $templ = preg_replace_callback ("/__includebase (.*)__/", "TmplIncludeBase", $templ); } while( $templ1 != $templ ); //insert to your template page key: __t: lang_key__ and you will get translated string $templ = preg_replace_callback( "/__t: (_.+)__/", create_function( '$matches', 'return _t($matches[1]);' ), $templ ); PageStaticComponents(); // lang block if ( (int)getParam('lang_enable') ) { ob_start(); lang_select_txt(); $_page_cont[0]['switch_lang_block'] = ob_get_clean(); } else $_page_cont[0]['switch_lang_block'] = ''; // charset $_page_cont[0]['page_charset'] = $langHTMLCharset; //change templates if ( 'on' == getParam("enable_template")) $_page_cont[0]['switch_skin_block'] = templates_select_txt(); else $_page_cont[0]['switch_skin_block'] = ''; //Path to css if( strlen( $_page['css_name'] ) > 0 ) { $filename = $dir['root'] . $site['css_dir'] . $_page['css_name']; if ( file_exists( $filename ) && is_file( $filename ) ) $_page_cont[0]['styles'] = ''; else $_page_cont[0]['styles'] = ''; } else $_page_cont[0]['styles'] = ''; //Path to js if( strlen( $_page['js_name'] ) > 0 ) { $filename = $dir['root'] . 'inc/js/' . $_page['js_name']; if ( file_exists( $filename ) && is_file( $filename ) ) { $langDelete = _t('_delete'); $langLoading = _t('_loading ...'); $langDeleteMessage = _t('_poll successfully deleted'); $langMakeIt = _t('_make it'); $lang_you_should_specify_member = _t('_You should specify at least one member'); if ( $site['js_init'] ) $_page_cont[0]['java_script'] = $site['js_init']; $_page_cont[0]['java_script'] .= << var site_url = '{$site['url']}'; var lang_delete = '{$langDelete}'; var lang_loading = '{$langLoading}'; var lang_delete_message = '{$langDeleteMessage}'; var lang_make_it = '{$langMakeIt}'; var lang_you_should_specify_member = '{$lang_you_should_specify_member}'; var iQSearchWindowWidth = {$oTemplConfig->iQSearchWindowWidth}; var iQSearchWindowHeight = {$oTemplConfig->iQSearchWindowHeight}; EOJ; } else $_page_cont[0]['java_script'] = ''; } else $_page_cont[0]['java_script'] = ''; $_page_cont[0]['css_dir'] = $site['css_dir']; $_page_cont[0]['plugins'] = $site['plugins']; $_page_cont[0]['thumb_width'] = $max_thumb_width; $_page_cont[0]['thumb_height'] = $max_thumb_height; $_page_cont[0]['site_url'] = $site['url']; $_page_cont[0]['images'] = $site['images']; $_page_cont[0]['icons'] = $site['icons']; $_page_cont[0]['zodiac'] = $site['zodiac']; $_page_cont[0]['bottom_text'] = _t( "_bottom_text", date("Y") ); $_page_cont[0]['copyright'] = _t( "_copyright", date("Y") ) . getVersionComment(); // please do not delete version for debug possibilities $_page_cont[0]['powered'] = getParam( 'enable_boonex_footers' ) ? _t( "_powered_by_Dolphin" ) : ''; $_page_cont[0]['main_logo'] = getMainLogo(); //place meta data on site pages $_page_cont[0]['meta_keywords'] = process_line_output( getParam("MetaKeyWords") ); $_page_cont[0]['meta_description'] = process_line_output( getParam("MetaDescription") ); if( strlen( $_page['extra_js'] ) ) $_page_cont[0]['extra_js'] = $_page['extra_js']; else $_page_cont[0]['extra_js'] = ''; if( strlen( $_page['extra_css'] ) ) $_page_cont[0]['extra_css'] = $_page['extra_css']; else $_page_cont[0]['extra_css'] = ''; // top menu items $_page_cont[0]['top_menu'] = $oTemplMenu -> getTopMenu(); $_page_cont[0]['hidden_menu'] = getAllMenus(); $_page_cont[0]['custom_menu'] = $oTemplMenu -> getCustomMenu(); // topest menu items { $_page_cont[0]['TOP_Home'] = '' . _t("_Home") . ''; $_page_cont[0]['BMI_Home'] = '' . _t("_Home") . ''; $_page_cont[0]['TOP_About'] = '' . _t("_About Us") . ''; $_page_cont[0]['BMI_About'] = '' . _t("_About Us") . ''; $_page_cont[0]['TOP_Privacy'] = '' . _t("_Privacy") . ''; $_page_cont[0]['BMI_Privacy'] = '' . _t("_Privacy") . ''; $_page_cont[0]['TOP_Termsofuse'] = '' . _t("_Terms_of_use") . ''; $_page_cont[0]['BMI_Termsofuse'] = '' . _t("_Terms_of_use") . ''; $_page_cont[0]['TOP_Services'] = '' . _t("_Services") . ''; $_page_cont[0]['BMI_Services'] = '' . _t("_Services") . ''; $_page_cont[0]['TOP_FAQ'] = '' . _t("_FAQ") . ''; $_page_cont[0]['BMI_FAQ'] = '' . _t("_FAQ") . ''; $_page_cont[0]['TOP_Articles'] = '' . _t("_Articles") . ''; $_page_cont[0]['BMI_Articles'] = '' . _t("_Articles") . ''; $_page_cont[0]['TOP_Stories'] = '' . _t("_Stories2") . ''; $_page_cont[0]['BMI_Stories'] = '' . _t("_Stories2") . ''; $_page_cont[0]['TOP_Links'] = '' . _t("_Links") . ''; $_page_cont[0]['BMI_Links'] = '' . _t("_Links") . ''; $_page_cont[0]['TOP_News'] = '' . _t("_News") . ''; $_page_cont[0]['BMI_News'] = '' . _t("_News") . ''; $_page_cont[0]['TOP_Aff'] = getParam("enable_aff") == 'on' ? '' . _t("_Affiliates") . '' : ''; $_page_cont[0]['BMI_Aff'] = getParam("enable_aff") == 'on' ? '' . _t("_Affiliates") . '' : ''; $_page_cont[0]['TOP_Invitefriend'] = '' . _t("_Invite a friend") . ''; $_page_cont[0]['BMI_Invitefriend'] = '' . _t("_Invite a friend") . ''; $_page_cont[0]['TOP_Contacts'] = '' . _t("_Contacts") . ''; $_page_cont[0]['BMI_Contacts'] = '' . _t("_Contacts") . ''; $_page_cont[0]['TOP_Browse'] = '' . _t("_Browse Profiles") . ''; $_page_cont[0]['BMI_Browse'] = '' . _t("_Browse Profiles") . ''; $_page_cont[0]['TOP_Feedback'] = '' . _t("_Add story") . ''; $_page_cont[0]['BMI_Feedback'] = '' . _t("_Add story") . ''; $_page_cont[0]['TOP_ContactUs'] = '' . _t("_contact_us") . ''; $_page_cont[0]['BMI_ContactUs'] = '' . _t("_contact_us") . ''; $_page_cont[0]['TOP_Bookmark'] = '' . _t("_Bookmark") . ''; $_page_cont[0]['BMI_Bookmark'] = '' . _t("_Bookmark") . ''; } // bottom menu items { } $_page_cont[0]['hello_member'] = HelloMemberSection(); // member/visitor menu if ( $logged['admin'] ) $_page_cont[0]['menu_right'] = $oTemplMenu -> loggedAdminMenu(); elseif ( $logged['aff'] ) $_page_cont[0]['menu_right'] = $oTemplMenu -> loggedAffMenu(); elseif ( $logged['moderator'] ) $_page_cont[0]['menu_right'] = $oTemplMenu -> loggedModeratorMenu(); elseif ( $logged['member'] ) $_page_cont[0]['menu_right'] = $oTemplMenu -> loggedMemberMenu(); else $_page_cont[0]['menu_right'] = $oTemplMenu -> visitorMenu(); /*if ( !strlen($_page_cont[$ni]['actions_menu']) ) $_page_cont[0]['actions_menu'] = $oTemplMenu -> actionsMenu();*/ if ( !strlen($_page_cont[$ni]['add_to_header']) ) $_page_cont[0]['add_to_header'] = ''; $check_res = checkAction( (int)$_COOKIE['memberID'], ACTION_ID_USE_IM ); $enable_im = getParam("enable_im"); if ( $enable_im && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED && !$ADMIN ) { $_page_cont[0]['IM_title'] = _t("_IM title"); $_page_cont[0]['IM'] = RetIM(); } else { $_page_cont[0]['IM_title'] = ""; $_page_cont[0]['IM'] = ""; } $enable_shoutBox = ('on' == getParam("enable_shoutBox")) ? 1 : 0; if( $enable_shoutBox ) $_page_cont[0]['shout_box'] = loadShoutbox(); else $_page_cont[0]['shout_box'] = ''; $_page_cont[0]['top_page_head'] = getTopPageHead(); // page header $_page_cont[0]['page_header'] = $_page['header']; $_page_cont[0]['page_header_text'] = $_page['header_text']; // banner rotation/shifting system if ( strstr($templ, "__banner_top__") ) $_page_cont[0]['banner_top'] = banner_put_nv(1); if ( strstr($templ, "__banner_left__") ) $_page_cont[0]['banner_left'] = banner_put_nv(2); if ( strstr($templ, "__banner_right__") ) $_page_cont[0]['banner_right'] = banner_put_nv(3); if ( strstr($templ, "__banner_bottom__") ) $_page_cont[0]['banner_bottom'] = banner_put_nv(4); //end of banner rotation/shifting system //--- Ray IM Integration ---// global $sRayHomeDir; $_page_cont[0]['ray_invite_js'] = " var sRayUrl = '" . $site['url'] . $sRayHomeDir . "'; "; $_page_cont[0]['ray_invite_swf'] = ""; $iId = (int)$_COOKIE['memberID']; $sPassword = getPassword($iId); $bEnableRay = (getParam( 'enable_ray' ) == 'on'); $check_res = checkAction($iId, ACTION_ID_USE_RAY_IM); if($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) $_page_cont[0]['ray_invite_swf'] = getApplicationContent("im", "invite", array('id' => $iId, 'password' => $sPassword), true); //--- Ray IM Integration ---// foreach ( $_page_cont[0] as $key => $value ) { $templ = str_replace ( "__${key}__", $value, $templ ); } if ( is_array($_page_cont[$ni]) ) { foreach ( $_page_cont[$ni] as $key => $value ) { $templ = str_replace ( "__${key}__", $value, $templ ); } } header('Content-type: text/html; charset=utf-8'); echo $templ; } /** * callback function for including template files */ function TmplInclude($m) { global $dir; global $tmpl; // read include file $fn = "{$dir['root']}templates/tmpl_$tmpl/{$m[1]}"; if (file_exists ($fn)) { $fp = fopen ($fn, "r"); if ($fp) { $s = fread ($fp, filesize ($fn)); fclose ($fp); return $s; } } return "error reading {$m[1]}"; } function TmplIncludeBase($m) { global $dir; global $tmpl; // read include file $fn = "{$dir['root']}templates/base/{$m[1]}"; if (file_exists ($fn)) { $fp = fopen ($fn, "r"); if ($fp) { $s = fread ($fp, filesize ($fn)); fclose ($fp); return $s; } } return "error reading {$m[1]}"; } /** * Affiliate's member authentocation and setting up cookies **/ function SetCookieFromAffiliate() { global $en_aff; if ($en_aff && $_GET['idAff']) { if ( !strstr($_GET['idAff'],"@") ) { $_GET['idAff'] = (int)$_GET['idAff']; $res = db_res("SELECT ID FROM aff WHERE ID={$_GET['idAff']} AND `Status`='active'"); } else $res = db_res("SELECT ID FROM aff WHERE email='{$_GET['idAff']}' AND `Status`='active'"); if ( mysql_num_rows($res) ) { setcookie( "idAff", $_GET['idAff'], time() + 10000 * 3600, "/" ); } } } /** * Friend's member authentocation and setting up cookies **/ function SetCookieFromFriend() { global $en_aff; if ( $en_aff && $_GET['idFriend'] ) { $idFriend = getID( $_GET['idFriend'], 1 ); if ( $idFriend ) setcookie( "idFriend", $idFriend, time() + 10000 * 3600, "/" ); } } /** * Custom Menu Function for Profile **/ function DesignQuickSearch() { global $site; global $search_start_age; global $search_end_age; $gl_search_start_age = (int)$search_start_age; $gl_search_end_age = (int)$search_end_age; if ( $_COOKIE['memberID'] > 0 ) { $arr_sex = getProfileInfo( $_COOKIE['memberID'] ); //db_arr("SELECT Sex FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']); $member_sex = $arr_sex['Sex']; } else $member_sex = 'male'; ob_start(); ?>
- | |
- | |
- | |
- | |
- | |
!" /> |
"._t("_$v")."\n"; else $ret .= ""._t("_$v")."\n"; } return $ret; } SetCookieFromAffiliate(); SetCookieFromFriend(); /** * Return code for IM window */ function RetIM() { global $site; global $tmpl; global $oTemplConfig; $ID = (int)$_COOKIE['memberID']; $im_width = strstr($oTemplConfig -> im_width,'%') ? $oTemplConfig -> im_width : $oTemplConfig -> im_width-1; $im_height = $oTemplConfig -> im_height; $im_win = $_COOKIE['im_win'] ? $_COOKIE['im_win'] : 'none'; $langOpenNewWindow = _t("_Open in new window"); $langShow = _t("_Show"); $langHide = _t("_Hide"); $linkDivider = " | "; if ($im_win == 'none') { $div_hide = "none"; $div_show = "inline"; } else { $div_hide = "inline"; $div_show = "none"; } $out .= << <!-- function imShowHide() { var im_win = document.getElementById('im_win'); var show = document.getElementById('show'); var hide = document.getElementById('hide'); if (im_win.style.display == 'none') { document.cookie = "im_win=inline;"; im_win.style.display = 'inline'; show.style.display= 'none'; hide.style.display = 'inline'; } else { document.cookie = "im_win=none;"; im_win.style.display = 'none'; show.style.display= 'inline'; hide.style.display = 'none'; } } //-->
{$langOpenNewWindow}{$linkDivider}{$langShow}{$langHide} |
|
EOF;
$im_width = strstr($im_width,'%') ? $im_width : $im_width+1;
return DesignBoxContent( _t("_IM title"), $out, $oTemplConfig -> PageRetIM_db_num );
}
function loadShoutbox( $framewidth = 0, $frameheight = 0 )
{
$iId = (int)$_COOKIE['memberID'];
$sPassword = getPassword($iId);
return getApplicationContent('shoutbox', 'user', array('id' => $iId, 'password' => $sPassword));
}
/**
* parse string and replace text to smiles where possible
*/
function process_smiles( $str )
{
global $site;
$res = db_res("SELECT `code`, `smile_url`, `emoticon` FROM `smiles` ORDER BY LENGTH(`code`) DESC");
while ( $arr = mysql_fetch_array($res) )
{
$str = str_replace( $arr['code'], "",
$str ); } return $str;
}
/** * put html code for inserting smiles */
function put_smiles ( $textarea, $br = 999 )
{ global $site; $res = db_res("SELECT `code`, `smile_url`, `emoticon`
FROM smiles ORDER BY `ID` ASC,`smile_url`"); $i = 0; while ( $arr =
mysql_fetch_array($res) ) { if ( $smile_url == $arr['smile_url'] )
continue; $smile_url = $arr['smile_url']; $counter = " var counter =
document.getElementById('{$textarea}counter'); if (counter) {
counter.value=document.getElementById('{$textarea}').value.length; }";
$ret .= " \n";
if ( ((++$i) % $br) == 0 ) $ret .= "
";
}
return $ret;
}
function get_active_color()
{
global $db_color_index;
$db_colors = array ( 'green', 'magenta', 'orange', 'violet', 'yellow' );
$index = $db_color_index;
// Update color index.
if ( 4 == $db_color_index)
{
$db_color_index = 0;
}
else
{
$db_color_index++;
}
return $db_colors[$index];
}
function get_member_thumbnail( $ID, $float, $bDrawMargin=FALSE )
{
global $site;
require_once( BX_DIRECTORY_PATH_ROOT . 'profilePhotos.php' );
$user_is_online = get_user_online_status( $ID );
//$sSexSql = "SELECT `Sex` FROM `Profiles` WHERE `ID` = '{$ID}'";
$aSexSql = getProfileInfo( $ID ); //db_arr( $sSexSql );
$oPhoto = new ProfilePhotos( $ID );
$oPhoto -> getActiveMediaArray();
$aFile = $oPhoto -> getPrimaryPhotoArray();
if( extFileExists( $oPhoto -> sMediaDir . 'thumb_' . $aFile['med_file'] ) )
$sFileName = $oPhoto -> sMediaUrl . 'thumb_' . $aFile['med_file'];
else
{
if( $aSexSql['Sex'] == 'female' or $aSexSql['Sex'] == 'Female' )
$sSexPic = 'woman_medium.gif';
elseif( $aSexSql['Sex'] == 'male' or $aSexSql['Sex'] == 'Male' )
$sSexPic = 'man_medium.gif';
else
$sSexPic = 'visitor_medium.gif';
$sFileName = getTemplateIcon( $sSexPic );
}
$sMarginsAddon = ($bDrawMargin) ? " margin-right:10px;margin-bottom:10px; " : '';
$style =
'width:' . $oPhoto -> aMediaConfig['size']['thumbWidth'] . 'px;' .
'height:' . $oPhoto -> aMediaConfig['size']['thumbHeight'] . 'px;' .
'background-image:url(' . $sFileName . ');';
$ret = '';
$ret .= '
'; return $ret; } function get_member_icon( $ID, $float = 'none', $bDrawMargin=FALSE ) { global $site; require_once( BX_DIRECTORY_PATH_ROOT . 'profilePhotos.php' ); //$sSexSql = "SELECT `Sex` FROM `Profiles` WHERE `ID` = '{$ID}'"; $aSexSql = getProfileInfo( $ID ); //db_arr( $sSexSql ); $oPhoto = new ProfilePhotos( $ID ); $oPhoto -> getActiveMediaArray(); $aFile = $oPhoto -> getPrimaryPhotoArray(); if( extFileExists( $oPhoto -> sMediaDir . 'icon_' . $aFile['med_file'] ) ) $sFileName = $oPhoto -> sMediaUrl . 'icon_' . $aFile['med_file']; else { if( $aSexSql['Sex'] == 'female' or $aSexSql['Sex'] == 'Female' ) $sSexPic = 'woman_small.gif'; elseif( $aSexSql['Sex'] == 'male' or $aSexSql['Sex'] == 'Male' ) $sSexPic = 'man_small.gif'; else $sSexPic = 'visitor_small.gif'; $sFileName = getTemplateIcon( $sSexPic ); } $sMarginsAddon = ($bDrawMargin) ? " margin-right:10px;margin-bottom:10px; " : ''; $style = 'width:' . $oPhoto -> aMediaConfig['size']['iconWidth'] . 'px;' . 'height:' . $oPhoto -> aMediaConfig['size']['iconHeight'] . 'px;' . 'background-image:url(' . $sFileName . ');'; $ret = ''; $ret .= '
'; return $ret; } /* Generate Pagination function. Generates string like: << 1 ... 3 4 [5] 6 7 ... 10 >> with links. attrlist: $pagesNum - total number of pages. $page - current page in set. $pagesUrl - template of link for all pages. Template should contain {page} instruction which will be replaced by real page number. $oTemplConfig -> paginationDifference - defines number of pages shown before and after current page. If paginationDifference = 0 then all pages numbers will be shown without skipping. */ function genPagination( $pagesNum, $page, $pagesUrl, $pagesOnclick = '' ) { global $oTemplConfig; $paginDiff = $oTemplConfig -> paginationDifference; $paginFrom = ( $paginDiff ? ( $page - $paginDiff ) : 2 ); $paginTo = ( $paginDiff ? ( $page + $paginDiff ) : ( $pagesNum - 1 ) ); $needDrop1 = $needDrop2 = true; if( $paginFrom <= 2 ) { $paginFrom = 2; $needDrop1 = false; } if( $paginTo >= ( $pagesNum - 1 ) ) { $paginTo = $pagesNum - 1; $needDrop2 = false; } $ret = '
'; return $ret; } /* This function generates page link or just a text (if page is current) attrlist: $page - integer number of page (will be put instead of {page} instruction to template $link - template of page link $current - defines if page link is active or not (current page) $sign - string which is shown instead of page number in link text ( Ex.: << ) $title - alternative link tip text ($sign "; return $ret; } function getMainLogo() { global $dir; global $site; $ret = ''; foreach( array( 'gif', 'jpg', 'png' ) as $ext ) if( file_exists( $dir['mediaImages']."logo.$ext" ) ) { $ret .= ''; $ret .= ""; $ret .= ''; break; } return $ret; } function getPromoImagesList () { $photos = getPromoImagesArray(); shuffle( $photos ); return implode( ',', $photos ); } function getPromoImagesArray() { global $dir; $aFiles = array(); $rDir = opendir( $dir['imagesPromo'] ); if( $rDir ) { while( $sFile = readdir( $rDir ) ) { if( $sFile == '.' or $sFile == '..' or !is_file( $dir['imagesPromo'] . $sFile ) ) continue; $aFiles[] = $sFile; } closedir( $rDir ); } return $aFiles; } function genRSSHtmlOut( $sUrl, $iNum = 0 ) { $php_date_format = getParam( 'php_date_format' ); $oRSS = new BxRSS( $sUrl ); if( !$oRSS ) return ''; ob_start() ?>
array('capt'=>_t("_RayzGames"), 'query'=>"SELECT COUNT(`ID`) FROM `" . DB_PREFIX . "GamesGames`",'link'=>'rzgames.php?mode=browse','adm_query'=> "",'adm_link'=>"") 'all' => array('capt'=>_t("_Members"), 'query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status` = 'Active'",'link'=>'browse.php','adm_query'=> "",'adm_link'=>"profiles.php"), 'pph' => array('capt'=>_t("_Photos"), 'query'=>"SELECT COUNT(`medID`) FROM `sharePhotoFiles` WHERE `Approved`='true'",'link'=>'browsePhoto.php','adm_query'=> "",'adm_link'=>""), 'evs' => array('capt'=>_t("_Events"), 'query'=>"SELECT COUNT(`ID`) FROM `SDatingEvents` WHERE `Status`='Active'",'link'=>'events.php?show_events=all&action=show','adm_query'=> "",'adm_link'=>""), 'onl' => array('capt'=>_t("_Online"), 'query'=>"SELECT COUNT(`ID`) AS `count_onl` FROM `Profiles` WHERE `LastNavTime` > SUBDATE(NOW(), INTERVAL $iMin MINUTE)",'link'=>'search_result.php?online_only=1','adm_query'=> "", 'adm_link'=>""), 'pvi' => array('capt'=>_t("_Videos"), 'query'=>"SELECT COUNT(`ID`) FROM `RayMovieFiles` WHERE `Approved`='true'",'link'=>'browseVideo.php','adm_query'=> "", 'adm_link'=>""), 'pls' => array('capt'=>_t("_Polls"), 'query'=>"SELECT COUNT(`id_poll`) FROM `ProfilesPolls` WHERE `poll_approval`='1'", 'link'=>'polls.php','adm_query'=> "",'adm_link'=>""), 'ntd' => array('capt'=>_t("_New Today"), 'query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status` = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(`LastReg`)) <= 1",'link'=>'','adm_query'=> "",'adm_link'=>""), 'pmu' => array('capt'=>_t("_Music"), 'query'=>"SELECT COUNT(`ID`) FROM `RayMusicFiles` WHERE `Approved`='true'",'link'=>'browseMusic.php','adm_query'=> "",'adm_link'=>""), 'tps' => array('capt'=>_t("_Topics"), 'query'=>"SELECT IF( NOT ISNULL( SUM(`forum_topics`)), SUM(`forum_posts`), 0) AS `Num` FROM `pre_forum`",'link'=>'orca','adm_query'=> "",'adm_link'=>""), 'nwk' => array('capt'=>_t("_This Week"), 'query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status` = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(`LastReg`)) <= 7",'link'=>'','adm_query'=> "",'adm_link'=>""), 'pvd' => array('capt'=>_t("_Profile Videos"), 'query'=>"SELECT `Approved` FROM `RayVideoStats`",'link'=>'','adm_query'=> "",'adm_link'=>"",'hide'=>false), 'pts' => array('capt'=>_t("_Posts"), 'query'=>"SELECT IF( NOT ISNULL( SUM(`forum_posts`)), SUM(`forum_posts`), 0) AS `Num` FROM `pre_forum` ",'link'=>'orca','adm_query'=> "",'adm_link'=>""), 'nmh' => array('capt'=>_t("_This Month"), 'query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status` = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(`LastReg`)) <= 30",'link'=>'','adm_query'=> "",'adm_link'=>""), 'tgs' => array('capt'=>_t("_Tags"), 'query'=>"SELECT COUNT( DISTINCT `Tag` ) FROM `Tags`",'link'=>'','adm_query'=> "",'adm_link'=>""), 'ars' => array('capt'=>_t("_Articles"), 'query'=>"SELECT COUNT(`ArticlesID`) FROM `Articles`",'link'=>'articles.php','adm_query'=> "",'adm_link'=>""), 'nyr' => array('capt'=>_t("_This Year"), 'query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status` = 'Active' AND (TO_DAYS(NOW()) - TO_DAYS(`LastReg`)) <= 365",'link'=>'','adm_query'=> "",'adm_link'=>""), 'grs' => array('capt'=>_t("_Groups"), 'query'=>"SELECT COUNT(`ID`) FROM `Groups` WHERE `status`='Active'",'link'=>'groups_home.php','adm_query'=> "",'adm_link'=>""), 'cls' => array('capt'=>_t("_Classifieds"), 'query'=>"SELECT COUNT(`ID`) FROM `ClassifiedsAdvertisements` WHERE `Status`='active'",'link'=>'classifieds.php?Browse=1','adm_query'=> "",'adm_link'=>""), 'frs' => array('capt'=>_t("_Friends"), 'query'=>"SELECT COUNT(`ID`) FROM `FriendList` WHERE `Check`='1'",'link'=>'','adm_query'=> "",'adm_link'=>"") ); if ($sMode == 'admin') { $aAdmin = array( 'all'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `Profiles` WHERE `Status`!='Active'",'adm_link'=>'profiles.php?profiles=Approval'), 'pph'=>array('adm_query'=>"SELECT COUNT(`medID`) FROM `sharePhotoFiles` WHERE `Approved`='false'",'adm_link'=>'browsePhoto.php'), 'evs'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `SDatingEvents` WHERE `Status`!='Active'",'adm_link'=>'sdating_admin.php'), 'onl'=>array('adm_query'=>"",'adm_link'=>''), 'pvi'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `RayMovieFiles` WHERE `Approved`!='true'",'adm_link'=>'browseVideo.php'), 'pls'=>array('adm_query'=>"SELECT COUNT(`id_poll`) FROM `ProfilesPolls` WHERE `poll_approval`!='1'",'adm_link'=>'post_mod_ppolls.php'), 'ntd'=>array('adm_query'=>"",'adm_link'=>''), 'pmu'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `RayMusicFiles` WHERE `Approved`!='true'",'adm_link'=>'browseMusic.php'), 'tps'=>array('adm_query'=>"",'adm_link'=>''), 'nwk'=>array('adm_query'=>"",'adm_link'=>''), 'tgs'=>array('adm_query'=>"",'adm_link'=>''), 'pts'=>array('adm_query'=>"",'adm_link'=>''), 'nmh'=>array('adm_query'=>"",'adm_link'=>''), 'frs'=>array('adm_query'=>"",'adm_link'=>''), 'ars'=>array('adm_query'=>"",'adm_link'=>'articles.php'), 'nyr'=>array('adm_query'=>"",'adm_link'=>''), 'grs'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `Groups` WHERE `status`!='Active'",'adm_link'=>'groups.php'), 'cls'=>array('adm_query'=>"SELECT COUNT(`ID`) FROM `ClassifiedsAdvertisements` WHERE `Status` != 'active'",'adm_link'=>'manage_classifieds.php'), 'pvd'=>array('adm_query'=>"",'adm_link'=>'javascript:window.open(\'../ray/modules/video/app/admin.swf?nick={adminLogin}&password={adminPass}&url=../../../XML.php\',\'RayVideoAdmin\',\'width=700,height=330,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=0\');') ); $sAdd = '_a'; $sProfVideo = getApplicationContent('video', 'stat', array(), true); } else { $aAdmin = ''; $sProfVideo = ''; } $sCode = $sProfVideo.'
'; return $sCode; } function getPromoCode() { global $site; if( getParam( 'enable_flash_promo' ) == 'on' ) $sCode = getParam( 'flash_promo_code' ); else $sCode = '
'; $aReplace = array( 'images' => $site['images'], 'Welcome' => _t( '_Welcome' ), 'To_The_Community' => _t( '_To The Community' ), 'promo_url' => $site['imagesPromo'], 'promo_images' => getPromoImagesList(), ); foreach( $aReplace as $sKey => $sValue ) $sCode = str_replace( "__{$sKey}__", $sValue, $sCode ); return $sCode; } function getTemplateIcon( $sFileName ) { global $site; global $dir; global $tmpl; $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName; $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName; if( extFileExists( $sTemplate ) ) { $iconUrl = $site['icons'] . $sFileName; } else { if( extFileExists( $dir['base'] . 'images/icons/' . $sFileName ) ) { $iconUrl = $site['base'] . 'images/icons/' . $sFileName; } else { $iconUrl = getTemplateIcon( 'spacer.gif' ); } } return $iconUrl; } 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 ''; } ?>
What do I do now?
Thanks in advance