خرید بک لینک
Hi,

I have sort of a complicated if statment, well i think i been looking at it too long and now my mind is goggled lol

Its not that bad until you get to the moderator deal, thats what complicates it, and i have tried a few versions of this, i even thought about splitting it up into two statments but that just complicates it more and makes more code than is what is needed. I also tried this using the single [&] instead but still didnt get it the way it should be.

//here is rule
First everyone has to be authorized to download_video unless its $isadmin

Here are the three parts:
if authorized and is moderator (a moderator is still a user so it has to be both)
if authorized and the userid = videoowner (if its their video)
is authorized (any user authorized)
or is the admin (admin can do what they want)

Here is the statment:

PHP Code:

if( $user_is_authorized['download_video'] || $theuserid == $videoowner || $isModerator || $isAdmin 
 {

    
//let them do it

  


thanks

Thinking: i wonder if i should just take everything away but the authorized and admin, everyone else should fall into place then im thinking.

برچسب: نویسنده: آیلین رضوانی تاريخ: دوشنبه 25 دی 1396 ساعت: 6:23

صفحه بندی