diff --git a/articles/other-projects/2015-07-15-RCC-stable.md b/articles/other-projects/2015-07-15-RCC-stable.md new file mode 100644 index 0000000..77e1b7c --- /dev/null +++ b/articles/other-projects/2015-07-15-RCC-stable.md @@ -0,0 +1,7 @@ +%TITLE: RCC stable +%DATE: 15 July 2015 +%TAGS: rcc + +RCC (Rangitaki Control Center) is now in a stable state. Even if it has just one feature right now, it is an important one: uploading your posts from the web. To use it you have to manually enable it in the config.php and you must set a password in rcc/password.php. If you were using rangitaki in an earlier version you should really upgrade to the latest version, out of security reasons. + +I will add more features to RCC in coming releases, including a media upload and other features. diff --git a/config.php b/config.php index fb9f092..3ee1022 100644 --- a/config.php +++ b/config.php @@ -29,7 +29,7 @@ $bloganalytics = ''; // Footer - set here the text for your footer (e.g. a copyright info). You can replace the whole text after the '=' with your own one. $blogfooter = 'Rangitaki ' . date("Y") . ' github.com/mmk2410/Rangitaki'; // This enables the optional rangitaki control center. Please read the documentation before you enable it. -$rcc = 'no'; +$rcc = 'yes'; // Here you can disable and enable the navigation menu. Usefull if you have no subblogs and no home directory $nav_drawer = 'yes'; // Set here the name of your theme. Read the documentation for more themes diff --git a/rcc/genpas/index.php b/rcc/genpas/index.php deleted file mode 100644 index 29ea984..0000000 --- a/rcc/genpas/index.php +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Rangitaki Control Center - - - - -
- Rangitaki Control Center -
-
-
-
Password Generator
- -
-

New password:

- -
- " . password_hash($passwd, PASSWORD_DEFAULT) . "

"; - } - ?> -
-
- - diff --git a/rcc/index.php b/rcc/index.php index 41dc9fa..c0c89e1 100644 --- a/rcc/index.php +++ b/rcc/index.php @@ -36,8 +36,15 @@ THE SOFTWARE.
@@ -49,10 +56,8 @@ THE SOFTWARE.
File Upload
@@ -88,17 +93,6 @@ THE SOFTWARE. -
-
Password
-

- Generate a new password. -

- - GENERATOR - -
-
diff --git a/rcc/passwd.txt b/rcc/passwd.txt deleted file mode 100644 index 2e16547..0000000 --- a/rcc/passwd.txt +++ /dev/null @@ -1 +0,0 @@ -$2y$10$vgN9txL19vvXKAT.ywFy5u0ApyZ3XAgExBtSff53RUJcnwbsNGBAm \ No newline at end of file diff --git a/rcc/password.php b/rcc/password.php new file mode 100644 index 0000000..973ada0 --- /dev/null +++ b/rcc/password.php @@ -0,0 +1,3 @@ +
File Upload
You have to choose a file!

"; - } else { - $blog = filter_input(INPUT_POST, "blog"); - $uploaddir = "../..//articles/$blog/"; - $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); - - if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { - echo "

The post was successfully uploaded and is now published.

"; + session_start(); + if($_SESSION['login']){ + if ($_FILES['userfile']['name'] == "") { + echo "

You have to choose a file!

"; } else { - echo "

During the uploading process an error occured!
Error Code:" . ($_FILES['userfile']['error'] . "

"); + $blog = filter_input(INPUT_POST, "blog"); + $uploaddir = "../..//articles/$blog/"; + $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); + + if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { + echo "

The post was successfully uploaded and is now published.

"; + } else { + echo "

During the uploading process an error occured!
Error Code:" . ($_FILES['userfile']['error'] . "

"); + } } } ?>