<?php
require_once ('../../init.php');
if (!m_admin_check()) {
    m_redirect(ADMIN_URL . '/login');
}

$action = m_u_p('action');

switch ($action) {
    case 'sitemap_ping':
        $path = pingSearchEngines();
        echo json_encode(['status'=>'ok','path'=>$path,'now'=>date('Y-m-d H:i:s')]);
        break;
    default:
        echo json_encode(['status'=>'error','message'=>'Geçersiz işlem']);
}


