function updaterDisplay($items)
{
    $ext = installedExtensions::getInstance();
    ?>
  <table class="adminlist">
    <thead>
      <tr>
        <th width="10"> # </th>
        <th width="10">&nbsp;</th>
        <th width="*">
          <?php 
    echo JText::_('Program');
    ?>
        </th>
        <th width = "90">
          <?php 
    echo JText::_('Release Date');
    ?>
        </th>
        <th width = "90">
          <?php 
    echo JText::_('Latest Version');
    ?>
        </th>
        <th width = "90">
          <?php 
    echo JText::_('Your Version');
    ?>
        </th>
        <th width = "90">
          <?php 
    echo JText::_('Compatibility');
    ?>
        </th>
        <th width = "90">
          <?php 
    echo JText::_('Stability');
    ?>
        </th>
        <th width = "100">
          <?php 
    echo JText::_('Action');
    ?>
        </th>
<!--        
        <th width = "50">
          <?php 
    echo JText::_('');
    ?>
-->          
        </th> 
      </tr>
    </thead>
    <tfoot>
      <tr width="100%">
        <td colspan="10">&nbsp;
          <?php 
    /*    
      <del class="container"><div class="pagination">
      <?php print $pager->getListFooter(); ?>
      </div></del>
    */
    ?>
  
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php 
    $i = 0;
    foreach ($items as $row) {
        $package = $row->sku;
        $pkg = $row;
        $i++;
        $k = $i % 2;
        // TODO: class could be based on status
        ?>
        <tr class="<?php 
        echo "row{$k}";
        ?>
">
          <td><?php 
        echo $i;
        ?>
</td>
          <td><input type="checkbox" name="packages[]" value="<?php 
        echo $package;
        ?>
"></td>
          <td>
            <a href="index.php?option=com_updater&task=details&package=<?php 
        echo $package;
        ?>
"><?php 
        echo $row->title;
        ?>
</a> <!-- ( <?php 
        echo $row->jname;
        ?>
) --> 
          </td>
          <td align="center">
            <?php 
        echo $row->releasedate;
        ?>
          </td>
          <td align="center">
            <?php 
        echo $row->version;
        ?>
          </td>
          <td align="center">
            <?php 
        echo $ext->getVersion($row->jname);
        ?>
          </td>
          <td align="center">
            <?php 
        $compat = explode(',', $row->compatibility);
        // new for 1.2
        foreach ($compat as $c) {
            switch ($c) {
                case 'j15native':
                    echo "<img src='components/com_updater/images/compat_15_native.png'><br>";
                    break;
                case 'j15legacy':
                    echo "<img src='components/com_updater/images/compat_15_legacy.png'><br>";
                    break;
            }
        }
        ?>
          </td>
          <td align="center">   
            <?php 
        echo $row->getStabilityHTML();
        ?>
          </td>
          <td align="center">
            <?php 
        include 'action.partial.html.php';
        ?>
          </td>
<!--          
          <td align="center"><a href="http://www.intellispire.com/web/index.php?option=com_chronocontact&chronoformname=newswversion&packageid=<?php 
        echo $package;
        ?>
"
              target=_blank><img src='components/com_updater/images/16px-Crystal_Clear_action_find.png'
                title="Click here if you've spotted a newer version!" height="16" width="16"></a>
          </td>
-->          
        </tr>        

        <?php 
    }
    ?>
    </tbody>
  </table>

  <?php 
}
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @category     ISN
 * @package      Joomla Client
 * @author       Nick Temple <*****@*****.**>
 * @license      GNU/GPL 2.0 http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * @copyright    2008 Intellispire/Nick Temple
 * @version SVN: $Id: action.partial.html.php 162 2010-04-07 04:22:50Z ntemple $
 *
 */
defined('_JEXEC') or die('Restricted access');
// Assumes isnid1 (username) is available
global $isnid1, $machineid;
// Assumes $pkg instance of softwarePackage
// Assumes $ext available for version
$ext = installedExtensions::getInstance();
// Assumes $isPro is true if this is "pro"
$jname = $pkg->jname;
$myversion = $pkg->version;
$currentversion = $ext->getVersion($jname);
$action = PKG_INSTALLABLE;
// $this->_is_updateable($package);
if ($currentversion && version_compare($myversion, $currentversion, '>')) {
    $action = PKG_UPDATEAVAILABLE;
}
if ($currentversion && $myversion == $currentversion) {
    $action = PKG_NOACTION;
}
if (!defined('_JLEGACY') && $pkg->requires('j15legacy')) {
    $action = PKG_NOCOMPAT;
}
示例#3
0
 /**
  * singleton
  * @return installedExtensions 
  */
 static function getInstance()
 {
     static $self = null;
     if ($self) {
         return $self;
     }
     $self = new installedExtensions();
     if (file_exists(SOFTWAREINSTALLEDSTACHE)) {
         $self->versions = unserialize(file_get_contents(SOFTWAREINSTALLEDSTACHE));
     } else {
         $self->load();
     }
     //    print "<pre>\n";
     //    print_r($self->versions);
     //    print "<pre>\n";
     return $self;
 }