TOPDDL Reloaded Relased!

Status
Not open for further replies.

Bread

Active Member
192
2009
5
0
TOPDDL v2 is a project I've been working on for a long period of time. I have put a lot of effort into it, and I hope you guys like it :D

Download:

http://topddl.net

Installation:

Simply navigate to /installer.php
And CHMOD connect.php to 777

And follow the instructions. :D

Features:

Admincp (Demo - http://topddl.net/demo/admincp/index.php)

User: PSPMafia
Pass: test
------------------------
Pagination
Unique Site Ranking System
Download Rating System
Site Login and Submit Area.
And Much much more :D


Please check it out and review :D

-Bread

Note:

The homepage of topddl.net looks like v1, don't be turned off didn't have time to release a home page with topddl as i'm going on vacation till sunday. :)

Also, if there are any questions ask em now while i'm still here :D
 
49 comments
Right now you have to manually add / remove them via phpmyadmin if you'd like I'll code up a category addon for ya tbh, I completely forgot to code that haha.
 
Add this to the end of funcs.php

Code:
function addCat() {
    $name = htmlentities(mysql_real_escape_string($_POST['name']));
    
    mysql_query("INSERT INTO categories (name) VALUES ('$name')");
    
    echo "Category Successfully Added.";
}
function editCat() {
    $id = htmlentities(mysql_real_escape_string($_GET['id']));
    $name = htmlentities(mysql_real_escape_string($_POST['name']));
    
    mysql_query("UPDATE categories SET name='$name' WHERE id='$id'");
    
    echo "Category Successfully Editted.";
}

function deleteCat(){
    $id = htmlentities(mysql_real_escape_string($_GET['id']));
    mysql_query("DELETE FROM categories WHERE id='$id'") 
or die(mysql_error());  
}



function listCat(){
    $do = htmlentities(mysql_real_escape_string($_GET['do']));

    $sql = mysql_query("SELECT * FROM categories");
    echo "<br />
        
    <table>
    <th>Name</th><tr><td>";
    while($row = mysql_fetch_array($sql)){
    
        echo "<form action='?do=editCat&id=" . $row['id'] . "'  method='post'>
        <input name='id' value='" . $row['id'] . "' type='hidden'>
        <input name='name' value='" . $row['name'] . "'><a href='?do=deleteCat&id=". $row['id'] ."'>Delete</a>";
    echo "<input type='submit' value='Go!'><br /></form>";
    }
    echo "</td></tr></table>";
    
    echo "<br />Add a Category.";
    echo "<form action='?do=addCat' METHOD='post'>
    <input type='text' name='name'>
    <input type='submit' value='Go!'>
    </form>";
}
Look for:
Code:
        if($do == "listDownloads") {
            listDownloads();
        }
Then Add the following Code after previous segment:

Code:
        if($do == "listCat") {
            listCat();
        }    
        if($do == "editCat") {
            editCat();
        }    
        if($do == "addCat") {
            addCat();
        }    
        if($do == "deleteCat") {
            deleteCat();
        }

Also add a link in the acp navbar:


Look for:
Code:
    echo '<a href="?do=logout">Log Out</a>';

Add above:

Code:
    echo '<a href="?do=listCat">Categories</a> |';

-Bread
 
Status
Not open for further replies.
Back
Top