Example #1
0
        exit;
    }
    $friend_id = cleanGET($PAGE[3]);
    /** ignore the friend request **/
    $f_remove = new friends();
    $f_remove->un_friend($friend_id);
}
/*** RBLOCK USER **/
if ($operation === 'f_block') {
    if (!isset($PAGE[3]) || empty($PAGE[3])) {
        $_SESSION[''] = 'An error occurred. Please try again.';
        header('location:' . $from_url . '');
        exit;
    }
    $user_id = cleanGET($PAGE[3]);
    /** ignore the friend request **/
    $block = new friends();
    $block->block_user($user_id);
}
/*** RBLOCK USER **/
if ($operation === 'f_unblock') {
    if (!isset($PAGE[3]) || empty($PAGE[3])) {
        $_SESSION[''] = 'An error occurred. Please try again.';
        header('location:' . $from_url . '');
        exit;
    }
    $user_id = cleanGET($PAGE[3]);
    /** ignore the friend request **/
    $unblock = new friends();
    $unblock->unblock_user($user_id);
}
Example #2
0
        $_SESSION['isv_error'] = 'An error occurred. Please try again.';
        header('location:' . ISVIPI_URL . 'home/');
        exit;
    }
    $feed_id = cleanPOST('f_id');
    /** share feed **/
    $share = new feedActions();
    $share->shareFeed($feed, $feed_id);
}
/*** DELETE FEED **/
if ($operation === 'delete') {
    if (!isset($PAGE[3]) || empty($PAGE[3])) {
        //do nothing
        exit;
    }
    $feedID = cleanGET($PAGE[3]);
    /** delete feed **/
    $delete = new feedActions();
    $delete->delFeed($feedID);
}
/*** DELETE COMMENT **/
if ($operation === 'comm_del') {
    if (!isset($PAGE[3]) || empty($PAGE[3])) {
        //do nothing
        exit;
    }
    $comment_ID = cleanGET($PAGE[3]);
    /** delete comment **/
    $delete = new feedActions();
    $delete->delComment($comment_ID);
}
Example #3
0
<?php

/*******************************************************
	 *   Copyright (C) 2014  http://isvipi.org
	
		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.
	
		This program 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
		GNU General Public License for more details.
	
		You should have received a copy of the GNU General Public License along
		with this program; if not, write to the Free Software Foundation, Inc.,
		51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
	 ******************************************************/
require_once ISVIPI_PAGES_BASE . 'm_base.php';
//we check if a username is set
if (!isset($PAGE[1]) || empty($PAGE[1])) {
    notFound404Err();
}
$username = cleanGET($PAGE[1]);
require_once ISVIPI_CLASSES_BASE . 'global/getMembers_cls.php';
require_once ISVIPI_CLASSES_BASE . 'global/getFriends_cls.php';
$m = new getSingleMember();
$m_info = $m->members($username, 'username');
$friends = new get_friends();
include_once ISVIPI_ACT_THEME . 'profile.php';
Example #4
0
    exit;
}
/** an extra layer of security => check if there is a session matching these details in the database **/
$currSession = session_id();
$currentUser = $_SESSION['isv_user_id'];
if (!isMemberSessionValid($currentUser, $currSession)) {
    $_SESSION['isv_error'] = "Your session either changed or expired. Please sign in to continue.";
    header('location:' . ISVIPI_URL . 'sign_in');
    exit;
}
/** check if our hidden field is present */
if (isset($_POST['isv_op']) && !empty($_POST['isv_op'])) {
    $operation = cleanPOST('isv_op');
} else {
    if (isset($PAGE[2]) && !empty($PAGE[2])) {
        $operation = cleanGET($PAGE[2]);
    } else {
        $_SESSION['isv_error'] = 'ACTION NOT ALLOWED!';
        header('location:' . $from_url . '');
        exit;
    }
}
if ($operation !== 'prof_pic' && $operation !== 'cover_pic' && $operation !== 'edit_prof' && $operation !== 'c_pwd' && $operation !== 'privacy') {
    $_SESSION['isv_error'] = 'ACTION NOT ALLOWED!';
    header('location:' . $from_url . '');
    exit;
}
require_once ISVIPI_CLASSES_BASE . 'global/member_cls.php';
/*** CHANGE PROFILE PICTURE **/
if ($operation === 'prof_pic') {
    //check if an image is set
Example #5
0
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.
	
		This program 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
		GNU General Public License for more details.
	
		You should have received a copy of the GNU General Public License along
		with this program; if not, write to the Free Software Foundation, Inc.,
		51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
	 ******************************************************/
require_once ISVIPI_PAGES_BASE . 'm_base.php';
require_once ISVIPI_CLASSES_BASE . 'global/getMembers_cls.php';
require_once ISVIPI_CLASSES_BASE . 'forms/friends_cls.php';
$m = new getMembers();
// we define our order by (latest or oldest)
if (isset($PAGE[1]) && ($PAGE[1] == 'latest' || $PAGE[1] == 'oldest')) {
    $oderBY = cleanGET($PAGE[1]);
} else {
    $oderBY = 'latest';
}
//we define how many members to load
if (isset($PAGE[2]) && ($PAGE[2] == 25 || $PAGE[2] == 50 || $PAGE[2] == 100 || $PAGE[2] == 'all')) {
    $limit = cleanGET($PAGE[2]);
} else {
    $limit = 25;
}
$m_info = $m->allMembers(1, $oderBY, $limit);
include_once ISVIPI_ACT_THEME . 'members.php';
Example #6
0
	
		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.
	
		This program 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
		GNU General Public License for more details.
	
		You should have received a copy of the GNU General Public License along
		with this program; if not, write to the Free Software Foundation, Inc.,
		51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
	 ******************************************************/
require_once ISVIPI_PAGES_BASE . 'base.php';
if (!isset($PAGE[1]) || empty($PAGE[1])) {
    $_SESSION['isv_error'] = 'Password reset code not found';
    header('location:' . ISVIPI_URL . '404/');
    exit;
}
$rCode = cleanGET($PAGE[1]);
//check to see if the reset code exists
if (!valid_codeExists($rCode, 'code')) {
    $_SESSION['isv_error'] = 'No such password reset code found in our database';
    header('location:' . ISVIPI_URL . '404/');
    exit;
}
$_SESSION['isv_pwd_change_eml'] = $exstEmail;
$_SESSION['isv_pwd_code'] = $rCode;
include_once ISVIPI_ACT_THEME . 'reset.php';
Example #7
0
        $_SESSION['isv_error'] = "Site registration is disabled.";
        notFound404Err();
        exit;
    }
    /** capture our variables **/
    $userFields = array('Username' => cleanPOST('username'), 'Full Name' => cleanPOST('name'), 'Email' => cleanPOST('email'), 'Password' => cleanPOST('pwd'), 'Repeat Password' => cleanPOST('pwd2'), 'Country' => cleanPOST('country'), 'Date of Birth' => cleanPOST('dob'), 'Gender' => cleanPOST('sex'));
    $registerUser = new userRegistration($userFields);
}
/** EMAIL ACCOUNT VALIDATION **/
if ($operation === 'validate') {
    if (!isset($PAGE[3]) || empty($PAGE[3])) {
        $_SESSION['isv_error'] = 'No validation code was provided. Please check your email for the correct link.';
        notFound404Err();
        exit;
    }
    $code = cleanGET($PAGE[3]);
    $validate = new userValidation($code);
}
/*** RESET PASSWORD */
if ($operation === 'reset') {
    require_once ISVIPI_CLASSES_BASE . 'forms/reset_cls.php';
    if (!isset($_POST['user']) || empty($_POST['user'])) {
        $_SESSION['isv_error'] = 'Please enter your username or email address registered with us.';
        header('location:' . $from_url . '');
        exit;
    }
    $user = cleanPOST('user');
    if (emailOrUsername($user) == 'email') {
        $userType = 'email';
    } else {
        $userType = 'username';