Menu

[r10]: / topics / deletepost.php  Maximize  Restore  History

Download this file

61 lines (46 with data), 2.4 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
<?php
#Application name: PhpCollab
#Status page: 0
#Path by root: ../topics/deletepost.php
$checkSession = "true";
include_once('../includes/library.php');
$tmpquery = "WHERE topic.id = '$topic'";
$detailTopic = new request();
$detailTopic->openTopics($tmpquery);
if ($action == "delete") {
$detailTopic->top_posts[0] = $detailTopic->top_posts[0] - 1;
$tmpquery = "DELETE FROM ".$tableCollab["posts"]." WHERE id = '$id'";
connectSql("$tmpquery");
$tmpquery2 = "UPDATE ".$tableCollab["topics"]." SET posts='".$detailTopic->top_posts[0]."' WHERE id = '$topic'";
connectSql("$tmpquery2");
headerFunction("../topics/viewtopic.php?msg=delete&id=$topic&".session_name()."=".session_id());
exit;
}
$tmpquery = "WHERE pos.id = '$id'";
$detailPost = new request();
$detailPost->openPosts($tmpquery);
include('../themes/'.THEME.'/header.php');
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?",$strings["projects"],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=".$detailTopic->top_pro_id[0],$detailTopic->top_pro_name[0],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../topics/listtopics.php?topic=".$detailTopic->top_id[0],$strings["discussion"],in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../topics/viewtopic.php?id=".$detailTopic->top_id[0],$detailTopic->top_subject[0],in));
$blockPage->itemBreadcrumbs($strings["delete_messages"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
include('../includes/messages.php');
$blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "saP";
$block1->openForm("../topics/deletepost.php?id=$id&topic=$topic&action=delete&".session_name()."=".session_id());
$block1->heading($strings["delete_messages"]);
$block1->openContent();
$block1->contentTitle($strings["delete_following"]);
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>".nl2br($detailPost->pos_message[0])."</td>
<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"submit\" name=\"delete\" value=\"".$strings["delete"]."\"> <input type=\"button\" name=\"cancel\" value=\"".$strings["cancel"]."\" onClick=\"history.back();\"></td></tr>";
$block1->closeContent();
$block1->closeForm();
include('../themes/'.THEME.'/footer.php');
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.