feat: complete modern PHP tire showcase, calculator, comparison, guide and admin platform

This commit is contained in:
Antigravity Bot
2026-08-30 14:07:07 +03:30
parent db26990247
commit 27d35177b6
33 changed files with 4675 additions and 0 deletions
+133
View File
@@ -0,0 +1,133 @@
<?php
// assets/generate_svgs.php
$dir = __DIR__ . '/images';
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
// Generate realistic SVG tire graphics with tread patterns and styling
function makeTireSvg($filename, $name, $badgeColor = '#e11d48', $treadType = 'standard') {
$svg = '<?xml version="1.0" encoding="UTF-8"?>
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="tireGrad" cx="50%" cy="50%" r="50%" fx="30%" fy="30%">
<stop offset="0%" stop-color="#374151" />
<stop offset="70%" stop-color="#111827" />
<stop offset="100%" stop-color="#030712" />
</radialGradient>
<radialGradient id="rimGrad" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#f3f4f6" />
<stop offset="45%" stop-color="#9ca3af" />
<stop offset="85%" stop-color="#4b5563" />
<stop offset="100%" stop-color="#1f2937" />
</radialGradient>
<radialGradient id="centerCap" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="' . $badgeColor . '" />
<stop offset="100%" stop-color="#0f172a" />
</radialGradient>
<filter id="shadow" x="-10%" y="-10%" width="120%" height="120%">
<feDropShadow dx="0" dy="10" stdDeviation="15" flood-color="#000000" flood-opacity="0.5"/>
</filter>
</defs>
<!-- Outer Shadow & Tire Rubber -->
<circle cx="200" cy="200" r="175" fill="url(#tireGrad)" filter="url(#shadow)" stroke="#1e293b" stroke-width="4"/>
<!-- Outer Tread Marks -->
<circle cx="200" cy="200" r="162" fill="none" stroke="#262e3d" stroke-width="8" stroke-dasharray="14, 8"/>
<circle cx="200" cy="200" r="148" fill="none" stroke="#1f2937" stroke-width="4" stroke-dasharray="8, 6"/>
<!-- Sidewall -->
<circle cx="200" cy="200" r="138" fill="#18202f" stroke="#0f172a" stroke-width="3"/>
<circle cx="200" cy="200" r="115" fill="#0f172a"/>
<!-- Sidewall Text Emulation -->
<path id="textPath1" d="M 90,200 A 110,110 0 0,1 310,200" fill="none"/>
<text font-family="Arial, sans-serif" font-size="10" font-weight="bold" fill="#64748b" letter-spacing="3">
<textPath href="#textPath1" startOffset="50%" text-anchor="middle">' . htmlspecialchars(strtoupper($name)) . ' - HIGH PERFORMANCE</textPath>
</text>
<path id="textPath2" d="M 310,200 A 110,110 0 0,1 90,200" fill="none"/>
<text font-family="Arial, sans-serif" font-size="9" font-weight="bold" fill="#475569" letter-spacing="2">
<textPath href="#textPath2" startOffset="50%" text-anchor="middle">SAFETY &amp; TRACTION TECH - GASEMI TIRE</textPath>
</text>
<!-- Alloy Rim Outer Lip -->
<circle cx="200" cy="200" r="105" fill="url(#rimGrad)" stroke="#374151" stroke-width="3"/>
<circle cx="200" cy="200" r="92" fill="#0b0f19"/>
<!-- Alloy Spokes (5-Star / 10-Spoke Sport Design) -->
<g stroke="#94a3b8" stroke-width="12" stroke-linecap="round">
<line x1="200" y1="200" x2="200" y2="110"/>
<line x1="200" y1="200" x2="285" y2="172"/>
<line x1="200" y1="200" x2="253" y2="270"/>
<line x1="200" y1="200" x2="147" y2="270"/>
<line x1="200" y1="200" x2="115" y2="172"/>
</g>
<g stroke="#cbd5e1" stroke-width="6" stroke-linecap="round">
<line x1="200" y1="200" x2="200" y2="110"/>
<line x1="200" y1="200" x2="285" y2="172"/>
<line x1="200" y1="200" x2="253" y2="270"/>
<line x1="200" y1="200" x2="147" y2="270"/>
<line x1="200" y1="200" x2="115" y2="172"/>
</g>
<!-- Brake Disc & Caliper Behind Rim -->
<circle cx="200" cy="200" r="65" fill="#475569" opacity="0.6"/>
<circle cx="200" cy="200" r="60" fill="none" stroke="#334155" stroke-dasharray="4,6" stroke-width="3"/>
<!-- Caliper -->
<path d="M 235,160 A 65,65 0 0,1 255,200 L 240,200 A 50,50 0 0,0 225,170 Z" fill="' . $badgeColor . '"/>
<!-- Center Hub & Wheel Lug Nuts -->
<circle cx="200" cy="200" r="35" fill="#1e293b" stroke="#64748b" stroke-width="2"/>
<circle cx="200" cy="200" r="22" fill="url(#centerCap)"/>
<!-- Lug Nuts -->
<circle cx="200" cy="178" r="4.5" fill="#e2e8f0" stroke="#475569" stroke-width="1.5"/>
<circle cx="221" cy="193" r="4.5" fill="#e2e8f0" stroke="#475569" stroke-width="1.5"/>
<circle cx="213" cy="218" r="4.5" fill="#e2e8f0" stroke="#475569" stroke-width="1.5"/>
<circle cx="187" cy="218" r="4.5" fill="#e2e8f0" stroke="#475569" stroke-width="1.5"/>
<circle cx="179" cy="193" r="4.5" fill="#e2e8f0" stroke="#475569" stroke-width="1.5"/>
<!-- Center Logo Emblem -->
<circle cx="200" cy="200" r="14" fill="#0f172a" stroke="#ffffff" stroke-width="1.5"/>
<path d="M195 200 L200 193 L205 200 L202 200 L202 206 L198 206 L198 200 Z" fill="' . $badgeColor . '"/>
</svg>';
file_put_contents($filename, $svg);
}
// Generate brand logo SVGs
function makeBrandLogo($filename, $title, $accentColor, $symbol) {
$svg = '<?xml version="1.0" encoding="UTF-8"?>
<svg width="240" height="120" viewBox="0 0 240 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="240" height="120" rx="16" fill="#1e293b" stroke="#334155" stroke-width="1.5"/>
<circle cx="60" cy="60" r="32" fill="' . $accentColor . '" fill-opacity="0.15"/>
<circle cx="60" cy="60" r="24" fill="' . $accentColor . '"/>
<text x="60" y="67" font-family="Arial, sans-serif" font-size="20" font-weight="900" fill="#ffffff" text-anchor="middle">' . $symbol . '</text>
<text x="105" y="58" font-family="Arial, sans-serif" font-size="17" font-weight="bold" fill="#f8fafc">' . htmlspecialchars($title) . '</text>
<text x="105" y="77" font-family="Arial, sans-serif" font-size="11" fill="#94a3b8">ORIGINAL BRAND</text>
</svg>';
file_put_contents($filename, $svg);
}
makeTireSvg(__DIR__ . '/images/tire_barez_p648.svg', 'BAREZ P648', '#2563eb');
makeTireSvg(__DIR__ . '/images/tire_kavir_kb14.svg', 'KAVIR KB14', '#059669');
makeTireSvg(__DIR__ . '/images/tire_yazd_neptune.svg', 'YAZD NEPTUNE', '#d97706');
makeTireSvg(__DIR__ . '/images/tire_hankook_k135.svg', 'HANKOOK K135', '#ea580c');
makeTireSvg(__DIR__ . '/images/tire_kumho_ps31.svg', 'KUMHO ECSTA PS31', '#dc2626');
makeTireSvg(__DIR__ . '/images/tire_michelin_primacy.svg', 'MICHELIN PRIMACY 4+', '#1d4ed8');
makeTireSvg(__DIR__ . '/images/tire_pirelli_pzero.svg', 'PIRELLI P ZERO', '#e11d48');
makeTireSvg(__DIR__ . '/images/tire_maxxis_at771.svg', 'MAXXIS AT771', '#7c3aed');
makeTireSvg(__DIR__ . '/images/tire_triangle_tr259.svg', 'TRIANGLE TR259', '#0284c7');
makeTireSvg(__DIR__ . '/images/tire_nexen_su4.svg', 'NEXEN NFERA SU4', '#4f46e5');
makeBrandLogo(__DIR__ . '/images/logo_barez.svg', 'BAREZ', '#2563eb', 'B');
makeBrandLogo(__DIR__ . '/images/logo_kavir.svg', 'KAVIR', '#059669', 'K');
makeBrandLogo(__DIR__ . '/images/logo_yazd.svg', 'YAZD TIRE', '#d97706', 'Y');
makeBrandLogo(__DIR__ . '/images/logo_hankook.svg', 'HANKOOK', '#ea580c', 'H');
makeBrandLogo(__DIR__ . '/images/logo_kumho.svg', 'KUMHO', '#dc2626', 'K');
makeBrandLogo(__DIR__ . '/images/logo_michelin.svg', 'MICHELIN', '#1d4ed8', 'M');
makeBrandLogo(__DIR__ . '/images/logo_pirelli.svg', 'PIRELLI', '#e11d48', 'P');
makeBrandLogo(__DIR__ . '/images/logo_maxxis.svg', 'MAXXIS', '#7c3aed', 'M');
echo "SVG generation complete.\n";