{"id":8,"date":"2025-12-29T02:41:08","date_gmt":"2025-12-29T02:41:08","guid":{"rendered":"https:\/\/falahtransportes.com.br\/?page_id=8"},"modified":"2025-12-29T02:41:41","modified_gmt":"2025-12-29T02:41:41","slug":"login","status":"publish","type":"page","link":"https:\/\/falahtransportes.com.br\/index.php\/login\/","title":{"rendered":""},"content":{"rendered":"<p><code><!--?php \/\/ config.php $host = \"mysql.uol.com.br\"; $db = \"sistema_entregas\"; $user = \"USUARIO\"; $pass = \"SENHA\"; $conn = new mysqli($host, $user, $pass, $db); if ($conn-&gt;connect_error) die(\"Erro de conex\u00e3o\");&lt;br ?--><br \/>\n?&gt;<!-- login.php --><!--?php session_start(); include 'config.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = $_POST['email']; $senha = md5($_POST['senha']); $sql = \"SELECT * FROM usuarios WHERE email='$email' AND senha='$senha'\"; $res = $conn-&gt;query($sql);&lt;br ?--><br \/>\n  if ($res-&gt;num_rows &gt; 0) {<br \/>\n$_SESSION['user'] = $res-&gt;fetch_assoc();<br \/>\nheader('Location: dashboard.php');<br \/>\n} else {<br \/>\necho \"Login inv\u00e1lido\";<br \/>\n}<br \/>\n}<br \/>\n?&gt;<\/code><\/p>\n<form method=\"POST\"><input name=\"email\" type=\"text\" placeholder=\"Email\" \/><br \/>\n<input name=\"senha\" type=\"password\" placeholder=\"Senha\" \/><br \/>\n<button>Entrar<\/button><\/form>\n<p><!-- dashboard.php --><!--?php session_start(); if (!isset($_SESSION['user'])) header('Location: login.php'); include 'config.php'; ?--><\/p>\n<h2>Painel de Entregas<\/h2>\n<p><a href=\"nova_ordem.php\">Nova Entrega\/Coleta<\/a><\/p>\n<p>while ($row = $res-&gt;fetch_assoc()) {<br \/>\necho &#8220;&#8221;;<br \/>\n}<br \/>\n?&gt;<\/p>\n<table border=\"1\" cellpadding=\"5\">\n<tbody>\n<tr>\n<th>ID<\/th>\n<th>Cliente<\/th>\n<th>Tipo<\/th>\n<th>Status<\/th>\n<\/tr>\n<p><!--?php $sql = \"SELECT o.id, c.nome, o.tipo, o.status FROM ordens_servico o JOIN clientes c ON c.id=o.cliente_id\"; $res = $conn-&gt;query($sql);&lt;br ?--><\/p>\n<tr>\n<td>{$row[&#8216;id&#8217;]}<\/td>\n<td>{$row[&#8216;nome&#8217;]}<\/td>\n<td>{$row[&#8216;tipo&#8217;]}<\/td>\n<td>{$row[&#8216;status&#8217;]}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!-- nova_ordem.php --><!--?php session_start(); include 'config.php'; if ($_POST) { $cliente = $_POST['cliente']; $tipo = $_POST['tipo']; $sql = \"INSERT INTO ordens_servico (cliente_id, tipo) VALUES ('$cliente','$tipo')\"; $conn-&gt;query($sql);&lt;br ?--> header(&#8216;Location: dashboard.php&#8217;);<br \/>\n}<br \/>\n?&gt;<\/p>\n<form method=\"POST\">Cliente ID: <input name=\"cliente\" type=\"text\" \/><br \/>\nTipo:<select name=\"tipo\"><option>ENTREGA<\/option><option>COLETA<\/option><\/select><br \/>\n<button>Salvar<\/button><\/form>\n","protected":false},"excerpt":{"rendered":"<p>?&gt; if ($res-&gt;num_rows &gt; 0) { $_SESSION[&#8216;user&#8217;] = $res-&gt;fetch_assoc(); header(&#8216;Location: dashboard.php&#8217;); } else { echo &#8220;Login inv\u00e1lido&#8221;; } } ?&gt; Entrar Painel de Entregas Nova Entrega\/Coleta while ($row = $res-&gt;fetch_assoc()) { echo &#8220;&#8221;; } ?&gt; ID Cliente Tipo Status {$row[&#8216;id&#8217;]} {$row[&#8216;nome&#8217;]} {$row[&#8216;tipo&#8217;]} {$row[&#8216;status&#8217;]} header(&#8216;Location: dashboard.php&#8217;); } ?&gt; Cliente ID: Tipo:ENTREGACOLETA Salvar<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/pages\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":3,"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/pages\/8\/revisions"}],"predecessor-version":[{"id":11,"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/pages\/8\/revisions\/11"}],"wp:attachment":[{"href":"https:\/\/falahtransportes.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}