<?php
$_SESSION['sc_json'] = '%relativeSiteAssetPath%/sc_assets/events.json';// will need more if filtering by...
$_SESSION['db_name'] = '%siteAssetPath%/sc_assets/db/calendar.db';
$_SESSION['crudpath'] = "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

$crudpath = $_SESSION['crudpath'];
$conn = new PDO('sqlite:%relativeSiteAssetPath%/sc_assets/db/calendar.db');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//connect the table- create it if it doesn't exist
$query = "CREATE TABLE IF NOT EXISTS events2 (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title TEXT, ev_start TEXT, ev_end TEXT, event_url TEXT, details TEXT, venue TEXT, venue_add TEXT, social_url TEXT, sponsors TEXT, textColor TEXT, borderColor TEXT, backgroundColor TEXT)";
$conn->exec($query);
?>