/** * Web site configuration; * @last edit: $arsalanshah * @Reason: Initial; * @return bool; */ function configurations_site() { $params = array('siteurl' => $this->weburl, 'datadir' => $this->datadir); $this->path = str_replace('installation/', '', ossn_installation_paths()->root); $templateFile = $this->path . "configurations/ossn.config.site.example.php"; $template = file_get_contents($templateFile); if (!$template) { throw new Exception(ossn_installation_print('all:files:required')); } foreach ($params as $k => $v) { $template = str_replace("<<" . $k . ">>", $v, $template); } $settingsFilename = $this->path . "configurations/ossn.config.site.php"; $result = file_put_contents($settingsFilename, $template); if (!$result) { return false; } return true; }
<div style="margin:0 auto; "> <div class="ossn-default"> <div class="ossn-top"> <table border="0"> <tr> <td> </td> <td> <div class="buddyexpresss-search-box inline" style="margin-top: -50px;"></div> </td> </tr> </table> </div> <div id="ossn-page-menubar"> <li><a href="#"><?php echo ossn_installation_print("ossn:installation"); ?> </a></li> <li><a href="#"> > </a></li> <li><a href="#"><?php echo $params['title']; ?> </a></li> </li> </div> </div> <div> <div> <?php
<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ echo '<div><div class="layout-installation">'; echo '<div class="ossn-installation-message ossn-installation-success">' . ossn_installation_print('ossn:installed:message') . '</div><br />'; echo '<a href="' . ossn_installation_paths()->url . '?action=finish" class="button-blue primary">' . ossn_installation_print('ossn:install:finish') . '</a>'; echo '</div>';
<?php } ?> </select> </div> <br/> <div> <label> <?php echo ossn_print('gender'); ?> </label> <span><input type="radio" name="gender" value="male"/> <?php echo ossn_print('male'); ?> </span> <span><input type="radio" name="gender" value="female"/> <?php echo ossn_print('female'); ?> </span> </div> <br/> <input type="submit" value="<?php echo ossn_installation_print('ossn:install:create'); ?> " class="button-blue primary"/> </from> </form>
$error[] = 'apache'; } if (OssnInstallation::is_mod_rewrite()) { echo '<div class="ossn-installation-message ossn-installation-success">' . ossn_installation_print('ossn:install:modrewrite') . '</div>'; } else { echo '<div class="ossn-installation-message ossn-installation-fail">' . ossn_installation_print('ossn:install:modrewrite:required') . '</div>'; $error[] = 'mod_rewrite'; } if (OssnInstallation::isCurl()) { echo '<div class="ossn-installation-message ossn-installation-success">' . ossn_installation_print('ossn:install:curl') . '</div>'; } else { echo '<div class="ossn-installation-message ossn-installation-fail">' . ossn_installation_print('ossn:install:curl:required') . '</div>'; $error[] = 'php:curl'; } if (OssnInstallation::isPhpGd()) { echo '<div class="ossn-installation-message ossn-installation-success">' . ossn_installation_print('ossn:install:gd') . '</div>'; } else { echo '<div class="ossn-installation-message ossn-installation-fail">' . ossn_installation_print('ossn:install:gd:required') . '</div>'; $error[] = 'php:gd'; } if (OssnInstallation::isCon_WRITEABLE()) { echo '<div class="ossn-installation-message ossn-installation-success">' . ossn_installation_print('ossn:install:config') . '</div>'; } else { echo '<div class="ossn-installation-message ossn-installation-fail">' . ossn_installation_print('ossn:install:config:error') . '</div>'; $error[] = 'permission:configuration'; } echo '<br />'; if (!isset($error)) { echo '<a href="' . ossn_installation_paths()->url . '?page=settings" class="button-blue primary">' . ossn_installation_print('ossn:install:next') . '</a>'; } echo '</div><br /><br /></div>';
<label> <?php echo ossn_installation_print('ossn:weburl'); ?> </label> <input type="text" name="url" value="<?php echo OssnInstallation::url(); ?> "/> </div> <div> <label> <?php echo ossn_installation_print('ossn:datadir'); ?> </label> <input type="text" name="datadir" value="<?php echo OssnInstallation::DefaultDataDir(); ?> "/> </div> <input type="submit" value="<?php echo ossn_installation_print('ossn:install:install'); ?> " class="button-blue primary"> </form> </div>
/** * Ossn view instalaltion page * * @param string|null $content * @param string $title * @return string|null */ function ossn_installation_view_page($content, $title) { return ossn_installation_include("templates/page.php", array('contents' => $content, 'title' => ossn_installation_print($title))); }
/** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ $Settings = new OssnInstallation(); $Settings->dbusername($_POST['dbuser']); $Settings->dbpassword($_POST['dbpwd']); $Settings->dbhost($_POST['dbhost']); $Settings->dbname($_POST['dbname']); $Settings->weburl($_POST['url']); $Settings->datadir($_POST['datadir']); $Settings->setStartupSettings(array('owner_email' => $_POST['owner_email'], 'notification_email' => $_POST['notification_email'], 'sitename' => $_POST['sitename'])); if (empty($_POST['owner_email']) || empty($_POST['notification_email']) || empty($_POST['sitename'])) { ossn_installation_message(ossn_installation_print('fields:require'), 'fail'); $failed = ossn_installation_paths()->url . '?page=settings'; header("Location: {$failed}"); exit; } if ($Settings->INSTALL()) { $installed = ossn_installation_paths()->url . '?page=account'; header("Location: {$installed}"); } else { ossn_installation_message($Settings->error_mesg, 'fail'); $failed = ossn_installation_paths()->url . '?page=settings'; header("Location: {$failed}"); }