-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenviaFotoPrinc.php
More file actions
180 lines (124 loc) · 4.15 KB
/
enviaFotoPrinc.php
File metadata and controls
180 lines (124 loc) · 4.15 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<HEAD>
<TITLE> - myWeb - </TITLE>
<link type="text/css" rel="stylesheet" href="Estilo.css"/>
<link type="text/css" rel="stylesheet" href="EstiloFonte.css"/>
<link rel="shortcut icon" href="MY_WEB-LOGO/favicon.ico" type="image/x-icon"/>
<?
include "based.php";
?>
</HEAD>
<BODY bgcolor="#CCCCCC" id="corpo" align="center">
<div align="right">
<script Type="text/JavaScript" language="JavaScript" >
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += (hours >= 12) ? " pm":" am"
timerRunning = true;
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
weekday= myweekday;
myyear= mydate.getYear();
year = myyear
if(myday == 0)
day = " <b><tt>Domingo,</tt></b> "
else if(myday == 1)
day = " <b><tt>Segunda,</tt></b> "
else if(myday == 2)
day = " <b><tt>Ter�a,</tt></b> "
else if(myday == 3)
day = " <b><tt>Quarta,</tt></b> "
else if(myday == 4)
day = " <b><tt>Quinta,</tt></b> "
else if(myday == 5)
day = " <b><tt>Sexta,</tt></b> "
else if(myday == 6)
day = " <b><tt>S�bado,</tt></b> "
if(mymonth == 0)
month = " <b><tt>de Janeiro de</tt></b> "
else if(mymonth ==1)
month = "<b><tt> de Fevereiro de</tt></b> "
else if(mymonth ==2)
month = "<b><tt> de Mar�o de</tt></b> "
else if(mymonth ==3)
month = "<b><tt> de Abril de</tt></b> "
else if(mymonth ==4)
month = "<b><tt> de Maio de</tt></b> "
else if(mymonth ==5)
month = "<b><tt> de Junho de</tt></b> "
else if(mymonth ==6)
month = "<b><tt> de Julho de</tt></b> "
else if(mymonth ==7)
month = "<b><tt> de Agosto de</tt></b> "
else if(mymonth ==8)
month = "<b><tt> de Setembro de </tt></b>"
else if(mymonth ==9)
month = "<b><tt> de Outubro de </tt></b>"
else if(mymonth ==10)
month = "<b><tt> de Novembro de </tt></b>"
else if(mymonth ==11)
month = "<b><tt> de Dezembro de </tt></b>"
year='<b><tt>2017</tt></b> '
document.write(day + '<font size=2>' + myweekday + '</font>' + month + year + ' - ' + '<font size=2>' + timeValue + '</font>')
</script>
<BODY>
<br/><br/>
<div style="background-color:white; border-radius:12px; width:100%; height:60px;"><p align="left"><img src="MY_WEB-LOGO/MyWeb.png" width="200" height="60" /></p></div>
<br/><br/>
<?php
include"based.php";
@session_start();
$_SESSION['c_email'];
$_SESSION['c_senha'];
$perfil=$_GET['id'];
if ($_FILES["arquivo"] != "") {
$arquivo = $_FILES["arquivo"];
$pasta_dir = "arquivos/";//diretorio dos arquivos
//se nao existir a pasta ele cria uma
if(!file_exists($pasta_dir)){
mkdir($pasta_dir);
}
$arquivo_nome = $pasta_dir . $arquivo["name"];
// Faz o upload da imagem
move_uploaded_file($arquivo["tmp_name"], $arquivo_nome);
//conecta no banco
$nome = $_POST['nome'];
$tituloPerfil=$_POST['tituloPerfil'];
$query = "INSERT INTO users (arquivo) VALUES ('$arquivo_nome') WHERE tituloPerfil LIKE'%$_GET[id]%'"; // inser��o sql na tabela recados
mysql_query($query) or die (mysql_error());
mysql_close();//fecha conex�o
?>
<?php
echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head><title> - webystem - </title>
<style type='text/css'>
#Email{text-transform:lowercase;}
#Estado{text-transform:uppercase;}
#body{font-family:tahoma; padding:21px;}
#celula{padding:10px;}
#celula1{padding:16px;}
#Proper{text-transform:capitalize;}
#corpo{padding:30px; font-family:tahoma;}
</style></head>
<body bgcolor='#CCCCCC' id='corpo'>
<center><font size='3'>Foto enviada com sucesso";
echo "</center><br>";
echo "<img src='$arquivo_nome' width='250'><br/>$nome<br/> <br/>
<center><form method='post' enctype='multipart/form-data' action=''>
<a href='javascript:history.go(-1)'><input type='button' name='sair' value='Voltar' /></a>
</form></center>
</body>
</html>";
}
?>
</BODY>
</HTML>