Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VBcms-2-0
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
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
Sofiane Lasri
VBcms-2-0
Commits
169da7b7
Commit
169da7b7
authored
3 years ago
by
Sofiane Lasri
Browse files
Options
Downloads
Patches
Plain Diff
Updated login page
parent
0bc15b28
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
vbcms-admin/login.php
+11
-18
11 additions, 18 deletions
vbcms-admin/login.php
vbcms-core/adminHandler.php
+1
-1
1 addition, 1 deletion
vbcms-core/adminHandler.php
with
12 additions
and
19 deletions
vbcms-admin/login.php
+
11
−
18
View file @
169da7b7
...
...
@@ -81,9 +81,8 @@ if (isset($_POST['login'])) { // Ne s'éxécute que si le formulaire de connexio
</div>
<div
class=
"align-self-center text-center mt-3"
>
<p>
Veuillez vous connecter pour accéder à l'administration
</p>
<a
id=
"connectToVBcmsLink"
class=
"btn btn-brown"
href=
"https://api.vbcms.net/auth.php?login&from=
<?=
$redirect
?>
"
>
Connexion
</a>
<a
href=
"#"
id=
"showLogin"
class=
"text-brown"
>
Utiliser un compte local
</a>
<div
id=
"loginDiv"
class=
"mt-3"
style=
"display: none;"
>
<!--<a id="connectToVBcmsLink" class="btn btn-brown" href="https://api.vbcms.net/auth.php?login&from=
<?=
$redirect
?>
">Connexion</a>-->
<?php
if
(
isset
(
$error
)
&&
!
empty
(
$error
)){
echo
'<div class="alert alert-danger mt-2" role="alert">'
.
$error
.
'</div>'
;
...
...
@@ -96,15 +95,9 @@ if (isset($_POST['login'])) { // Ne s'éxécute que si le formulaire de connexio
<div
class=
"form-group"
>
<input
class=
"form-control"
type=
"password"
name=
"password"
placeholder=
"Mot de passe"
required
>
</div>
<button
type=
"submit"
name=
"login"
class=
"btn btn-brown"
>
Se
connect
er
</button>
<button
type=
"submit"
name=
"login"
class=
"btn btn-brown"
>
<?=
translate
(
'
connect
'
)
?>
</button>
</form>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
$
(
"
#showLogin
"
).
on
(
"
click
"
,
function
(){
$
(
"
#loginDiv
"
).
css
(
"
display
"
,
"
block
"
);
});
</script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
vbcms-core/adminHandler.php
+
1
−
1
View file @
169da7b7
...
...
@@ -8,7 +8,7 @@ if (!isset($_SESSION["user_id"]) && $urlPath[2]!="login") { // Si l'utilisateur
if
(
basename
(
$_SERVER
[
'PHP_SELF'
])
!=
"login.php"
&&
!
isset
(
$sessionData
)
&&
!
isset
(
$sessionData
[
'error'
]))
{
// On le renvoie vers la page de connexion
//header("Location: https://vbcms.net/manager/login?from=".urlencode("$http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])); // Gestionnaire de licence vbcms.net
header
(
"Location: "
.
$url
[
"scheme"
]
.
"://"
.
$url
[
"host"
]
.
"/vbcms-admin/login
"
);
header
(
"Location: "
.
$url
[
"scheme"
]
.
"://"
.
$url
[
"host"
]
.
"/vbcms-admin/login
?from="
.
urlencode
(
"
$http
://"
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'REQUEST_URI'
])
);
}
}
elseif
(
!
isset
(
$_SESSION
[
"user_id"
])
&&
$urlPath
[
2
]
==
"login"
){
// Redirection vers la page de connexion
include
$GLOBALS
[
'vbcmsRootPath'
]
.
"/vbcms-admin/login.php"
;
...
...
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