source: trunk/admin/install.php@ 510

Last change on this file since 510 was 510, checked in by chronos, 12 years ago
  • Přidáno: Novinky na webu nyní mají titulek. U starých novinek se nastaví jako titulek jméno uživatele, jako to bylo dříve.
File size: 1.9 KB
Line 
1<?php
2
3$StopAfterUpdateManager = true;
4include_once('../includes/global.php');
5include_once('UpdateTrace.php');
6$UpdateManager->Trace = $Updates;
7$UpdateManager->InstallMethod = 'FullInstall';
8
9function ControlPanel()
10{
11 global $UpdateManager;
12
13 $YesNo = array(false => 'Ne', true => 'Ano');
14 $Output = '<h3>Správa instance</h3>'.
15 'Je instalováno: '.$YesNo[$UpdateManager->IsInstalled()].'<br/>';
16 if($UpdateManager->IsInstalled())
17 $Output .= 'Je aktuální: '.$YesNo[$UpdateManager->IsUpToDate()].'<br/>'.
18 'Verze databáze: '.$UpdateManager->GetDbVersion().'<br/>';
19 $Output .= 'Verze kódu: '.$UpdateManager->Revision.'<br/>'.
20 '<form action="?" method="post">';
21 if($UpdateManager->IsInstalled())
22 {
23 if(!$UpdateManager->IsUpToDate())
24 $Output .= '<input type="submit" name="update" value="Aktualizovat"/>';
25 $Output .= '<input type="submit" name="uninstall" value="Odinstalovat"/>';
26 } else $Output .= '<input type="submit" name="install" value="Instalovat"/>';
27 $Output .= '</form>';
28 return($Output);
29}
30
31$Output = '<?xml version="1.0" encoding="'.$System->Config['Web']['Charset'].'"?>
32 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
33<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cz">'.
34'<head>'.
35'<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$System->Config['Web']['Charset'].'" />'.
36'<title>Správa instance</title>'.
37'</head><body>';
38if(array_key_exists('update', $_POST))
39{
40 $Output .= 'Aktualizace';
41 $UpdateManager->Update();
42 $Output .= ControlPanel();
43} else
44if(array_key_exists('install', $_POST))
45{
46 $Output .= 'Instalace';
47 $UpdateManager->Install();
48 $Output .= ControlPanel();
49} else
50if(array_key_exists('uninstall', $_POST))
51{
52 $Output .= 'Odinstalace';
53 $UpdateManager->Uninstall();
54 $Output .= ControlPanel();
55} else
56{
57 $Output .= ControlPanel();
58}
59$Output .= '</body></html>';
60echo($Output);
61
62?>
Note: See TracBrowser for help on using the repository browser.