Get started - what to set up once ITFlow is installed, a step at a * time (functions/getting_started.php): cron, email, backups, billing, * support, your team, starter content and a first client. ?step= is the step, * or done for the summary; with none, the first step not done or skipped. * Each step's page is in getting_started/; what they save is in * post/getting_started.php - and the first client goes to the same New Client * handler as the Clients page (agent/post/client.php), the demo data to the * one on Maintenance > Starter Content. * * A page of its own, like setup - no menu, the steps along the top - in the * agent's light or dark. ?cron_status=1 answers whether cron has been heard * from, for the Cron step to check while it waits (js/getting_started.js). */ require_once $_SERVER['DOCUMENT_ROOT'] . '/config.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/functions.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/check_login.php'; enforceAdminPermission(); if (!gettingStartedReady()) { flashAlert('Get started needs the database update - run it from Maintenance > Update first', 'error'); redirect('/admin/update.php'); } $gs_steps = gettingStartedSteps(); if (isset($_GET['cron_status'])) { $heard = settingsCurrent(['config_cron_last_dispatch_at'])['config_cron_last_dispatch_at']; header('Content-Type: application/json; charset=utf-8'); header('Cache-Control: no-store'); echo json_encode(['running' => $heard && time() - strtotime($heard) < 300, 'done' => !empty($gs_steps['cron']['done']), 'status' => (string) ($gs_steps['cron']['status'] ?? '')]); exit; } gettingStartedOpened(); $gs_progress = gettingStartedProgress($gs_steps); $gs_state = gettingStartedState(); $gs_step = (string) ($_GET['step'] ?? ''); if ($gs_step !== 'done' && !isset($gs_steps[$gs_step])) { $gs_step = $gs_progress['next'] !== '' ? $gs_progress['next'] : 'done'; } $gs_keys = array_keys($gs_steps); $gs_at = array_search($gs_step, $gs_keys, true); $gs_prev = $gs_step === 'done' ? (end($gs_keys) ?: '') : ($gs_at > 0 ? $gs_keys[$gs_at - 1] : ''); $gs_next = $gs_step === 'done' ? '' : gettingStartedAfter($gs_step, $gs_steps); $gs_info = $gs_steps[$gs_step] ?? null; // What was typed, when a save came back with something to put right (settingsRefuse()) $settings_kept = []; if (($_SESSION['settings_kept']['page'] ?? '') === "getting_started_$gs_step" && time() - ($_SESSION['settings_kept']['at'] ?? 0) < 300) { $settings_kept = $_SESSION['settings_kept']; } unset($_SESSION['settings_kept']); // The message a save left for this page $gs_alert = ''; $gs_alert_type = 'info'; if (!empty($_SESSION['alert_message'])) { $gs_alert = (string) $_SESSION['alert_message']; $gs_alert_type = alertStyleClass($_SESSION['alert_type'] ?? 'success'); unset($_SESSION['alert_message'], $_SESSION['alert_type']); } $gs_company = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT company_name, company_logo FROM companies WHERE company_id = 1")) ?: []; $gs_title = $gs_step === 'done' ? 'Where it stands' : $gs_info['title']; define('FROM_GETTING_STARTED', true); ?> <?= escapeHtml($gs_title) ?> - Get started - <?= escapeHtml($gs_company['company_name'] ?? 'ITFlow') ?>
ITFlow Get started Go to ITFlow

Done Skipped for now