mirror of
https://github.com/cydrobolt/polr.git
synced 2024-09-19 23:21:47 +02:00
Revamped interface and setup fixes
This commit is contained in:
parent
469843f6b7
commit
dbeb38241d
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Polr</title>
|
||||
<title><?php require_once('config.php');echo $wsa;?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="<?php require_once('../config.php');if (!$theme) {echo 'bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Polr</title>
|
||||
<title><?php require_once('config.php');echo $wsn;?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="<?php require_once('../config.php');if (!$theme) {echo '../css/bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="../css/main.css"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Polr</title>
|
||||
<title><?php require_once('config.php');echo $wsn;?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="<?php require_once('config.php');if (!$theme) {echo 'bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Polr</title>
|
||||
<title><?php require_once('config.php');echo $wsn;?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="<?php require_once('config.php');if (!$theme) {echo 'bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="<?php if (!$theme) {echo 'bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
|
||||
<script src='select_url.js'></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
|
||||
<script>
|
||||
@ -64,4 +64,4 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="jumbotron" style="text-align:left; padding-top:5px; background-color: rgba(0,0,0,0);">
|
||||
<div class="jumbotron" style="text-align:left; padding-top:5px; background-color: rgba(0,0,0,0);">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
# Copyright (C) 2013-2014 Chaoyi Zha
|
||||
# Polr is an open-source project licensed under the GPL.
|
||||
# The above copyright notice and the following license are applicable to
|
||||
@ -13,7 +13,7 @@
|
||||
#
|
||||
-->
|
||||
|
||||
<?php
|
||||
<?php
|
||||
if(!@include('config.php')) {
|
||||
header('Location:setup.php');
|
||||
}
|
||||
@ -22,7 +22,7 @@ if(!@include('config.php')) {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Polr</title>
|
||||
<title><?php require_once('config.php');echo $wsn;?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="<?php require_once('config.php');if (!$theme) {echo 'bootstrap.css';}else {echo $theme;}?>"/>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
|
7
install-bootstrap.css
Normal file
7
install-bootstrap.css
Normal file
File diff suppressed because one or more lines are too long
95
setup.php
95
setup.php
@ -1,21 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
* Polr setup page.
|
||||
* The Polr Project - https://github.com/Cydrobolt/polr
|
||||
# Copyright (C) 2013-2014 Chaoyi Zha
|
||||
# Polr is an open-source project licensed under the GPL.
|
||||
# The above copyright notice and the following license are applicable to
|
||||
# the entire project, unless explicitly defined otherwise.
|
||||
# http://github.com/cydrobolt/polr
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or (at
|
||||
# your option) any later version.
|
||||
# See http://www.gnu.org/copyleft/gpl.html for the full text of the
|
||||
# license.
|
||||
#
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Polr Setup</title>
|
||||
<link rel="stylesheet" href="bootstrap.css"/>
|
||||
<link rel="stylesheet" href="install-bootstrap.css"/>
|
||||
<link rel="stylesheet" href="main.css"/>
|
||||
</head>
|
||||
<body style="padding-top:60px">
|
||||
<div class="navbar navbar-default navbar-fixed-top">
|
||||
<a class="navbar-brand" href="//github.com/Cydrobolt/polr">Polr</a>
|
||||
<a class="navbar-brand" href="/">Polr</a>
|
||||
</div>
|
||||
<div class='container-fluid push pushtop' style="text-align: left">
|
||||
<span><h1>Polr Setup</h1></span><br>
|
||||
<span><h1 style="text-align:center">Polr Setup</h1></span><br>
|
||||
<?php
|
||||
@(include('config.php'));
|
||||
include ('version.php');
|
||||
@ -121,7 +131,7 @@
|
||||
KEY `aindex` (`valid`,`email`)
|
||||
);');
|
||||
|
||||
sqlrun('
|
||||
sqlrun('
|
||||
CREATE TABLE `auth` (
|
||||
`username` varchar(50) NOT NULL,
|
||||
`password` text NOT NULL,
|
||||
@ -192,52 +202,57 @@
|
||||
. "<br><br><b>Clueless? Read the docs. <a href='https://github.com/Cydrobolt/polr/wiki'>https://github.com/Cydrobolt/polr/wiki</a></b>";
|
||||
} else {
|
||||
include('version.php');
|
||||
echo "<form name=\"Config Creation\" method=\"post\" action=\"" . 'setup.php' . "\">";
|
||||
echo "Database Host: <input type=\"text\" class='form-control' name=\"dbserver\" value=\"localhost\"><br>";
|
||||
echo "Database User: <input type=\"text\" class='form-control' name=\"dbuser\" value=\"root\"><br>";
|
||||
echo "Database Pass: <input type=\"password\" class='form-control' name=\"dbpass\" value=\"password\"><br>";
|
||||
echo "Database Name: <input type=\"text\" class='form-control' name=\"dbname\" value=\"polr\"><br>";
|
||||
echo "Application Name: <input type=\"text\" class='form-control' name=\"appname\" value=\"polr\"><br>";
|
||||
echo "Application URL (path to Polr, no http:// or www.) : <input type=\"text\" class='form-control' name=\"appurl\" value=\"yoursite.com\"><br>";
|
||||
echo "Setup Access Password: <input type=\"text\" class='form-control' name=\"protpass\" value=\"password123\"><br>";
|
||||
echo "Admin Account: <input type=\"text\" class='form-control' name=\"acct\" value=\"polr\"><br>";
|
||||
echo "Admin Password: <input type=\"password\" class='form-control' name=\"acctpass\" value=\"polr\"><br>";
|
||||
echo "Fetch ip through variable: <input type=\"text\" class='form-control' name=\"ipfetch\" value=\"\$_SERVER['REMOTE_ADDR']\"><br>";
|
||||
echo "Registration: <select name='reg' class='form-control'>"
|
||||
echo "<form name=\"Config Creation\" style='margin:0 auto; width: 650px' method=\"post\" action=\"" . 'setup.php' . "\">";
|
||||
echo "Database Host: <input type=\"text\" class='form-control' style='width:650px' name=\"dbserver\" value=\"localhost\"><br>";
|
||||
echo "Database User: <input type=\"text\" class='form-control' style='width:650px' name=\"dbuser\" value=\"root\"><br>";
|
||||
echo "Database Pass: <input type=\"password\" class='form-control' style='width:650px' name=\"dbpass\" value=\"password\"><br>";
|
||||
echo "Database Name: <input type=\"text\" class='form-control' style='width:650px' name=\"dbname\" value=\"polr\"><br>";
|
||||
echo "Application Name: <input type=\"text\" class='form-control' style='width:650px' name=\"appname\" value=\"polr\"><br>";
|
||||
echo "Application URL (path to Polr, no http:// or www.) : <input type=\"text\" style='width:650px' class='form-control' name=\"appurl\" value=\"yoursite.com\"><br>";
|
||||
echo "Setup Access Password: <input type=\"text\" class='form-control' style='width:650px' name=\"protpass\" value=\"password123\"><br>";
|
||||
echo "Admin Account: <input type=\"text\" class='form-control' style='width:650px' style='width:650px' name=\"acct\" value=\"polr\"><br>";
|
||||
echo "Admin Password: <input type=\"password\" style='width:650px' class='form-control' name=\"acctpass\" value=\"polr\"><br>";
|
||||
echo "Fetch ip through variable: <input type=\"text\" class='form-control' style='width:650px' name=\"ipfetch\" value=\"\$_SERVER['REMOTE_ADDR']\"><br>";
|
||||
echo "Registration: <select name='reg' style='width:650px' class='form-control'>"
|
||||
. "<option value='none'>No registration</option>"
|
||||
. "<option value='email'>Email verification required</option>"
|
||||
. "<option value='free'>No email verification required</option>"
|
||||
. "<option value='regulated'>New registrations must be approved (do not choose, future option)</option>"
|
||||
. "</select><br /><br />";
|
||||
echo "Path relative to root (leave blank if /, if http://site.com/polr, then write /polr/): <input type=\"text\" class='form-control' name=\"path\" value=\"/polr/\"><br>";
|
||||
echo "Theme (choose wisely, click <a href='https://github.com/Cydrobolt/polr/wiki/Themes-Screenshots'>here</a> for screenshots: <select name='theme' class='form-control'>"
|
||||
echo "Path relative to root (leave blank if /, if http://site.com/polr, then write /polr/): <input type=\"text\" class='form-control' style='width:650px' name=\"path\" value=\"/polr/\"><br>";
|
||||
echo "Theme (choose wisely, click <a href='https://github.com/Cydrobolt/polr/wiki/Themes-Screenshots'>here</a> for screenshots: <select name='t' style='width:650px' class='form-control'>"
|
||||
. "<option value='bootstrap.css'>Modern (default)</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/cyborg/bootstrap.min.css'>Midnight Black</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/amelia/bootstrap.min.css'>Cheery</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/united/bootstrap.min.css'>Orange</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/simplex/bootstrap.min.css'>Crisp White</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/darkly/bootstrap.min.css'>Cloudy Night</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/cerulean/bootstrap.min.css'>Calm Skies</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/cyborg/bootstrap.min.css'>Midnight Black</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/amelia/bootstrap.min.css'>Cheery</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/united/bootstrap.min.css'>Orange</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/simplex/bootstrap.min.css'>Crisp White</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/darkly/bootstrap.min.css'>Cloudy Night</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/cerulean/bootstrap.min.css'>Calm Skies</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/paper/bootstrap.min.css'>Android Material Design</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/superhero/bootstrap.min.css'>Blue Metro</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/sandstone/bootstrap.min.css'>Sandstone</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/cyborg/bootstrap.min.css'>Jet Black</option>"
|
||||
. "<option value='//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/lumen/bootstrap.min.css'>Newspaper</option>"
|
||||
|
||||
. "</select><br /><br />";
|
||||
|
||||
if (isset($_POST['pw'])) {
|
||||
echo "<input type='hidden' value='{$_POST['pw']}' name='pw' />";
|
||||
}
|
||||
echo "<input type=\"submit\" value=\"Create/Update config\"><input type=\"reset\" value=\"Clear Fields\">";
|
||||
echo "<div id='buttons' style='text-align:center'>";
|
||||
if (isset($ppass)) {
|
||||
echo "<input type=\"submit\" class=\"btn btn-success\" style='width:150px' value=\"Update\">";
|
||||
} else {
|
||||
echo "<input type=\"submit\" class=\"btn btn-success\" style='width:150px' value=\"Install\">";
|
||||
}
|
||||
echo " ";
|
||||
echo "<input type=\"reset\" value=\"Clear Fields\" class=\"btn btn-warning\" style='width:150px'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
echo "<br><br></div><div class='container'>"
|
||||
. "Requirements:<br><br>"
|
||||
. "<dl>"
|
||||
. "<dt>MySQL >= 5.4 (5.5 recommended)"
|
||||
. "<dt>PHP >= 5.4 (using 5.5 or higher? remove password.php)"
|
||||
. "<dt>MCrypt Module for PHP (if you do not have this, download the alternative version)"
|
||||
. "</dl><br>"
|
||||
. "<b>Make sure the databse you specify is already created. The database user also needs to"
|
||||
. "be pre-created. If you enter the wrong information, go in the installation "
|
||||
. "directory and delete config.php.<br>Please grant the mysql user all privileges"
|
||||
. "during the setup, and then restrict the user to only CREATE, UPDATE, INSERT, DELETE, and SELECT.</b>";
|
||||
echo "<br><br>Polr is <a href='http://en.wikipedia.org/wiki/Open-source_software'>Open-Source software</a> licensed under the <a href='//opensource.org/licenses/MIT'>MIT License</a>. By continuing to use Polr, you agree to the terms of the MIT License.";
|
||||
echo "<div class=''>Polr Version $version released $reldate - <a href='//github.com/cydrobolt/polr'>Github</a><br>© Copyright $relyear Chaoyi Zha & <a href='https://github.com/Cydrobolt/polr/graphs/contributors'>Other Polr Contributors</a></div></div>";
|
||||
echo "<br><br></div><div class='container' style='text-align:center'>"
|
||||
. "<p><b>Please read the README.md file located in the root Polr directory. It contains essential and indispensable troubleshooting, installation, and support materials. <b/></p>";
|
||||
echo "<br><br>Polr is <a href='http://en.wikipedia.org/wiki/Open-source_software'>Open-Source software</a> licensed under the <a href='//www.gnu.org/copyleft/gpl.html'>GPL License</a>. By continuing to use Polr, you agree to the terms of the MIT License.";
|
||||
echo "<div class=''>Polr Version $version released $reldate - <a href='//github.com/cydrobolt/polr'>Github</a></div></div><br><span style='padding-left:4%'>© Copyright $relyear Chaoyi Zha & <a href='https://github.com/Cydrobolt/polr/graphs/contributors'>Other Polr Contributors</a></span>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user