Skip to content
Snippets Groups Projects
Commit 2391755e authored by V Harish Ragavendher's avatar V Harish Ragavendher
Browse files

fixing errors with css loads

parent 6c35418b
Branches master
No related tags found
1 merge request!3Push
......@@ -8,7 +8,9 @@
<link rel="canonical" href="https://getbootstrap.com/docs/5.2/examples/album/">
<link href="<?get_config(" base_path")?>/App/assets/dist/css/bootstrap.min.css" rel="stylesheet">
<link
href="<?=get_config("base_path")?>/App/assets/dist/css/bootstrap.min.css"
rel="stylesheet">
<!--//print(basename($_SERVER['PHP_SELF'], ".php").".css")-->
<?if (file_exists($_SERVER['DOCUMENT_ROOT'] . get_config("base_path") . "/App/css/" . basename($_SERVER['PHP_SELF'], ".php") . ".css")) {?>
......
......@@ -20,7 +20,7 @@ if($login) {
<?print($email)?> hope you're doing good
</p>
<p>You can <a
href="/Php<?=get_config("base_path")?>/App/index.php">Continue</a>
href="<?=get_config("base_path")?>/App/index.php">Continue</a>
by clicking</p>
</p>
</div>
......@@ -33,7 +33,7 @@ if($login) {
<h1 class="text-body-emphasis">Oops incorrect username or password</h1>
<p class="col-lg-8 mx-auto lead">
<p>please<a
href="/Php<?=get_config("base_path")?>/App/login_page.php">tryagain</a>
href="<?=get_config("base_path")?>/App/login_page.php">tryagain</a>
by clicking</p>
</p>
</div>
......
......@@ -10,7 +10,7 @@ include_once 'includes/webApi.class.php';
/*we include each and every single classes and files in load.php inorder to make sure everthing is imported to the
file we are working just by including the load.php.............that's main idea over here. */
//sessions::start();
sessions::start();
/*basically this webApi class is to make simple all throse requests to get processed and to access our application
from anywhere including cli like how we used to do with the web........ */
//$webapi = new webAPI();
......@@ -33,7 +33,7 @@ function get_config($key, $default = null)
function load_template($name)
{
//print(" including $name.php");
include $_SERVER["DOCUMENT_ROOT"] . get_config('base_path') . "/App/__templates/$name.php";
include $_SERVER["DOCUMENT_ROOT"] . get_config("base_path") . "/App/__templates/$name.php";
/* we are generally using this function and making multiple calls over our index.php file there all we need to do
is call the function with the right name for eg load_template('__header') and here we gave the location of the
file along with the extension .php and also this works because of our include function above and location is all that
......
......@@ -7,6 +7,10 @@ include 'libs/load.php';
$user = 'Sasuke_uchiha';
$password = 'Chidori';
$result = null;
print_r($_SERVER['DOCUMENT_ROOT']);
print_r($_SERVER['PHP_SELF']);
print("the base name we want is " . basename($_SERVER['PHP_SELF'], ".php") . ".css");
print(get_config(" base_path") . "/App/assets/dist/css/bootstrap.min.css")
/* if(sessions::get('login')) {
$username = sessions::get('sessusername');
$userobj = new user($username);
......@@ -23,24 +27,25 @@ $result = null;
} else {
print("login failed");
}
} */
if(sessions::get('is_loggedin')) {
$token = sessions::get('session_token');
// $userobj = new user($username);
print("welcome back");
// $result = $userdata;
} else {
// } */
// if(sessions::get('is_loggedin')) {
// $token = sessions::get('session_token');
// // $userobj = new user($username);
// print("welcome back");
// // $result = $userdata;
// } else {
$result = userSession::Authenticate($user, $password);//done and got the token and token is set as sess token
if($result) {
//userSession::authorize($result);
$userobj = new userSession($result);// done in authorize
print("login success".$user."of ID");
// sessions::set('login', true);
// sessions::set('sessusername', $result);
} else {
print("login failed");
}
}
// $result = userSession::Authenticate($user, $password);//done and got the token and token is set as sess token
// if($result) {
// //userSession::authorize($result);
// $userobj = new userSession($result);// done in authorize
// print("login success".$user."of ID");
// // sessions::set('login', true);
// // sessions::set('sessusername', $result);
// } else {
// print("login failed");
// }
// }
?>
</pre>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment