$strs = explode('|', $str); } array_push($strs, 'update.php'); array_push($strs, 'sql.sql'); $string = "<?php\n \$strs=" . var_export($strs, true) . "; ?>"; file_put_contents("../update/{$addr}/dlfilelist.txt", $string); echo "{$lang_updaterr9}0%<script type=\"text/javascript\">olflie('{$olid}','{$ver}','dl',0);</script>"; } } else { if ($action == 'dl') { include "../update/{$addr}/dlfilelist.txt"; $strsnum = count($strs); $return = dlfile("{$addr}/{$strs[$numnow]}", "../update/{$addr}/{$strs[$numnow]}"); $numnow++; if ($return != 1) { dl_error($strs[$numnow - 1] . $lang_updownerrs . dlerror($return), $type, $olid, $ver, $addr, $action, $numnow); } if ($strsnum == $numnow) { $sql = file_get_contents("../update/{$addr}/sql.sql"); if ($sql != "No Date") { echo "{$lang_updaterr10}<script type=\"text/javascript\">setTimeout(function (){olupdate('{$olid}','{$ver}','sql');},500);</script>"; } else { echo $lang_jsx26 . "<script type=\"text/javascript\">olupdate('{$olid}','{$ver}','update');</script>"; } checksumdel($type); } else { $percentage = floor($numnow / $strsnum * 100); echo $lang_updaterr9 . "{$percentage}%<script type=\"text/javascript\">olflie('{$olid}','{$ver}','dl','{$numnow}');</script>"; } } else { if ($action == 'sql') {
filetest('../../../' . $val[1]); deldir('../../../' . $val[1]); $dlappfile = parse_ini_file('dlappfile.php', true); if ($dlappfile[$strsvalto]['dlfile']) { $return = varcodeb('app'); $checksum = $return['md5']; $met_file = '/dl/app_curl.php'; $stringfile = dlfile($dlappfile[$strsvalto]['dlfile'], "../../../{$val['1']}"); } else { $met_file = '/dl/olupdate_curl.php'; $stringfile = dlfile("v{$metcms_v}/{$strsvalto}", "../../../{$val['1']}"); } if ($stringfile == 1) { echo $lang_physicalupdatesuc; } else { echo dlerror($stringfile); die; } break; case 3: $fileaddr = explode('/', $val[1]); $filedir = "../../../" . $fileaddr[0]; if (!file_exists($filedir)) { @mkdir($filedir, 0777); } if ($fileaddr[1] == "index.php") { Copyindx("../../../" . $val[1], $val[2]); } else { switch ($val[2]) { case 1: $address = "../about/{$fileaddr['1']}";
echo $data; } elseif ($action == 'syn') { $post = array('newlangmark' => $syn, 'metcms_v' => $metcms_v, 'newlangtype' => $newlangtype); $site = $newlangtype == 'admin' ? 1 : 0; $file_basicname = $depth . '../update/lang/lang_' . $syn . '.ini'; $re = syn_lang($post, $file_basicname, $nowmark, $site, 0); if ($site == 0) { unlink('../../../cache/lang_' . $nowmark . '.php'); } if ($site == 1) { unlink('../../../cache/langadmin_' . $nowmark . '.php'); } if ($re == 1) { metsave('../system/lang/lang.php?anyid=' . $anyid . '&lang=' . $lang . '&cs=' . $cs, $lang_success, $depth); } else { metsave('../system/lang/lang.php?anyid=' . $anyid . '&lang=' . $lang . '&cs=' . $cs, $lang_langadderr4 . dlerror($re), $depth); } } else { $cs = isset($cs) ? $cs : 3; $listclass[$cs] = 'class="now"'; if ($cs == 3 && $langadminok != "metinfo") { header('location:lang.php?lang=' . $lang . '&anyid=' . $anyid . '&cs=1'); } if ($met_admin_type_ok == 1) { $met_admin_type_yes = "checked"; } if ($met_admin_type_ok == 0) { $met_admin_type_no = "checked"; } if ($met_lang_mark == 1) { $met_lang_mark_yes = "checked";