Permalink
Browse files

Cleanups/chmod gitignore (#2)

* Cleanups:
- libs/db.php should not be committed and being ignored by GIT as this file may
  contain sensitive informations
- fixed chmod, no execute rights on these files is needed (only for shell
  scripts)
- deleted torrent file and ignored all others as they should not be included in any commits

Signed-off-by: Roland Haeder <roland@mxchange.org>

* no error reporting is a bad idea

Signed-off-by: Roland Haeder <roland@mxchange.org>

* killed many white-spaces + added css and font file

Signed-off-by: Roland Haeder <roland@mxchange.org>

* Continued:
- added missing JavaScript files (don't reference them from external resource as
  if the external website has only one security problem and trojan horses will
  spread over their files, they will spread everywhere. If you keep files local,
  they won't spread so far.
- needed change due to removed db.php file (which contains sensitive infomations
  that should never be committed)

Signed-off-by: Roland Haeder <roland@mxchange.org>
  • Loading branch information...
Quix0r authored and atmoner committed Feb 22, 2017
1 parent b248925 commit 107eeb2cbbc0759a9fba047b6839f3f25b7e1b7a
Showing 411 changed files with 637 additions and 22 deletions.
0 .htaccess 100755 → 100644
No changes.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
28 index.php 100755 → 100644
@@ -1,15 +1,11 @@
<?php
define("IN_TORRENT",true);
// This part can be removed after install
if (file_exists("install.php")) {
if (filesize("libs/db.php") === 0) {
header("location:install.php");
}
} // This part can be removed after install
if (file_exists("install.php") && !file_exists("libs/db.php")) {
header("Location: install.php");
exit;
}
define("IN_TORRENT",true);
$path = dirname(__FILE__);
@@ -36,18 +32,16 @@
$hook->add_page('user','pages/user.php','user.html');
$hook->add_page('logout','pages/logout.php','');
$hook->add_page('admincp','pages/admincp/admincp.index.php','');
if ($hook->hook_exist('new_page'))
if ($hook->hook_exist('new_page'))
$hook->execute_hook('new_page');
foreach ($hook->addnewpage as $value) {
if ($value['name'] === $page) {
foreach ($hook->addnewpage as $value) {
if ($value['name'] === $page) {
if (!empty($value['phpFile']))
include $value['phpFile'];
if (!empty($value['htmlFile']))
$smarty->display($value['htmlFile']);
}
$smarty->display($value['htmlFile']);
}
}
4 install.php 100755 → 100644
@@ -159,7 +159,7 @@ function redirect($location){
}
if (!empty($_GET["action"]) and $_GET["action"] == "w") {
if (is_writable($path."/libs/db.php"))
if (is_writable($path."/libs/"))
{
$fd = fopen($path."/libs/db.php", "w+");
@@ -169,7 +169,7 @@ function redirect($location){
$foutput.= "\$dbuser = \"".$_POST["username"]."\";\n";
$foutput.= "\$dbpass = \"".$_POST["password"]."\";\n";
$foutput.= "\$dbname = \"".$_POST["database"]."\";\n";
$foutput.= "// Please ! manipulate this file if you know what you made​​!\n";
$foutput.= "// Please ! manipulate this file if you know what you made!\n";
$foutput.= "";
fwrite($fd,$foutput);
fclose($fd);
Oops, something went wrong.

0 comments on commit 107eeb2

Please sign in to comment.