escape($title);
$description = $forum_db->escape($description);
$image = $forum_db->escape($image);
$query = array(
'INSERT' => 'title,description,image',
'INTO' => 'medal_def',
'VALUES' => "'$title','$description','$image'",
);
$forum_db->query_build($query) or error(__FILE__, __LINE__);
}
header("location: admin.php");
}elseif ($_GET['mode'] && $_GET['mode']=="delete" && $_GET['id']){
$query = array(
'DELETE' => 'medal_def', // table name
'WHERE' => 'mID='.$_GET['id']
);
$forum_db->query_build($query);
}
require FORUM_ROOT.'header.php';
ob_start();
?>
Add a medal definition
|
Title |
Description |
|
'*',
'FROM' => 'medal_def',
'ORDER BY' => 'mID'
);
$res = $forum_db->query_build($query);
$results=0;
while ($row = $forum_db->fetch_assoc($res)){
$results++;
echo "\t\t\t\n";
echo "\t\t\t\t![](\"".FORUM_ROOT.$row['image']."\") | \n";
echo "\t\t\t\t".$row['title']." | \n";
echo "\t\t\t\t".$row['description']." | \n";
echo "\t\t\t\tDelete | \n";
echo "\t\t\t
\n";
}
if ($results==0){
echo "\t\t\t\n";
echo "\t\t\t\tNo medal definitions found | \n";
echo "\t\t\t
\n";
}
echo "\t\t
\n";
?>
', $tpl_temp, $tpl_main);
ob_end_clean();
require FORUM_ROOT.'footer.php';