Ejemplo n.º 1
0
		<a href="<?php 
    echo $base_config['baseurl'];
    ?>
/posts/<?php 
    echo $cur_post['id'];
    ?>
"><?php 
    echo user_date($cur_post['posted']);
    ?>
</a><?php 
    // Show edit timestamp if available
    if ($cur_post['last_edited'] != null) {
        echo ' - <span style="cursor: default;" title="' . translate('lastedited', htmlspecialchars($cur_post['last_edited_by']), user_date($cur_post['last_edited'])) . '">' . translate('edited') . '</span>';
    }
    if ($cur_post['deleted']) {
        echo '<br />' . translate('deletedbyon', translate('post'), htmlspecialchars($cur_post['deleted_by']), user_date($cur_post['deleted']));
    }
    ?>
</h2>
		<div class="cat_body<?php 
    if ($cur_post['deleted'] || $cur_topic['deleted']) {
        echo ' deleted_post';
    }
    ?>
">
			<div class="postleft">
				<p><?php 
    if ($futurebb_config['online_timeout'] > 0) {
        if ($cur_post['last_page_load'] > time() - $futurebb_config['online_timeout']) {
            echo '<img class="svgimg" src="' . $base_config['baseurl'] . '/static/img/status/online.png" height="10" alt="online" title="Online" />';
        } else {
Ejemplo n.º 2
0
    //first, just get users
    echo '<h4>' . translate('recentactivity') . '</h4>';
    if (!empty($regs)) {
        echo '<h5>' . translate('userregs') . '</h5>';
        echo '<ul>';
        foreach ($regs as $val) {
            echo '<li><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($val['username']) . '">' . htmlspecialchars($val['username']) . '</a></li>';
        }
        echo '</ul>';
    }
    if (!empty($posts)) {
        echo '<h5>' . translate('posts') . '</h5>';
        echo '<table border="0">';
        echo '<tr><th>' . translate('topic') . '</th><th>' . translate('time') . '</th><th>' . translate('user') . '</th></tr>';
        foreach ($posts as $val) {
            echo '<tr><td><a href="' . $base_config['baseurl'] . '/posts/' . $val['id'] . '">' . htmlspecialchars($val['subject']) . '</a></td><td>' . user_date($val['posted']) . '</td><td><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($val['poster']) . '">' . htmlspecialchars($val['poster']) . '</a></td></tr>';
        }
        echo '</table>';
    }
} else {
    if ($dirs[3] == '') {
        ?>
			<form action="<?php 
        echo $base_config['baseurl'];
        ?>
/admin/ip_tracker" method="get" enctype="multipart/form-data">
				<h3><?php 
        echo translate('iptracker');
        ?>
</h3>
				<p><?php 
Ejemplo n.º 3
0
echo translate('pages');
echo paginate('<a href="' . $base_config['baseurl'] . '/embed?tid=' . $tid . '&amp;page=$page$" $bold$>$page$</a>', $page, ceil($num_posts / $futurebb_config['posts_per_page']));
?>
</p>
            <?php 
//get all of the posts
$result = $db->query('SELECT p.id,p.parsed_content,p.posted,p.poster_ip,p.last_edited,u.username AS author,u.id AS author_id,u.parsed_signature AS signature,u.last_page_load,u.num_posts,u.avatar_extension,g.g_title AS user_title,leu.username AS last_edited_by FROM `#^posts` AS p LEFT JOIN `#^users` AS u ON u.id=p.poster LEFT JOIN `#^user_groups` AS g ON g.g_id=u.group_id LEFT JOIN `#^users` AS leu ON leu.id=p.last_edited_by WHERE p.topic_id=' . $cur_topic['id'] . ' AND p.deleted IS NULL ORDER BY p.posted ASC LIMIT ' . ($page - 1) * intval($futurebb_config['posts_per_page']) . ',' . intval($futurebb_config['posts_per_page'])) or error('Failed to get posts', __FILE__, __LINE__, $db->error());
while ($cur_post = $db->fetch_assoc($result)) {
    ?>
                <div class="catwrap" id="post<?php 
    echo $cur_post['id'];
    ?>
">
                    <h2 class="cat_header">
                    <?php 
    echo '<span class="floatright"><a href="' . $base_config['baseurl'] . '/posts/' . $cur_post['id'] . '">' . user_date($cur_post['posted']) . '</a></span><span style="display:none">: </span>';
    ?>
                    <?php 
    if ($futurebb_config['avatars'] && file_exists(FORUM_ROOT . '/static/avatars/' . $cur_post['author_id'] . '.' . $cur_post['avatar_extension'])) {
        echo '<img src="' . $base_config['baseurl'] . '/static/avatars/' . $cur_post['author_id'] . '.' . $cur_post['avatar_extension'] . '" alt="user avatar" class="avatar" />';
    }
    ?>
 <span class="username"><a href="<?php 
    echo $base_config['baseurl'];
    ?>
/users/<?php 
    echo htmlspecialchars($cur_post['author']);
    ?>
" target="_BLANK" title="<?php 
    echo $cur_post['user_title'];
    ?>
Ejemplo n.º 4
0
?>
.<?php 
if ($futurebb_config['turn_on_maint']) {
    echo ' ' . translate('maintschedpanel', user_date($futurebb_config['turn_on_maint']));
}
?>
</p>
		<p><?php 
echo translate('autodeactivatemaint');
?>
 <input type="text" name="config[turn_off_maint]" size="5" /> <?php 
echo strtolower(translate('minutes'));
?>
.<?php 
if ($futurebb_config['turn_off_maint']) {
    echo ' ' . translate('maintoffschedpanel', user_date($futurebb_config['turn_off_maint']));
}
?>
</p>
		
		<p><input name="form_sent" type="submit" value="<?php 
echo translate('save');
?>
" /></p>
		</form>
		<h3><?php 
echo translate('serverinfo');
?>
</h3>
		<table border="0">
			<tr>
Ejemplo n.º 5
0
			<th>Old value</th>
			<th>New value</th>
		</tr>
		<?php 
    $field_edit_final_list = array();
    foreach ($field_edits as $field => $field_entry) {
        for ($i = 0; $i < sizeof($field_entry); $i++) {
            $field_edit_final_list[] = $field_entry[$i];
        }
    }
    usort($field_edit_final_list, 'pagediff');
    foreach ($field_edit_final_list as $entry) {
        if (in_array($entry['field'], array('mod_pages', 'admin_pages'))) {
            diff($entry, $old_disp, $new_disp);
            $old = implode('<br />', $old_disp);
            $new = implode('<br />', $new_disp);
        } else {
            $old = htmlspecialchars($entry['old_value']);
            $new = htmlspecialchars($entry['new_value']);
        }
        echo '<tr><td>' . $entry['field'] . '</td><td>' . htmlspecialchars($entry['username']) . '</td><td>' . user_date($entry['time']) . '</td><td><pre>' . $old . '</pre></td><td><pre>' . $new . '</pre></td></tr>';
    }
    ?>
	</table>
<?php 
}
?>
</div>
<?php 
$q = new DBDelete('interface_history', 'time<' . (time() - 60 * 60 * 24 * 60), 'Failed to delete old history items');
$q->commit();
Ejemplo n.º 6
0
            }
            break;
        case 'notification':
            if ($entry['read_time'] == 0) {
                echo '<img src="' . $base_config['baseurl'] . '/static/img/msgu_notif.png" alt="notification" width="22" />';
            } else {
                echo '<img src="' . $base_config['baseurl'] . '/static/img/msg_notif.png" alt="notification" width="22" />';
            }
            break;
        default:
            echo '<img src="' . $base_config['baseurl'] . '/static/img/msg_msg.png" alt="message" width="22" />';
    }
    echo '</td><td>';
    echo $entry['contents'];
    echo '</td>';
    echo '<td style="width: 140px;">' . user_date($entry['send_time']) . '</td>';
    echo '<td style="width: 120px;"><a href="' . $base_config['baseurl'] . '/report/message/' . $entry['id'] . '">';
    if ($entry['type'] == 'warning') {
        echo translate('send_appeal');
    } else {
        echo translate('report_abuse');
    }
    if ($entry['type'] == 'msg') {
        echo '<br /><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($entry['sender']) . '/pm_reply?id=' . $entry['id'] . '">' . translate('reply') . '</a>';
    }
    echo '</a></td>';
    echo '</tr>';
}
// Set all notifications to read
$db->query('UPDATE `#^notifications` SET read_time = ' . time() . ', read_ip = \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\' WHERE user = '******'id'] . ' AND read_time = 0');
?>
?>
<h2><?php 
echo $user == $futurebb_user['id'] ? 'My' : $username . '&apos;s';
?>
 images</h2>
<?php 
$result = $db->query('SELECT 1 FROM `#^userimages` WHERE user='******'Failed to get recent images', true);
$num_images = $db->num_rows($result);
$result = $db->query('SELECT id,extension,time,filename,ip_addr FROM `#^userimages` WHERE user='******' ORDER BY time DESC LIMIT ' . 20 * ($page - 1) . ',20') or enhanced_error('Failed to get recent images', true);
if ($db->num_rows($result)) {
    echo '<p>Pages: ' . paginate('<a href="' . $base_config['baseurl'] . '/' . htmlspecialchars($dirs[1]) . '?page=$page$"$bold$>$page$</a>', $page, ceil($num_images / 20)) . '</p>';
    echo '<table border="0px">';
    echo '<tr><th>Image</th><th>Time</th><th>Code</th>';
    if ($futurebb_user['g_admin_privs'] || $futurebb_user['g_mod_privs'] && $futurebb_user['g_mod_view_ip']) {
        echo '<th>IP address</th>';
    }
    echo '</tr>';
    while ($img = $db->fetch_assoc($result)) {
        echo '<tr>
			<td><img src="' . htmlspecialchars($base_config['baseurl']) . '/static/userimages/' . $img['id'] . '.' . $img['extension'] . '" alt="' . htmlspecialchars($img['filename']) . '" style="max-width:48px; max-height:48px" /></td>
			<td>' . user_date($img['time']) . '</td>';
        if ($futurebb_user['g_admin_privs'] || $futurebb_user['g_mod_privs'] && $futurebb_user['g_mod_view_ip']) {
            echo '<td><a href="' . $base_config['baseurl'] . '/admin/ip_tracker?ip=' . htmlspecialchars(rawurlencode($img['ip_addr'])) . '">' . htmlspecialchars($img['ip_addr']) . '</a></td>';
        }
        echo '<td><input type="text" readonly="readonly" value="[img]' . htmlspecialchars($base_config['baseurl']) . '/static/userimages/' . $img['id'] . '.' . $img['extension'] . '[/img]" size="50" /></td>
		</tr>';
    }
    echo '</table>';
} else {
    echo '<p>No images found!</p>';
}
Ejemplo n.º 8
0
             echo '<span class="notifications_count">#' . $cur_report['post_id'] . '</span> ';
             echo translate('user_mentioned_you', '<a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($parts[0]) . '">' . htmlspecialchars($parts[0]) . '</a>') . '<a href="' . $base_config['baseurl'] . '/posts/' . $cur_report['contents'] . '">' . htmlspecialchars($parts[1]) . '</a>';
             break;
         default:
             echo '<span class="notifications_count" style="font-size: 12px;>#' . $cur_report['post_id'] . '</span>';
             echo translate('couldnot_display_notif');
     }
     if ($cur_report['send_time'] != 0) {
         echo '<br /><em>' . translate('sent') . ' ' . user_date($cur_report['send_time']) . '</em>';
     }
     echo '</p><p>';
 }
 if ($cur_report['post_type'] == 'special') {
     echo translate('systemreportmsg');
 } else {
     echo translate('reportedby', '<a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($cur_report['reported_by']) . '">' . htmlspecialchars($cur_report['reported_by']) . '</a>', user_date($cur_report['time_reported'])) . '<br />' . translate('markedreadby', '<a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($cur_report['zapped_by']) . '">' . htmlspecialchars($cur_report['zapped_by']) . '</a>', user_date($cur_report['zapped'])) . '<br />' . translate('status') . ': <b>';
     switch ($cur_report['status']) {
         case 'unread':
             echo translate('pending');
             break;
         case 'review':
             echo translate('underreview');
             break;
         case 'reject':
             echo '<span style="color:#A00">' . translate('rejected') . '</span>';
             break;
         case 'accept':
             echo '<span style="color:#0A0">' . translate('accepted') . '</span>';
             break;
         case 'noresp':
             echo translate('noresp');
Ejemplo n.º 9
0
</td>
			<td><?php 
            echo $cur_topic['num_replies'];
            ?>
</td>
			<td><?php 
            if ($cur_topic['last_post'] != 0) {
                ?>
<a href="<?php 
                echo $base_config['baseurl'];
                ?>
/posts/<?php 
                echo $cur_topic['last_post_id'];
                ?>
"><?php 
                echo user_date($cur_topic['last_post']) . ' ' . translate('by') . ' ' . htmlspecialchars($cur_topic['last_post_author']);
                ?>
</a><?php 
            } else {
                echo translate('topicmoved');
            }
            ?>
</td>
		</tr>
		<?php 
        }
    }
    ?>
	</table>
	<?php 
} else {
Ejemplo n.º 10
0
    $page_title = translate('banned');
    $result = $db->query('SELECT * FROM `#^bans` WHERE (username=\'' . $db->escape($futurebb_user['username']) . '\' OR ip=\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\') AND (expires>' . time() . ' OR expires IS NULL)') or error('Failed to check for bans', __FILE__, __LINE__, $db->error());
    $cur_ban = $db->fetch_assoc($result);
    $ban_page_replaced = false;
    //this sets up for a hook, where the ban page can be replaced
    ExtensionConfig::run_hooks('ban_page', array('ban_info' => $cur_ban, 'type' => $ban_type));
    if (!$ban_page_replaced) {
        ?>
		<h2><?php 
        echo translate('banned');
        ?>
</h2>
		<p><?php 
        echo translate('bannedmsg1');
        if ($cur_ban['expires'] != null) {
            echo ' ' . translate('until') . ' ' . user_date($cur_ban['expires']);
        }
        ?>
. <?php 
        echo translate('bannedmsg2');
        ?>
<br /><b><?php 
        echo htmlspecialchars($cur_ban['message']);
        ?>
</b><br /><?php 
        echo translate('bannedmsg3', $futurebb_config['admin_email']);
        ?>
</p>
		<?php 
    }
} else {
Ejemplo n.º 11
0
                    <th><?php 
    echo translate('timezone');
    ?>
</th>
                    <td><?php 
    echo 'GMT' . ($cur_user['timezone'] >= 0 ? '+' : '') . $cur_user['timezone'];
    ?>
</td>
                </tr>
                <tr>
                    <th><?php 
    echo translate('dateregistered');
    ?>
</th>
                    <td><?php 
    echo user_date($cur_user['registered']);
    ?>
</td>
                </tr>
                <tr>
                	<th><?php 
    echo translate('signature');
    ?>
</th>
                    <td><?php 
    echo $cur_user['parsed_signature'];
    ?>
</td>
                </tr>
                <?php 
    if (file_exists(FORUM_ROOT . '/static/avatars/' . $cur_user['id'] . '.' . $cur_user['avatar_extension'])) {
" /></td>
				</tr>
				<tr>
					<th>Maximum size (KiB)</th>
					<td><input type="text" name="maxsize" value="<?php 
echo intval($futurebb_config['user_image_maxsize']);
?>
" /></td>
				</tr>
			</table>
			<p><input type="submit" name="form_sent" value="Save" /></p>
		</form>
		<h3>Recent images</h3>
		<?php 
$result = $db->query('SELECT 1 FROM `#^userimages`') or enhanced_error('Failed to get recent images', true);
$num_images = $db->num_rows($result);
$result = $db->query('SELECT i.id,i.extension,i.time,i.filename,i.ip_addr,i.user,u.username FROM `#^userimages` AS i LEFT JOIN `#^users` AS u ON u.id=i.user ORDER BY time DESC LIMIT 20') or enhanced_error('Failed to get recent images', true);
if ($db->num_rows($result)) {
    echo '<p>Pages: ' . paginate('<a href="' . $base_config['baseurl'] . '/' . htmlspecialchars($dirs[1]) . '?page=$page$"$bold$>$page$</a>', $page, ceil($num_images / 20)) . '</p>';
    echo '<table border="0px">';
    echo '<tr><th>Image</th><th>Uploader</th><th>IP address</th><th>Time</th><th>Code</th></tr>';
    while ($img = $db->fetch_assoc($result)) {
        echo '<tr><td><img src="' . htmlspecialchars($base_config['baseurl']) . '/static/userimages/' . $img['id'] . '.' . $img['extension'] . '" alt="' . htmlspecialchars($img['filename']) . '" style="max-width:48px; max-height:48px" /></td><td><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars(rawurlencode($img['username'])) . '">' . htmlspecialchars($img['username']) . '</a> (<a href="' . $base_config['baseurl'] . '/myimages?user='******'user'] . '">images</a>)</td><td><a href="' . $base_config['baseurl'] . '/admin/ip_tracker?ip=' . htmlspecialchars(rawurlencode($img['ip_addr'])) . '">' . htmlspecialchars($img['ip_addr']) . '</a></td><td>' . user_date($img['time']) . '</td><td><input type="text" readonly="readonly" value="[img]' . htmlspecialchars($base_config['baseurl']) . '/static/userimages/' . $img['id'] . '.' . $img['extension'] . '[/img]" size="50" /></td></tr>';
    }
    echo '</table>';
} else {
    echo '<p>No images found!</p>';
}
?>
	</div>
</div>
Ejemplo n.º 13
0
        echo translate('author');
        ?>
</th>
					<th><?php 
        echo translate('deletiontime');
        ?>
</th>
					<th><?php 
        echo translate('deletedby');
        ?>
</th>
				</tr>
			<?php 
        $result = $db->query('SELECT p.id,p.parsed_content,p.deleted,du.username AS deleted_by,t.url AS turl,f.url AS furl,t.subject,u.username AS poster FROM `#^posts` AS p LEFT JOIN `#^topics` AS t ON t.id=p.topic_id LEFT JOIN `#^forums` AS f ON f.id=t.forum_id LEFT JOIN `#^users` AS du ON du.id=p.deleted_by LEFT JOIN `#^users` AS u ON u.id=p.poster WHERE p.deleted IS NOT NULL ORDER BY p.deleted DESC LIMIT 10') or error('Failed to find recent deleted posts', __FILE__, __LINE__, $db->error());
        while ($cur_post = $db->fetch_assoc($result)) {
            echo '<tr>
					<td><a href="' . $base_config['baseurl'] . '/posts/' . $cur_post['id'] . '">#' . $cur_post['id'] . '</a></td>
					<td><a href="' . $base_config['baseurl'] . '/' . htmlspecialchars($cur_post['furl']) . '/' . htmlspecialchars($cur_post['turl']) . '">' . htmlspecialchars($cur_post['subject']) . '</a></td>
					<td><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($cur_post['poster']) . '">' . htmlspecialchars($cur_post['poster']) . '</a></td>
					<td>' . user_date($cur_post['deleted']) . '</td>
					<td><a href="' . $base_config['baseurl'] . '/users/' . htmlspecialchars($cur_post['deleted_by']) . '">' . htmlspecialchars($cur_post['deleted_by']) . '</a>
				</tr>';
        }
        ?>
			</table>
            <?php 
    }
}
?>
	</div>
</div>
Ejemplo n.º 14
0
							<td><?php 
        echo translate('message');
        ?>
</td>
							<td><?php 
        echo htmlspecialchars($cur_ban['message']);
        ?>
</td>
						</tr>
						<tr>
							<td><?php 
        echo translate('expires');
        ?>
</td>
							<td><?php 
        echo $cur_ban['expires'] == null ? translate('never') : user_date($cur_ban['expires']);
        ?>
</td>
						</tr>
					</table>
					<p><input type="submit" name="form_sent" value="<?php 
        echo translate('delete');
        ?>
" /> &bull; <a href="<?php 
        echo $base_config['baseurl'];
        ?>
/admin/bans"><?php 
        echo translate('jk');
        ?>
</a></p>
				</form>
Ejemplo n.º 15
0
        echo $line["image"];
        ?>
</td>
                                                                       
                                                                       <td align="center" class="txt" ><?php 
        echo $line["price"];
        ?>
</td>
                                                                       
                                                                       <td align="center" class="txt" ><?php 
        echo $line["added_by"];
        ?>
</td>
                                                                       
                                                                       <td align="center" class="txt" ><?php 
        echo user_date($line["added_date"]);
        ?>
</td>
                                                                       
                                                                       <td align="center" class="txt" ><?php 
        echo format_date_time($line["datetime"]);
        ?>
</td>
                                                                       
                                                                       <td align="center" class="txt" ><?php 
        echo $line["status"];
        ?>
</td>
                                                                        
                                                                       <td valign="middle" class="txt" align="center"><a href="products_addf.php?id=<?php 
        echo $line["id"];
Ejemplo n.º 16
0
            echo "selected='selected'";
        }
        ?>
><?php 
        echo $getResults[$column_show];
        ?>
</option>
                <?php 
    }
}
?>
                </select></td>
    </tr><tr class="oddRow">
                            <td class="bldTxt" align="right" width="25%">Added Date :</td>
                            <td align="left" width="75%" class="txt"> <input name="added_date" type="text" class="txtfld datepicker" id="added_date" value="<?php 
echo user_date($added_date);
?>
" size="20"></td>
    </tr><tr class="evenRow">
                            <td class="bldTxt" align="right" width="25%">Datetime :</td>
                            <td align="left" width="75%" class="txt"> <input name="datetime" type="text" class="txtfld datetimepicker" id="datetime" value="<?php 
echo format_date_time($datetime, 1);
?>
" size="30"></td>
    </tr><tr class="oddRow">
                            <td class="bldTxt" align="right" width="25%">Status :</td>
                            <td align="left" width="75%" class="txt"> <select name="status" class="txtfld" id="status">
                    <option value="1" <?php 
if ($status == 1) {
    echo "selected='selected'";
}
Ejemplo n.º 17
0
            if ($futurebb_user['id'] != 0 && $futurebb_user['last_visit'] < $cur_forum['last_post'] && $cur_forum['tracker_id'] == null) {
                $class[] = 'unread';
            }
            if ($cur_forum['archived']) {
                $class[] = 'archived';
            }
            if (!empty($class)) {
                echo ' class="' . implode(' ', $class) . '"';
            }
            echo '>' . htmlspecialchars($cur_forum['forum_name']) . '</a>';
            if ($cur_forum['archived']) {
                echo ' ' . translate('archived');
            }
            echo '<br />' . $cur_forum['description'] . '</div></td><td class="forum_number">' . $cur_forum['num_topics'] . '</td><td class="forum_number">' . $cur_forum['num_posts'] . '</td><td class="forum_last_post">';
            if ($cur_forum['last_post_id']) {
                echo '<a href="' . $base_config['baseurl'] . '/posts/' . $cur_forum['last_post_id'] . '">' . user_date($cur_forum['last_post']) . ' by ' . htmlspecialchars($cur_forum['last_poster']) . '</a>';
            } else {
                echo 'None';
            }
            echo '</td></tr>';
        }
    }
    echo '</tbody></table></div></div>';
    if ($futurebb_user['id'] != 0) {
        echo '<p class="alignright"><a href="?action=markread">' . translate('markallread') . '</a></p>';
    }
} else {
    echo '<p>' . translate('noforums') . '</p>';
}
?>
<div class="cat_wrap" id="users_online">
Ejemplo n.º 18
0
        echo '<img src="' . $base_config['baseurl'] . '/static/avatars/' . $futurebb_user['id'] . '.' . $futurebb_user['avatar_extension'] . '" width="36px" height="36px" alt="avatar" />';
    }
    echo '<strong>' . $futurebb_user['username'] . '</strong>
					</a>';
    //notification area
    if ($futurebb_user['g_mod_privs'] || $futurebb_user['g_admin_privs']) {
        $result = $db->query('SELECT 1 FROM `#^reports` WHERE zapped IS NULL AND status<>\'withdrawn\'') or error('Failed to check new reports', __FILE__, __LINE__, $db->error());
        if ($db->num_rows($result)) {
            echo '<a class="userbutton" href="' . $base_config['baseurl'] . '/admin/reports" title="' . translate('newreports') . '"><img src="' . $base_config['baseurl'] . '/static/img/alert16.png" alt="new reports" /><span class="notifications_count">' . $db->num_rows($result) . '</span></a>';
        }
    }
    if ($futurebb_config['maintenance'] && $futurebb_user['g_admin_privs']) {
        echo '<a class="userbutton" href="' . $base_config['baseurl'] . '/admin#maintenance" title="' . translate('maintenabled') . '"><img src="' . $base_config['baseurl'] . '/static/img/lock16.png" alt="maintenance" /></a>';
    }
    if ($futurebb_config['turn_on_maint'] && $futurebb_user['g_admin_privs']) {
        echo '<a class="userbutton" href="' . $base_config['baseurl'] . '/admin#maintenance" title="' . translate('maintsched', user_date($futurebb_config['turn_on_maint'])) . '"><img src="' . $base_config['baseurl'] . '/static/img/clock16.png" alt="scheduled maintenance" /></a>';
    }
    if ($futurebb_user['notifications_count'] > 0) {
        echo '<span id="notifications"><a class="userbutton" href="' . $base_config['baseurl'] . '/messages" onclick="showNotifs(); return false;" title="' . translate('unreadnotifications', $futurebb_user['notifications_count']) . '"><img src="' . $base_config['baseurl'] . '/static/img/message16.png" alt="unread notifications" />
						<span class="notifications_count">' . $futurebb_user['notifications_count'] . '</span></a>';
        echo '';
        echo '</span>';
    }
} else {
    // Not logged in, show login link
    echo '<a class="userbutton" style="font-weight: bold;" href="' . $base_config['baseurl'] . '/login">' . translate('login') . '</a>';
}
?>
			<h1><a href="<?php 
echo $base_config['baseurl'];
?>
Ejemplo n.º 19
0
        $order .= ' DESC';
    } else {
        $order .= ' ASC';
    }
} else {
    $order = 'u.username ASC';
}
$q = new DBSelect('users', array('u.username', 'u.num_posts', 'u.registered', 'g.g_title AS title'), ' u.id>0 AND u.username<>\'Guest\' ' . $sql . ($visible_groups == '' ? '' : ' AND u.group_id IN(' . $visible_groups . ')') . ' AND u.deleted=0', 'Failed to get users');
$q->table_as('u');
$join = new DBLeftJoin('user_groups', 'g', 'g.g_id=u.group_id');
$q->add_join($join);
$q->set_limit(($page - 1) * $per_page . ',' . $per_page);
$q->set_order($order);
$result = $q->commit();
unset($q);
while ($cur_user = $db->fetch_assoc($result)) {
    echo '<tr>
				<td><a href="' . $base_config['baseurl'] . '/users/' . rawurlencode(htmlspecialchars($cur_user['username'])) . '">' . htmlspecialchars($cur_user['username']) . '</a></td>
				<td>' . htmlspecialchars($cur_user['title']) . '</td>
				<td>' . $cur_user['num_posts'] . '</td>
				<td>' . user_date($cur_user['registered']) . '</td>
			</tr>';
}
?>
	</table>
</div>
<p><?php 
echo translate('pages');
echo paginate($linktext, $page, ceil($num_users / $per_page));
?>
</p>
Ejemplo n.º 20
0
<?php

if ($datetime && $datetime != '0000-00-00') {
    echo '<td class="datetime">';
    echo '<span class="nice-time">' . user_date($datetime, 'Y-m-d') . '</span>';
    echo '<small>' . user_date($datetime) . '</small>';
    echo '</td>';
} else {
    if (isset($nodata)) {
        echo '<td class="datetime no-data">' . $nodata . '</td>';
    } else {
        echo '<td class="datetime no-data">&mdash;</td>';
    }
}