diff --git a/_includes/Session.class.php b/_includes/Session.class.php index 28ba8ef3dd80296d914dff31b2fb580fac163731..b6a8c8b750ff35aa66cb2dd8be428cb4b0b875c8 100644 --- a/_includes/Session.class.php +++ b/_includes/Session.class.php @@ -41,11 +41,11 @@ class Session // To get the key value public static function get($key, $default = false) { - if(Session::isset($key)){ + // Check if the key exists return key else return default value. + if (Session::isset($key)) { return $_SESSION[$key]; - }else{ + } else { return $default; } - } } diff --git a/_includes/User.class.php b/_includes/User.class.php index 867df2b748164432289d0b0f67588a13cb6657ed..b66329cd47077ad72112e2a2170b62d6764caaae 100644 --- a/_includes/User.class.php +++ b/_includes/User.class.php @@ -66,4 +66,30 @@ class User } } + + // public function __construct($username) + // { + // $this -> conn = Database::getConnection(); + // } + public function authenticate() + { + + } + + public function setBio() + { + + } + public function getBio() + { + + } + public function setAvatar() + { + + } + public function getAvatar() + { + + } } diff --git a/_includes/__migration.sql b/_includes/__migration.sql new file mode 100644 index 0000000000000000000000000000000000000000..3889a35d9e2dccef96fbb2b9425163fad74b8d22 --- /dev/null +++ b/_includes/__migration.sql @@ -0,0 +1,2 @@ +-- 24 March, 2025 +ALTER TABLE `auth` ADD `sec_email` varchar(256) NULL; \ No newline at end of file diff --git a/signup.php b/signup.php index dd85d4856abf1b7d342c5a92303d02cfc5aa3019..3fd1a275e82b2a20880bbe7f8da48e125e185e31 100644 --- a/signup.php +++ b/signup.php @@ -6,7 +6,7 @@ include 'libs/load.php'; <!doctype html> <html lang="en" data-bs-theme="auto"> <!-- To load head --> -<? load_template('head') ?> +<?php load_template('head') ?> <body> <!-- Style for toggle button --> @@ -161,19 +161,19 @@ include 'libs/load.php'; <!--To load header file from template --> - <? load_template('header') ?> + <?php load_template('header') ?> <!-- To load signup-content form to sign-in --> - <? load_template('signup-content'); ?> + <?php load_template('signup-content'); ?> <!-- To load footer (footer.php) from template folder --> - <? load_template('footer'); ?> + <?php load_template('footer'); ?> <script src="/photogram-project-php/assets/dist/js/bootstrap.bundle.min.js"></script> </body> diff --git a/testhash.php b/testhash.php index 100f65bb1d39ebfbb2f42e6e8418a71c65449c95..58fff8c2ba1cdceb4082db11c47c1875833bc011 100644 --- a/testhash.php +++ b/testhash.php @@ -11,13 +11,11 @@ echo "string length: " . strlen($str) . "\n"; echo "md5: ". md5($str) . "(length: ". strlen(md5($str)) . ")\n"; echo "base64: ". base64_encode($str) . "\n(Length: ". strlen(base64_encode($str)) . ")"; -// Testing type of hashing in php +// Testing type of hashing in php $data = "hello"; - - foreach (hash_algos() as $v) { $r = hash($v, $data, false);