Skip to content
Snippets Groups Projects
Commit 79cb96c1 authored by Levy, Matyáš's avatar Levy, Matyáš
Browse files

Merge branch 'master' into 'Localhost_files'

# Conflicts:
#   api/authenticate.php
#   api/changeTheme.php
#   api/logout.php
#   api/register_user.php
#   api/storeImg.php
#   models/db.php
#   views/uploadButton.php
parents afc6f23d 7b25f567
No related branches found
No related tags found
2 merge requests!2Localhost files,!1WIP: Localhost files
<?php
include "../models/db.php";
ob_start();
session_start();
// Change this to your connection info.
//
......
......@@ -2,11 +2,10 @@
session_start();
$DATABASE_HOST = 'localhost';
$DATABASE_USER = 'root';
$DATABASE_PASS = '';
$DATABASE_NAME = 'userlist';
$DATABASE_HOST = '127.0.0.1';
$DATABASE_USER = 'levymaty';
$DATABASE_PASS = 'webove aplikace';
$DATABASE_NAME = 'levymaty';
// Try and connect using the info above.
$conn = new mysqli($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
if ($conn->connect_error) {
......
<?php
if (!isset($_SESSION))
{
session_start();
}
session_destroy();
session_start();
unset ($_SESSION["loggedin"]);
......
......@@ -2,11 +2,10 @@
session_start();
$DATABASE_HOST = 'localhost';
$DATABASE_USER = 'root';
$DATABASE_PASS = '';
$DATABASE_NAME = 'userlist';
$DATABASE_HOST = '127.0.0.1';
$DATABASE_USER = 'levymaty';
$DATABASE_PASS = 'webove aplikace';
$DATABASE_NAME = 'levymaty';
// Try and connect using the info above.
$conn = new mysqli($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
if ($conn->connect_error) {
......
......@@ -72,7 +72,11 @@ header("Location: ".$link."");
$singles = 0;
$tens++;
}
closedir($handle);
}
$info = pathinfo($imageFile);
$ext = $info['extension'];
$newFileName = "01 - ".htmlspecialchars($_SESSION["name"])." - ".htmlspecialchars($_POST["fname"]).".".htmlspecialchars($ext);
$imageFile = $_FILES['imgFile']['name'];
$ext = end((explode(".", $imageFile)));
......
<?php
$DATABASE_HOST = 'localhost';
$DATABASE_USER = 'root';
$DATABASE_PASS = '';
$DATABASE_NAME = 'userlist';
$DATABASE_HOST = '127.0.0.1';
$DATABASE_USER = 'levymaty';
$DATABASE_PASS = 'webove aplikace';
$DATABASE_NAME = 'levymaty';
// Try and connect using the info above.
$con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
if ( mysqli_connect_errno() ) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment