diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/admin_advices/main.inc.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php index 172cdf489..4e574424b 100644 --- a/plugins/admin_advices/main.inc.php +++ b/plugins/admin_advices/main.inc.php @@ -39,7 +39,7 @@ function set_admin_advice() // Random Thumbnail
$query = '
SELECT *
- FROM '.IMAGES_TABLE.'
+ FROM '.IMAGES_TABLE.'
ORDER BY RAND(NOW())
LIMIT 0, 1
;';
@@ -47,12 +47,28 @@ SELECT * $row = mysql_fetch_assoc($result);
if ( is_array($row) )
{
+ $url_modify = get_root_url().'admin.php?page=picture_modify'
+ .'&image_id='.$row['id'];
+ $url_check = get_themeconf('icon_dir').'/';
+ $url_uncheck = $url_check . 'uncheck';
+ $url_check .= 'check';
$template->assign_block_vars(
'thumbnail',
array(
'IMAGE' => get_thumbnail_url($row),
'IMAGE_ALT' => $row['file'],
'IMAGE_TITLE' => $row['name'],
+ 'METADATA' => (empty($row['date_metadata_update'])) ?
+ $url_uncheck : $url_check,
+ 'NAME' => (empty($row['name'])) ?
+ $url_uncheck : $url_check,
+ 'COMMENT' => (empty($row['comment'])) ?
+ $url_uncheck : $url_check,
+ 'AUTHOR' => (empty($row['author'])) ?
+ $url_uncheck : $url_check,
+ 'CREATE_DATE' => (empty($row['date_creation'])) ?
+ $url_uncheck : $url_check,
+ 'U_MODIFY' => $url_modify,
)
);
}
|