';
$list = glob('content/sound_typing/*.*');
$num = $i = 0;
foreach($list as $name)
{
$path = $name;
$ext = pathinfo($name);
$ext = $ext['extension'];
if($ext == 'txt') continue;
if(is_even($num)) echo '
'; else echo '
';
$i++;
$pathinfo = pathinfo($name);
$namepath = $pathinfo['dirname'].'/'.$pathinfo['filename'].'.txt';
$id = $pathinfo['filename'];
if(is_file($namepath)) $name = processing_name($namepath);
else $name = "Выбор $i";
echo $i.')
'.$name.' '.$ext.'';
echo '
Прослушать';
$num++;
}
echo '
на шаг назад';
break;
case 15: //Завершение сборки
echo 'Шаг 15-й
Завершение сборки:
';
$tmp = 'tmp/'.time();
mkdir($tmp);
if(is_file("content/autorization/{$w8}.png")) @copy("content/autorization/{$w8}.png",$tmp.'/auth.png');
if(is_file("content/statuses/{$w2}.png")) @copy("content/statuses/{$w2}.png",$tmp.'/icons.png');
if(is_file("content/x-statuses/{$w3}.png")) @copy("content/x-statuses/{$w3}.png",$tmp.'/xstatus.png');
if(is_file("content/clients/{$w5}.png")) @copy("content/clients/{$w5}.png",$tmp.'/clicons.png');
if(is_file("content/icon/{$w11}.png")) @copy("content/icon/{$w11}.png",$tmp.'/icon.png');
if(is_file("content/logo/{$w7}.png")) @copy("content/logo/{$w7}.png",$tmp.'/logo.png');
if(is_file("content/menu/{$w4}.png")) @copy("content/menu/{$w4}.png",$tmp.'/micons.png');
if(is_file("content/private_list/{$w9}.png")) @copy("content/private_list/{$w9}.png",$tmp.'/prlists.png');
if(is_file("content/private_statuses/{$w10}.png")) @copy("content/private_statuses/{$w10}.png",$tmp.'/pstatus.png');
if(is_file("content/smiles/{$w6}/animate.bin")) {
mkdir($tmp.'/smiles/');
$list = glob("content/smiles/{$w6}/*");
foreach($list as $file)
{
$name = pathinfo($file);
$name = $name['basename'];
if($name == 'smiles.txt') copy($file,$tmp.'/'.$name);
else {
copy($file,$tmp.'/smiles/'.$name);
}
}
}
else {
copy("content/smiles/{$w6}/1.png",$tmp.'/smiles.png');
copy("content/smiles/{$w6}/smiles.txt",$tmp.'/smiles.txt');
}
$sound = glob("content/sound_message/{$w13}.*");
if(@$sound[0]) {
$pathinfo = pathinfo($sound[0]);
copy($sound[0],$tmp.'/message.'.$pathinfo['extension']);
}
$sound = glob("content/sound_online/{$w12}.*");
if(@$sound[0]) {
$pathinfo = pathinfo($sound[0]);
copy($sound[0],$tmp.'/online.'.$pathinfo['extension']);
}
$sound = glob("content/sound_typing/{$w14}.*");
if(@$sound[0]) {
$pathinfo = pathinfo($sound[0]);
copy($sound[0],$tmp.'/typing.'.$pathinfo['extension']);
}
if(is_dir($tmp.'/smiles')) $smilelist = glob($tmp.'/smiles/*'); else $smilelist = false;
$filelist = glob($tmp.'/*.*');
require_once('pclzip.lib.php');
$dl = 'download/jimm_'.time().'.jar';
if(!copy("content/phone/{$w}.jar",$dl)) {
header("Location: index.php");
}
$zip = new PclZip($dl);
$zip->add($filelist,PCLZIP_OPT_REMOVE_PATH,$tmp);
if($smilelist) $zip->add($smilelist,PCLZIP_OPT_REMOVE_PATH,$tmp);
$c = file_get_contents('count.dat')+1;
$fp = fopen('count.dat','w');
fwrite($fp,$c);
fclose($fp);
echo 'Сборка успешно закончена.
Размер приложения: '.ceil(filesize($dl)/1024).'kb
'.$host.$dl.'';
$pathinfo = pathinfo($dl);
$jadname = $pathinfo['dirname'].'/'.$pathinfo['filename'].'.jad';
$jarname = $pathinfo['basename'];
echo '
'.$host.$jadname.'';
$zip = new PclZip($dl);
$a = $zip->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($dl)."\nMIDlet-Jar-URL: ".$jarname;
$fp = fopen($jadname,'w');
fwrite ($fp,$a."\n");
fclose($fp);
if($smilelist) {
foreach($smilelist as $delfile)
{
unlink($delfile);
}
rmdir($tmp.'/smiles');
}
foreach($filelist as $delfile)
{
unlink($delfile);
}
rmdir($tmp);
$list = glob('download/*.*');
foreach($list as $file)
{
$expl = explode('_',$file);
$expl = explode('.',$expl[1]);
$greattime = $expl[0]."\n";
if((time()-$greattime) > 3600) unlink($file);
}
break;
}
echo '
собрать зановона главную';
echo '