<?php
error_reporting(0);
header ("Content-type: text/html; charset=utf-8");
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
print "<html><head>\n";
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"./css.txt\">\n";
print "<title>jimm online</title>\n";
print "</head><body>\n";
print "<div class=\"in\"><div class =\"mig\"><img src=\"logo.png\" alt=\"\"><br>конструктор online</div></div>\n";
print "<div class=\"messin\">\n";
$fr=array_merge(glob("midlet/*.jar"),glob("midlet/*.jad"));
foreach ($fr as $file)
{if((time()- filectime($file)) > 3600)unlink ($file);}

if (empty($_GET['step']))
{
print "<ul><li><a href =\"./faq.php\">FAQ по JIMM (от an40us'a)</a>"."</li></ul>\n";
print "<b>"."Выбор модели телефона"."</b>\n";
print "<form  style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"2\">\n";
print "1.<input type = \"radio\" name = \"mobile\" value = \"1\">Motorola<br>\n";
print "2.<input type = \"radio\" name = \"mobile\" value = \"2\">Siemens x65-75<br>\n";
print "3.<input type = \"radio\" name = \"mobile\" value = \"3\">Sony Ericsson<br>\n";
print "4.<input type = \"radio\" name = \"mobile\" value = \"4\">Nokia<br>\n";
print "5.<input type = \"radio\" name = \"mobile\" value = \"5\">Samsung<br>\n";
print "6.<input type = \"radio\" name = \"mobile\" value = \"6\" checked = \"checked\">Остальные<br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"Дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"../?\">На главную</a>"."</li></ul>\n";
}

if (!empty($_GET['step']))
{
switch ($_GET['step'])
{
case "2" :
print "<b>"."Выбор иконок статуса"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"3\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "1.<input type = \"radio\" name = \"i\" value = \"1\" checked = \"checked\">ICQ5<br>\n";
print "<img src = \"./icons/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"i\" value = \"2\">QIP<br>\n";
print "<img src = \"./icons/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"i\" value = \"3\">&#169;DARK ANGEL<br>\n";
print "<img src = \"./icons/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"i\" value = \"4\">Ромашки<br>\n";
print "<img src = \"./icons/4.png\" alt=\"\"><br>\n";
print "5.<input type = \"radio\" name = \"i\" value = \"5\">&#169;DiMoN<br>\n";
print "<img src = \"./icons/5.png\" alt=\"\"><br>\n";
print "6.<input type = \"radio\" name = \"i\" value = \"6\">&#169;dust-bin200<br>\n";
print "<img src = \"./icons/6.png\" alt=\"\"><br>\n";
print "7.<input type = \"radio\" name = \"i\" value = \"7\">&#169;LAFA<br>\n";
print "<img src = \"./icons/7.png\" alt=\"\"><br>\n";
print "8.<input type = \"radio\" name = \"i\" value = \"8\">&#169;MaxON<br>\n";
print "<img src = \"./icons/8.png\" alt=\"\"><br>\n";
print "9.<input type = \"radio\" name = \"i\" value = \"9\">&#169;Космонаft<br>\n";
print "<img src = \"./icons/9.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;margin-bottom:0px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?mobile=".$_GET['mobile']."\">На шаг назад</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "3" :
print "<b>"."Выбор иконок X-статуса"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"4\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "1.<input type = \"radio\" name = \"x\" value = \"1\" checked = \"checked\">QIP<br>\n";
print "<img src = \"./xstatus/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"x\" value = \"2\">Miranda<br>\n";
print "<img src = \"./xstatus/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"x\" value = \"3\">&#169;Serega<br>\n";
print "<img src = \"./xstatus/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"x\" value = \"4\">&#169;Rx_G<br>\n";
print "<img src = \"./xstatus/4.png\" alt=\"\"><br>\n";
print "5.<input type = \"radio\" name = \"x\" value = \"5\">&#169;DiMoN<br>\n";
print "<img src = \"./xstatus/5.png\" alt=\"\"><br>\n";
print "6.<input type = \"radio\" name = \"x\" value = \"6\">&#169;LAFA<br>\n";
print "<img src = \"./xstatus/6.png\" alt=\"\"><br>\n";
print "7.<input type = \"radio\" name = \"x\" value = \"7\">&#169;Rx_G<br>\n";
print "<img src = \"./xstatus/7.png\" alt=\"\"><br>\n";
print "8.<input type = \"radio\" name = \"x\" value = \"8\">&#169;SkyFor<br>\n";
print "<img src = \"./xstatus/8.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=2&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "4" :
print "<b>"."Выбор иконок меню"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"5\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "1.<input type = \"radio\" name = \"m\" value = \"1\" checked = \"checked\">&#169;XaTTaB<br>\n";
print "<img src = \"./micons/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"m\" value = \"2\">&#169;Alek<br>\n";
print "<img src = \"./micons/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"m\" value = \"3\">&#169;Spider13<br>\n";
print "<img src = \"./micons/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"m\" value = \"4\">&#169;XaTTaB<br>\n";
print "<img src = \"./micons/4.png\" alt=\"\"><br>\n";
print "5.<input type = \"radio\" name = \"m\" value = \"5\">&#169;zeleboba<br>\n";
print "<img src = \"./micons/5.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=3&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "5" :
print "<b>"."Выбор иконок клиента"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"6\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "1.<input type = \"radio\" name = \"c\" value = \"1\" checked = \"checked\">(16 х 16)<br>\n";
print "<img src = \"./clicons/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"c\" value = \"2\">(16 х 16)<br>\n";
print "<img src = \"./clicons/2.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=4&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "6" :
print "<b>"."Выбор смайлов"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"7\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "1.<input type = \"radio\" name = \"s\" value = \"1\" checked = \"checked\">Jimm_Big<br>\n";
print "<img src = \"./smiles/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"s\" value = \"2\">Jimm_Small<br>\n";
print "<img src = \"./smiles/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"s\" value = \"3\">&#169;XaTTaB<br>\n";
print "<img src = \"./smiles/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"s\" value = \"4\">by PEREZ<br>\n";
print "<img src = \"./smiles/4.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=5&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "7" :
print "<b>"."Выбор лого"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"8\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "<input type = \"hidden\" name = \"s\" value = \"".$_GET['s']."\">\n";
print "1.<input type = \"radio\" name = \"l\" value = \"1\" checked = \"checked\">&#169;XaTTaB<br>\n";
print "<img src = \"./logo/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"l\" value = \"2\">ICQ<br>\n";
print "<img src = \"./logo/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"l\" value = \"3\">&#169;wapt<br>\n";
print "<img src = \"./logo/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"l\" value = \"4\">&#169;scandal.inc<br>\n";
print "<img src = \"./logo/4.png\" alt=\"\"><br>\n";
print "5.<input type = \"radio\" name = \"l\" value = \"5\">&#169;scandal.inc<br>\n";
print "<img src = \"./logo/5.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=6&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."&amp;s=".$_GET['s']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "8" :
print "<b>"."Выбор иконки программы"."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"9\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "<input type = \"hidden\" name = \"s\" value = \"".$_GET['s']."\">\n";
print "<input type = \"hidden\" name = \"l\" value = \"".$_GET['l']."\">\n";
print "1.<input type = \"radio\" name = \"ic\" value = \"1\" checked = \"checked\">ICQ<br>\n";
print "<img src = \"./icon/1.png\" alt=\"\"><br>\n";
print "2.<input type = \"radio\" name = \"ic\" value = \"2\">QIP<br>\n";
print "<img src = \"./icon/2.png\" alt=\"\"><br>\n";
print "3.<input type = \"radio\" name = \"ic\" value = \"3\">JIMM<br>\n";
print "<img src = \"./icon/3.png\" alt=\"\"><br>\n";
print "4.<input type = \"radio\" name = \"ic\" value = \"4\">icq<br>\n";
print "<img src = \"./icon/4.png\" alt=\"\"><br>\n";
print "5.<input type = \"radio\" name = \"ic\" value = \"5\">&#169;LAFA<br>\n";
print "<img src = \"./icon/5.png\" alt=\"\"><br>\n";
print "<input style = \"margin-top:5px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=7&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."&amp;s=".$_GET['s']."&amp;l=".$_GET['l']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "9" :
print "<b>"."Выбор звука \"online\""."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"10\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "<input type = \"hidden\" name = \"s\" value = \"".$_GET['s']."\">\n";
print "<input type = \"hidden\" name = \"l\" value = \"".$_GET['l']."\">\n";
print "<input type = \"hidden\" name = \"ic\" value = \"".$_GET['ic']."\">\n";
print "1.<input type = \"radio\" name = \"o\" value = \"1.mp3\" checked = \"checked\">\"Тук-тук-тук\" (MP3)<br>\n";
print "<a href = \"./sound/online/1.mp3\">Прослушать</a><br>\n";
print "2.<input type = \"radio\" name = \"o\" value = \"2.mp3\">\"VISTA\" (MP3)<br>\n";
print "<a href = \"./sound/online/2.mp3\">Прослушать</a><br>\n";
print "3.<input type = \"radio\" name = \"o\" value = \"3.mp3\">\"Масяня:...э,кто то притопал\" (MP3)<br>\n";
print "<a href = \"./sound/online/3.mp3\">Прослушать</a><br>\n";
print "4.<input type = \"radio\" name = \"o\" value = \"1.wav\">\"Тук-тук-тук\" (WAV)<br>\n";
print "<a href = \"./sound/online/1.wav\">Прослушать</a><br>\n";
print "5.<input type = \"radio\" name = \"o\" value = \"1.mid\">\"Тук-тук-тук\" (MIDI)<br>\n";
print "<a href = \"./sound/online/1.mid\">Прослушать</a><br>\n";
print "<input style = \"margin-top:4px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=8&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."&amp;s=".$_GET['s']."&amp;l=".$_GET['l']."&amp;ic=".$_GET['ic']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "10" :
print "<b>"."Выбор звука \"message\""."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"11\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "<input type = \"hidden\" name = \"s\" value = \"".$_GET['s']."\">\n";
print "<input type = \"hidden\" name = \"l\" value = \"".$_GET['l']."\">\n";
print "<input type = \"hidden\" name = \"ic\" value = \"".$_GET['ic']."\">\n";
print "<input type = \"hidden\" name = \"o\" value = \"".$_GET['o']."\">\n";
print "1.<input type = \"radio\" name = \"ms\" value = \"1.mp3\" checked = \"checked\">\"О-ах\" (MP3)<br>\n";
print "<a href = \"./sound/message/1.mp3\">Прослушать</a><br>\n";
print "2.<input type = \"radio\" name = \"ms\" value = \"2.mp3\">\"incomming message\" (MP3)<br>\n";
print "<a href = \"./sound/message/2.mp3\">Прослушать</a><br>\n";
print "3.<input type = \"radio\" name = \"ms\" value = \"1.wav\">\"О-ах\" (WAV)<br>\n";
print "<a href = \"./sound/message/1.wav\">Прослушать</a><br>\n";
print "4.<input type = \"radio\" name = \"ms\" value = \"1.mid\">\"О-ах\" (MIDI)<br>\n";
print "<a href = \"./sound/message/1.mid\">Прослушать</a><br>\n";
print "<input style = \"margin-top:4px;\" type = \"submit\" value = \"дальше &#187;&#187;\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=9&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."&amp;s=".$_GET['s']."&amp;l=".$_GET['l']."&amp;ic=".$_GET['ic']."&amp;o=".$_GET['o']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "11" :
print "<b>"."Выбор звука \"Typing\""."</b>\n";
print "<form style = \"margin-bottom:5px;\" action = \"./?\">\n";
print "<input type = \"hidden\" name = \"step\" value = \"make\">\n";
print "<input type = \"hidden\" name = \"mobile\" value = \"".$_GET['mobile']."\">\n";
print "<input type = \"hidden\" name = \"i\" value = \"".$_GET['i']."\">\n";
print "<input type = \"hidden\" name = \"x\" value = \"".$_GET['x']."\">\n";
print "<input type = \"hidden\" name = \"m\" value = \"".$_GET['m']."\">\n";
print "<input type = \"hidden\" name = \"c\" value = \"".$_GET['c']."\">\n";
print "<input type = \"hidden\" name = \"s\" value = \"".$_GET['s']."\">\n";
print "<input type = \"hidden\" name = \"l\" value = \"".$_GET['l']."\">\n";
print "<input type = \"hidden\" name = \"ic\" value = \"".$_GET['ic']."\">\n";
print "<input type = \"hidden\" name = \"o\" value = \"".$_GET['o']."\">\n";
print "<input type = \"hidden\" name = \"ms\" value = \"".$_GET['ms']."\">\n";
print "1.<input type = \"radio\" name = \"t\" value = \"1.mp3\" checked = \"checked\">\"Typing\" (MP3)<br>\n";
print "<a href = \"./sound/typing/1.mp3\">Прослушать</a><br>\n";
print "2.<input type = \"radio\" name = \"t\" value = \"1.wav\">\"Typing\" (wav)<br>\n";
print "<a href = \"./sound/typing/1.wav\">Прослушать</a><br>\n";
print "3.<input type = \"radio\" name = \"t\" value = \"1.mid\">\"Typing\" (MIDI)<br>\n";
print "<a href = \"./sound/typing/1.mid\">Прослушать</a><br>\n";
print "<input style = \"margin-top:4px;\" type = \"submit\" value = \"Создать JIMM!\">\n";
print "</form>\n";
print "<ul><li><a href = \"./?step=10&amp;mobile=".$_GET['mobile']."&amp;i=".$_GET['i']."&amp;x=".$_GET['x']."&amp;m=".$_GET['m']."&amp;c=".$_GET['c']."&amp;s=".$_GET['s']."&amp;l=".$_GET['l']."&amp;ic=".$_GET['ic']."&amp;o=".$_GET['o']."&amp;ms=".$_GET['ms']."\">На шаг назад</a></li>\n";
print "<li><a href = \"./?\">Начать сборку сначала</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;

case "make" :
if (isset($_GET['mobile'])){
switch ($_GET['mobile']){
case '1' : $mdir = 'moto/';
break;
default :  $mdir = 'all/';}}
else $mdir = 'all/';
if (isset($_GET['i'])){
if(file_exists('icons/'.$_GET['i'].'.png')){
copy('icons/'.$_GET['i'].'.png','sout/'.$mdir.'icons.png');
}else copy('icons/1.png','sout/'.$mdir.'icons.png');}
elseif (!isset($_GET['i'])){copy('icons/1.png','sout/'.$mdir.'icons.png');}
if (isset($_GET['x'])){
if(file_exists('xstatus/'.$_GET['x'].'.png')){
copy('xstatus/'.$_GET['x'].'.png','sout/'.$mdir.'xstatus.png');
}else copy('xstatus/1.png','sout/'.$mdir.'xstatus.png');}
elseif (!isset($_GET['x'])){copy('xstatus/1.png','sout/'.$mdir.'xstatus.png');}
if (isset($_GET['m'])){
if(file_exists('micons/'.$_GET['m'].'.png')){
copy('micons/'.$_GET['m'].'.png','sout/'.$mdir.'micons.png');
}else copy('micons/1.png','sout/'.$mdir.'micons.png');}
elseif (!isset($_GET['m'])){copy('micons/1.png','sout/'.$mdir.'micons.png');}
if (isset($_GET['c'])){
if(file_exists('clicons/'.$_GET['c'].'.png')){
copy('clicons/'.$_GET['c'].'.png','sout/'.$mdir.'clicons.png');
}else copy('clicons/1.png','sout/'.$mdir.'clicons.png');}
elseif (!isset($_GET['c'])){copy('clicons/1.png','sout/'.$mdir.'clicons.png');}
if (isset($_GET['s'])){if(file_exists('smiles/'.$_GET['s'].'.png')){
copy('smiles/'.$_GET['s'].'.png','sout/'.$mdir.'smiles.png');
copy('smiles/'.$_GET['s'].'.txt','sout/'.$mdir.'smiles.txt');}else {
copy('smiles/1.png','sout/'.$mdir.'smiles.png');
copy('smiles/1.txt','sout/'.$mdir.'smiles.txt');}}elseif (!isset($_GET['s'])){
copy('smiles/1.png','sout/'.$mdir.'smiles.png');
copy('smiles/1.txt','sout/'.$mdir.'smiles.txt');
}
if (isset($_GET['l'])){
if(file_exists('logo/'.$_GET['l'].'.png')){
copy('logo/'.$_GET['l'].'.png','sout/'.$mdir.'logo.png');
}else copy('logo/1.png','sout/'.$mdir.'logo.png');}
elseif (!isset($_GET['l'])){copy('logo/1.png','sout/'.$mdir.'logo.png');}
if (isset($_GET['ic'])){
if(file_exists('icon/'.$_GET['ic'].'.png')){
copy('icon/'.$_GET['ic'].'.png','sout/'.$mdir.'icon.png');
}else copy('icon/1.png','sout/'.$mdir.'icon.png');}
elseif (!isset($_GET['ic'])){copy('icon/1.png','sout/'.$mdir.'icon.png');}

if (isset($_GET['o']))
{
switch ($_GET['o']){
case '1.mp3' :copy ('sound/online/1.mp3','sout/'.$mdir.'online.mp3');$o_type = 'mp3';
break;
case '2.mp3' :copy ('sound/online/2.mp3','sout/'.$mdir.'online.mp3');$o_type = 'mp3';
break;
case '3.mp3' :copy ('sound/online/3.mp3','sout/'.$mdir.'online.mp3');$o_type = 'mp3';
break;
case '1.wav' :copy ('sound/online/1.wav','sout/'.$mdir.'online.wav');$o_type = 'wav';
break;
case '1.mid' :copy ('sound/online/1.mid','sout/'.$mdir.'online.mid');$o_type = 'mid';
break;
default : {copy ('sound/online/1.mp3','sout/'.$mdir.'online.mp3');$o_type = 'mp3';}
}}
else {copy ('sound/online/1.mp3','sout/'.$mdir.'online.mp3');$o_type = 'mp3';}

if (isset($_GET['ms']))
{
switch ($_GET['ms'])
{
case '1.mp3' :copy ('sound/message/1.mp3','sout/'.$mdir.'message.mp3');$ms_type = 'mp3';
break;
case '2.mp3' :copy ('sound/message/2.mp3','sout/'.$mdir.'message.mp3');$ms_type = 'mp3';
break;
case '1.wav' :copy ('sound/message/1.wav','sout/'.$mdir.'message.wav');$ms_type = 'wav';
break;
case '1.mid' :copy ('sound/message/1.mid','sout/'.$mdir.'message.mid'); $ms_type = 'mid';
break;
default : {copy ('sound/message/1.mp3','sout/'.$mdir.'message.mp3');$ms_type = 'mp3';}
}}
else {copy ('sound/message/1.mp3','sout/'.$mdir.'message.mp3');$ms_type = 'mp3';}

if (isset($_GET['t']))
{
switch ($_GET['t'])
{
case '1.mp3' :copy ('sound/typing/1.mp3','sout/'.$mdir.'typing.mp3');$t_type = 'mp3';
break;
case '1.wav' : copy ('sound/typing/1.wav','sout/'.$mdir.'typing.wav');$t_type = 'wav';
break;
case '1.mid' :copy ('sound/typing/1.mid','sout/'.$mdir.'typing.mid');$t_type = 'mid';
break;
default : {copy ('sound/typing/1.mp3','sout/'.$mdir.'typing.mp3');$t_type = 'mp3';}
}}
else {copy ('sound/typing/1.mp3','sout/'.$mdir.'typing.mp3');$t_type = 'mp3';}

require_once('pclzip.lib.php');
$rand = 'jimm'.rand(0000000001,9999999999).'.jar';
$rand_jad = str_replace('jar','jad',$rand);
$archive = new PclZip($rand);
$v_list = $archive->create('sout/'.$mdir,
PCLZIP_OPT_REMOVE_PATH, 'sout/'.$mdir);
copy ($rand,"midlet/$rand");
unlink ($rand);
unlink ('sout/'.$mdir.'icons.png');
unlink ('sout/'.$mdir.'xstatus.png');
unlink ('sout/'.$mdir.'micons.png');
unlink ('sout/'.$mdir.'clicons.png');
unlink ('sout/'.$mdir.'smiles.png');
unlink ('sout/'.$mdir.'smiles.txt');
unlink ('sout/'.$mdir.'logo.png');
unlink ('sout/'.$mdir.'icon.png');
unlink ('sout/'.$mdir.'online.'.$o_type);
unlink ('sout/'.$mdir.'message.'.$ms_type);
unlink ('sout/'.$mdir.'typing.'.$t_type);
$jad = new PclZip('midlet/'.$rand);
$a = $jad->extract(PCLZIP_OPT_BY_NAME,"META-INF/MANIFEST.MF", PCLZIP_OPT_EXTRACT_AS_STRING);
$a = str_replace("\n\n","\n",$a[0]['content']);
$a .= "MIDlet-Jar-Size: ".filesize('midlet/'.$rand)."\nMIDlet-Jar-URL: ".$rand."";
$jad_file = fopen ('midlet/'.$rand_jad ,'w');
fwrite ($jad_file,$a."\n");
fclose($jad_file);

print "Ссылки для скачивания:\n";
print "<ul><li><a href = \"./midlet/".$rand."\">http://".$_SERVER['HTTP_HOST'].'/midlet/'.$rand."</a></li>\n";
print "<li><a style =\"margin-bottom:3px;\" href = \"./midlet/".$rand_jad."\">http://".$_SERVER['HTTP_HOST'].'/midlet/'.$rand_jad."</a></li></ul>\n";
print "Ссылки для копирования:<br>\n";
print "<form action =\"\"><input style =\"margin-bottom:3px;\" type = \"text\" size = \"15\" value = "."http://".$_SERVER['HTTP_HOST'].'/jimm/midlet/'.$rand."><br>\n";
print "<input type = \"text\" size = \"15\" value = "."http://".$_SERVER['HTTP_HOST'].'/jimm/midlet/'.$rand_jad."></form>\n";
print "Ссылки будут доступны в течении 1 часа.\n" ;
print "<ul><li><a href = \"./?\">В раздел JIMM</a></li>\n";
print "<li><a href = \"../?\">На главную</a></li></ul>\n";
break;
default : print ':)';
}}
print "</div>\n";
print "<div class=\"in\">made by wapt</div>\n";
print "</body></html>";
?>