**** Calculo de horas paradas
Qdo Condutor voltar da Entrega,
Vc calcula Qtas Horas ele Ficou Parado e MULTILPLA 8HS + 2HS PARADA, Total 10HS X 15.00 =R$150.00
O Condutor saiu com uma previsao de 8HS, Mais FICOU 2 HS PARADA.= TOTAL 10HS
Mais o preco da hora parada e R$20.00
Sendo assim A Corrida ficou em R$ 160.00 REAIS,
Cakculo dos R$160.00= 8hs x 15.00=120,00 +40.00 de 2hs parada
160 / 10=16.00 O VALOR DA HORA com 2horas paradas
Resumindo: Entao na sua tabela de Precos ,
Preço Normal por Hora= R$15.00 a hora
Preco com 1 hora parada= R$ 15,55 a hora
Preço com 2 hoas paradas saira 16.00 rais a hora.
Preco com 3 horas paradas saira 18.00 reias a hora
ASSIM QDO O Condutor Voltar da Entrega Vc ALTERA O VALOR DA ORDEM SERVICO COM O VALOR DE 16.00 REAIS AS HORA JA COM O CODIGO DESTE PRECO NA SUA TABELA DE PRECO que este preco e com 2horas paradas
******
01- Crie o Ggrupo e usuarios no Servidor rede.
02-) Copie a pasta c:\motos para o Servidor de rede
03- Compartilha esta pasta com todos os usuarios com todos privelegios
4- Em cadaa terminais va e rede, e encontrei a pasta \motos compartilhada na rede
5- No executavel motos.exe botao direito
criar atalhos enviar para area de trbalho.
o atalho sera criado, so clicar no icone moto
e utilizar o sistems
*********agenda86.php
//relatorio
$bd_host = 'localhost';
$bd_user = 'root';
$bd_senha = '';
$bd = 'agenda';
$conecta = ($GLOBALS["___mysqli_ston"] = mysqli_connect($bd_host, $bd_user, $bd_senha)) or die(mysqli_error($GLOBALS["___mysqli_ston"]));
$bd = mysqli_select_db($conecta, $bd) or die(mysqli_error($GLOBALS["___mysqli_ston"]));
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>Relatorio </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/custom.css">
</head>
<body>
<div>
<a title="Sair volta a pg anterior" href="javascript:history.go(-1);"> <div align="center" class="col-md-10 titulo">Relacao </div></a>
<p align="center"> <input name="Print" class="botao"
onclick="javascript:window.print();" title="imprmir" value="Gera" type="button"><font
face="Arial" size="2"> <input value="<<"
onclick="history.go(-1)" title="voltar" type="button"> </font></p>
</div>
<table class="table table-striped table-bordered table-hover table-condensed" style="font-size: 12px;" >
<thead>
<th class="b" align="center" width="1%"> ID</th>
<th class="b" align="center" width="5%"> NOME</th>
<thead>
</div>
<?php
$qry =mysqli_query($conecta, "SELECT * FROM contactos order by nombre") or die(mysqli_error($GLOBALS["___mysqli_ston"]));
while ($resultado = mysqli_fetch_array( $qry)) {
?>
<tr >
<td><?php echo $resultado["id"]; ?></td>
<td><?php echo $resultado["nombre"]; ?></td>
<?php
}
echo '</table>';
?>
</p>
</body>
</html>
//echo '<tr class="active">';
Alteracao Cadastro <div class="panel-heading">Cadastro </div>
<div class="container-fluid">
<div class="row-fluid">
<div class="col-md-7">
<div class="panel panel-primary">
<div class="panel-heading">Cadastro da Empresa</div>
<div class="panel-body">
<form action="" enctype="multipart/form-data" name="Gravar" method="post" >
<fieldset style="background-color: #E9ECF5 ; color:#FFFFF; font-size: 13px;" >
<label> Nome : </label> <input type="text" name="nome" SIZE = "100" maxlength="100" value="' .$res['nome']. ' "/> <br>
<label> Cep ? </label> <input type="text" name="cep" SIZE = "9" maxlength="9" value="' .$res['cep']. ' "/> <br>
<label> Endereco: </label> <input type="text" name="endereco" SIZE = "100" maxlength="100" value="' .$res['endereco']. ' " /> <br>
<label> Bairro : </label> <input type="text" name="bairro" SIZE = "100" maxlength="100" value="' .$res['bairro']. ' " /> <br>
<label> Email : </label> <input type="text" name="email" size="90" maxlength="90" value="' .$res['email']. ' "/><br>
<label> DDD Telefone </label> <input type="text" name="ddd" SIZE="2" value="' .$res['ddd']. ' "/>-
<input type="text" name="telefone" value="' .$res['telefone']. ' "/> <br>
<label> Cidade: </label> <input type="text" name="cidade" SIZE = "25" maxlength="25" value="' .$res['cidade']. ' " /> UF
<input type="text" name="estado" SIZE = "2" maxlength="2" value="' .$res['estado']. ' " /> Contato-
<input type="text" name="contato" SIZE = "29" maxlength="29" value="' .$res['contato']. ' " /> <br>
<label> Site: </label> <input type="text" name="site" SIZE = "65" maxlength="65" value="' .$res['site']. ' " /> <br>
<label> Nextel : </label> <input type="text" name="nextel" SIZE = "15" maxlength="15" value="' .$res['nextel']. ' " /> <br>
<a style="background-color:#53CEDF; color:#fff; font-size: 16px;" href="empresa.php">Cancel</a>
<input type="submit" name="enviar" value="Gravar" />
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
<p style="margin-bottom: 1800px;">Coloque a Alteracao !</p>
Exclusao com js
<td><input type="button" onClick="deleteme(<?php echo $row['empid']; ?>)" name="Delete" value="Delete"></td>
</tr>
<!-- Javascript function for deleting data -->
<script language="javascript">
function deleteme(delid)
{
if(confirm("Voce confirma Exclusao ?!")){
window.location.href='delete.php?del_id=' +delid+'';
return true;
}
}
</script>
<?php
emviar sms com php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Enviar SMS Via PHP</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container mt-5">
<div class="row">
<div class="col-md-12 text-center">
<h1>Envio de SMS</h1>
<p>Envie SMS Para Qualquer Número do Brasil</p>
<hr>
</div>
<div class="col-md-4 ml-auto mr-auto">
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
list($errors, $input) = validateData();
if ($errors) {
showErrors($errors);
} else {
processForm($input);
}
}
function validateData() {
$input = array();
$errors = array();
$phoneFormat = '/^\([\d]{2}\) (9)[6789]\d{3}\-[\d]{4}$/';
$input['receiver'] = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);
$input['message'] = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
if (empty($input['receiver']) || empty($input['message'])) {
$errors[] = 'Preencha todos os campos.';
} else {
if (!preg_match($phoneFormat, $input['receiver'], $matches, PREG_OFFSET_CAPTURE, 0)) {
$errors[] = 'Informe o número de telefone no formato válido.';
}
if (strlen($input['message']) > 160) {
$errors[] = 'A mensagem deve ter no máximo 160 caracteres.';
}
}
return array($errors, $input);
}
function showErrors($errors = array()) {
print 'Oops! Corrija os seguintes erros:';
print '<ul><li>';
print implode('</li><li>', $errors);
print '</li></ul>';
}
function processForm($input) {
// Remove os parenteses e o hífen do número de telefone
$input['receiver'] = '+55' . preg_replace('/[^0-9]/', '', $input['receiver']);
/**
* Envio de SMS utilizando o serviço da Standard Library
* Detalhes: https://stdlib.com/@utils/lib/sms
**/
$url = 'https://utils.api.stdlib.com/sms@1.0.11/';
$smsData = array('to' => $input['receiver'], 'body' => $input['message']);
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($c, CURLOPT_POST, TRUE);
//Insira o Token obtido https://stdlib.com/@utils/lib/sms no parâmetro abaixo
// Descomente a linha abaixo
//curl_setopt($c, CURLOPT_HTTPHEADER, array('Authorization: SEU_TOKEN_AQUI', 'Content-Type: application/json'));
curl_setopt($c, CURLOPT_POSTFIELDS, json_encode($smsData));
if (curl_exec($c)) {
print 'SMS enviado com sucesso para o número: ' . $input['receiver'];
} else {
print 'Erro ao enviar o SMS';
}
}
?>
<form method="post" novalidate>
<div class="form-group">
<label for="phone">Telefone:</label>
<input class="form-control" type="text" id="phone" name="phone" pattern="\([0-9]{2}\) [0-9]{5}-[0-9]{4}$" placeholder="(00) 90000-0000" required>
</div>
<div class="form-group">
<label for="body">Mensagem:</label>
<textarea class="form-control" name="message" rows="5" maxlength="160" placeholder="Máximo de 160 caracteres"></textarea>
</div>
<input style="cursor: pointer" type="submit" value="Enviar SMS" class="btn btn-primary">
<input type="button" value="Sair" class="btn btn-primary" onclick="window.location.href='index2.php';" />
</form>
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vanilla-masker/1.1.0/vanilla-masker.min.js'></script>
<script id="rendered-js">
function inputHandler(masks, max, event) {
var c = event.target;
var v = c.value.replace(/\D/g, '');
var m = c.value.length > max ? 1 : 0;
VMasker(c).unMask();
VMasker(c).maskPattern(masks[m]);
c.value = VMasker.toPattern(v, masks[m]);
}
var telMask = ['(99) 9999-99999', '(99) 99999-9999'];
var tel = document.querySelector('input[id=phone]');
VMasker(tel).maskPattern(telMask[0]);
tel.addEventListener('input', inputHandler.bind(undefined, telMask, 14), false);
</script>
</body>
</html>