Commit 89574c76 authored by changi67's avatar changi67

[MOD] Only Identation

parent d43514fd
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-view_articles.php,v 1.41.2.1 2007-11-08 21:47:51 ricks99 Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
$section = 'cms';
require_once ('tiki-setup.php');
include_once ('lib/articles/artlib.php');
include_once("lib/commentslib.php");
include_once ("lib/commentslib.php");
if ($prefs['feature_categories'] == 'y') {
include_once('lib/categories/categlib.php');
include_once ('lib/categories/categlib.php');
}
$commentslib = new Comments($dbTiki);
if ($prefs['feature_articles'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_articles");
$smarty->display("error.tpl");
die;
}
if ( ($tiki_p_read_article != 'y') && ($tiki_p_articles_read_heading != 'y') ) {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot view this section"));
$smarty->display("error.tpl");
die;
}
$smarty->assign('msg', tra("This feature is disabled") . ": feature_articles");
$smarty->display("error.tpl");
die;
}
if (($tiki_p_read_article != 'y') && ($tiki_p_articles_read_heading != 'y')) {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot view this section"));
$smarty->display("error.tpl");
die;
}
if (isset($_REQUEST["remove"])) {
if ($tiki_p_remove_article != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot remove articles"));
$smarty->display("error.tpl");
die;
}
$area = 'delarticle';
if ($prefs['feature_ticketlib2'] != 'y' or (isset($_POST['daconfirm']) and isset($_SESSION["ticket_$area"]))) {
key_check($area);
$artlib->remove_article($_REQUEST["remove"]);
} else {
key_get($area);
}
}
if ($tiki_p_remove_article != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you cannot remove articles"));
$smarty->display("error.tpl");
die;
}
$area = 'delarticle';
if ($prefs['feature_ticketlib2'] != 'y' or (isset($_POST['daconfirm']) and isset($_SESSION["ticket_$area"]))) {
key_check($area);
$artlib->remove_article($_REQUEST["remove"]);
} else {
key_get($area);
}
}
// This script can receive the thresold
// for the information as the number of
// days to get in the log 1,3,4,etc
// it will default to 1 recovering information for today
if (empty($_REQUEST["sort_mode"])) {
$sort_mode = 'publishDate_desc';
$sort_mode = 'publishDate_desc';
} else {
$sort_mode = $_REQUEST["sort_mode"];
$sort_mode = $_REQUEST["sort_mode"];
}
$smarty->assign_by_ref('sort_mode', $sort_mode);
// If offset is set use it if not then use offset =0
// use the maxRecords php variable to set the limit
// if sortMode is not set then use lastModif_desc
if (!isset($_REQUEST["offset"])) {
$offset = 0;
$offset = 0;
} else {
$offset = $_REQUEST["offset"];
$offset = $_REQUEST["offset"];
}
$smarty->assign_by_ref('offset', $offset);
if ( isset($_REQUEST['date_min']) || isset($_REQUEST['date_max']) ) {
$date_min = isset($_REQUEST['date_min']) ? $_REQUEST['date_min'] : 0;
$date_max = isset($_REQUEST['date_max']) ? $_REQUEST['date_max'] : $tikilib->now;
if (isset($_REQUEST['date_min']) || isset($_REQUEST['date_max'])) {
$date_min = isset($_REQUEST['date_min']) ? $_REQUEST['date_min'] : 0;
$date_max = isset($_REQUEST['date_max']) ? $_REQUEST['date_max'] : $tikilib->now;
} elseif (isset($_SESSION["thedate"])) {
$date_min = 0;
if ($_SESSION["thedate"] < $tikilib->now) {
$date_max = $_SESSION["thedate"];
} else {
if ($tiki_p_admin == 'y' || $tiki_p_admin_cms == 'y') {
$date_max = $_SESSION["thedate"];
} else {
$date_max = $tikilib->now;
}
}
$date_min = 0;
if ($_SESSION["thedate"] < $tikilib->now) {
$date_max = $_SESSION["thedate"];
} else {
if ($tiki_p_admin == 'y' || $tiki_p_admin_cms == 'y') {
$date_max = $_SESSION["thedate"];
} else {
$date_max = $tikilib->now;
}
}
} else {
$date_min = 0;
$date_max = $tikilib->now;
$date_min = 0;
$date_max = $tikilib->now;
}
$min_rating = isset($_REQUEST['min_rating']) ? $_REQUEST['min_rating'] : '';
$max_rating = isset($_REQUEST['max_rating']) ? $_REQUEST['max_rating'] : '';
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
$find = $_REQUEST["find"];
} else {
$find = '';
$find = '';
}
$smarty->assign_by_ref('find', $find);
if (isset($_REQUEST["type"])) {
$type = $_REQUEST["type"];
$type = $_REQUEST["type"];
} else {
$type = '';
$type = '';
}
if (isset($_REQUEST["topic"])) {
$topic = $_REQUEST["topic"];
$topic = $_REQUEST["topic"];
} else {
$topic = '';
$topic = '';
}
if (isset($_REQUEST['topicName'])) {
$topicName = $_REQUEST['topicName'];
$topicName = $_REQUEST['topicName'];
} else {
$topicName = '';
$topicName = '';
}
if (isset($_REQUEST["categId"])) {
$categId = $_REQUEST["categId"];
$categId = $_REQUEST["categId"];
} else {
$categId = '';
$categId = '';
}
$smarty->assign_by_ref('categId', $categId);
if (!isset($_REQUEST['lang'])) {
$_REQUEST['lang'] = '';
$_REQUEST['lang'] = '';
}
// Get a list of last changes to the Wiki database
$listpages = $tikilib->list_articles($offset, $prefs['maxArticles'], $sort_mode, $find, $date_min, $date_max, $user, $type, $topic, 'y', $topicName, $categId, '', '', $_REQUEST['lang'], $min_rating, $max_rating);
if ($prefs['feature_multilingual'] == 'y') {
include_once("lib/multilingual/multilinguallib.php");
$listpages['data'] = $multilinguallib->selectLangList('article', $listpages['data']);
include_once ("lib/multilingual/multilinguallib.php");
$listpages['data'] = $multilinguallib->selectLangList('article', $listpages['data']);
}
$topics = $artlib->list_topics();
$smarty->assign_by_ref('topics', $topics);
$temp_max = count($listpages["data"]);
for ($i = 0; $i < $temp_max; $i++) {
$listpages["data"][$i]["parsed_heading"] = $tikilib->parse_data($listpages["data"][$i]["heading"]);
$comments_prefix_var='article:';
$comments_object_var=$listpages["data"][$i]["articleId"];
$comments_objectId = $comments_prefix_var.$comments_object_var;
$listpages["data"][$i]["comments_cant"] = $commentslib->count_comments($comments_objectId);
for ($i = 0;$i < $temp_max;$i++) {
$listpages["data"][$i]["parsed_heading"] = $tikilib->parse_data($listpages["data"][$i]["heading"]);
$comments_prefix_var = 'article:';
$comments_object_var = $listpages["data"][$i]["articleId"];
$comments_objectId = $comments_prefix_var . $comments_object_var;
$listpages["data"][$i]["comments_cant"] = $commentslib->count_comments($comments_objectId);
}
if (!empty($topicName) && !strstr($topicName, '!') && !strstr($topicName, '+')) {
$smarty->assign_by_ref('topic', $topicName);
} elseif (!empty($topic) && is_numeric($topic)) {
if (!empty($listpages['data'][0]['topicName']))
$smarty->assign_by_ref('topic', $listpages['data'][0]['topicName']);
else {
$topic_info = $artlib->get_topic($topic);
if (isset($topic_info['name']))
$smarty->assign_by_ref('topic', $topic_info['name']);
}
$smarty->assign_by_ref('topic', $topicName);
} elseif (!empty($topic) && is_numeric($topic)) {
if (!empty($listpages['data'][0]['topicName'])) $smarty->assign_by_ref('topic', $listpages['data'][0]['topicName']);
else {
$topic_info = $artlib->get_topic($topic);
if (isset($topic_info['name'])) $smarty->assign_by_ref('topic', $topic_info['name']);
}
}
if (!empty($type) && !strstr($type, '!') && !strstr($type, '+')) {
$smarty->assign_by_ref('type', $type);
$smarty->assign_by_ref('type', $type);
}
$smarty->assign('maxArticles', $prefs['maxArticles']);
// If there're more records then assign next_offset
$smarty->assign_by_ref('listpages', $listpages["data"]);
$smarty->assign_by_ref('cant', $listpages["cant"]);
include_once ('tiki-section_options.php');
ask_ticket('view_article');
// Display the template
$smarty->assign('mid', 'tiki-view_articles.tpl');
$smarty->display("tiki.tpl");
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-view_banner.php,v 1.23 2007-10-12 07:55:33 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
require_once ('tiki-setup.php');
require_once ('lib/tikilib.php'); # httpScheme()
include_once ('lib/banners/bannerlib.php');
if (!isset($bannerlib)) {
$bannerlib = new BannerLib($dbTiki);
$bannerlib = new BannerLib($dbTiki);
}
if ($prefs['feature_banners'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_banners");
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("This feature is disabled") . ": feature_banners");
$smarty->display("error.tpl");
die;
}
// CHECK FEATURE BANNERS AND ADMIN PERMISSION HERE
if (!isset($_REQUEST["bannerId"])) {
$smarty->assign('msg', tra("No banner indicated"));
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("No banner indicated"));
$smarty->display("error.tpl");
die;
}
$info = $bannerlib->get_banner($_REQUEST["bannerId"]);
if (!$info) {
$smarty->assign('msg', tra("Banner not found"));
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("Banner not found"));
$smarty->display("error.tpl");
die;
}
// Check user is admin or the client
if (($user != $info["client"]) && ($tiki_p_admin_banners != 'y')) {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to edit this banner"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to edit this banner"));
$smarty->display("error.tpl");
die;
}
$smarty->assign('bannerId', $info["bannerId"]);
$smarty->assign('created', $info["created"]);
$smarty->assign('client', $info["client"]);
......@@ -54,13 +43,11 @@ $impressions = $info["impressions"];
$clicks = $info["clicks"];
$smarty->assign('impressions', $impressions);
$smarty->assign('clicks', $clicks);
if ($impressions) {
$smarty->assign('ctr', $clicks / $impressions);
$smarty->assign('ctr', $clicks / $impressions);
} else {
$smarty->assign('ctr', 0);
$smarty->assign('ctr', 0);
}
$smarty->assign('fromDate', $info["fromDate"]);
$smarty->assign('toDate', $info["toDate"]);
$smarty->assign('useDates', $info["useDates"]);
......@@ -85,38 +72,30 @@ $smarty->assign("imageName", $info["imageName"]);
$smarty->assign("imageData", urlencode($info["imageData"]));
$smarty->assign("imageType", $info["imageType"]);
$smarty->assign("hasImage", 'n');
if (strlen($info["imageData"]) > 0) {
$tmpfname = $prefs['tmpDir'] . "/bannerimage" . "." . $_REQUEST["bannerId"];
$fp = fopen($tmpfname, "wb");
if ($fp) {
fwrite($fp, $data);
fclose ($fp);
$smarty->assign('tempimg', $tmpfname);
$smarty->assign('hasImage', 'y');
} else {
$smarty->assign('tempimg', 'n');
$smarty->assign('hasImage', 'n');
}
$tmpfname = $prefs['tmpDir'] . "/bannerimage" . "." . $_REQUEST["bannerId"];
$fp = fopen($tmpfname, "wb");
if ($fp) {
fwrite($fp, $data);
fclose($fp);
$smarty->assign('tempimg', $tmpfname);
$smarty->assign('hasImage', 'y');
} else {
$smarty->assign('tempimg', 'n');
$smarty->assign('hasImage', 'n');
}
}
$bannerId = $info["bannerId"];
$foo = parse_url($_SERVER["REQUEST_URI"]);
$foo1 = str_replace("tiki-view_banner", "display_banner", $foo["path"]);
$raw = '';
if ($fp = @fopen($tikilib->httpPrefix(). $foo1 . "?id=$bannerId", "r")) {
while (!feof($fp)) {
$raw .= fread($fp, 8192);
}
fclose ($fp);
if ($fp = @fopen($tikilib->httpPrefix() . $foo1 . "?id=$bannerId", "r")) {
while (!feof($fp)) {
$raw.= fread($fp, 8192);
}
fclose($fp);
}
$smarty->assign_by_ref('raw', $raw);
ask_ticket('view-banner');
$smarty->assign('mid', 'tiki-view_banner.tpl');
$smarty->display("tiki.tpl");
This diff is collapsed.
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-view_blog_post.php,v 1.46.2.1 2007-11-24 15:28:37 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
$section = 'blogs';
require_once ('tiki-setup.php');
include_once ('lib/blogs/bloglib.php');
$auto_query_args = array('postId','blogId','offset','find','sort_mode','page','mode','show_comments');
$auto_query_args = array(
'postId',
'blogId',
'offset',
'find',
'sort_mode',
'page',
'mode',
'show_comments'
);
// first of all , we just die if blogs feature is not set
if ($prefs['feature_blogs'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_blogs");
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("This feature is disabled") . ": feature_blogs");
$smarty->display("error.tpl");
die;
}
if (!isset($_REQUEST['blogId']) && !isset($_REQUEST['postId'])) {
$parts = parse_url($_SERVER['REQUEST_URI']);
$paths = explode('/', $parts['path']);
// $blogId = $paths[count($paths) - 2];
$postId = $paths[count($paths) - 1];
$parts = parse_url($_SERVER['REQUEST_URI']);
$paths = explode('/', $parts['path']);
// $blogId = $paths[count($paths) - 2];
$postId = $paths[count($paths) - 1];
} else if (empty($_REQUEST["postId"])) {
$smarty->assign('msg', tra('No post indicated'));
$smarty->display('error.tpl');
die;
$smarty->assign('msg', tra('No post indicated'));
$smarty->display('error.tpl');
die;
} else {
$postId = $_REQUEST['postId'];
$postId = $_REQUEST['postId'];
}
$post_info = $bloglib->get_post($postId);
$blogId = $post_info['blogId'];
$blog_data = $bloglib->get_blog($blogId);
if (!$blog_data) {
$smarty->assign('msg', tra("Blog not found"));
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("Blog not found"));
$smarty->display("error.tpl");
die;
}
$smarty->assign('individual', 'n');
if ($userlib->object_has_one_permission($blogId, 'blog')) {
$smarty->assign('individual', 'y');
if ($tiki_p_admin != 'y') {
// Now get all the permissions that are set for this type of permissions 'image gallery'
$perms = $userlib->get_permissions(0, -1, 'permName_desc', '', 'blogs');
foreach ($perms["data"] as $perm) {
$permName = $perm["permName"];
if ($userlib->object_has_permission($user, $blogId, 'blog', $permName)) {
$$permName = 'y';
$smarty->assign("$permName", 'y');
} else {
$$permName = 'n';
$smarty->assign("$permName", 'n');
}
}
}
$smarty->assign('individual', 'y');
if ($tiki_p_admin != 'y') {
// Now get all the permissions that are set for this type of permissions 'image gallery'
$perms = $userlib->get_permissions(0, -1, 'permName_desc', '', 'blogs');
foreach($perms["data"] as $perm) {
$permName = $perm["permName"];
if ($userlib->object_has_permission($user, $blogId, 'blog', $permName)) {
$$permName = 'y';
$smarty->assign("$permName", 'y');
} else {
$$permName = 'n';
$smarty->assign("$permName", 'n');
}
}
}
}
if ($tiki_p_blog_admin == 'y') {
$tiki_p_create_blogs = 'y';
$smarty->assign('tiki_p_create_blogs', 'y');
$tiki_p_blog_post = 'y';
$smarty->assign('tiki_p_blog_post', 'y');
$tiki_p_read_blog = 'y';
$smarty->assign('tiki_p_read_blog', 'y');
$tiki_p_create_blogs = 'y';
$smarty->assign('tiki_p_create_blogs', 'y');
$tiki_p_blog_post = 'y';
$smarty->assign('tiki_p_blog_post', 'y');
$tiki_p_read_blog = 'y';
$smarty->assign('tiki_p_read_blog', 'y');
}
if ($tiki_p_read_blog != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you can not view this section"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied you can not view this section"));
$smarty->display("error.tpl");
die;
}
$ownsblog = 'n';
if ($user && $user == $blog_data["user"]) {
$ownsblog = 'y';
$ownsblog = 'y';
}
if ($ownsblog == 'n' && $tiki_p_admin != 'y' && $post_info["priv"] == 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied: you cannot view this blog post while it is marked private"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied: you cannot view this blog post while it is marked private"));
$smarty->display("error.tpl");
die;
}
$smarty->assign('ownsblog', $ownsblog);
$post_info['data'] = TikiLib::htmldecode($post_info['data']);
$smarty->assign('post_info', $post_info);
$smarty->assign('postId', $postId);
$smarty->assign('blog_data', $blog_data);
$smarty->assign('blogId', $blogId);
//Build absolute URI for this
$parts = parse_url($_SERVER['REQUEST_URI']);
$uri = $tikilib->httpPrefix(). $parts['path'] . '?blogId=' . $blogId . '&postId=' . $postId;
$uri2 = $tikilib->httpPrefix(). $parts['path'] . '/' . $blogId . '/' . $postId;
$uri = $tikilib->httpPrefix() . $parts['path'] . '?blogId=' . $blogId . '&postId=' . $postId;
$uri2 = $tikilib->httpPrefix() . $parts['path'] . '/' . $blogId . '/' . $postId;
$smarty->assign('uri', $uri);
$smarty->assign('uri2', $uri2);
if (!isset($_REQUEST['offset']))
$_REQUEST['offset'] = 0;
if (!isset($_REQUEST['sort_mode']))
$_REQUEST['sort_mode'] = 'created_desc';
if (!isset($_REQUEST['find']))
$_REQUEST['find'] = '';
if (!isset($_REQUEST['offset'])) $_REQUEST['offset'] = 0;
if (!isset($_REQUEST['sort_mode'])) $_REQUEST['sort_mode'] = 'created_desc';
if (!isset($_REQUEST['find'])) $_REQUEST['find'] = '';
$smarty->assign('offset', $_REQUEST["offset"]);
$smarty->assign('sort_mode', $_REQUEST["sort_mode"]);
$smarty->assign('find', $_REQUEST["find"]);
$offset = $_REQUEST["offset"];
$sort_mode = $_REQUEST["sort_mode"];
$find = $_REQUEST["find"];
//print(htmlspecialchars($post_info["data"]));
$parsed_data = $tikilib->parse_data($post_info["data"]);
//print(htmlspecialchars($parsed_data));
if (!isset($_REQUEST['page']))
$_REQUEST['page'] = 1;
if (!isset($_REQUEST['page'])) $_REQUEST['page'] = 1;
$pages = $bloglib->get_number_of_pages($parsed_data);
$parsed_data = $bloglib->get_page($parsed_data, $_REQUEST['page']);
$smarty->assign('pages', $pages);
if ($pages > $_REQUEST['page']) {
$smarty->assign('next_page', $_REQUEST['page'] + 1);
$smarty->assign('next_page', $_REQUEST['page'] + 1);
} else {
$smarty->assign('next_page', $_REQUEST['page']);
$smarty->assign('next_page', $_REQUEST['page']);
}
if ($_REQUEST['page'] > 1) {
$smarty->assign('prev_page', $_REQUEST['page'] - 1);
$smarty->assign('prev_page', $_REQUEST['page'] - 1);
} else {
$smarty->assign('prev_page', 1);
$smarty->assign('prev_page', 1);
}
$smarty->assign('first_page', 1);
$smarty->assign('last_page', $pages);
$smarty->assign('pagenum', $_REQUEST['page']);
$smarty->assign('parsed_data', $parsed_data);
if ($prefs['feature_blogposts_comments'] == 'y') {
$comments_per_page = $prefs['blog_comments_per_page'];
$thread_sort_mode = $prefs['blog_comments_default_ordering'];
$comments_vars = array(
'postId',
'offset',
'find',
'sort_mode',
'blogId'
);
$comments_prefix_var = 'post:';
$comments_object_var = 'postId';
include_once ("comments.php");
$comments_per_page = $prefs['blog_comments_per_page'];
$thread_sort_mode = $prefs['blog_comments_default_ordering'];
$comments_vars = array(
'postId',
'offset',
'find',
'sort_mode',
'blogId'
);
$comments_prefix_var = 'post:';
$comments_object_var = 'postId';
include_once ("comments.php");
}
$cat_type = 'blog';
$cat_objid = $blogId;
include_once ('tiki-section_options.php');
if ($user && $tiki_p_notepad == 'y' && $prefs['feature_notepad'] == 'y' && isset($_REQUEST['savenotepad'])) {
check_ticket('view-blog-post');
$tikilib->replace_note($user, 0, $post_info['title'] ? $post_info['title'] : $tikilib->date_format("%d/%m/%Y [%H:%M]", $post_info['created']), $post_info['data']);
check_ticket('view-blog-post');
$tikilib->replace_note($user, 0, $post_info['title'] ? $post_info['title'] : $tikilib->date_format("%d/%m/%Y [%H:%M]", $post_info['created']) , $post_info['data']);
}
if ($prefs['feature_mobile'] == 'y' && isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mobile') {
include_once ("lib/hawhaw/hawtikilib.php");
HAWTIKI_view_blog_post ($post_info);
include_once ("lib/hawhaw/hawtikilib.php");
HAWTIKI_view_blog_post($post_info);
}
if (isset($_REQUEST['show_comments']) && $_REQUEST['show_comments'] == 1) {
$smarty->assign('show_comments', 1);
$smarty->assign('show_comments', 1);
}
if ($prefs['feature_freetags'] == 'y') {
// Get Tags
include_once('lib/freetag/freetaglib.php');
$tags = $freetaglib->get_tags_on_object($postId, "blog post");
$smarty->assign('tags', $tags);
// Get Tags
include_once ('lib/freetag/freetaglib.php');
$tags = $freetaglib->get_tags_on_object($postId, "blog post");
$smarty->assign('tags', $tags);
}
ask_ticket('view-blog-post');
// Display the template
$smarty->assign('mid', 'tiki-view_blog_post.tpl');
$smarty->display("tiki.tpl");
<?php
// $Id: /cvsroot/tikiwiki/tiki/tiki-view_blog_post_image.php,v 1.8.2.1 2008-03-01 16:07:36 lphuberdeau Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
require_once ('tiki-setup.php');
if ($prefs['feature_blogs'] != 'y') {
$smarty->assign('msg', tra("This feature is disabled").": feature_blogs");
$smarty->display("error.tpl");
die;
$smarty->assign('msg', tra("This feature is disabled") . ": feature_blogs");
$smarty->display("error.tpl");
die;
}
include_once ('lib/blogs/bloglib.php');
if (!isset($_REQUEST["imgId"])) {
die;
die;
}
$info = $bloglib->get_post_image($_REQUEST["imgId"]);
$type = &$info["filetype"];
$file = &$info["filename"];