API - Basic API calls

And your delete would look like the following:

```php
    function delete($category_id) {

        $sqlClause = create_SQL_clause(
            array(
                "cat_name" => $_REQUEST["name"],
                "cat_parent" => $_REQUEST["parent"],
                "theme" => $_REQUEST["theme"]
            )
        );

        $queryArray = array(TABLE_PREFIX, $category_id);

        api_backbone((object)array(
            "request_type" => HTTP_DELETE,
            "access_level" => ADMIN_ACCESS_LEVEL,
            "query" => "DELETE FROM %scourse_cats WHERE cat_id = %d",
            "queryArray"  => $queryArray,
            "queryIDExistence" => "SELECT COUNT(*) FROM %scourse_cats WHERE cat_id = %d",
            "queryIDExistenceArray" => $queryArray
        ));

        // If api_backbone failed then all of the bellow would not be executed
        // otherwise we do the logic

        // Changing course category parents
        queryDB("UPDATE %scourse_cats SET cat_parent = 0 WHERE cat_parent = %d",
            array(TABLE_PREFIX, $id));

        // Updating courses with this course category
        queryDB("UPDATE %scourses SET cat_id = 0 WHERE cat_id = %d",
            array(TABLE_PREFIX, $id));
        print_message(SUCCESS, ACTION_COMPLETED_SUCCESSFULLY, $log);
    }
```