} } exit('failed'); } if (!empty($_GPC['m'])) { $m = $_GPC['m']; $type = 'module'; $is_upgrade = intval($_GPC['is_upgrade']); $packet = cloud_m_build($_GPC['m']); } elseif (!empty($_GPC['t'])) { $m = $_GPC['t']; $type = 'theme'; $is_upgrade = intval($_GPC['is_upgrade']); $packet = cloud_t_build($_GPC['t']); } else { $packet = cloud_build(); } $modulename = "stonefish_planting"; load()->func('file'); mkdirs(IA_ROOT . "/addons/stonefish_planting"); mkdirs(IA_ROOT . "/addons/stonefish_planting/template"); mkdirs(IA_ROOT . "/addons/stonefish_planting/template/mobile"); $packet['files'][] = "/stonefish_planting/manifest.xml"; $packet['files'][] = "/stonefish_planting/site.php"; $packet['files'][] = "/stonefish_planting/module.php"; $packet['files'][] = "/stonefish_planting/processor.php"; $packet['files'][] = "/stonefish_planting/icon.jpg"; $packet['files'][] = "/stonefish_planting/preview.jpg"; $packet['files'][] = "/stonefish_planting/detail.jpg"; $packet['files'][] = "/stonefish_planting/install.php"; $packet['files'][] = "/stonefish_planting/uninstall.php";
* @url http://www.cninone.com/ */ defined('IN_IA') or exit('Access Denied'); set_time_limit(0); load()->model('cloud'); load()->func('communication'); load()->model('extension'); $r = cloud_prepare(); if (is_error($r)) { message($r['message'], url('cloud/profile'), 'error'); } $do = !empty($_GPC['do']) && in_array($do, array('module', 'system')) ? $_GPC['do'] : exit('Access Denied'); if ($do == 'system') { $lock = cache_load('checkupgrade:system'); if (empty($lock) || TIMESTAMP - 3600 > $lock['lastupdate']) { $upgrade = cloud_build(); if (!is_error($upgrade) && !empty($upgrade['upgrade'])) { $upgrade = array('version' => $upgrade['version'], 'release' => $upgrade['release'], 'upgrade' => 1, 'lastupdate' => TIMESTAMP); cache_write('checkupgrade:system', $upgrade); message($upgrade, '', 'ajax'); } else { $upgrade = array('lastupdate' => TIMESTAMP); cache_write('checkupgrade:system', $upgrade); } } else { message($lock, '', 'ajax'); } } elseif ($do == 'module') { $modulename = $_GPC['m']; $module = pdo_fetch("SELECT mid, name, version, title FROM " . tablename('modules') . " WHERE name = :name", array(':name' => $modulename)); if (!empty($module)) {