This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cadastro-servicos.php
165 lines (151 loc) · 9.58 KB
/
cadastro-servicos.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!doctype html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/2e45453992.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<title>Cadastro de Serviços</title>
</head>
<body>
<nav class="navbar rounded-3 navbar-expand-lg navbar-light " style="background-color:#07f4b0" ;>
<div class="container-fluid">
<a class="navbar-brand" href="index.php">
<img src="img/Costurando Ideias logo.png" width="50" height="50" class=" p-1 d-inline-block align-text-top">
<a class="navbar-brand fw-bold" href="index.php">Costurando Ideias</a>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav me-2 ms-auto">
<li class="nav-item">
<a class="bi bi-house-fill nav-link" href="index.php"> Home
<span class="visually-hidden"></span>
</a>
</li>
<li class="nav-item">
<?php
require_once 'conexao.php';
//echo "$_SESSION[id_cliente] $_SESSION[id_costureira] - $_SESSION['id_entregador'] ";
//exit;
// $id_cli = $_SESSION['id_cliente'];
if (isset($_SESSION['id_cliente'])) {
echo "<a class='bi bi-cart-fill nav-link' href='statuspedidocliente.php'> Carrinho</a>";
}
if (isset($_SESSION['id_costureira'])) {
echo "<a class='bi bi-cart-fill nav-link' href='statuspedidocostureira.php'> Carrinho</a>";
}
if (isset($_SESSION['id_entregador'])) {
echo "<a class='bi bi-cart-fill nav-link' href='statuspedidoentregador.php'> Carrinho</a>";
}
?>
</li>
<?php
if (isset($_SESSION['id_cliente']) && isset($_SESSION['nome']) && isset($_SESSION['email'])) {
echo "
<li class='nav-item'>
<a class='bi bi-person-fill nav-link' href='perfilc.php'> Perfil</a>
</li>
";
} else if (isset($_SESSION['id_costureira']) && isset($_SESSION['nome']) && isset($_SESSION['email'])) {
echo "
<li class='nav-item'>
<a class='bi bi-person-fill nav-link' href='perfilcus.php'> Perfil</a>
</li>
";
} else if (isset($_SESSION['id_entregador']) && isset($_SESSION['nome']) && isset($_SESSION['email'])) {
echo "
<li class='nav-item'>
<a class='bi bi-person-fill nav-link' href='perfile.php'> Perfil</a>
</li>
";
}
?>
<li class="nav-item">
<a class="nav-link" href="sobre.php"><i class="fas fa-info-circle"></i> Sobre nós</a>
</li>
<?php
if (empty($_SESSION['nome']) && empty($_SESSION['email'])) {
echo "
<li class='nav-item dropdown'>
<a class='bi bi-arrow-right-square-fill nav-link dropdown-toggle' data-bs-toggle='dropdown' href='#' role='button' aria-haspopup='true' aria-expanded='false'> Cadastrar</a>
<div class='dropdown-menu dropdown-menu-end success'>
<a class='dropdown-item' href='cadastrar-usuario.php'><i class='fas fa-user'></i> Cadastrar usuário</a>
<a class='dropdown-item' href='cadastrar-costureira.php'><i class='fas fa-cut'></i> Cadastrar costureira</a>
<a class='dropdown-item' href='cadastrar-entregador.php'><i class='fas fa-shipping-fast'></i> Cadastrar entregador</a>
</div>
</li>
<li>
<a class='bi bi-arrow-right-square-fill nav-link dropdown-toggle' data-bs-toggle='dropdown' href='#' role='button' aria-haspopup='true' aria-expanded='false'> Login</a>
<div class='dropdown-menu dropdown-menu-end success'>
<a class='dropdown-item' href='login-usuario.php'><i class='fas fa-user'></i> Sou um cliente</a>
<a class='dropdown-item' href='login-costureira.php'><i class='fas fa-cut'></i> Sou uma costureira</a>
<a class='dropdown-item' href='login-entregador.php'><i class='fas fa-shipping-fast'></i> Sou um entregador</a>
</div>
</li>";
}
?>
</ul>
<?php
if (isset($_SESSION['nome']) && isset($_SESSION['email'])) {
echo "
<div class='nav-item'>
<span class='container-fluid justify-content-end'>
<a class='me-2 btn btn-outline-danger btn-sm' type='button' href='logout.php'><i class='fas fa-sign-out-alt'></i> Sair</a>
</span>
</div>
";
}
?>
</div>
</div>
</nav>
<div>
<div class="m-4 jumbotron">
<h1 class="display-4"><i class="fas fa-cut"></i> Cadastro de serviços</h1>
<hr class="my-4">
</div>
<form action="servicos-process.php" method="POST" enctype="multipart/form-data" class="container">
<div class="mb-3">
<h5 class="form-label"> <i class="fas fa-money-bill-wave"></i> Tipo de serviço</h5>
<input class="form-control" type="text" name="nomes" maxlength="" placeholder="Nome do serviço" required="required"><br>
<select class="form-select" name="tiporoupa" id=" " required="required">
<?php
require_once "conexao.php";
$query = "SELECT id_tiporoupa, nome FROM tipo_roupa ORDER BY nome ASC";
$executa = mysqli_query($conexao, $query);
echo "<option value=''> Selecione o tipo de roupa</option>";
while ($roupa = mysqli_fetch_array($executa)) {
$roup = utf8_encode($roupa['nome']);
echo "<option value='$roupa[id_tiporoupa]'>$roup</option>";
//print_r($classe); exit;
}
?>
</select><br>
<textarea class=" me-2 form-control" name="descricao" placeholder="Digite a descrição do serviço."></textarea>
<br>
<h5 class="form-label"> <i class="fas fa-money-bill-wave"></i> Valor do serviço</h5>
<div class="input-group mb-3">
<span class="input-group-text">R$</span>
<input type="number" name="valorunitario" class="form-control">
</div>
<h5 class="form-label"><i class="fas fa-image"></i> Foto do serviço</h5>
<input type="file" class="form-control" name="foto" placeholder="Foto do serviço" required="required"><br>
</div>
<div class=" mb-3 btn-group">
<a href="perfilcus.php" id="button" name="cadastrar" type="submit" class="btn btn-outline-warning"><i class="fas fa-chevron-left"></i> Voltar</a>
<input id="button" type="submit" class="bi bi-check-circle-fill rounded btn btn-outline-success" name="cadastrar" value="Cadastrar"></input>
</div>
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous"></script>
</body>
</html>