File size: 13,631 Bytes
36f2119 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | <?php
require 'db_connect.php';
try {
// 1. Config Table
$db->exec("CREATE TABLE IF NOT EXISTS config (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key_name TEXT UNIQUE,
value_text TEXT
)");
$configs = [
'brand' => 'OFT MGMT',
'hero_h1' => 'Creatività, performance e contenuti che portano <span class="accent">risultati reali</span>.',
'hero_sub' => 'Agenzia creativa: marketing, social, foto e video — risultati concreti',
'tagline' => 'Agenzia creativa: marketing, social, foto e video — risultati concreti',
'email' => 'info@oftagency.com',
'phone' => '+39 333 123 4567',
'whatsapp_url' => 'https://wa.me/393331234567',
'instagram_url' => 'https://instagram.com/oft_mgmt',
'instagram_label' => '@oft_mgmt',
'tiktok_url' => 'https://tiktok.com/@oft_mgmt',
'booking_url' => '#contact',
'address' => 'Via G. Origlia, 36 — Nocera Inferiore (SA)',
'agency_image_1' => 'team.jpg',
'agency_image_2' => 'agenzia.jpg',
'video_embed_url' => 'https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&rel=0',
// About Section Text
'about_title' => 'Chi <span class="accent">siamo</span>',
'about_intro' => 'OFT MGMT nasce nel 2025 dall’energia di tre ragazzi che credono nel potere delle idee e aiutano i brand a farsi notare davvero.',
'about_text_1' => 'OFT MGMT è nata all’inizio del 2025 da tre ragazzi con un’idea chiara: trasformare la passione per creatività e marketing in risultati concreti. Negli anni abbiamo aiutato attività locali a crescere sui social con contenuti e campagne che fanno la differenza.',
'about_text_2' => 'Da passione condivisa a progetto reale: un’agenzia creativa pensata per dare voce ai brand e portarli a un livello superiore.',
// Contact Section Text
'contact_title' => 'Contatti',
'contact_intro' => 'Siamo rapidi a rispondere. Instagram, email o telefono: scegli tu.',
'admin_password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi' // password: password (default)
];
$stmt = $db->prepare("INSERT OR IGNORE INTO config (key_name, value_text) VALUES (:k, :v)");
foreach ($configs as $k => $v) {
$stmt->execute([':k' => $k, ':v' => $v]);
}
// 2. Stats (Metrics)
$db->exec("CREATE TABLE IF NOT EXISTS stats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
label TEXT,
value TEXT,
unit TEXT,
sort_order INTEGER DEFAULT 0
)");
// Check if empty
$count = $db->query("SELECT COUNT(*) FROM stats")->fetchColumn();
if ($count == 0) {
$stats = [
['Progetti', '120', '+', 1],
['Brand seguiti', '35', '+', 2],
['Clienti soddisfatti', '98', '%', 3]
];
$stmt = $db->prepare("INSERT INTO stats (label, value, unit, sort_order) VALUES (?, ?, ?, ?)");
foreach ($stats as $s) {
$stmt->execute($s);
}
}
// 3. Services
$db->exec("CREATE TABLE IF NOT EXISTS services (
id INTEGER PRIMARY KEY AUTOINCREMENT,
icon TEXT,
title TEXT,
description TEXT,
sort_order INTEGER DEFAULT 0
)");
$count = $db->query("SELECT COUNT(*) FROM services")->fetchColumn();
if ($count == 0) {
$services = [
['🎯', 'Social Media Management', 'Piano editoriale data‑driven, copy, publishing e community.', 1],
['📸', 'Produzione Foto', 'Still life, lifestyle, ritratti, cataloghi e ADV.', 2],
['🎬', 'Produzione Video', 'Short‑form, brand stories e spot orientati alla conversione.', 3],
['📈', 'Campagne Pubblicitarie', 'Meta/TikTok Ads, test A/B, scaling e report.', 4],
['🛒', 'Web & Ecommerce', 'Siti veloci e focalizzati su conversioni e brand identity.', 5],
['⚡', 'Strategy & Advisory', 'Posizionamento, tone of voice, content system, crescita.', 6]
];
$stmt = $db->prepare("INSERT INTO services (icon, title, description, sort_order) VALUES (?, ?, ?, ?)");
foreach ($services as $s) {
$stmt->execute($s);
}
}
// 4. Founders
$db->exec("CREATE TABLE IF NOT EXISTS founders (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
role TEXT,
image_path TEXT,
sort_order INTEGER DEFAULT 0
)");
$count = $db->query("SELECT COUNT(*) FROM founders")->fetchColumn();
if ($count == 0) {
$founders = [
['Michele Bisogno', 'Founder & CEO', 'michele.jpg', 1],
['Francesco Novi', 'Founder & CEO', 'francesco.jpg', 2],
['Eliodoro D’ Acunzo', 'Founder & CEO', 'elio.jpg', 3]
];
$stmt = $db->prepare("INSERT INTO founders (name, role, image_path, sort_order) VALUES (?, ?, ?, ?)");
foreach ($founders as $f) {
$stmt->execute($f);
}
}
// 5. Case Studies
$db->exec("CREATE TABLE IF NOT EXISTS cases (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
stats_text TEXT,
role_text TEXT,
tags TEXT,
image_path TEXT,
sort_order INTEGER DEFAULT 0
)");
$count = $db->query("SELECT COUNT(*) FROM cases")->fetchColumn();
if ($count == 0) {
$cases = [
[
'Cava Brew Fest 01',
'Festival della birra a Cava de’ Tirreni: 80.000 presenze, 3M visualizzazioni, 6.000 nuovi follower e 350k account raggiunti.',
'Ruolo: strategia digitale, contenuti virali e promozione online → evento diventato fenomeno social.',
'#Event,#ShortForm,#IG Growth',
'cava.png',
1
],
[
'IGEM — Nautica & Luxury Experience 02',
'Partendo da zero: 1,5M visualizzazioni organiche, 6.000 follower totali e 15 tour venduti in un mese.',
'Ruolo: gestione social, contenuti accattivanti e campagne mirate per far crescere rapidamente la brand awareness.',
'#Luxury,#Tour,#Performance',
'nautica.PNG',
2
]
];
$stmt = $db->prepare("INSERT INTO cases (title, stats_text, role_text, tags, image_path, sort_order) VALUES (?, ?, ?, ?, ?, ?)");
foreach ($cases as $c) {
$stmt->execute($c);
}
}
// 6. Pricing
$db->exec("CREATE TABLE IF NOT EXISTS pricing (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
price TEXT,
features TEXT, -- JSON or separator separated
is_recommended BOOLEAN DEFAULT 0,
sort_order INTEGER DEFAULT 0
)");
$count = $db->query("SELECT COUNT(*) FROM pricing")->fetchColumn();
if ($count == 0) {
$pricing = [
[
'Growth pack',
'600',
"12 contenuti verticali|Story set base, grafiche base|Format vincenti + gestione pubblicazioni|Ottimizzazione contenuti e strategie|Gestione Ads (+100€ / mese budget ads)",
0,
1
],
[
'Premium pack',
'1000',
"12 contenuti verticali|Story set avanzato + grafiche premium|Copywriting professionale|Shooting extra con fotografo|Format avanzati + trend scouting|Gestione Ads (+200€ / mese budget ads)|Reportistica avanzata e consulenza",
1,
2
]
];
$stmt = $db->prepare("INSERT INTO pricing (name, price, features, is_recommended, sort_order) VALUES (?, ?, ?, ?, ?)");
foreach ($pricing as $p) {
$stmt->execute($p);
}
}
// 7. FAQ
$db->exec("CREATE TABLE IF NOT EXISTS faq (
id INTEGER PRIMARY KEY AUTOINCREMENT,
question TEXT,
answer TEXT,
sort_order INTEGER DEFAULT 0
)");
$count = $db->query("SELECT COUNT(*) FROM faq")->fetchColumn();
if ($count == 0) {
$faqs = [
['Quanto tempo per vedere i risultati?', 'Primi segnali in 2–4 settimane (reach/engagement); 1–3 mesi per KPI di business.', 1],
['Quali piattaforme gestite?', 'Instagram, TikTok, Facebook, YouTube (Shorts) e campagne Meta/TikTok Ads.', 2],
['Create anche i contenuti?', 'Sì: strategia, shooting foto/video, editing, copy e calendari di pubblicazione.', 3],
['Come si inizia?', 'Prenota una call: obiettivi, roadmap e preventivo in 48 ore.', 4],
['Esperienza?', 'Food, retail, hospitality, servizi, DTC e PMI locali.', 5],
['Dopo posso gestire da solo?', 'Sì, formiamo il tuo team e lasciamo linee guida operative.', 6]
];
$stmt = $db->prepare("INSERT INTO faq (question, answer, sort_order) VALUES (?, ?, ?)");
foreach ($faqs as $f) {
$stmt->execute($f);
}
}
// 8. Solutions (Problem/Solution)
$db->exec("CREATE TABLE IF NOT EXISTS solutions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
description TEXT,
sort_order INTEGER DEFAULT 0
)");
if ($db->query("SELECT COUNT(*) FROM solutions")->fetchColumn() == 0) {
$sols = [
['I limiti attuali ❌', 'Ampio seguito (100k+ follower, milioni di views) ma bassa conversione: contenuti generici e identità poco distintiva.', 1],
['La nostra soluzione ✅', 'Strategia con contenuti dinamici e autentici (video), format coinvolgenti, pubblicazione costante e storytelling che valorizza qualità ed esperienza.', 2],
['Focus operativo', 'Ideazione format, shooting, editing e scheduling. Community, analisi e, quando serve, distribuzione paid per scalare.', 3]
];
$stmt = $db->prepare("INSERT INTO solutions (title, description, sort_order) VALUES (?, ?, ?)");
foreach($sols as $s) $stmt->execute($s);
}
// 9. Goals
$db->exec("CREATE TABLE IF NOT EXISTS goals (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
description TEXT,
sort_order INTEGER DEFAULT 0
)");
if ($db->query("SELECT COUNT(*) FROM goals")->fetchColumn() == 0) {
$goals = [
['#1 Awareness & Reputazione', 'Diventare destinazione di qualità ad Angri, valorizzando autenticità e cura in ogni dettaglio.', 1],
['#2 Identità forte', 'Stile distintivo che racconta persone e prodotti, con format interattivi e community.', 2],
['#3 Esperienza & Qualità', 'Dall’ambiente al servizio fino alle materie prime: un racconto che fidelizza.', 3]
];
$stmt = $db->prepare("INSERT INTO goals (title, description, sort_order) VALUES (?, ?, ?)");
foreach($goals as $g) $stmt->execute($g);
}
// 10. Roadmap
$db->exec("CREATE TABLE IF NOT EXISTS roadmap (
id INTEGER PRIMARY KEY AUTOINCREMENT,
phase TEXT, -- bold part
detail TEXT, -- muted part
sort_order INTEGER DEFAULT 0
)");
if ($db->query("SELECT COUNT(*) FROM roadmap")->fetchColumn() == 0) {
$roads = [
['1° mese — Setup e Analisi', 'Audit, posizionamento, definizione KPI e content system.', 1],
['1°–2° mese — Lancio comunicazione', 'Format, shooting, pubblicazione e prime iterazioni.', 2],
['3° mese — Crescita awareness', 'Ottimizzazioni e distribuzione per accelerare reach.', 3],
['4° mese — Focus esperienza', 'Storytelling su qualità e servizio.', 4],
['5°–6° mese — Consolidamento identità', 'Consistenza visiva e voce del brand.', 5],
['6° mese — Valutazione & Scaling', 'Dati, learnings, piani di crescita.', 6]
];
$stmt = $db->prepare("INSERT INTO roadmap (phase, detail, sort_order) VALUES (?, ?, ?)");
foreach($roads as $r) $stmt->execute($r);
}
// 11. Bottom Stats
$db->exec("CREATE TABLE IF NOT EXISTS bottom_stats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
value TEXT,
label TEXT,
sort_order INTEGER DEFAULT 0
)");
if ($db->query("SELECT COUNT(*) FROM bottom_stats")->fetchColumn() == 0) {
$bstats = [
['+5.000.000', 'Visualizzazioni in organico', 1],
['+550.000', 'Account raggiunti', 2],
['+8.000', 'Nuovi follower', 3]
];
$stmt = $db->prepare("INSERT INTO bottom_stats (value, label, sort_order) VALUES (?, ?, ?)");
foreach($bstats as $b) $stmt->execute($b);
}
// 12. About Gallery (Dynamic Photos)
$db->exec("CREATE TABLE IF NOT EXISTS about_gallery (
id INTEGER PRIMARY KEY AUTOINCREMENT,
image_path TEXT,
sort_order INTEGER DEFAULT 0
)");
if ($db->query("SELECT COUNT(*) FROM about_gallery")->fetchColumn() == 0) {
$gallery = [
['team.jpg', 1],
['agenzia.jpg', 2]
];
$stmt = $db->prepare("INSERT INTO about_gallery (image_path, sort_order) VALUES (?, ?)");
foreach($gallery as $g) $stmt->execute($g);
}
echo "Database setup completed successfully!";
} catch (PDOException $e) {
die("Setup failed: " . $e->getMessage());
}
?>
|