« Back to History
page_catalog_view.php
|
20260920_164915.php
Initial Domain Snapshot
Copy Code
<?php /* ========================================================= File: /erp/modules/dev/page_catalog_view.php Purpose: Show catalog of all pages (functions, tables, settings) ========================================================= */ error_reporting(E_ALL); ini_set('display_errors',1); if (session_status() !== PHP_SESSION_ACTIVE) session_start(); /* ---- DB bootstrap ---- */ $BASE = dirname(__DIR__, 2); // /erp require $BASE.'/core/db.php'; /* ---- Fetch all rows (no company filter for now) ---- */ $rows = $pdo->query("SELECT * FROM page_catalog ORDER BY page_name")->fetchAll(PDO::FETCH_ASSOC); ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Page Catalog • Mr. Manager</title> <style> body{font-family:ui-sans-serif,system-ui,Arial,sans-serif;background:#f9fafb;color:#111;margin:20px} table{border-collapse:collapse;width:100%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.08)} th,td{border:1px solid #ddd;padding:8px;vertical-align:top;font-size:13px} th{background:#34a853;color:#fff;text-align:left} pre{margin:0;font-size:12px;white-space:pre-wrap;word-break:break-word} tr:nth-child(even){background:#f3f4f6} h2{margin-bottom:12px} </style> </head> <body> <h2>📑 Page Catalog (All Companies)</h2> <table> <tr> <th>ID</th> <th>Company</th> <th>Page</th> <th>Description</th> <th>Functions</th> <th>Tables</th> <th>Settings</th> <th>Includes</th> <th>User Funcs</th> <th>Updated</th> </tr> <?php if($rows): ?> <?php foreach($rows as $r): ?> <tr> <td><?= (int)$r['id'] ?></td> <td><?= (int)$r['company_id'] ?></td> <td><?=htmlspecialchars($r['page_name'])?></td> <td><?=htmlspecialchars($r['description']??'')?></td> <td><pre><?=htmlspecialchars($r['functions_json']??'')?></pre></td> <td><pre><?=htmlspecialchars($r['tables_json']??'')?></pre></td> <td><pre><?=htmlspecialchars($r['settings_json']??'')?></pre></td> <td><?= (int)$r['includes_count']?></td> <td><?= (int)$r['user_funcs_count']?></td> <td><?=htmlspecialchars($r['updated_at'])?></td> </tr> <?php endforeach; ?> <?php else: ?> <tr><td colspan="10" style="text-align:center;color:#888">No rows found</td></tr> <?php endif; ?> </table> <p style="font:12px/1.4 system-ui;margin-top:8px;"> Rows: <?=count($rows)?> </p> </body> </html>