Exemplo n.º 1
0
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
$checkSession = true;
require_once "../includes/library.php";
if ($action == "add") {
    $topicField = convertData($topicField);
    $messageField = convertData($messageField);
    $tmpquery1 = "INSERT INTO " . $tableCollab["topics"] . "(project,owner,subject,status,last_post,posts,published) VALUES('" . $_SESSION['projectSession'] . "','" . $_SESSION['idSession'] . "','{$topicField}','1','{$dateheure}','1','0')";
    connectSql("{$tmpquery1}");
    $tmpquery = $tableCollab["topics"];
    last_id($tmpquery);
    $num = $lastId[0];
    unset($lastId);
    autoLinks($messageField);
    $tmpquery2 = "INSERT INTO " . $tableCollab["posts"] . "(topic,member,created,message) VALUES('{$num}','" . $_SESSION['idSession'] . "','{$dateheure}','{$newText}')";
    connectSql("{$tmpquery2}");
    if ($notifications == "true") {
        $tmpquery = "WHERE pro.id = '" . $_SESSION['projectSession'] . "'";
        $projectDetail = new request();
        $projectDetail->openProjects($tmpquery);
        require_once "../topics/noti_newtopic.php";
    }
    header("Location: showallthreadtopics.php");
}
$bodyCommand = "onload=\"document.createThreadTopic.topicField.focus();\"";
$bouton[5] = "over";
$titlePage = $strings["create_topic"];
require_once "include_header.php";
echo "<form accept-charset=\"UNKNOWN\" method=\"post\" action=\"../projects_site/createthread.php?project=" . $_SESSION['projectSession'] . "&amp;action=add&amp;id={$id}\" name=\"createThreadTopic\" enctype=\"application/x-www-form-urlencoded\">";
Exemplo n.º 2
0
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
$checkSession = true;
require_once "../includes/library.php";
$tmpquery = "WHERE topic.id = '{$id}'";
$detailTopic = new request();
$detailTopic->openTopics($tmpquery);
$tmpquery = "WHERE pro.id = '" . $detailTopic->top_project[0] . "'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
if ($action == "add") {
    $tpm = convertData($tpm);
    autoLinks($tpm);
    $detailTopic->top_posts[0] = $detailTopic->top_posts[0] + 1;
    $tmpquery1 = "INSERT INTO " . $tableCollab["posts"] . "(topic,member,created,message) VALUES('{$id}','" . $_SESSION['idSession'] . "','{$dateheure}','{$newText}')";
    connectSql("{$tmpquery1}");
    $tmpquery2 = "UPDATE " . $tableCollab["topics"] . " SET last_post='{$dateheure}',posts='" . $detailTopic->top_posts[0] . "' WHERE id = '{$id}'";
    connectSql("{$tmpquery2}");
    if ($notifications == "true") {
        require_once "../topics/noti_newpost.php";
    }
    header("Location: ../topics/viewtopic.php?id={$id}&msg=add");
    exit;
}
$idStatus = $detailTopic->top_status[0];
$idPublish = $detailTopic->top_published[0];
$tmpquery = "WHERE pos.topic = '" . $detailTopic->top_id[0] . "' ORDER BY pos.created DESC";
$listPosts = new request();