示例#1
0
{
    $component = "com_adagency";
    $xml_file = "adagency.xml";
    $version = '';
    $path = JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . $component . DS . $xml_file;
    if (file_exists($path)) {
        $data = implode("", file($path));
        $pos1 = strpos($data, "<version>");
        $pos2 = strpos($data, "</version>");
        $version = substr($data, $pos1 + strlen("<version>"), $pos2 - $pos1 - strlen("<version>"));
        return $version;
    } else {
        return "";
    }
}
$latest_version = getCurrentVersionData();
$installed_version = getLocalVersionString();
?>

<script language="javascript" type="text/javascript">
	function alertNotification(){
		document.getElementById("pub-not-content").className = "open";
	}
	
	jQuery(document).click(function(e){
		if ($(e.target).attr('id') != 'pub-dropdown-toggle' && $(e.target).attr('id') != 'icon-bell' && $(e.target).attr('id') != 'badge-important'){
			if(eval(document.getElementById("pub-not-content"))){
				document.getElementById("pub-not-content").className = "";
			}
		}
	})
示例#2
0
?>
" />
<table class="adminlist">
	<tr class="header">
		<th>#</th>
		<th>Component</th>
		<th>Installed Version</th>
		<th>Latest Version</th>
		<th>Change log</th>
		<th>Download</th>
	</tr>
	<?php 
$i = 1;
$row = 2;
foreach ($list_installed_components as $component => $xml_file) {
    $latest_version = getCurrentVersionData($component);
    $current_version = getLocalVersionString($component, $xml_file);
    $color = "green";
    $color_version = "black";
    if ($latest_version != $current_version) {
        $color = "red";
        $color_version = "red";
    }
    if ($row == "2") {
        $row = "1";
    } else {
        $row = "2";
    }
    $juri_root = JURI::root();
    $juri_root = str_replace("plugins/system/ijoomlaupdate/ijoomlaupdate/", "", $juri_root);
    echo "<tr class=\"row" . $row . "\">";