get_baseurl()); print_r($_POST); return; } $r = q("SELECT * FROM `flag` WHERE `pid` = %d LIMIT 1", intval($id) ); if(! count($r)) { $r = q("INSERT INTO `flag` ( `pid`, `reason`, `total` ) VALUES ( %d , %d, 1 ) ", intval($id), intval($type) ); $msg = "An entry ($id) has just been flagged for $reason."; mail('info@friendika.com',"Directory Flag action",$msg); } else { q("UPDATE `flag` SET `total` = %d WHERE `id` = %d LIMIT 1", intval($r[0]['total']) + 1, intval($r[0]['id']) ); } notice("Entry has been flagged."); goaway($a->get_baseurl()); } function flag_content(&$a) { if($a->argc > 1) $id = intval($a->argv[1]); if(! $id) { goaway($a->get_baseurl()); } $o = '

Flag Directory Listing

'; $o .= <<< EOT

You may flag profile listings for one of two reasons: inappropriate (adult) content, or if the link destination and therefore the profile entry is no longer valid. If you selected this form by mistake, please use your browser "Back" button to return to the Friendika directory.

Your request will be verified and if it is deemed to be valid, the entry will be flagged/removed. Please allow 24-36 hours for this action to take place.



Reason for flagging profile:

Adult content

Dead link


EOT; return $o; }