<!-- Post Section --> <?php $mod = am_mod($soc); echo to_html(post_full($post, $soc, $mod)); ?> <!-- Comment Section --> <div class="panel panel-default well"> <div class="panel-heading"> <?php echo "<h3>"; echo "Comments (" . $post["comments"] . ")" . "<br>"; echo "</h3>"; ?> <a data-toggle="modal" data-target="#new-comm" class="btn btn-default">Add Comment</a> </div> <div class="panel-body well-lg"> <?php if (count($comms) == 0) { echo to_html(par("No comments yet.")); } else { echo to_html(build_comment_tree($comms, $mod)); } ?> </div> </div> <script> $( document ).ready(function(){ $(".downvote-active").addClass("btn-danger"); $(".upvote-active").addClass("btn-success");
<?php require "soc_common.php"; if (!am_mod($soc)) { apologize("Access Denied."); } $title .= " - Mod Panel"; static $mmap = ["trends" => "mod_dash_trends.php", "main" => "mod_dash.php", "bans" => "soc_bans.php", "dposts" => "del_posts.php", "dcomms" => "del_comms.php", "mods" => "mods.php", "log" => "mod_log.php", "preps" => "post_reps.php", "creps" => "comm_reps.php"]; if (!(isset($_GET["view"]) && array_key_exists($_GET["view"], $mmap))) { $_GET["view"] = "main"; } require $mmap[$_GET["view"]];
function edit_soc_info($sid, $info) { if (!am_mod(get_society_by_id($sid))) { apologize("Access Denied."); } return tquery("INSERT INTO soc_details(soc_id, revised_by, info) \n\t\t\t\t\t\tVALUES(?, ?, ?);\n\n\t\t\t\t\t\tSET @last_id = LAST_INSERT_ID();\n\n\t\t\t\t\t\tUPDATE societies\n\t\t\t\t\t\t SET rev_id = @last_id\n\t\t\t\t\t\t WHERE soc_id = ?;", [$sid, $_SESSION["user"]["user_id"], $info], [], [$sid]); }