"; echo " "; echo "Indirizzo Email non valido"; echo " "; echo ""; return; } if($DBhostname && $DBuserName && $DBname) { $configArray['DBhostname'] = $DBhostname; $configArray['DBuserName'] = $DBuserName; $configArray['DBpassword'] = $DBpassword; $configArray['DBname'] = $DBname; $configArray['DBPrefix'] = $DBPrefix; } else { echo "
"; echo ' " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " />'; echo "
"; echo ""; return; } if ($sitename) { if (!get_magic_quotes_gpc()) { $configArray['sitename'] = addslashes($sitename); } else { $configArray['sitename'] = $sitename; } } else { echo "
"; echo ' " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> '; echo "
"; echo ""; return; } if (file_exists( '../client/config.php' )) { $canWrite = is_writable( '../client/config.php' ); } else { $canWrite = is_writable( '../client' ); } // admin if (file_exists( '../client/config.php' )) { $canWrite2 = is_writable( '../admin/config.php' ); } else { $canWrite2 = is_writable( '../admin' ); } if ($siteUrl) { $configArray['siteUrl']=$siteUrl; // Fix for Windows $absolutePath= str_replace("\\\\","/", $absolutePath); $configArray['absolutePath']=$absolutePath; ######################################################################### # Config visualizzazione $config = "\n"; ##################################################################################### # config amministrazione ##################################################################################### $config_adm = "\n"; if ($canWrite && ($fp = fopen("../client/config.php", "w"))) { fputs( $fp, $config, strlen( $config ) ); fclose( $fp ); } else { $canWrite = false; } if ($canWrite2 && ($fp = fopen("../admin/config.php", "w"))) { fputs( $fp, $config_adm, strlen( $config_adm ) ); fclose( $fp ); } else { $canWrite2 = false; } $database = new PDO("mysql:host=$DBhostname;charset=latin1", $DBuserName, $DBpassword, array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION)); $sql = "use $DBname"; $database->exec($sql); // create the admin user $cryptpass = md5( $adminPassword ); //$query = "INSERT INTO {$configArray['DBPrefix']}_authors VALUES ('$adminName', '$adminName', '0', '$adminEmail', '$cryptpass','1','0','0','1','it')"; $query = "UPDATE {$configArray['DBPrefix']}_authors SET aid='$adminName', name='$adminName', email='$adminEmail', pwd= '$cryptpass' WHERE aid='suser'"; $database->exec( $query ); // create Comune try{ $query = "INSERT INTO {$configArray['DBPrefix']}_ele_comuni VALUES ('$istat', '$nomecomune', '','','','','$Limite','$Capoluogo','','','0','')"; $database->exec( $query ); } catch(PDOException $e) {} $query = "UPDATE {$configArray['DBPrefix']}_config SET sitename='$sitename', siteurl='$siteUrl', adminmail='$adminEmail', tema='$tema', foot='',language='$Lingua',blocco='$blocco',fileout='$Replica',Versione='3', siteistat='$istat',multicomune='$Multicomune',flash='$flash', tema_on='$sceltatema' WHERE sitename=''"; $database->exec( $query ); // touch config table $date = date("F Y"); $query = "UPDATE {$configArray['DBPrefix']}_config SET sitename='$sitename', siteurl='$siteUrl', startdate='$date', adminmail='$adminEmail'"; $database->exec( $query ); } else { ?>
" /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> '; ?>
inizio
licenza
passo 1
passo 2
passo 3
passo 4