I have a block that I want to show edit and delete buttons for users with access, and other buttons for the rest of the users. This is the script I'm using for the users with update permission:
<?php
if(arg(0) == 'node' && is_numeric(arg(1))){
//load $node object
$node = node_load(arg(1));
//check for node update access
if (node_access("update", $node)){
print '<p><a href=\"./edit\">edit</a> <a href=\"./delete\">delete</a></p>';
}}
?>
This is the same script I used for block visibility on other blocks, and it works. Why isn't it working here?