Gazelle/sections/friends/index.php

32 lines
682 B
PHP
Raw Permalink Normal View History

2011-03-28 14:21:28 +00:00
<?
$P = db_array($_POST);
enforce_login();
2013-04-19 08:00:55 +00:00
if (!empty($_REQUEST['friendid']) && !is_number($_REQUEST['friendid'])) {
2011-03-28 14:21:28 +00:00
error(404);
}
2013-04-19 08:00:55 +00:00
if (!empty($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
2011-03-28 14:21:28 +00:00
case 'add':
include(SERVER_ROOT.'/sections/friends/add.php');
break;
2013-04-19 08:00:55 +00:00
case 'Remove friend':
2011-03-28 14:21:28 +00:00
authorize();
include(SERVER_ROOT.'/sections/friends/remove.php');
break;
case 'Update':
authorize();
include(SERVER_ROOT.'/sections/friends/comment.php');
break;
2015-08-22 08:00:28 +00:00
2011-03-28 14:21:28 +00:00
case 'Contact':
header('Location: inbox.php?action=compose&to='.$_POST['friendid']);
break;
2013-10-01 23:08:42 +00:00
default:
2011-03-28 14:21:28 +00:00
error(404);
}
} else {
include(SERVER_ROOT.'/sections/friends/friends.php');
}
?>