openshift folder fix

pull/8/head
esensar 2016-05-22 17:23:22 +02:00
parent 1025479699
commit d153b2ac84
2 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@
}
if(isset($_POST['vijest'])) {
$vijestiFile = file_get_contents("vijesti.csv");
$vijestiFile = file_get_contents($openShiftFolder."vijesti.csv");
$vijest = $_POST['vijest'];
if(strpos($vijest, ',') !== FALSE) {
$vijest = str_replace('"', '""', $vijest);
@ -31,14 +31,14 @@
$time = date(DATE_ISO8601, strtotime("now"));
$vijestiFile = $time.','.$slike.','.$vijest."\n".$vijestiFile;
$vijestiFile = strip_tags($vijestiFile);
file_put_contents("vijesti.csv", $vijestiFile);
file_put_contents($openShiftFolder."vijesti.csv", $vijestiFile);
}
if(isset($_POST['logout'])) {
unset($_SESSION['user']);
}
if($_SERVER['REQUEST_URI'] == "/add.php" && !isset($_SESSION['user'])) {
if(($_SERVER['REQUEST_URI'] == "/add.php" && !isset($_SESSION['user'])) || ($_SERVER['REQUEST_URI'] == "/register.php" && isset($_SESSION['user']))) {
header('Location: index.php');
}
?>

View File

@ -6,7 +6,7 @@
Movie Database
</TITLE>
</HEAD>
<BODY <?php echo ($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "") ? ' onload="onLoad()"' : null?>>
<BODY <?php echo ($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "/") ? ' onload="onLoad()"' : null?>>
<div class="top">
<a class="logoLink" href="index.php">
<div class="fullLogo">
@ -42,7 +42,7 @@
<ul class="headerBar">
<li class="headerItem">
<a <?php echo ($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "") ? 'id="activeHeaderLink"' : null?> class="headerLink" href="index.php">
<a <?php echo ($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "/") ? 'id="activeHeaderLink"' : null?> class="headerLink" href="index.php">
Home
</a>
</li>
@ -75,7 +75,7 @@
</li>
<?php endif;?>
<?php if($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == ""): ?>
<?php if($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "/"): ?>
<li class="headerItem">
<select id="filter" name="filter" onchange="onFilter(this.value)">
<option value="all">Sve novosti</option>