Skip to content

Commit fffed50

Browse files
Last update
1 parent 4d4230b commit fffed50

18 files changed

+124
-159
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ First off, thank you for considering contributing to [CorelyPHP](https://github.
1313
- Expected vs. actual behavior.
1414
- Screenshots or logs (if applicable/possible).
1515
- Environment details (e.g., OS, browser).
16-
3. **Remember to follow** [Style Guides](https://github.com/Dominik-developer/CorelyPHP/STYLE_GUIDES.md) for this software.
16+
3. **Remember to follow** [Style Guides](https://github.com/Dominik-developer/CorelyPHP/blob/main/STYLE_GUIDES.md) for this software.
1717

1818
## How to Suggest a Feature
1919

20-
1. **Search existing suggestions:** Ensure your idea isn’t already suggested in [existing issues](https://github.com/Dominik-developerCorelyPHP/issues).
20+
1. **Search existing suggestions:** Ensure your idea isn’t already suggested in [existing issues](https://github.com/Dominik-developer/CorelyPHP/issues).
2121
2. **If it’s a new idea:**
2222
- Open a new issue.
2323
- Add a clear title and description.
2424
- Explain why the feature is needed and what problem it solves.
2525
- Describe how the feature might work or look.
2626
- Potential implementation ideas.
27-
3. **Remember to follow** [Style Guides](https://github.com/Dominik-developer/CorelyPHP/STYLE_GUIDES.md) for this software.
27+
3. **Remember to follow** [Style Guides](https://github.com/Dominik-developer/CorelyPHP/blob/main/STYLE_GUIDES.md) for this software.
2828

2929
## Code of Conduct
3030

HOW_TO_RUN.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
# CorelyPHP
32

43
## Introduction
4+
55
CorelyPHP is a ready-to-deploy blogging platform designed for efficient web development. This guide provides instructions on how to set up and run the project on your local machine.
66

77
## Prerequisites
@@ -18,13 +18,13 @@ Before you begin, ensure you have the following installed:
1818
1. Clone the repository:
1919

2020
```bash
21-
git clone https://github.com/your-username/CorelyPHP.git
21+
git clone https://github.com/Dominik-developer/CorelyPHP.git
2222
cd CorelyPHP
2323
```
2424

2525
2. Set up the database:
2626

27-
- Open phpMyAdmin in your browser (http://localhost/phpmyadmin).
27+
- Open phpMyAdmin in your browser (`http://localhost/phpmyadmin`).
2828
- Import the SQL files located in the `sql` folder:
2929
- Create a new database by importing `database_structure.sql`
3030
- Add the `database_data.sql`
@@ -39,11 +39,7 @@ Before you begin, ensure you have the following installed:
3939
- For user: `http://localhost/CorelyPHP/public`
4040
- For admin: `http://localhost/CorelyPHP/admin`
4141

42-
6. To log into Admin panel use **`Admin`** for login and **`pass`** for password.
43-
44-
<!-- ## Usage
45-
46-
Once the server is running, visit `http://localhost/CorelyPHP` in your browser to access the application. -->
42+
5. To log into Admin panel use **`admin`** for login and **`pass`** for password.
4743

4844
## Contributing
4945

SUPPORT.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Support
2+
3+
Thank you for using CorelyPHP! If you need help or have any questions, please check the available support options below.
4+
5+
## ▶️ How to use
6+
7+
If you don't know how to run this project visit [HOW_TO_RUN.md](https://github.com/Dominik-developer/CorelyPHP/blob/v1.1.0/HOW_TO_RUN.md) and there you will find simple instructions on how to run it locally.
8+
9+
## 📖 Documentation
10+
11+
Before opening a support request, please check our documentation:
12+
13+
- [CorelyPHP Documentation](https://github.com/Dominik-developer/CorelyPHP/blob/v1.1.0/docs/documentation.txt) **(In progress)**
14+
15+
## 💬 Community Support
16+
17+
If you need general help or want to discuss CorelyPHP with other users, feel free to:
18+
19+
- Open a discussion in the **Discussions** tab on GitHub.
20+
<!-- - Open issue with label **'support'** in the last resort.-->
21+
<!-- - Join our community (if applicable) on Discord, Slack, or forums *(Link to be added if available)*. -->
22+
23+
## 🐞 Reporting Issues
24+
25+
If you encounter a bug or have a feature request, please:
26+
27+
- Open [CONTRIBUTING.md](https://github.com/Dominik-developer/CorelyPHP/blob/main/CONTRIBUTING.md) and follow the instructions given there.
28+
29+
<!-- 1. Check the **[issue tracker](https://github.com/Dominik-developer/CorelyPHP/issues)** to see if it has already been reported.
30+
2. Open a new issue and include:
31+
- A clear description of the problem.
32+
- Steps to reproduce the issue.
33+
- Expected behavior and actual behavior.
34+
- Any relevant error messages or logs.
35+
-->
36+
## ✉️ Contact
37+
38+
<!--For specific inquiries or security concerns, please contact us at: **[your-email@example.com](mailto\:your-email@example.com)** *(Update with the correct email)*. -->
39+
For now create issue, tag @Dominik-developer and add **'support'** label.
40+
41+
Thank you for contributing to CorelyPHP! 🚀

admin/algo/dashboard.alg.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<?php
2-
3-
session_start();
2+
declare(strict_types=1);
43

54
if(!isset ($_SESSION['adminLoged']))
65
{
76
header('Location: ../panel.login.php');
87
exit();
98
}
109

10+
function dashboard_data(): string {
1111

12-
function dashboard_data() {
13-
14-
echo'
12+
return'
1513
<div id="hello">
1614
Welcome on admin panel for your blog!
1715
<br>

admin/algo/delate.alg.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
2-
session_start();
2+
declare(strict_types=1);
3+
4+
if (session_status() == PHP_SESSION_NONE) {
5+
session_start();
6+
}
37

48
if (!isset($_SESSION['adminLoged'])) {
59
header('Location: ../panel.login.php');

admin/algo/edit.alg.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
2+
declare(strict_types=1);
23

3-
session_start();
4+
if (session_status() == PHP_SESSION_NONE) {
5+
session_start();
6+
}
47

58
if(!isset ($_SESSION['adminLoged'])) {
69
header('Location: ../panel.login.php');
@@ -10,9 +13,6 @@
1013
//additional files
1114
require '../panel.connect.php';
1215

13-
14-
15-
1616
try {
1717
$conn = @new mysqli($host, $db_user, $db_password, $db_name);
1818

@@ -27,8 +27,8 @@
2727
exit();
2828
}
2929

30-
$NEW_title = $_POST['new_title'] ?? ''; //$NEW_title = mysqli_real_escape_string($conn, $_POST['new_title'] ?? '');
31-
$NEW_text = $_POST['new_text'] ?? ''; //$NEW_text = mysqli_real_escape_string($conn, $_POST['new_text'] ?? '');
30+
$NEW_title = $_POST['new_title'] ?? '';
31+
$NEW_text = $_POST['new_text'] ?? '';
3232
$NEW_photo = $_FILES['new_photo'] ?? '';
3333

3434
// Validate required fields
@@ -64,10 +64,6 @@
6464
if(!empty($_FILES['new_photo']['name'])) {
6565

6666
#========= Remove the old photo if a new one is being uploaded =====
67-
68-
/** *
69-
check in db what way i have path for photos saved and fix it in case it is the other way
70-
*/
7167
if (!empty($existing_photo) && file_exists(dirname(__DIR__, 2) .'/'. $existing_photo)) {
7268
unlink(dirname(__DIR__, 2) .'/'. $existing_photo);
7369
}

admin/algo/new.alg.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
2+
declare(strict_types=1);
23

3-
session_start();
4-
4+
if (session_status() == PHP_SESSION_NONE) {
5+
session_start();
6+
}
57

68
if(!isset ($_SESSION['adminLoged'])) {
79
header('Location: ../panel.login.php');

admin/algo/password.alg.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
2+
declare(strict_types=1);
23

3-
session_start();
4+
if (session_status() == PHP_SESSION_NONE) {
5+
session_start();
6+
}
47

58
if(!isset ($_SESSION['adminLoged']))
69
{

admin/algo/service_status.alg.php

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
2+
declare(strict_types=1);
23

3-
session_start();
4+
if (session_status() == PHP_SESSION_NONE) {
5+
session_start();
6+
}
47

58
if(!isset ($_SESSION['adminLoged']))
69
{
@@ -46,58 +49,3 @@
4649
header('Location: ../panel.php?window=service-break');
4750
exit();
4851
}
49-
50-
51-
52-
53-
54-
55-
56-
/*
57-
58-
59-
60-
$setting_id = $_POST['setting_id'];
61-
62-
$sql = "SELECT `service_status` FROM `service` WHERE id=1 ";
63-
64-
if($result = @$conn->query(sprintf($sql)))
65-
{
66-
67-
$num = $result->num_rows;
68-
69-
if($num >0)
70-
{
71-
72-
$row = $result->fetch_assoc();
73-
74-
//Value change
75-
$new_value = $row["service_status"] ? 0 : 1;
76-
77-
//DB update
78-
$sql_update = "UPDATE `service` SET service_status = $new_value WHERE id = $setting_id";
79-
80-
if ($conn->query($sql_update) === TRUE) {
81-
82-
$_SESSION['message'] = 'Service status value changed successfully';
83-
header('Location: ../panel.php?window=service-break');
84-
} else {
85-
$_SESSION['message'] = 'Error: something went wrong during updating status';
86-
#echo $conn->error;
87-
header('Location: ../panel.php?window=service-break');
88-
}
89-
90-
} else{
91-
$_SESSION['message'] = 'more rows found than needed';
92-
header('Location: ../panel.php?window=service-break');
93-
}
94-
}
95-
$conn->close();
96-
exit();
97-
} else {
98-
$_SESSION['message'] = 'something went wrong, try again';
99-
header('Location: ../panel.php?window=service-break');
100-
exit();
101-
}
102-
103-

admin/all_articles.alg.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
3-
session_start();
2+
declare(strict_types=1);
43

54
if (!isset($_SESSION['adminLoged'])) {
65
header('Location: panel.login.php');

0 commit comments

Comments
 (0)