Show
Ignore:
Timestamp:
08/09/05 21:14:53 (7 years ago)
Author:
alexx
Message:

* fix #16 (add include of country list)
* fux bug in owned communities ("New Topic/event" not displayed)
* fix sample db data
* change strstr to strpos in includes/functions.inc.php (strpos is faster)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/inc/communities/events.inc.php

    r1 r14  
    4040        if($_SESSION['my_id'] != $community['info']['id']) 
    4141                if(in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) )  
     42                { 
    4243                        $leftmenu["/communities/unjoin/".$token[2]] = 'Unjoin'; 
     44                        $_SMARTY['is_member'] = 1; 
     45                } 
    4346                else 
     47                { 
    4448                        $leftmenu["/communities/join/".$token[2]] = 'Join'; 
     49                        $_SMARTY['id_member'] = 0; 
     50                } 
    4551        else 
     52        { 
    4653                $leftmenu["/communities/edit/".$token[2]] = 'Edit';      
    47  
     54                $_SMARTY['is_member'] = 1; 
     55        } 
    4856 
    4957        $leftmenu["/communities/forum/".$token[2]] = 'View forum'; 
    5058        $leftmenu["/communities/invite/".$token[2]] = 'Invite friends'; 
    5159 
    52         $smarty->assign('leftmenu',$leftmenu); 
    53  
     60        $_SMARTY['leftmenu'] = $leftmenu; 
    5461 
    5562        /************************************/ 
    5663 
    5764 
     65        $_SMARTY['Title'] = 'Community'; 
    5866 
    59         $smarty->assign('Title', 'Community'); 
     67        if($_SMARTY['is_member']) 
     68                $db->query('UPDATE user_comm SET last_visit=? WHERE id=? AND id_comm=?', array(time(), $_SESSION['my_id'], $community['info']['id_comm'])); 
    6069 
    61         if($_SESSION['my_communities_id']) 
    62         { 
    63                 if( in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 
    64                 { 
    65                         $db->query('UPDATE user_comm SET last_visit=? WHERE id=? AND id_comm=?', array(time(), $_SESSION['my_id'], $community['info']['id_comm'])); 
    66                         $smarty->assign('member', true); 
    67                 } 
    68         } 
    69  
    70  
    71         $smarty->assign('community', $community); 
     70        $_SMARTY['community'] = $community; 
    7271} 
    7372else