$ret = ban_sav($id); break; case "admin": req('admin,pop,spe,tri'); if ($id == 'newsletter') { req('mod,art'); } $ret = admin_call($id, $va, $opt); break; case "admn": req('spe'); $ret = m_admin_b(); break; case "update": req('admin'); $ret = update_ok(); $t = nms(59); $s = 400; break; case "params": req('adminx,spe'); $ret = show_params($id, $va); break; case "rstr": req('adminx'); $ret = rstr_sav($id); $t = 'rstr'; $s = 100; break; case "module": req('adminx,tri,spe');
function adm_update() { $goto = '/?admin=update'; $_GET['update'] = $_GET['update'] ? $_GET['update'] : '='; if ($_GET['updater']) { $pdst = 'plug/distribution'; $d = read_file('http://philum.net/' . $pdst . '.php?page=../' . $pdst . '.php'); write_file($pdst . '.php', '<' . '?php' . $d . '?' . '>'); } //update_updater if ($_GET['updated'] == 'ok') { $uret .= update_ok(); } else { $_SESSION['dlnb'] = 0; $uret .= picto('update', 32) . ' ' . lkc('txtbox', $goto . '&update=program', nms(59)); } //$uret.=lj('txtx','popup_update','ok').' '; if (!is_file('fonts/philum.woff')) { $uret .= icon('alert§system/com') . ' ' . helps('updpictos') . br() . br(); } $maj = checkupdate(); if ($maj != $_SESSION['philum']) { $maj = 'local/distant=' . $_SESSION['philum'] . '/' . $maj; } $uret .= btn('popw', $maj) . ' '; //helps('update_help') $uret .= lkc('txtsmall2', '/?dev=dev', 'dev (progb)') . ' '; $uret .= lkc('txtsmall2', '/?admin=update_notes', picto('txt')) . br() . br(); require_once 'plug/distribution.php'; //echo $_SESSION['dlnb']; if ($_SESSION['updfirst']) { $uret .= lkc('txtyl', $goto . '&updater==', 'update_updater') . ' '; } $uret .= btn('nbp', slct_menus(array('/', 'prog', 'progb', 'msql', 'plug', 'js', 'gallery', 'fla', 'gdf', 'bkg', 'fonts', 'pictos', 'css', 'imgb/icons'), $goto . '&dest=', $_SESSION['dest'], 'active', '', 'v')) . ' '; $uret .= lkc('txtbox', $goto . '&update=all', picto('update') . ' ' . $_SESSION['dest']) . ' '; if ($_SESSION['dest'] == 'fonts') { $uret .= hlpbt('updfonts') . ' ' . lkc('txtbox', $goto . '&update=del', 'del_obsoletes'); } $uret .= br() . br(); $patch = '160101'; //patches//set update_ok//150521 if ($patch) { $pok = msql_read('server', 'program_patches', $patch); $ptch = msql_read('system', 'program_patches', $patch); if ($pok == 0 or $_GET['force']) { if ($_GET['patch']) { $uret .= plugin('patchs', $ptch['function']); if ($uret) { modif_vars('server', 'program_patches', array(1), $patch); } } else { $uret .= divc('txtalert', lkc('txtyl', $goto . '&patch==', stripslashes($ptch['function'])) . ' ' . $ptch['explics']) . br(); } } else { $uret .= divc('txtalert', lkc('txtyl', $goto . '&patch==&force==', 'force patch')) . br(); } } //files $uret .= $plug_output; return $uret; }