Infinity Forum
Christian Engineering Solutions (CES) is a Not for Profit Organization specializing in collaborative solutions development for the Church. In the Spirit of Jesus Christ, we are to spread the gospel throughout the Earth, taking care to be good examples of Christ Jesus by serving others. CES is designed to help the Church meet these goals in the most rigorous manner possible.
Our Technology is scripture based in its goals and foundations. Open-Source and Free, one may use our services to both learn and solve problems with the goals of helping others and growing closer to God.
<div class=\"forum_box\">
$res = $forum->sql->query(" SELECT topics.*,
CASE WHEN
sub=0
THEN
(SELECT subcat.name FROM subcat WHERE subcat.ID=topics.parent_ID)
ELSE
(SELECT subforum.name FROM subforum WHERE subforum.ID=topics.parent_ID)
END
AS
cat_name,
CASE WHEN
sub=1
THEN
(SELECT subforum.parent_ID FROM subforum WHERE subforum.ID=topics.parent_ID)
END
AS
cat_ID,
(SELECT subcat.name FROM subcat WHERE subcat.ID=topics.parent_ID)
AS
cat_name2
FROM topics, subcat
WHERE topics.ID =?
AND topics.parent_ID = subcat.ID", $_POST["t"]);
$row = $res->fetchAll();
if (count($row) === 0)
die("could not find the thread"); //or don't have access
//if we are on the first page show init post
echo "<input type='hidden'id='last-page'value='".$forum->numPagesInThread($_POST['t'])."'/><div class=\"thread\">";
if($_POST['pg'] == 1){
echo $forum->postTemplate($row, $row2);
}
$res = $forum->sql->query("SELECT * FROM `posts` WHERE `parent_ID`=? ORDER BY `time_` ASC LIMIT ".($forum->beginAtRow($_POST['pg'])).", ".Forum::LIMIT, $row[0]["ID"]);
$resFetch = $res->fetchAll();
$count = count($resFetch);
$counter = 0;
foreach($resFetch as $row2)
{
//echo $forum->postTemplate($row, $row2);
$id = $row2['ID'];
$poster = $member->getUserData($row2["by_"]);
echo "<br/>";
echo "<div id='thread-".$id."'class=\"thread\">";
echo "<input id='forum-data-post-".$id."'type='hidden'value='".$id."-".$poster['username']."-".System::timeDiff($row2["time_"])."'/>";
echo "<div class=\"thread_title\">";
echo "<span> </span>";
echo "Re: ".$row[0]["title"]." - ".System::timeDiff($row2["time_"]); // topic title
echo "</div>";
echo "<div class=\"post\">";
echo "<table class=\"tbl_post\"><tr><td>";
echo "<div class=\"post_usr\">";
echo "<a href=\"/user/$poster[username]\">$poster[username]</a><br/>"; //username
echo "<span class=\"status\" id=\"".$member->status2name($poster['status'])."\" title=\"".$member->status2name($poster['status'])."\"> </span>"; //online status
echo "<img src=\"/images/user/$poster[image]\" alt=\"$poster[username]\" />"; //picture
echo "<span class=\"usr_rank\">".($poster['special'] !== 'Member' && $poster['special'] !== '' ? $poster['special'] : $ranks[$poster["rank"]])."</span><br><br>"; //rank
echo "<table class=\"usr_info\">";
echo "<tr><td width=10>Posts:</td><td>". $forum->getPostCountByUser($poster["ID"])."</td></tr>"; //post count
echo "<tr><td>Prestige:</td><td>". $poster["prestige"]."</td></tr>"; //ask points
echo "</table>";
echo "</div>";
echo "</td><td>";
echo "<div class=\"post_msg\"><div style='width:100%;'id='epicedit-".$id."'><textarea id='epic-".$id."'class='epic-text'>$row2[msg]</textarea></div></div>";
echo "<div class=\"post_msg_btm\">";
$btm = '';
if($_SESSION['ID'] == $row2['by_'] || Members::getInstance()->isPrivileged($_SESSION['ID'])){
$btm .= "  <span style='cursor:pointer'id='forum-modify-posts-".$id."'>Modify</span>   <a id='forum-remove-posts-".$id."'>Remove</a>";
}
if($_SESSION['ID'] != $row2['by_']){
$btm .= "  <a class='fa fa-plus'></a>  <a class='fa fa-minus'></a>";
}Genera
echo "
<span style='cursor:pointer'id='forum-quote-".$id."'>Quote</span> ".$btm;
echo "</div>";
echo "</td></tr></table>";
echo "</div>";
//last row
if(++$counter == $count) echo "<br><button id='forum-post'>New Post</button> ".$forum->listPageNums($_POST['t'], $_POST['pg'])."<br>";
echo "</div>";
}
echo "</div>";
if (isset($row[0]['cat_ID'])) //if subforum post, so we get right back on track
$script = "<input type=\"hidden\" value=\"".base64_encode($row[0]["cat_name"])."|".$row[0]['cat_ID']."/".$forum->convertName($row[0]["cat_name2"])."&s=".$row[0]["parent_ID"]."\" class=\"hdn_cat\"/>";
else
$script = "<input type=\"hidden\" value=\"".base64_encode($row[0]["cat_name"])."|".$row[0]["parent_ID"]."\" class=\"hdn_cat\"/>";
$script .= "<input type=\"hidden\" value=\"".base64_encode($row[0]["title"])."|".$row[0]["ID"]."\" class=\"hdn_thr\"/>";
echo $script;
//var_dump($row);
}
?>