From 423ff9404f25da5dd8443e0bca904dc81f439fd9 Mon Sep 17 00:00:00 2001 From: Vyacheslav Gorodilov Date: Wed, 21 Mar 2018 15:45:31 +0300 Subject: [PATCH] =?UTF-8?q?=D1=8D=D0=BF=D0=BE=D0=BF=D0=B5=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BA=D0=BE=D0=BD=D1=87=D0=B8=D0=BB=D0=B0=D1=81=D1=8C!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- os.php | 2 +- system/apps/Apps_House/main.php | 3 +-- system/apps/Explorer/main.php | 18 ++++++++++++++--- system/apps/Settings/appmanager.php | 31 ++++++++++++++++++++--------- 4 files changed, 39 insertions(+), 15 deletions(-) diff --git a/os.php b/os.php index cc89da1..10e18d7 100644 --- a/os.php +++ b/os.php @@ -23,7 +23,7 @@ $prepare->DisplaySettings(); ?> -
+
welcomescreen(); diff --git a/system/apps/Apps_House/main.php b/system/apps/Apps_House/main.php index 307ae0d..721e56d 100644 --- a/system/apps/Apps_House/main.php +++ b/system/apps/Apps_House/main.php @@ -165,11 +165,10 @@ function wallchange(){ if (is_file($checkApp)) { $info = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/system/apps/'.$key['file'].'/main.php?getinfo=true&h='.md5(date('dmyhis'))); - //echo $info; $arrayInfo = json_decode($info); $curversion = $arrayInfo->{'version'};; if(empty($curversion)){ - //$curversion = '1.0'; + $curversion = '1.0'; } $newversion=$key['version']; if($newversion>$curversion){ diff --git a/system/apps/Explorer/main.php b/system/apps/Explorer/main.php index 9c62798..442cc66 100644 --- a/system/apps/Explorer/main.php +++ b/system/apps/Explorer/main.php @@ -102,9 +102,21 @@ $destination = str_replace($linkname,'',$link); $link = ''; $param = ''; - $newname = stristr($destination, 'apps/'); - $newname = str_replace(array('apps/','/main.php', '/'),'',$newname); - $puplicname = $newname; + $file = stristr($destination, 'apps/'); + $file = str_replace(array('apps/','/main.php', '/'),'',$file); + $info = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/system/apps/'.$file.'/main.php?getinfo=true&h='.md5(date('dmyhis'))); + $arrayInfo = json_decode($info); + if($_SESSION['locale'] == 'en'){ + $newname = $arrayInfo->{'name'}; + $puplicname = $arrayInfo->{'name'}; + }else{ + $newname = $arrayInfo->{'secondname'}; + $puplicname = $arrayInfo->{'secondname'}; + } + if(empty($newname) || empty($puplicname)){ + $newname = $file; + $puplicname = $file; + } $ico = stristr($ico,'?',true); }else{ if(is_file($link)){ diff --git a/system/apps/Settings/appmanager.php b/system/apps/Settings/appmanager.php index 46b1488..a13afc1 100644 --- a/system/apps/Settings/appmanager.php +++ b/system/apps/Settings/appmanager.php @@ -27,21 +27,22 @@ $app_link = $_GET['app_link']; if(!empty($app_link)){ + $info = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/system/apps/'.$app_link.'/main.php?getinfo=true&h='.md5(date('dmyhis'))); + $arrayInfo = json_decode($info); + if($_SESSION['locale'] == 'en'){ + $pubname = $arrayInfo->{'name'}; + }else{ + $pubname = $arrayInfo->{'secondname'}; + } $file = $_SERVER['DOCUMENT_ROOT'].'/system/users/'.$_SESSION['loginuser'].'/desktop/'.$app_link.'_'.uniqid().'.link'; - $fileaction->makelink($file, $_SERVER['DOCUMENT_ROOT'].'/system/apps/'.$app_link.'/', 'main', '', $app_link, $app_link, $app_link, 'system/apps/'.$app_link.'/app.png'); + $fileaction->makelink($file, $_SERVER['DOCUMENT_ROOT'].'/system/apps/'.$app_link.'/', 'main', '', $app_link, $pubname, $pubname, 'system/apps/'.$app_link.'/app.png'); } if(!empty($app_delete) && !in_array($app_delete, $warn_apps)){ $fileaction->deleteDir('../'.$app_delete); - $remove_app = file_get_contents($app_install); - $_remove_app = preg_match('/(?ms)^\['.$app_delete.'](?:(?!^\[[^]\r\n]+]).)*/', $remove_app, $new_file); - $remove_app = str_replace($new_file[0], '', $remove_app); - file_put_contents($app_install, $remove_app); $gui->newnotification($appname, $language[$_SESSION['locale'].'_name'], $language[$_SESSION['locale'].'_not_1'].': '.$app_delete.' '.$language[$_SESSION['locale'].'_not_2']); } -$app_array = parse_ini_file($app_install, true); - foreach (glob($_SERVER['DOCUMENT_ROOT']."/system/apps/*/main.php") as $filenames) { global $format, $size; @@ -59,15 +60,27 @@ $delete_button = ''; } - $version = $app_array[$_app_name]['version']; + $info = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/system/apps/'.$_app_name.'/main.php?getinfo=true&h='.md5(date('dmyhis'))); + $arrayInfo = json_decode($info); + + $version = $arrayInfo->{'version'}; if(empty($version)){ $version = $language[$_SESSION['locale'].'_unknow_version']; } + if($_SESSION['locale'] == 'en'){ + $AppName = $arrayInfo->{'name'}; + }else{ + $AppName = $arrayInfo->{'secondname'}; + } + if(empty($AppName)){ + $AppName = $app_name; + } + echo'
-
'.$app_name.'
+
'.$AppName.'