remote) == 0){ ?>
">
remote as $data) { if(!isset($data['category']) || $data['category'] == '') { $data['category'] = 'Common'; } if(!array_key_exists($data['remote'], $marketplace)) { $marketplace[$data['remote']] = array(); } if(!array_key_exists($data['type'], $marketplace[$data['remote']])) { $marketplace[$data['remote']][$data['type']] = array(); } if(!array_key_exists($data['category'], $marketplace[$data['remote']][$data['type']])) { $marketplace[$data['remote']][$data['type']][$data['category']] = array(); } array_push($marketplace[$data['remote']][$data['type']][$data['category']], $data); } ksort($marketplace); $extLoaded = (extension_loaded('zip') && extension_loaded('openssl') && ini_get('allow_url_fopen') == 1); function sort_name($a, $b) { return strnatcmp($a['name'], $b['name']); } foreach($marketplace as $remote=>$markettype) { ksort($markettype); echo ''; foreach($markettype as $type=>$data) { ksort($data); if($_GET['type'] == 'undefined' || $_GET['type'] == $type) { foreach($data as $category=>$subdata) { usort($subdata, 'sort_name'); foreach($subdata as $addon){ if(isset($_GET['query']) && (strpos(strtolower(trim($addon['name'])), strtolower(trim($_GET['query']))) === false)) { continue; } echo ''; } } } } } ?>
'; if(!$remote) { echo get_i18n("Installed"); } else { echo get_i18n("Available"); } echo '
'; $left = 0; $right = 0; if(isset($addon['image']) && $addon['image'] != '') { echo '
'; $right = 160; } if(isset($addon['new'])) { echo '
'; $left = $left + 30; } echo ''; echo '
'.get_i18n(ucfirst(rtrim($type,'s'))).' - '.get_i18n(ucfirst($category)).' | '.$addon['author'].' | '.$addon['count'].' '.get_i18n("Users").'
'; echo '
'.$addon['description'].'
'; if(!$addon['remote']) { if(!isset($addon['update'])) { echo '
'.get_i18n("Latest Version").' v'.$addon['version'].'
'; } else { if($extLoaded && is_writable(BASE_PATH.'/'.$type.'/'.$addon['folder'])) { echo '
'; } else { echo '
'; } } if(is_writable(BASE_PATH.'/'.$type.'/'.$addon['folder'])) { echo '
'; } } else { if($extLoaded && is_writable(BASE_PATH.'/'.$type)) { echo '
'; } else { echo '
'; } } echo '
">