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

Merge branch 'push' into 'master'

Push

See merge request !3
parents eef58161 d4e61e4d
No related branches found
No related tags found
1 merge request!3Push
Pipeline #3617 passed
......@@ -8,12 +8,14 @@
<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")) {?>
<?if (file_exists($_SERVER['DOCUMENT_ROOT'] . get_config("base_path") . "App/css/" . basename($_SERVER['PHP_SELF'], ".php") . ".css")) {?>
<link
href="<?=get_config("base_path")?>/App/css/<?=basename($_SERVER['PHP_SELF'], ".php")?>.css"
href="<?=get_config("base_path")?>App/css/<?=basename($_SERVER['PHP_SELF'], ".php")?>.css"
rel="stylesheet">
<!-- here we are loading the css file in an autoamted way like we already know document root has the location to htdocs
and after that we are giving the css folder location there we are using base name function from php self which is the
......
......@@ -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>
......@@ -44,7 +44,7 @@ if($login) {
<main class="form-signin w-100 m-auto">
<form method="post" action="login_page.php">
<img class="mb-4"
src="<?=get_config("base_path")?>/App/assets/logo.png"
src="<?=get_config("base_path")?>App/assets/logo.png"
alt="poke img" width="300" height="150">
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>
......
......@@ -17,7 +17,9 @@ if ($signup) {
<div class="container py-5">
<h1 class="text-body-emphasis">Signup success</h1>
<p class="col-lg-8 mx-auto lead">
<p>You can <a href="<?=get_config("base_path")?>/App/login_page.php">Login</a> from here</p>
<p>You can <a
href="<?=get_config("base_path")?>App/login_page.php">Login</a>
from here</p>
</p>
</div>
</div>
......@@ -30,7 +32,9 @@ if ($signup) {
<form method="post" action="signup.php">
<img class="mb-4" src="<?=get_config("base_path")?>/App/assets/logo.png" alt="poke img" width="300" height="150">
<img class="mb-4"
src="<?=get_config("base_path")?>App/assets/logo.png"
alt="poke img" width="300" height="150">
<h1 class="h3 mb-3 fw-normal">Please signup </h1>
<div class="form-floating">
<input name="username" type="tinytext" class="form-control" id="floatingInput" placeholder="text" width="40"
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -23,7 +23,9 @@ include 'libs/load.php';
<?load_template('__footer');?>
<script src="<?=get_config("base_path")?>/App/assets/dist/js/bootstrap.bundle.min.js"></script>
<script
src="<?=get_config("base_path")?>App/assets/dist/js/bootstrap.bundle.min.js">
</script>
</body>
......
......@@ -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
......
......@@ -20,7 +20,7 @@ include 'libs/load.php';
integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
<script
src="<?=get_config("base_path")?>/App/assets/dist/js/bootstrap.bundle.min.js">
src="<?=get_config("base_path")?>App/assets/dist/js/bootstrap.bundle.min.js">
</script>
<script>
......
......@@ -20,7 +20,7 @@ include 'libs/load.php';
<script
src="<?=get_config("base_path")?>/App/assets/dist/js/bootstrap.bundle.min.js">
src="<?=get_config("base_path")?>App/assets/dist/js/bootstrap.bundle.min.js">
</script>
<?//print($Email);?>
......
......@@ -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