Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
blog_updated
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
Rajesh D
blog_updated
Commits
1dd315d5
Commit
1dd315d5
authored
2 weeks ago
by
Rajesh D
Browse files
Options
Downloads
Patches
Plain Diff
bugs fixed
parent
333b71e9
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app/pages/contact.php
+9
-6
9 additions, 6 deletions
app/pages/contact.php
app/pages/includes/post-card.php
+7
-2
7 additions, 2 deletions
app/pages/includes/post-card.php
app/pages/post.php
+5
-1
5 additions, 1 deletion
app/pages/post.php
app/pages/user/post.php
+5
-2
5 additions, 2 deletions
app/pages/user/post.php
with
26 additions
and
11 deletions
app/pages/contact.php
+
9
−
6
View file @
1dd315d5
...
...
@@ -66,24 +66,27 @@
</div>
</div>
</div>
<form
class=
"row mb-3"
>
<form
class=
"row mb-3"
action=
"//api.web3forms.com/submit"
method=
"POST"
name=
"contactform"
>
<input
type=
"hidden"
name=
"access_key"
value=
"53cbd4c6-8fda-4b19-aceb-975b5fdea86c"
>
<input
type=
"hidden"
name=
"redirect"
value=
"https://blog.zeal.wtf/"
>
<input
type=
"hidden"
name=
"from_name"
value=
"
<?=
ROOT
?>
"
>
<div
class=
"col-md-6 p-3"
>
<input
required
placeholder=
"First Name"
type=
"text"
class=
"form-control"
/>
<input
required
placeholder=
"First Name"
type=
"text"
name=
"name"
class=
"form-control"
/>
</div>
<div
class=
"col-md-6 p-3"
>
<input
placeholder=
"Last Name"
type=
"text"
class=
"form-control"
/>
</div>
<div
class=
"col-md-6 p-3"
>
<input
placeholder=
"E-mail"
type=
"email"
class=
"form-control"
/>
<input
placeholder=
"E-mail"
type=
"email"
name=
"email"
class=
"form-control"
/>
</div>
<div
class=
"col-md-6 p-3"
>
<input
required
placeholder=
"Phone"
type=
"te
l
"
class=
"form-control"
/>
<input
required
placeholder=
"Phone"
type=
"te
xt"
name=
"Phone Number
"
class=
"form-control"
/>
</div>
<div
class=
"col-md"
>
<textarea
required
placeholder=
"Write your message"
class=
"form-control"
rows=
"3"
></textarea>
<textarea
required
placeholder=
"Write your message"
name=
"message"
class=
"form-control"
rows=
"3"
></textarea>
</div>
<div
class=
"text-end mt-4"
>
<input
class=
"btn px-4 py-3 btn-outline-dark"
type=
"submit"
value=
"Send Message"
/>
<input
class=
"btn px-4 py-3 btn-outline-dark"
type=
"submit"
/>
</div>
</form>
</div>
...
...
This diff is collapsed.
Click to expand it.
app/pages/includes/post-card.php
+
7
−
2
View file @
1dd315d5
...
...
@@ -64,10 +64,10 @@
<div
class=
"d-flex justify-content-between align-items-center mt-3"
>
<!-- Like Button -->
<div
class=
"d-flex align-items-center"
>
<button
class=
"btn btn-link p-0 like-btn"
data-post-id=
"
<?=
$id
?>
"
>
<button
class=
"btn btn-link p-0 like-btn"
data-post-id=
"
<?=
$id
?>
"
data-logged-in=
"
<?=
isset
(
$_SESSION
[
'user_id'
])
?
'true'
:
'false'
?>
"
>
<i
class=
"bi
<?=
$isLiked
?
'bi-heart-fill text-danger'
:
'bi-heart'
?>
like-icon fs-5"
></i>
</button>
<a
href=
"
<?=
ROOT
?>
/post/
<?=
$post
[
'slug'
]
?>
"
class=
"text-muted text-decoration-none"
><span
class=
"ms-1 like-count"
>
<?=
$likes
?>
Likes
</span></a>
<a
href=
"
<?=
ROOT
?>
/post/
<?=
$post
[
'slug'
]
?>
"
class=
"text-muted text-decoration-none
mx-2
"
><span
class=
"ms-1 like-count"
>
<?=
$likes
?>
Likes
</span></a>
</div>
<!-- Comments -->
...
...
@@ -95,6 +95,11 @@
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
()
{
document
.
querySelectorAll
(
'
.like-btn
'
).
forEach
(
button
=>
{
button
.
addEventListener
(
'
click
'
,
function
()
{
let
isLoggedIn
=
this
.
getAttribute
(
'
data-logged-in
'
);
// Check login status
if
(
isLoggedIn
===
"
false
"
)
{
window
.
location
.
href
=
"
<?=
ROOT
?>
/login
"
;
// Redirect to login page
return
;
}
let
postId
=
this
.
getAttribute
(
'
data-post-id
'
);
let
icon
=
this
.
querySelector
(
'
.like-icon
'
);
let
countElement
=
this
.
nextElementSibling
;
...
...
This diff is collapsed.
Click to expand it.
app/pages/post.php
+
5
−
1
View file @
1dd315d5
<?php
if
(
!
logged_in
()){
redirect
(
ROOT
.
'/login'
);
}
?>
<?
include
'includes/header.php'
;
?>
<!-- CSS for Dynamic Light/Dark Mode Text Colors -->
<style>
/* Default Light Mode (Black Text) */
...
...
This diff is collapsed.
Click to expand it.
app/pages/user/post.php
+
5
−
2
View file @
1dd315d5
...
...
@@ -57,12 +57,15 @@
$query
=
"SELECT * FROM categories WHERE active=1"
;
$categories
=
query
(
$query
);
?>
<select
id=
"dropdown1"
class=
"form-select rounded-3"
name=
"category_id"
>
<select
id=
"dropdown1"
class=
"form-select rounded-3"
name=
"category_id"
>
<option
value=
""
>
Select Category
</option>
<?php
foreach
(
$categories
as
$category
)
:
?>
<option
value=
"
<?=
$category
[
'id'
]
?>
"
>
<?=
$category
[
'category'
]
?>
</option>
<option
value=
"
<?=
$category
[
'id'
]
?>
"
<?=
(
$category
[
'id'
]
==
oldvalue
(
'category_id'
))
?
"selected"
:
""
?>
>
<?=
$category
[
'category'
]
?>
</option>
<?php
endforeach
;
?>
</select>
<label
for=
"dropdown1"
>
Category
</label>
</div>
...
...
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