This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Database connection | |
$conn = new mysqli("localhost", "root", "", "project",3307); | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
// Check if admin is logged in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php session_start(); ?>fdg | |
<!DOCTYPE html> | |
<html lang="en">f | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Register</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body class="bg-gray-900 flex items-center justify-center h-screen"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "tailwindcss"; | |
@keyframes fadeInScale { | |
0% { | |
opacity: 0; | |
transform: scale(0.85); | |
} | |
100% { | |
opacity: 1; | |
transform: scale(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Database connection | |
$conn = new mysqli("localhost", "root", "", "project",3307); | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
// Check if admin is logged in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "tailwindcss"; | |
@keyframes fadeInScale { | |
0% { | |
opacity: 0; | |
transform: scale(0.85); | |
} | |
100% { | |
opacity: 1; | |
transform: scale(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Ensure the user is logged in | |
if (!isset($_SESSION['user_id'])) { | |
header("Location: login.php"); | |
exit(); | |
} | |
$user_id = $_SESSION['user_id']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Database connection | |
$conn = new mysqli("localhost", "root", "", "project",3307); | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
// Check if admin is logged in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?phpsd | |
session_start(); | |
dfsdsfd | |
// Database connection | |
$conn = new mysqli("127.0.0.1", "root", "", "project",3307); | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_error); | |
} | |
// Admin login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/pages/CodeSharingPage.jsx | |
import { useState, useEffect, useRef } from "react"; | |
import { Link } from "react-router-dom"; | |
import axios from "axios"; | |
import Prism from "prismjs"; | |
// Prism styles + line numbers plugin | |
import "prismjs/themes/prism-tomorrow.css"; | |
import "prismjs/plugins/line-numbers/prism-line-numbers.css"; | |
import "prismjs/plugins/line-numbers/prism-line-numbers.js"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
import axios from "axios"; | |
import Prism from "prismjs"; | |
import "prismjs/components/prism-javascript"; | |
import "prismjs/components/prism-css"; | |
import "prismjs/components/prism-markup"; | |
import "prismjs/themes/prism-tomorrow.css"; | |
import "../App.css"; | |
// ---------------- HEADER ---------------- |