PackageErrorTheme() public method

NvUpdate::PackageErrorTheme()
public PackageErrorTheme ( )
Esempio n. 1
0
$nv_update_config['step'] = $nv_Request->get_int('step', 'get', 1);
if ($nv_update_config['step'] < 1 or !isset($nv_update_config['updatelog']['step']) or $nv_update_config['step'] > 3 or $nv_update_config['updatelog']['step'] < $nv_update_config['step'] - 1) {
    $nv_update_config['step'] = 1;
}
$NvUpdate = new NvUpdate($nv_update_config);
// Goi $site_mod neu cap nhat module
if (!empty($nv_update_config['formodule'])) {
    $site_mods = nv_site_mods();
}
// Trang chinh
$contents = '';
if ($nv_update_config['step'] == 1) {
    // Kiem tra phien ban va tuong thich du lieu
    if ($NvUpdate->check_package() === false) {
        // Kiem tra chuan goi cap nhat
        $contents = $NvUpdate->PackageErrorTheme();
    } else {
        $array = array();
        // Kiem tra ton tai module can nang cap neu kieu nang cap module
        if (!empty($nv_update_config['formodule'])) {
            $array['module_exist'] = false;
            foreach ($site_mods as $mod) {
                if ($mod['module_file'] == $nv_update_config['formodule']) {
                    $array['module_exist'] = true;
                    break;
                }
            }
            if ($array['module_exist']) {
                // Lay phien ban module
                $sth = $db->prepare('SELECT version FROM ' . $db_config['prefix'] . '_setup_extensions WHERE basename= :basename');
                $sth->bindParam(':basename', $nv_update_config['formodule'], PDO::PARAM_STR);