Changeset 14 for trunk/inc/communities/events.inc.php
- Timestamp:
- 08/09/05 21:14:53 (7 years ago)
- Files:
-
- 1 modified
-
trunk/inc/communities/events.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/communities/events.inc.php
r1 r14 40 40 if($_SESSION['my_id'] != $community['info']['id']) 41 41 if(in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 42 { 42 43 $leftmenu["/communities/unjoin/".$token[2]] = 'Unjoin'; 44 $_SMARTY['is_member'] = 1; 45 } 43 46 else 47 { 44 48 $leftmenu["/communities/join/".$token[2]] = 'Join'; 49 $_SMARTY['id_member'] = 0; 50 } 45 51 else 52 { 46 53 $leftmenu["/communities/edit/".$token[2]] = 'Edit'; 47 54 $_SMARTY['is_member'] = 1; 55 } 48 56 49 57 $leftmenu["/communities/forum/".$token[2]] = 'View forum'; 50 58 $leftmenu["/communities/invite/".$token[2]] = 'Invite friends'; 51 59 52 $smarty->assign('leftmenu',$leftmenu); 53 60 $_SMARTY['leftmenu'] = $leftmenu; 54 61 55 62 /************************************/ 56 63 57 64 65 $_SMARTY['Title'] = 'Community'; 58 66 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'])); 60 69 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; 72 71 } 73 72 else
