} if (isset($_GET['so']) && !strcasecmp($_GET['so'], 'asc')) { $SORT_ORDER = 'ASC'; $SORT_ORDER_R = 'DESC'; } else { $SORT_ORDER = 'DESC'; $SORT_ORDER_R = 'ASC'; } $post_entry = ''; if ($usr->users_opt & 1048576 || $fids) { $qry_limit = $usr->users_opt & 1048576 ? '' : 'f.id IN (' . $fids . ') AND '; /* we need the total for the pager & we don't trust the user to pass it via GET or POST */ $total = q_singleval("SELECT count(*)\n\t\t\t\t\tFROM phpgw_fud_msg m\n\t\t\t\t\tINNER JOIN phpgw_fud_thread t ON m.thread_id=t.id\n\t\t\t\t\tINNER JOIN phpgw_fud_forum f ON t.forum_id=f.id\n\t\t\t\t\tINNER JOIN phpgw_fud_cat c ON c.id=f.cat_id\n\t\t\t\t\tWHERE " . $qry_limit . " m.apr=1 AND m.poster_id=" . $uid); $c = uq("SELECT f.name, f.id, m.subject, m.id, m.post_stamp\n\t\t\tFROM phpgw_fud_msg m\n\t\t\tINNER JOIN phpgw_fud_thread t ON m.thread_id=t.id\n\t\t\tINNER JOIN phpgw_fud_forum f ON t.forum_id=f.id\n\t\t\tINNER JOIN phpgw_fud_cat c ON c.id=f.cat_id\n\t\t\tWHERE " . $qry_limit . " m.apr=1 AND m.poster_id=" . $uid . "\n\t\t\tORDER BY m.post_stamp " . $SORT_ORDER . " LIMIT " . qry_limit($THREADS_PER_PAGE, $start)); while ($r = db_rowarr($c)) { $post_entry .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&goto=' . $r[3] . '&' . _rsid . '">' . $r[2] . '</a></td><td class="GenText" nowrap><a href="/egroupware/fudforum/3814588639/index.php?t=' . t_thread_view . '&frm_id=' . $r[1] . '&' . _rsid . '" class="GenLink">' . htmlspecialchars($r[0]) . '</a></td><td class="DateText" nowrap>' . strftime("%a, %d %B %Y %H:%M", $r[4]) . '</td></tr>'; } $pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $total, '/egroupware/fudforum/3814588639/index.php?t=showposts&id=' . $uid . '&' . _rsid); } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Total time taken to generate the page: ' . $page_gen_time . ' seconds</div>'; } else { $page_stats = ''; } echo $GLOBALS['fud_egw_hdr']; ?> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr><th colspan=3>User Information</th></tr>
<select name="forum_limiter"><option value="">Search all Forums</option> <?php echo $forum_limit_data; ?> </select> </td> </tr> <tr class="<?php echo alt_var('color_alt', 'RowStyleA', 'RowStyleB'); ?> "><td class="GenText">Search Logic:</td><td colspan=2><select name="search_logic"><?php echo $logic_options; ?> </select></td></tr> <tr class="<?php echo alt_var('color_alt', 'RowStyleA', 'RowStyleB'); ?> "><td class="GenText">Sort Results By Date In:</td><td colspan=2><select name="sort_order"><?php echo $sort_options; ?> </select></td></tr> <tr class="RowStyleC"><td class="GenText" align="right" colspan=3><input type="submit" class="button" name="btn_submit" value="Search"></td></tr> </table></form> <?php echo $search_data; ?> <div align="left"><?php echo $page_pager; ?> </div> <?php
if ($k['p'] == $k['t']) { $k['p'] = 0; } return $k['v'][$k['p']++]; } $TITLE_EXTRA = ': Avatar Selection Form'; /* here we draw the avatar control */ $icons_per_row = 5; $c = uq('SELECT id, descr, img FROM phpgw_fud_avatar ORDER BY id'); $avatars_data = ''; $col = 0; while ($r = db_rowarr($c)) { if (!($col++ % $icons_per_row)) { $avatars_data .= '</tr><tr>'; } $avatars_data .= '<td class="' . alt_var('avatarsel_cl', 'Av1', 'Av2') . '"> <a class="GenLink" href="javascript: window.opener.document.fud_register.reg_avatar.value=\'' . $r[0] . '\'; window.opener.document.reg_avatar_img.src=\'images/avatars/' . $r[2] . '\'; window.close();"><img src="images/avatars/' . $r[2] . '" alt="" /><br /><font class="SmallText">' . $r[1] . '</font></a></td>'; } if (!$avatars_data) { $avatars_data = '<td class="NoAvatar">No Avatars available</td>'; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-15"> <title><?php echo $GLOBALS['FORUM_TITLE'] . $TITLE_EXTRA; ?> </title> <script language="JavaScript" src="<?php
LEFT JOIN phpgw_fud_users u ON ui.ignore_id=u.id WHERE ui.user_id=' . _uid); $ignore_list = ''; if ($r = @db_rowarr($c)) { do { if ($r[0]) { $homepage_link = $r[6] ? '<a class="GenLink" href="' . $r[6] . '" target="_blank"><img src="/egroupware/fudforum/3814588639/theme/default/images/homepage.gif" alt="" /></a>' : ''; $email_link = $FUD_OPT_2 & 1073741824 ? '<a href="/egroupware/fudforum/3814588639/index.php?t=email&toi=' . $r[2] . '&' . _rsid . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/default/images/msg_email.gif" alt="" /></a>' : ''; $ignore_list .= '<tr class="' . alt_var('ignore_alt', 'RowStyleA', 'RowStyleB') . '"> <td width="100%" class="GenText"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $r[2] . '&' . _rsid . '">' . $r[3] . '</a> <font class="SmallText">(<a href="/egroupware/fudforum/3814588639/index.php?t=ignore_list&del=' . $r[0] . '&' . _rsid . '" class="GenLink">remove</a>)</font></td> <td align="center">' . $r[5] . '</td> <td align="center" nowrap>' . strftime("%a, %d %B %Y %H:%M", $r[4]) . '</td> <td class="GenText" nowrap><a href="/egroupware/fudforum/3814588639/index.php?t=showposts&' . _rsid . '&id=' . $r[2] . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/default/images/show_posts.gif" alt="" /></a> ' . $email_link . ' ' . $homepage_link . '</td> </tr>'; } else { $ignore_list .= '<tr class="' . alt_var('ignore_alt', 'RowStyleA', 'RowStyleB') . '"> <td width="100%" colspan=4 class="GenText"><font class="anon">' . $GLOBALS['ANON_NICK'] . '</font> <font class="SmallText">(<a href="/egroupware/fudforum/3814588639/index.php?t=ignore_list&del=' . $r[1] . '&' . _rsid . '" class="GenLink">remove</a>)</font></td> </tr>'; } } while ($r = db_rowarr($c)); $ignore_list = '<table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr><th>Ignored Users</th><th nowrap align="center">Post Count</th><th nowrap align="center">Registered On</th><th nowrap align="center">Action</th></tr> ' . $ignore_list . ' </table>'; } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Total time taken to generate the page: ' . $page_gen_time . ' seconds</div>'; } else { $page_stats = '';
function make_email_message(&$body, &$obj, $iemail_unsub) { $TITLE_EXTRA = $iemail_poll = $iemail_attach = ''; if ($obj->poll_cache) { $pl = @unserialize($obj->poll_cache); if (is_array($pl) && count($pl)) { foreach ($pl as $k => $v) { $length = $v[1] && $obj->total_votes ? round($v[1] / $obj->total_votes * 100) : 0; $iemail_poll .= '<tr class="' . alt_var('msg_poll_alt_clr', 'RowStyleB', 'RowStyleA') . '"><td>' . $i . '.</td><td>' . $v[0] . '</td><td><img src="/egroupware/fudforum/3814588639/theme/default/images/poll_pix.gif" alt="" height="10" width="' . $length . '" /> ' . $v[1] . ' / ' . $length . '%</td></tr>'; } $iemail_poll = '<table border=0 cellspacing=1 cellpadding=2 class="PollTable"> <tr><th nowrap colspan=3>' . $obj->poll_name . '<img src="blank.gif" alt="" height=1 width=10 /><font size="-1">[ ' . $obj->total_votes . ' vote(s) ]</font></th></tr> ' . $iemail_poll . ' </table><p>'; } } if ($obj->attach_cnt && $obj->attach_cache) { $atch = @unserialize($obj->attach_cache); if (is_array($atch) && count($atch)) { foreach ($atch as $v) { $sz = $v[2] / 1024; $sz = $sz < 1000 ? number_format($sz, 2) . 'KB' : number_format($sz / 1024, 2) . 'MB'; $iemail_attach .= '<tr> <td valign="middle"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=getfile&id=' . $v[0] . '&' . _rsid . '"><img alt="" src="' . $GLOBALS['WWW_ROOT'] . 'images/mime/' . $v[4] . '" /></a></td> <td><font class="GenText"><b>Attachment:</b></font> <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=getfile&id=' . $v[0] . '&' . _rsid . '">' . $v[1] . '</a><br /> <font class="SmallText">(Size: ' . $sz . ', Downloaded ' . $v[3] . ' time(s))</font></td></tr>'; } $iemail_attach = '<p> <table border=0 cellspacing=0 cellpadding=2> ' . $iemail_attach . ' </table>'; } } return '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-15"> <title>' . $GLOBALS['FORUM_TITLE'] . $TITLE_EXTRA . '</title> <script language="JavaScript" src="' . $GLOBALS['WWW_ROOT'] . '/lib.js" type="text/javascript"></script> <link rel="StyleSheet" href="/egroupware/fudforum/3814588639/theme/default/forum.css" type="text/css"> </head> <body> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr class="RowStyleB"> <td width="33%"><b>Subject:</b> ' . $obj->subject . '</td> <td width="33%"><b>Author:</b> ' . $obj->alias . '</td> <td width="33%"><b>Date:</b> ' . strftime("%a, %d %B %Y %H:%M", $obj->post_stamp) . '</td> </tr> <tr class="RowStyleA"> <td colspan="3"> ' . $iemail_poll . ' ' . $body . ' ' . $iemail_attach . ' </td> </tr> <tr class="RowStyleB"> <td colspan="3"> [ <a href="/egroupware/fudforum/3814588639/index.php?t=post&reply_to=' . $obj->id . '">Reply</a> ][ <a href="/egroupware/fudforum/3814588639/index.php?t=post&reply_to=' . $obj->id . '"e=true">Quote</a> ][ <a href="/egroupware/fudforum/3814588639/index.php?t=rview&goto=' . $obj->id . '">View Topic/Message</a> ]' . $iemail_unsub . ' </td> </tr> </table> </td></tr></table></body></html>'; }
if ($r = @db_rowarr($c)) { do { $homepage_link = $r[7] ? '<a class="GenLink" href="' . $r[7] . '" target="_blank"><img src="/egroupware/fudforum/3814588639/theme/default/images/homepage.gif" alt="" /></a>' : ''; if (!($r[5] & 32768) && $FUD_OPT_2 & 32 || $usr->users_opt & 1048576) { $online_status = $r[8] + $LOGEDIN_TIMEOUT * 60 > __request_timestamp__ ? '<img src="/egroupware/fudforum/3814588639/theme/default/images/online.gif" title="' . $r[2] . ' is currently online" alt="' . $r[2] . ' is currently online" />' : '<img src="/egroupware/fudforum/3814588639/theme/default/images/offline.gif" title="' . $r[2] . ' is currently offline" alt="' . $r[2] . ' is currently offline" />'; } else { $online_status = ''; } if ($r[5] && substr($r[4], 4) == date('md')) { $age = date('Y') - substr($r[4], 0, 4); $bday_indicator = '<img src="blank.gif" alt="" width=10 height=1 /><img src="/egroupware/fudforum/3814588639/theme/default/images/bday.gif" alt="" />Today ' . $r[2] . ' turns ' . $age; } else { $bday_indicator = ''; } $contact_link = $FUD_OPT_1 & 1024 ? '<a href="/egroupware/fudforum/3814588639/index.php?t=ppost&' . _rsid . '&toi=' . urlencode($r[0]) . '" class="GenLink">' . $r[2] . '</a>' : '<a href="/egroupware/fudforum/3814588639/index.php?t=email&toi=' . $r[1] . '&' . _rsid . '" class="GenLink">' . $r[2] . '</a>'; $buddies .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"> <td align="center">' . $online_status . '</td> <td width="100%" class="GenText">' . $contact_link . ' <font class="SmallText">(<a href="/egroupware/fudforum/3814588639/index.php?t=buddy_list&' . _rsid . '&del=' . $r[0] . '" class="GenLink">remove</a>)</font> ' . $bday_indicator . '</td> <td align="center">' . $r[6] . '</td> <td align="center" nowrap>' . strftime("%a, %d %B %Y %H:%M", $r[3]) . '</td> <td class="GenText" nowrap><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $r[1] . '&' . _rsid . '"><img src="/egroupware/fudforum/3814588639/theme/default/images/msg_about.gif" alt="" /></a> <a href="/egroupware/fudforum/3814588639/index.php?t=showposts&' . _rsid . '&id=' . $r[1] . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/default/images/show_posts.gif" alt="" /></a> ' . $homepage_link . '</td> </tr>'; } while ($r = db_rowarr($c)); $buddies = '<table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr><th>Status</th><th>My Buddies</th><th nowrap align="center">Post Count</th><th nowrap align="center">Registered On</th><th nowrap align="center">Action</th></tr> ' . $buddies . ' </table>'; } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000);
$buddies = ''; if ($all) { $all_v = ''; $all_d = 'none'; } else { $all_v = '1'; $all_d = 'all'; } $c = uq('SELECT u.alias FROM phpgw_fud_buddy b INNER JOIN phpgw_fud_users u ON b.bud_id=u.id WHERE b.user_id=' . _uid . ' AND b.user_id>1'); while ($r = db_rowarr($c)) { $checked = $all ? ' checked' : ''; $buddies .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText">' . $r[0] . '</td><td align="center"><input type="checkbox" name="names[]" value="' . $r[0] . '"' . $checked . '></td></tr>'; } $qbud_data = $buddies ? '<tr><th width="100%">Nick Name</th><th nowrap>Selected [<a class="thLnk" href="/egroupware/fudforum/3814588639/index.php?t=qbud&' . _rsid . '&all=' . $all_v . '">' . $all_d . '</a>]</th></tr> ' . $buddies . ' <tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2 class="GenText" align="right"><input type="submit" class="button" name="submit" value="Add Selected"></td></tr>' : '<tr class="RowStyleA"><td class="GenText" align="center">No buddies to choose from</td></tr>'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-15"> <title><?php echo $GLOBALS['FORUM_TITLE'] . $TITLE_EXTRA; ?> </title> <script language="JavaScript" src="<?php echo $GLOBALS['WWW_ROOT']; ?> /lib.js" type="text/javascript"></script> <link rel="StyleSheet" href="/egroupware/fudforum/3814588639/theme/default/forum.css" type="text/css"> </head>
} if (!$subscribed_forum_data) { $subscribed_forum_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>Non sei iscritto ad alcun forum</td></tr>'; } /* Since a person can have MANY subscribed threads, we need a pager & for the pager we need a entry count */ $total = q_singleval('SELECT count(*) FROM phpgw_fud_thread_notify tn LEFT JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt); if (!isset($_GET['start']) || !($start = (int) $_GET['start'])) { $start = 0; } $subscribed_thread_data = ''; $c = uq('SELECT t.id, m.subject FROM phpgw_fud_thread_notify tn INNER JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt . ' ORDER BY t.last_post_id DESC LIMIT ' . qry_limit($THREADS_PER_PAGE, $start)); while ($r = db_rowarr($c)) { $subscribed_thread_data .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td width="100%"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '">' . $r[1] . '</a></td><td nowrap><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=subscribed&th=' . $r[0] . '&' . _rsid . '">Cancella iscrizione</a> | <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '" target="_blank">Visualizza topic</a></td></tr>'; } if (!$subscribed_thread_data) { $subscribed_thread_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>Non sei iscritto ad alcun topic</td></tr>'; } $pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $total, '/egroupware/fudforum/3814588639/index.php?t=subscribed&a=1&' . _rsid, '#fff'); if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Tempo totale richiesto per generare la pagina: ' . $page_gen_time . ' secondi</div>'; } else { $page_stats = ''; } echo $GLOBALS['fud_egw_hdr']; ?> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <?php echo $tabs; ?>
if ($obj->user_id == '0') { $member_name = '<font class="anon">Anonimo</font>'; $group_members_list .= '<tr class="' . alt_var('mem_list_alt', 'RowStyleA', 'RowStyleB') . '"> <td nowrap>' . $member_name . '</td> ' . $perm_table . ' <td nowrap>[<a href="/egroupware/fudforum/3814588639/index.php?t=groupmgr&' . _rsid . '&edit=' . $obj->mmid . '&group_id=' . $obj->group_id . '">Modifica</a>]</td></tr>'; } else { if ($obj->user_id == '2147483647') { $member_name = '<font class="reg">Tutti gli utenti registrati</font>'; $group_members_list .= '<tr class="' . alt_var('mem_list_alt', 'RowStyleA', 'RowStyleB') . '"> <td nowrap>' . $member_name . '</td> ' . $perm_table . ' <td nowrap>[<a href="/egroupware/fudforum/3814588639/index.php?t=groupmgr&' . _rsid . '&edit=' . $obj->mmid . '&group_id=' . $obj->group_id . '">Modifica</a>]</td></tr>'; } else { $member_name = $obj->alias; $group_members_list .= '<tr class="' . alt_var('mem_list_alt', 'RowStyleA', 'RowStyleB') . '"> <td nowrap>' . $member_name . '</td> ' . $perm_table . ' <td nowrap>[<a href="/egroupware/fudforum/3814588639/index.php?t=groupmgr&' . _rsid . '&edit=' . $obj->mmid . '&group_id=' . $obj->group_id . '">Modifica</a>] [<a href="/egroupware/fudforum/3814588639/index.php?t=groupmgr&' . _rsid . '&del=' . $obj->user_id . '&group_id=' . $obj->group_id . '">Cancella</a>]</td></tr>'; } } } $group_control_panel = '' . $group_selection . ' <br /> ' . $indicator . ' <br /> <form method="post" action="/egroupware/fudforum/3814588639/index.php?t=groupmgr" name="groupmgr"> <table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> ' . $member_input . ' <tr class="RowStyleB"> <td colspan=2>
$last_post = 'n.d.'; } if (!$r[2] || ($usr->users_opt & 1048576 || !empty($limit[$r[2]]) || $r[12])) { if (($p = strpos($r[0], '?')) !== false) { $action = substr_replace($r[0], '?' . _rsid . '&', $p, 1); } else { if (($p = strpos($r[0], '.php')) !== false) { $action = substr_replace($r[0], '.php?' . _rsid . '&', $p, 4); } else { $action = $r[0]; } } } else { $action = 'Non disponi dei permessi necessari per visualizzare questo topic.'; } $action_data .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"> <td class="GenText">' . $user_login . '</td> <td class="GenText">' . $action . '</td> <td class="DateText">' . strftime("%H:%M:%S", $r[5]) . '</td> <td class="SmallText">' . $last_post . '</td> </tr>'; } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Tempo totale richiesto per generare la pagina: ' . $page_gen_time . ' secondi</div>'; } else { $page_stats = ''; } echo $GLOBALS['fud_egw_hdr']; ?>
} $vote_lnk = ''; if (!$obj->cant_vote && (!$obj->poll_expiry_date || $obj->poll_expiry_date < __request_timestamp__)) { if ($obj->md || $obj->gco & 512 && (!($obj->thread_opt & 1) || $obj->gco & 4096)) { if (!$obj->max_votes || $obj->total_votes < $obj->max_votes) { $vote_lnk = ' <b>::</b> <a href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&goto=' . $obj->id . '&' . _rsid . '">Vota</a> <b>::</b> '; } } } $view_res_lnk = $obj->total_votes ? '<a href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&goto=' . $obj->id . '&pl_view=' . $obj->poid . '&' . _rsid . '">Vedi risultati</a> <b>::</b> ' : ''; if ($obj->owner && (!($obj->users_opt & 32768) || $usr->users_opt & 1048576) && $FUD_OPT_2 & 32) { $online_indicator = $obj->last_visit > __request_timestamp__ ? '<img src="/egroupware/fudforum/3814588639/theme/italian/images/online.gif" title="' . $user_login . ' è attualmente online" alt="' . $user_login . ' è attualmente online" /> ' : '<img src="/egroupware/fudforum/3814588639/theme/italian/images/offline.gif" title="' . $user_login . ' è attualmente offline" alt="' . $user_login . ' è attualmente offline" /> '; } else { $online_indicator = ''; } $poll_entries .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"> <td width="100%">' . $obj->name . '</td> <td nowrap>' . strftime("%a, %d %B %Y %H:%M", $obj->creation_date) . '</td> <td nowrap>' . $online_indicator . '<a href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $obj->owner . '&' . _rsid . '">' . $obj->alias . '</a></td> <td align="center" nowrap>' . $obj->total_votes . '</td> <td align="center" nowrap>' . $vote_lnk . $view_res_lnk . '</td> </tr>'; } if ($ttl > $POLLS_PER_PAGE) { $pager = tmpl_create_pager($start, $POLLS_PER_PAGE, $ttl, '/egroupware/fudforum/3814588639/index.php?t=polllist&oby=' . $oby . '&uid=' . $uid); } } else { $poll_entries = '<tr><td colspan="5" align="center">There are no accessible polls.</td></tr>'; } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday();
$find_user_data = ''; $c = uq('SELECT alias FROM phpgw_fud_users ' . $qry . ' AND id>1'); $i = 0; while ($r = db_rowarr($c)) { if ($overwrite) { $retlink = 'javascript: window.opener.document.' . $js_redr . '.value=\'' . addcslashes($r[0], "'\\") . '\'; window.close();'; } else { $retlink = 'javascript: if (!window.opener.document.' . $js_redr . '.value) { window.opener.document.' . $js_redr . '.value = \'' . addcslashes($r[0], "'\\") . '\'; } else { window.opener.document.' . $js_redr . '.value = window.opener.document.' . $js_redr . '.value + \'; \' + \'' . addcslashes($r[0], "'\\") . '; \'; } window.close();'; } $find_user_data .= '<tr class="' . alt_var('pmuserloc_alt', 'RowStyleA', 'RowStyleB') . '"><td><a href="' . $retlink . '">' . $r[0] . '</a></td></tr>'; $i++; } if (!$find_user_data) { $find_user_data = '<tr><td colspan=2>No Result</td>'; } } else { $find_user_data = ''; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-15"> <title><?php echo $GLOBALS['FORUM_TITLE'] . $TITLE_EXTRA;
} $lmt = ' LIMIT ' . qry_limit($count, $start); $admin_opts = $adm ? '<th>Admin Opts.</th>' : ''; $find_user_data = ''; $c = uq('SELECT home_page, users_opt, alias, join_date, posted_msg_count, id FROM phpgw_fud_users WHERE ' . $qry . ' id>1 ORDER BY ' . $ord . ' ' . $lmt); while ($r = db_rowobj($c)) { $pm_link = $FUD_OPT_1 & 1024 && _uid ? '<a href="/egroupware/index.php?menuaction=messenger.uimessenger.compose&message_to=;' . _rsid . '&message_to=' . $u->alias . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/italian/images/msg_pm.gif" alt="" /></a>' : ''; $homepage_link = $r->home_page ? '<a class="GenLink" href="' . $r->home_page . '" target="_blank"><img alt="" src="/egroupware/fudforum/3814588639/theme/italian/images/homepage.gif" /></a>' : ''; $email_link = $FUD_OPT_2 & 1073741824 && $r->users_opt & 16 ? '<a href="/egroupware/fudforum/3814588639/index.php?t=email&toi=' . $r->id . '&' . _rsid . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/italian/images/msg_email.gif" alt="" /></a>' : ''; if ($adm) { $admi = $r->users_opt & 65536 ? '<a href="' . $GLOBALS['WWW_ROOT'] . 'adm/admuser.php?act=block&usr_id=' . $r->id . '&' . _rsid . '">UnBan</a>' : '<a href="' . $GLOBALS['WWW_ROOT'] . 'adm/admuser.php?act=block&usr_id=' . $r->id . '&' . _rsid . '">Ban</a>'; $admi = '<td class="SmallText" nowrap><a href="' . $GLOBALS['WWW_ROOT'] . 'adm/admuser.php?usr_id=' . $r->id . '&' . _rsid . '&act=1">Edit</a> || ' . $admi . '</td>'; } else { $admi = ''; } $find_user_data .= '<tr class="' . alt_var('finduser_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $r->id . '&' . _rsid . '">' . $r->alias . '</a></td><td align="center" nowrap>' . $r->posted_msg_count . '</td><td class="DateText" nowrap>' . strftime("%a, %d %B %Y", $r->join_date) . '</td><td nowrap class="GenText"><a href="/egroupware/fudforum/3814588639/index.php?t=showposts&id=' . $r->id . '&' . _rsid . '" class="GenLink"><img alt="" src="/egroupware/fudforum/3814588639/theme/italian/images/show_posts.gif" /></a> ' . $email_link . ' ' . $pm_link . ' ' . $homepage_link . '</td>' . $admi . '</tr>'; } if (!$find_user_data) { $colspan = $adm ? 5 : 4; $find_user_data = '<tr class="RowStyleA"><td colspan="' . $colspan . '" width="100%" class="GenText">Nessun utente trovato</td></tr>'; } $pager = ''; if (!$qry) { $total = q_singleval('SELECT count(*) FROM phpgw_fud_users ' . $qry); if ($total > $count) { $pg = '/egroupware/fudforum/3814588639/index.php?t=finduser&' . _rsid . '&'; if ($usr_login) { $pg .= urlencode($usr_login) . '&';
$subject_error = get_err('subj'); $body_error = get_err('body'); $fname = isset($_POST['fname']) ? $_POST['fname'] : ''; $femail = isset($_POST['femail']) ? $_POST['femail'] : ''; $subject = isset($_POST['subject']) ? htmlspecialchars($_POST['subject']) : $data->subject; $form_data = '<tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" nowrap>Your Name:</td><td width="100%">' . $usr->alias . '</td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" nowrap>Your Email:</td><td width="100%">' . $usr->email . '</td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" nowrap>Friend's Name:</td><td width="100%"><input type="text" name="fname" value="' . htmlspecialchars($fname) . '"></td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" valign="top" nowrap><font class="SmallText">Friend's Email:<br /><i>required</i></font></td><td valign="top"><input type="text" name="femail" value="' . htmlspecialchars($femail) . '">' . $femail_error . '</td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" valign="top" nowrap><font class="SmallText">Subject:<br /><i>required</i></font></td><td nowrap valign="top"><input type="text" name="subj" value="' . $subject . '">' . $subject_error . '</td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" valign="top" nowrap>Message:<font class="SmallText"><br /><i>required</i></font></td><td valign="top" nowrap><textarea name="body" rows="19" cols="78" wrap="PHYSICAL">' . $body . '</textarea>' . $body_error . '</td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" colspan=2 align="right"><input type="submit" class="button" name="submit" value="Send Email Now"></td></tr>'; } else { $form_data = '<tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" align="center"><font class="SmallText">Copy this message into a mail client of your choice to send it to your friend(s).</font></td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText"><textarea name="body" rows="19" cols="78">' . $body . '</textarea></td></tr> <tr class="' . alt_var('page_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText" align="right"><input type="submit" class="button" name="done" value="Done"></td></tr>'; } $form_data = str_replace('\\n', "\n", $form_data); echo $GLOBALS['fud_egw_hdr']; ?> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <div align=center> <?php echo $remail_error; ?> <form action="/egroupware/fudforum/3814588639/index.php?t=remail" name="remail" method="post"><input type="hidden" name="posted" value="1"> <table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr><th colspan=2>Email This Topic To A Friend</th></tr> <?php echo $form_data; ?>
<tr><td colspan=2 align=right><input type="submit" class="button" name="Send" value="Invia"></td></tr> </form> </table> </td></tr>' : ''; $im_jabber = $u->jabber ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">Jabber:</td><td class="GenText">' . $u->jabber . '</td></tr>' : ''; $im_aim = $u->aim ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">AIM Handle:</td><td class="GenText"><a href="aim:goim?screenname=' . $u->aim . '&message=Hello+Are+you+there?" class="GenLink">' . $u->aim . '</a></td></tr>' : ''; $im_yahoo = $u->yahoo ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">Yahoo Messenger:</td><td class="GenText"><a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $u->yahoo . '&.src=pg" class="GenLink">' . $u->yahoo . '</a></td></tr>' : ''; $im_msnm = $u->msnm ? '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">MSN Messenger:</td><td class="GenText">' . $u->msnm . '</td></tr>' : ''; if ($u->bday) { $bday = convert_bdate($u->bday, '%B'); $birth_date = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">Data di nascita:</td><td class="GenText">' . $bday['month'] . ' ' . $bday['day'] . ', ' . $bday['year'] . '</td></tr>'; } else { $birth_date = ''; } if ($FUD_OPT_2 & 2048 && $u->affero) { $im_affero = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td nowrap class="GenText">Affero Username</td><td class="GenText"><a href="http://svcs.affero.net/user-history.php?u=' . $u->affero . '" target="_blank">' . htmlspecialchars(urldecode($u->affero)) . '</a></td></tr>'; } else { $im_affero = ''; } if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Tempo totale richiesto per generare la pagina: ' . $page_gen_time . ' secondi</div>'; } else { $page_stats = ''; } echo $GLOBALS['fud_egw_hdr']; ?> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <table border="0" cellspacing="1" cellpadding="2" class="ContentTable"> <tr><th colspan=2 width="100%">Profilo <?php
} if (!$subscribed_forum_data) { $subscribed_forum_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>No subscribed forums</td></tr>'; } /* Since a person can have MANY subscribed threads, we need a pager & for the pager we need a entry count */ $total = q_singleval('SELECT count(*) FROM phpgw_fud_thread_notify tn LEFT JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt); if (!isset($_GET['start']) || !($start = (int) $_GET['start'])) { $start = 0; } $subscribed_thread_data = ''; $c = uq('SELECT t.id, m.subject FROM phpgw_fud_thread_notify tn INNER JOIN phpgw_fud_thread t ON tn.thread_id=t.id INNER JOIN phpgw_fud_msg m ON t.root_msg_id=m.id WHERE tn.user_id=' . _uid . ' ' . $lmt . ' ORDER BY t.last_post_id DESC LIMIT ' . qry_limit($THREADS_PER_PAGE, $start)); while ($r = db_rowarr($c)) { $subscribed_thread_data .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td width="100%"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '">' . $r[1] . '</a></td><td nowrap><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=subscribed&th=' . $r[0] . '&' . _rsid . '">Unsubscribe</a> | <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=' . d_thread_view . '&th=' . $r[0] . '&' . _rsid . '" target="_blank">View Topic</a></td></tr>'; } if (!$subscribed_thread_data) { $subscribed_thread_data = '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2>No subscribed topics</td></tr>'; } $pager = tmpl_create_pager($start, $THREADS_PER_PAGE, $total, '/egroupware/fudforum/3814588639/index.php?t=subscribed&a=1&' . _rsid, '#fff'); if ($FUD_OPT_2 & 2) { $page_gen_end = gettimeofday(); $page_gen_time = sprintf('%.5f', $page_gen_end['sec'] - $PAGE_TIME['sec'] + ($page_gen_end['usec'] - $PAGE_TIME['usec']) / 1000000); $page_stats = '<br /><div align="left" class="SmallText">Total time taken to generate the page: ' . $page_gen_time . ' seconds</div>'; } else { $page_stats = ''; } echo $GLOBALS['fud_egw_hdr']; ?> <table width="100%" border="0" cellspacing="3" cellpadding="5"><tr><td class="ForumBackground"> <?php echo $tabs; ?>
function tmpl_drawmsg($obj, $usr, $perms, $hide_controls, &$m_num, $misc) { $o1 =& $GLOBALS['FUD_OPT_1']; $o2 =& $GLOBALS['FUD_OPT_2']; $a =& $obj->users_opt; $b =& $usr->users_opt; $c =& $obj->level_opt; /* draw next/prev message controls */ if (!$hide_controls && $misc) { /* tree view is a special condition, we only show 1 message per page */ if ($_GET['t'] == 'tree') { $prev_message = $misc[0] ? '<a href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&' . _rsid . '&th=' . $obj->thread_id . '&mid=' . $misc[0] . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/default/images/up.png" title="Go to previous message" alt="Go to previous message" width=16 height=11 /></a>' : ''; $next_message = $misc[1] ? '<a href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&' . _rsid . '&th=' . $obj->thread_id . '&mid=' . $misc[1] . '" class="GenLink"><img alt="Go to previous message" title="Go to next message" src="/egroupware/fudforum/3814588639/theme/default/images/down.png" width=16 height=11 /></a>' : ''; $next_page = ''; } else { /* handle previous link */ if (!$m_num && $obj->id > $obj->root_msg_id) { /* prev link on different page */ $msg_start = $misc[0] - $misc[1]; $prev_message = '<a href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&' . _rsid . '&prevloaded=1&th=' . $obj->thread_id . '&start=' . $msg_start . reveal_lnk . unignore_tmp . '" class="GenLink"><img src="/egroupware/fudforum/3814588639/theme/default/images/up.png" title="Go to previous message" alt="Go to previous message" width=16 height=11 /></a>'; } else { if ($m_num) { /* inline link, same page */ $msg_num = $m_num; $prev_message = '<a href="#msg_num_' . $msg_num . '" class="GenLink"><img alt="Go to previous message" title="Go to previous message" src="/egroupware/fudforum/3814588639/theme/default/images/up.png" width=16 height=11 /></a>'; } else { $prev_message = ''; } } /* handle next link */ if ($obj->id < $obj->last_post_id) { if ($m_num && !($misc[1] - $m_num - 1)) { /* next page link */ $msg_start = $misc[0] + $misc[1]; $next_message = '<a href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&' . _rsid . '&prevloaded=1&th=' . $obj->thread_id . '&start=' . $msg_start . reveal_lnk . unignore_tmp . '" class="GenLink"><img alt="Go to previous message" title="Go to next message" src="/egroupware/fudforum/3814588639/theme/default/images/down.png" width=16 height=11 /></a>'; $next_page = '<a href="/egroupware/fudforum/3814588639/index.php?t=' . $_GET['t'] . '&' . _rsid . '&prevloaded=1&th=' . $obj->thread_id . '&start=' . $msg_start . reveal_lnk . unignore_tmp . '" class="GenLink">Next Page <img src="/egroupware/fudforum/3814588639/theme/default/images/goto.gif" alt="" /></a>'; } else { $msg_num = $m_num + 2; $next_message = '<a href="#msg_num_' . $msg_num . '" class="GenLink"><img alt="Go to next message" title="Go to next message" src="/egroupware/fudforum/3814588639/theme/default/images/down.png" width=16 height=11 /></a>'; $next_page = ''; } } else { $next_page = $next_message = ''; } } $m_num++; } else { $next_page = $next_message = $prev_message = ''; } if (!$obj->user_id) { $user_login =& $GLOBALS['ANON_NICK']; $user_login_td = $GLOBALS['ANON_NICK'] . ' is ignored '; } else { $user_login =& $obj->login; $user_login_td = 'Post by <a href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&' . _rsid . '&id=' . $obj->user_id . '" class="GenLink">' . $obj->login . '</a> is ignored '; } /* check if the message should be ignored and it is not temporarily revelead */ if ($usr->ignore_list && !empty($usr->ignore_list[$obj->poster_id]) && !isset($GLOBALS['__FMDSP__'][$obj->id])) { $rev_url = make_reveal_link($obj->id); $un_ignore_url = make_tmp_unignore_lnk($obj->poster_id); return !$hide_controls ? '<tr><td> <table border=0 cellspacing=0 cellpadding=0 class="MsgTable"> <tr> <td align="left" class="MsgIg"> <a name="msg_num_' . $m_num . '"></a> <a name="msg_' . $obj->id . '"></a> ' . $user_login_td . ' [<a href="/egroupware/fudforum/3814588639/index.php?' . $rev_url . '" class="GenLink">reveal post</a>] [<a href="/egroupware/fudforum/3814588639/index.php?' . $un_ignore_url . '" class="GenLink">reveal all posts by ' . $user_login . '</a>] [<a href="/egroupware/fudforum/3814588639/index.php?t=ignore_list&del=' . $obj->poster_id . '&redr=1&' . _rsid . '" class="GenLink">stop ignoring this user</a>]</td> <td class="MsgIg" align="right">' . $prev_message . $next_message . '</td></tr> </table></td></tr>' : '<tr class="MsgR1"> <td class="GenText"><a name="msg_num_' . $m_num . '"></a> <a name="msg_' . $obj->id . '"></a>Post by ' . $user_login . ' is ignored </td> </tr>'; } if ($obj->user_id) { if (!$hide_controls) { $custom_tag = $obj->custom_status ? '<br />' . $obj->custom_status : ''; if ($obj->avatar_loc && $a & 8388608 && $b & 8192 && $o1 & 28 && !($c & 2)) { if (!($c & 1)) { $level_name =& $obj->level_name; $level_image = $obj->level_img ? ' <img src="images/' . $obj->level_img . '" alt="" />' : ''; } else { $level_name = $level_image = ''; } } else { $level_image = $obj->level_img ? ' <img src="images/' . $obj->level_img . '" alt="" />' : ''; $obj->avatar_loc = ''; $level_name =& $obj->level_name; } $avatar = $obj->avatar_loc || $level_image ? '<td class="avatarPad" width="1">' . $obj->avatar_loc . $level_image . '</td>' : ''; $dmsg_tags = $custom_tag || $level_name ? '<div class="ctags">' . $level_name . $custom_tag . '</div>' : ''; if ($o2 & 32 && !($a & 32768) || $b & 1048576) { $online_indicator = $obj->time_sec + $GLOBALS['LOGEDIN_TIMEOUT'] * 60 > __request_timestamp__ ? '<img src="/egroupware/fudforum/3814588639/theme/default/images/online.gif" alt="' . $obj->login . ' is currently online" title="' . $obj->login . ' is currently online" /> ' : '<img src="/egroupware/fudforum/3814588639/theme/default/images/offline.gif" alt="' . $obj->login . ' is currently offline" title="' . $obj->login . ' is currently offline" /> '; } else { $online_indicator = ''; } $user_link = '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $obj->user_id . '&' . _rsid . '">' . $user_login . '</a>'; if ($obj->location) { if (strlen($obj->location) > $GLOBALS['MAX_LOCATION_SHOW']) { $location = substr($obj->location, 0, $GLOBALS['MAX_LOCATION_SHOW']) . '...'; } else { $location =& $obj->location; } $location = '<br /><b>Location: </b>' . $location; } else { $location = ''; } if (_uid && _uid != $obj->user_id) { $buddy_link = !isset($usr->buddy_list[$obj->user_id]) ? '<a href="/egroupware/fudforum/3814588639/index.php?t=buddy_list&add=' . $obj->user_id . '&' . _rsid . '" class="GenLink">add to buddy list</a><br />' : '<a href="/egroupware/fudforum/3814588639/index.php?t=buddy_list&del=' . $obj->user_id . '&redr=1&' . _rsid . '" class="GenLink">remove from buddy list</a><br />'; $ignore_link = !isset($usr->ignore_list[$obj->user_id]) ? '<a href="/egroupware/fudforum/3814588639/index.php?t=ignore_list&add=' . $obj->user_id . '&' . _rsid . '" class="GenLink">ignore all posts by this user</a>' : '<a href="/egroupware/fudforum/3814588639/index.php?t=ignore_list&del=' . $obj->user_id . '&redr=1&' . _rsid . '" class="GenLink">stop ignoring posts by this user</a>'; $dmsg_bd_il = $buddy_link . $ignore_link . '<br />'; } else { $dmsg_bd_il = ''; } /* show im buttons if need be */ if ($b & 16384) { $im_icq = $obj->icq ? '<a href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $obj->poster_id . '&' . _rsid . '#icq_msg"><img title="' . $obj->icq . '" src="/egroupware/fudforum/3814588639/theme/default/images/icq.gif" alt="" /></a>' : ''; $im_aim = $obj->aim ? '<a href="aim:goim?screenname=' . $obj->aim . '&message=Hi.+Are+you+there?" target="_blank"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/aim.gif" title="' . $obj->aim . '" /></a>' : ''; $im_yahoo = $obj->yahoo ? '<a target="_blank" href="http://edit.yahoo.com/config/send_webmesg?.target=' . $obj->yahoo . '&.src=pg"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/yahoo.gif" title="' . $obj->yahoo . '" /></a>' : ''; $im_msnm = $obj->msnm ? '<a href="mailto: ' . $obj->msnm . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msnm.gif" title="' . $obj->msnm . '" /></a>' : ''; $im_jabber = $obj->jabber ? '<img src="/egroupware/fudforum/3814588639/theme/default/images/jabber.gif" title="' . $obj->jabber . '" alt="" />' : ''; if ($o2 & 2048) { $im_affero = $obj->affero ? '<a href="http://svcs.affero.net/rm.php?r=' . $obj->affero . '&ll=' . $obj->forum_id . '.' . $GLOBALS['affero_domain'] . '&lp=' . $obj->forum_id . '.' . urlencode($GLOBALS['affero_domain']['host']) . '&ls=' . urlencode($obj->subject) . '" target=_blank><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/affero_reg.gif" /></a>' : '<a href="http://svcs.affero.net/rm.php?m=' . urlencode($obj->email) . '&ll=' . $obj->forum_id . '.' . $GLOBALS['affero_domain'] . '&lp=' . $obj->forum_id . '.' . urlencode($GLOBALS['affero_domain']['host']) . '&ls=' . urlencode($obj->subject) . '" target=_blank><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/affero_noreg.gif" /></a>'; } else { $im_affero = ''; } $dmsg_im_row = $im_icq || $im_aim || $im_yahoo || $im_msnm || $im_jabber || $im_affero ? $im_icq . ' ' . $im_aim . ' ' . $im_yahoo . ' ' . $im_msnm . ' ' . $im_jabber . ' ' . $im_affero . '<br />' : ''; } else { $dmsg_im_row = ''; } } else { $user_link = $user_login; $dmsg_tags = $dmsg_im_row = $dmsg_bd_il = $location = $online_indicator = $avatar = ''; } } else { $user_link = $user_login; $dmsg_tags = $dmsg_im_row = $dmsg_bd_il = $location = $online_indicator = $avatar = ''; } /* Display message body * If we have message threshold & the entirity of the post has been revelead show a preview * otherwise if the message body exists show an actual body * if there is no body show a 'no-body' message */ if (!$hide_controls && $obj->message_threshold && $obj->length_preview && $obj->length > $obj->message_threshold && !isset($GLOBALS['__FMDSP__'][$obj->id])) { $rev_url = make_reveal_link($obj->id); $msg_body = read_msg_body($obj->offset_preview, $obj->length_preview, $obj->file_id_preview); $msg_body = '<font class="MsgBodyText">' . $msg_body . '</font> <br /><div align="center">[<a href="/egroupware/fudforum/3814588639/index.php?' . $rev_url . '" class="GenLink">Show the rest of the message</a>]</div>'; } else { if ($obj->length) { $msg_body = read_msg_body($obj->foff, $obj->length, $obj->file_id); $msg_body = '<font class="MsgBodyText">' . $msg_body . '</font>'; } else { $msg_body = 'No Message Body'; } } if ($obj->poll_cache) { $obj->poll_cache = @unserialize($obj->poll_cache); } /* handle poll votes */ if (!empty($_POST['poll_opt']) && ($_POST['poll_opt'] = (int) $_POST['poll_opt']) && !($obj->thread_opt & 1) && $perms & 512) { if (register_vote($obj->poll_cache, $obj->poll_id, $_POST['poll_opt'], $obj->id)) { $obj->total_votes += 1; $obj->cant_vote = 1; } unset($_GET['poll_opt']); } /* display poll if there is one */ if ($obj->poll_id && $obj->poll_cache) { /* we need to determine if we allow the user to vote or see poll results */ $show_res = 1; if (isset($_GET['pl_view']) && !isset($_POST['pl_view'])) { $_POST['pl_view'] = $_GET['pl_view']; } /* various conditions that may prevent poll voting */ if (!$hide_controls && !$obj->cant_vote && (!isset($_POST['pl_view']) || $_POST['pl_view'] != $obj->poll_id)) { if ($perms & 512 && (!($obj->thread_opt & 1) || $perms & 4096)) { if (!$obj->expiry_date || $obj->creation_date + $obj->expiry_date > __request_timestamp__) { /* check if the max # of poll votes was reached */ if (!$obj->max_votes || $obj->total_votes < $obj->max_votes) { $show_res = 0; } } } } $i = 0; $poll_data = ''; foreach ($obj->poll_cache as $k => $v) { $i++; if ($show_res) { $length = $v[1] && $obj->total_votes ? round($v[1] / $obj->total_votes * 100) : 0; $poll_data .= '<tr class="' . alt_var('msg_poll_alt_clr', 'RowStyleB', 'RowStyleA') . '"><td>' . $i . '.</td><td>' . $v[0] . '</td><td><img src="/egroupware/fudforum/3814588639/theme/default/images/poll_pix.gif" alt="" height="10" width="' . $length . '" /> ' . $v[1] . ' / ' . $length . '%</td></tr>'; } else { $poll_data .= '<tr class="' . alt_var('msg_poll_alt_clr', 'RowStyleB', 'RowStyleA') . '"><td>' . $i . '.</td><td colspan=2><input type="radio" name="poll_opt" value="' . $k . '"> ' . $v[0] . '</td></tr>'; } } if (!$show_res) { $view_poll_results_button = $obj->total_votes ? '<input type="submit" class="button" name="pl_res" value="View Results">' : ''; $poll_buttons = '<tr class="' . alt_var('msg_poll_alt_clr', 'RowStyleB', 'RowStyleA') . '"><td colspan=3 align="right"><input type="submit" class="button" name="pl_vote" value="Vote"> ' . $view_poll_results_button . '</td></tr>'; $poll = '<p> <form action="/egroupware/fudforum/3814588639/index.php?' . $_SERVER['QUERY_STRING'] . '#msg_' . $obj->id . '" method="post">' . _hs . ' <table border=0 cellspacing=1 cellpadding=2 class="PollTable"> <tr><th nowrap colspan=3>' . $obj->poll_name . '<img src="blank.gif" alt="" height=1 width=10 /><font size="-1">[ ' . $obj->total_votes . ' vote(s) ]</font></th></tr> ' . $poll_data . ' ' . $poll_buttons . ' </table><input type="hidden" name="pl_view" value="' . $obj->poll_id . '"></form><p>'; } else { $poll = '<p><table border=0 cellspacing=1 cellpadding=2 class="PollTable"> <tr><th nowrap colspan=3>' . $obj->poll_name . '<img src="blank.gif" alt="" height=1 width=10 /><font size="-1">[ ' . $obj->total_votes . ' vote(s) ]</font></th></tr> ' . $poll_data . ' </table><p>'; } } else { $poll = ''; } /* draw file attachments if there are any */ $drawmsg_file_attachments = ''; if ($obj->attach_cnt && !empty($obj->attach_cache)) { $atch = @unserialize($obj->attach_cache); if (is_array($atch) && count($atch)) { foreach ($atch as $v) { $sz = $v[2] / 1024; $sz = $sz < 1000 ? number_format($sz, 2) . 'KB' : number_format($sz / 1024, 2) . 'MB'; $drawmsg_file_attachments .= '<tr> <td valign="middle"><a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=getfile&id=' . $v[0] . '&' . _rsid . '"><img alt="" src="images/mime/' . $v[4] . '" /></a></td> <td><font class="GenText"><b>Attachment:</b></font> <a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=getfile&id=' . $v[0] . '&' . _rsid . '">' . $v[1] . '</a><br /> <font class="SmallText">(Size: ' . $sz . ', Downloaded ' . $v[3] . ' time(s))</font></td></tr>'; } $drawmsg_file_attachments = '<p> <table border=0 cellspacing=0 cellpadding=2> ' . $drawmsg_file_attachments . ' </table>'; } } /* Determine if the message was updated and if this needs to be shown */ if ($obj->update_stamp) { if ($obj->updated_by != $obj->poster_id && $o1 & 67108864) { $modified_message = '<p>[Updated on: ' . strftime("%a, %d %B %Y %H:%M", $obj->update_stamp) . '] by Moderator'; } else { if ($obj->updated_by == $obj->poster_id && $o1 & 33554432) { $modified_message = '<p>[Updated on: ' . strftime("%a, %d %B %Y %H:%M", $obj->update_stamp) . ']'; } else { $modified_message = ''; } } } else { $modified_message = ''; } $rpl = ''; if (!$hide_controls) { $ip_address = $b & 1048576 || $usr->md || $o1 & 134217728 ? '<b>IP:</b> <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . $obj->ip_addr . '" target="_blank">' . $obj->ip_addr . '</a>' : ''; $host_name = $obj->host_name && $o1 & 268435456 ? '<b>From:</b> ' . $obj->host_name . '<br />' : ''; $msg_icon = !$obj->icon ? '' : '<img src="images/message_icons/' . $obj->icon . '" alt="' . $obj->icon . '" /> '; $signature = $obj->sig && $o1 & 32768 && $obj->msg_opt & 1 && $b & 4096 ? '<p><u> </u><br />' . $obj->sig : ''; $report_to_mod_link = '<div align="right"><font class="SmallText">[<a class="SmallText" href="/egroupware/fudforum/3814588639/index.php?t=report&msg_id=' . $obj->id . '&' . _rsid . '">Report message to a moderator</a>]</font></div>'; if ($obj->reply_to && $obj->reply_to != $obj->id && $o2 & 536870912) { if ($_GET['t'] != 'tree' && $_GET['t'] != 'msg') { $lnk = d_thread_view; } else { $lnk =& $_GET['t']; } $rpl = '<font class="small"> [ <a href="/egroupware/fudforum/3814588639/index.php?t=' . $lnk . '&' . _rsid . '&th=' . $obj->thread_id . '&goto=' . $obj->reply_to . '" class="small">is a reply to message #' . $obj->reply_to . '</a> ]</font>'; } if ($obj->user_id) { $user_profile = '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=usrinfo&id=' . $obj->user_id . '&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_about.gif" /></a>'; $email_link = $o1 & 4194304 && $a & 16 ? '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=email&toi=' . $obj->user_id . '&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_email.gif" /></a>' : ''; $private_msg_link = $o1 & 1024 ? '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=ppost&toi=' . $obj->user_id . '&' . _rsid . '"><img alt="Send a private message to this user" title="Send a private message to this user" src="/egroupware/fudforum/3814588639/theme/default/images/msg_pm.gif" /></a>' : ''; $dmsg_user_info = '<br /><b>Posts:</b> ' . $obj->posted_msg_count . '<br /> <b>Registered:</b> ' . strftime("%B %Y", $obj->join_date) . ' ' . $location; } else { $user_profile = $email_link = $private_msg_link = ''; $dmsg_user_info = $host_name || $ip_address ? '' : ''; } /* little trick, this variable will only be avaliable if we have a next link leading to another page */ if (isset($next_page)) { $next_page = ' '; } $delete_link = $perms & 32 ? '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=mmod&del=' . $obj->id . '&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_delete.gif" /></a> ' : ''; if ($perms & 16 || _uid == $obj->poster_id && (!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['EDIT_TIME_LIMIT'] * 60)) { $edit_link = '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=post&msg_id=' . $obj->id . '&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_edit.gif" /></a> '; } else { $edit_link = ''; } if (!($obj->thread_opt & 1) || $perms & 4096) { $reply_link = '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=post&reply_to=' . $obj->id . '&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_reply.gif" /></a> '; $quote_link = '<a class="GenLink" href="/egroupware/fudforum/3814588639/index.php?t=post&reply_to=' . $obj->id . '&quote=true&' . _rsid . '"><img alt="" src="/egroupware/fudforum/3814588639/theme/default/images/msg_quote.gif" /></a>'; } else { $reply_link = $quote_link = ''; } $message_toolbar = '<tr><td colspan="2" class="MsgToolBar"><table border=0 cellspacing=0 cellpadding=0 width="100%"><tr> <td nowrap align="left">' . $user_profile . ' ' . $email_link . ' ' . $private_msg_link . '</td> <td width="100%" align="center" class="GenText">' . $next_page . '</td> <td nowrap align="right">' . $delete_link . $edit_link . $reply_link . $quote_link . '</td> </tr></table></td></tr>'; } else { $host_name = $ip_address = $dmsg_user_info = $msg_icon = $signature = $report_to_mod_link = $message_toolbar = ''; } return '<tr><td class="MsgSpacer"><table cellspacing=0 cellpadding=0 class="MsgTable"> <tr> <td valign="top" align="left" class="MsgR1"><font class="MsgSubText"><a name="msg_num_' . $m_num . '"></a><a name="msg_' . $obj->id . '"></a>' . $msg_icon . $obj->subject . $rpl . '</font></td> <td valign="top" align="right" class="MsgR1"><font class="DateText">' . strftime("%a, %d %B %Y %H:%M", $obj->post_stamp) . '</font> ' . $prev_message . $next_message . '</td> </tr> <tr class="MsgR2"><td class="MsgR2" colspan=2><table border="0" cellspacing="0" cellpadding="0" class="ContentTable"> <tr class="MsgR2"> ' . $avatar . ' <td class="msgud">' . $online_indicator . $user_link . $dmsg_user_info . '</td> <td class="msgud">' . $dmsg_tags . '</td> <td class="msgot">' . $dmsg_bd_il . $dmsg_im_row . $host_name . $ip_address . '</td> </tr></table></td> </tr> <tr><td colspan="2" class="MsgR3"> ' . $poll . $msg_body . $drawmsg_file_attachments . ' ' . $modified_message . $signature . $report_to_mod_link . ' </td></tr> ' . $message_toolbar . ' </table></td></tr>'; }
$buddies = ''; if ($all) { $all_v = ''; $all_d = 'nessuno'; } else { $all_v = '1'; $all_d = 'tutti'; } $c = uq('SELECT u.alias FROM phpgw_fud_buddy b INNER JOIN phpgw_fud_users u ON b.bud_id=u.id WHERE b.user_id=' . _uid . ' AND b.user_id>1'); while ($r = db_rowarr($c)) { $checked = $all ? ' checked' : ''; $buddies .= '<tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td class="GenText">' . $r[0] . '</td><td align="center"><input type="checkbox" name="names[]" value="' . $r[0] . '"' . $checked . '></td></tr>'; } $qbud_data = $buddies ? '<tr><th width="100%">Nickname</th><th nowrap>Selezionato [<a class="thLnk" href="/egroupware/fudforum/3814588639/index.php?t=qbud&' . _rsid . '&all=' . $all_v . '">' . $all_d . '</a>]</th></tr> ' . $buddies . ' <tr class="' . alt_var('search_alt', 'RowStyleA', 'RowStyleB') . '"><td colspan=2 class="GenText" align="right"><input type="submit" class="button" name="submit" value="Aggiungi selezionato/i"></td></tr>' : '<tr class="RowStyleA"><td class="GenText" align="center">Nessun buddy</td></tr>'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-15"> <title><?php echo $GLOBALS['FORUM_TITLE'] . $TITLE_EXTRA; ?> </title> <script language="JavaScript" src="<?php echo $GLOBALS['WWW_ROOT']; ?> /lib.js" type="text/javascript"></script> <link rel="StyleSheet" href="/egroupware/fudforum/3814588639/theme/italian/forum.css" type="text/css"> </head>