Exemplo n.º 1
0
            }
        }
        document.getElementById('textconfig').style.width=(bodyWidth-50) + 'px';
        document.getElementById('textconfig').style.height=(bodyHeight-100) + 'px';
    }
//]]>
</script>
        <?php 
        break;
    case 'save':
        $config = @fopen('./config/config.inc.php', 'w');
        if ($config === FALSE) {
            message('error', 'Could not open config file for writing! Bad permissions?');
            break;
        }
        $s = get_cfg_string($_SESSION['configuration']);
        $r = fwrite($config, $s);
        if (!$r || $r != strlen($s)) {
            message('error', 'Could not write to config file! Not enough space?');
            break;
        } else {
            message('notice', 'Configuration saved to file config/config.inc.php in phpMyAdmin top level directory, copy it to top level one and delete directory config to use it.', 'File saved');
        }
        unset($r, $s);
        fclose($config);
        break;
    case 'load':
        if ($fail_dir) {
            message('error', 'Reading of configuration disabled because of permissions.');
            break;
        }
Exemplo n.º 2
0
            }
        }
        document.getElementById('textconfig').style.width=(bodyWidth-50) + 'px';
        document.getElementById('textconfig').style.height=(bodyHeight-100) + 'px';
    }
//]]>
</script>
        <?php 
        break;
    case 'save':
        $config = @fopen('./config/config.inc.php', 'w');
        if ($config === FALSE) {
            message('error', 'Could not open config file for writing! Bad permissions?');
            break;
        }
        $s = get_cfg_string($configuration);
        $r = fwrite($config, $s);
        if (!$r || $r != strlen($s)) {
            message('error', 'Could not write to config file! Not enough space?');
            break;
        } else {
            message('notice', 'Configuration saved to file config/config.inc.php in phpMyAdmin top level directory, copy it to top level one and delete directory config to use it.', 'File saved');
        }
        unset($r, $s);
        fclose($config);
        break;
    case 'load':
        if ($fail_dir) {
            message('error', 'Reading of configuration disabled because of permissions.');
            break;
        }