Jump to content

flatfile delete


xcoderx

Recommended Posts

see here is a code but i get a error

 

Fatal error: Call to undefined function emoticondecode() in /home/www/http/public_html/blog/view_post.php on line 87

 

<?php

include("settings.php");
include("users.php");

if($want_comments == "true"){

$blogfile = file($datafile);

unset($blogfile[0]);

foreach($blogfile as $thisline){

list($title, $post, $date, $id, $image, $username_blog, $label, $tag)=explode("|",$thisline);

$page_name_set = $title;

if($id == $_GET['id']){

$page_title = $title;
include("./themes/$skin/header.php");

if($blog_offline == "true" and $type != "admin"){
echo "<center><b>$offline_msg</b></center>";
include("./themes/$skin/footer.php");
die();
}

$image = trim($image, "\n");
xyz();
bbcodedecode($post);

// show post start

$image = trim($image);

if(file_exists("./accounts/".trim($username_blog).".php")){
include("./accounts/".trim($username_blog).".php");
}

if(file_exists("./accounts/".trim($username_blog).".php")){
$name_s = "<a href=\"view_member.php?username=$username_blog\">$name</a>";
} else {
$name_s = $username_blog;
}

if($want_comments == "true"){
$comment_links = "<img src=\"themes/static_skin/icons/comment.gif\" alt=\"comment\" /> <a href=\"add_comment.php?id=$id\">Add comment</a>";
}

if($image != ""){
$image_show = "<img src=\"$image\" alt=\"blog image\" style=\"float: right; margin: 4px; clear:left\" border=\"0\" />";
} else {
$image_show = "";
}

if(isset($icon) and $icon != "None"){
$label = "<a href=\"?label=$label_name\"><img src=\"label_icons/$icon\" alt=\"$label_name\" title=\"$label_name\" style=\"border:0; float:right\" /></a>";
} else {
$label = "";
}

include("./themes/$skin/post_style.php");

}
}
// show post end

$commentfilearray = file($commentfile);

unset($commentfilearray[0]);
$any = "no";
foreach($commentfilearray as $lnum => $comment){
$break = "|";
list($name_comm, $comment, $date, $id, $status)=explode($break,$comment);


if($type = "admin" and isset($_COOKIE['script_password']) and $password == $_COOKIE['script_password']){
$delete_link = "[<a href=\"main.php?delete_com=$lnum\" style=\"text-decoration:none\">Delete</a>]";
} else {
$delete_link = "";
}

emoticondecode($comment);

if(file_exists("./accounts/{$name_comm}.php")){
include("./accounts/{$name_comm}.php");
$name_comm = "<a href=\"view_member.php?username=$name_comm\">$name_comm</a>";
}

if(trim($status) != "0"){
if(trim($id) == $_GET['id']){
echo "<center><div style=\"width:300px\" align=\"left\"><span class=\"comment_name\">$name_comm said:</span><br /><br />
  <span class=\"comment_post\">$comment</span><br />
  <span class=\"date\">$date $delete_link</span><br /><hr></div></center><br />";

$any = "yes";
}
}
}
if(isset($any) and $any == "no"){
if(!isset($id)) $id = "";
echo "No one has made a comment yet. Be the first, <a href=\"add_comment.php?id=$id\">post a comment</a>.<br /><br />";
}
} else {
include("./themes/$skin/header.php");

echo "I'm sorry, but this feature has been disabled.";

include("./themes/$skin/footer.php");
}

include("./themes/$skin/footer.php");
?>

Link to comment
https://forums.phpfreaks.com/topic/135287-flatfile-delete/#findComment-704701
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.