Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar

Adrian Statescu thinkphp

View GitHub Profile
// Remove the hardcoded galleryData array and replace with an empty array
let galleryData = [];
// Cart array remains the same
let cart = [];
const notification = document.getElementById("notification");
const galleryContainer = document.getElementById("gallery-grid");
// Function to load gallery data from backend
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard</title>
<style>
* {
margin: 0;
// Remove the hardcoded galleryData array and replace with an empty array
let galleryData = [];
// Cart array remains the same
let cart = [];
const notification = document.getElementById("notification");
const galleryContainer = document.getElementById("gallery-grid");
// Function to load gallery data from backend
@thinkphp
thinkphp / gist:aabb394fc1ae1268b363e8d8a1370ea7
Last active August 15, 2025 20:19
render-art-gallery.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Render Art Gallery</title>
</head>
<body>
<h1>Roger's Art Gallery</h1>
@thinkphp
thinkphp / get_gallery.php
Last active August 15, 2025 19:49
get_gallery.php
<?php
$host = "localhost";
$username = "adistatescu"
$password = "Adidas88statescu";
$database_name = "gallery_database";
try {
$mysqli = new mysqli($host, $username, $password);
@thinkphp
thinkphp / them-toggle.txt
Last active August 12, 2025 17:21
Theme Toggle
<style>
:root {
--background-color: #ffffff;
--text-color: #333333;
--secondary-bg: #f0f0f0;
--border-color: #dddddd;
--link-color: #0066cc;
}
[data-theme="dark"] {
@thinkphp
thinkphp / gist:41c19543e10d8c68afaf6e96e3fdf412
Last active August 12, 2025 16:32
rogerts table paintins and retrieve them
-- Create the gallery table
CREATE TABLE gallery (
id INT PRIMARY KEY AUTO_INCREMENT,
filename VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
size VARCHAR(50) NOT NULL,
price VARCHAR(20) NOT NULL,
caption TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
@thinkphp
thinkphp / review-shipping.html
Created August 3, 2025 17:27
review-shipping.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Review Your Order</title>
<style>
* {
margin: 0;
padding: 0;
@thinkphp
thinkphp / shipping.html
Last active August 3, 2025 15:59
shipping-address.html
<!--- https://docs.stripe.com/checkout/embedded/quickstart?lang=php -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shipping Address</title>
<style>
* {
margin: 0;