示例#1
0
文件: install.php 项目: antiherro/smm
function install()
{
    if (!isset($_GET['step'])) {
        hello_screen();
    } else {
        $step = $_GET['step'];
        switch ($step) {
            case 'test':
                testserver();
                break;
            case 'unzip':
                unzip();
                break;
            case 'database':
                dbconfig();
                break;
            case 'admin':
                adminconf();
                break;
            case 'final':
                finalstep();
                break;
            default:
                hello_screen();
        }
    }
}
示例#2
0
        return 'la fonction fmod n\'est pas activé !';
    }
    echo '<div style="clear:both;"><!-- --></div></div>';
    echo '<div style="width: 380px; border-bottom: 1px solid #DDDDDD; padding: 2px;">';
    echo '<span style="float: left;width: 300px;">REGISTER_GLOBALS</span> ';
    if (!ini_get('register_globals')) {
        echo '<span style="color: #00AA00; font-weight: bold;"> Non </span>';
    } else {
        echo '<span style="color: #EE0000; font-weight: bold;"> Oui </span>';
        return 'Veuillez désactiver le register_globals';
    }
    echo '<div style="clear:both;"><!-- --></div></div>';
    echo '<div style="width: 380px; border-bottom: 1px solid #DDDDDD; padding: 2px;">';
    echo '<span style="float: left;width: 300px;">SAFE_MODE</span> ';
    if (!ini_get('safe_mode')) {
        echo '<span style="color: #00AA00; font-weight: bold;"> Non </span>';
    } else {
        echo '<span style="color: #EE0000; font-weight: bold;"> Oui </span>';
        return 'Veuillez désactiver le safe_mode';
    }
    echo '<div style="clear:both;"><!-- --></div></div>';
    echo '</div>';
    return 'ok';
}
echo '[Test du serveur]';
$rep = testserver();
if ($rep == 'ok') {
    echo '<p><b> Le site fonctionnerait parfaitement sur votre serveur [à condition que votre version Mysql est supérieur ou égal à la version 5.0]! connectez vous à votre PHPMYADMIN et executez la requête suivante : <b>SELECT VERSION();</b></p>';
} else {
    echo '<p><b>PROBLEME, LE SITE NE PEUT PAS FONCTIONNER CAR: ' . $rep . '</b></p>';
}
示例#3
0
function _gettpl($install_step)
{
    global $conf, $used_langs, $site_root, $path_result, $this_script_dir;
    switch ($install_step) {
        case 'acess_denied':
            $conf['tooltext'] = ucwords($conf['lang_error']);
            $conf['spannedtext'] = $conf['lang_access_denied'];
            break;
        case 'testserver':
            $conf['spannedtext'] = $conf['lang_testservertext1'];
            @($conf['spannedtext'] .= testserver());
            $conf['tooltext'] = $conf['lang_tooltexttesserver'];
            if ($conf['testserver_ok']) {
                $conf['buttonbar'] = $conf['buttonbar2'];
                $conf['spannedtext'] .= '<br />' . $conf['lang_testservertext3'];
            } else {
                $conf['spannedtext'] .= '<br />' . $conf['lang_testservertext2'];
            }
            break;
        case 'setmode':
            $conf['tooltext'] = $conf['lang_setmode'];
            $conf['setmodetext1'] = $conf['lang_you_setmode'];
            $conf['setmodetext2'] = '<div onclick="document.Form.setmode[0].checked = 1;"><input style="background-color: transparent;" name="setmode" type="radio" value="m" checked>' . $conf['lang_setmode_chmod_files'] . '<br />' . $conf['lang_setmode_chmod_files1'] . '</div><br />';
            $conf['setmodetext2'] .= '<div onclick="document.Form.setmode[1].checked = 1;"><input style="background-color: transparent;" name="setmode" type="radio" value="c">' . $conf['lang_setmode_compr_files'] . '<br />' . $conf['lang_setmode_compr_files1'] . '</div><br />';
            $filenamecount = glob("*.auae");
            if (count($filenamecount) > 0) {
                $conf['setmodetext2'] .= '<div onclick="document.Form.setmode[2].checked = 1;"><input style="background-color: transparent;" name="setmode" type="radio" value="d">' . $conf['lang_setmode_decompr_files'] . '<br />' . $conf['lang_setmode_decompr_files1'] . '</div><br />';
            }
            $conf['spannedtext'] = $conf['setmodetext1'] . $conf['setmodetext2'] . $conf['lang_you_setchoice'] . '. ' . $conf['lang_welcometext3'];
            $conf['buttonbar'] = $conf['buttonbar2'];
            break;
        case 'chmode':
            $conf['tooltext'] = $conf['lang_setmode_chmod_files'];
            $conf['buttonbar'] = $conf['buttonbar2'];
            $conf['spannedtext'] = $conf['lang_enter_chmodpath'];
            $conf['spannedtext'] .= '<br />
    <input name="postpath" type="text" value="' . $site_root . '" style="width:90%;" /><br /><br />
  <table class="tablebody" style="margin: 0px;padding: 0px;width: 90%;">
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup1" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup1.checked=true;"><input style="width: 100%" type="text" name="cmodlist1" /></td>
      <td onclick="document.Form.cmodgroup1.checked=true;"><input type="text" name="cmodmode1" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup2" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup2.checked=true;"><input style="width: 100%" type="text" name="cmodlist2" /></td>
      <td onclick="document.Form.cmodgroup2.checked=true;"><input type="text" name="cmodmode2" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup3" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup3.checked=true;"><input style="width: 100%" type="text" name="cmodlist3" /></td>
      <td onclick="document.Form.cmodgroup3.checked=true;"><input type="text" name="cmodmode3" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="otherfiles" value="ON" /></td>
      <td width="96%" onclick="var current_status = document.Form.otherfiles.checked; document.Form.otherfiles.checked = !current_status;">' . $conf['lang_other_files'] . '</td>
      <td onclick="document.Form.otherfiles.checked=true;"><input type="text" name="cmodmodeother" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="newdirperms" value="ON" /></td>
      <td width="96%" onclick="var current_status = document.Form.newdirperms.checked; document.Form.newdirperms.checked = !current_status;">' . $conf['lang_dir_perms'] . '</td>
      <td onclick="document.Form.newdirperms.checked=true;"><input type="text" name="cmodmodedirs" size="3" maxlength="3" /></td>
    </tr>
  </table>

';
            $conf['spannedtext'] .= '<br />';
            $conf['spannedtext'] .= $conf['lang_welcometext3'];
            break;
        case 'comprpath':
            $conf['tooltext'] = $conf['lang_comprpath'];
            $conf['buttonbar'] = $conf['buttonbar2'];
            $conf['spannedtext'] = $conf['lang_enter_comprpath'] . '<br />';
            $conf['spannedtext'] .= '<input name="postpath" type="text" value="' . $site_root . '" style="width:90%;" /><br />';
            $conf['spannedtext'] .= $conf['lang_archivename'] . '<br />';
            $conf['spannedtext'] .= '<input name="archivename" type="text" value="auae_data_' . date('Y-m-d_H-i') . '" style="width:40%;" />.auae';
            $conf['spannedtext'] .= '<br />

  <table class="tablebody" style="margin: 0px;padding: 0px;width: 90%;">
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="exludesubdirs" value="ON" /></td>
      <td colspan="2" onclick="var current_status = document.Form.exludesubdirs.checked; document.Form.exludesubdirs.checked = !current_status;">' . $conf['lang_exludesubdirs'] . '</td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="exludethisdir" value="ON" /></td>
      <td width="47%" onclick="var current_status = document.Form.exludethisdir.checked; document.Form.exludethisdir.checked = !current_status;">' . $conf['lang_exludethisdir'] . '</td>
      <td width="50%" onclick="document.Form.exludethisdir.checked=true;"><input type="text" name="exludethisdirmode" style="width: 100%" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="onlythisext" value="ON" /></td>
      <td width="47%" onclick="var current_status = document.Form.onlythisext.checked; document.Form.onlythisext.checked = !current_status;">' . $conf['lang_onlythisext'] . '</td>
      <td width="50%" onclick="document.Form.onlythisext.checked=true;"><input type="text" name="onlythisextmode" style="width: 100%" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="onlyfilesize" value="ON" /></td>
      <td width="47%" onclick="var current_status = document.Form.onlyfilesize.checked; document.Form.onlyfilesize.checked = !current_status;">' . $conf['lang_onlyfilesize'] . '</td>
      <td width="50%" onclick="document.Form.onlyfilesize.checked=true;"><input type="text" name="onlyfilesizemode" style="width: 100%" /></td>
    </tr>
  </table>
';
            $conf['spannedtext'] .= '<br />';
            $conf['spannedtext'] .= $conf['lang_welcometext3'];
            break;
        case 'decomprpath':
            $conf['tooltext'] = $conf['lang_decomprpath'];
            $conf['buttonbar'] = $conf['buttonbar2'];
            $conf['spannedtext'] = $conf['lang_enter_decomprpath'];
            $conf['spannedtext'] .= "\n" . '<br /><input name="postpath" type="text" value="' . $site_root . '" style="width:90%;" /><br />' . "\n";
            $filenamecount = glob("*.auae");
            if (count($filenamecount) > 1) {
                $conf['spannedtext'] .= $conf['lang_selarchive'] . '<br />' . "\n";
                $conf['spannedtext'] .= '<select size="1" name="selarchive">' . "\n";
                foreach ($filenamecount as $filenamele) {
                    $conf['spannedtext'] .= '<option value="' . $filenamele . '">' . $filenamele . '</option>' . "\n";
                }
                $conf['spannedtext'] .= '</select>' . "\n";
            } else {
                $conf['spannedtext'] .= '<input name="selarchive" type="hidden" value="' . $filenamecount[0] . '">' . "\n";
            }
            $conf['spannedtext'] .= '
  <table class="tablebody" style="margin: 0px;padding: 0px;width: 90%;">
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup1" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup1.checked=true;"><input style="width: 100%" type="text" name="cmodlist1" /></td>
      <td onclick="document.Form.cmodgroup1.checked=true;"><input type="text" name="cmodmode1" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup2" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup2.checked=true;"><input style="width: 100%" type="text" name="cmodlist2" /></td>
      <td onclick="document.Form.cmodgroup2.checked=true;"><input type="text" name="cmodmode2" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="cmodgroup3" value="ON" /></td>
      <td width="96%" onclick="document.Form.cmodgroup3.checked=true;"><input style="width: 100%" type="text" name="cmodlist3" /></td>
      <td onclick="document.Form.cmodgroup3.checked=true;"><input type="text" name="cmodmode3" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="otherfiles" value="ON" /></td>
      <td width="96%" onclick="var current_status = document.Form.otherfiles.checked; document.Form.otherfiles.checked = !current_status;">' . $conf['lang_other_files'] . '</td>
      <td onclick="document.Form.otherfiles.checked=true;"><input type="text" name="cmodmodeother" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="newdirperms" value="ON" /></td>
      <td width="96%" onclick="var current_status = document.Form.newdirperms.checked; document.Form.newdirperms.checked = !current_status;">' . $conf['lang_newdir_perms'] . '</td>
      <td onclick="document.Form.newdirperms.checked=true;"><input type="text" name="cmodmodedirs" size="3" maxlength="3" /></td>
    </tr>
    <tr>
      <td width="3%"><input style="background-color: transparent;" type="checkbox" name="overwrite" value="ON" /></td>
      <td colspan="2" onclick="var current_status = document.Form.overwrite.checked; document.Form.overwrite.checked = !current_status;">' . $conf['lang_overwrite_files'] . '</td>
    </tr>
  </table>

';
            $conf['spannedtext'] .= '<br />';
            $conf['spannedtext'] .= $conf['lang_welcometext3'];
            break;
        case 'chmodding':
            $conf['tooltext'] = $conf['lang_chmodresult'];
            $conf['spannedtext'] = $conf['lang_chmodresult2'] . '<br /><br />';
            $conf['spannedtext'] .= '<div style="width: 100%;height: 80%;border: 0px;padding: 0px;overflow: auto;overflow-x: hidden;">';
            $conf['spannedtext'] .= $path_result;
            $conf['spannedtext'] .= '</div>';
            $conf['buttonbar'] = $conf['buttonbar3'];
            break;
        case 'compress':
            $conf['tooltext'] = $conf['lang_comprresult'];
            $conf['lang_comprresult2'] = str_replace('auae_data.auae', $_POST['archivename'], $conf['lang_comprresult2']);
            $conf['spannedtext'] = $conf['lang_comprresult2'] . '<br /><br />';
            $conf['spannedtext'] .= '<div style="width: 100%;height: 80%;border: 0px;padding: 0px;overflow: auto;overflow-x: hidden;">';
            $conf['spannedtext'] .= $path_result;
            $conf['spannedtext'] .= '</div>';
            $conf['buttonbar'] = $conf['buttonbar3'];
            break;
        case 'decompress':
            $conf['tooltext'] = $conf['lang_decomprresult'];
            $conf['lang_decomprresult2'] = str_replace('auae_data.auae', $_POST['selarchive'], $conf['lang_decomprresult2']);
            $conf['spannedtext'] = $conf['lang_decomprresult2'] . '<br /><br />';
            $conf['spannedtext'] .= '<div style="width: 100%;height: 80%;border: 0px;padding: 0px;overflow: auto;overflow-x: hidden;">';
            $conf['spannedtext'] .= $path_result;
            $conf['spannedtext'] .= '</div>';
            $conf['buttonbar'] = $conf['buttonbar3'];
            break;
        default:
            $conf['spannedtext'] = $conf['spannedtext_welcome'];
            $conf['spannedtext'] .= '<br /><br />';
            if (count($used_langs) > 1) {
                $conf['spannedtext'] .= $conf['lang_can_select_lang'] . ':';
                $conf['lang_tool'] = '<input name="lang_value_formset" type="hidden" value="off">
                <select size="1" name="lang_value" onchange="this.form.lang_value_formset.value = \'on\'; this.form.submit();">';
                foreach ($used_langs as $used_langs_k => $used_langs_v) {
                    $conf['lang_tool'] .= '<option value = "' . $used_langs_k . '"' . (trim($conf['lang_id']) === $used_langs_k ? ' selected' : '') . '>' . $used_langs_v . '</option>';
                }
                $conf['lang_tool'] .= '</select>';
                $conf['spannedtext'] .= $conf['lang_tool'];
            }
            $conf['tooltext'] = $conf['lang_tooltextwelcome'];
            $conf['buttonbar'] = $conf['buttonbar1'];
    }
    if (!isset($conf['lang_charset'])) {
        $conf['lang_charset'] = 'utf-8';
    }
    $auae_tpl_file = $this_script_dir . '/auae_tpl.html';
    if (file_exists($auae_tpl_file)) {
        $buffer = file_get_contents($auae_tpl_file);
    } else {
        $buffer = _tpl_data();
    }
    $buffer = preg_replace_callback('/\\[tpl\\](\\w{1,})\\[\\/tpl\\]/', 'pattern', $buffer);
    $buffer = get_magic_quotes_gpc() ? stripslashes($buffer) : $buffer;
    $buffer = get_magic_quotes_runtime() ? stripslashes($buffer) : $buffer;
    @header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    @header("Cache-Control: no-store, no-cache, must-revalidate");
    @header("Cache-Control: post-check=0, pre-check=0", false);
    @header("Pragma: no-cache");
    echo $buffer;
}