Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar

Adrian Statescu thinkphp

View GitHub Profile
@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;
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Newsletter Admin - Abonați</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
<?php
// Enable error reporting for debugging (disable in production)
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Set JSON header first
header('Content-Type: application/json; charset=utf-8');
header('Access-Control-Allow-Origin: *');
class SimpleNewsletter extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
// Get attributes or set defaults
this.title = this.getAttribute('title') || 'Newsletter';
this.description = this.getAttribute('description') || 'Abonează-te pentru noutăți!';
this.apiUrl = this.getAttribute('api-url') || 'newsletter.php';
this.variant = this.getAttribute('variant') || 'default'; // default, compact, footer
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Newsletter Web Component Demo</title>
<style>
body {
margin: 0;
padding: 20px;
@thinkphp
thinkphp / fab-insta.js
Created July 27, 2025 15:28
fab web component
class ContactFab extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
this.isOpen = false;
// Get attributes or set defaults
this.whatsappNumber = this.getAttribute('whatsapp') || '+1234567890';
this.emailAddress = this.getAttribute('email') || '[email protected]';
this.phoneNumber = this.getAttribute('phone') || '+1234567890';
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';