コード例 #1
0
							<tr>
								<td>
									<input type="checkbox" name="enable_notifications" <?php 
                            echo $notifications ? "checked=\"checked\"" : "";
                            ?>
/>
									<label for="enable_notifications" class="form-nrequired">Receieve notifications when this users reply to this thread</label></td>
							</tr>
							<?php 
                        }
                        ?>
						</tbody>
						</table>
						</form>
						<?php 
                        if (discussion_topic_module_access($topic_record["cdtopic_parent"], "view-post")) {
                            $query = "\n\t\t\t\t\t\t\t\t\tSELECT a.*, b.`forum_title`, CONCAT_WS(' ', c.`firstname`, c.`lastname`) AS `poster_fullname`, c.`username` AS `poster_username`\n\t\t\t\t\t\t\t\t\tFROM `community_discussion_topics` AS a\n\t\t\t\t\t\t\t\t\tLEFT JOIN `community_discussions` AS b\n\t\t\t\t\t\t\t\t\tON a.`cdiscussion_id` = b.`cdiscussion_id`\n\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_data` AS c\n\t\t\t\t\t\t\t\t\tON a.`proxy_id` = c.`id`\n\t\t\t\t\t\t\t\t\tWHERE a.`proxy_id` = c.`id`\n\t\t\t\t\t\t\t\t\tAND a.`community_id` = " . $db->qstr($COMMUNITY_ID) . "\n\t\t\t\t\t\t\t\t\tAND b.`cpage_id` = " . $db->qstr($PAGE_ID) . " \n\t\t\t\t\t\t\t\t\tAND a.`cdtopic_id` = " . $db->qstr($topic_record["cdtopic_parent"]) . "\n\t\t\t\t\t\t\t\t\tAND a.`topic_active` = '1'\n\t\t\t\t\t\t\t\t\tAND b.`forum_active` = '1'";
                            $result = $db->GetRow($query);
                            if ($result) {
                                ?>
								<br />
								<h2>Original Post: <small><?php 
                                echo html_encode($result["topic_title"]);
                                ?>
</small></h2>
								<table class="discussions posts" style="width: 100%" cellspacing="0" cellpadding="0" border="0">
								<colgroup>
									<col style="width: 30%" />
									<col style="width: 70%" />
								</colgroup>
								<tr>
コード例 #2
0
 * @author Developer: Matt Simpson <*****@*****.**>
 * @author Developer: James Ellis <*****@*****.**>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 * 
*/
if (!defined("COMMUNITY_INCLUDED") || !defined("IN_DISCUSSIONS")) {
    exit;
} elseif (!$COMMUNITY_LOAD) {
    exit;
}
if ($RECORD_ID) {
    $query = "\tSELECT * FROM `community_discussion_topics` as a\n\t\t\t\t\t\tLEFT JOIN `community_discussions` as b\n\t\t\t\t\t\tON a.`cdiscussion_id` = b.`cdiscussion_id`\n\t\t\t\t\t\tWHERE a.`cdtopic_id` = " . $db->qstr($RECORD_ID) . " \n\t\t\t\t\t\tAND b.`cpage_id` = " . $db->qstr($PAGE_ID) . " \n\t\t\t\t\t\tAND a.`community_id` = " . $db->qstr($COMMUNITY_ID);
    $topic_record = $db->GetRow($query);
    if ($topic_record) {
        if ((int) $topic_record["topic_active"]) {
            if (discussion_topic_module_access($RECORD_ID, "delete-post")) {
                /**
                 * Get a list of all replies, so we can deactivate those in
                 * history as well.
                 */
                $topic_ids = array();
                $topic_ids[] = $RECORD_ID;
                $query = "SELECT `cdtopic_id` FROM `community_discussion_topics` WHERE `cdtopic_parent` = " . $db->qstr($RECORD_ID) . " AND `community_id` = " . $db->qstr($COMMUNITY_ID);
                $results = $db->GetAll($query);
                if ($results) {
                    foreach ($results as $result) {
                        if ($topic_id = (int) $result["cdtopic_id"]) {
                            $topic_ids[] = $topic_id;
                        }
                    }
                }
コード例 #3
0
                        ?>
</a><?php 
                    }
                    ?>
</td>
							<td style="border-bottom: none">
								<div style="float: left">
									<span class="content-small"><strong>Replied:</strong> <?php 
                    echo date(DEFAULT_DATE_FORMAT, $result["updated_date"]);
                    ?>
</span>
								</div>
								<div style="float: right">
								<?php 
                    echo discussion_topic_module_access($result["cdtopic_id"], "edit-post") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-post&amp;id=" . $result["cdtopic_id"] . "\">edit</a>)" : "";
                    echo discussion_topic_module_access($result["cdtopic_id"], "delete-post") ? " (<a class=\"action\" href=\"javascript:postDelete('" . $result["cdtopic_id"] . "', 'reply')\">delete</a>)" : "";
                    ?>
								</div>
							</td>
						</tr>
						<tr>
							<td colspan="2" class="content">
							<a name="post-<?php 
                    echo (int) $result["cdtopic_id"];
                    ?>
"></a>
							<?php 
                    echo $result["topic_description"];
                    if ($result["release_date"] != $result["updated_date"]) {
                        echo "<div class=\"content-small\" style=\"margin-top: 15px\">\n";
                        echo "\t<strong>Last updated:</strong> " . date(DEFAULT_DATE_FORMAT, $result["updated_date"]) . " by " . ($result["proxy_id"] == $result["updated_by"] ? html_encode($result["poster_fullname"]) : html_encode(get_account_data("firstlast", $result["updated_by"]))) . ".";
コード例 #4
0
						<tr>
							<td>
								<input type="checkbox" name="enable_notifications" <?php 
                        echo $notifications ? "checked=\"checked\"" : "";
                        ?>
/>
								<label for="enable_notifications" class="form-nrequired">Receieve notifications when this users reply to this thread</label></td>
						</tr>
						<?php 
                    }
                    ?>
					</tbody>
					</table>
					</form>
					<?php 
                    if (discussion_topic_module_access($RECORD_ID, "view-post")) {
                        ?>
						<br />
						<h2>Original Post: <small><?php 
                        echo html_encode($topic_record["topic_title"]);
                        ?>
</small></h2>
						<table class="discussions posts" style="width: 100%" cellspacing="0" cellpadding="0" border="0">
						<colgroup>
							<col style="width: 30%" />
							<col style="width: 70%" />
						</colgroup>
						<tr>
							<td style="border-bottom: none; border-right: none"><span class="content-small">By:</span>  <?php 
                        if (defined('COMMUNITY_DISCUSSIONS_ANON') && COMMUNITY_DISCUSSIONS_ANON && !$COMMUNITY_ADMIN && isset($topic_record["anonymous"]) && $topic_record["anonymous"]) {
                            ?>