Files
adsPRO/templates/xml_files/main_view.php
Jacek Pyziak efbdcce08a feat: Add XML file management functionality
- Created XmlFiles control class for handling XML file views and regeneration.
- Implemented method to retrieve clients with XML feeds in the factory class.
- Added database migration to include google_merchant_account_id in clients table.
- Created migrations for products_keyword_planner_terms and products_merchant_sync_log tables.
- Added campaign_keywords table migration for managing campaign keyword data.
- Developed main view template for displaying XML files and their statuses.
- Introduced a debug script for analyzing product URLs and their statuses.
2026-02-18 21:23:53 +01:00

68 lines
2.7 KiB
PHP

<div class="clients-page xml-files-page">
<div class="clients-header">
<h2><i class="fa-solid fa-file-code"></i> Pliki XML</h2>
</div>
<div class="clients-table-wrap">
<table class="table">
<thead>
<tr>
<th style="width: 60px;">#ID</th>
<th>Klient</th>
<th>Google Ads ID</th>
<th>Link do custom feed</th>
<th style="width: 180px;">Ostatnia modyfikacja</th>
<th style="width: 220px; text-align: center;">Akcje</th>
</tr>
</thead>
<tbody>
<?php if ( $this -> rows ): ?>
<?php foreach ( $this -> rows as $row ): ?>
<tr>
<td class="client-id"><?= (int) ( $row['client_id'] ?? 0 ); ?></td>
<td class="client-name"><?= htmlspecialchars( (string) ( $row['client_name'] ?? '' ) ); ?></td>
<td>
<?php if ( !empty( $row['google_ads_customer_id'] ) ): ?>
<span class="badge-id"><?= htmlspecialchars( (string) $row['google_ads_customer_id'] ); ?></span>
<?php else: ?>
<span class="text-muted">- brak -</span>
<?php endif; ?>
</td>
<td>
<a href="<?= htmlspecialchars( (string) ( $row['xml_url'] ?? '' ) ); ?>" target="_blank" rel="noopener">
<?= htmlspecialchars( (string) ( $row['xml_url'] ?? '' ) ); ?>
</a>
<?php if ( empty( $row['xml_exists'] ) ): ?>
<div class="text-muted">Plik nie zostal jeszcze wygenerowany.</div>
<?php endif; ?>
</td>
<td>
<?php if ( !empty( $row['xml_last_modified'] ) ): ?>
<?= htmlspecialchars( (string) $row['xml_last_modified'] ); ?>
<?php else: ?>
<span class="text-muted">Brak</span>
<?php endif; ?>
</td>
<td class="actions-cell" style="justify-content: center;">
<form method="POST" action="/xml_files/regenerate" style="margin: 0;">
<input type="hidden" name="client_id" value="<?= (int) ( $row['client_id'] ?? 0 ); ?>">
<button type="submit" class="btn btn-primary btn-sm">
<i class="fa-solid fa-rotate-right mr5"></i> Wymus generowanie
</button>
</form>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="6" class="empty-state">
<i class="fa-solid fa-file-code"></i>
<p>Brak klientow do wyswietlenia.</p>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>