Added a third pass to the variable replacement. Navbar TBD.

master
BodgeMaster 2020-02-25 16:03:38 +01:00
parent 8958d53322
commit 819a8ea02f
4 changed files with 8 additions and 6 deletions

View File

@ -5,6 +5,7 @@ echo "Deployment script for repository \"web-deployment\"
echo -n "`find -name "*.php" -or -name "*.html" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass0.json/'`" | bash - echo -n "`find -name "*.php" -or -name "*.html" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass0.json/'`" | bash -
echo -n "`find -name "*.php" -or -name "*.html" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass1.json/'`" | bash - echo -n "`find -name "*.php" -or -name "*.html" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass1.json/'`" | bash -
echo -n "`find -name "*.php" -or -name "*.html" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass2.json/'`" | bash -
echo "============================================================================== echo "==============================================================================
Done." Done."

View File

@ -1,4 +1 @@
{ {}
"LOGIN_LINK":"<?php if (isset($_SESSION['user_id'])){ echo \"<a href=\\\"%CONTENT_DIR%/logout/\\\">Log out</a>\";} else { echo \"<a href=\\\"%CONTENT_DIR%/login/\\\">Log in</a>\";} ?>",
"HOME_LINK":"<?php if (isset($_SESSION['user_id'])){ echo \"<a class=\\\"active\\\" href=\\\"/common/threadr/userhome/\\\"><img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"/></a>\";} else { echo \"<a class=\\\"active\\\" href=\\\"/common/threadr/\\\"><img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"Home\\\"/></a>\";} ?>"
}

View File

@ -1,4 +1,4 @@
{ {
"CONTENT_DIR":"/common/threadr", "LOGIN_LINK":"<?php if (isset($_SESSION['user_id'])){ echo \"<a href=\\\"%CONTENT_DIR%/logout/\\\">Log out</a>\";} else { echo \"<a href=\\\"%CONTENT_DIR%/login/\\\">Log in</a>\";} ?>",
"NO_CHEAP_SESSION_STEALING":"if (isset($_SESSION['user_id'])) {if ($_SESSION['user_ip']!=$_SERVER['REMOTE_ADDR'] || $_SESSION['user_http_user_agent']!=$_SERVER['HTTP_USER_AGENT']){ $_SESSION = array(); if (ini_get(\"session.use_cookies\")){ $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]); } session_destroy(); header(\"Location: https://lostcave.ddnss.de/common/threadr/login/?error=session\"); die();}}" "HOME_LINK":"<?php if (isset($_SESSION['user_id'])){ echo \"<a class=\\\"active\\\" href=\\\"/common/threadr/userhome/\\\"><img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"My Feed\\\"/></a>\";} else { echo \"<a class=\\\"active\\\" href=\\\"/common/threadr/\\\"><img src=\\\"/common/threadr/img/ThreadR_Home.svg\\\" alt=\\\"Home\\\"/></a>\";} ?>"
} }

View File

@ -0,0 +1,4 @@
{
"CONTENT_DIR":"/common/threadr",
"NO_CHEAP_SESSION_STEALING":"if (isset($_SESSION['user_id'])) {if ($_SESSION['user_ip']!=$_SERVER['REMOTE_ADDR'] || $_SESSION['user_http_user_agent']!=$_SERVER['HTTP_USER_AGENT']){ $_SESSION = array(); if (ini_get(\"session.use_cookies\")){ $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]); } session_destroy(); header(\"Location: https://lostcave.ddnss.de/common/threadr/login/?error=session\"); die();}}"
}