Вход Регистрация
Файл: loads/inc/files/them.php
Строк: 592
<?php

if (is_file($dir_loads '/' $file '.1.GIF')) {
    
} elseif (
is_file($dir_loads '/' $file '.1.JPG')) {
    
} elseif (
is_file($dir_loads '/' $file '.1.PNG')) {
    
} elseif (
is_file($dir_loads '/' $file '.1.JPEG')) {
    
} else {


    include_once 
'sys/classes/pclzip.class.php';
    
$zip = new PclZip($dir_loads '/' $file);
    
$content $zip->extract(PCLZIP_OPT_BY_NAME'theme_descriptor.xml'PCLZIP_OPT_EXTRACT_AS_STRING);
    
$theme_descriptor $content[0]['content'];

    
$p xml_parser_create();
    
xml_parse_into_struct($p$theme_descriptor$vals$index);
    
xml_parser_free($p);

    for (
$i 0$i count($vals); $i++) {
        if (
$vals[$i]['tag'] == 'THEME' && isset($vals[$i]['attributes']['VERSION'])) {
            
$ver $vals[$i]['attributes']['VERSION'];
        }


        if (
$vals[$i]['tag'] == 'THEME' && isset($vals[$i]['attributes']['NAME']) && $vals[$i]['attributes']['NAME'] != NULL) {
            
file_put_contents($dir_loads '/' $file '.name'$vals[$i]['attributes']['NAME']);
        }
    }

//echo "Версия: ".$ver."<br />n";

    
for ($i 0$i count($vals); $i++) {


        if (
$ver == '1.1' && $vals[$i]['tag'] == 'BACKGROUND' && isset($vals[$i]['attributes']['SRC'])) {
            
$back $vals[$i]['attributes']['SRC'];
        }
        if (
$ver == '2.0' && $vals[$i]['tag'] == 'BACKGROUND' && isset($vals[$i]['attributes']['GRID_MENU_BG'])) {
            
$back $vals[$i]['attributes']['GRID_MENU_BG'];
        }
    }



    if (isset(
$back)) {
//echo "BACKGROUND: ".$back."<br />n";

        
$content $zip->extract(PCLZIP_OPT_BY_NAME$backPCLZIP_OPT_EXTRACT_AS_STRING);
        
$back_img imagecreatefromstring($content[0]['content']);
        
$img imagecreatetruecolor(imagesx($back_img), imagesy($back_img));

        
imagecopy($img$back_img0000imagesx($back_img), imagesy($back_img));

        for (
$i 0$i count($vals); $i++) {
            if (
$ver == '1.1' && $vals[$i]['tag'] == 'ICON' && isset($vals[$i]['attributes']['SRC']) && $vals[$i]['attributes']['SIZE'] == 'small') {
                
$icon_id $vals[$i]['attributes']['ITEM_ID'];
                
$icon[$icon_id] = $vals[$i]['attributes']['SRC'];
            }
            if (
$ver == '2.0' && $vals[$i]['tag'] == 'MENU_ITEM' && isset($vals[$i]['attributes']['ITEM_ID']) && isset($vals[$i]['attributes']['LIST_VIEW_ICON'])) {
                
$icon_id $vals[$i]['attributes']['ITEM_ID'];
                
$icon[$icon_id] = $vals[$i]['attributes']['LIST_VIEW_ICON'];
            }
            if (
$ver == '2.0' && $vals[$i]['tag'] == 'HIGHLIGHT' && isset($vals[$i]['attributes']['ACTIVE_IDLE_SHORTCUT_BAR'])) {
                
$icon_back $vals[$i]['attributes']['ACTIVE_IDLE_SHORTCUT_BAR'];
            }
        }

        if (
$ver == '1.1') {
            
$v_ots 24;
            
$v_ots2 24;
            if (isset(
$icon_back)) {
                
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon_backPCLZIP_OPT_EXTRACT_AS_STRING);
                
$icon_back_img2 imagecreatefromstring($content[0]['content']);
                
$icon_back_img imagecreate(7474);
                
imagecopyresampled($icon_back_img$icon_back_img20000imagesx($icon_back_img), imagesy($icon_back_img), imagesx($icon_back_img2), imagesy($icon_back_img2));
                
imagecopy($img$icon_back_imgimagesx($img) / imagesx($icon_back_img) / 2imagesy($img) / imagesy($icon_back_img) / $v_ots00imagesx($icon_back_img), imagesy($icon_back_img));
            }

            if (isset(
$icon)) {
                if (isset(
$icon['messages'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['messages'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['contacts'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['contacts'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['callregister'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['callregister'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['settings'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['settings'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['gallery'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['gallery'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['media'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['media'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['organizer'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['organizer'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 1.500imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['push_to_talk'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['push_to_talk'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 1.500imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['applications'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['applications'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 1.500imagesx($icon_img), imagesy($icon_img));
                }
            }

            
$fon imagecreatefrompng("loads/inc/file/208.png");
            
imagecopy($img$fon0000imagesx($fon), imagesy($fon));

            
$black imagecolorallocate($img000);
            
imagettftext($img110imagesx($img) / 4215$black"/sys/fonts/tahoma.ttf""Сообщения");
            
imagettftext($img110imagesx($img) - 1116$black"/sys/fonts/tahoma.ttf""1");
            
imagettftext($img110imagesx($img) / 30imagesy($img) - 6$black"/sys/fonts/tahoma.ttf""Выбрать");
            
imagettftext($img110imagesx($img) - 48imagesy($img) - 6$black"/sys/fonts/tahoma.ttf""Выйти");
        }

        if (
$ver == '2.0') {
            
$v_ots 40;
            
$v_ots2 28;
            if (isset(
$icon_back)) {
                
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon_backPCLZIP_OPT_EXTRACT_AS_STRING);
                
$icon_back_img2 imagecreatefromstring($content[0]['content']);
                
$icon_back_img imagecreate(7474);
                
imagecopyresampled($icon_back_img$icon_back_img20000imagesx($icon_back_img), imagesy($icon_back_img), imagesx($icon_back_img2), imagesy($icon_back_img2));

                
imagecopy($img$icon_back_imgimagesx($img) / imagesx($icon_back_img) / 2imagesy($img) / imagesy($icon_back_img) / $v_ots00imagesx($icon_back_img), imagesy($icon_back_img));
            }




            if (isset(
$icon)) {
                if (isset(
$icon['messages'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['messages'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['contacts'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['contacts'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['callregister'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['callregister'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots00imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['settings'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['settings'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 400imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['gallery'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['gallery'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 400imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['media'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['media'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 400imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['organizer'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['organizer'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 200imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['push_to_talk'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['push_to_talk'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 200imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['applications'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['applications'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 200imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['simatk'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['simatk'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }

                if (isset(
$icon['services'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['services'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }


                if (isset(
$icon['default'])) {
                    
$content $zip->extract(PCLZIP_OPT_BY_NAME$icon['default'], PCLZIP_OPT_EXTRACT_AS_STRING);
                    
$icon_img imagecreate(4848);
                    
$icon_img2 imagecreatefromstring($content[0]['content']);
                    
imagecopyresampled($icon_img$icon_img20000imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
                    
imagecopy($img$icon_imgimagesx($img) - imagesx($img) / imagesx($icon_img) / 2imagesy($img) / imagesy($icon_img) / $v_ots + (imagesy($img) - $v_ots $v_ots2) / 300imagesx($icon_img), imagesy($icon_img));
                }
            }

            
$antenna imagecreatefromgif("loads/inc/file/antenna.gif");
            
imagecopy($img$antenna4400imagesx($antenna), imagesy($antenna));

            
$battery imagecreatefromgif("loads/inc/file/battery.gif");
            
imagecopy($img$battery30400imagesx($battery), imagesy($battery));

            
$white imagecolorallocate($img255255255);
            
imagettftext($img120338$white"/sys/fonts/tahoma.ttf""Сообщения");
            
imagettftext($img12019618$white"/sys/fonts/tahoma.ttf""12:00");
            
imagettftext($img12022838$white"/sys/fonts/tahoma.ttf""1");

            
$black imagecolorallocate($img000);
            
imagettftext($img1203imagesy($img) - 6$black"/sys/fonts/tahoma.ttf""Функции");
            
imagettftext($img120imagesx($img) / 30imagesy($img) - 6$black"/sys/fonts/tahoma.ttf""Выбрать");
            
imagettftext($img120imagesx($img) - 48imagesy($img) - 6$black"/sys/fonts/tahoma.ttf""Выйти");
        }

        
$img img_copyright($img); // копирайт

        
imagejpeg($img$dir_loads '/' $file '.1.JPG'100);
    }
}
?>
Онлайн: 0
Реклама