PDA

View Full Version : Admin Notes



michael_s
02-05-2008, 04:31 PM
Here is the long awaited admin-warning/reminder:

Open admin/includes/header.php

FIND:

if ($messageStack->size > 0) {


ADD ABOVE:

// START Admin-Notes Warning
$admin_notes_query = tep_db_query("select status, last_update from " . TABLE_ADMIN_NOTES);
$admin_notes = tep_db_num_rows($admin_notes_query);
while ($admin_notes = tep_db_fetch_array($admin_notes_query)) {

$today_time = time();
$notes_time = ($today_time - strtotime($admin_notes['last_update']) );

if ($admin_notes['status'] == 1) {
if ($notes_time > 1) {
$messageStack->add(WARNING_ADMIN_NOTES_TIME, 'warning');
}
}
if ($admin_notes['status'] == 2) {
$messageStack->add(WARNING_ADMIN_NOTES_IMPORTANT, 'warning');
}
}
// END Admin-Notes Warning


Open admin/includes/languages/english.php

FIND:

?>


ADD ABOVE:

define('WARNING_ADMIN_NOTES_TIME', 'Warning: A notice exceeded its reminder datetime! (click here) (http://www.your-domain.com/admin/admin_notes.php)');
define('WARNING_ADMIN_NOTES_IMPORTANT', 'Warning: A notice has marked important! (click here) (http://www.your-domain.com/admin/admin_notes.php)');


Thats it, have fun!


More... (http://addons.oscommerce.com/info/2599)