include_once '../libs/admin_config.php'; $config = new pliggconfig(); $config->create_file('../settings.php'); $my_base_url = "http://" . $_SERVER["HTTP_HOST"]; $my_pligg_base = dirname($_SERVER["PHP_SELF"]); $my_pligg_base = str_replace("/" . substr(strrchr($my_pligg_base, '/'), 1), '', $my_pligg_base); $sql = "Update " . table_config . " set `var_value` = '" . $my_base_url . "' where `var_name` = '" . '$my_base_url' . "';"; mysql_query($sql, $conn); $sql = "Update " . table_config . " set `var_value` = '" . $my_pligg_base . "' where `var_name` = '" . '$my_pligg_base' . "';"; mysql_query($sql, $conn); // Set the site language to what the user has been using during the installation $language = addslashes(strip_tags($_REQUEST['language'])); $sql = "Update " . table_config . " set `var_value` = '" . $language . "' where `var_name` = '" . '$language' . "';"; mysql_query($sql, $conn); $config = new pliggconfig(); $config->create_file('../settings.php'); include_once '../config.php'; // Remove the cookie setting a template value setcookie("template", "", time() - 60000, $my_pligg_base, $domain); $output = '<div class="instructions"><p>' . $lang['EnterAdmin'] . '</p> <table> <form id="form1" name="form1" action="install.php" method="post"> <tr> <td><label>' . $lang['AdminLogin'] . '</label></td> <td><input name="adminlogin" type="text" class="form-control" value="" placeholder="Admin" /></td> </tr> <tr> <td><label>' . $lang['AdminPassword'] . '</label></td> <td><input name="adminpassword" type="password" class="form-control" value="" /></td> </tr>
include_once 'version/2.0.1.php'; include_once 'version/2.0.2.php'; include_once 'version/2.0.3.php'; } echo '<li>Regenerating the totals table</li>'; totals_regenerate(); echo '<li>Clearing /cache directory</li>'; include_once '../internal/Smarty.class.php'; $smarty = new Smarty(); $smarty->config_dir = ''; $smarty->compile_dir = "../cache"; $smarty->template_dir = "../templates"; $smarty->config_dir = ".."; $smarty->clear_compiled_tpl(); include mnminclude . 'admin_config.php'; $config = new pliggconfig(); $config->create_file("../settings.php"); echo '</ul></p><div class="alert alert-info">' . $lang['IfNoError'] . '</div></p>'; //end of if post submit is Yes. } //end of no errors } else { echo DisplayErrors($errors); echo '<p>' . $lang['PleaseFix'] . '</p>'; } echo '</div>'; // .well $include = 'footer.php'; if (file_exists($include)) { include_once $include; }