2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2009 */
\r
6 /* Adaptive Technology Resource Centre / University of Toronto */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
15 global $savant, $_config, $stripslashes;
\r
17 require_once('lib/friends.inc.php');
\r
18 require_once('lib/classes/Application.class.php');
\r
19 /* start output buffering: */
\r
23 //Get the list of friends.
\r
25 $list_of_friends = getFriends($_SESSION['member_id']);
\r
26 if (sizeof($list_of_friends) > 0){
\r
27 foreach ($list_of_friends as $id){
\r
28 //print links of friends
\r
29 //make a size limit so the rest will be "..."
\r
32 echo 'You don\'t have any friends in your network yet, <a href="'.url_rewrite(AT_SOCIAL_BASENAME.'connections.php').'">click here</a> to start adding friends to your networking';
\r
38 <ul class="social_side_menu">
\r
39 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'index.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('network_home'); ?></a></li>
\r
40 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'connections.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('connections'); ?></a></li>
\r
41 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'sprofile.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('social_profile'); ?></a></li>
\r
42 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'applications.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('applications'); ?></a></li>
\r
43 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'groups/index.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('social_groups'); ?></a></li>
\r
44 <li><a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'settings.php', AT_PRETTY_URL_HEADER); ?>"><?php echo _AT('settings'); ?></a></li>
\r
48 $applications_obj = new Applications();
\r
49 $myApplications = $applications_obj->listMyApplications();
\r
50 if (!empty($myApplications)): ?>
\r
51 <div class="divider"></div>
\r
52 <div><?php echo _AT('applications'); ?></div>
\r
53 <ul class="social_side_menu">
\r
55 foreach ($myApplications as $id=>$app_obj){
\r
56 echo '<li><a href="'.url_rewrite(AT_SOCIAL_BASENAME.'applications.php?app_id='.$id, AT_PRETTY_URL_HEADER).'">'.$app_obj->title.'</a></li>';
\r
61 <div class="divider"></div>
\r
63 <form action="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'connections.php', AT_PRETTY_URL_HEADER);?>" method="POST">
\r
64 <input type="text" name="search_friends_123" value="<?php echo urldecode($_POST['searchFriends']); ?>" title="<?php echo _AT('search_for_friends'); ?>" />
\r
65 <input type="hidden" name="rand_key" value="123"/>
\r
66 <input type="submit" name="search" value="<?php echo _AT('search_for_friends'); ?>" class="button" />
\r
70 $savant->assign('dropdown_contents', ob_get_contents());
\r
73 $savant->assign('title', _AT('social')); // the box title
\r
74 $savant->display('include/box.tmpl.php');
\r