source: trunk/install/install3.php@ 22

Last change on this file since 22 was 2, checked in by root, 15 years ago

importo il progetto

File size: 8.1 KB
RevLine 
[2]1<?php
2
3/************************************************************************/
4/* Eleonline */
5/* ============================================ */
6/* Installer was based on Joomla Installer */
7/************************************************************************/
8
9
10/** Include common.php */
11require_once( 'common.php' );
12
13$DBhostname = mosGetParam( $_POST, 'DBhostname', '' );
14$DBuserName = mosGetParam( $_POST, 'DBuserName', '' );
15$DBpassword = mosGetParam( $_POST, 'DBpassword', '' );
16$DBname = mosGetParam( $_POST, 'DBname', '' );
17$DBPrefix = mosGetParam( $_POST, 'DBPrefix', 'soraldo' );
18$sitename = mosGetParam( $_POST, 'sitename', '' ) ;
19$nomecomune = mosGetParam( $_POST, 'nomecomune', '' ) ;
20$istat = mosGetParam( $_POST, 'istat', '' ) ;
21$Capoluogo = mosGetParam( $_POST, 'Capoluogo', '' );
22$Lingua = mosGetParam( $_POST, 'Lingua', '' );
23$Multicomune = mosGetParam( $_POST, 'Multicomune', '' );
24$Replica = mosGetParam( $_POST, 'Replica', '' );
25
26//tema
27$tema = mosGetParam( $_POST, 'tema', '' );
28$sceltatema = mosGetParam( $_POST, 'sceltatema', '' );
29$blocco = mosGetParam( $_POST, 'blocco', '' );
30$flash = mosGetParam( $_POST, 'flash', '' );
31// d'hondt
32
33$Limite = mosGetParam( $_POST, 'Limite', '' );
34
35$adminName = mosGetParam( $_POST, 'adminName', '');
36$adminEmail = mosGetParam( $_POST, 'adminEmail', '');
37$CreateUSer = intval( mosGetParam( $_POST, 'CreateUSer', 1 ) );
38$configArray['siteUrl'] = trim( mosGetParam( $_POST, 'siteUrl', '' ) );
39$configArray['absolutePath'] = trim( mosGetParam( $_POST, 'absolutePath', '' ) );
40if (get_magic_quotes_gpc()) {
41 $configArray['absolutePath'] = stripslashes(stripslashes($configArray['absolutePath']));
42 $sitename = stripslashes(stripslashes($sitename));
43}
44
45
46
47
48
49if ($sitename == '') {
50 echo "<form name=\"stepBack\" method=\"post\" action=\"install2.php\">
51 <input type=\"hidden\" name=\"DBhostname\" value=\"$DBhostname\">
52 <input type=\"hidden\" name=\"DBuserName\" value=\"$DBuserName\">
53 <input type=\"hidden\" name=\"DBpassword\" value=\"$DBpassword\">
54 <input type=\"hidden\" name=\"DBname\" value=\"$DBname\">
55 <input type=\"hidden\" name=\"DBPrefix\" value=\"$DBPrefix\">
56 <input type=\"hidden\" name=\"DBcreated\" value=1>
57
58 </form>";
59
60 echo "<script>alert('Il nome del sito non e' stato inserito'); document.stepBack.submit();</script>";
61 return;
62}
63
64echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";
65?>
66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
67<html xmlns="http://www.w3.org/1999/xhtml">
68<head>
69<title>PHP-Nuke Installer</title>
70<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
71<link rel="stylesheet" href="install.css" type="text/css" />
72<script type="text/javascript">
73<!--
74function check() {
75 // form validation check
76 var formValid = true;
77 var f = document.form;
78 if ( f.adminName.value == '' ) {
79 alert('Prego inserisci un nome per il tuo amministratore');
80 f.siteUrl.focus();
81 formValid = false;
82 } else if ( f.siteUrl.value == '' ) {
83 alert('Prego inserisci un URL corretto per il tuo sito');
84 f.siteUrl.focus();
85 formValid = false;
86 } else if ( f.absolutePath.value == '' ) {
87 alert('Prego inserisci la path assoluta del tuo sito');
88 f.absolutePath.focus();
89 formValid = false;
90 } else if ( f.adminEmail.value == '' ) {
91 alert('Prego inserisci un indirizzo email per contattare il tuo amministratore');
92 f.adminEmail.focus();
93 formValid = false;
94 } else if ( f.adminPassword.value == '' ) {
95 alert('Prego inserisci una password per il tuo amministratore');
96 f.adminPassword.focus();
97 formValid = false;
98 }
99
100 return formValid;
101}
102
103//-->
104</script>
105</head>
106<body onload="document.form.siteUrl.focus();">
107<div id="wrapper">
108 <div id="header">
109 <div id="eleonline"><img src="header_install.png" alt="Installazione Eleonline" title="Installazione Eleonline" /></div>
110 </div>
111</div>
112
113<div id="ctr" align="center">
114 <form action="install4.php" method="post" name="form" id="form" onsubmit="return check();">
115 <input type="hidden" name="DBhostname" value="<?php echo "$DBhostname"; ?>" />
116 <input type="hidden" name="DBuserName" value="<?php echo "$DBuserName"; ?>" />
117 <input type="hidden" name="DBpassword" value="<?php echo "$DBpassword"; ?>" />
118 <input type="hidden" name="DBname" value="<?php echo "$DBname"; ?>" />
119 <input type="hidden" name="DBPrefix" value="<?php echo "$DBPrefix"; ?>" />
120
121 <input type="hidden" name="sitename" value="<?php echo "$sitename"; ?>" />
122 <input type="hidden" name="nomecomune" value="<?php echo "$nomecomune"; ?>" />
123 <input type="hidden" name="istat" value="<?php echo "$istat"; ?>" />
124 <input type="hidden" name="Capoluogo" value="<?php echo "$Capoluogo"; ?>" />
125 <input type="hidden" name="Lingua" value="<?php echo "$Lingua"; ?>" />
126 <input type="hidden" name="Multicomune" value="<?php echo "$Multicomune"; ?>" />
127 <input type="hidden" name="Replica" value="<?php echo "$Replica"; ?>" />
128
129 <input type="hidden" name="tema" value="<?php echo "$tema"; ?>" />
130 <input type="hidden" name="sceltatema" value="<?php echo "$sceltatema"; ?>" />
131 <input type="hidden" name="blocco" value="<?php echo "$blocco"; ?>" />
132 <input type="hidden" name="flash" value="<?php echo "$flash"; ?>" />
133
134
135 <input type="hidden" name="Limite" value="<?php echo "$Limite"; ?>" />
136
137
138
139 <div class="install">
140 <div id="stepbar">
141 <div class="step-off">inizio</div>
142 <div class="step-off">licenza</div>
143 <div class="step-off">passo 1</div>
144 <div class="step-off">passo 2</div>
145 <div class="step-on">passo 3</div>
146 <div class="step-off">passo 4</div>
147 </div>
148 <div id="right">
149 <div id="step">passo 3</div>
150 <div class="far-right">
151 <input class="button" type="submit" name="next" value="Avanti >>"/>
152 </div>
153 <div class="clr"></div>
154 <h1>Creazione Amministratore Super User</h1>
155 <div class="install-text">
156
157 <p>Il Super User o Admin ID di default e' <b>suser</b> Puoi cambiarlo da questo form<br /><br />
158 Inserisci il tuo indirizzo email, che sara' l'indirizzo email dell'amministratore del sito.<br /><br />
159 Inserisci la tua password (il sistema genera una password casuale).
160 </p>
161 </div>
162 <div class="install-form">
163 <div class="form-block">
164 <table class="content2">
165 <tr>
166 <td nowarp>Admin ID:</td>
167 <td align="center"><input class="inputbox" type="text" name="adminName" value="<?php echo "$adminName"; ?>" size="40" /></td>
168<?php
169 $abspath = "";
170 if ($configArray['absolutePath'])
171 $abspath = $configArray['absolutePath'];
172 else {
173 $path = getcwd();
174 if (preg_match("/\/install/i", "$path"))
175 $abspath = str_replace('/install',"",$path);
176 else
177 $abspath = str_replace('\install',"",$path);
178 }
179?>
180 <input type="hidden" name="absolutePath" value="<?php echo $abspath; ?>" /></td>
181 </tr>
182<?php
183 $url = "";
184 if ($configArray['siteUrl'])
185 $url = $configArray['siteUrl'];
186 else {
187 $port = ( $_SERVER['SERVER_PORT'] == 80 ) ? '' : ":".$_SERVER['SERVER_PORT'];
188 $root = $_SERVER['SERVER_NAME'].$port.$_SERVER['PHP_SELF'];
189 $root = str_replace("install/","",$root);
190 $root = str_replace("/install3.php","",$root);
191 $url = "http://".$root."/client";
192 }
193?>
194 <tr>
195 <td nowarp>URL del sito:</td>
196 <td align="center"><input class="inputbox" type="text" name="siteUrl" value="<?php echo $url; ?>" size="40" /></td>
197 </tr>
198 <tr>
199 <td nowarp>Tua E-mail:</td>
200 <td align="center"><input class="inputbox" type="text" name="adminEmail" value="<?php echo "$adminEmail"; ?>" size="40" /></td>
201 </tr>
202 <tr>
203 <td nowarp>Admin password:</td>
204 <td align="center"><input class="inputbox" type="text" name="adminPassword" value="<?php echo mosMakePassword(8); ?>" size="40"/>
205 </td>
206 </tr>
207
208
209
210 </table>
211 <p></p>
212 </div>
213 </div>
214 <div id="break"></div>
215 </div>
216 <div class="clr"></div>
217 </div>
218 </form>
219</div>
220<div class="clr"></div>
221<?php include("footer.php"); ?>
222</body>
223</html>
Note: See TracBrowser for help on using the repository browser.