Advertisement
Advertisement
| 04.04.2008 at 02:52PM PDT, ID: 23297548 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: |
#!C:\Perl\bin\perl.exe
use File::Copy;
use File::DosGlob;
use Config::INI::Simple;
$cnt = 0;
$num = 1;
$cnt2 = 0;
my $ini = 'C:/ghost.ini';
open( INFILE, $ini);
@inLines = <INFILE>;
close( INFILE );
# Parse all MainMenu Items
foreach $line (@inLines)
{
@chars = split(//,$line);
if ($chars[0] eq "[")
{
$MainMenu[$cnt] = $line;
}
else
{
if($line eq "\n")
{
$trash = $line;
}
else
{
$Item[$cnt] = $line;
}
}
$cnt++;
}
# Build MainMenu now
foreach $I (@MainMenu)
{
@L = split(//,$I);
foreach $y (@L)
{
if($y eq "[" or $y eq "]")
{
$trash = $y;
$cnt2++;
}
else
{
$w[$cnt2] = $y;
$cnt2++;
}
}
}
# Write character array to file
open(INFO, ">C:/menu.tmp");
print INFO @w;
close(INFO);
# Build new Array for MainMenu
open(MENU, "<C:/menu.tmp");
@MAINMENU = <MENU>;
close(MENU);
system('cls');
# Display Menu
print "\n";
print "***** Welcome to the Leegin Ghost Server!! *****\n\n";
foreach $x (@MAINMENU)
{
print "\t" . $num . " " . $x;
$num++;
}
print "\n";
print "****************************************************\n";
print "Please select the brand. ";
$ans = <>;
# Done with menu
|