Beispiel #1
0
        ?>
><?php 
        echo $imSettings['blog']['posts'][$post]['title'];
        ?>
</option>
<?php 
    }
    ?>
			</select>
<?php 
}
if (isset($_GET['category']) && isset($_GET['post'])) {
    $data = $imSettings['blog'];
    $topic = new ImTopic($data['file_prefix'] . 'pc' . $_GET['post'], "../");
    $topic->setPostUrl('blog.php?category=' . $_GET['category'] . '&post=' . $_GET['post']);
    switch ($data['sendmode']) {
        case "file":
            $topic->loadXML($data['folder']);
            break;
    }
    if (count($topic->comments->getAll())) {
        $topic->showSummary($data['comment_type'] != "comment", TRUE);
    }
    $topic->showAdminComments($data['comment_type'] != "comment", $data['comments_order']);
}
?>
		</div>
	</div>
</div>
<?php 
require_once "footer.php";
/**
 * Show the guestbook
 * This function is provided as compatibility for v9 guestbook widget
 * 
 * @param string  $id              The guestbook id
 * @param string  $filepath        The folder where the comments must be stored
 * @param string  $email           The email to notify the new comments
 * @param boolean $captcha         true to show the captcha
 * @param boolean $direct_approval true to directly approve comments
 * 
 * @return void
 */
function showGuestBook($id, $filepath, $email, $captcha = true, $direct_approval = true)
{
    global $imSettings;
    $gb = new ImTopic("gb" . $id);
    $gb->loadXML($filepath);
    $gb->showSummary(false);
    $gb->showForm(false, $captcha, !$direct_approval, $email, "guestbook", $imSettings['general']['url'] . "/admin/guestbook.php?id=" . $id);
    $gb->showComments(false);
}
Beispiel #3
0
        ?>
</option>
<?php 
    }
    ?>
			</select>
<?php 
}
$gb = false;
if (strlen($id)) {
    $data = $imSettings['guestbooks'][$id];
    $gb = new ImTopic($id, "../");
    $gb->setPostUrl('guestbook.php?id=' . $id);
    switch ($data['sendmode']) {
        case "file":
            $gb->loadXML($data['folder']);
            break;
        case "db":
            $gb->loadDb($data['host'], $data['user'], $data['password'], $data['database'], $data['table']);
            break;
    }
    if ($gb->hasComments()) {
        $gb->showAdminSummary($data['rating'], TRUE);
    }
}
?>
		<div style="clear: both;"></div>
		</div>
<?php 
if ($id != "") {
    // Show the comments of a guestbook