/** * page code function */ function PageCompMainCode() { global $oTemplConfig; global $logged; $iId = (int) $_COOKIE['memberID']; if ($iId > 0) { $sPassword = getPassword($iId); $bEnableRay = getParam('enable_ray') == 'on'; $check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT); if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword)); } else { // $ret .= ' // <center> // <table width=100% height=100% cellpadding=0 cellspacing=0> // <td align=center valign=center> // <table width="90%" height="70" cellpadding="5" cellspacing="1" class="table"> // <tr> // <td class="panel" width="100%" align="center" valign="middle"> // <div align="center" class="small">' . $check_res[CHECK_ACTION_MESSAGE] . '</div> // </td> // </tr> // </table> // </td> // </table> // </center>'; $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]); } return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num); } else { return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1); } }
function PageMainCode() { global $site; global $member; $sCode = '<div id="agreement" style="text-align: center;"><div style="font-weight: bold;">' . _t("_Media upload Agreement", _t("_Music")) . '</div><div><textarea rows="20" cols="80" readonly="true">' . _t("_License Agreement", $site['url']) . '</textarea></div><div><input type="submit" id="agree" value="' . _t("_I agree") . '" onclick="document.getElementById(\'uploadForm\').style.display = \'block\'; document.getElementById(\'agreement\').style.display = \'none\';""></div></div>'; $sCode .= '<div id="uploadForm" style="text-align: center; display: none;">' . getApplicationContent('music', 'editor', array('id' => $member['ID'], 'password' => $member['Password'])) . '</div>'; return $sCode; }
function getFileConcept($iFileId, $aExtra = array()) { $sOverride = false; $oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'display_player', $iFileId, getLoggedId(), array('extra' => $aExtra, 'override' => &$sOverride)); $oAlert->alert(); if ($sOverride) { return $sOverride; } $iFileId = (int) $iFileId; return '<div class="viewFile" style="width:100%">' . getApplicationContent('mp3', 'player', array('id' => $iFileId, 'user' => (int) $_COOKIE['memberID'], 'password' => clear_xss($_COOKIE['memberPassword'])), true) . '</div>'; }
function getContent($iId) { $sPassword = $iId > 0 ? $_COOKIE['memberPassword'] : ""; $aResult = checkAction($iId, ACTION_ID_USE_CHAT, true); if ($aResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $sResult = getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword), true); } else { $sResult = MsgBox($aResult[CHECK_ACTION_MESSAGE]); } $sResult = DesignBoxContent(_t('_chat_box_caption'), $sResult, 11); return $sResult; }
function getFileConcept($iFileId, $aExtra = array()) { $iFileId = (int) $iFileId; if (empty($aExtra['ext'])) { $sPlayer = getApplicationContent('video', 'player', array('id' => $iFileId, 'user' => $this->iViewer, 'password' => clear_xss($_COOKIE['memberPassword'])), true); } else { $sPlayer = str_replace("#video#", $aExtra['ext'], YOUTUBE_VIDEO_PLAYER); $sPlayer = str_replace("#wmode#", getWMode(), $sPlayer); $sPlayer = str_replace("#autoplay#", getSettingValue("video", "autoPlay") == TRUE_VAL ? "1" : "0", $sPlayer); } $iWidth = (int) $this->_oConfig->getGlParam('file_width'); return '<div class="viewFile" style="width: ' . ($iWidth + 2) . 'px;">' . $sPlayer . '</div>'; }
function getMessenger($iSndId, $sSndPassword, $iRspId) { if (!empty($iSndId) && !empty($sSndPassword) && !empty($iRspId)) { $aResult = checkAction($iSndId, ACTION_ID_USE_MESSENGER, true); if ($aResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $sResult = getApplicationContent('im', 'user', array('sender' => $iSndId, 'password' => $sSndPassword, 'recipient' => $iRspId), false); } else { $sResult = MsgBox($aResult[CHECK_ACTION_MESSAGE]); } } else { $sResult = MsgBox(_t('_messenger_err_not_logged_in')); } return $sResult; }
function getContent($iId, $iSavedId = 0) { if ($iId > 0) { $sPassword = $_COOKIE['memberPassword']; $aResult = checkAction($iId, ACTION_ID_USE_BOARD, true); if ($aResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $sResult = getApplicationContent('board', 'user', array('id' => $iId, 'password' => $sPassword, 'saved' => $iSavedId), true); } else { $sResult = MsgBox($aResult[CHECK_ACTION_MESSAGE]); } $sResult = DesignBoxContent(_t('_board_box_caption'), $sResult, 11); } else { $sResult = DesignBoxContent(_t('_board_box_caption'), MsgBox(_t('_board_err_not_logged_in')), 11); } return $sResult; }
function getFileConcept($iFileId, $aExtra = array()) { $sOverride = false; $oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'display_player', $iFileId, getLoggedId(), array('extra' => $aExtra, 'override' => &$sOverride)); $oAlert->alert(); if ($sOverride) { return $sOverride; } $iFileId = (int) $iFileId; if (empty($aExtra['ext'])) { $sPlayer = getApplicationContent('video', 'player', array('id' => $iFileId, 'user' => $this->iViewer, 'password' => clear_xss($_COOKIE['memberPassword'])), true); } else { $sPlayer = str_replace("#video#", $aExtra['ext'], YOUTUBE_VIDEO_PLAYER); $sPlayer = str_replace("#wmode#", getWMode(), $sPlayer); $sPlayer = str_replace("#autoplay#", getSettingValue("video", "autoPlay") == TRUE_VAL ? "&autoplay=1" : "", $sPlayer); } return '<div class="viewFile" style="width:100%;">' . $sPlayer . '</div>'; }
/** * page code function */ function PageCompMainCode() { global $oTemplConfig; global $logged; $iId = (int) $_COOKIE['memberID']; if ($iId > 0) { $sPassword = getPassword($iId); $bEnableRay = getParam('enable_ray') == 'on'; $check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT); if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword), true); } else { $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]); } return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num); } else { return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1); } }
/*************************************************************************** * * IMPORTANT: This is a commercial product made by BoonEx Ltd. and cannot be modified for other than personal usage. * This product cannot be redistributed for free or a fee without written permission from BoonEx Ltd. * This notice may not be removed from the source code. * ***************************************************************************/ if (!isset($sRayHeaderPath)) { $sRayHeaderPath = "modules/global/inc/header.inc.php"; } if (!file_exists($sRayHeaderPath)) { header("Location:install/index.php"); exit; } $sModule = isset($sModule) ? $sModule : $_REQUEST['module']; $sApp = isset($sApp) ? $sApp : $_REQUEST['app']; if (file_exists($sRayHeaderPath) && !empty($sModule) && !empty($sApp)) { require_once $sRayHeaderPath; require_once $sIncPath . "content.inc.php"; require_once $sModulesPath . $sModule . "/inc/header.inc.php"; require_once $sModulesPath . $sModule . "/inc/constants.inc.php"; } else { exit; } $aParameters = array(); foreach ($aModules[$sApp]['parameters'] as $sParameter) { $aParameters[$sParameter] = isset(${$sParameter}) ? ${$sParameter} : $_REQUEST[$sParameter]; } echo getApplicationContent($sModule, $sApp, $aParameters);
function PageCompMainCode() { global $tmpl, $_page, $oTemplConfig; global $enable_video_upload, $enable_audio_upload; $iProfileID = (int) $_COOKIE['memberID']; $show = $_REQUEST['show']; switch ($show) { case 'audio': if ($enable_audio_upload) { require_once BX_DIRECTORY_PATH_ROOT . 'uploadAudio.php'; $oMedia = new UploadAudio($iProfileID); $oMedia->getMediaArray(); $_page['header_text'] = _t("_My Audio"); } break; case 'video': if ($enable_video_upload) { require_once BX_DIRECTORY_PATH_ROOT . 'uploadVideo.php'; $oMedia = new UploadVideo($iProfileID); $oMedia->getMediaArray(); $_page['header_text'] = _t("_My Videos"); } break; case 'photo': default: require_once BX_DIRECTORY_PATH_ROOT . 'uploadPhoto.php'; $oMedia = new UploadPhoto($iProfileID); $oMedia->getMediaArray(); $_page['header_text'] = _t("_My Photos"); break; } // print_r($oMedia -> aMediaConfig); $ret = ''; $ret .= ' <script type="text/javascript"> function checkForm() { var el; var hasErr = false; var fild = ""; el = document.getElementById("mediaTitle"); if( el.value.length < ' . $oMedia->aMediaConfig['min']['mediaTitle'] . ' ) { el.style.backgroundColor = "pink"; el.style.border = "1px solid silver"; hasErr = true; fild += "\\n ' . _t('_title_min_lenght', $oMedia->aMediaConfig['min']['mediaTitle']) . '"; } else { el.style.backgroundColor = "#fff"; } if (hasErr) { alert( fild ) return false; } else { return true; } return false; } </script> '; if ($oTemplConfig->customize['upload_media']['showMediaTabs']) { $ret .= '<div class="choiseBlock">'; $ret .= getMediaTabs($oMedia->sMediaType, $oMedia->aMediaConfig['enable']); $ret .= '</div>' . "\n"; $ret .= '<div class="clear_both"></div>'; } if ($oTemplConfig->customize['upload_media']['showAddButton']) { $ret .= '<div class="addNew">'; $ret .= '<a href="javascript:void(0);" onclick="return BxShowBlock(\'addNewBlock\');">' . _t('_add_new', _t('_' . $oMedia->sMediaType . '')) . '</a>'; $ret .= '</div>' . "\n"; } //$ret .= ' Max -- [' . $oMedia -> aMediaConfig['max'][$oMedia -> sMediaType] . ']<br>'; //$ret .= ' Med Count -- [' . $oMedia -> iMediaCount . ']<br>'; $ret .= '<div id="addNewBlock" style="display:' . $oTemplConfig->customize['upload_media']['addNewBlock_display'] . ';">'; if ($oMedia->iMediaCount >= $oMedia->aMediaConfig['max'][$oMedia->sMediaType]) { $ret .= _t_action('_too_many_files'); } else { $ret .= '<form enctype="multipart/form-data" action="' . $oMedia->aMediaConfig['url']['media'] . '?show=' . $oMedia->sMediaType . '" method="post" onsubmit="return checkForm();">'; $ret .= '<div>'; $ret .= _t('_Title'); $ret .= ' ( <span id="charCount" class="charCount">' . $oMedia->aMediaConfig['max']['mediaTitle'] . '</span>'; $ret .= '<span class="charCount">' . _t('_characters_left') . '</span> )'; $ret .= '</div>' . "\n"; $ret .= '<div>'; $ret .= '<input type="text" name="title" class="title" id="mediaTitle" onkeydown="return charCounter(\'mediaTitle\', ' . $oMedia->aMediaConfig['max']['mediaTitle'] . ', \'charCount\');" onkeyup="return charCounter(\'mediaTitle\', ' . $oMedia->aMediaConfig['max']['mediaTitle'] . ', \'charCount\');" />'; $ret .= '</div>' . "\n"; $ret .= '<div>'; $ret .= '<input type="file" size="34" name="' . $oMedia->sMediaType . '" class="file" />'; $ret .= '</div>' . "\n"; $ret .= '<div>'; $ret .= '<input type="submit" value="' . _t('_Submit') . '">'; $ret .= '<input type="hidden" name="media_type" value="' . $oMedia->sMediaType . '" />'; $ret .= '<input type="hidden" name="show" value="' . $oMedia->sMediaType . '" />'; $ret .= '<input type="hidden" name="action" value="upload" />'; $ret .= '</div>' . "\n"; $ret .= '</form>'; } $ret .= '</div>' . "\n"; $action = $_REQUEST['action']; if ($_POST['makePrim'] || isset($_POST['makePrim_x'])) { $action = 'makePrim'; } elseif ($_POST['deletePhoto'] || isset($_POST['deletePhoto_x'])) { $action = 'deletePhoto'; } $iPhotoID = (int) $_REQUEST['photoID']; $iMediaID = (int) $_REQUEST['mediaID']; switch ($action) { case 'upload': $ret .= $oMedia->uploadMedia(); header('Location:' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia->sMediaType); break; case 'makePrim': $ret .= $oMedia->makePrimPhoto($iPhotoID); header('Location:' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia->sMediaType); break; case 'deletePhoto': $ret .= $oMedia->deleteMedia($iPhotoID); header('Location:' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia->sMediaType); break; case 'delete': $ret .= $oMedia->deleteMedia($iMediaID); header('Location:' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia->sMediaType); break; } switch ($show) { case 'audio': if ($enable_audio_upload) { $ret .= $oMedia->getMediaPage(); } else { $ret .= ''; } break; case 'video': if ($enable_video_upload) { $ret .= $oMedia->getMediaPage(); //------------------ Ray Integration ------------------// $ret .= '<div class="clear_both"></div>'; $ret .= '<div class="addNew"><center>'; if (widgetExists('video')) { $sRayHeaderPath = $dir['root'] . "ray/inc/header.inc.php"; $iId = (int) $_COOKIE['memberID']; $sPassword = getPassword($iId); $ret .= getApplicationContent('video', 'recorder', array('id' => $iId, 'password' => $sPassword)); } $ret .= '</center></div>'; //------------------ Ray Integration ------------------// } else { $ret .= ''; } break; case 'photo': default: if ($_REQUEST['photoID']) { $iPhotoId = (int) $_REQUEST['photoID']; $ret .= $oMedia->getMediaPage($iPhotoId); } else { $ret .= $oMedia->getMediaPage(); } break; } return $ret; }
/** * Gets the embed code of necessary widget's application. * @param sModule - module(widget) name. * @param sApp - application name in the widget. * @param aParamValues - an associative array of parameters to be passed into the Flash object. */ function getEmbedCode($sModule, $sApp, $aParamValues) { return getApplicationContent($sModule, $sApp, $aParamValues, true, true); }
function getBlockCode_Shoutbox() { $sPassword = getPassword($this->iMemberID); return getApplicationContent('shoutbox', 'user', array('id' => $this->iMemberID, 'password' => $sPassword), true); }
function getRecordFormFile() { $sCustomRecorderObject = getApplicationContent('mp3', 'recorder', array('user' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => ''), true); return $this->_getRecordFormFile($sCustomRecorderObject); }
function showFile($iFile) { $iFile = (int) $iFile; $sCode = ''; switch ($this->sType) { case 'photo': $aFile = $this->getFileInfo($iFile); $sImage = $this->sFilesUrl . $iFile . '_m.' . $aFile[$this->aTableFields['medExt']]; $sCode = '<div id="viewFile" style="background-image: url(\'' . $sImage . '\')"> </div>'; break; case 'music': $sCode = '<div class="viewFile" style="text-align:center;">' . getApplicationContent('music', 'player', array('id' => $iFile, 'password' => $this->sViewerPass, 'vId' => $this->iViewer, 'song' => 'true'), true) . '</div>'; break; case 'video': $sCode = '<div class="viewFile" style="text-align:center;">' . getApplicationContent('movie', 'player', array('id' => $iFile, 'file' => 'true'), true) . '</div>'; break; } return $sCode; }
function getSiteStat($sMode = '') { global $site; $iMin = getParam("member_online_time"); $aStat = array('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: openRayWidget(\'video\',\'admin\',\'{adminLogin}\',\'{adminPass}\');')); $sAdd = '_a'; $sProfVideo = getApplicationContent('video', 'stat', array(), true); } else { $aAdmin = ''; $sProfVideo = ''; } $sCode = $sProfVideo . '<div>'; foreach ($aStat as $sKey => $sVal) { $sLink = strlen($sVal['link']) > 0 ? '<a href="' . $site['url'] . $sVal['link'] . '">' . $sVal['capt'] . '</a>' : $sVal['capt']; if ($sVal['hide'] === true && $sMode != 'admin') { continue; } if (!is_array($aAdmin)) { $iNum = strlen($sVal['query']) > 0 ? db_value($sVal['query']) : 0; if ($sKey == 'pls') { $iNum = $iNum + db_value("SELECT COUNT(`ID`) FROM `polls_q` WHERE `Active`='on'"); } } else { $iNum = strlen($aAdmin[$sKey]['adm_query']) > 0 ? db_value($aAdmin[$sKey]['adm_query']) : 0; if (strlen($aAdmin[$sKey]['adm_link']) > 0) { if (substr($aAdmin[$sKey]['adm_link'], 0, strlen('javascript:')) == 'javascript:') { $sHref = 'javascript:void(0);'; $sOnclick = 'onclick="' . $aAdmin[$sKey]['adm_link'] . '"'; $aAdmin = db_arr("SELECT * FROM `Admins` LIMIT 1"); $sOnclick = str_replace('{adminLogin}', $aAdmin['Name'], $sOnclick); $sOnclick = str_replace('{adminPass}', $aAdmin['Password'], $sOnclick); } else { $sHref = $aAdmin[$sKey]['adm_link']; $sOnclick = ''; } $sLink = '<a href="' . $sHref . '" ' . $sOnclick . '>' . $sVal['capt'] . '</a>'; } else { $sLink = $sVal['capt']; } if ($sKey == 'pls') { $iNum = $iNum + db_value("SELECT COUNT(`ID`) FROM `polls_q` WHERE `Active`<>'on'"); } } switch ($sKey) { case 'all': case 'onl': case 'ntd': case 'nwk': case 'nmh': case 'nyr': $sIcon = 'mbs.gif'; break; case 'all': $sIcon = 'us.gif'; break; case 'pvi': case 'pvd': $sIcon = 'pvi.gif'; break; default: $sIcon = $sKey . '.gif'; } $sCode .= '<div class="siteStatUnit" id="' . $sKey . $sAdd . '"><img src="' . getTemplateIcon($sIcon) . '" /> ' . $iNum . ' ' . $sLink . '</div>'; } $sCode .= '</div><div class="clear_both"></div>'; return $sCode; }
function getSiteStatAdmin() { global $site; global $dir; $aAdmin = ''; $sProfVideo = ''; $sAdd = '_a'; $sProfVideo = getApplicationContent('video', 'stat', array(), true); $sqlQuery = "SELECT `Name` as `name`,\r\n\t\t\t\t\t\t`Title` as `capt`,\r\n\t\t\t\t\t\t`UserQuery` as `query`,\r\n\t\t\t\t\t\t`UserLink` as `link`,\r\n\t\t\t\t\t\t`IconName` as `icon`,\r\n\t\t\t\t\t\t`AdminQuery` as `adm_query`,\r\n\t\t\t \t\t\t`AdminLink` as `adm_link`\r\n\t\t\t\t\t\tFROM `SiteStat`"; $rData = db_res($sqlQuery); $sCode = $sProfVideo . '<div>'; $fStat = @fopen(BX_DIRECTORY_PATH_INC . 'db_cached/SiteStat.inc', 'w'); if (!$fStat) { return false; } fwrite($fStat, "return array( \n"); $sLine = ''; while ($aVal = mysql_fetch_assoc($rData)) { $sCode .= getSiteStatBody($aVal, 'admin'); $sLine .= genSiteStatFile($aVal); } $sLine = rtrim($sLine, ",\n") . "\n);"; fwrite($fStat, $sLine); fclose($fStat); $sCode .= '</div><div class="clear_both"></div>'; return $sCode; }
function showBlockMp3($sCaption, $bNoDB = false) { global $logged; $iMemberId = (int) $_COOKIE['memberID']; $ret = getApplicationContent('mp3', 'player', array('id' => $this->_iProfileID, 'password' => getPassword($iMemberId), 'vId' => $iMemberId), true); if ($bNoDB) { return $ret; } else { echo DesignBoxContent(_t($sCaption), '<div align="center">' . $ret . '</div>', 1, $show_hide); } }
function getFileConcept($iFileId, $aExtra = array()) { $iFileId = (int) $iFileId; $iWidth = (int) $this->_oConfig->getGlParam('file_width'); return '<div class="viewFile" style="width: ' . ($iWidth + 2) . 'px;">' . getApplicationContent('mp3', 'player', array('id' => $iFileId, 'user' => (int) $_COOKIE['memberID'], 'password' => clear_xss($_COOKIE['memberPassword'])), true) . '</div>'; }
function _getFormBox($sType, $aCmt = array()) { $iCmtId = !empty($aCmt['id']) ? (int) $aCmt['id'] : 0; $iCmtParentId = !empty($aCmt['parent_id']) ? (int) $aCmt['parent_id'] : 0; $sCmtText = !empty($aCmt['text']) ? $this->_prepareTextForEdit($aCmt['text']) : ''; $sTextareaId = "cmt" . bx_gen_method_name($this->_sSystem . "_" . $sType) . "TextArea"; switch ($sType) { case 'post': $sFunction = "submitComment(this)"; $sTextareaId .= $iCmtParentId; break; case 'edit': $sFunction = "updateComment(this, '" . $iCmtId . "')"; $sTextareaId .= $iCmtId; break; } if ($this->_aSystem['is_mood']) { $sMood = ' <div class="cmt-post-reply-mood"> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="1" id="' . $this->_sSystem . '-mood-positive" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-positive">' . _t('_Comment Positive') . '</label></div> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="-1" id="' . $this->_sSystem . '-mood-negative" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-negative">' . _t('_Comment Negative') . '</label></div> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="0" id="' . $this->_sSystem . '-mood-neutral" checked="checked" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-neutral">' . _t('_Comment Neutral') . '</label></div> <div class="clear_both"> </div> </div>'; } $sContent = ' <form name="cmt-post-reply" onsubmit="' . $this->_sJsObjName . '.' . $sFunction . '; return false;"> <input type="hidden" name="CmtParent" value="' . $iCmtParentId . '" /> <input type="hidden" name="CmtType" value="text" /> <div class="cmt-post-reply-text"> <textarea class="cmt-text-' . $sType . ' bx-def-round-corners-with-border" id="' . $sTextareaId . '" name="CmtText">' . $sCmtText . '</textarea> </div> <div class="cmt-post-reply-video">' . getApplicationContent('video_comments', 'recorder', array('user' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => implode('_', array($this->_sSystem . '-' . $this->getId(), $iCmtParentId))), true) . '</div> <div class="cmt-post-reply-post"><button class="bx-btn bx-btn-small" type="submit">' . _t('_Submit Comment') . '</button></div> ' . $sMood . ' </form>'; if ($this->iGlobAllowHtml == 1) { bx_import('BxDolEditor'); $oEditor = BxDolEditor::getObjectInstance(); $sContent .= $oEditor ? $oEditor->attachEditor('#' . $sTextareaId, BX_EDITOR_MINI, $this->bDynamic) : ''; } return $sContent; }
function _getFormBox($iCmtParentId = 0, $sText = "", $sFunction = "submitComment(this)") { $sTinyStyle = $this->iGlobAllowHtml == 1 && $this->iGlobUseTinyMCE == 1 ? ' tinypossible="true" ' : ''; if ($this->_aSystem['is_mood']) { $sMood = ' <div class="cmt-post-reply-mood"> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="1" id="' . $this->_sSystem . '-mood-positive" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-positive">' . _t('_Comment Positive') . '</label></div> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="-1" id="' . $this->_sSystem . '-mood-negative" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-negative">' . _t('_Comment Negative') . '</label></div> <div class="cmt-post-mood-ctl"><input type="radio" name="CmtMood" value="0" id="' . $this->_sSystem . '-mood-neutral" checked="checked" /></div> <div class="cmt-post-mood-lbl"><label for="' . $this->_sSystem . '-mood-neutral">' . _t('_Comment Neutral') . '</label></div> <div class="clear_both"> </div> </div>'; } return ' <form name="cmt-post-reply" onsubmit="' . $this->_sJsObjName . '.' . $sFunction . '; return false;"> <input type="hidden" name="CmtParent" value="' . $iCmtParentId . '" /> <input type="hidden" name="CmtType" value="text" /> <div class="cmt-post-reply-text"> <textarea name="CmtText" ' . $sTinyStyle . ' >' . $sText . '</textarea> </div> <div class="cmt-post-reply-video">' . getApplicationContent('video_comments', 'recorder', array('user' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => implode('_', array($this->_sSystem . '-' . $this->getId(), $iCmtParentId))), true) . '</div> <div class="cmt-post-reply-post"><input type="submit" value="' . _t('_Submit Comment') . '" /></div> ' . $sMood . ' </form>'; }
function serviceProfileSoundBlock($iProfileId) { if (!$this->checkMemAction($iProfileId, 'view')) { return ''; } $aVars = array('title' => false, 'prefix' => 'id' . time() . '_' . rand(1, 999999), 'bx_repeat:sounds' => array(), 'bx_repeat:icons' => array()); $aFiles = $this->serviceGetProfileAlbumFiles($iProfileId); foreach ($aFiles as $aFile) { $aVars['bx_repeat:sounds'][] = array('style' => false === $aVars['title'] ? '' : 'display:none;', 'id' => $aFile['id'], 'sound' => getApplicationContent('mp3', 'player', array('id' => $aFile['id'], 'user' => getLoggedId(), 'password' => getLoggedPassword()), true)); $aVars['bx_repeat:icons'][] = array('id' => $aFile['id'], 'icon_url' => $aFile['file'], 'title' => $aFile['title']); if (false === $aVars['title']) { $aVars['title'] = $aFile['title']; } } if (!$aVars['bx_repeat:icons']) { return ''; } $this->oTemplate->addCss('entry_view.css'); return $this->oTemplate->parseHtmlByName('entry_view_block_sounds.html', $aVars); }
/** * Audio Player */ function serviceResponseAudioPlayer($oAlert) { if (!($iFileId = (int) $oAlert->iObject)) { return false; } if (!($aFile = $this->_oDb->getRow("SELECT * FROM `RayMp3Files` WHERE `ID` = {$iFileId}"))) { return false; } global $sIncPath; global $sModulesPath; global $sModule; global $sFilesPath; global $sFilesPathMp3; global $oDb; require_once $sIncPath . 'db.inc.php'; $sModule = "mp3"; $sModulePath = $sModulesPath . $sModule . '/inc/'; require_once $sModulesPath . $sModule . '/inc/header.inc.php'; require_once $sModulesPath . $sModule . '/inc/constants.inc.php'; require_once $sModulesPath . $sModule . '/inc/functions.inc.php'; require_once $sModulesPath . $sModule . '/inc/customFunctions.inc.php'; $sOverride = false; switch ($aFile['Status']) { case STATUS_PENDING: case STATUS_PROCESSING: $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_processing')); break; case STATUS_DISAPPROVED: if (!isAdmin()) { $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_disapproved')); break; } case STATUS_APPROVED: if (file_exists($GLOBALS['sFilesPathMp3'] . $iFileId . MP3_EXTENSION)) { $sToken = getMp3Token($iFileId); if (file_exists($GLOBALS['sFilesPathMp3'] . $iFileId . '.ogg')) { $sSourceOgg = '<source type=\'audio/ogg; codecs="vorbis"\' src="' . BX_DOL_URL_ROOT . "flash/modules/mp3/get_file.php?id=" . $iFileId . "&token=" . $sToken . '&ext=ogg" />'; } $sFlash = getApplicationContent('mp3', 'player', array('id' => $iFileId, 'user' => getLoggedId(), 'password' => clear_xss($_COOKIE['memberPassword'])), true); $sId = 'bx-media-' . genRndPwd(8, false); $sJs = $sSourceOgg ? '' : ' var eMedia = document.createElement("audio"); if (eMedia.canPlayType && !eMedia.canPlayType("audio/mpeg")) { var sReplace = "' . bx_js_string(BX_H5AV_FALLBACK ? $sFlash : '<b>Your browser doesn\'t support this media playback.</b>', BX_ESCAPE_STR_QUOTE) . '"; $("#' . $sId . '").replaceWith(sReplace); }'; $sJs .= $aFile['Time'] ? '' : ' eFile.on("canplay", function (e) { $.post("' . BX_DOL_URL_ROOT . 'flash/XML.php", { module: "mp3", action: "updateFileTime", id: ' . $iFileId . ', time: parseInt(this.duration * 1000) }); });'; $sAutoPlay = TRUE_VAL == getSettingValue('mp3', 'autoPlay') && class_exists('BxSoundsPageView') ? 'autoplay' : ''; $sOverride = ' <audio controls ' . $sAutoPlay . ' preload="auto" autobuffer style="width:100%" id="' . $sId . '"> <source type=\'audio/mpeg; codecs="mp3"\' src="' . BX_DOL_URL_ROOT . "flash/modules/mp3/get_file.php?id=" . $iFileId . "&token=" . $sToken . '" /> ' . $sSourceOgg . ' ' . (BX_H5AV_FALLBACK ? $sFlash : '<b>Can not playback media - your browser doesn\'t support HTML5 audio/video tag.</b>') . ' </audio> <script> var eFile = $("#' . $sId . '"); eFile.on("play", function () { var ePlaying = this; $("audio").each(function () { if (this != ePlaying) this.pause(); }); }); ' . $sJs . ' </script>'; break; } case STATUS_FAILED: default: $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_not_found')); break; } $oAlert->aExtras['override'] = $sOverride; return true; }
function _blockSound($aReadyMedia, $iAuthorId, $sPrefix = false) { if (!$aReadyMedia) { return ''; } $aVars = array('title' => false, 'prefix' => $sPrefix ? $sPrefix : 'id' . time() . '_' . rand(1, 999999), 'bx_repeat:sounds' => array(), 'bx_repeat:icons' => array()); foreach ($aReadyMedia as $iMediaId) { $a = BxDolService::call('sounds', 'get_music_array', array($iMediaId, 'browse'), 'Search'); $aVars['bx_repeat:sounds'][] = array('style' => false === $aVars['title'] ? '' : 'display:none;', 'id' => $iMediaId, 'sound' => getApplicationContent('mp3', 'player', array('id' => $iMediaId, 'user' => $_COOKIE['memberID'], 'password' => $_COOKIE['memberPassword']), true)); $aVars['bx_repeat:icons'][] = array('id' => $iMediaId, 'icon_url' => $a['file'], 'title' => $a['title']); if (false === $aVars['title']) { $aVars['title'] = $a['title']; } } if (!$aVars['bx_repeat:icons']) { return ''; } return $this->_oTemplate->parseHtmlByName('entry_view_block_sounds', $aVars); }
<?php /** * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ * CC-BY License - http://creativecommons.org/licenses/by/3.0/ */ require_once '../inc/header.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'design.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php'; $logged['admin'] = member_auth(1, true, true); $aProfile = getProfileInfo(); $iNameIndex = 0; $_page = array('name_index' => $iNameIndex, 'css_name' => array(), 'js_name' => array(), 'header' => _t('_adm_page_cpt_fapps'), 'header_text' => _t('_adm_box_cpt_fapps')); $_page_cont[$iNameIndex]['page_main_code'] = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => getApplicationContent(GLOBAL_MODULE, "admin", array("nick" => $aProfile['NickName'], "password" => $aProfile['Password']), true))); PageCodeAdmin();
* * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/ require_once 'inc/header.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'design.inc.php'; require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php'; $iId = (int) $_COOKIE['memberID']; $sPassword = getPassword($iId); $bEnableRay = getParam('enable_ray') == 'on'; $check_res = checkAction($iId, ACTION_ID_USE_RAY_PRESENCE); if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { echo getApplicationContent("presence", "user", array('id' => $iId, 'password' => $sPassword), false); } else { ?> <center> <table width=100% height=100% cellpadding=0 cellspacing=0> <td align=center valign=center> <table width="90%" height="70" cellpadding="5" cellspacing="1" class="table"> <tr> <td class="panel" width="100%" align="center" valign="middle"> <div align="center" class="small"><?php echo $check_res[CHECK_ACTION_MESSAGE]; ?> </div> </td> </tr> </table>
function getRayMp3Player($iId, $sPassword, $iViewerId) { return getApplicationContent("mp3", "player", array('id' => $iId, 'password' => md5($sPassword), 'vId' => $iViewerId), true); }
function PageCompViewFile() { global $aFile; $sCode = getApplicationContent('movie', 'player', array('id' => $aFile['medID'], 'file' => 'true'), true); return $sCode; }
function getRecordFormFile($aExtras) { $sCustomRecorderObject = getApplicationContent('photo', 'shooter', array('id' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => ''), true); return $this->_getRecordFormFile($sCustomRecorderObject, $aExtras); }
function PageCompViewFile() { global $aFile; global $member; $sCode = '<div class="viewFile">' . getApplicationContent('music', 'player', array('id' => $aFile['medID'], 'password' => $member['Password'], 'vId' => $member['ID'], 'song' => 'true'), true) . '</div>'; return $sCode; }