コード例 #1
0
 function CheckLogged()
 {
     global $logged;
     if (!$logged['member'] && !$logged['admin']) {
         member_auth(0);
     }
 }
コード例 #2
0
 function actionAdministration($sSubaction = '', $sID = 0)
 {
     global $_page, $_page_cont;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $logged['admin'] = member_auth(1, true, true);
     $iUnitID = $sSubaction == 'edit' && (int) $sID > 0 ? (int) $sID : 0;
     $iUnitID = bx_get('action') == 'edit' && (int) bx_get('ID') > 0 ? (int) bx_get('ID') : $iUnitID;
     if (isset($_POST['quotes_list']) && is_array($_POST['quotes_list'])) {
         // manage subactions
         foreach ($_POST['quotes_list'] as $sQuoteId) {
             $iQuoteId = (int) $sQuoteId;
             switch (true) {
                 case isset($_POST['action_delete']):
                     $this->_oDb->deleteUnit($iQuoteId);
                     break;
             }
         }
     }
     $iNameIndex = 9;
     $_page = array('name_index' => $iNameIndex, 'css_name' => array(), 'js_name' => array(), 'header' => _t('_adm_page_cpt_quotes'), 'header_text' => _t('_adm_box_cpt_quotes'));
     $_page_cont[$iNameIndex]['page_main_code'] = $this->getPostForm($iUnitID);
     $_page_cont[$iNameIndex]['page_main_code'] .= $this->getQuotesList();
     PageCodeAdmin();
 }
コード例 #3
0
* http://creativecommons.org/licenses/by/3.0/
*
* 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 . 'groups.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
// --------------- page variables and login
$_page['name_index'] = 72;
$_page['css_name'] = 'groups.css';
$logged['member'] = member_auth(0, true);
$memberID = (int) $_COOKIE['memberID'];
$_page['header'] = _t("_Create Group");
$_page['header_text'] = _t("_Create Group");
$_page['extra_js'] = $oTemplConfig->sTinyMceEditorCompactJS;
// --------------- page components
$_ni = $_page['name_index'];
$arrMember = getProfileInfo($memberID);
//db_arr( "SELECT `Status` FROM `Profiles` WHERE `ID`=$memberID" );
if ($arrMember['Status'] == 'Active') {
    $_page_cont[$_ni]['page_main_code'] = PageCompMainCode();
} else {
    $_page_cont[$_ni]['page_main_code'] = _t('_You must be active member to create groups');
}
// --------------- [END] page components
PageCode();
コード例 #4
0
ファイル: BxSpyModule.php プロジェクト: dalinhuang/shopexts
 /**
  * Function will generate global spy's page (content activity only!);
  *
  * @param  : $sType (string) - type of activity;
  * @return : (text) - html presentation data;
  */
 function getActivityPage($sType = '')
 {
     //-- set search filters --//
     if ($sType) {
         $this->oSearch->aCurrent['restriction']['type']['value'] = $sType;
     }
     //search all events
     $this->oSearch->aCurrent['restriction']['viewed']['value'] = '';
     //--
     $sPageUrl = $this->sPathToModule;
     // define page's mode
     switch ($this->sSpyMode) {
         case 'friends_events':
             //-- if member not logged function will draw login form --//;
             if (!$this->iMemberId) {
                 return member_auth(0);
             }
             $this->oSearch->aCurrent['join'][] = array('type' => 'INNER', 'table' => $this->_oDb->sTablePrefix . 'friends_data', 'mainField' => 'id', 'onField' => 'event_id', 'joinFields' => array());
             $this->oSearch->aCurrent['restriction']['friends']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['no_my']['value'] = $this->iMemberId;
             $sPageUrl .= '&mode=' . $this->sSpyMode;
             break;
         default:
     }
     // try to define activity type;
     if ($sType) {
         $sPageUrl .= '&spy_type=' . $sType;
     }
     // get data;
     $aActivites = $this->oSearch->getSearchData();
     $sActivites = $this->_proccesActivites($aActivites);
     $sOutputCode = $this->_oTemplate->getWrapper($this->sEventsWrapper, $aActivites ? $sActivites : MsgBox(_t('_Empty')), $this->oSearch->showPagination($sPageUrl));
     // if first page;
     if ($this->iPage == 1) {
         $sOutputCode = $this->getInitPart($sType) . $sOutputCode;
     }
     return $sOutputCode;
 }
コード例 #5
0
*
* 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';
require_once BX_DIRECTORY_PATH_INC . 'profile_disp.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'sharing.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
$_page['extra_js'] = '';
$logged[admin] = member_auth(1);
$ADMIN = $logged[admin];
$_page['css_name'] = 'browse.css';
$_page['header'] = "Browse Music";
$_page['header_text'] = "Browse Music";
$_ni = $_page['name_index'];
$sType = 'Music';
if (isset($_POST['Check']) && is_array($_POST['Check'])) {
    foreach ($_POST['Check'] as $iKey => $iVal) {
        switch (true) {
            case isset($_POST['Delete']):
                deleteMedia((int) $iVal, $sType);
                break;
            case isset($_POST['Approve']):
                approveMedia((int) $iVal, $sType);
                break;
コード例 #6
0
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* 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';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
//$_page['name_index'] = 20;
$logged['admin'] = member_auth(1);
$_page['css_name'] = 'news.css';
function MemberPrintNews()
{
    global $site;
    global $short_date_format;
    $res = db_res("SELECT `ID`, DATE_FORMAT(`Date`, '{$short_date_format}' ) AS 'Date', `Header`, `Text` FROM `News` ORDER BY `Date` DESC");
    if (!$res) {
        return;
    }
    echo "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n";
    if (!mysql_num_rows($res)) {
        echo "<tr class=panel><td align=center>No news available.</td></tr>\n";
    }
    while ($news_arr = mysql_fetch_array($res)) {
        $news_header = process_line_output($news_arr['Header']);
コード例 #7
0
*
* 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';
require_once BX_DIRECTORY_PATH_INC . 'modules.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'tags.inc.php';
// --------------- page variables and login
$_page['name_index'] = 36;
$_page['css_name'] = 'change_status.css';
$logged['member'] = member_auth(0);
$_page['header'] = _t("_CHANGE_STATUS_H");
$_page['header_text'] = _t("_CHANGE_STATUS_H1", $site['title']);
// --------------- page components
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();
// --------------- [END] page components
PageCode();
// --------------- page components functions
/**
 * page code function
 */
function PageCompPageMainCode()
{
    global $dir;
    $member['ID'] = (int) $_COOKIE['memberID'];
コード例 #8
0
 function CheckLogged()
 {
     if (!getLoggedId()) {
         member_auth(0);
     }
 }
コード例 #9
0
* 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';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
if (getParam("enable_aff") != 'on') {
    $sCode = MsgBox(_t('_affiliate_system_was_disabled'));
    $_page['name_index'] = 0;
    $_page_cont[0]['page_main_code'] = $sCode;
    PageCode();
    exit;
}
$logged['aff'] = member_auth(2);
$AFF = (int) $_COOKIE['affID'];
// - GET variables --------------
$_page['header'] = "Affiliate's insructions page";
$_page['header_text'] = "Affiliate's insructions page";
$_page['js'] = 1;
TopCodeAdmin();
ContentBlockHead("Link");
?>

<table class="text" cellspacing=0 cellpadding=4 width=500>
	<tr>
		<td align="center">Place following link on your site:</td>
	</tr>
	<tr>
		<td align="center"><input class="no" size="60" value="<?php 
コード例 #10
0
 /**
  * Function will get new activity by type;
  *
  * @param  : $sMode (string) - page's mode (possible values : global, friends_events);
  * @param  : $iLastActivityId (integer) - last event's Id;
  * @param  : $sType (string) - activity type;
  * @return : (text) - html presentation data;
  */
 function actionCheckUpdates($sMode = 'global', $iLastActivityId = 0, $sType = '', $iProfileId = 0)
 {
     $sPageUrl = $this->sPathToModule;
     $iLastActivityId = (int) $iLastActivityId;
     $iProfileId = (int) $iProfileId;
     // set filter;
     if ($sType && $sType != 'all') {
         $this->oSearch->aCurrent['restriction']['type']['value'] = process_db_input($sType, BX_TAGS_STRIP);
     }
     if ($iProfileId) {
         // get only profile's activity;
         $this->oSearch->aCurrent['restriction']['only_me']['value'] = $iProfileId;
     }
     switch ($sMode) {
         case 'friends_events':
             //-- if member not logged function will draw login form --//;
             if (!$this->iMemberId) {
                 exit(member_auth(0));
             }
             $this->oSearch->aCurrent['join'][] = array('type' => 'INNER', 'table' => $this->_oDb->sTablePrefix . 'friends_data', 'mainField' => 'id', 'onField' => 'event_id', 'joinFields' => array());
             $this->oSearch->aCurrent['restriction']['friends']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['no_my']['value'] = $this->iMemberId;
             $this->oSearch->aCurrent['restriction']['over_id']['value'] = $iLastActivityId;
             $sPageUrl .= '&mode=' . $this->sSpyMode;
             break;
         default:
             $this->oSearch->aCurrent['restriction']['id'] = array('field' => 'id', 'operator' => '>', 'value' => $iLastActivityId);
     }
     // get data;
     $aActivites = $this->oSearch->getSearchData();
     $aProccesedActivites = $this->_proccesActivites($aActivites, ' style="display:none" ', true);
     $aRet = array('events' => $aProccesedActivites, 'last_event_id' => $this->_oDb->getLastActivityId($sType));
     // draw builded data;
     echo json_encode($aRet);
 }
コード例 #11
0
 public static function checkLogin($sUser, $sPwd)
 {
     $iId = (int) BxDolXMLRPCUtil::getIdByNickname($sUser);
     $aProfile = getProfileInfo((int) $iId);
     if (!$aProfile || getParam('enable_dolphin_footer') == 'on') {
         return 0;
     }
     $_COOKIE["memberID"] = $iId;
     $_COOKIE["memberPassword"] = 32 == strlen($sPwd) ? sha1($sPwd . $aProfile['Salt']) : $sPwd;
     $iRet = ($GLOBALS['logged']['member'] = member_auth(0, false)) ? $iId : 0;
     bx_import('BxDolAlerts');
     $oZ = new BxDolAlerts('mobile', 'check_login', $iId, 0, array('password' => $sPwd, 'return_data' => &$iRet));
     $oZ->alert();
     return $iRet;
 }
コード例 #12
0
function check_logged()
{
    global $logged;
    $aAccTypes = array(1 => 'admin', 0 => 'member', 2 => 'aff', 3 => 'moderator');
    foreach ($aAccTypes as $key => $value) {
        if ($logged[$value] = member_auth($key, false)) {
            break;
        }
    }
}
コード例 #13
0
ファイル: BxAdsModule.php プロジェクト: dalinhuang/shopexts
 function CheckLogged()
 {
     $iProfileId = isset($_COOKIE['memberID']) && ($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) ? (int) $_COOKIE['memberID'] : 0;
     if (!$iProfileId) {
         member_auth(0);
     }
 }
コード例 #14
0
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* 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';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'modules.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
$ADMIN = member_auth(1, true, true);
$logged['admin'] = $ADMIN;
$_page['header'] = "Modules";
$_page['header_text'] = "Modules";
TopCodeAdmin();
/* Interface functions */
function PrintModulesListBlock()
{
    $res = db_res("SELECT * FROM `Modules` ORDER BY `Type` ASC");
    if (!$res) {
        return;
    }
    ?>
	<table cellspacing="1" cellpadding="2" class="small" width="100%">
<?php 
    if (!mysql_num_rows($res)) {
コード例 #15
0
 /**
  * function for New/Edit event
  * @return Text Result
  */
 function SDAddEvent($iEventID = -1)
 {
     //for update event
     //print $iEventID;
     global $dir;
     global $logged;
     global $site;
     if (!$logged['member'] && !$logged['admin']) {
         member_auth(0);
     }
     // collect information about current member
     $aMember['ID'] = (int) $_COOKIE['memberID'];
     $aMemberData = getProfileInfo($aMember['ID']);
     // common
     $sEventTitle = process_db_input($_POST['event_title']);
     $sEventDesc = $this->process_html_db_input($_POST['event_desc']);
     $sEventStatusMessage = process_db_input($_POST['event_statusmsg']);
     // event place
     $sEventCountry = process_db_input($_POST['event_country']);
     $sEventCity = process_db_input($_POST['event_city']);
     $EventPlace = process_db_input($_POST['event_place']);
     $sTags = process_db_input($_POST['event_tags']);
     $aTags = explodeTags($sTags);
     $sTags = implode(",", $aTags);
     $sPictureName = $sBaseName;
     $aScan = getimagesize($_FILES['event_photo']['tmp_name']);
     if (in_array($aScan[2], array(1, 2, 3, 6)) && 0 < strlen($_FILES['event_photo']['name'])) {
         $sCurrentTime = time();
         if ($iEventID == -1) {
             $sBaseName = 'g_' . $sCurrentTime . '_1';
         } else {
             $sBaseName = db_value("SELECT `PhotoFilename` FROM `SDatingEvents` WHERE `ID`={$iEventID} LIMIT 1");
             if ($sBaseName != "") {
                 if (ereg("([a-z0-9_]+)\\.", $sBaseName, $aRegs)) {
                     $sBaseName = $aRegs[1];
                 }
             } else {
                 $sBaseName = $sBaseName != "" ? $sBaseName : 'g_' . $sCurrentTime . '_1';
             }
         }
         $sExt = moveUploadedImage($_FILES, 'event_photo', $dir['tmp'] . $sBaseName, '', false);
         $sBaseName .= $sExt;
         $sPictureName = $sBaseName;
         $sThumbName = 'thumb_' . $sBaseName;
         $sIconName = 'icon_' . $sBaseName;
         // resize for thumbnail
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sThumbName, $this->iThumbSize, $this->iThumbSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sPictureName, $this->iImgSize, $this->iImgSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         $vRes = imageResize($dir['tmp'] . $sBaseName, $dir['sdatingImage'] . $sIconName, $this->iIconSize, $this->iIconSize);
         if ($vRes != IMAGE_ERROR_SUCCESS) {
             return SDATING_ERROR_PHOTO_PROCESS;
         }
         unlink($dir['tmp'] . $sBaseName);
         chmod($dir['sdatingImage'] . $sPictureName, 0644);
         chmod($dir['sdatingImage'] . $sThumbName, 0644);
         chmod($dir['sdatingImage'] . $sIconName, 0644);
         $sEventPhotoFilename = process_db_input($sPictureName);
     } else {
         $sEventPhotoFilename = '';
     }
     $sPictureSQL = '';
     if ($iEventID > 0 && $sEventPhotoFilename != '') {
         $sPictureSQL = "`PhotoFilename` = '{$sEventPhotoFilename}',";
     }
     // event date
     $sEventStart = strtotime($_REQUEST['event_start']);
     if ($sEventStart == -1) {
         return SDATING_ERROR_WRONG_DATE_FORMAT;
     }
     if ($this->bAdminMode) {
         $sEventEnd = strtotime($_POST['event_end']);
         //if ( $sEventEnd == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventSaleStart = strtotime($_POST['event_sale_start']);
         //if ( $sEventSaleStart == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventSaleEnd = strtotime($_POST['event_sale_end']);
         //if ( $sEventSaleEnd == -1 )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         //if ( $sEventEnd < $sEventStart || $sEventSaleEnd < $sEventSaleStart || $sEventStart < $sEventSaleStart )
         //	return SDATING_ERROR_WRONG_DATE_FORMAT;
         $sEventEndVal = "FROM_UNIXTIME( {$sEventEnd} )";
         $sEventSaleStartVal = "FROM_UNIXTIME( {$sEventSaleStart} )";
         $sEventSaleEndVal = "FROM_UNIXTIME( {$sEventSaleEnd} )";
     } else {
         $sEventEndVal = 'NOW()';
         $sEventSaleStartVal = 'NOW()';
         $sEventSaleEndVal = 'NOW()';
     }
     // event responsible
     $sEventRespId = $this->bAdminMode ? 0 : process_db_input($aMemberData['ID'], 0, 1);
     $sEventRespName = $this->bAdminMode ? _t('Admin') : process_db_input($aMemberData['NickName'], 0, 1);
     $sEventRespEmail = $this->bAdminMode ? $site['email'] : process_db_input($aMemberData['Email'], 0, 1);
     $sEventRespPhone = $this->bAdminMode ? '666' : process_db_input($aMemberData['Phone'], 0, 1);
     $iEventAgeLowerFilter = (int) getParam('search_start_age');
     $iEventAgeUpperFilter = (int) getParam('search_end_age');
     $sEventMembershipFilter = "\\'all\\'";
     $iEventCountF = (int) $_POST['event_count_female'];
     $iEventCountM = (int) $_POST['event_count_male'];
     $dEventPriceF = '0.00';
     $dEventPriceM = '0.00';
     $dEventPriceC = '0.00';
     // choose options
     $iEventChoosePeriod = 5;
     // allow to view participants
     $iEventAllowView = '1';
     if ($iEventID == -1) {
         $sNewUri = uriGenerate($sEventTitle, 'SDatingEvents', 'EntryUri', 100);
         //Commented elements
         /*`EventEnd` = FROM_UNIXTIME( {$sEventEnd} ),*/
         /*`TicketSaleStart` = FROM_UNIXTIME( {$sEventSaleStart} ),*/
         /*`TicketSaleEnd` = FROM_UNIXTIME( {$sEventSaleEnd} ),*/
         $vRes = db_res("INSERT INTO `SDatingEvents` SET\r\n\t\t\t\t\t\t`Title` = '{$sEventTitle}',\r\n\t\t\t\t\t\t`EntryUri` = '{$sNewUri}',\r\n\t\t\t\t\t\t`Description` = '{$sEventDesc}',\r\n\t\t\t\t\t\t`Status` = 'Active',\r\n\t\t\t\t\t\t`StatusMessage` = '{$sEventStatusMessage}',\r\n\t\t\t\t\t\t`Country` = '{$sEventCountry}',\r\n\t\t\t\t\t\t`City` = '{$sEventCity}',\r\n\t\t\t\t\t\t`Place` = '{$EventPlace}',\r\n\t\t\t\t\t\t`PhotoFilename` = '{$sEventPhotoFilename}',\r\n\t\t\t\t\t\t`EventStart` = FROM_UNIXTIME( {$sEventStart} ),\r\n\t\t\t\t\t\t`EventEnd` = {$sEventEndVal},\r\n\t\t\t\t\t\t`TicketSaleStart` = {$sEventSaleStartVal},\r\n\t\t\t\t\t\t`TicketSaleEnd` = {$sEventSaleEndVal},\r\n\t\t\t\t\t\t`ResponsibleID` = '{$sEventRespId}',\r\n\t\t\t\t\t\t`ResponsibleName` = '{$sEventRespName}',\r\n\t\t\t\t\t\t`ResponsibleEmail` = '{$sEventRespEmail}',\r\n\t\t\t\t\t\t`ResponsiblePhone` = '{$sEventRespPhone}',\r\n\t\t\t\t\t\t`EventSexFilter` = 'female,male',\r\n\t\t\t\t\t\t`EventAgeLowerFilter` = {$iEventAgeLowerFilter},\r\n\t\t\t\t\t\t`EventAgeUpperFilter` = {$iEventAgeUpperFilter},\r\n\t\t\t\t\t\t`EventMembershipFilter` = '{$sEventMembershipFilter}',\r\n\t\t\t\t\t\t`TicketCountFemale` = {$iEventCountF},\r\n\t\t\t\t\t\t`TicketCountMale` = {$iEventCountM},\r\n\t\t\t\t\t\t`TicketPriceFemale` = {$dEventPriceF},\r\n\t\t\t\t\t\t`TicketPriceMale` = {$dEventPriceM},\r\n\t\t\t\t\t\t`ChoosePeriod` = {$iEventChoosePeriod},\r\n\t\t\t\t\t\t`AllowViewParticipants` = {$iEventAllowView},\r\n\t\t\t\t\t\t`Tags` = '{$sTags}'\r\n\t\t\t\t\t\t");
         $iLastID = mysql_insert_id();
         if ($iLastID > 0) {
             $this->iLastInsertedID = $iLastID;
             reparseObjTags('event', $iLastID);
         }
     } else {
         //$sNewUri = uriGenerate($sEventTitle, 'SDatingEvents', 'EntryUri', 100);
         //Commented elements
         /*`EventEnd` = FROM_UNIXTIME( {$sEventEnd} ),*/
         /*`TicketSaleStart` = FROM_UNIXTIME( {$sEventSaleStart} ),*/
         /*`TicketSaleEnd` = FROM_UNIXTIME( {$sEventSaleEnd} ),*/
         $vRes = db_res("UPDATE `SDatingEvents` SET\r\n\t\t\t\t\t\t`Title` = '{$sEventTitle}',\r\n\t\t\t\t\t\t`Description` = '{$sEventDesc}',\r\n\t\t\t\t\t\t`Status` = 'Active',\r\n\t\t\t\t\t\t`StatusMessage` = '{$sEventStatusMessage}',\r\n\t\t\t\t\t\t`Country` = '{$sEventCountry}',\r\n\t\t\t\t\t\t`City` = '{$sEventCity}',\r\n\t\t\t\t\t\t`Place` = '{$EventPlace}',\r\n\t\t\t\t\t\t{$sPictureSQL}\r\n\t\t\t\t\t\t`EventStart` = FROM_UNIXTIME( {$sEventStart} ),\r\n\t\t\t\t\t\t`EventEnd` = {$sEventEndVal},\r\n\t\t\t\t\t\t`TicketSaleStart` = {$sEventSaleStartVal},\r\n\t\t\t\t\t\t`TicketSaleEnd` = {$sEventSaleEndVal},\r\n\t\t\t\t\t\t`ResponsibleID` = '{$sEventRespId}',\r\n\t\t\t\t\t\t`ResponsibleName` = '{$sEventRespName}',\r\n\t\t\t\t\t\t`ResponsibleEmail` = '{$sEventRespEmail}',\r\n\t\t\t\t\t\t`ResponsiblePhone` = '{$sEventRespPhone}',\r\n\t\t\t\t\t\t`EventSexFilter` = 'female,male',\r\n\t\t\t\t\t\t`EventAgeLowerFilter` = {$iEventAgeLowerFilter},\r\n\t\t\t\t\t\t`EventAgeUpperFilter` = {$iEventAgeUpperFilter},\r\n\t\t\t\t\t\t`EventMembershipFilter` = '{$sEventMembershipFilter}',\r\n\t\t\t\t\t\t`TicketCountFemale` = {$iEventCountF},\r\n\t\t\t\t\t\t`TicketCountMale` = {$iEventCountM},\r\n\t\t\t\t\t\t`TicketPriceFemale` = {$dEventPriceF},\r\n\t\t\t\t\t\t`TicketPriceMale` = {$dEventPriceM},\r\n\t\t\t\t\t\t`ChoosePeriod` = {$iEventChoosePeriod},\r\n\t\t\t\t\t\t`AllowViewParticipants` = {$iEventAllowView},\r\n\t\t\t\t\t\t`Tags` = '{$sTags}'\r\n\t\t\t\t\t\tWHERE `ID` = {$iEventID}\r\n\t\t\t\t\t\t");
         reparseObjTags('event', $iEventID);
     }
     return SDATING_ERROR_SUCCESS;
 }
コード例 #16
0
 function checkLogin($sUser, $sPwd)
 {
     //sleep(1);
     $iId = (int) BxDolXMLRPCUtil::getIdByNickname($sUser);
     $aProfile = getProfileInfo((int) $iId);
     if (!$aProfile) {
         return 0;
     }
     $_COOKIE["memberID"] = $iId;
     $_COOKIE["memberPassword"] = sha1($sPwd . $aProfile['Salt']);
     return ($GLOBALS['logged']['member'] = member_auth(0, false)) ? $iId : 0;
 }
コード例 #17
0
ファイル: admin.inc.php プロジェクト: newton27/dolphin.pro
function check_logged()
{
    $aAccTypes = array(1 => 'admin', 0 => 'member');
    $bLogged = false;
    foreach ($aAccTypes as $iKey => $sValue) {
        if ($GLOBALS['logged'][$sValue] = member_auth($iKey, false)) {
            $bLogged = true;
            break;
        }
    }
    if ((isset($_COOKIE['memberID']) || isset($_COOKIE['memberPassword'])) && !$bLogged) {
        bx_logout(false);
    }
}
コード例 #18
0
ファイル: index.php プロジェクト: toxalot/dolphin.pro
     break;
 case 'popular':
     $sPageCaption = _t('_bx_poll_popular_polls');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchPopular();
     break;
 case 'my':
     $sPageCaption = _t('_bx_poll_my');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     if ($iProfileId) {
         $GLOBALS['oTopMenu']->setCurrentProfileID($iProfileId);
         $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchMy();
     } else {
         member_auth(0);
     }
     break;
 case 'show_poll_info':
 case 'poll_home':
     // draw polls question on menu's panel;
     $aPollInfo = current($oPoll->_oDb->getPollInfo($iPollId));
     $sCode = '';
     $sInitPart = $oPoll->getInitPollPage();
     if ($aPollSettings['action'] == 'show_poll_info') {
         $isAllowView = FALSE;
         if (!empty($aPollInfo)) {
             if ((int) $aPollInfo['poll_approval'] == 1 || isAdmin($iProfileId) || isModerator($iProfileId)) {
                 $isAllowView = TRUE;
             }
         }
コード例 #19
0
    foreach ($links as $hyperLink) {
        if (!is_a($hyperLink, 'CHyperLink')) {
            return false;
        }
        $pageMainCode .= $hyperLink->GetHTMLcode() . '<br />';
    }
    $_page_cont[$pageIndex]['page_main_code'] = '<div align="center">' . $pageMainCode . '</div>';
    PageCode();
    return true;
}
$isAdmin = member_auth(1, false);
$logged['admin'] = $isAdmin;
if ($isAdmin) {
    $adminName = $_COOKIE['adminID'];
} else {
    $isMember = member_auth(0, false);
    $logged['member'] = $isMember;
    if ($isMember) {
        $memberID = $_COOKIE['memberID'];
    }
}
if (array_key_exists('ModuleName', $_GET)) {
    $moduleName = $_GET['ModuleName'];
    $dbModuleName = process_db_input($_GET['ModuleName']);
    // Ray support
    if ($moduleName == 'ray') {
        if ($enable_ray) {
            if ($isMember) {
                $chechActionRes = checkAction($memberID, ACTION_ID_USE_RAY_CHAT);
                if ($chechActionRes[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
                    LaunchRayChat();
コード例 #20
0
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* 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';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'modules.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
$ADMIN = member_auth(1);
$logged['admin'] = $ADMIN;
$_page['header'] = "Modules";
$_page['header_text'] = "Modules";
TopCodeAdmin();
/* Interface functions */
function PrintModulesListBlock()
{
    $res = db_res("SELECT * FROM `Modules` ORDER BY `Type` ASC");
    if (!$res) {
        return;
    }
    ?>
	<table cellspacing="1" cellpadding="2" class="small" width="100%">
<?php 
    if (!mysql_num_rows($res)) {
コード例 #21
0
ファイル: forgot.php プロジェクト: Gotgot59/dolphin.pro
{
    function checkEmail($s)
    {
        if (!preg_match("/(([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[\\-;:&=\\+\$,\\w]+@)?[A-Za-z0-9\\.\\-]+|(?:www\\.|[\\-;:&=\\+\$,\\w]+@)[A-Za-z0-9\\.\\-]+)((?:\\/[\\+~%\\/\\.\\w\\-_]*)?\\??(?:[\\-\\+=&;%@\\.\\w_]*)#?(?:[\\.\\!\\/\\\\w]*))?/", $s)) {
            return false;
        }
        $iID = (int) db_value("SELECT `ID` FROM `Profiles` WHERE `Email` = '{$s}'");
        if (!$iID) {
            return _t('_MEMBER_NOT_RECOGNIZED', $site['title']);
        }
        return true;
    }
}
// --------------- page variables and login
$_page['name_index'] = 1;
$logged['member'] = member_auth(0, false);
$_page['header'] = _t("_Forgot password?");
$_page['header_text'] = _t("_Password retrieval", $site['title']);
// --------------- page components
$_ni = $_page['name_index'];
$aForm = array('form_attrs' => array('name' => 'forgot_form', 'action' => BX_DOL_URL_ROOT . 'forgot.php', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'do_submit'), 'checker_helper' => 'BxDolForgotCheckerHelper'), 'inputs' => array(array('type' => 'email', 'name' => 'Email', 'caption' => _t('_My Email'), 'value' => isset($_POST['Email']) ? $_POST['Email'] : '', 'required' => true, 'checker' => array('func' => 'email', 'error' => _t('_Incorrect Email'))), array('type' => 'captcha', 'name' => 'captcha', 'caption' => _t('_Enter Captcha'), 'required' => true, 'checker' => array('func' => 'captcha', 'error' => _t('_Incorrect Captcha'))), array('type' => 'submit', 'name' => 'do_submit', 'value' => _t("_Retrieve my information"))));
$oForm = new BxTemplFormView($aForm);
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
    // Check if entered email is in the base
    $sEmail = process_db_input($_POST['Email'], BX_TAGS_STRIP);
    $memb_arr = db_arr("SELECT `ID` FROM `Profiles` WHERE `Email` = '{$sEmail}'");
    $recipient = $sEmail;
    $rEmailTemplate = new BxDolEmailTemplates();
    $aTemplate = $rEmailTemplate->getTemplate('t_Forgot', $memb_arr['ID']);
    $aPlus['Password'] = generateUserNewPwd($memb_arr['ID']);
コード例 #22
0
        ?>
</b>. Logging you in...
<script language="Javascript">location.href='<?php 
        echo $_SERVER[PHP_SELF];
        ?>
';</script>
<?php 
        exit;
    }
}
if (!$_COOKIE['moderatorID'] || !$_COOKIE['moderatorPassword']) {
    send_headers_page_changed();
    // Display log in form if user is not logged in.
    login_form('', 3);
}
$logged['moderator'] = member_auth(3);
$_page['header'] = 'Moderator Panel';
TopCodeAdmin();
// Get number of total registered members.
$total_members = db_arr('SELECT COUNT(*) FROM `Profiles`;');
$total_members = $total_members[0];
//
$status_arr[0] = "Unconfirmed";
$status_arr[1] = "Approval";
$status_arr[2] = "Active";
$status_arr[3] = "Rejected";
$status_arr[4] = "Suspended";
ContentBlockHead("Total registered members");
?>
								<center>
								<table cellspacing=1 cellpadding=3 border=0 width="70%" align="center" bgcolor="#cccccc" >
コード例 #23
0
     $_page['header_text'] = _t("_Search Groups");
     $_page['name_index'] = 78;
     $_ni = $_page['name_index'];
     $_page_cont[$_ni]['page_main_code'] = '';
     $bHiddenMode = (int) $_REQUEST['hidden_mode'] == 1 ? true : false;
     list($sForm, $sResults) = $oGroups->GenCategoryPage($bHiddenMode);
     $_page_cont[$_ni]['groups_search_form'] = $sForm;
     $_page_cont[$_ni]['groups_search_results'] = $sResults;
     break;
 case 'group':
     if ($logged['member'] = member_auth(0, false)) {
         $memberID = (int) $_COOKIE['memberID'];
     } else {
         $memberID = 0;
     }
     $logged['admin'] = member_auth(1, false);
     if (isset($_REQUEST['groupUri'])) {
         $groupID = $oGroups->getGroupIdByUri($_REQUEST['groupUri']);
     } else {
         $groupID = (int) $_REQUEST['ID'];
     }
     if (!$groupID) {
         $sGroupsUrl = $bPermalink ? 'groups/all' : $oGroups->sCurrFile;
         Header("Location: {$site['url']}{$sGroupsUrl}");
         exit;
     }
     //ShowGroup($groupID, $_ni);
     list($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVCity, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum) = $oGroups->GenGroupMainPage($groupID, $memberID);
     $_page['name_index'] = $iNameIndex;
     $_page['header'] = $sHeader;
     $_page['header_text'] = $sHeaderT;
コード例 #24
0
ファイル: member.php プロジェクト: dalinhuang/shopexts
        $sCodeBlock = $oMenu->getCode();
        return $sCodeBlock;
    }
}
//-------------------------------------------------------------------------------------------------------//
// --------------- page variables and login
$_page['name_index'] = 81;
$_page['css_name'] = array('member_panel.css', 'categories.css', 'alert.css');
$_page['extra_js'] = "<script type=\"text/javascript\">urlIconLoading = \"" . getTemplateIcon('loading.gif') . "\";\n\t\$(document).ready( function() {\n\t\t\n\t\tvar sSendUrl = '" . $site['url'] . "alerts.php';\n\t\t\n\t\t\$('input', '#alertsMenu').click(function(){\n\t\t\tvar sQuery = \$('input', '#alertsMenu').serialize();\n\t\t\t\$.post(sSendUrl, sQuery, function(data) {\n\t\t\t\t\$('#alertsView').html(data);\n\t\t\t}\n\t\t);\n\t\t\n\t} );})\n\t</script>";
$_page['header'] = _t("_My Account");
// --------------- GET/POST actions
$member['ID'] = process_pass_data(empty($_POST['ID']) ? '' : $_POST['ID']);
$member['Password'] = process_pass_data(empty($_POST['Password']) ? '' : $_POST['Password']);
$bAjxMode = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false;
if (!(isset($_POST['ID']) && $_POST['ID'] && isset($_POST['Password']) && $_POST['Password']) && (!empty($_COOKIE['memberID']) && $_COOKIE['memberID'] && $_COOKIE['memberPassword'])) {
    if (!($logged['member'] = member_auth(0, false))) {
        login_form(_t("_LOGIN_OBSOLETE"), 0, $bAjxMode);
    }
} else {
    if (!isset($_POST['ID']) && !isset($_POST['Password'])) {
        // this is dynamic page -  send headers to not cache this page
        send_headers_page_changed();
        login_form('', 0, $bAjxMode);
    } else {
        require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php';
        $oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $member['ID'], 'password' => $member['Password'], 'ip' => getVisitorIP()));
        $oZ->alert();
        $member['ID'] = getID($member['ID']);
        // Ajaxy check
        if ($bAjxMode) {
            echo check_password($member['ID'], $member['Password'], BX_DOL_ROLE_MEMBER, false) ? 'OK' : 'Fail';
コード例 #25
0
<?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 . 'db.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolPFM.php';
send_headers_page_changed();
$logged['admin'] = member_auth(1, true, true);
switch (bx_get('action')) {
    case 'get':
        header('Content-Type:text/javascript');
        echo bx_charts_get_json(bx_get('o'), bx_get('from'), bx_get('to'));
        break;
}
function bx_charts_get_json($sObject, $sFrom, $sTo)
{
    $aObject = $GLOBALS['MySQL']->getRow("SELECT * FROM `sys_objects_charts` WHERE `object` = ? AND `active` = ?", [$sObject, 1]);
    if (!$aObject) {
        return json_encode(array('error' => _t('_Error Occured')));
    }
    $iFrom = bx_charts_get_ts($sFrom);
    $iTo = bx_charts_get_ts($sTo, true);
    if (!$iFrom || !$iTo) {
        return json_encode(array('error' => _t('_Error Occured')));
    }
    $aData = bx_charts_get_data($aObject, $iFrom, $iTo);
    if (!$aData) {
コード例 #26
0
ファイル: admin.inc.php プロジェクト: blas-dmx/dolphin.pro
function check_logged()
{
    $aAccTypes = array(1 => 'admin', 0 => 'member');
    $bLogged = false;
    foreach ($aAccTypes as $iKey => $sValue) {
        if ($GLOBALS['logged'][$sValue] = member_auth($iKey, false)) {
            $bLogged = true;
            break;
        }
    }
    if ((isset($_COOKIE['memberID']) || isset($_COOKIE['memberPassword'])) && !$bLogged) {
        bx_logout(false);
    }
    if ($bLogged) {
        $GLOBALS['oSysTemplate']->addCssStyle('.bx-hide-when-logged-in', array('display' => 'none'));
    }
}
コード例 #27
0
*     website              : http://www.boonex.com/
* This file is part of Dolphin - Smart Community Builder
*
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* 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
***************************************************************************/
if (!($logged['admin'] = member_auth(1, false))) {
    if (!($logged['member'] = member_auth(0, false))) {
        if (!($logged['aff'] = member_auth(2, false))) {
            $logged['moderator'] = member_auth(3, false);
        }
    }
}
if ($logged['admin']) {
    $sUrl = $site['url_admin'];
} else {
    $sUrl = $site['url'];
}
function getArticlesCategiriesList($resurs = false)
{
    global $site;
    global $logged;
    global $sUrl;
    $sCategQuery = "\n\t\t\tSELECT\n\t\t\t\t\t`CategoryID`,\n\t\t\t\t\t`CategoryName`,\n\t\t\t\t\t`CategoryDescription`\n\t\t\tFROM\n\t\t\t\t\t`ArticlesCategory`\n\t\t\tORDER BY `CategoryID` ASC\n\t";
    $rCategory = db_res($sCategQuery);
コード例 #28
0
 function GenMembersPage()
 {
     global $logged;
     if ($logged['member'] = member_auth(0, false)) {
         $iMemberID = (int) $_COOKIE['memberID'];
     } else {
         $iMemberID = 0;
         $logged['admin'] = member_auth(1, false);
     }
     $iGroupID = (int) $_REQUEST['ID'];
     $sBreadCrumbRes = '';
     $sPaginationRes = '';
     $sShowingResultsRes = '';
     $sHeaderT = '';
     $sHeader = '';
     $sPageMainCode = '';
     $iNameIndex = 77;
     if (!$iGroupID) {
         Header("Location: {$site['url']}{$this->sCurrFile}");
         exit;
     }
     $sHeaderT = _t("_Group members");
     $sHeader = _t("_Group members");
     if ($aGroupInfo = $this->getGroupInfo($iGroupID)) {
         $aGroupInfo['Name_html'] = htmlspecialchars_adv($aGroupInfo['Name']);
         if ((int) $aGroupInfo['hidden_group'] and !$this->isGroupMember($iMemberID, $iGroupID) and !$logged['admin']) {
             $sPageMainCode = _t("_You cannot view group members while not a group member");
         } else {
             if ($aGroupInfo['status'] == 'Active' or $aGroupInfo['creatorID'] == $iMemberID or $logged['admin']) {
                 $sHeader = _t("_Group members");
                 list($sBreadCrumb, $sPagination, $sShowResult, $sMainCode) = $this->PCShowGroupMembers($iGroupID, $aGroupInfo, $iMemberID);
                 $sBreadCrumbRes = $sBreadCrumb;
                 $sPaginationRes = $sPagination;
                 $sPageMainCode = $sMainCode;
                 $sShowingResultsRes = $sShowResult;
             } else {
                 $iNameIndex = 0;
                 $sHeader = _t("_Group is suspended");
                 $sHeaderT = _t("_Group is suspended");
                 $sPageMainCode = _t("_Sorry, group is suspended");
             }
         }
     } else {
         $sPageMainCode = _t("_Group not found_desc");
     }
     return array($sHeaderT, $sHeader, $sPageMainCode, $iNameIndex, $sBreadCrumbRes, $sPaginationRes, $sShowingResultsRes);
 }