<?php 
/*    
 *    Copyright (c) 2010 VidiScript
 *
 *    This file is part of VidiScript.
 *
 *    VidiScript 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 3 of the License, or
 *    (at your option) any later version.
 *
 *    VidiScript 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 VidiScript.  If not, see <http://www.gnu.org/licenses/>.
 *
 *    File Name: ajaxprofile.php
 *    Description: Ajax functions for profile page
 *    $Date: 2010-02-21 23:16:57 +0000 (Sun, 21 Feb 2010) $
 *    $Revision: 12 $
 */
include_once 'includes/bootstrap.inc' ;
include_once 'includes/common.inc' ;
include 'includes/profile.inc' ;
@session_start() ;
global $sitepath,$templateimagepath,$db ;
/////////////////////////
// Friends ID: 1
// Media ID: 2
// Sub ID: 3
// Favorite ID: 4
// Groups ID: 5
/////////////////////////
if ($_GET['id'] == 2) {
	$content = getMedia(quote_smart($_GET['page'])) ;
	echo $content ;
}
if ($_GET['id'] == 1) {
	$content = getFriends(quote_smart($_GET['page'])) ;
	echo $content ;
}
if ($_GET['id'] == 3) {
	$content = getSubscriptions(quote_smart($_GET['page'])) ;
	echo $content ;
}
if ($_GET['id'] == 4) {
	$content = getFavorites(quote_smart($_GET['page'])) ;
	echo $content ;
}
if ($_GET['id'] == 5) {
	$content = getGroups(quote_smart($_GET['page']), quote_smart($_GET['type'])) ;
	echo $content ;
}
if ($_GET['id'] == 6) {
	$retunable = profileComments(quote_smart($_GET['userid']), quote_smart($_GET['user']), quote_smart($_GET['page']), quote_smart($_GET['loggedIn']), quote_smart($_GET['show'])) ;
	echo $retunable ;
}
if ($_GET['id'] == 7) {
	$toEcho = SubmitComment(quote_smart($_GET['user']), quote_smart($_GET['loggedIn']), quote_smart($_GET['textz']), quote_smart($_GET['seccode']), quote_smart($_GET['name'])) ;
	echo $toEcho ;
}
if ($_GET['id'] == 8) {
	$returns = deleteComment(quote_smart($_GET['page']), quote_smart($_GET['userid']), quote_smart($_GET['loggedin'])) ;
	echo $returns ;
}
?>