$block5->rowsLimit = "10";
$block5->sorting("home_discussions", $sortingUser->sor_home_discussions[0], "topic.last_post DESC", $sortingFields = array(0 => "topic.subject", 1 => "mem.login", 2 => "topic.posts", 3 => "topic.last_post", 4 => "topic.status", 5 => "topic.project", 6 => "topic.published"));
if ($projectsFilter == "true") {
    if ($comptListProjectsFilter != "0") {
        $tmpquery = "{$searchTopics} AND topic.project IN({$filterResults}) ORDER BY {$block5->sortingValue}";
    } else {
        $validTopics = "false";
    }
} else {
    $tmpquery = "{$searchTopics} ORDER BY {$block5->sortingValue}";
}
$comptListTopics = "0";
if ($validTopics == "true") {
    $block5->recordsTotal = compt($initrequest["topics"] . " " . $tmpquery);
    $listTopics = new request();
    $listTopics->openTopics($tmpquery, $block5->borne, $block5->rowsLimit);
    $comptListTopics = count($listTopics->top_id);
    // echo "$tmpquery<br>";
}
$block6 = new block();
$comptTopic = count($topicNote);
$block6->borne = $blockPage->returnBorne("6");
$block6->rowsLimit = "10";
if ($comptTopic != "0") {
    $block6->sorting("notes", $sortingUser->sor_notes[0], "note.date DESC", $sortingFields = array(0 => "note.subject", 1 => "note.topic", 2 => "note.date", 3 => "mem.login", 4 => "note.published"));
} else {
    $block6->sorting("notes", $sortingUser->sor_notes[0], "note.date DESC", $sortingFields = array(0 => "note.subject", 1 => "note.date", 2 => "mem.login", 3 => "note.published"));
}
if ($projectsFilter == "true") {
    if ($comptListProjectsFilter != "0") {
        $tmpquery = "{$searchNotes} AND note.project IN({$filterResults}) ORDER BY {$block6->sortingValue}";
Ejemplo n.º 2
0
<?php

#Application name: PhpCollab
#Status page: 0
$checkSession = "true";
include "../includes/library.php";
$tmpquery = "WHERE topic.id = '{$id}'";
$detailTopic = new request();
$detailTopic->openTopics($tmpquery);
if ($detailTopic->top_published[0] == "1" || $detailTopic->top_project[0] != $projectSession) {
    headerFunction("index.php");
}
if ($action == "delete") {
    $detailTopic->top_posts[0] = $detailTopic->top_posts[0] - 1;
    $tmpquery = "DELETE FROM " . $tableCollab["posts"] . " WHERE id = '{$post}'";
    connectSql("{$tmpquery}");
    $tmpquery2 = "UPDATE " . $tableCollab["topics"] . " SET posts='" . $detailTopic->top_posts[0] . "' WHERE id = '{$id}'";
    connectSql("{$tmpquery2}");
    headerFunction("showallthreads.php?id={$id}&" . session_name() . "=" . session_id());
    exit;
}
$bouton[5] = "over";
$titlePage = $strings["bulletin_board_topic"];
include "include_header.php";
$tmpquery = "WHERE pos.topic = '" . $detailTopic->top_id[0] . "' ORDER BY pos.created DESC";
$listPosts = new request();
$listPosts->openPosts($tmpquery);
$comptListPosts = count($listPosts->pos_id);
$idStatus = $detailTopic->top_status[0];
echo "<table cellspacing='0' width='90%' cellpadding='3'>\n<tr><th colspan='4'>" . $strings["information"] . ":</th></tr>\n<tr><th>" . $strings["subject"] . ":</th><td>" . $detailTopic->top_subject[0] . "</td><th>" . $strings["posts"] . ":</th><td>" . $detailTopic->top_posts[0] . "</td></tr>\n<tr><th>" . $strings["project"] . ":</th><td>" . $projectDetail->pro_name[0] . "</td><th>" . $strings["last_post"] . ":</th><td>" . createDate($detailTopic->top_last_post[0], $timezoneSession) . "</td></tr>\n<tr><th>&nbsp;</th><td>&nbsp;</td><th>" . $strings["retired"] . ":</th><td>{$statusTopicBis[$idStatus]}</td></tr>\n<tr><th>" . $strings["owner"] . ":</th><td colspan='3'><a href='mailto:" . $detailTopic->top_mem_email_work[0] . "'>" . $detailTopic->top_mem_login[0] . "</a></td></tr>\n<tr><td colspan='4'>&nbsp;</td></tr>\n<tr><th colspan='4'>" . $strings["discussion"] . ":</th></tr>";
if ($detailTopic->top_status[0] == "1") {
Ejemplo n.º 3
0
 $tmpquery = 'WHERE tas.project IN(' . $id . ')';
 $listTasks = new request();
 $listTasks->openTasks($tmpquery);
 $comptListTasks = count($listTasks->tas_id);
 for ($i = 0; $i < $comptListTasks; $i++) {
     if ($fileManagement == 'true') {
         delDir('../files/' . $id . '/' . $listTasks->tas_id[$i]);
     }
     $tasks .= $listTasks->tas_id[$i];
     if ($i != $comptListTasks - 1) {
         $tasks .= ',';
     }
 }
 $tmpquery = 'WHERE topic.project IN(' . $id . ')';
 $listTopics = new request();
 $listTopics->openTopics($tmpquery);
 $comptListTopics = count($listTopics->top_id);
 for ($i = 0; $i < $comptListTopics; $i++) {
     $topics .= $listTopics->top_id[$i];
     if ($i != $comptListTopics - 1) {
         $topics .= ',';
     }
 }
 connectSql($tmpquery1);
 $tmpquery2 = 'DELETE FROM ' . $tableCollab['tasks'] . ' WHERE project IN(' . $id . ')';
 connectSql($tmpquery2);
 $tmpquery3 = 'DELETE FROM ' . $tableCollab['teams'] . ' WHERE project IN(' . $id . ')';
 connectSql($tmpquery3);
 $tmpquery4 = 'DELETE FROM ' . $tableCollab['topics'] . ' WHERE project IN(' . $id . ')';
 connectSql($tmpquery4);
 $tmpquery5 = 'DELETE FROM ' . $tableCollab['files'] . ' WHERE project IN(' . $id . ')';