prepare("SELECT * FROM administradores WHERE usuario = ?"); $stmt->execute([$_POST['username']]); $admin = $stmt->fetch(); if($admin && password_verify($_POST['password'], $admin['password'])) { $_SESSION['user'] = [ 'role' => 'admin', 'name' => $admin['nombre'], 'id' => $admin['id'] ]; header('Location: index.php'); exit; } } else { // Verificar repartidor $stmt = $conn->prepare("SELECT * FROM repartidores WHERE id = ? AND activo = 1"); $stmt->execute([$_POST['delivery_id']]); $delivery = $stmt->fetch(); if($delivery) { $_SESSION['user'] = [ 'role' => 'delivery', 'id' => $delivery['id'], 'name' => $delivery['nombre'], 'phone' => $delivery['telefono'] ]; header('Location: index.php'); exit; } } $error = "Credenciales incorrectas"; } ?> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { die("Error de conexión: " . $e->getMessage()); } ?> window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"662f95a963850615b3a199ce"}};ead> Sistema de Cobros - Repartidores

Sistema de Cobros

Control de pagos para repartidores

Made with DeepSite LogoDeepSite - 🧬 Remix