public static function checkHooks() { global $lC_Language; $list = ''; foreach (lC_Store_Admin::getInstalledAddons() as $key => $val) { $code = $val['code']; $title = $val['title']; $lC_DirectoryListing = new lC_DirectoryListing(DIR_FS_CATALOG . 'addons/' . $code . '/hooks'); $lC_DirectoryListing->setRecursive(true); $lC_DirectoryListing->setIncludeDirectories(false); $lC_DirectoryListing->setAddDirectoryToFilename(true); $lC_DirectoryListing->setStats(true); $lC_DirectoryListing->setCheckExtension('xml'); foreach ($lC_DirectoryListing->getFiles() as $file) { $status = self::_cacheFileExists($file['path'], 'catalog') == true ? $lC_Language->get('cached_file_exists') . '<span class="icon-tick icon-green icon-size2 margin-left"></span>' : $lC_Language->get('cached_file_not_exists') . '<span class="icon-cross icon-red icon-size2 margin-left"></span>'; $list .= '<li>' . $title . ' => hooks/' . $file['name'] . ' => ' . $status . '</li>'; } $lC_DirectoryListing = new lC_DirectoryListing(DIR_FS_CATALOG . 'addons/' . $code . '/admin/hooks'); $lC_DirectoryListing->setRecursive(true); $lC_DirectoryListing->setIncludeDirectories(false); $lC_DirectoryListing->setAddDirectoryToFilename(true); $lC_DirectoryListing->setStats(true); $lC_DirectoryListing->setCheckExtension('xml'); foreach ($lC_DirectoryListing->getFiles() as $file) { $status = self::_cacheFileExists($file['path']) == true ? $lC_Language->get('cached_file_exists') . '<span class="icon-tick icon-green icon-size2 margin-left"></span>' : $lC_Language->get('cached_file_not_exists') . '<span class="icon-cross icon-red icon-size2 margin-left"></span>'; $list .= '<li>' . $title . ' => admin/hooks/' . $file['name'] . ' => ' . $status . '</li>'; } } return $list; }
public static function installAddon() { $result = array(); $installed = lC_Store_Admin::install($_GET['name']); if ($installed) { $result['rpcStatus'] = RPC_STATUS_SUCCESS; } echo json_encode($result); }
*/ ?> </hgroup> <div id="addonsPanelContainer" class="with-padding"> <!-- main panel --> <div class="content-panel margin-bottom"> <!-- menu nav panel --> <div class="panel-navigation silver-gradient"> <div class="panel-control"><p align="center" class="big-text small-margin-left">Type</p></div> <div class="panel-load-target scrollable" style="height:450px"> <div class="navigable"> <ul class="unstyled-list open-on-panel-content"> <?php echo lC_Store_Admin::drawMenu(); ?> </ul> </div> </div> </div> <!-- content panel --> <div class="panel-content"> <div class="panel-control"> <p id="cfgTitle" align="center" class="big-text"><span id="cfgTitleText"></span> <a href="javascript:void(0);" onclick="_updateTitles();" class="button icon-undo float-right" style="margin-top:1px;"><?php echo $lC_Language->get('button_refresh'); ?> </a></p> </div>
public static function verifyProductsAreDownloaded($products) { $productsArr = explode('|', $products); $cnt = 0; foreach ($productsArr as $key => $product) { $parts = explode(':', $product); $type = $parts[0]; $item = $parts[1]; if ($type == 'template') { if (!file_exists(DIR_FS_ADMIN . 'includes/templates/' . $item . '.php')) { // get the template phar and apply it } } else { // addon if (!file_exists(DIR_FS_CATALOG . 'addons/' . $item . '/controller.php')) { // download the addon phar lC_Store_Admin::getAddonPhar($item); // apply the phar package if (file_exists(DIR_FS_WORK . 'addons/' . $item . '.phar')) { lC_Updates_Admin::applyPackage(DIR_FS_WORK . 'addons/' . $item . '.phar'); } } } $cnt++; } }
private static function _autoInstall($key) { global $lC_Database; $Qchk = $lC_Database->query("select id from :table_templates_boxes where modules_group LIKE '%" . $key . "%'"); $Qchk->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES); $Qchk->execute(); if ($Qchk->numberOfRows() > 0) { return false; } else { lC_Store_Admin::install($key); return true; } }