plugins/admin/Home.php
changeset 1215 ec7f8f6312bb
parent 1170 71cb87b7dc3f
child 1227 bdac73ed481e
equal deleted inserted replaced
1214:edd52b2933a4 1215:ec7f8f6312bb
   313       $db->free_result();
   313       $db->free_result();
   314     }
   314     }
   315   }
   315   }
   316   
   316   
   317   // Install date
   317   // Install date
       
   318   $site_age = floor((time() - $install_date) / 86400);
   318   $install_date_human = MemberlistFormatter::format_date($install_date);
   319   $install_date_human = MemberlistFormatter::format_date($install_date);
       
   320   if ( $site_age > 7 )
       
   321   {
       
   322     $install_date_human .= ' ' . $lang->get('acphome_stat_installdate_ago', array(
       
   323         'days' => number_format($site_age)
       
   324       ));
       
   325   }
   319   
   326   
   320   // Last upgrade
   327   // Last upgrade
   321   $q = $db->sql_query('SELECT time_id FROM ' . table_prefix . "logs WHERE log_type = 'security' AND action = 'upgrade_enano' ORDER BY time_id DESC LIMIT 1;");
   328   $q = $db->sql_query('SELECT time_id FROM ' . table_prefix . "logs WHERE log_type = 'security' AND action = 'upgrade_enano' ORDER BY time_id DESC LIMIT 1;");
   322   if ( !$q )
   329   if ( !$q )
   323     $db->_die();
   330     $db->_die();
   327     $last_upgrade = $lang->get('acphome_stat_lastupdate_never');
   334     $last_upgrade = $lang->get('acphome_stat_lastupdate_never');
   328   }
   335   }
   329   else
   336   else
   330   {
   337   {
   331     list($last_upgrade) = $db->fetchrow_num();
   338     list($last_upgrade) = $db->fetchrow_num();
       
   339     $ver_age = floor((time() - $last_upgrade) / 86400);
   332     $last_upgrade = MemberlistFormatter::format_date($last_upgrade);
   340     $last_upgrade = MemberlistFormatter::format_date($last_upgrade);
       
   341     if ( $ver_age > 7 )
       
   342     {
       
   343       $last_upgrade .= ' ' . $lang->get('acphome_stat_installdate_ago', array(
       
   344           'days' => number_format($ver_age)
       
   345         ));
       
   346     }
   333   }
   347   }
   334   $db->free_result();
   348   $db->free_result();
   335   
   349   
   336   ?>
   350   ?>
   337   <div class="tblholder">
   351   <div class="tblholder">