source: trunk/admin/themes/default/template/install.tpl @ 5571

Last change on this file since 5571 was 5571, checked in by plg, 14 years ago

Improve the install confirmation page: dedicated button to download the
database.inc.php file.

  • Property svn:eol-style set to LF
File size: 8.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2"http://www.w3.org/TR/html4/strict.dtd">
3<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
6<meta http-equiv="Content-script-type" content="text/javascript">
7<meta http-equiv="Content-Style-Type" content="text/css">
8<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
9
10{foreach from=$themes item=theme}
11{if isset($theme.local_head)}{include file=$theme.local_head}{/if}
12<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.id}/theme.css">
13{/foreach}
14
15<script type="text/javascript" src="themes/default/js/jquery.packed.js"></script>
16{literal}
17<script type="text/javascript">
18$(function() {
19    $option_selected = $('#dblayer option:selected').attr('value');
20    if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') {
21       $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
22    }
23    $('#dblayer').change(function() {
24        $db = this;
25        if ($db.value=='sqlite' || $db.value=='pdo-sqlite') {
26           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
27        } else {
28           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show();
29        }
30      });
31  });
32</script>
33
34<style type="text/css">
35body {
36  background:url("admin/themes/roma/images/bottom-left-bg.jpg") no-repeat fixed left bottom #111111;
37}
38
39.content {
40 background:url("admin/themes/roma/images/fillet.png") repeat-x scroll left top #222222;
41 width: 800px;
42 margin: auto;
43 text-align: center;
44 padding: 5px;
45}
46
47#headbranch  {
48  background:url("admin/themes/roma/images/top-left-bg.jpg") no-repeat scroll left top transparent;
49}
50
51#theHeader {
52  display: block;
53  background:url("admin/themes/roma/images/piwigo_logo_sombre_214x100.png") no-repeat scroll 245px top transparent;
54}
55
56.content h2 {
57  display:block;
58  font-size:28px;
59  height:104px;
60  width:54%;
61  color:#666666;
62  letter-spacing:-1px;
63  margin:0 30px 3px 20px;
64  overflow:hidden;
65  position:absolute;
66  right:0;
67  text-align:right;
68  top:0;
69  width:770px;
70  text-align:right;
71  text-transform:none;
72}
73
74.table2 {
75  width: 100%;
76  margin-bottom: 1em !important;
77}
78
79TD {
80  text-align: left;
81  padding: 0.1em 0.5em;
82  height: 2.5em;
83}
84
85.infos {
86  background-color:transparent;
87  border:none;
88  color:#999;
89}
90
91.sql_content, .infos a {
92  color: #ff3363;
93}
94
95.config_creation_failed {
96  text-align:left;
97  border:3px solid #F20D00;
98  color:#999;
99  margin:20px;
100  padding:0px 20px 5px 20px;
101  background-image:url(admin/themes/default/icon/errors.png);
102  background-repeat:no-repeat;
103}
104</style>
105{/literal}
106<title>Piwigo {$RELEASE} - {'Installation'|@translate}</title>
107</head>
108
109<body>
110<div id="headbranch"></div> {* Dummy block for double background management *}
111<div id="the_page">
112<div id="theHeader"></div>
113<div id="content" class="content">
114
115<h2>Piwigo {$RELEASE} - {'Installation'|@translate}</h2>
116
117{if isset($config_creation_failed)}
118<div class="config_creation_failed">
119  <p style="margin-left:30px;">
120    <strong>{'Creation of config file local/config/database.inc.php failed.'|@translate}</strong>
121  </p>
122  <ul>
123    <li>
124      <p>{'You can download the config file and upload it to local/config directory of your installation.'|@translate}</p>
125      <p style="text-align:center">
126          <input type="button" value="{'Download the config file'|@translate}" onClick="window.open('{$config_url}');">
127      </p>
128    </li>
129    <li>
130      <p>{'An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)'|@translate}</p>
131      <textarea rows="15" cols="70">{$config_file_content}</textarea>
132    </li>
133  </ul>
134</div>
135{/if}
136
137{if isset($errors)}
138<div class="errors">
139  <ul>
140    {foreach from=$errors item=error}
141    <li>{$error}</li>
142    {/foreach}
143  </ul>
144</div>
145{/if}
146
147{if isset($infos)}
148<div class="infos">
149  <ul>
150    {foreach from=$infos item=info}
151    <li>{$info}</li>
152    {/foreach}
153  </ul>
154</div>
155{/if}
156
157{if isset($install)}
158<form method="POST" action="{$F_ACTION}" name="install_form">
159
160  <table class="table2">
161    <tr class="throw">
162      <th colspan="2">{'Basic configuration'|@translate}</th>
163    </tr>
164    <tr>
165      <td style="width: 30%">{'Default gallery language'|@translate}</td>
166      <td>
167    <select name="language" onchange="document.location = 'install.php?language='+this.options[this.selectedIndex].value;">
168    {html_options options=$language_options selected=$language_selection}
169    </select>
170      </td>
171    </tr>
172  </table>
173  <table class="table2">
174    <tr class="throw">
175      <th colspan="3">{'Database configuration'|@translate}</th>
176    </tr>
177    {if count($F_DB_ENGINES)>1}
178    <tr>
179      <td style="width: 30%;">{'Database type'|@translate}</td>
180      <td>
181        <select name="dblayer" id="dblayer">
182          {foreach from=$F_DB_ENGINES key=k item=v}
183          <option value="{$k}"
184                  {if $k==$F_DB_LAYER and $v.available} selected="selected"{/if}
185                  {if !$v.available} disabled="disabled"{/if}
186                  >{$v.label}</option>
187          {/foreach}
188        </select>   
189      </td>
190      <td>{'The type of database your piwigo data will be store in'|@translate}</td>
191    {else}
192    <td colspan="3">
193    <input type="hidden" name="dbengine" value="{$F_DB_LAYER}">
194    </td>
195    {/if}
196    </tr>
197    <tr>
198      <td style="width: 30%;">{'Host'|@translate}</td>
199      <td align=center><input type="text" name="dbhost" value="{$F_DB_HOST}"></td>
200      <td>{'localhost, sql.multimania.com, toto.freesurf.fr'|@translate}</td>
201    </tr>
202    <tr>
203      <td>{'User'|@translate}</td>
204      <td align=center><input type="text" name="dbuser" value="{$F_DB_USER}"></td>
205      <td>{'user login given by your host provider'|@translate}</td>
206    </tr>
207    <tr>
208      <td>{'Password'|@translate}</td>
209      <td align=center><input type="password" name="dbpasswd" value=""></td>
210      <td>{'user password given by your host provider'|@translate}</td>
211    </tr>
212    <tr>
213      <td>{'Database name'|@translate}</td>
214      <td align=center><input type="text" name="dbname" value="{$F_DB_NAME}"></td>
215      <td>{'also given by your host provider'|@translate}</td>
216    </tr>
217    <tr>
218      <td>{'Database table prefix'|@translate}</td>
219      <td align=center><input type="text" name="prefix" value="{$F_DB_PREFIX}"></td>
220      <td>{'database tables names will be prefixed with it (enables you to manage better your tables)'|@translate}</td>
221    </tr>
222  </table>
223
224  <table class="table2">
225    <tr class="throw">
226      <th colspan="3">{'Admin configuration'|@translate}</th>
227    </tr>
228    <tr>
229      <td style="width: 30%;">{'Webmaster login'|@translate}</td>
230      <td align="center"><input type="text" name="admin_name" value="{$F_ADMIN}"></td>
231      <td>{'It will be shown to the visitors. It is necessary for website administration'|@translate}</td>
232    </tr>
233    <tr>
234      <td>{'Webmaster password'|@translate}</td>
235      <td align="center"><input type="password" name="admin_pass1" value=""></td>
236      <td>{'Keep it confidential, it enables you to access administration panel'|@translate}</td>
237    </tr>
238    <tr>
239      <td>{'Password [confirm]'|@translate}</td>
240      <td align="center"><input type="password" name="admin_pass2" value=""></td>
241      <td>{'verification'|@translate}</td>
242    </tr>
243    <tr>
244      <td>{'Webmaster mail address'|@translate}</td>
245      <td align="center"><input type="text" name="admin_mail" value="{$F_ADMIN_EMAIL}"></td>
246      <td>{'Visitors will be able to contact site administrator with this mail'|@translate}</td>
247    </tr>
248  </table>
249
250  <table>
251    <tr>
252      <td style="text-align: center;">
253        <input class="submit" type="submit" name="install" value="{'Start Install'|@translate}">
254      </td>
255    </tr>
256  </table>
257</form>
258{else}
259<p>
260  <input type="button" name="Home" value="{'Visit Gallery'|@translate}" onClick="window.open('index.php');">
261</p>
262
263{if !isset($migration)}
264<div class="infos">
265  <ul>
266    <li>{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate}</li>
267  </ul>
268</div>
269
270<p>
271  <input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');">
272</p>
273{/if}
274{/if}
275</div> {* content *}
276<div style="text-align: center">{$L_INSTALL_HELP}</div>
277</div> {* the_page *}
278</body>
279</html>
Note: See TracBrowser for help on using the repository browser.