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
RevLine 
[996]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2"http://www.w3.org/TR/html4/strict.dtd">
[2819]3<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
[859]4<head>
[2248]5<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
[996]6<meta http-equiv="Content-script-type" content="text/javascript">
7<meta http-equiv="Content-Style-Type" content="text/css">
[5123]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}
[5219]12<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.id}/theme.css">
[5123]13{/foreach}
14
15<script type="text/javascript" src="themes/default/js/jquery.packed.js"></script>
[2248]16{literal}
[5123]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
[859]34<style type="text/css">
[5257]35body {
36  background:url("admin/themes/roma/images/bottom-left-bg.jpg") no-repeat fixed left bottom #111111;
37}
38
[2747]39.content {
[5257]40 background:url("admin/themes/roma/images/fillet.png") repeat-x scroll left top #222222;
[2747]41 width: 800px;
42 margin: auto;
43 text-align: center;
[5257]44 padding: 5px;
[859]45}
46
[5257]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
[2747]74.table2 {
75  width: 100%;
76  margin-bottom: 1em !important;
[859]77}
[1855]78
[2747]79TD {
[1855]80  text-align: left;
[2747]81  padding: 0.1em 0.5em;
82  height: 2.5em;
[1855]83}
84
[5408]85.infos {
86  background-color:transparent;
87  border:none;
88  color:#999;
89}
90
[2752]91.sql_content, .infos a {
[2747]92  color: #ff3363;
[1855]93}
[5571]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}
[859]104</style>
[2248]105{/literal}
[2747]106<title>Piwigo {$RELEASE} - {'Installation'|@translate}</title>
[859]107</head>
[2747]108
[859]109<body>
[2747]110<div id="headbranch"></div> {* Dummy block for double background management *}
[3074]111<div id="the_page">
[2747]112<div id="theHeader"></div>
113<div id="content" class="content">
[859]114
[2747]115<h2>Piwigo {$RELEASE} - {'Installation'|@translate}</h2>
116
[5571]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
[2747]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>
[2248]145{/if}
146
[2747]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
[2248]157{if isset($install)}
158<form method="POST" action="{$F_ACTION}" name="install_form">
[2747]159
160  <table class="table2">
161    <tr class="throw">
[5021]162      <th colspan="2">{'Basic configuration'|@translate}</th>
[859]163    </tr>
164    <tr>
[5021]165      <td style="width: 30%">{'Default gallery language'|@translate}</td>
[2747]166      <td>
[2248]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>
[859]170      </td>
171    </tr>
[2747]172  </table>
173  <table class="table2">
174    <tr class="throw">
[5021]175      <th colspan="3">{'Database configuration'|@translate}</th>
[859]176    </tr>
[4410]177    {if count($F_DB_ENGINES)>1}
[859]178    <tr>
[5021]179      <td style="width: 30%;">{'Database type'|@translate}</td>
[4410]180      <td>
[4985]181        <select name="dblayer" id="dblayer">
182          {foreach from=$F_DB_ENGINES key=k item=v}
183          <option value="{$k}"
[5220]184                  {if $k==$F_DB_LAYER and $v.available} selected="selected"{/if}
185                  {if !$v.available} disabled="disabled"{/if}
[4985]186                  >{$v.label}</option>
187          {/foreach}
[4410]188        </select>   
189      </td>
[5021]190      <td>{'The type of database your piwigo data will be store in'|@translate}</td>
[4410]191    {else}
192    <td colspan="3">
193    <input type="hidden" name="dbengine" value="{$F_DB_LAYER}">
194    </td>
195    {/if}
196    </tr>
197    <tr>
[5021]198      <td style="width: 30%;">{'Host'|@translate}</td>
[3185]199      <td align=center><input type="text" name="dbhost" value="{$F_DB_HOST}"></td>
[5021]200      <td>{'localhost, sql.multimania.com, toto.freesurf.fr'|@translate}</td>
[859]201    </tr>
202    <tr>
[5021]203      <td>{'User'|@translate}</td>
[3185]204      <td align=center><input type="text" name="dbuser" value="{$F_DB_USER}"></td>
[5021]205      <td>{'user login given by your host provider'|@translate}</td>
[859]206    </tr>
207    <tr>
[5021]208      <td>{'Password'|@translate}</td>
[3185]209      <td align=center><input type="password" name="dbpasswd" value=""></td>
[5021]210      <td>{'user password given by your host provider'|@translate}</td>
[859]211    </tr>
212    <tr>
[5021]213      <td>{'Database name'|@translate}</td>
[3185]214      <td align=center><input type="text" name="dbname" value="{$F_DB_NAME}"></td>
[5021]215      <td>{'also given by your host provider'|@translate}</td>
[859]216    </tr>
217    <tr>
[5021]218      <td>{'Database table prefix'|@translate}</td>
[3185]219      <td align=center><input type="text" name="prefix" value="{$F_DB_PREFIX}"></td>
[5021]220      <td>{'database tables names will be prefixed with it (enables you to manage better your tables)'|@translate}</td>
[859]221    </tr>
[2747]222  </table>
223
224  <table class="table2">
225    <tr class="throw">
[5021]226      <th colspan="3">{'Admin configuration'|@translate}</th>
[859]227    </tr>
228    <tr>
[5021]229      <td style="width: 30%;">{'Webmaster login'|@translate}</td>
[3185]230      <td align="center"><input type="text" name="admin_name" value="{$F_ADMIN}"></td>
[5021]231      <td>{'It will be shown to the visitors. It is necessary for website administration'|@translate}</td>
[859]232    </tr>
233    <tr>
[5021]234      <td>{'Webmaster password'|@translate}</td>
[3185]235      <td align="center"><input type="password" name="admin_pass1" value=""></td>
[5021]236      <td>{'Keep it confidential, it enables you to access administration panel'|@translate}</td>
[859]237    </tr>
238    <tr>
[5021]239      <td>{'Password [confirm]'|@translate}</td>
[3185]240      <td align="center"><input type="password" name="admin_pass2" value=""></td>
[5021]241      <td>{'verification'|@translate}</td>
[859]242    </tr>
243    <tr>
[5021]244      <td>{'Webmaster mail address'|@translate}</td>
[3185]245      <td align="center"><input type="text" name="admin_mail" value="{$F_ADMIN_EMAIL}"></td>
[5021]246      <td>{'Visitors will be able to contact site administrator with this mail'|@translate}</td>
[859]247    </tr>
[2747]248  </table>
249
250  <table>
[859]251    <tr>
[2747]252      <td style="text-align: center;">
[5021]253        <input class="submit" type="submit" name="install" value="{'Start Install'|@translate}">
[859]254      </td>
255    </tr>
256  </table>
257</form>
[2902]258{else}
259<p>
[5408]260  <input type="button" name="Home" value="{'Visit Gallery'|@translate}" onClick="window.open('index.php');">
[2902]261</p>
[3382]262
[4423]263{if !isset($migration)}
[3382]264<div class="infos">
265  <ul>
[5021]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>
[3382]267  </ul>
268</div>
269
270<p>
[4423]271  <input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');">
[3382]272</p>
[2248]273{/if}
[4423]274{/if}
[2747]275</div> {* content *}
276<div style="text-align: center">{$L_INSTALL_HELP}</div>
[3074]277</div> {* the_page *}
[2747]278</body>
[996]279</html>
Note: See TracBrowser for help on using the repository browser.