<?php if (!defined('SECURITY_CONSTANT')) { exit; } echo '<form method="POST" action="./install.php">'; echo '<input type="hidden" name="step" value="1" />'; echo 'Select installation language: <select name="language">'; // Loading language list. Each language file has setted "$languageName" variable. echo '<option value="en">English</option>'; $languageFileList = opendir('./install/lang/'); while ($languageFile = readdir($languageFileList)) { if ($languageFile != '.' and $languageFile != '..' and substr($languageFile, strlen($languageFile) - 4, 4) == '.php') { include './install/lang/' . $languageFile; $shortLanguageName = substr($languageFile, 0, strlen($languageFile) - 4); echo '<option value="', addSlashesOnDoubleQuotes($shortLanguageName), '">', $languageName, '</option>'; } } closedir($languageFileList); echo '</select>'; //--------------- echo '<br /><br />'; echo '<input type="submit" value="Continue" />'; echo '</form>';
if (!defined('SECURITY_CONSTANT')) { exit; } if (parseConfig() == NO_WRITE_PERMISION) { echo translate("Plugin WIRIS Installer hasn't write permisions on"), ' ./wrs_config.php<br /><br />'; echo errorMessage('conf'); } else { echo '<form name="installerForm" action="./install.php" method="POST">'; echo '<input type="hidden" name="step" value="5" />'; echo '<input type="hidden" name="language" value="', addSlashesOnDoubleQuotes($shortLanguageName), '" />'; echo translate('Plugin WIRIS installation has been completed.'), '<br /><br />'; echo translate('Important! Now, you must manually activate WIRIS filter in your moodle setup'), ':<br /><br />'; echo translate('For'), ' moodle 1.6.5, ', translate('go to'), '<b>Administration > Configuration > Filters</b>.<br />'; echo translate('For'), ' moodle >= 1.7, ', translate('go to'), '<b>Administration > Modules > Filters</b>.<br /><br />'; echo translate('Then, check WIRIS filter as like this'), ':<br />'; echo '<img src="./install/img/filter.jpeg" /><br /><br />'; echo '<input type="checkbox" id="activated" />', translate("I've just activated WIRIS"), '<br /><br />'; echo ' <script type="text/javascript"> function submitForm() { if (document.getElementById("activated").checked) { document.installerForm.submit(); } else { alert("', translate('Important! Now, you must manually activate WIRIS filter in your moodle setup'), '"); } } </script>'; echo '<input type="button" value="', addSlashesOnDoubleQuotes(translate('Continue')), '" onclick="submitForm();" />'; }
} else { if ($response == NO_READ_PERMISION) { echo translate("Plugin WIRIS Installer hasn't read permisions on"), ' ../lib/weblib.php<br /><br />'; echo errorMessage('acthtml'); } else { if ($response == ALREADY_PARSED) { echo '<form action="./install.php" method="POST">'; echo '<input type="hidden" name="step" value="3" />'; echo '<input type="hidden" name="language" value="', addSlashesOnDoubleQuotes($shortLanguageName), '" />'; if (isset($_POST['proxy']) and isset($_POST['proxy_host']) and isset($_POST['proxy_port'])) { echo '<input type="hidden" name="proxy" value="1" />'; echo '<input type="hidden" name="proxy_host" value="', addslashes($_POST['proxy_host']), '" />'; echo '<input type="hidden" name="proxy_port" value="', (int) $_POST['proxy_port'], '" />'; } echo translate('Plugin WIRIS is already installed. If you want to reinstall it, please, uninstall it first'), ' <a href="http://www.wiris.com/download/moodle/uninstall.html">', translate('here'), '</a> ', translate('or'), ':<br /><br />'; echo '<input type="submit" name="restore" value="', addSlashesOnDoubleQuotes(translate('Restore') . ' ../lib/weblib.php ' . translate('and try to reinstall.')), '"><br /><br />'; echo errorMessage('acthtml'); echo '<div id="information">'; echo '<ul>'; echo '<li>../lib/weblib.php.old ', translate('will be restored to'), ' ../lib/weblib.php</li>'; echo '</ul>'; echo '</div>'; echo '</form>'; } else { if ($response == CAN_NOT_CONNECT) { echo translate('Could not connect to http://www.wiris.com/download/moodle/versions.php. It is needed to get a patch for your moodle version.'); echo errorMessage('acthtml'); } } } }
<?php if (!defined('SECURITY_CONSTANT')) { exit; } echo '<form action="./install.php" method="POST">'; echo '<input type="hidden" name="step" value="2" />'; echo '<input type="hidden" name="language" value="', addSlashesOnDoubleQuotes($shortLanguageName), '" />'; include '../version.php'; echo translate('Your moodle version is'), ' ', $version, ', ', translate('release'), ' ', $release, '<br />'; echo '<p>', translate('Is it correct?'), '<br /><br />'; echo '<input type="submit" name="option" value="', addSlashesOnDoubleQuotes(translate('Yes')), '" /> <input type="submit" name="option" value="', addSlashesOnDoubleQuotes(translate('No')), '" /></p>'; echo '</form>';
<?php if (!defined('SECURITY_CONSTANT')) { exit; } if ($_POST['option'] == translate('Yes')) { echo translate('Thanks for use Plugin WIRIS. If you want to uninstall Plugin WIRIS, click'), ' <a href="http://www.wiris.com/download/moodle/uninstall.html">', translate('here'), '</a>.<br /><br />'; echo '<a href="..">', translate('Go to my moodle'), '</a>'; } else { echo '<form action="./install.php" method="POST">'; echo '<input type="hidden" name="step" value="7" />'; echo '<input type="hidden" name="language" value="', addSlashesOnDoubleQuotes($shortLanguageName), '" />'; echo translate("Please, if Plugin WIRIS doesn't work, report to info@mathsformore.com."), '<br /><br />'; echo '<input type="submit" name="restore" value="', addSlashesOnDoubleQuotes(translate('Restore my system as if Plugin WIRIS had never been installed')), '" /><br /><br />'; echo errorMessage(); echo '<div id="information">'; echo '<ul>'; echo '<li>../lib/weblib.php.old ', translate('will be restored to'), '../lib/weblib.php</li>'; echo '<li>../filter/wiris ', translate('will be deleted.'), '</li>'; echo '<li>./install.php ', translate('will be deleted.'), '</li>'; echo '</ul>'; echo '</div>'; echo '</form>'; }