#!/usr/bin/php
<?php

/**
 * Gtk2_PHPConfig : Perform GUI based configuration of a php.ini file
 * 
 * @author Anant Narayanan <anant@php.net>
 */

require_once("Gtk2/PHPConfig.php");

switch ($argc) {
    case 1:
        $test = new Gtk2_PHPConfig(NULL);
        Gtk::main();
        break;
    case 2:
        if (file_exists($argv[1])) {
            echo "\nThe INI File is being parsed... Please be patient...\n";
            $test = new Gtk2_PHPConfig($argv[1]);
            Gtk::main();
            break;
        } else {
            echo "\nThe file does not exist!\n";
        }
    default:
        echo "\nUsage: gtk2_phponfig [INI File]\n";
        echo "Where [INI File] is an optional argument, and the name of the file you want to edit.";
        echo "\nIf no arguments are passed, a new INI file is created\n\n";
        exit();
}

?>
