TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Mods & hacks Mods Complete & working Addon Mods Category Manager
Page 1 2 3 4

Category Manager

2006-03-30 20:09:00
Group: Member
Posts: 3
Topics participated: 3
Topics started: 2
First post: 2006-03-30 18:58:00
Last post: 2006-03-30 20:09:00
i tried this but now it says
Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/categorie.php:5) in /home/admin/public_html/include/bittorrent.php on line 339

and the line is up to 118?
 
2006-04-27 15:27:00
Group: Member
Posts: 1
Topics participated: 1
Topics started: 0
First post: 2006-04-27 15:27:00
Last post: 2006-04-27 15:27:00
What is wrong is this code? When i edit/delete I see home page :/

php
ob_start();
require_once("include/bittorrent.php");
dbconn(false);
loggedinorreturn();
if (get_user_class() < UC_SYSOP) {
die("Access denied.");
}
mysql_connect($mysql_host,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
stdhead("Categories");
begin_frame("Categories", center);

///////////////////// D E L E T E C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\

$sure = $_GET['sure'];
if($sure == "yes") {
$delid = $_GET['delid'];
$query = "DELETE FROM categories WHERE id='$delid' LIMIT 1";
$sql = mysql_query($query);
echo("Category succesfully deleted! [ Back ]");
end_frame();
stdfoot();
die();
}
$delid = $_GET['delid'];
$name = $_GET['cat'];
if($delid > 0) {
echo("Are you sure you would like to delete this category? ($name) ( Y / N )");
end_frame();
stdfoot();
die();

}

///////////////////// E D I T A C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$edited = $_GET['edited'];
if($edited == 1) {
$id = $_GET['id'];
$cat_name = $_GET['cat_name'];
$cat_img = $_GET['cat_img'];
$query = "UPDATE categories SET
name = '$cat_name',
image = '$cat_img' WHERE id='$id'";
$sql = mysql_query($query);
if($sql) {
echo("");
echo("");
echo("
Well done! Your category has been edited succesfully! [ Back ]
");
end_frame();
stdfoot();
die();
}
}

$editid = $_GET['editid'];
$name = $_GET['name'];
$img = $_GET['img'];
if($editid > 0) {
echo("
");
echo("");
echo("
Now editing category "$name"
");
echo("
");
echo("");
echo("");
echo("");
echo("");
echo("
Category Name:
Category Image Name:
");
end_frame();
stdfoot();
die();
}

///////////////////// A D D A N E W C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$add = $_GET['add'];
if($add == 'true') {
$cat_name = $_GET['cat_name'];
$cat_img = $_GET['cat_img'];
$query = "INSERT INTO categories SET
name = '$cat_name',
image = '$cat_img'";
$sql = mysql_query($query);
if($sql) {
$success = TRUE;
} else {
$success = FALSE;
}
}
print("Add A New Category!");
print("
");
print("
");
echo("
");
echo("");
echo("");
echo("");
echo("");
echo("
Category Name:
Category Image Name:
");
if($success == TRUE) {
print("Success!");
}
echo("
");
echo("
");

///////////////////// E X I S T I N G C A T E G O R I E S \\\\\\\\\\\\\\\\\\\\\\\\\\\\

print("Existing Categories:");
print("
");
print("
");
echo("");
echo("");
$query = "SELECT * FROM categories WHERE 1=1";
$sql = mysql_query($query);
while ($row = mysql_fetch_array($sql)) {
$id = $row['id'];
$name = $row['name'];
$img = $row['image'];
echo("");
}

end_frame();
end_frame();
stdfoot();

?>
ID:Name:Picture:Browse Category:Edit:Delete:
$id $name
 
2006-04-27 18:08:00
Group: Member
Posts: 197
Topics participated: 134
Topics started: 6
First post: 2006-04-27 18:08:00
Last post: 2006-11-11 15:25:00
god, ColdFusion said already what are you thinkin'?

replace from all over the script
$PHP_SELF['$SERVER']



to


$_SERVER['PHP_SELF']
 
2006-04-27 19:00:00
Group: Member
Posts: 122
Topics participated: 64
Topics started: 4
First post: 2006-03-12 00:53:00
Last post: 2007-07-03 15:22:00
Works fine :)
 
2006-05-18 23:24:00
Group: Member
Posts: 22
Topics participated: 9
Topics started: 4
First post: 2006-05-18 08:10:00
Last post: 2007-07-26 18:19:00
works fine in catagory.php

but i can not see any image in browse.php


any ideers??
 
2006-05-27 00:14:00
Group: Member
Posts: 99
Topics participated: 53
Topics started: 3
First post: 2006-03-05 12:31:00
Last post: 2006-10-08 02:36:00
works fine in catagory.php

but i can not see any image in browse.php
any ideers??


You must be using BrokenStones source code is this true?
 
2006-06-20 14:27:00
Group: Member
Posts: 30
Topics participated: 13
Topics started: 3
First post: 2006-06-20 14:27:00
Last post: 2008-02-17 03:34:00
Nice mod, I'm getting one error when running the script though :(

I copied and pasted the code, and when I run the code (=type it in the url bar) I get this error:

Fatal error: Call to undefined function: phpob_start() in /home/legendary-torrents.org/www/category.php on line 1

I'm not quite known to all these errors, so can't really find a way to fix it myself, sorry for the hassle. Would love someone to help me fix it though :).

Thx in advance
 
2006-06-20 14:30:00
Group: Member
Posts: 510
Topics participated: 277
Topics started: 5
First post: 2006-03-13 22:18:00
Last post: 2006-10-25 20:54:00
SOme line break missing in the copy paste ;)

the first line is
php

and 1 line below there should be
ob_start();


So in the end it would look like
php
ob_start();
?>


:)
 
2006-11-15 16:52:00
Group: Member
Posts: 166
Topics participated: 97
Topics started: 24
First post: 2006-09-21 21:31:00
Last post: 2008-10-09 14:58:00
thanks.. :P
 
2006-12-21 19:56:00
Group: Member
Posts: 12
Topics participated: 9
Topics started: 1
First post: 2006-12-05 16:39:00
Last post: 2007-08-10 09:19:00
thank you, works great!! :-)
 

Similar threads

Topic Posts Last post
Downloads Manager 1 2007-01-17 00:45:00
Owners File Manager 11 2008-12-17 10:37:00
Forum manager thingy 20 2008-09-19 11:08:00
category 8 2007-08-20 20:47:00
Category 3 2007-08-22 06:22:00