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

Last change on this file since 8310 was 8310, checked in by plg, 13 years ago

feature 2086 added: switch installation screen to a clear background theme

  • Property svn:eol-style set to LF
File size: 9.4 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{get_combined_css}
11{foreach from=$themes item=theme}
12{if $theme.load_css}
13{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
14{/if}
15{/foreach}
16
17<script type="text/javascript" src="themes/default/js/jquery.min.js"></script>
18{literal}
19<script type="text/javascript">
20$(function() {
21    $option_selected = $('#dblayer option:selected').attr('value');
22    if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') {
23       $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
24    }
25    if ($option_selected=='mysql') {
26        $('#experimentalDbEngines').hide();
27    }
28
29    $('#dblayer').change(function() {
30        $db = this;
31        if ($db.value=='sqlite' || $db.value=='pdo-sqlite') {
32           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
33        } else {
34           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show();
35        }
36
37        if ($db.value=='mysql') {
38            $('#experimentalDbEngines').hide();
39        }
40        else {
41            $('#experimentalDbEngines').show();
42        }
43      });
44  });
45
46$(document).ready(function() {
47  $("a.externalLink").click(function() {
48    window.open($(this).attr("href"));
49    return false;
50  });
51});
52
53</script>
54
55<style type="text/css">
56body {
57  font-size:12px;
58}
59
60.content {
61 width: 800px;
62 margin: auto;
63 text-align: center;
64 padding:0;
65 background-color:transparent !important;
66 border:none;
67}
68
69#theHeader {
70  display: block;
71  background:url("admin/themes/clear/images/piwigo_logo_big.png") no-repeat scroll center 20px transparent;
72  height:100px;
73}
74
75fieldset {
76  margin-top:20px;
77  background-color:#f1f1f1;
78}
79
80legend {
81  font-weight:bold;
82  letter-spacing:2px;
83}
84
85.content h2 {
86  display:block;
87  font-size:20px;
88  text-align:center;
89  /* margin-top:5px; */
90}
91
92table.table2 {
93  width: 100%;
94  border:0;
95}
96
97table.table2 td {
98  text-align: left;
99  padding: 5px 2px;
100}
101
102table.table2 td.fieldname {
103  font-weight:normal;
104}
105
106table.table2 td.fielddesc {
107  padding-left:10px;
108  font-style:italic;
109}
110
111input[type="submit"], input[type="button"] {
112  font-size:14px;
113  font-weight:bold;
114  letter-spacing:2px;
115  border:none;
116  background-color:#666666;
117  color:#fff;
118  padding:5px;
119  -moz-border-radius:5px;
120}
121
122input[type="submit"]:hover, input[type="button"]:hover {
123  background-color:#ff7700;
124  color:white;
125}
126
127input[type="text"], input[type="password"], select {
128  background-color:#ddd;
129  border:2px solid #ccc;
130  -moz-border-radius:5px;
131  padding:2px;
132}
133
134input[type="text"]:focus, input[type="password"]:focus, select:focus {
135  background-color:#fff;
136  border:2px solid #ff7700;
137}
138
139.sql_content, .infos a {
140  color: #ff3363;
141}
142
143.errors {
144  padding-bottom:5px;
145}
146
147</style>
148{/literal}
149<title>Piwigo {$RELEASE} - {'Installation'|@translate}</title>
150</head>
151
152<body>
153<div id="the_page">
154<div id="theHeader"></div>
155<div id="content" class="content">
156
157<h2>{'Version'|@translate} {$RELEASE} - {'Installation'|@translate}</h2>
158
159{if isset($config_creation_failed)}
160<div class="errors">
161  <p style="margin-left:30px;">
162    <strong>{'Creation of config file local/config/database.inc.php failed.'|@translate}</strong>
163  </p>
164  <ul>
165    <li>
166      <p>{'You can download the config file and upload it to local/config directory of your installation.'|@translate}</p>
167      <p style="text-align:center">
168          <input type="button" value="{'Download the config file'|@translate}" onClick="window.open('{$config_url}');">
169      </p>
170    </li>
171    <li>
172      <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>
173      <textarea rows="15" cols="70">{$config_file_content}</textarea>
174    </li>
175  </ul>
176</div>
177{/if}
178
179{if isset($errors)}
180<div class="errors">
181  <ul>
182    {foreach from=$errors item=error}
183    <li>{$error}</li>
184    {/foreach}
185  </ul>
186</div>
187{/if}
188
189{if isset($infos)}
190<div class="infos">
191  <ul>
192    {foreach from=$infos item=info}
193    <li>{$info}</li>
194    {/foreach}
195  </ul>
196</div>
197{/if}
198
199{if isset($install)}
200<form method="POST" action="{$F_ACTION}" name="install_form">
201
202<fieldset>
203  <legend>{'Basic configuration'|@translate}</legend>
204
205  <table class="table2">
206    <tr>
207      <td style="width: 30%">{'Default gallery language'|@translate}</td>
208      <td>
209    <select name="language" onchange="document.location = 'install.php?language='+this.options[this.selectedIndex].value;">
210    {html_options options=$language_options selected=$language_selection}
211    </select>
212      </td>
213    </tr>
214  </table>
215</fieldset>
216
217<fieldset>
218  <legend>{'Database configuration'|@translate}</legend>
219
220  <table class="table2">
221    {if count($F_DB_ENGINES)>1}
222    <tr>
223      <td style="width: 30%;" class="fieldname">{'Database type'|@translate}</td>
224      <td>
225        <select name="dblayer" id="dblayer">
226          {foreach from=$F_DB_ENGINES key=k item=v}
227          <option value="{$k}"
228                  {if $k==$F_DB_LAYER and $v.available} selected="selected"{/if}
229                  {if !$v.available} disabled="disabled"{/if}
230                  >{$v.label}</option>
231          {/foreach}
232        </select>   
233      </td>
234      <td class="fielddesc">{'The type of database your piwigo data will be store in'|@translate}</td>
235    {else}
236    <td colspan="3">
237    <input type="hidden" name="dbengine" value="{$F_DB_LAYER}">
238    </td>
239    {/if}
240    </tr>
241    <tr id="experimentalDbEngines">
242      <td colspan="3">
243<div class="warnings">
244      {'SQLite and PostgreSQL are currently in experimental state.'|@translate}
245      <a href="http://piwigo.org/forum/viewtopic.php?id=15927" class="externalLink">{'Learn more'|@translate}</a>
246</div>
247      </td>
248    </tr>
249    <tr>
250      <td style="width: 30%;" class="fieldname">{'Host'|@translate}</td>
251      <td><input type="text" name="dbhost" value="{$F_DB_HOST}"></td>
252      <td class="fielddesc">{'localhost, sql.multimania.com, toto.freesurf.fr'|@translate}</td>
253    </tr>
254    <tr>
255      <td class="fieldname">{'User'|@translate}</td>
256      <td><input type="text" name="dbuser" value="{$F_DB_USER}"></td>
257      <td class="fielddesc">{'user login given by your host provider'|@translate}</td>
258    </tr>
259    <tr>
260      <td class="fieldname">{'Password'|@translate}</td>
261      <td><input type="password" name="dbpasswd" value=""></td>
262      <td class="fielddesc">{'user password given by your host provider'|@translate}</td>
263    </tr>
264    <tr>
265      <td class="fieldname">{'Database name'|@translate}</td>
266      <td><input type="text" name="dbname" value="{$F_DB_NAME}"></td>
267      <td class="fielddesc">{'also given by your host provider'|@translate}</td>
268    </tr>
269    <tr>
270      <td class="fieldname">{'Database table prefix'|@translate}</td>
271      <td><input type="text" name="prefix" value="{$F_DB_PREFIX}"></td>
272      <td class="fielddesc">{'database tables names will be prefixed with it (enables you to manage better your tables)'|@translate}</td>
273    </tr>
274  </table>
275
276</fieldset>
277<fieldset>
278  <legend>{'Admin configuration'|@translate}</legend>
279
280  <table class="table2">
281    <tr>
282      <td style="width: 30%;" class="fieldname">{'Webmaster login'|@translate}</td>
283      <td><input type="text" name="admin_name" value="{$F_ADMIN}"></td>
284      <td class="fielddesc">{'It will be shown to the visitors. It is necessary for website administration'|@translate}</td>
285    </tr>
286    <tr>
287      <td class="fieldname">{'Webmaster password'|@translate}</td>
288      <td><input type="password" name="admin_pass1" value=""></td>
289      <td class="fielddesc">{'Keep it confidential, it enables you to access administration panel'|@translate}</td>
290    </tr>
291    <tr>
292      <td class="fieldname">{'Password [confirm]'|@translate}</td>
293      <td><input type="password" name="admin_pass2" value=""></td>
294      <td class="fielddesc">{'verification'|@translate}</td>
295    </tr>
296    <tr>
297      <td class="fieldname">{'Webmaster mail address'|@translate}</td>
298      <td><input type="text" name="admin_mail" value="{$F_ADMIN_EMAIL}"></td>
299      <td class="fielddesc">{'Visitors will be able to contact site administrator with this mail'|@translate}</td>
300    </tr>
301  </table>
302
303</fieldset>
304
305  <div style="text-align:center; margin:20px 0 10px 0">
306    <input class="submit" type="submit" name="install" value="{'Start Install'|@translate}">
307  </div>
308</form>
309{else}
310<p>
311  <input type="button" name="Home" value="{'Visit Gallery'|@translate}" onClick="window.open('index.php');">
312</p>
313
314{if !isset($migration)}
315<div class="infos">
316  <ul>
317    <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>
318  </ul>
319</div>
320
321<p>
322  <input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');">
323</p>
324{/if}
325{/if}
326</div> {* content *}
327<div style="text-align: center">{$L_INSTALL_HELP}</div>
328</div> {* the_page *}
329</body>
330</html>
Note: See TracBrowser for help on using the repository browser.