]> git.mxchange.org Git - friendica.git/blob - include/security.php
pass vars via javascript, not html. Also fix broken pause img on IE
[friendica.git] / include / security.php
1 <?php
2
3 function can_write_wall(&$a,$owner) {
4         if((! (local_user())) && (! (remote_user())))
5                 return false;
6         if((local_user()) && ($_SESSION['uid'] == $owner))
7                 return true;
8
9         $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 
10                 AND `readonly` = 0  AND `rel` IN ( %d , %d ) LIMIT 1",
11                 intval($owner),
12                 intval($_SESSION['visitor_id']),
13                 intval(DIRECTION_OUT),
14                 intval(DIRECTION_BOTH)
15         );
16         if(count($r))
17                 return true;
18         return false;
19
20 }