コード例 #1
0
ファイル: Detail.inc.php プロジェクト: alcexhim/PhoenixSNS
<?php

use WebFX\System;
use PhoenixSNS\Objects\GroupTopic;
$topic = GroupTopic::GetByIDOrName($thisgroup, $path[3]);
if (count($path) > 4 && $path[4] == "comment.mmo") {
    if ($_POST["comment_content"] !== null) {
        $topic->AddComment($_POST["comment_title"], $_POST["comment_content"]);
        System::Redirect("~/community/groups/" . $thisgroup->Name . "/topics/" . $topic->Name);
        return;
    }
}
$page = new PsychaticaWebPage($topic->Title . " | " . $thisgroup->Title);
$page->BeginContent();
?>
<div class="Card">
	<div class="Title">
		<i class="fa fa-users"></i> <span class="Text"><?php 
echo $topic->Title;
?>
</span>
	</div>
	<div class="Content">
		<?php 
echo $topic->Description;
?>
	</div>
	<div class="Actions Horizontal">
		<a href="<?php 
echo System::ExpandRelativePath("~/community/groups/" . $thisgroup->Name . "/topics/" . $topic->Name . "/comment.mmo");
?>
コード例 #2
0
ファイル: Group.inc.php プロジェクト: alcexhim/PhoenixSNS
 public static function GetByName($group, $name, $max = null)
 {
     global $MySQL;
     $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "GroupTopics WHERE grouptopic_GroupID = " . $group->ID . " AND grouptopic_Name = '" . $MySQL->real_escape_string($name) . "'" . ($max == null ? "" : " LIMIT " . $max);
     $result = $MySQL->query($query);
     $values = $result->fetch_assoc();
     return GroupTopic::GetByAssoc($values);
 }