本文整理汇总了PHP中install_fin_html函数的典型用法代码示例。如果您正苦于以下问题:PHP install_fin_html函数的具体用法?PHP install_fin_html怎么用?PHP install_fin_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了install_fin_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install_etape_sup1_dist
function install_etape_sup1_dist()
{
$adresse_db = _request('adresse_db');
if (!$adresse_db AND defined('_INSTALL_HOST_DB'))
$adresse_db =_INSTALL_HOST_DB;
$login_db = _request('login_db');
if (!$login_db AND defined('_INSTALL_USER_DB'))
$login_db = _INSTALL_USER_DB;
$pass_db = _request('pass_db');
if (!$pass_db AND defined('_INSTALL_PASS_DB'))
$pass_db = _INSTALL_PASS_DB;
$server_db =_request('server_db');
if (!$server_db AND defined('_INSTALL_SERVER_DB'))
$server_db = _INSTALL_SERVER_DB;
// Ceci indique la base principale (passe en hidden)
// pour qu'on la refuse comme choix de base secondaire
$sel_db =_request('sel_db');
if (!$sel_db AND defined('_INSTALL_NAME_DB'))
$sel_db = _INSTALL_NAME_DB;
echo install_debut_html(_T('config_titre_base_sup'));
$link = spip_connect_db($adresse_db, 0, $login_db, $pass_db, '', $server_db);
$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
= $GLOBALS['spip_' . $server_db .'_functions_' . $GLOBALS['spip_sql_version']];
if ($link) {
$GLOBALS['connexions'][$server_db] = $link;
echo '<div style="background-color: #eeeeee">';
echo "\n<!--\n", join(', ', $link), " $login_db ";
echo join(', ', $GLOBALS['connexions'][$server_db]);
echo "\n-->\n<p class='resultat'><b>";
echo _T('info_connexion_ok'),"</b></p>\n";
echo '<!-- ', sql_version($server_db), ' -->' ;
$l = bases_referencees();
array_push($l, $sel_db);
list(, $res) = install_etape_liste_bases($server_db, $login_db, $l);
$hidden = predef_ou_cache($adresse_db,$login_db,$pass_db, $server_db)
. (defined('_INSTALL_NAME_DB')
? ''
: ("\n<input type='hidden' name='sel_db' value='$sel_db' />\n"));
echo install_etape_sup1_form($hidden, '', $res, 'sup2');
echo '</div>';
} else {
echo info_etape(_T('info_connexion_base'));
echo "<p class='resultat'><b>",
_T('avis_connexion_echec_1'),
"</b></p>";
}
echo install_fin_html();
}
示例2: install_etape_1_dist
function install_etape_1_dist()
{
echo install_debut_html();
// stopper en cas de grosse incompatibilite de l'hebergement
tester_compatibilite_hebergement();
// Recuperer les anciennes donnees pour plus de facilite (si presentes)
$s = !@is_readable(_FILE_CONNECT_TMP) ? '' : analyse_fichier_connection(_FILE_CONNECT_TMP);
list($adresse_db, $login_db) = $s ? $s : login_hebergeur();
$chmod = (isset($_GET['chmod']) and preg_match(',^[0-9]+$,', $_GET['chmod'])) ? sprintf('%04o', $_GET['chmod']) : '0777';
if (@is_readable(_FILE_CHMOD_TMP)) {
$s = @join('', @file(_FILE_CHMOD_TMP));
if (preg_match("#define\\('_SPIP_CHMOD', (.*)\\)#", $s, $regs)) {
$chmod = $regs[1];
}
}
$db = array($adresse_db, _T('entree_base_donnee_2'));
$login = array($login_db, _T('entree_login_connexion_2'));
$pass = array($pass_db, _T('entree_mot_passe_2'));
$predef = array(defined('_INSTALL_SERVER_DB') ? _INSTALL_SERVER_DB : '', defined('_INSTALL_HOST_DB'), defined('_INSTALL_USER_DB'), defined('_INSTALL_PASS_DB'));
echo info_progression_etape(1, 'etape_', 'install/');
// ces deux chaines de langues doivent etre reecrites
# echo info_etape(_T('info_connexion_mysql'), _T('texte_connexion_mysql').aide ("install1", true));
echo info_etape(_T('info_connexion_base_donnee'));
echo install_connexion_form($db, $login, $pass, $predef, "\n<input type='hidden' name='chmod' value='{$chmod}' />", 2);
echo install_fin_html();
}
示例3: install_etape_4_dist
function install_etape_4_dist()
{
// creer le repertoire cache, qui sert partout !
if (!@file_exists(_DIR_CACHE)) {
$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
}
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
echo info_progression_etape(4, 'etape_', 'install/');
echo "<div class='success'><b>" . _T('info_derniere_etape') . "</b><p>" . _T('info_utilisation_spip') . "</p></div>";
echo "<p>" . _T('plugin_info_plugins_dist_1', array('plugins_dist' => "<tt>" . joli_repertoire(_DIR_PLUGINS_DIST) . "</tt>")) . "</p>";
// installer les extensions
include_spip('inc/plugin');
$afficher = charger_fonction("afficher_liste", 'plugins');
echo $afficher(self(), liste_plugin_files(_DIR_PLUGINS_DIST), array(), array(), _DIR_PLUGINS_DIST, 'afficher_nom_plugin');
// si la base de SPIP est up, on peut installer les plugins, sinon on passe cette etape
// car les plugins supposent que la base de SPIP est dans son etat normal (mise a jour)
// au premier passage dans l'espace prive on aura une demande d'upgrade qui se poursuit sur la page plugin
// et procede alors a l'installation
if (!isset($GLOBALS['meta']['version_installee']) or $GLOBALS['spip_version_base'] == str_replace(',', '.', $GLOBALS['meta']['version_installee'])) {
plugin_installes_meta();
}
// mettre a jour si necessaire l'adresse du site
// securite si on arrive plus a se loger
include_spip('inc/config');
appliquer_adresse_site('');
// aller a la derniere etape qui clos l'install et redirige
$suite = "\n<input type='hidden' name='etape' value='fin' />" . bouton_suivant(_T('login_espace_prive'));
echo generer_form_ecrire('install', $suite);
echo install_fin_html();
}
示例4: etape_ldap5_suite
function etape_ldap5_suite()
{
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
echo info_etape(_T('info_ldap_ok'), info_progression_etape(5, 'etape_ldap', 'install/'), _T('info_terminer_installation'));
echo generer_form_ecrire('install', "<input type='hidden' name='etape' value='3' />" . "<input type='hidden' name='ldap_present' value='true' />" . bouton_suivant());
echo install_fin_html();
}
示例5: install_etape_ldap4_dist
function install_etape_ldap4_dist()
{
$adresse_ldap = _request('adresse_ldap');
$login_ldap = _request('login_ldap');
$pass_ldap = _request('pass_ldap');
$port_ldap = _request('port_ldap');
$base_ldap = _request('base_ldap');
$base_ldap_text = _request('base_ldap_text');
if (!$base_ldap) {
$base_ldap = $base_ldap_text;
}
echo install_debut_html();
$ldap_link = ldap_connect($adresse_ldap, $port_ldap);
@ldap_bind($ldap_link, $login_ldap, $pass_ldap);
// Essayer de verifier le chemin fourni
$r = @ldap_compare($ldap_link, $base_ldap, "objectClass", "");
$fail = ldap_errno($ldap_link) == 32;
if ($fail) {
echo info_etape(_T('info_chemin_acces_annuaire')), info_progression_etape(3, 'etape_ldap', 'install/', true), "<div class='error'><p><b>" . _T('avis_operation_echec') . "</b></p><p>" . _T('avis_chemin_invalide_1'), " (<tt>" . htmlspecialchars($base_ldap) . "</tt>) " . _T('avis_chemin_invalide_2') . "</p></div>";
} else {
info_etape(_T('info_reglage_ldap'));
echo info_progression_etape(4, 'etape_ldap', 'install/');
$statuts = liste_statuts_ldap();
$statut_ldap = defined('_INSTALL_STATUT_LDAP') ? _INSTALL_STATUT_LDAP : $GLOBALS['liste_des_statuts']['info_redacteurs'];
$res = install_propager(array('adresse_ldap', 'port_ldap', 'login_ldap', 'pass_ldap', 'protocole_ldap', 'tls_ldap')) . "<input type='hidden' name='etape' value='ldap5' />" . "<input type='hidden' name='base_ldap' value='" . htmlentities($base_ldap) . "' />" . fieldset(_T('info_statut_utilisateurs_1'), array('statut_ldap' => array('label' => _T('info_statut_utilisateurs_2') . '<br />', 'valeur' => $statut_ldap, 'alternatives' => $statuts))) . install_ldap_correspondances() . bouton_suivant();
echo generer_form_ecrire('install', $res);
}
echo install_fin_html();
}
示例6: install_etape_4_dist
function install_etape_4_dist()
{
// creer le repertoire cache, qui sert partout !
if (!@file_exists(_DIR_CACHE)) {
$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
}
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
echo info_progression_etape(4, 'etape_', 'install/');
echo "<div class='success'><b>" . _T('info_derniere_etape') . "</b><p>" . _T('info_utilisation_spip') . "</p></div>";
echo "<p>" . _T('plugin_info_plugins_dist_1', array('plugins_dist' => "<tt>" . joli_repertoire(_DIR_PLUGINS_DIST) . "</tt>")) . "</p>";
// installer les extensions
include_spip('inc/plugin');
$afficher = charger_fonction("afficher_liste", 'plugins');
echo $afficher(self(), liste_plugin_files(_DIR_PLUGINS_DIST), array(), array(), _DIR_PLUGINS_DIST, 'afficher_nom_plugin');
plugin_installes_meta();
// mettre a jour si necessaire l'adresse du site
// securite si on arrive plus a se loger
include_spip('inc/config');
appliquer_adresse_site('');
// aller a la derniere etape qui clos l'install et redirige
$suite = "\n<input type='hidden' name='etape' value='fin' />" . bouton_suivant(_T('login_espace_prive'));
echo generer_form_ecrire('install', $suite);
echo install_fin_html();
}
示例7: base_restaurer_dist
function base_restaurer_dist($titre = '', $reprise = false)
{
$status_file = _DUMP_STATUS_FILE;
$status_file = _DIR_TMP . basename($status_file) . ".txt";
if (!lire_fichier($status_file, $status) or !($status = unserialize($status))) {
} else {
$redirect = parametre_url(generer_action_auteur('restaurer', _DUMP_STATUS_FILE), "step", intval(_request('step') + 1), '&');
$timeout = ini_get('max_execution_time');
// valeur conservatrice si on a pas reussi a lire le max_execution_time
if (!$timeout) {
$timeout = 30;
}
// parions sur une valeur tellement courante ...
$max_time = time() + $timeout / 2;
include_spip('inc/minipres');
@ini_set("zlib.output_compression", "0");
// pour permettre l'affichage au fur et a mesure
$titre = _T('dump:restauration_en_cours') . " (" . count($status['tables']) . ") ";
$balise_img = chercher_filtre('balise_img');
$titre .= $balise_img(chemin_image('searching.gif'));
echo install_debut_html($titre);
// script de rechargement auto sur timeout
echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . $timeout * 1000 . ")");
echo "<div style='text-align: left'>\n";
dump_serveur($status['connect']);
spip_connect('dump');
// au premier coup on ne fait rien sauf afficher l'ecran de sauvegarde
if (_request('step')) {
$options = array('callback_progression' => 'dump_afficher_progres', 'max_time' => $max_time, 'no_erase_dest' => lister_tables_noerase(), 'where' => $status['where'] ? $status['where'] : array(), 'desc_tables_dest' => array());
if ($desc = sql_getfetsel('valeur', 'spip_meta', "nom='dump_structure_temp'", '', '', '', '', 'dump') and $desc = unserialize($desc)) {
$options['desc_tables_dest'] = $desc;
}
#var_dump(sql_allfetsel('nom,valeur','spip_meta',"",'','','','','dump'));
#die();
$res = base_copier_tables($status_file, $status['tables'], 'dump', '', $options);
} else {
// mais on en profite pour reparer les version base pour etre sur de ne pas les perdre
sql_updateq("spip_meta", array('impt' => 'oui'), "nom='version_installee'", '', 'dump');
sql_updateq("spip_meta", array('impt' => 'oui'), "nom LIKE '%_base_version'", '', 'dump');
}
echo "</div>\n";
if (!$res) {
echo dump_relance($redirect);
}
echo install_fin_html();
ob_end_flush();
flush();
if (!$res) {
exit;
}
// quand on sort de $export avec true c'est qu'on a fini
dump_end(_DUMP_STATUS_FILE, 'restaurer');
include_spip('inc/headers');
echo redirige_formulaire(generer_url_ecrire("restaurer", 'status=' . _DUMP_STATUS_FILE, '', true, true));
}
}
示例8: install_etape_ldap1_dist
function install_etape_ldap1_dist()
{
$adresse_ldap = defined('_INSTALL_HOST_LDAP') ? _INSTALL_HOST_LDAP : 'localhost';
$port_ldap = defined('_INSTALL_PORT_LDAP') ? _INSTALL_PORT_LDAP : 389;
$tls_ldap = defined('_INSTALL_TLS_LDAP') ? _INSTALL_TLS_LDAP : 'non';
$protocole_ldap = defined('_INSTALL_PROTOCOLE_LDAP') ? _INSTALL_PROTOCOLE_LDAP : 3;
// on essaie 2 en cas d'echec
$login_ldap = defined('_INSTALL_USER_LDAP') ? _INSTALL_USER_LDAP : '';
$pass_ldap = defined('_INSTALL_PASS_LDAP') ? _INSTALL_PASS_LDAP : '';
echo install_debut_html();
echo info_etape(_T('titre_connexion_ldap'), info_progression_etape(1, 'etape_ldap', 'install/'), _T('entree_informations_connexion_ldap'));
echo generer_form_ecrire('install', "\n<input type='hidden' name='etape' value='ldap2' />" . fieldset(_T('entree_adresse_annuaire'), array('adresse_ldap' => array('label' => _T('texte_adresse_annuaire_1'), 'valeur' => $adresse_ldap), 'port_ldap' => array('label' => _T('entree_port_annuaire') . '<br />' . _T('texte_port_annuaire'), 'valeur' => $port_ldap), 'tls_ldap' => array('label' => '<b>' . _T('tls_ldap') . '</b>', 'valeur' => $tls_ldap, 'alternatives' => array('non' => _T('item_non'), 'oui' => _T('item_oui'))), 'protocole_ldap' => array('label' => _T('protocole_ldap'), 'valeur' => $protocole_ldap, 'alternatives' => array('3' => '3', '2' => '2')))) . "\n<p>" . _T('texte_acces_ldap_anonyme_1') . '</p>' . fieldset(_T('connexion_ldap'), array('login_ldap' => array('label' => _T('texte_login_ldap_1'), 'valeur' => $login_ldap), 'pass_ldap' => array('label' => _T('entree_passe_ldap'), 'valeur' => $pass_ldap))) . bouton_suivant());
echo install_fin_html();
}
示例9: install_etape_ldap3_dist
function install_etape_ldap3_dist()
{
$adresse_ldap = _request('adresse_ldap');
$login_ldap = _request('login_ldap');
$pass_ldap = _request('pass_ldap');
$port_ldap = _request('port_ldap');
$base_ldap_text = defined('_INSTALL_BASE_LDAP') ? _INSTALL_BASE_LDAP : "ou=users, dc=mon-domaine, dc=com";
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
echo info_etape(_T('info_chemin_acces_1'), info_progression_etape(3, 'etape_ldap', 'install/')), _T('info_chemin_acces_2');
$ldap_link = @ldap_connect("{$adresse_ldap}", "{$port_ldap}");
if ($ldap_link) {
@ldap_bind($ldap_link, "{$login_ldap}", "{$pass_ldap}");
$result = @ldap_read($ldap_link, "", "objectclass=*", array("namingContexts"));
$info = @ldap_get_entries($ldap_link, $result);
@ldap_close($ldap_link);
}
$checked = false;
$res = '';
if (is_array($info) and $info["count"] > 0) {
$res .= "<p>" . _T('info_selection_chemin_acces') . "</p>";
$res .= "<ul>";
$n = 0;
for ($i = 0; $i < $info["count"]; $i++) {
$names = $info[$i]["namingcontexts"];
if (is_array($names)) {
for ($j = 0; $j < $names["count"]; $j++) {
$n++;
$res .= "<li><input name=\"base_ldap\" value=\"" . spip_htmlspecialchars($names[$j]) . "\" type='radio' id='tab{$n}'";
if (!$checked) {
$res .= " checked=\"checked\"";
$checked = true;
}
$res .= " />";
$res .= "<label for='tab{$n}'>" . spip_htmlspecialchars($names[$j]) . "</label></li>\n";
}
}
}
$res .= "</ul>";
$res .= _T('info_ou') . " ";
}
$res .= "<br />\n<input name=\"base_ldap\" value=\"\" type='radio' id='manuel'";
if (!$checked) {
$res .= " checked=\"checked\"";
$checked = true;
}
$res .= " />" . "\n<label for='manuel'>" . _T('entree_chemin_acces') . "</label> " . "\n<fieldset>" . "<input type='text' name='base_ldap_text' class='text' value=\"{$base_ldap_text}\" size='40' />" . "\n</fieldset>" . "\n<input type='hidden' name='etape' value='ldap4' />" . install_propager(array('adresse_ldap', 'port_ldap', 'login_ldap', 'pass_ldap', 'protocole_ldap', 'tls_ldap')) . bouton_suivant();
echo generer_form_ecrire('install', $res);
echo install_fin_html();
}
示例10: base_convert_utf8_dist
function base_convert_utf8_dist($titre='', $reprise=false)
{
if (!$titre) return; // anti-testeur automatique
// une liste des tables a convertir, avec le champ dans lequel on
// indique '<CONVERT charset>' ; on commence par les rubriques sinon
// ca fait desordre dans l'interface privee
$tables_a_convertir = array(
'spip_rubriques' => 'titre',
'spip_auteurs' => 'nom',
'spip_articles' => 'titre',
'spip_breves' => 'titre',
'spip_documents' => 'titre',
'spip_forum' => 'titre',
'spip_mots' => 'titre',
'spip_groupes_mots' => 'titre',
'spip_petitions' => 'texte',
'spip_signatures' => 'nom_email',
'spip_syndic' => 'nom_site',
'spip_syndic_articles' => 'titre',
'spip_messages' => 'titre'
);
if (!$reprise) convert_utf8_init($tables_a_convertir);
echo install_debut_html($titre);
echo "<p>", _T('utf8_convert_timeout'), "</p><hr />\n";
// preparer un fichier de sauvegarde au cas ou
// on met 'a' car ca peut demander plusieurs rechargements
$f = @fopen(_DIR_TMP.'convert_utf8_backup.sql', 'a');
foreach ($tables_a_convertir as $table => $champ) {
convert_table_utf8($f, $table, $champ);
}
if ($f) fclose($f);
echo "<p><b>"._T('utf8_convert_termine')."</b></p>";
echo "<p>,"._T('utf8_convert_verifier', array('rep' => joli_repertoire(_DIR_TMP))), '</p>';
// bouton "retour au site" + redirige_par_entete
echo "<p style='text-align: right'>",
"<a href='", generer_url_ecrire("config_lang"), "'> >> ",
_T('icone_retour'),"</a></p>",
install_fin_html();
}
示例11: install_etape_2_dist
function install_etape_2_dist()
{
$adresse_db = defined('_INSTALL_HOST_DB') ? _INSTALL_HOST_DB : _request('adresse_db');
if (preg_match(',(.*):(.*),', $adresse_db, $r)) {
list(, $adresse_db, $port) = $r;
} else {
$port = '';
}
$login_db = defined('_INSTALL_USER_DB') ? _INSTALL_USER_DB : _request('login_db');
$pass_db = defined('_INSTALL_PASS_DB') ? _INSTALL_PASS_DB : _request('pass_db');
$server_db = defined('_INSTALL_SERVER_DB') ? _INSTALL_SERVER_DB : _request('server_db');
$name_db = defined('_INSTALL_NAME_DB') ? _INSTALL_NAME_DB : '';
$chmod = _request('chmod');
$link = spip_connect_db($adresse_db, $port, $login_db, $pass_db, $name_db, $server_db);
$GLOBALS['connexions'][$server_db] = $link;
$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
echo install_debut_html();
// prenons toutes les dispositions possibles pour que rien ne s'affiche !
/*
* /!\ sqlite3/PDO : erreur sur join(', ', $link)
* L'objet PDO ne peut pas etre transformee en chaine
* Un echo $link ne fonctionne pas non plus
* Il faut utiliser par exemple print_r($link)
*/
//echo "\n<!--\n", join(', ', $link), " $login_db ";
$db_connect = 0;
// revoirfunction_exists($ferrno) ? $ferrno() : 0;
//echo join(', ', $GLOBALS['connexions'][$server_db]);
//echo "\n-->\n";
if ($db_connect == "0" && $link) {
echo "<div class='success'><b>" . _T('info_connexion_ok') . "</b></div>";
echo info_progression_etape(2, 'etape_', 'install/');
echo info_etape(_T('menu_aide_installation_choix_base') . aide("install2", true));
echo "\n", '<!-- ', sql_version($server_db), ' -->';
list($checked, $res) = install_etape_2_bases($login_db, $server_db);
$hidden = (defined('_SPIP_CHMOD') ? '' : "\n<input type='hidden' name='chmod' value='" . spip_htmlspecialchars($chmod) . "' />") . predef_ou_cache($adresse_db . ($port ? ':' . $port : ''), $login_db, $pass_db, $server_db);
echo install_etape_2_form($hidden, $checked, $res, 3);
} else {
echo info_progression_etape(1, 'etape_', 'install/', true);
echo "<div class='error'>";
echo info_etape(_T('info_connexion_base'));
echo "<h3>" . _T('avis_connexion_echec_1') . "</h3>";
echo "<p>" . _T('avis_connexion_echec_2') . "</p>";
echo "<p style='font-size: small;'>", _T('avis_connexion_echec_3'), "</p></div>";
}
echo install_fin_html();
}
示例12: install_etape_ldap2_dist
function install_etape_ldap2_dist()
{
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
$adresse_ldap = _request('adresse_ldap');
$port_ldap = _request('port_ldap');
$tls_ldap = _request('tls_ldap');
$protocole_ldap = _request('protocole_ldap');
$login_ldap = _request('login_ldap');
$pass_ldap = _request('pass_ldap');
$port_ldap = intval($port_ldap);
$tls = false;
if ($tls_ldap == 'oui') {
if ($port_ldap == 636) {
$adresse_ldap = "ldaps://{$adresse_ldap}";
} else {
$tls = true;
}
}
$ldap_link = ldap_connect($adresse_ldap, $port_ldap);
$erreur = "ldap_connect({$adresse_ldap}, {$port_ldap})";
if ($ldap_link) {
if (!ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap)) {
$protocole_ldap = 2;
ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap);
}
if ($tls === true) {
if (!ldap_start_tls($ldap_link)) {
$erreur = "ldap_start_tls({$ldap_link}) {$adresse_ldap}, {$port_ldap}";
$ldap_link = false;
}
}
if ($ldap_link) {
$ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap);
$erreur = "ldap_bind('{$ldap_link}', '{$login_ldap}', '{$pass_ldap}'): {$adresse_ldap}, {$port_ldap}";
}
}
if ($ldap_link) {
echo info_etape(_T('titre_connexion_ldap'), info_progression_etape(2, 'etape_ldap', 'install/')), _T('info_connexion_ldap_ok');
echo generer_form_ecrire('install', "\n<input type='hidden' name='etape' value='ldap3' />" . "\n<input type='hidden' name='adresse_ldap' value=\"{$adresse_ldap}\" />" . "\n<input type='hidden' name='port_ldap' value=\"{$port_ldap}\" />" . "\n<input type='hidden' name='login_ldap' value=\"{$login_ldap}\" />" . "\n<input type='hidden' name='pass_ldap' value=\"{$pass_ldap}\" />" . "\n<input type='hidden' name='protocole_ldap' value=\"{$protocole_ldap}\" />" . "\n<input type='hidden' name='tls_ldap' value=\"{$tls_ldap}\" />" . bouton_suivant());
} else {
echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true), "<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . "</p>", "<p>" . _T('avis_connexion_ldap_echec_2') . "<br />\n" . _T('avis_connexion_ldap_echec_3') . '<br /><br />' . $erreur . '<b> ?</b></p></div>';
}
echo install_fin_html();
}
示例13: install_etape_4_dist
function install_etape_4_dist()
{
// creer le repertoire cache, qui sert partout !
if(!@file_exists(_DIR_CACHE)) {
$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
$rep = sous_repertoire(_DIR_TMP, $rep, true,true);
}
echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
echo info_progression_etape(4,'etape_','install/');
echo "<p>"
._L('Les extensions ci-dessous sont chargées et activées dans le répertoire @extensions@.', array('extensions' => joli_repertoire(_DIR_EXTENSIONS)))
."</p>";
// installer les extensions
include_spip('inc/plugin');
$afficher = charger_fonction("afficher_liste",'plugins');
echo $afficher(self(), liste_plugin_files(_DIR_EXTENSIONS),array(), _DIR_EXTENSIONS,'afficher_nom_plugin');
installe_plugins();
echo info_etape(_T('info_derniere_etape'),
_T('info_utilisation_spip')
);
// mettre a jour si necessaire l'adresse du site
// securite si on arrive plus a se loger
include_spip('inc/config');
$_POST['adresse_site'] = '';
appliquer_modifs_config();
// aller a la derniere etape qui clos l'install et redirige
$suite = "\n<input type='hidden' name='etape' value='fin' />"
. bouton_suivant(_T('login_espace_prive'));
echo generer_form_ecrire('install', $suite); echo install_fin_html();
}
示例14: inc_sauvegarder_dist
function inc_sauvegarder_dist($status_file, $redirect = '')
{
$status_file = _DIR_TMP . basename($status_file) . ".txt";
if (!lire_fichier($status_file, $status) or !($status = unserialize($status))) {
} else {
$timeout = ini_get('max_execution_time');
// valeur conservatrice si on a pas reussi a lire le max_execution_time
if (!$timeout) {
$timeout = 30;
}
// parions sur une valeur tellement courante ...
$max_time = time() + $timeout / 2;
include_spip('inc/minipres');
@ini_set("zlib.output_compression", "0");
// pour permettre l'affichage au fur et a mesure
$titre = _T('dump:sauvegarde_en_cours') . " (" . count($status['tables']) . ") ";
$balise_img = chercher_filtre('balise_img');
$titre .= $balise_img(chemin_image('searching.gif'));
echo install_debut_html($titre);
// script de rechargement auto sur timeout
echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . $timeout * 1000 . ")");
echo "<div style='text-align: left'>\n";
dump_serveur($status['connect']);
spip_connect('dump');
// au premier coup on ne fait rien sauf afficher l'ecran de sauvegarde
$res = false;
if (_request('step')) {
$options = array('callback_progression' => 'dump_afficher_progres', 'max_time' => $max_time, 'no_erase_dest' => lister_tables_noerase(), 'where' => $status['where'] ? $status['where'] : array());
$res = base_copier_tables($status_file, $status['tables'], '', 'dump', $options);
}
echo "</div>\n";
if (!$res and $redirect) {
echo dump_relance($redirect);
}
echo install_fin_html();
ob_end_flush();
flush();
return $res;
}
}
示例15: install_etape_3_dist
function install_etape_3_dist()
{
$ldap_present = _request('ldap_present');
if (!$ldap_present) {
$adresse_db = defined('_INSTALL_HOST_DB') ? _INSTALL_HOST_DB : _request('adresse_db');
$login_db = defined('_INSTALL_USER_DB') ? _INSTALL_USER_DB : _request('login_db');
$pass_db = defined('_INSTALL_PASS_DB') ? _INSTALL_PASS_DB : _request('pass_db');
$server_db = defined('_INSTALL_SERVER_DB') ? _INSTALL_SERVER_DB : _request('server_db');
$chmod_db = defined('_SPIP_CHMOD') ? _SPIP_CHMOD : _request('chmod');
$choix_db = defined('_INSTALL_NAME_DB') ? _INSTALL_NAME_DB : _request('choix_db');
$sel_db = $choix_db == "new_spip" ? _request('table_new') : $choix_db;
$res = install_bases($adresse_db, $login_db, $pass_db, $server_db, $choix_db, $sel_db, $chmod_db);
if ($res) {
$res = info_progression_etape(2, 'etape_', 'install/', true) . "<div class='error'><h3>" . _T('avis_operation_echec') . "</h3>" . $res . "<p>" . _T('texte_operation_echec') . "</p>" . "</div>";
}
} else {
$res = '';
list($adresse_db, $login_db, $pass_db, $sel_db, $server_db) = analyse_fichier_connection(_FILE_CONNECT_TMP);
$GLOBALS['connexions'][$server_db] = spip_connect_db($adresse_db, $sel_db, $login_db, $pass_db, $sel_db, $server_db);
}
if (!$res) {
if (file_exists(_FILE_CONNECT_TMP)) {
include _FILE_CONNECT_TMP;
} else {
redirige_url_ecrire('install');
}
if (file_exists(_FILE_CHMOD_TMP)) {
include _FILE_CHMOD_TMP;
} else {
redirige_url_ecrire('install');
}
$hidden = predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) . (defined('_INSTALL_NAME_DB') ? '' : "\n<input type='hidden' name='sel_db' value='{$sel_db}' />");
$auteur_obligatoire = $ldap_present ? 0 : !sql_countsel('spip_auteurs', '', '', '', $server_db);
$res = "<div class='success'><b>" . _T('info_base_installee') . "</b></div>" . install_premier_auteur(_request('email'), _request('login'), _request('nom'), _request('pass'), $hidden, $auteur_obligatoire) . (($ldap_present or !function_exists('ldap_connect')) ? '' : install_propose_ldap());
}
echo install_debut_html();
echo $res;
echo install_fin_html();
}