Просмотр файла loads/inc/file/nth.php

Размер файла: 18.8Kb
  1. <?
  2.  
  3.  
  4.  
  5. if (is_file($dir_loads.'/'.$file.'.GIF'))
  6. echo "<img src=\"resize.php?".url("f=$l/$file.GIF")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  7. elseif (is_file($dir_loads.'/'.$file.'.JPG'))
  8. echo "<img src=\"resize.php?".url("f=$l/$file.JPG")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  9. elseif (is_file($dir_loads.'/'.$file.'.PNG'))
  10. echo "<img src=\"resize.php?".url("f=$l/$file.PNG")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  11. else
  12. {
  13.  
  14.  
  15. include_once H.'sys/inc/zip.php';
  16. $zip=new PclZip($dir_loads.'/'.$file);
  17. $content = $zip->extract(PCLZIP_OPT_BY_NAME, 'theme_descriptor.xml' ,PCLZIP_OPT_EXTRACT_AS_STRING);
  18. $theme_descriptor=$content[0]['content'];
  19.  
  20. $p = xml_parser_create();
  21. xml_parse_into_struct($p,$theme_descriptor,$vals,$index);
  22. xml_parser_free($p);
  23.  
  24. for ($i=0;$i<count($vals);$i++)
  25. {
  26. if ($vals[$i]['tag']=='THEME' && isset ($vals[$i]['attributes']['VERSION']))
  27. {
  28. $ver=$vals[$i]['attributes']['VERSION'];
  29. }
  30.  
  31.  
  32. if ($vals[$i]['tag']=='THEME' && isset ($vals[$i]['attributes']['NAME']) && $vals[$i]['attributes']['NAME']!=NULL)
  33. {
  34. file_put_contents($dir_loads.'/'.$file.'.name', $vals[$i]['attributes']['NAME']);
  35. }
  36.  
  37.  
  38. }
  39.  
  40. //echo "Версия: ".$ver."<br />\n";
  41.  
  42. for ($i=0;$i<count($vals);$i++)
  43. {
  44.  
  45.  
  46. if ($ver=='1.1' && $vals[$i]['tag']=='BACKGROUND' && isset ($vals[$i]['attributes']['SRC']))
  47. {
  48. $back=$vals[$i]['attributes']['SRC'];
  49. }
  50. if ($ver=='2.0' && $vals[$i]['tag']=='BACKGROUND' && isset ($vals[$i]['attributes']['GRID_MENU_BG']))
  51. {
  52. $back=$vals[$i]['attributes']['GRID_MENU_BG'];
  53. }
  54.  
  55.  
  56. }
  57.  
  58.  
  59.  
  60. if (isset($back)){
  61. //echo "BACKGROUND: ".$back."<br />\n";
  62.  
  63. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $back ,PCLZIP_OPT_EXTRACT_AS_STRING);
  64. $back_img=imagecreatefromstring($content[0]['content']);
  65. $img=imagecreatetruecolor(imagesx($back_img), imagesy($back_img));
  66.  
  67. imagecopy($img, $back_img, 0, 0, 0, 0, imagesx($back_img), imagesy($back_img));
  68.  
  69.  
  70.  
  71.  
  72. for ($i=0;$i<count($vals);$i++)
  73. {
  74. if ($ver=='1.1' && $vals[$i]['tag']=='ICON' && isset ($vals[$i]['attributes']['SRC']) && $vals[$i]['attributes']['SIZE']=='small')
  75. {
  76. $icon_id=$vals[$i]['attributes']['ITEM_ID'];
  77. $icon[$icon_id]=$vals[$i]['attributes']['SRC'];
  78. }
  79. if ($ver=='2.0' && $vals[$i]['tag']=='MENU_ITEM' && isset($vals[$i]['attributes']['ITEM_ID']) && isset($vals[$i]['attributes']['LIST_VIEW_ICON']))
  80. {
  81. $icon_id=$vals[$i]['attributes']['ITEM_ID'];
  82. $icon[$icon_id]=$vals[$i]['attributes']['LIST_VIEW_ICON'];
  83. }
  84. if ($ver=='2.0' && $vals[$i]['tag']=='HIGHLIGHT' && isset($vals[$i]['attributes']['ACTIVE_IDLE_SHORTCUT_BAR']))
  85. {
  86. $icon_back=$vals[$i]['attributes']['ACTIVE_IDLE_SHORTCUT_BAR'];
  87. }
  88.  
  89.  
  90.  
  91.  
  92.  
  93. }
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. if ($ver=='1.1')
  103. {
  104. $v_ots=24;
  105. $v_ots2=24;
  106. if (isset($icon_back)){
  107. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon_back ,PCLZIP_OPT_EXTRACT_AS_STRING);
  108. $icon_back_img2=imagecreatefromstring($content[0]['content']);
  109.  
  110.  
  111. $icon_back_img=imagecreate(74, 74);
  112. imagecopyresampled($icon_back_img, $icon_back_img2, 0, 0, 0, 0, imagesx($icon_back_img), imagesy($icon_back_img), imagesx($icon_back_img2), imagesy($icon_back_img2));
  113.  
  114. imagecopy($img, $icon_back_img, imagesx($img)/6-imagesx($icon_back_img)/2, imagesy($img)/8-imagesy($icon_back_img)/2+$v_ots, 0, 0, imagesx($icon_back_img), imagesy($icon_back_img));
  115. }
  116.  
  117.  
  118.  
  119.  
  120. if (isset($icon))
  121. {
  122.  
  123.  
  124. if (isset($icon['messages'])){
  125. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['messages'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  126. $icon_img=imagecreate(48, 48);
  127. $icon_img2=imagecreatefromstring($content[0]['content']);
  128. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  129. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  130. }
  131.  
  132. if (isset($icon['contacts'])){
  133. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['contacts'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  134. $icon_img=imagecreate(48, 48);
  135. $icon_img2=imagecreatefromstring($content[0]['content']);
  136. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  137. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  138. }
  139.  
  140. if (isset($icon['callregister'])){
  141. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['callregister'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  142. $icon_img=imagecreate(48, 48);
  143. $icon_img2=imagecreatefromstring($content[0]['content']);
  144. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  145. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  146. }
  147.  
  148. if (isset($icon['settings'])){
  149. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['settings'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  150. $icon_img=imagecreate(48, 48);
  151. $icon_img2=imagecreatefromstring($content[0]['content']);
  152. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  153. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  154. }
  155.  
  156. if (isset($icon['gallery'])){
  157. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['gallery'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  158. $icon_img=imagecreate(48, 48);
  159. $icon_img2=imagecreatefromstring($content[0]['content']);
  160. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  161. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  162. }
  163.  
  164.  
  165. if (isset($icon['media'])){
  166. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['media'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  167. $icon_img=imagecreate(48, 48);
  168. $icon_img2=imagecreatefromstring($content[0]['content']);
  169. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  170. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  171. }
  172.  
  173.  
  174. if (isset($icon['organizer'])){
  175. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['organizer'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  176. $icon_img=imagecreate(48, 48);
  177. $icon_img2=imagecreatefromstring($content[0]['content']);
  178. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  179. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/1.5, 0, 0, imagesx($icon_img), imagesy($icon_img));
  180. }
  181.  
  182. if (isset($icon['push_to_talk'])){
  183. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['push_to_talk'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  184. $icon_img=imagecreate(48, 48);
  185. $icon_img2=imagecreatefromstring($content[0]['content']);
  186. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  187. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/1.5, 0, 0, imagesx($icon_img), imagesy($icon_img));
  188. }
  189.  
  190.  
  191. if (isset($icon['applications'])){
  192. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['applications'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  193. $icon_img=imagecreate(48, 48);
  194. $icon_img2=imagecreatefromstring($content[0]['content']);
  195. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  196. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/6-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/1.5, 0, 0, imagesx($icon_img), imagesy($icon_img));
  197. }
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. }
  206.  
  207.  
  208. /*
  209.  
  210. $antenna=imagecreatefromgif(H."loads/inc/file/antenna.gif");
  211. imagecopy($img, $antenna, 4, 4, 0, 0, imagesx($antenna), imagesy($antenna));
  212. */
  213. $fon=imagecreatefrompng(H."loads/inc/file/208.png");
  214. imagecopy($img, $fon, 0, 0, 0, 0, imagesx($fon), imagesy($fon));
  215.  
  216.  
  217.  
  218.  
  219. //$white = imagecolorallocate ($img, 255, 255, 255);
  220. //imagettftext ($img, 12, 0, 3, 38, $white, H."/sys/fonts/tahoma.ttf", "Сообщения");
  221. //imagettftext ($img, 12, 0, 196, 18, $white, H."/sys/fonts/tahoma.ttf", "12:00");
  222. //imagettftext ($img, 12, 0, 228, 38, $white, H."/sys/fonts/tahoma.ttf", "1");
  223.  
  224.  
  225. $black = imagecolorallocate ($img, 0, 0, 0);
  226. imagettftext ($img, 11, 0, imagesx($img)/2-42, 15, $black, H."/sys/fonts/tahoma.ttf", "Сообщения");
  227. imagettftext ($img, 11, 0, imagesx($img)-11, 16, $black, H."/sys/fonts/tahoma.ttf", "1");
  228.  
  229.  
  230. imagettftext ($img, 11, 0, imagesx($img)/2-30, imagesy($img)-6, $black, H."/sys/fonts/tahoma.ttf", "Выбрать");
  231. imagettftext ($img, 11, 0, imagesx($img)-48, imagesy($img)-6, $black, H."/sys/fonts/tahoma.ttf", "Выйти");
  232.  
  233.  
  234. /*
  235. imagettftext(resource image, int size, int angle, int x, int y, int color, string fontfile, string text)
  236. */
  237.  
  238. }
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246. if ($ver=='2.0')
  247. {
  248. $v_ots=40;
  249. $v_ots2=28;
  250. if (isset($icon_back)){
  251. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon_back ,PCLZIP_OPT_EXTRACT_AS_STRING);
  252. $icon_back_img2=imagecreatefromstring($content[0]['content']);
  253.  
  254.  
  255. $icon_back_img=imagecreate(74, 74);
  256. imagecopyresampled($icon_back_img, $icon_back_img2, 0, 0, 0, 0, imagesx($icon_back_img), imagesy($icon_back_img), imagesx($icon_back_img2), imagesy($icon_back_img2));
  257.  
  258. imagecopy($img, $icon_back_img, imagesx($img)/6-imagesx($icon_back_img)/2, imagesy($img)/8-imagesy($icon_back_img)/2+$v_ots, 0, 0, imagesx($icon_back_img), imagesy($icon_back_img));
  259. }
  260.  
  261.  
  262.  
  263.  
  264. if (isset($icon))
  265. {
  266.  
  267.  
  268. if (isset($icon['messages'])){
  269. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['messages'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  270. $icon_img=imagecreate(48, 48);
  271. $icon_img2=imagecreatefromstring($content[0]['content']);
  272. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  273. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  274. }
  275.  
  276. if (isset($icon['contacts'])){
  277. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['contacts'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  278. $icon_img=imagecreate(48, 48);
  279. $icon_img2=imagecreatefromstring($content[0]['content']);
  280. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  281. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  282. }
  283.  
  284. if (isset($icon['callregister'])){
  285. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['callregister'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  286. $icon_img=imagecreate(48, 48);
  287. $icon_img2=imagecreatefromstring($content[0]['content']);
  288. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  289. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots, 0, 0, imagesx($icon_img), imagesy($icon_img));
  290. }
  291.  
  292. if (isset($icon['settings'])){
  293. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['settings'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  294. $icon_img=imagecreate(48, 48);
  295. $icon_img2=imagecreatefromstring($content[0]['content']);
  296. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  297. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4, 0, 0, imagesx($icon_img), imagesy($icon_img));
  298. }
  299.  
  300. if (isset($icon['gallery'])){
  301. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['gallery'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  302. $icon_img=imagecreate(48, 48);
  303. $icon_img2=imagecreatefromstring($content[0]['content']);
  304. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  305. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4, 0, 0, imagesx($icon_img), imagesy($icon_img));
  306. }
  307.  
  308.  
  309. if (isset($icon['media'])){
  310. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['media'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  311. $icon_img=imagecreate(48, 48);
  312. $icon_img2=imagecreatefromstring($content[0]['content']);
  313. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  314. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4, 0, 0, imagesx($icon_img), imagesy($icon_img));
  315. }
  316.  
  317.  
  318. if (isset($icon['organizer'])){
  319. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['organizer'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  320. $icon_img=imagecreate(48, 48);
  321. $icon_img2=imagecreatefromstring($content[0]['content']);
  322. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  323. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/2, 0, 0, imagesx($icon_img), imagesy($icon_img));
  324. }
  325.  
  326. if (isset($icon['push_to_talk'])){
  327. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['push_to_talk'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  328. $icon_img=imagecreate(48, 48);
  329. $icon_img2=imagecreatefromstring($content[0]['content']);
  330. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  331. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/2, 0, 0, imagesx($icon_img), imagesy($icon_img));
  332. }
  333.  
  334.  
  335. if (isset($icon['applications'])){
  336. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['applications'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  337. $icon_img=imagecreate(48, 48);
  338. $icon_img2=imagecreatefromstring($content[0]['content']);
  339. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  340. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/2, 0, 0, imagesx($icon_img), imagesy($icon_img));
  341. }
  342.  
  343.  
  344. if (isset($icon['simatk'])){
  345. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['simatk'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  346. $icon_img=imagecreate(48, 48);
  347. $icon_img2=imagecreatefromstring($content[0]['content']);
  348. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  349. imagecopy($img, $icon_img, imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4*3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  350. }
  351.  
  352. if (isset($icon['services'])){
  353. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['services'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  354. $icon_img=imagecreate(48, 48);
  355. $icon_img2=imagecreatefromstring($content[0]['content']);
  356. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  357. imagecopy($img, $icon_img, imagesx($img)/2-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4*3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  358. }
  359.  
  360.  
  361. if (isset($icon['default'])){
  362. $content = $zip->extract(PCLZIP_OPT_BY_NAME, $icon['default'] ,PCLZIP_OPT_EXTRACT_AS_STRING);
  363. $icon_img=imagecreate(48, 48);
  364. $icon_img2=imagecreatefromstring($content[0]['content']);
  365. imagecopyresampled($icon_img, $icon_img2, 0, 0, 0, 0, imagesx($icon_img), imagesy($icon_img), imagesx($icon_img2), imagesy($icon_img2));
  366. imagecopy($img, $icon_img, imagesx($img)-imagesx($img)/6-imagesx($icon_img)/2, imagesy($img)/8-imagesy($icon_img)/2+$v_ots+(imagesy($img)-$v_ots-$v_ots2)/4*3, 0, 0, imagesx($icon_img), imagesy($icon_img));
  367. }
  368.  
  369.  
  370.  
  371.  
  372.  
  373. }
  374.  
  375.  
  376.  
  377.  
  378. $antenna=imagecreatefromgif(H."loads/inc/file/antenna.gif");
  379. imagecopy($img, $antenna, 4, 4, 0, 0, imagesx($antenna), imagesy($antenna));
  380.  
  381. $battery=imagecreatefromgif(H."loads/inc/file/battery.gif");
  382. imagecopy($img, $battery, 30, 4, 0, 0, imagesx($battery), imagesy($battery));
  383.  
  384.  
  385.  
  386.  
  387. $white = imagecolorallocate ($img, 255, 255, 255);
  388. imagettftext ($img, 12, 0, 3, 38, $white, H."/sys/fonts/tahoma.ttf", "Сообщения");
  389. imagettftext ($img, 12, 0, 196, 18, $white, H."/sys/fonts/tahoma.ttf", "12:00");
  390. imagettftext ($img, 12, 0, 228, 38, $white, H."/sys/fonts/tahoma.ttf", "1");
  391.  
  392.  
  393. $black = imagecolorallocate ($img, 0, 0, 0);
  394. imagettftext ($img, 12, 0, 3, imagesy($img)-6, $black, H."/sys/fonts/tahoma.ttf", "Функции");
  395. imagettftext ($img, 12, 0, imagesx($img)/2-30, imagesy($img)-6, $black, H."/sys/fonts/tahoma.ttf", "Выбрать");
  396. imagettftext ($img, 12, 0, imagesx($img)-48, imagesy($img)-6, $black, H."/sys/fonts/tahoma.ttf", "Выйти");
  397.  
  398.  
  399. /*
  400. imagettftext(resource image, int size, int angle, int x, int y, int color, string fontfile, string text)
  401. */
  402.  
  403. }
  404.  
  405.  
  406.  
  407.  
  408. $img=img_copyright($img); // копирайт
  409.  
  410. imagejpeg($img, $dir_loads.'/'.$file.'.JPG', 100);
  411.  
  412.  
  413.  
  414. if (is_file($dir_loads.'/'.$file.'.GIF'))
  415. echo "<img src=\"resize.php?".url("f=$l/$file.GIF")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  416. elseif (is_file($dir_loads.'/'.$file.'.JPG'))
  417. echo "<img src=\"resize.php?".url("f=$l/$file.JPG")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  418. elseif (is_file($dir_loads.'/'.$file.'.PNG'))
  419. echo "<img src=\"resize.php?".url("f=$l/$file.PNG")."&amp;w=128&amp;h=128\" alt=\"Скрин...\" /><br />\n";
  420. }
  421.  
  422.  
  423.  
  424.  
  425. }
  426.  
  427.  
  428.  
  429.  
  430. echo "Добавлен: ".vremja(filectime($dir_loads.'/'.$file))."<br />\n";
  431. if (is_file($dir_loads.'/'.$file.'.opis')) // проверка описания
  432. echo output_text(file_get_contents($dir_loads.'/'.$file.'.opis'))."<br />\n";
  433. elseif (is_file($dir_loads.'/'.$file.'.txt')) // проверка описания в txt файле
  434. echo output_text(file_get_contents($dir_loads.'/'.$file.'.txt'))."<br />\n";
  435.  
  436. echo "Размер: ".size_file(filesize($dir_loads.'/'.$file))."<br />\n";
  437. include 'inc/add_file_loads.php'; // обработа вывода ссылки
  438. echo "<a href=\"?komm&amp;".url("d=$l&amp;f=$file")."\">Комментарии</a> (".k_komm($file,$size).")<br />\n";
  439. ?>