-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditpost.php
More file actions
154 lines (135 loc) · 5.46 KB
/
editpost.php
File metadata and controls
154 lines (135 loc) · 5.46 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
<?
include('rest.php');
include('conectar.php');
$post_id = $_GET['i'];
$query_guy = "SELECT * FROM user WHERE nickname_user = '$login_user'";
$rs_guy = mysql_query($query_guy);
$infoguy = mysql_fetch_array($rs_guy);
$id_user = $infoguy['id_user'];
$photo_user = $infoguy['photo_user'];
$query_post = "SELECT * FROM posts WHERE id_post = '$post_id'";
$rs_post = mysql_query($query_post);
$postinfo = mysql_fetch_array($rs_post);
$tit_post = $postinfo['tit_post'];
$text_post = $postinfo['text_post'];
$creat_post = $postinfo['creat_post'];
$date_post = $postinfo['date_post'];
$area = $postinfo['cat_post'];
$font_post = $postinfo['font_post'];
$util_post = $postinfo['util_post'];
$inutil_post = $postinfo['inutil_post'];
$totutil_post = $postinfo['totutil_post'];
$query_creat = "SELECT * FROM user WHERE id_user = '$creat_post'";
$rs_creat = mysql_query($query_creat);
$creatinfus = mysql_fetch_array($rs_creat);
$nome_creat = $creatinfus['nome_user'];
$sobnome_creat = $creatinfus['sobrenome_user'];
$photo_creat = $creatinfus['photo_user'];
include('areas.php');
if($id_user != $creat_post){
echo "<script language='JavaScript'>
location.href='readpost.php?i=$post_id';
</script>";
}else{
?>
<!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=utf-8" />
<title>Mi mafia, Tu mafia</title>
<link rel="stylesheet" href="css/geral.css" type="text/css" />
</head>
<body leftmargin="0" topmargin="0" background="img/back2.png">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td width="10%"> </td>
<td align="center" valign="bottom"><p><img src="img/tit.png"></p></td>
<td width="10%"> </td>
</tr>
<tr>
<td> </td>
<td bgcolor="#c12a19" align="center" style="box-shadow: 0px 5px 15px #000;
" height="50"><? include ('menu.php');?></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td bgcolor="#FFFFFF" style="box-shadow: 0px 5px 15px #000;
" height="500" valign="top">
<!---- TABELA NOTICIAS --------------->
<table width="100%" border="0">
<? include ('headodm.php');?>
</table>
<script src="js/nicEdit-latest.js" type="text/javascript">
</script><br />
<script type="text/javascript">
bkLib.onDomLoaded(function() { new
nicEditor({buttonList : ['fontSize','fontFormat', 'bold', 'italic', 'underline', 'left', 'right', 'center', 'justify', 'ol', 'ul', 'indent', 'outdent', 'strikeThrough', 'subscript', 'superscript', 'xhtml', 'image', 'upload', 'arrow', 'link', 'unlink','forecolor','bgcolor']}).panelInstance('text_post'); });
</script>
<script languaje="javascript">
function Ok()
{
nicEditors.findEditor('text_post').saveContent();
document.formname.submit();
}
</script>
<form action="postform.php?a=edit" method="post">
<table border="0" width="100%">
<tr>
<td> </td>
<td align="left" valign="top">
<input name="tit_post" id="tit_post" placeholder="Titulo" style="font-size:30px" value="<?=$tit_post?>" required="required" />
<select name="cat_post" id="cat_post" style="font-size:30px">
<option selected="selected" value="<?=$area;?>"><?=$area_text;?></option>
<option disabled="disabled">Categorias</option>
<option value="nn">Notícias Nacionais</option>
<option value="ni">Notícias Internacionais</option>
<option value="c">Cursos</option>
<option value="co">Concursos</option>
<option value="uu">Utilidade Universitária</option>
<option value="a">Anúncios</option>
<option value="p">Política</option>
<option value="hi">Humor Instrutivo</option>
<option value="ri">RI</option>
<option value="m">Notícias Mafiosas</option>
</select>
<font size="30px" title="Dúvida na categoria? Clica aqui"><a href="catdoubt.php" target="_blank">(?)</a></font>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="left" style="font-family:Georgia, 'Times New Roman', Times, serif;">
<textarea name="text_post" cols="60" rows="20" id="text_post" placeholder="Texto do artigo" style="width:100%;">
<?=$text_post;?></textarea><br />
<input name="creat_post" type="hidden" id="creat_post" value="<?=$id_user?>" />
<input name="id_post" type="hidden" id="id_post" value="<?=$post_id?>" />
<br /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="left" style="font-family:Georgia, 'Times New Roman', Times, serif;">
<input name="font_post" id="font_post" placeholder="Se houver fontes ponha-nas aqui!" value="<?=$font_post;?>" style="font-size:30px; width:70%;" />
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="center" style="font-family:Georgia, 'Times New Roman', Times, serif;"><input name="Envoyer" type="submit" style="font-size:30px;" value="Modificar" /></form><br />
<br />
<br />
<form method="post" action="delet_post.php">
<input name="ie" type="hidden" id="ie" value="<?=$post_id?>">
<input name="Envoyer" type="submit" value="Deletar este artigo" style="background:#F00;" align="right" width="50px" height="20px">
</form></td>
<td> </td>
</tr>
</table>
<!---- FIM TABELA NOTICIAS ---------------></td>
<td> </td>
</tr>
</table>
</body>
</html>
<? } ?>