Esempio n. 1
0
/**
 * Show a summary of the used images
 * 
 * @return void
 */
function ngg_overview_right_now()
{
    global $wpdb;
    $images = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggpictures}"));
    $galleries = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggallery}"));
    $albums = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggalbum}"));
    ?>
<div class="table table_content">
	<p class="sub"><?php 
    _e('At a Glance', 'nggallery');
    ?>
</p>
	<table>
		<tbody>
			<tr class="first">
				<td class="first b"><a href="admin.php?page=nggallery-add-gallery"><?php 
    echo $images;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=nggallery-add-gallery"><?php 
    echo _n('Image', 'Images', $images, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-gallery"><?php 
    echo $galleries;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=nggallery-manage-gallery"><?php 
    echo _n('Gallery', 'Galleries', $galleries, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-album"><?php 
    echo $albums;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=nggallery-manage-album"><?php 
    echo _n('Album', 'Albums', $albums, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
		</tbody>
	</table>
</div>
<div class="versions" style="padding-top:14px">
    <p>
	<?php 
    if (current_user_can('NextGEN Upload images')) {
        ?>
<a class="button rbutton" href="admin.php?page=nggallery-add-gallery"><?php 
        _e('Upload pictures', 'nggallery');
        ?>
</a><?php 
    }
    ?>
	<?php 
    _e('Here you can control your images, galleries and albums.', 'nggallery');
    ?>
	</p>
<br class="clear" />
</div>    
<?php 
    if (is_multisite()) {
        ngg_dashboard_quota();
    }
}
Esempio n. 2
0
/**
 * Show a summary of the used images
 *
 * @return void
 */
function ngg_overview_right_now()
{
    global $wpdb;
    $images = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggpictures}"));
    $galleries = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggallery}"));
    $albums = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggalbum}"));
    ?>
<style type='text/css'>
    #ngg_overview_right_now p {
        padding: 0 0 6px 10px;
        margin: 0;
    }
    #ngg_overview_right_now table {
        margin-left: 10px;
    }
    #ngg_overview_right_now td {
        padding: 4px;
    }
    #ngg_overview_right_now td:first-child {
        font-size: 16px;
    }
</style>
<div class="table table_content" id='ngg_overview_right_now'>
	<p><?php 
    _e('At a Glance', 'nggallery');
    ?>
</p>
	<table>
		<tbody>
			<tr class="first">
				<td class="first b"><a href="admin.php?page=ngg_addgallery"><?php 
    echo $images;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=ngg_addgallery"><?php 
    echo _n('Image', 'Images', $images, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-gallery"><?php 
    echo $galleries;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=nggallery-manage-gallery"><?php 
    echo _n('Gallery', 'Galleries', $galleries, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-album"><?php 
    echo $albums;
    ?>
</a></td>
				<td class="t"><a href="admin.php?page=nggallery-manage-album"><?php 
    echo _n('Album', 'Albums', $albums, 'nggallery');
    ?>
</a></td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
		</tbody>
	</table>
</div>
<div class="versions" style="padding-top:14px">
    <br class="clear" />
</div>
<?php 
    if (is_multisite()) {
        ngg_dashboard_quota();
    }
}