aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/admin_advices/main.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/admin_advices/main.inc.php')
-rw-r--r--plugins/admin_advices/main.inc.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php
index 5af0b8f9a..a17f5a658 100644
--- a/plugins/admin_advices/main.inc.php
+++ b/plugins/admin_advices/main.inc.php
@@ -1,5 +1,6 @@
<?php /*
Plugin Name: Admin Advices !
+Version: 1.0.0
Author: PhpWebGallery team
Description: Give you an advice on the administration page.
*/
@@ -35,6 +36,27 @@ function set_admin_advice()
'admin_advice' =>
PHPWG_ROOT_PATH.'/plugins/admin_advices/admin_advices.tpl')
);
+
+// Random Thumbnail
+ $query = '
+SELECT *
+ FROM '.IMAGES_TABLE.'
+ ORDER BY RAND(NOW())
+ LIMIT 0, 1
+;';
+ $result = pwg_query($query);
+ $row = mysql_fetch_assoc($result);
+ if ( is_array($row) )
+ {
+ $template->assign_block_vars(
+ 'thumbnail',
+ array(
+ 'IMAGE' => get_thumbnail_url($row),
+ 'IMAGE_ALT' => $row['file'],
+ 'IMAGE_TITLE' => $row['name'],
+ )
+ );
+ }
$advice_text = array_shift($adv);
$template->assign_vars(
array(