我试图弄清楚如何在不属于我的个人资料上禁用上传图片功能。用户应该只能在自己的个人资料上查看上传按钮,而不能在其他个人资料上查看。
<?php
if(logged_in() === true && user_id_from_username($username) === true && isset($_GET['username']) === true){
$username = $_GET['username'];
$user_id = user_id_from_username($username);
?>
<script type="text/javascript">
$('.profile_wrapp').mouseenter(function(){
$('.select_buttons').fadeIn('fast');
}).mouseleave(function(){
$('.select_buttons').fadeOut('fast'); });
</script>
<?php
}else{
?>
<script type="text/javascript">
$('.select_buttons').hide();
</script>
<?php
}
?>