Skip to content

Commit 5b28839

Browse files
committed
Merge branch 'master' of https://github.com/pepiuox/PHP-GrapesJS
2 parents 23ac318 + ca66253 commit 5b28839

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1314
-73867
lines changed

admin/admin.php

+92-89
Original file line numberDiff line numberDiff line change
@@ -77,111 +77,114 @@ function displayBannedUsers() {
7777
?>
7878
<div class="container-fluid">
7979
<div class="row my-2 py-2">
80-
<div class="col-md-12">
81-
<h4>Registered users:</h4>
82-
<?php
83-
displayUsers();
84-
?>
85-
</div>
86-
<div class="col-md-12">
87-
<div><br /></div>
88-
<hr>
89-
<br />
90-
</div>
80+
<div class="col-md-12">
81+
<div class="card">
82+
<div class="card-body">
83+
<h4>Registered users:</h4>
84+
<?php
85+
displayUsers();
86+
?>
87+
</div>
88+
</div>
89+
</div>
9190
</div>
9291
</div>
9392

9493
<div class="container-fluid">
9594
<div class="row my-2 py-2">
9695
<div class="col-md-12">
97-
98-
<?php
99-
/**
100-
* The user is already logged in, not allowed to register.
101-
*/
102-
if (isset($_SESSION['regsuccess'])) {
103-
/* Registration was successful */
104-
if ($_SESSION['regsuccess']) {
105-
echo "<h4>Registrado!</h4>";
106-
if (EMAIL_WELCOME) {
107-
echo "<p>Agrega el usuario: <b>" . $_SESSION['reguname'] . "</b>, Se le ha enviado un correo electr�nico de confirmación que debe llegar en breve. Por favor, confirme su registro antes de continuar.<br />Volver a <a href='../'>Principal</a>"
108-
. "<a href='admin.php'>Agregar nuevo usuario</a>";
109-
} else {
110-
echo "<p>Agrega el usuario: <b>" . $_SESSION['reguname'] . "</b>, su información se ha añadido a la base de datos, "
111-
. "usted puede ahora <a href=\"../index.php\">acceder</a>.</p>";
96+
<hr>
97+
<div class="card">
98+
<div class="card-body">
99+
<?php
100+
/**
101+
* The user is already logged in, not allowed to register.
102+
*/
103+
if (isset($_SESSION['regsuccess'])) {
104+
/* Registration was successful */
105+
if ($_SESSION['regsuccess']) {
106+
echo "<h4>Registrado!</h4>";
107+
if (EMAIL_WELCOME) {
108+
echo "<p>Agrega el usuario: <b>" . $_SESSION['reguname'] . "</b>, Se le ha enviado un correo electr�nico de confirmación que debe llegar en breve. Por favor, confirme su registro antes de continuar.<br />Volver a <a href='../'>Principal</a>"
109+
. "<a href='admin.php'>Agregar nuevo usuario</a>";
110+
} else {
111+
echo "<p>Agrega el usuario: <b>" . $_SESSION['reguname'] . "</b>, su información se ha añadido a la base de datos, "
112+
. "usted puede ahora <a href=\"../index.php\">acceder</a>.</p>";
113+
}
114+
}
115+
/* Registration failed */ else {
116+
echo "<h4>Registracion Fallida</h4>";
117+
echo "<p>Lo sentimos, pero ha habido un error y el registro para el Usuario <b>" . $_SESSION['reguname'] . "</b>, "
118+
. "No se pudo completar. <br /> Por favor, inténtelo de nuevo en un momento posterior.</p>";
119+
}
120+
unset($_SESSION['regsuccess']);
121+
unset($_SESSION['reguname']);
112122
}
113-
}
114-
/* Registration failed */ else {
115-
echo "<h4>Registracion Fallida</h4>";
116-
echo "<p>Lo sentimos, pero ha habido un error y el registro para el Usuario <b>" . $_SESSION['reguname'] . "</b>, "
117-
. "No se pudo completar. <br /> Por favor, inténtelo de nuevo en un momento posterior.</p>";
118-
}
119-
unset($_SESSION['regsuccess']);
120-
unset($_SESSION['reguname']);
121-
}
122-
/**
123-
* The user has not filled out the registration form yet.
124-
* Below is the page with the sign-up form, the names
125-
* of the input fields are important and should not
126-
* be changed.
127-
*/ else {
128-
?>
123+
/**
124+
* The user has not filled out the registration form yet.
125+
* Below is the page with the sign-up form, the names
126+
* of the input fields are important and should not
127+
* be changed.
128+
*/ else {
129+
?>
129130

130-
<h4>Add New User </h4>
131-
<?php
132-
if ($form->num_errors > 0) {
133-
echo "<div><font size=\"2\" color=\"#ff0000\">" . $form->num_errors . " error(es) encontrados</font></div>";
134-
}
135-
?>
136-
<form action="../process.php" method="POST">
137-
<div class="row mb-3">
131+
<h4>Add New User </h4>
132+
<?php
133+
if ($form->num_errors > 0) {
134+
echo "<div><font size=\"2\" color=\"#ff0000\">" . $form->num_errors . " error(es) encontrados</font></div>";
135+
}
136+
?>
137+
<form action="../process.php" method="POST">
138+
<div class="row mb-3">
138139

139-
<label class="col-sm-3 col-form-label">Name:</label>
140-
<div class="col-sm-9">
141-
<input class="form-control form-control-sm" type="text" name="name" maxlength="30" value="<?php echo $form->value("name"); ?>"><?php echo $form->error("name"); ?>
142-
</div>
140+
<label class="col-sm-3 col-form-label">Name:</label>
141+
<div class="col-sm-9">
142+
<input class="form-control form-control-sm" type="text" name="name" maxlength="30" value="<?php echo $form->value("name"); ?>"><?php echo $form->error("name"); ?>
143+
</div>
143144

144-
</div>
145-
<div class="row mb-3">
145+
</div>
146+
<div class="row mb-3">
146147

147-
<label class="col-sm-3 col-form-label">Username:</label>
148-
<div class="col-sm-9">
149-
<input class="form-control form-control-sm" type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"><?php echo $form->error("user"); ?>
150-
</div>
148+
<label class="col-sm-3 col-form-label">Username:</label>
149+
<div class="col-sm-9">
150+
<input class="form-control form-control-sm" type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"><?php echo $form->error("user"); ?>
151+
</div>
151152

152-
</div>
153-
<div class="row mb-3">
153+
</div>
154+
<div class="row mb-3">
154155

155-
<label class="col-sm-3 col-form-label">Password:</label>
156-
<div class="col-sm-9">
157-
<input class="form-control form-control-sm" type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"><?php echo $form->error("pass"); ?>
158-
</div>
156+
<label class="col-sm-3 col-form-label">Password:</label>
157+
<div class="col-sm-9">
158+
<input class="form-control form-control-sm" type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"><?php echo $form->error("pass"); ?>
159+
</div>
159160

160-
</div>
161-
<div class="row mb-3">
161+
</div>
162+
<div class="row mb-3">
162163

163-
<label class="col-sm-3 col-form-label">Email:</label>
164-
<div class="col-sm-9">
165-
<input class="form-control form-control-sm" type="text" name="email" maxlength="50" value="<?php echo $form->value("email"); ?>"><?php echo $form->error("email"); ?>
166-
</div>
164+
<label class="col-sm-3 col-form-label">Email:</label>
165+
<div class="col-sm-9">
166+
<input class="form-control form-control-sm" type="text" name="email" maxlength="50" value="<?php echo $form->value("email"); ?>"><?php echo $form->error("email"); ?>
167+
</div>
167168

168-
</div>
169-
<div class="row mb-3">
170-
<div class="col-sm-12">
171-
<input type="hidden" name="subjoin" value="1"><input class="button" type="submit" value="Add user!">
172-
</div>
173-
</div>
174-
</form>
175-
<?php
176-
}
177-
?>
169+
</div>
170+
<div class="row mb-3">
171+
<div class="col-sm-12">
172+
<input type="hidden" name="subjoin" value="1"><input class="button" type="submit" value="Add user!">
173+
</div>
174+
</div>
175+
</form>
176+
<?php
177+
}
178+
?>
178179

180+
</div>
181+
<?php
182+
/**
183+
* Update User Valid
184+
*/
185+
?>
186+
</div>
179187
</div>
180-
<?php
181-
/**
182-
* Update User Valid
183-
*/
184-
?>
185188
</div>
186189
</div>
187190
<div class="container-fluid">
@@ -190,7 +193,7 @@ function displayBannedUsers() {
190193
<hr>
191194
<div class="card">
192195
<div class="card-header p-2">
193-
<ul class="nav nav-pills">
196+
<ul class="nav nav-tabs" id="users" role="tablist">
194197
<li class="nav-item"><a class="nav-link active" href="#invuser" data-toggle="tab">Validate and Invalidate User</a></li>
195198
<li class="nav-item"><a class="nav-link" href="#upduser" data-toggle="tab">Update User Level</a></li>
196199
<li class="nav-item"><a class="nav-link" href="#deluser" data-toggle="tab">Delete User</a></li>
@@ -254,7 +257,7 @@ function displayBannedUsers() {
254257
<hr>
255258
<div class="card">
256259
<div class="card-header p-2">
257-
<ul class="nav nav-pills">
260+
<ul class="nav nav-tabs" id="banned" role="tablist">
258261
<li class="nav-item"><a class="nav-link active" href="#deiuser" data-toggle="tab">Delete Inactive Users</a></li>
259262
<li class="nav-item"><a class="nav-link" href="#banuser" data-toggle="tab">Banned User</a></li>
260263
<li class="nav-item"><a class="nav-link" href="#rebuser" data-toggle="tab">Remove Banned Users</a></li>

admin/components/accordion.php

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<li class="pi-draggable" draggable="true" ondragstart="return dragStart(event)">
2+
<div class="accordion" id="accordionExample">
3+
<div class="accordion-item">
4+
<h2 class="accordion-header" id="headingOne">
5+
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
6+
Accordion Item #1
7+
</button>
8+
</h2>
9+
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
10+
<div class="accordion-body">
11+
<strong>This is the first item's accordion body.</strong> It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
12+
</div>
13+
</div>
14+
</div>
15+
<div class="accordion-item">
16+
<h2 class="accordion-header" id="headingTwo">
17+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
18+
Accordion Item #2
19+
</button>
20+
</h2>
21+
<div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
22+
<div class="accordion-body">
23+
<strong>This is the second item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
24+
</div>
25+
</div>
26+
</div>
27+
<div class="accordion-item">
28+
<h2 class="accordion-header" id="headingThree">
29+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
30+
Accordion Item #3
31+
</button>
32+
</h2>
33+
<div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
34+
<div class="accordion-body">
35+
<strong>This is the third item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
</li>
41+
<li class="pi-draggable" draggable="true" ondragstart="return dragStart(event)">
42+
<div class="accordion accordion-flush" id="accordionFlushExample">
43+
<div class="accordion-item">
44+
<h2 class="accordion-header" id="flush-headingOne">
45+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-controls="flush-collapseOne">
46+
Accordion Item #1
47+
</button>
48+
</h2>
49+
<div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
50+
<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the first item's accordion body.</div>
51+
</div>
52+
</div>
53+
<div class="accordion-item">
54+
<h2 class="accordion-header" id="flush-headingTwo">
55+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-controls="flush-collapseTwo">
56+
Accordion Item #2
57+
</button>
58+
</h2>
59+
<div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample">
60+
<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the second item's accordion body. Let's imagine this being filled with some actual content.</div>
61+
</div>
62+
</div>
63+
<div class="accordion-item">
64+
<h2 class="accordion-header" id="flush-headingThree">
65+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseThree" aria-expanded="false" aria-controls="flush-collapseThree">
66+
Accordion Item #3
67+
</button>
68+
</h2>
69+
<div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample">
70+
<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space to make it look, at least at first glance, a bit more representative of how this would look in a real-world application.</div>
71+
</div>
72+
</div>
73+
</div>
74+
</li>

admin/components/covers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<li class="pi-draggable active" draggable="true" ondragstart="return dragStart(event)">
2-
<div class="py-5 text-center text-white h-100 align-items-center d-flex" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)), url(<?php echo $base; ?>assets/images/cover-bubble-dark.svg); background-position: center center, center center; background-size: cover, cover; background-repeat: repeat, repeat;">
2+
<div class="py-5 text-center text-primary h-100 align-items-center d-flex" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)), url(<?php echo $base; ?>assets/images/cover-bubble-dark.svg); background-position: center center, center center; background-size: cover, cover; background-repeat: repeat, repeat;">
33
<div class="container py-5">
44
<div class="row">
55
<div class="mx-auto col-lg-8 col-md-10">
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)