Exemplo n.º 1
0
function getsubcats($cat_id)
{
    $database =& JFactory::getDBO();
    static $level = 0;
    $database->setQuery('SELECT cat_id, cat_name, cat_cats, cat_links, lft, rgt FROM #__mt_cats WHERE cat_parent = ' . $database->quote($cat_id) . ' ORDER BY lft');
    $cats = $database->loadObjectList();
    $level++;
    foreach ($cats as $cat) {
        printd($level, $cat->cat_name, $cat->cat_id, $cat->cat_links, $cat->cat_cats, $cat->lft, $cat->rgt);
        getsubcats($cat->cat_id);
    }
    $level--;
}
Exemplo n.º 2
0
                                echo "</tr>";
                                echo "<tr>";
                                echo "<td>" . $row[0] . "</td>";
                                echo "<td>" . $row[1] . "</td>";
                                echo "<td>" . $row[2] . "</td>";
                                echo "<td>" . $row[3] . "</td>";
                                echo "<td>" . $row[4] . "</td>";
                                echo "<td>" . $row[5] . "</td>";
                                echo "<td>" . $row[6] . "</td>";
                                echo "<td>" . $row[7] . "</td>";
                                echo "<td>" . $row[8] . "</td>";
                                echo "<td>" . $row[9] . "</td>";
                                echo "</tr>";
                                echo "</table>";
                            } else {
                                printd("There was an error: %s", $row[0]);
                            }
                            //echo $result;
                        } else {
                            echo "No records matching your query were found.";
                        }
                        mysqli_close($link);
                    } else {
                        echo "Unable to query database";
                    }
                    // Close connection
                }
            }
        }
    }
}
Exemplo n.º 3
0
function plog($text)
{
    // Print log.
    global $LOG_LAST;
    if ($LOG_LAST != $text) {
        printd($text);
        $LOG_LAST = $text;
    }
}
Exemplo n.º 4
0
                        if ($fileSize && $fileSize == $size) {
                            $file->set('sizeVerified', 1);
                        }
                    }
                    if ($error) {
                        if (file_exists($filePath) && $filePath != '') {
                            unlink($filePath);
                        }
                        printd("file failed: " . getDlFileErrorMsg($error) . "\n");
                    } else {
                        printd("file ok: {$size} byte\n");
                    }
                    $file->set('error', $error);
                    $file->set('size', $size);
                }
            } else {
                printd("ERROR: hoster plugin: no hosterExec() function\n");
            }
        } else {
            printd("ERROR: plugin not found: {$libThisHosterPath}\n");
        }
        if (!$file->get('stime')) {
            $file->set('stime', mktime());
        }
        $file->set('ftime', mktime());
        $file->save();
    } else {
        printd("ERROR: file not found\n");
    }
    printd("exit\n");
}