Пример #1
0
?>
');
	}
	// If create user asked
	else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
	{
		ok=false;
		alert('<?php 
echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired"));
?>
');
	}
	else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
	{
		ok=false;
		alert('<?php 
echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired"));
?>
');
	}

	return ok;
}
</script>


<?php 
// $db->close();	Not database connexion yet
dolibarr_install_syslog("--- fileconf: end");
pFooter($err, $setuplang, 'jscheckparam');
Пример #2
0
	//alert('<?php 
echo dol_escape_js($langs->transnoentities("NextStepMightLastALongTime"));
?>
');

	document.getElementById('nextbutton').style.visibility="hidden";
	document.getElementById('pleasewait').style.visibility="visible";

	return ok;
}
</script>

<?php 
dolibarr_install_syslog("--- step1: end");
pFooter($error, $setuplang, 'jsinfo', 1);
/**
 *  Create main file. No particular permissions are set by installer.
 *
 *  @param  string		$mainfile       Full path name of main file to generate/update
 *  @param	string		$main_dir		Full path name to main.inc.php file
 *  @return	void
 */
function write_main_file($mainfile, $main_dir)
{
    $fp = @fopen("{$mainfile}", "w");
    if ($fp) {
        clearstatcache();
        fputs($fp, '<?php' . "\n");
        fputs($fp, "// Wrapper to include main into htdocs\n");
        fputs($fp, "include_once '" . $main_dir . "/main.inc.php';\n");
Пример #3
0
            print '</table>';
            print '</div>';
        }
    }
}
print '<script type="text/javascript">

$("div#AShowChoices a").click(function() {

    $("div#navail_choices").toggle();

    if ($("div#navail_choices").css("display") == "none") {
        $(this).text("' . $langs->trans('ShowNotAvailableOptions') . '");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1downarrow.png");
    } else {
        $(this).text("' . $langs->trans('HideNotAvailableOptions') . '");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1uparrow.png");
    }

});

/*
$(".runupgrade").click(function() {
	return confirm("' . dol_escape_js($langs->transnoentitiesnoconv("WarningUpgrade"), 0, 1) . '");
});
*/

</script>';
dolibarr_install_syslog("--- check: end");
pFooter(true);
// Never display next button
                foreach ($modulesfile as $modulefilelong => $modulefileshort) {
                    print '<tr><td colspan="2"><hr></td></tr>';
                    print '<tr><td class="nowrap">' . $langs->trans("ChoosedMigrateScript") . ' (external modules)</td><td align="right">' . $modulefileshort . '</td></tr>' . "\n";
                    // Run sql script
                    $okmodule = run_sql($modulefilelong, 0, '', 1);
                    // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
                }
            }
        }
    }
    print '</table>';
    if ($db->connected) {
        $db->close();
    }
}
if (empty($actiondone)) {
    print '<div class="error">' . $langs->trans("ErrorWrongParameters") . '</div>';
}
$ret = 0;
if (!$ok && isset($argv[1])) {
    $ret = 1;
}
dol_syslog("Exit " . $ret);
pFooter(!$ok && empty($_GET["ignoreerrors"]) || $versionmodule, $setuplang);
if ($db->connected) {
    $db->close();
}
// Return code if ran from command line
if ($ret) {
    exit($ret);
}
Пример #5
0
 */

$formadmin=new FormAdmin('');	// Note: $db does not exist yet but we don't need it, so we put ''.

pHeader("", "check");   // Etape suivante = index2


print '<center>';
print '<img src="../theme/dolibarr_logo.png" alt="Dolibarr logo"><br>';
print DOL_VERSION.'<br><br>';
print '</center>';

// Ask installation language
print '<br><br><center>';
print '<table>';

print '<tr>';
print '<td>'.$langs->trans("DefaultLanguage").' : </td><td align="left">';
print $formadmin->select_language('auto','selectlang',1,0,0,1);
print '</td>';
print '</tr>';

print '</table></center>';

print '<br><br>'.$langs->trans("SomeTranslationAreUncomplete");

// Si pas d'erreur, on affiche le bouton pour passer a l'etape suivante
if ($err == 0) pFooter(0);

?>
Пример #6
0
}

print '<script type="text/javascript">

$("div#AShowChoices a").click(function() {

    $("div#navail_choices").toggle();

    if ($("div#navail_choices").css("display") == "none") {
        $(this).text("'.$langs->trans('ShowNotAvailableOptions').'");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1downarrow.png");
    } else {
        $(this).text("'.$langs->trans('HideNotAvailableOptions').'");
        $(this).parent().children("img").attr("src", "../theme/eldy/img/1uparrow.png");
    }

});

/*
$(".runupgrade").click(function() {
	return confirm("'.dol_escape_js($langs->transnoentitiesnoconv("WarningUpgrade"), 0, 1).'");
});
*/

</script>';

dolibarr_install_syslog("--- check: end");
pFooter(1);	// Never display next button

Пример #7
0
    print '<tr><td>' . $langs->trans("DolibarrAdminLogin") . ' :</td><td>';
    print '<input name="login" type="text" value="' . (!empty($_GET["login"]) ? $_GET["login"] : (isset($force_install_dolibarrlogin) ? $force_install_dolibarrlogin : '')) . '"></td></tr>';
    print '<tr><td>' . $langs->trans("Password") . ' :</td><td>';
    print '<input type="password" name="pass"></td></tr>';
    print '<tr><td>' . $langs->trans("PasswordAgain") . ' :</td><td>';
    print '<input type="password" name="pass_verif"></td></tr>';
    print '</table>';
    if (isset($_GET["error"]) && $_GET["error"] == 1) {
        print '<br>';
        print '<div class="error">' . $langs->trans("PasswordsMismatch") . '</div>';
        $err = 0;
        // We show button
    }
    if (isset($_GET["error"]) && $_GET["error"] == 2) {
        print '<br>';
        print '<div class="error">';
        print $langs->trans("PleaseTypePassword");
        print '</div>';
        $err = 0;
        // We show button
    }
    if (isset($_GET["error"]) && $_GET["error"] == 3) {
        print '<br>';
        print '<div class="error">' . $langs->trans("PleaseTypeALogin") . '</div>';
        $err = 0;
        // We show button
    }
}
dolibarr_install_syslog("--- install/etape4.php end", LOG_INFO);
pFooter($err, $setuplang);
$db->close();
Пример #8
0
			}
		}

		# Boucle sur chaque fichier
		foreach($filelist as $file)
		{
			print '<tr><td nowrap>';
			print $langs->trans("ChoosedMigrateScript").'</td><td align="right">'.$file.'</td></tr>'."\n";

			$name = substr($file, 0, dol_strlen($file) - 4);

			// Run sql script
			$ok=run_sql($dir.$file, 0, '', 1);
		}
	}

	print '</table>';

	if ($db->connected) $db->close();
}


if (empty($actiondone))
{
    print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
}

pFooter(! $ok && empty($_GET["ignoreerrors"]),$setuplang);

?>
Пример #9
0
                    print '<tr><td colspan="2"><hr></td></tr>';
                    print '<tr><td class="nowrap">' . $langs->trans("ChoosedMigrateScript") . ' (external modules)</td><td align="right">' . $modulefileshort . '</td></tr>' . "\n";
                    // Run sql script
                    $okmodule = run_sql($modulefilelong, 0, '', 1);
                    // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
                }
            }
        }
    }
    print '</table>';
    if ($db->connected) {
        $db->close();
    }
}
if (empty($actiondone)) {
    print '<div class="error">' . $langs->trans("ErrorWrongParameters") . '</div>';
}
$ret = 0;
if (!$ok && isset($argv[1])) {
    $ret = 1;
}
dol_syslog("Exit " . $ret);
dolibarr_install_syslog("--- upgrade: end " . (!$ok && empty($_GET["ignoreerrors"]) || $dirmodule));
pFooter(!$ok && empty($_GET["ignoreerrors"]) || $dirmodule ? 2 : 0, $setuplang);
if ($db->connected) {
    $db->close();
}
// Return code if ran from command line
if ($ret) {
    exit($ret);
}
Пример #10
0
			print $langs->trans("DatabaseConnection") . " (" . $langs->trans("User") . " " . $_POST['couchdb_user_root'] . ") : ";
			print $dolibarr_main_couchdb_name;
			print "</td><td>";
			print $langs->trans("OK");
			print "</td></tr>";
		} catch (Exception $e) {
			$error_msg = $e->getMessage();
			$ok = 0;
		}
		if (!$ok) {
			print "<tr><td>";
			print $langs->trans("ServerConnection") . " (" . $langs->trans("User") . " " . $_POST['couchdb_user_root'] . ") : ";
			print $dolibarr_main_couchdb_host;
			print "</td><td>";
			print $error_msg;
			print "</td></tr>";
		}
	}


	print '</table>';
} else {
	print 'Parameter action=set not defined';
}

dolibarr_install_syslog("--- install/etape2.php end", LOG_INFO);

pFooter(!$ok, $setuplang);

$db->close();
?>
Пример #11
0
                        print '<center><div class="ok">' . $langs->trans("InstallChoiceSuggested") . '</div>';
                        if ($count < sizeof($migarray)) {
                            print $langs->trans("MigrateIsDoneStepByStep", DOL_VERSION);
                        }
                        print '</center>';
                        // <img src="../theme/eldy/img/tick.png" alt="Ok"> ';
                        $foundrecommandedchoice = 1;
                        // To show only once
                    }
                } else {
                    // We can not recommand a choice.
                    // A version of install may be known, but we need last upgrade.
                }
            }
            print '</td>';
            print '<td align="center">';
            if ($allowupgrade) {
                // If it's not last updagre script, action = upgrade_tmp, if last action = upgrade
                print '<a href="upgrade.php?action=upgrade' . ($count < sizeof($migrationscript) ? '_' . $versionto : '') . '&amp;selectlang=' . $setuplang . '&amp;versionfrom=' . $versionfrom . '&amp;versionto=' . $versionto . '">' . $langs->trans("Start") . '</a>';
            } else {
                print $langs->trans("NotAvailable");
            }
            print '</td>';
            print '</tr>' . "\n";
        }
        print '</table>';
        print "\n";
    }
}
pFooter(1);
// 1 car ne doit jamais afficher bouton Suivant
Пример #12
0
include_once '../core/class/html.form.class.php';
include_once '../core/class/html.formadmin.class.php';
$err = 0;
// Si fichier conf existe deja et rempli, on est pas sur une premiere install,
// on ne passe donc pas par la page de choix de langue
if (file_exists($conffile) && isset($dolibarr_main_url_root)) {
    header("Location: check.php?testget=ok");
    exit;
}
$langs->load("admin");
/*
 * View
 */
$formadmin = new FormAdmin('');
// Note: $db does not exist yet but we don't need it, so we put ''.
pHeader("", "check");
// Etape suivante = check
// Ask installation language
print '<br><br><center>';
print '<table>';
print '<tr>';
print '<td>' . $langs->trans("DefaultLanguage") . ' : </td><td align="left">';
print $formadmin->select_language('auto', 'selectlang', 1, 0, 0, 1);
print '</td>';
print '</tr>';
print '</table></center>';
print '<br><br>' . $langs->trans("SomeTranslationAreUncomplete");
// Si pas d'erreur, on affiche le bouton pour passer a l'etape suivante
if ($err == 0) {
    pFooter(0);
}
Пример #13
0
        // Actions for all version (not in database)
        migrate_delete_old_files($db, $langs, $conf);
        migrate_delete_old_dir($db, $langs, $conf);
    }
    print '</table>';
} else {
    print '<div class="error">' . $langs->trans('ErrorWrongParameters') . '</div>';
    $error++;
}
$ret = 0;
if ($error && isset($argv[1])) {
    $ret = 1;
}
dol_syslog("Exit " . $ret);
dolibarr_install_syslog("--- upgrade2: end");
pFooter($error ? 2 : 0, $setuplang);
if ($db->connected) {
    $db->close();
}
// Return code if ran from command line
if ($ret) {
    exit($ret);
}
/**
 * Reporte liens vers une facture de paiements sur table de jointure (lien n-n paiements factures)
 *
 * @param	DoliDB		$db		Database handler
 * @param	Translate	$langs	Object langs
 * @param	Conf		$conf	Object conf
 * @return	void
 */
Пример #14
0
		{
			ok=false;
			alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseSoRootRequired")); ?>');
		}
		else if (document.forminstall.db_create_database.checked == true && (document.forminstall.db_user_root.value == ''))
		{
			ok=false;
			alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseSoRootRequired")); ?>');
		}
		// If create user asked
		else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
		{
			ok=false;
			alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired")); ?>');
		}
		else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
		{
			ok=false;
			alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired")); ?>');
		}

		return ok;
	}
</script>
-->
<?php
// $db->close();	Not database connexion yet

pFooter(1, $setuplang, 'jscheckparam');
?>
Пример #15
0

/*
 *	View
 */

pHeader($langs->trans("License"),"fileconf");

// Test if we can run a first install process
if (! is_writable($conffile))
{
    print $langs->trans("ConfFileIsNotWritable",$conffiletoshow);
    pFooter(1,$setuplang,'jscheckparam');
    exit;
}

//print '<pre style="align: center; font-size: 12px">';
$result=dol_print_file($langs,"html/gpl.html",1);
if (! $result)
{
    print '<center>'."\n";
    print '<textarea readonly="1" rows="26" cols="80">';
    dol_print_file($langs,"html/gpl.txt",1);
    print '</textarea>';
    print '</center>'."\n";
}
//print '</pre>';

pFooter(0,$setuplang);
?>
Пример #16
0
                        print "</td></tr>";
                    }
                    else if ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'<br>';
                }
            }
        }
    }
}

print '</table>';



if (empty($actiondone))
{
    print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
}


print '<div class="center"><a href="../index.php?mainmenu=home&leftmenu=home&'.(isset($_POST["login"])?'&username='******'').'">';
print $langs->trans("GoToDolibarr");
print '</a></div>';

dolibarr_install_syslog("--- repair: end");
pFooter(1,$setuplang);

if ($db->connected) $db->close();

// Return code if ran from command line
if (! $ok && isset($argv[1])) exit(1);
Пример #17
0
					// We can not recommand a choice.
					// A version of install may be known, but we need last upgrade.
				}
			}
			print '</td>';
			print '<td class="listofchoices" align="center">';
			if ($allowupgrade)
			{
				// If it's not last updagre script, action = upgrade_tmp, if last action = upgrade
				print '<a href="upgrade.php?action=upgrade'.($count<count($migrationscript)?'_'.$versionto:'').'&amp;selectlang='.$setuplang.'&amp;versionfrom='.$versionfrom.'&amp;versionto='.$versionto.'">'.$langs->trans("Start").'</a>';
			}
			else
			{
				print $langs->trans("NotAvailable");
			}
			print '</td>';
			print '</tr>'."\n";
		}

		print '</table>';
		print "\n";
	}

}



pFooter(1);	// 1 car ne doit jamais afficher bouton Suivant

?>
Пример #18
0
                    </div>
                    <h5 class="content-text-list-points-title click"><i>+</i> POURQUOI AU PUF</h5>
                    <div class="content-text-list-points-content alinea justify no-display">
                        <p>Vous obtiendrez simultanément deux diplômes en informatique : une licence de l’Université Pierre et Marie Curie (Paris VI Sorbonne) et le DUT de l’université de Bordeaux. Encore les dimplômes sont internationalement reconnus, théoriques et pratiques.</p>
                        <p>Ces diplômes vous offrent une insertion professionnelle immédiate sur le marché du travail. Mais, si vous préférez, vous pouvez poursuivre en Master en France, en Europe, aux USA ou au Vietnam.</p>
                    </div>
                    <h5 class="content-text-list-points-title click"><i>+</i> ORGANISATION DES FORMATIONS</h5> 
                    <div class="content-text-list-points-content justify no-display">
                        <p>Les formations sont organisés selon :</p>
                        <ul>
                            <li><strong>Condition d’accès :</strong> être titulaire du baccalauréat.</li>
                            <li><strong>Durée et rythme de la formation :</strong> 3 ans réliartis en 6 semestres.</li>
                            <li><strong>Les matières enseignées :</strong> algorithmique, programmation et programmation objets, conception objets, bases de données, systèmes d’exploitation, réseaux, mathématiques, management, expression et communication en français et en anglais, ...</li>
                            <li><strong>Projets et stages :</strong> les 6 semestres de la formation permettent de réaliser de nombreux projets et 2 stages (semestres 4 et 6).</li>
                        </ul>
                    </div>
                </div>
            </section>
        </div>
    </div>

    <?php 
pFooter();
?>
</div>

<?php 
pDoctype("end");
$result = ob_get_contents();
ob_end_clean();
htmlCleaner::make($result);
Пример #19
0
                            $ok = 0;
                            $okallfile = 0;
                            print '<font class="error">' . $langs->trans("ErrorSQL") . " : " . $db->lasterrno() . " - " . $db->lastqueryerror() . " - " . $db->lasterror() . "</font><br>";
                        }
                    }
                }
                if ($okallfile) {
                    $db->commit();
                } else {
                    $db->rollback();
                }
            }
        }
        print "<tr><td>" . $langs->trans("ReferenceDataLoading") . "</td>";
        if ($ok) {
            print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
        } else {
            print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
            $ok = 1;
            // Data loading are not blocking errors
        }
    }
    print '</table>';
} else {
    print 'Parameter action=set not defined';
}
dolibarr_install_syslog("--- step2: end");
pFooter($ok ? 0 : 1, $setuplang);
if (isset($db) && is_object($db)) {
    $db->close();
}