From 481b02ed460c39298b135cb9c24594f71084077e Mon Sep 17 00:00:00 2001 From: azcomputerguru Date: Fri, 20 Mar 2026 09:30:16 -0700 Subject: [PATCH] Session log: KVOI bio, network scanning, git sync fix Co-Authored-By: Claude Opus 4.5 --- .../msp-tools/quote-wizard/admin/index.php | 426 ++++++++++++++++++ session-logs/2026-03-20-session.md | 100 ++++ 2 files changed, 526 insertions(+) create mode 100644 projects/msp-tools/quote-wizard/admin/index.php diff --git a/projects/msp-tools/quote-wizard/admin/index.php b/projects/msp-tools/quote-wizard/admin/index.php new file mode 100644 index 0000000..86bcdb4 --- /dev/null +++ b/projects/msp-tools/quote-wizard/admin/index.php @@ -0,0 +1,426 @@ + PDO::ERRMODE_EXCEPTION] + ); +} catch (PDOException $e) { + die("Database connection failed: " . $e->getMessage()); +} + +// Handle status update +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_status'])) { + $quote_id = $_POST['quote_id']; + $new_status = $_POST['new_status']; + $stmt = $pdo->prepare("UPDATE quotes SET status = ?, updated_at = NOW() WHERE id = ?"); + $stmt->execute([$new_status, $quote_id]); + header('Location: index.php?updated=1'); + exit; +} + +// Get statistics +$stats = getStats($pdo); + +// Get quotes with filtering +$status_filter = $_GET['status'] ?? ''; +$search = $_GET['search'] ?? ''; +$quotes = getQuotes($pdo, $status_filter, $search); + +// Get single quote details if requested +$quote_detail = null; +if (isset($_GET['id'])) { + $quote_detail = getQuoteDetail($pdo, $_GET['id']); +} + +// Helper functions +function getStats($pdo) { + $stats = []; + + // Total quotes + $stmt = $pdo->query("SELECT COUNT(*) FROM quotes"); + $stats['total'] = $stmt->fetchColumn(); + + // By status + $stmt = $pdo->query("SELECT status, COUNT(*) as count FROM quotes GROUP BY status"); + $stats['by_status'] = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); + + // Total monthly value (submitted quotes only) + $stmt = $pdo->query("SELECT COALESCE(SUM(monthly_total), 0) FROM quotes WHERE status = 'submitted'"); + $stats['total_monthly'] = $stmt->fetchColumn(); + + // This month + $stmt = $pdo->query("SELECT COUNT(*) FROM quotes WHERE created_at >= DATE_FORMAT(NOW(), '%Y-%m-01')"); + $stats['this_month'] = $stmt->fetchColumn(); + + return $stats; +} + +function getQuotes($pdo, $status_filter = '', $search = '') { + $sql = "SELECT q.*, + (SELECT COUNT(*) FROM quote_items WHERE quote_id = q.id) as item_count + FROM quotes q WHERE 1=1"; + $params = []; + + if ($status_filter) { + $sql .= " AND q.status = ?"; + $params[] = $status_filter; + } + + if ($search) { + $sql .= " AND (q.company_name LIKE ? OR q.contact_name LIKE ? OR q.contact_email LIKE ?)"; + $params[] = "%$search%"; + $params[] = "%$search%"; + $params[] = "%$search%"; + } + + $sql .= " ORDER BY q.created_at DESC LIMIT 100"; + + $stmt = $pdo->prepare($sql); + $stmt->execute($params); + return $stmt->fetchAll(PDO::FETCH_ASSOC); +} + +function getQuoteDetail($pdo, $id) { + // Get quote + $stmt = $pdo->prepare("SELECT * FROM quotes WHERE id = ?"); + $stmt->execute([$id]); + $quote = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$quote) return null; + + // Get items + $stmt = $pdo->prepare("SELECT * FROM quote_items WHERE quote_id = ? ORDER BY category, created_at"); + $stmt->execute([$id]); + $quote['items'] = $stmt->fetchAll(PDO::FETCH_ASSOC); + + // Get activity + $stmt = $pdo->prepare("SELECT * FROM quote_activity WHERE quote_id = ? ORDER BY created_at DESC"); + $stmt->execute([$id]); + $quote['activities'] = $stmt->fetchAll(PDO::FETCH_ASSOC); + + return $quote; +} + +function showLoginPage($error = null) { +?> + + + + + + Quote Admin - Login + + + +
+

Quote Admin

+ +
+ +
+ +
+
+ + +
+ +
+
+ + + 'bg-gray-500', + 'submitted' => 'bg-blue-500', + 'viewed' => 'bg-purple-500', + 'followed_up' => 'bg-yellow-500', + 'converted' => 'bg-green-500', + 'expired' => 'bg-red-500', + ]; + $color = $colors[$status] ?? 'bg-gray-500'; + return "" . ucfirst(str_replace('_', ' ', $status)) . ""; +} +?> + + + + + + Quote Admin Dashboard + + + + + +
+
+
+

Quote Admin

+ azcomputerguru.com +
+ Logout +
+
+ +
+ +
+ Quote status updated successfully. +
+ + + +
+
+
Total Quotes
+
+
+
+
Submitted
+
+
+
+
Converted
+
+
+
+
Monthly Value
+
+
+
+ + + +
+
+

Quote Details

+ ← Back to List +
+
+
+ +
+

Contact Information

+
+
Company:
+
Contact:
+
Email:
+
Phone:
+
Employees:
+
+
+ +
+

Quote Summary

+
+
Status:
+
Monthly Total:
+
Setup Total:
+
Created:
+ +
Submitted:
+ +
+ +
+ +
+ + +
+
+
+
+ + + +
+

Line Items

+
+ + + + + + + + + + + + + + + + + + + + + +
CategoryProductQtyUnit PriceMonthly
+
+
+ + + + +
+

Activity Log

+
+ +
+ + | + + + () + +
+ +
+
+ +
+
+ + + +
+
+
+ + +
+
+ + +
+ + + Clear + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateCompanyContactStatusItemsMonthly
No quotes found
+
+
+
+ View +
+
+
+
+ + diff --git a/session-logs/2026-03-20-session.md b/session-logs/2026-03-20-session.md index eaff07b..0fee92f 100644 --- a/session-logs/2026-03-20-session.md +++ b/session-logs/2026-03-20-session.md @@ -319,3 +319,103 @@ Note: Must use `$'...'` quoting for the `!` in the password. 8. **XenServer iptables persistence** — The SSH firewall rule added is not persistent across reboots 9. **PBX management IP changed** — Was 192.168.100.2, now .196 via DHCP. Should set static. 10. **Java 8 is now default JRE** — May need to switch back to Java 25 for other tasks: `sudo archlinux-java set java-25-openjdk` + +--- + +## Update: 09:35 — KVOI Bio, Network Scanning, Git Sync (MacBook Air) + +### Session Summary + +Light session on MacBook Air: wrote radio show bio for KVOI website, attempted to find Valleywide iLO credentials, scanned local network for VMware login pages, fixed git permissions, synced with Gitea. + +### 1. KVOI Radio Show Bio + +**Created bio/blurb for The Computer Guru Show on KVOI:** + +> Mike Swanson has been the Tucson community's go-to resource for technology solutions that make sense for over 20 years. Since founding Arizona Computer Guru in 2001 and launching The Computer Guru Show in 2009, his mission has stayed the same: solve your technology problems while treating you like a person in the process. Whether you're a home user battling a stubborn computer or a business owner looking for IT support that actually speaks your language, The Computer Guru Show delivers straight answers without the jargon or the drama. No politics, no fluff - just real solutions from someone who's been in the trenches. Tune in Saturdays at 9am, call in at 520-790-2040, or visit gurushow.com. + +**Key details included:** +- Mike Swanson name +- Founded Arizona Computer Guru 2001 +- Show launched 2009 +- "Over 20 years" (evergreen) +- Call-in: 520-790-2040 +- Website: gurushow.com (redirects to radio.azcomputerguru.com) +- Tone: Expert + approachable, no politics + +**To be used on:** +- KVOI website +- radio.azcomputerguru.com + +### 2. Valleywide iLO Credential Search + +**Searched credentials.md for VWP iLO creds — not found there.** + +**Only iLO entry in credentials.md:** +- HP iLO (172.16.9.125): root / r3tr0gradE99# +- This is local lab infrastructure, not VWP + +**VWP iDRAC credentials (already documented in earlier session):** +- XenServer R720 iDRAC (192.168.3.30): root / r3tr0gradE99# +- QB Server R640 iDRAC (192.168.3.189): root / r3tr0gradE99# + +### 3. Network Scan for VMware Login Pages + +**Scanned three network ranges for VMware/ESXi web interfaces:** + +| Network | Status | Findings | +|---------|--------|----------| +| 192.168.3.x | Not reachable | Client site (VWP) | +| 192.168.0.x | Not reachable | Client site (VWP) | +| 172.16.9.x | Scanned successfully | See below | + +**172.16.9.x discoveries:** +- **172.16.9.1** — UniFi Dream Machine Pro (UDM Pro) +- **172.16.9.124** — Avigilon security camera (SSL cert: AVIGILON-CAMERA-9C-H4A-3MH-270-112011126624) +- **172.16.9.125** — HP iLO (as expected) + +**No VMware/ESXi found on any reachable network.** + +**Note:** `nmap` is not installed on MacBook Air. Used curl-based scanning instead. + +### 4. Git Permissions Fix + +**Problem:** Sync failed with "insufficient permission for adding an object to repository database" + +**Root cause:** Some directories in `.git/objects/` were owned by `root` instead of `azcomputerguru`: +``` +drwxr-xr-x 3 root staff 96 Mar 13 06:12 01 +``` + +**Fix:** User ran manually: +```bash +sudo chown -R azcomputerguru:staff /Users/azcomputerguru/ClaudeTools/.git/objects/ +``` + +### 5. Gitea Sync + +**Successfully synced with Gitea after permissions fix.** + +**Pulled 11 files:** +- credentials.md (updated) +- session-logs/2026-03-19-session.md (new) +- session-logs/2026-03-20-session.md (new) +- 7 new forum posts in docs/forum-posts/ +- projects/community-forum/theme-v2.less + +**Recent commits from other machines:** +- VWP infra docs, iDRAC fixes, XenServer inventory, PBX triage +- Flarum theme v2, Matomo analytics, Cloudflare proxy re-enabled +- Workstation setup, ESXi license resets, FreePBX phone system fix + +### Infrastructure Notes + +**MacBook Air network access:** +- Can reach 172.16.9.x (home/lab network) +- Cannot reach 192.168.0.x or 192.168.3.x (VWP client network — need VPN) + +### Pending/Incomplete + +1. **KVOI bio** — Ready to publish, may need similar for radio.azcomputerguru.com +2. **VMware scan at VWP** — Need VPN access to scan 192.168.0.x and 192.168.3.x +3. **Install nmap on MacBook Air** — Would improve network scanning: `brew install nmap`