コード例 #1
0
ファイル: opml2html.php プロジェクト: gregoryfu/opml2html
function displayChildrenRecursive($xmlObj, $depth = 0)
{
    if (count($xmlObj->children()) > 0) {
        echo str_repeat("\t", $depth);
        echo "<ul>\n";
    }
    foreach ($xmlObj->children() as $child) {
        echo str_repeat("\t", $depth + 1);
        echo "<li>{$child['text']}</li>\n";
        displayChildrenRecursive($child, $depth + 1);
    }
    if (count($xmlObj->children()) > 0) {
        echo str_repeat("\t", $depth);
        echo "</ul>\n";
    }
}
コード例 #2
0
ファイル: functions.php プロジェクト: Scraps-Git/PingPong
function displayChildrenRecursive($xmlObj, $base, $depth = 0)
{
    foreach ($xmlObj->children() as $child) {
        if ($child->getName() == "PlanViewer") {
            if ($code = Cping($child)) {
                $names[$depth] = $child;
                $codes[$depth] = $code;
                $temp = $names[$depth];
                $temp2 = $codes[$depth];
                //$index = $count;
                InsertDB($base, $temp, $temp2);
            }
        }
        displayChildrenRecursive($child, $base, $depth + 1);
    }
}
コード例 #3
0
ファイル: index.php プロジェクト: Scraps-Git/PingPong
//require_once ("support/http.php");
//require_once ("support/web_browser.php");
//require_once ("support/simple_html_dom.php");
if (isset($_POST['probe'])) {
    $conn = ConnectDB();
    ProbeEntry($conn);
}
if (isset($_POST['Update_ifps'])) {
    $url = "http://public.khov.com/Syndication/BHI/XML/ALLKHOVNANIAN.xml";
    $rawDat = file_get_contents($url);
    $sitemap = new SimpleXMLElement($rawDat);
    $comm = ConnectDB();
    $sql = "TRUNCATE TABLE KHovFeed.ifps_db";
    $comm->query($sql);
    $text = ConnectDB();
    displayChildrenRecursive($sitemap, $text);
}
if (isset($_POST['Update_isps'])) {
    $url = "http://public.khov.com/Syndication/BHI/XML/ALLKHOVNANIAN.xml";
    $rawDat = file_get_contents($url);
    $sitemap = new SimpleXMLElement($rawDat);
    $comm = ConnectDB();
    $sql = "TRUNCATE TABLE KHovFeed.isps_db";
    $comm->query($sql);
    $text = ConnectDB();
    ParSteChildrenRecursive($sitemap, $text);
}
if (isset($_POST['Update_nf'])) {
    VrDbFloors();
}
if (isset($_POST['clean_cbhm'])) {