<?php


include("../includes/site_config.php");

$type=$_REQUEST['type'];
//echo $type;
$chkRemoveid=$_REQUEST['chkRemoveid'];
//echo $chkRemoveid;
$userid=$_REQUEST['edit_mem'];
//echo $userid;
switch($type)
{
	case "p" :
	include_once __INCLUDE_CLASS_PATH."/class.Picture.php";
	$picture = new Picture();
	
	//$picture->Delete($userid);
	//$picture->InitById($chkRemoveid);
	mysql_query("DELETE from pictures WHERE pic_id = '".$_REQUEST['chkRemoveid']."'");
	//print "DELETE from pictures WHERE pic_id = '".$_REQUEST['chkRemoveid']."'";
	echo "<script>location.href='$CONST_LINK_ROOT/admin/approve_profiles.php?mode=EDIT&edit_mem=$userid'</script>";
   break;
	 
	 case "a" :
	 include_once __INCLUDE_CLASS_PATH."/class.Audio.php";
	 $audio = new Audio(); 
	 $audio->InitById($chkRemoveid);
	 $audio->Delete($userid);
	//mysql_query("DELETE from audios WHERE aud_id = '".$_REQUEST['chkRemoveid']."'");
	//print "DELETE from audios WHERE aud_id = '".$_REQUEST['chkRemoveid']."'";
	echo "<script>location.href='$CONST_LINK_ROOT/admin/approve_profiles.php?mode=EDIT&edit_mem=$userid'</script>";
  	break;
	 
	case "v" :
	include_once __INCLUDE_CLASS_PATH."/class.Video.php";
	$video = new Video();
	$video->InitById($chkRemoveid);
	$video->Delete($userid);
	mysql_query("DELETE from youtube WHERE you_id = '".$chkRemoveid."'");
	//print "DELETE from youtube WHERE you_id = '".$_REQUEST['chkRemoveid']."'";
	echo "<script>location.href='$CONST_LINK_ROOT/admin/approve_profiles.php?mode=EDIT&edit_mem=$userid'</script>";
  	 break;

	case "g" :
	include_once __INCLUDE_CLASS_PATH."/class.Gallery.php";
	$gallery = new Gallery();
	$gallery->Init($chkRemoveid);
    $gallery->Delete($userid);
	echo "<script>location.href='$CONST_LINK_ROOT/admin/approve_profiles.php?mode=EDIT&edit_mem=$userid'</script>";
  	break;
	 
	default:
	break;
}

?>