Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Photogram
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
V Harish Ragavendher
Photogram
Commits
2391755e
Commit
2391755e
authored
1 year ago
by
V Harish Ragavendher
Browse files
Options
Downloads
Patches
Plain Diff
fixing errors with css loads
parent
6c35418b
Branches
master
No related tags found
1 merge request
!3
Push
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
App/__templates/__head.php
+3
-1
3 additions, 1 deletion
App/__templates/__head.php
App/__templates/__login.php
+2
-2
2 additions, 2 deletions
App/__templates/__login.php
App/libs/load.php
+2
-2
2 additions, 2 deletions
App/libs/load.php
App/testlogin.php
+23
-18
23 additions, 18 deletions
App/testlogin.php
with
30 additions
and
23 deletions
App/__templates/__head.php
+
3
−
1
View file @
2391755e
...
...
@@ -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"
))
{
?>
...
...
This diff is collapsed.
Click to expand it.
App/__templates/__login.php
+
2
−
2
View file @
2391755e
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
App/libs/load.php
+
2
−
2
View file @
2391755e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
App/testlogin.php
+
23
−
18
View file @
2391755e
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment