Announcement

Collapse
No announcement yet.

simple...but for lil ole me? :)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • simple...but for lil ole me? :)

    Hi..

    i'm trying to pull a browsing users 'usergroupid' from the table 'user' list as $whatever and create a if/else statement depending on the users usergroup

    see my code below
    (theres some code from my photopost in there, basically showing one thumb or another)

    ---------------------------------------------------------------------

    $querygroup = "SELECT usergroupid FROM user WHERE usergroupid = '$user'";
    $resultgroup = mysql_query($querygroup);
    list($resultg) = mysql_fetch_row($resultgroup);

    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $photo = $line["bigimage"];

    if ( pp_is_image($photo) ) {
    $photolen = strlen($photo);
    $theext = pp_get_ext($photo);
    $photo_name = str_replace( $theext, "", $photo );

    $temp_user = $line["userid"];

    if (($resultg == "2") || ($resultg == "8"))
    {
    $thumbtag = "";
    $mthumb = "<table width=\"0\" border=\"1\" bordercolor=\"#5381BD\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><img border=\"0\" src=\"{$data_dir}subscribe.gif\" alt=\"subscribe today to view all\" /></td></tr></table>";
    }
    else
    {
    $thumbtag = "{$full_path}{$line['cat']}/{$line['userid']}{$photo}";
    $mthumb = "<table width=\"0\" border=\"1\" bordercolor=\"#5381BD\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><a href=\"{$url_path}/showphoto.php?photo={$line['id']}\"><img border=\"0\" src=\"{$data_dir}{$line['cat']}/{$line['userid']}{$photo_name}-thumb{$theext}\" alt=\"Uploaded by {$line['user']}\" /></a></td></tr></table>";
    }
    echo $userid;

    ---------------------------

    This is part of a photopost hack that displays the last uploaded pix in the gallery on the main vb-index page (the databases have been merged) this hack displays the thumbs regardless of who you are, i have 2 usegroupid in my user table i want to exclude (2&8, check the if/else) but i'm damned if i cannot get it to work, i'm not finding the users ID to check his/hers usergroup....

    please advise
    -M

  • #2
    anyone...?

    I just need to check the users usergroup id...

    i'm not sure, but do i use (if session)? $bbuserinfo[userid] or something?

    then do an if else... please i'm stuck

    -M

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X