Skip to content

Commit

Permalink
updated for production
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Dec 1, 2024
1 parent 78fca26 commit 333c40a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project/auth/add_admin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once('../config/database.php');
require_once('../database/database.php');
require_once('../php/emails.php');
session_start();
header('Content-Type: application/json');
Expand Down
2 changes: 1 addition & 1 deletion Project/auth/delete_admin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once('../config/database.php');
require_once('../database/database.php');
session_start();
header('Content-Type: application/json');

Expand Down
2 changes: 1 addition & 1 deletion Project/auth/login.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once('../config/database.php');
require_once('../database/database.php');
session_start();

// Redirect if already logged in
Expand Down
2 changes: 1 addition & 1 deletion Project/auth/reset_password.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once('../config/database.php');
require_once('../database/database.php');

header('Content-Type: application/json');

Expand Down
13 changes: 13 additions & 0 deletions Project/config copy/connect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
$servername = "mariadb_server";
$username = "mariadb_username";
$password = "mariadb_password";
$db = "yourdatabase";

try {
$conn = new PDO("mysql:host=$servername;dbname=$db", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
die("Connection Failed: " . $e->getMessage());
}
?>
13 changes: 13 additions & 0 deletions Project/config copy/phpmailerconfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
return [
'smtp_host' => 'smtp.gmail.com',
'pop3_host' => 'pop.gmail.com',
'smtp_auth' => true,
'smtp_username' => '[email protected]',
'smtp_password' => 'yourapppassword',
'smtp_secure' => 'tls',
'smtp_port' => 587,
'pop3_port' => 995,
'from_email' => '[email protected]',
'from_name' => 'Turing Tickets Support'
];
2 changes: 1 addition & 1 deletion delete_after_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

try {
// Read the SQL file
$sql = file_get_contents('./Project/config/database.sql');
$sql = file_get_contents('./Project/database/database.sql');

if ($sql === false) {
error_log('Failed to read database.sql file');
Expand Down

0 comments on commit 333c40a

Please sign in to comment.