diff --git a/.hta_footer.php b/.hta_footer.php index 2de626a..89cf1ae 100644 --- a/.hta_footer.php +++ b/.hta_footer.php @@ -18,7 +18,7 @@ -
+

About College

Sree Chaitanya College, Habra occupies a very distinguished status in the higher education map of the district of North 24 Parganas as well as of the state of West Bengal. The institution with its imposing building-structures amid a lush green of more than 20 acres of land, overlooking Jessore Road (NH 35), is about 40 km from Kolkata.

diff --git a/.hta_slug/_home.php b/.hta_slug/_home.php index 682c4a6..b289a47 100644 --- a/.hta_slug/_home.php +++ b/.hta_slug/_home.php @@ -5,7 +5,7 @@ $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // $stmt = $conn->prepare("SELECT * FROM `scc22` WHERE `type` = 'notice'"); - $stmt = $conn->prepare("SELECT * FROM `scc24` WHERE `type` = 'notice' ORDER BY `date_created` DESC"); + $stmt = $conn->prepare("SELECT * FROM `scc24` WHERE `type` = 'notice' ORDER BY `date_created` DESC LIMIT 20"); $stmt->execute(); $notices = $stmt->fetchAll(PDO::FETCH_ASSOC); @@ -21,18 +21,17 @@ $in_page_message = "

Error: " . $e->getMessage() . "

"; } ?> -
+
clg
-
-

Vision of The College

-

Character Formation through Knowledge and Value-based Education for +

Vision of The College

+

Character Formation through Knowledge and Value-based Education for Transformation of the Society and the Nation

@@ -73,42 +72,81 @@

- -
-
-
Notice
-
+
+
+
Notice
+
'.$notice['title'].''; + echo ''.$notice['title'].''; } ?>
- -
-
Important Links
+
+
Important Links
'.$important['title'].''; + echo ''.$important['title'].''; } ?>
-
Important Links
+
Events
'.$event['title'].''; + echo ''.$event['title'].''; } ?>
-
-
\ No newline at end of file + + + \ No newline at end of file diff --git a/admin/edit-content.php b/admin/edit-content.php index 9365e77..b641a43 100644 --- a/admin/edit-content.php +++ b/admin/edit-content.php @@ -54,6 +54,8 @@ bindParam(':content', $_POST['content']); $stmt->execute(); // echo ""; + + if ($contentType === 'page') { + $contentFolder = '/'; + } elseif ($contentType === 'notice') { + $contentFolder = '/notice/'; + } else { + $contentFolder = ''; // Default case, you can adjust this as needed + } + + $filePath = $_SERVER['DOCUMENT_ROOT'] . $contentFolder . $fileName; + // echo $filePath; + if (file_exists($filePath)) { + if (unlink($filePath)) { + // echo "File deleted successfully."; + } else { + // echo "Error: Unable to delete the file."; + } + } else { + // echo "File does not exist."; + } } catch (PDOException $e) { echo "Err: " . $e->getMessage(); } @@ -138,12 +160,15 @@ try { updateEditorContent(' . json_encode($row['content']) . '); '; }; - // exit(); -} catch (PDOException $e) { - echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage())); -} + } catch (PDOException $e) { + echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage())); + } ?> \ No newline at end of file diff --git a/admin/page-list.php b/admin/page-list.php index 94bfab3..1408a14 100644 --- a/admin/page-list.php +++ b/admin/page-list.php @@ -29,7 +29,7 @@
- Edit   + Edit   View