Example #1
0
 function run()
 {
     echo '<div class="oldBrowserAlert">Notice: Reason works with all browsers.  However, it will look and feel quite a lot nicer if you can use it with a modern, standards-based browser such as Internet Explorer 6+, Mozilla 1.5+, Firefox, Netscape 7, Safari, or Opera.</div>' . "\n";
     if (!HTTPS_AVAILABLE && reason_user_has_privs($this->admin_page->user_id, 'upgrade')) {
         echo '<div id="securityWarning">' . "\n";
         echo '<h3>Security Notice</h3>' . "\n";
         echo '<p>This instance of Reason is running <strong>without</strong> https/ssl. This means that credentials and other potentially sensitive information are being sent in the clear. To run Reason with greater security -- and to make this notice go away -- 1) make sure your server is set up to run https and 2) change the setting HTTPS_AVAILABLE to true in settings/package_settings.php.</p>' . "\n";
         echo '</div>' . "\n";
     }
     if ((!defined('REASON_DISABLE_AUTO_UPDATE_CHECK') || !REASON_DISABLE_AUTO_UPDATE_CHECK) && reason_user_has_privs($this->admin_page->user_id, 'upgrade')) {
         reason_include_once('classes/version_check.php');
         $vc = new reasonVersionCheck();
         $resp = $vc->check();
         switch ($resp['code']) {
             case 'version_out_of_date':
                 echo '<div class="versionUpdateNotice">' . htmlspecialchars($resp['message'], ENT_QUOTES);
                 if (!empty($resp['url'])) {
                     echo ' <a href="' . htmlspecialchars($resp['url'], ENT_QUOTES) . '">Link</a>';
                 }
                 echo '</div>' . "\n";
                 break;
             case 'no_version_provided':
             case 'version_not_recognized':
                 trigger_error('Error checking version: ' . $resp['message']);
                 break;
         }
     }
     if (reason_unique_name_exists('whats_new_in_reason_blurb')) {
         $intro = new entity(id_of('whats_new_in_reason_blurb'));
         echo "\n" . '<div id="whatsNew">' . "\n";
         echo '<h3>' . $intro->get_value('name') . '</h3>' . "\n";
         echo '<p><em>Updated ' . prettify_mysql_timestamp($intro->get_value('last_modified'), 'j F Y') . '</em></p>' . "\n";
         echo $intro->get_value('content');
         echo '</div>' . "\n";
     }
 }
Example #2
0
 function get_archive_name($id)
 {
     $edited_by_id = $this->history[$id]->get_value('last_edited_by');
     if (!empty($edited_by_id)) {
         $user = new entity($edited_by_id);
         if ($user->get_values()) {
             $name = $user->get_value('name');
         } else {
             $name = 'user id ' . $user->id();
         }
     } else {
         $name = '[unknown]';
     }
     if ($id == $this->current->id()) {
         return 'Current Version - ' . $name;
     } else {
         return prettify_mysql_timestamp($this->history[$id]->get_value('last_modified'), 'n/j/y, g:i a') . ' Version - ' . $name;
     }
 }
Example #3
0
 function show_item_field_timestamp($field, $value)
 {
     $this->show_item_default($field, prettify_mysql_timestamp($value, "M jS, Y, g:i a"));
 }
Example #4
0
 function _get_last_modified_date_html()
 {
     // munge date into a good looking format
     $date = $this->parent->cur_page->get_value('last_modified');
     // ask each module when the entities is contains were most recently modified
     foreach (array_keys($this->parent->_modules) as $key) {
         $temp = $this->parent->_modules[$key]->last_modified();
         // use the newer date
         if (!empty($temp) and $temp > $date) {
             $date = $temp;
         }
     }
     return prettify_mysql_timestamp($date, $this->last_mod_date_format);
 }