rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit 31a18b95a32887659f875700f31c2410fc85327b
parent ef67c02b9c2655aac6e4ae354da6e0c527bdbead
Author: Frank Radzio <frank@radzio-sh.de>
Date:   Sat, 18 Oct 2014 10:45:29 +0200

auto commit

Diffstat:
Mcore/admin/admin.php | 29++++++++++++++++++++++++++---
Minstall/generate_configs.php | 12++++++------
Minstall/index.php | 8++++----
Dinstall/install.php | 76----------------------------------------------------------------------------
4 files changed, 36 insertions(+), 89 deletions(-)

diff --git a/core/admin/admin.php b/core/admin/admin.php @@ -4,17 +4,40 @@ * * This script is a navigation to all things that you can configurate. * -* @author Marcel Radzio <info@nordgedanken.de> +* @author Marcel Radzio <info@nordgedanken.de> * @version 0.2 17/08/2014 19:57 */ //Check if the User loged in if (!isset($_COOKIE["user"])){ echo $_COOKIE["user"]; - echo "Bitte erst <a href=\"login.php\">einloggen</a>."; + echo "Please <a href=\"login.php\">login</a> first."; exit; }else{ echo "Welcome " . $_COOKIE["user"] . "!<br>"; - echo "<a href=\"logout.php\">Abmelden</a>"; + echo "<a href=\"logout.php\">Logout</a>"; + ########################################### + # # + # # + # INHALT # + # # + # # + # INHALT # + # # + # # + # INHALT # + # # + # # + # INHALT # + # # + # # + # INHALT # + # # + # # + # INHALT # + # # + # # + ########################################### + } ?> diff --git a/install/generate_configs.php b/install/generate_configs.php @@ -27,8 +27,8 @@ if (is_writable($filename)) { } // #Serverpfad - $serverpfad = $_POST["serverpfad"]; - $var_str_sp = var_export($serverpfad, true); + $db_address = $_POST["db_address"]; + $var_str_sp = var_export($db_address, true); $var_sp = "<?php\n\n\$db_servername = $var_str_sp;\n"; // Schreibe $somecontent in die geƶffnete Datei. @@ -41,8 +41,8 @@ if (is_writable($filename)) { print "Fertig, in Datei $filename wurde $var_str_sp geschrieben"; print "</br>"; // #Userame - $username = $_POST["username"]; - $var_str_u = var_export($username, true); + $db_username = $_POST["db_username"]; + $var_str_u = var_export($db_username, true); $var_u = "\n\n\$db_username = $var_str_u;\n"; if (!fwrite($handle, $var_u)) { @@ -54,8 +54,8 @@ if (is_writable($filename)) { print "Fertig, in Datei $filename wurde $var_str_u geschrieben"; print "</br>"; // #Passwort - $password = $_POST["password"]; - $var_str_pw = var_export($password, true); + $db_password = $_POST["db_password"]; + $var_str_pw = var_export($db_password, true); $var_pw = "\n\n\$db_password = $var_str_pw;\n"; if (!fwrite($handle, $var_pw)) { print "Kann in die Datei $filename nicht schreiben"; diff --git a/install/index.php b/install/index.php @@ -23,7 +23,6 @@ } ?> <h1>Installer</h1> -<h3>MySQL</h3> <!-- Reset Configs --> <?php ################# @@ -38,17 +37,18 @@ unlink('../core/config/variables.config.php'); <!-- Form to give data to config-generator --> <form action="generate_configs.php" method="post"> <table cellpadding="1" cellspacing="4"> + <h3>MySQL</h3> <tr> <td><p>Datenbank Adresse: </p></td> - <td><input type="name" name="serverpfad" required="required" placeholder="Datenbank Adresse" maxlength="255" /></td> + <td><input type="name" name="db_address" required="required" placeholder="Datenbank Adresse" maxlength="255" /></td> </tr> <tr> <td><p>Nutzername: </p></td> - <td><input type="name" name="username" required="required" placeholder="Nutzername" maxlength="255" /></td> + <td><input type="name" name="db_username" required="required" placeholder="Nutzername" maxlength="255" /></td> </tr> <tr> <td><p>Passwort: </p></td> - <td><input type="password" name="password" required="required" placeholder="Passwort" maxlength="50" /></td> + <td><input type="password" name="db_password" required="required" placeholder="Passwort" maxlength="50" /></td> </tr> <tr> <td><p>Datenbank Name: </p></td> diff --git a/install/install.php b/install/install.php @@ -1,76 +0,0 @@ -/** -* Module Check -* -* This script checks for requiered modules. -* -* @author Marcel Radzio <info@nordgedanken.de> -* @version 0.2 18/08/2014 18:45 -*/ -<!Doctype html> -<html> -<head> -<title>Installieren</title> -</head> -<body> -<?php - if (!extension_loaded('mysql')) { - if (!dl('mysql.so')) { - print ("MySQL is not installed! Please install this module!"); - exit; - }else{print("MySQL has been successfully loaded");} - } -?> -<h1>Installer</h1> -<h3>MySQL</h3> -<!-- Reset Configs --> -<?php -################# -#Database Config# -################# -unlink('../core/inc/db_connect.inc.php'); -################# -#Blog Basics Config# -################# -unlink('../core/config/variables.config.php'); -?> -<!-- Form to give data to config-generator --> -<form action="generate_configs.php" method="post"> - <table cellpadding="1" cellspacing="4"> - <tr> - <td><p>Datenbank Adresse: </p></td> - <td><input type="name" name="serverpfad" required="required" placeholder="Datenbank Adresse" maxlength="255" /></td> - </tr> - <tr> - <td><p>Nutzername: </p></td> - <td><input type="name" name="username" required="required" placeholder="Nutzername" maxlength="255" /></td> - </tr> - <tr> - <td><p>Passwort: </p></td> - <td><input type="password" name="password" required="required" placeholder="Passwort" maxlength="50" /></td> - </tr> - <tr> - <td><p>Datenbank Name: </p></td> - <td><input type="name" name="db_name" required="required" placeholder="Datenbank Name" maxlength="255" /></td> - </tr> - </table> -<h3>Basics</h3> - <table cellpadding="1" cellspacing="4"> - <tr> - <td><p>Website Name: </p></td> - <td style="text-indent:40px;"><input type="name" name="blog_name" required="required" placeholder="Website Name" maxlength="255" /></td> - </tr> - <tr> - <td><p>Untertitel: </p></td> - <td style="text-indent:40px;"><input type="text" name="admin_username" required="required" placeholder="Untertitel" maxlength="255" /></td> - </tr> - <tr> - <td><p>Schlagw&ouml;rter: </p></td> - <td style="text-indent:40px;"><input type="text" name="admin_password" required="required" placeholder="Schlagw&ouml;rter" maxlength="50" /></td> - </tr> - <tr> - <td colspan="2"><input type="submit" name="send" value="Weiter" /></td> - </tr> - </table> -</form> -</body> -</html>