Update: 2026-06-29 23:45:06

This commit is contained in:
Hamza-Ayed
2026-06-29 23:45:06 +03:00
parent 3506b07bc7
commit 299132b505
13 changed files with 278 additions and 53 deletions

View File

@@ -506,6 +506,10 @@ $scrapedResults = json_decode(file_get_contents(RESULTS_FILE), true);
.app-yallago { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.app-zaken { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.app-tufaddal { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.app-careem { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.app-uber { background: rgba(255, 255, 255, 0.1); color: #f3f4f6; border: 1px solid rgba(255, 255, 255, 0.2); }
.app-taxif { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.app-jeeny { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.time-badge {
font-size: 0.80rem;
@@ -601,6 +605,10 @@ $scrapedResults = json_decode(file_get_contents(RESULTS_FILE), true);
<option value="ae.com.yalla.go.dubai.client">YallaGo (ae.com.yalla.go.dubai.client)</option>
<option value="com.zakinn.app">Zaken / Zakinn (com.zakinn.app)</option>
<option value="com.bis.taxi">Tfadal (com.bis.taxi)</option>
<option value="com.careem.acma">Careem (com.careem.acma)</option>
<option value="com.ubercab">Uber (com.ubercab)</option>
<option value="com.taxif.passenger">TaxiF (com.taxif.passenger)</option>
<option value="me.com.easytaxi">Jeeny (me.com.easytaxi)</option>
</select>
</div>
@@ -664,7 +672,24 @@ $scrapedResults = json_decode(file_get_contents(RESULTS_FILE), true);
<div class="empty-state">No pending tasks. Queue some tasks using the form on the left!</div>
<?php else: ?>
<?php foreach ($currentTasks as $task):
$appLabel = ($task['app'] === 'ae.com.yalla.go.dubai.client') ? 'yallago' : (($task['app'] === 'com.zakinn.app') ? 'zaken' : 'tufaddal');
$app = $task['app'] ?? '';
if ($app === 'ae.com.yalla.go.dubai.client') {
$appLabel = 'yallago';
} elseif ($app === 'com.zakinn.app') {
$appLabel = 'zaken';
} elseif ($app === 'com.bis.taxi') {
$appLabel = 'tufaddal';
} elseif ($app === 'com.careem.acma') {
$appLabel = 'careem';
} elseif ($app === 'com.ubercab') {
$appLabel = 'uber';
} elseif ($app === 'com.taxif.passenger') {
$appLabel = 'taxif';
} elseif ($app === 'me.com.easytaxi') {
$appLabel = 'jeeny';
} else {
$appLabel = 'unknown';
}
?>
<div class="list-item">
<div class="task-info">
@@ -702,7 +727,23 @@ $scrapedResults = json_decode(file_get_contents(RESULTS_FILE), true);
<?php foreach ($scrapedResults as $res):
$data = $res['result_data'];
$app = $data['app'] ?? 'unknown';
$appLabel = (strpos($app, 'yalla') !== false) ? 'yallago' : ((strpos($app, 'zakinn') !== false || strpos($app, 'zaken') !== false) ? 'zaken' : 'tufaddal');
if (strpos($app, 'yalla') !== false) {
$appLabel = 'yallago';
} elseif (strpos($app, 'zakinn') !== false || strpos($app, 'zaken') !== false) {
$appLabel = 'zaken';
} elseif (strpos($app, 'bis.taxi') !== false || strpos($app, 'tufaddal') !== false) {
$appLabel = 'tufaddal';
} elseif (strpos($app, 'careem') !== false) {
$appLabel = 'careem';
} elseif (strpos($app, 'ubercab') !== false || strpos($app, 'uber') !== false) {
$appLabel = 'uber';
} elseif (strpos($app, 'taxif') !== false) {
$appLabel = 'taxif';
} elseif (strpos($app, 'easytaxi') !== false || strpos($app, 'jeeny') !== false) {
$appLabel = 'jeeny';
} else {
$appLabel = 'unknown';
}
$isSuccess = ($res['status'] === 'success');
$price = $data['price'] ?? 0;
$dist = $data['distance_km'] ?? 0;
@@ -718,7 +759,11 @@ $scrapedResults = json_decode(file_get_contents(RESULTS_FILE), true);
</div>
<div class="price-text">
<?php if ($isSuccess): ?>
<?php echo number_format($price, 0); ?> SYP
<?php
$currency = (in_array($appLabel, ['careem', 'uber', 'taxif', 'jeeny'])) ? 'JOD' : 'SYP';
$decimals = ($currency === 'JOD') ? 2 : 0;
echo number_format($price, $decimals) . ' ' . $currency;
?>
<?php else: ?>
<span style="color:var(--error-color); font-size:0.9rem;">Scrape Failed</span>
<?php endif; ?>