예제 #1
0
    $count = str_replace("(", "", $count);
    $count = str_replace(")", "", $count);
    // FOTKY
    $galerie_html = $html->find(".photos .content ul", 0);
    if ($count + $step - 1 >= $page * $step) {
        foreach ($galerie_html->find("li .photo") as $fotka) {
            $i++;
            preg_match("#url\\('(.+?)'\\)#si", $fotka, $match);
            $fotky[$i]['url'] = $match[1];
        }
    } else {
        $while = false;
    }
}
// XML WRITE
xmlHeader();
?>

<galerie>
  <id><?php 
echo $id;
?>
</id>
  <fotky>
<?php 
foreach ($fotky as $fotka) {
    ?>
    <fotka><?php 
    echo $fotka['url'];
    ?>
</fotka>
예제 #2
0
파일: orgile.php 프로젝트: r00tjimmy/orgile
function sectionPage($section)
{
    switch (dropDash($section)) {
        // -----[ DEFAULT ]-----
        // If nothing is defined below.
        default:
            $date = date('c');
            $author = SITEAUTHOR;
            $description = $section;
            // -----[ DEFINE SECTION LANDING META INFO ]-----
            // This allows for each landing page for the section to carry HTML meta data. Good for SEO of course.
            if ($section == 'articles') {
                $title = 'Some articles.';
                $description = 'Some articles.';
            }
            // Create HTML header.
            $htmlHeader = htmlHeader($date, $author, $description, $description, dropDash($section));
            // Starts the object buffer.
            ob_start();
            pageHeader();
            print '<div id="columnX">';
            fetchSome($section, 'abstract', '0', 'sort');
            // See funtion below.
            print '</div>';
            print '<div id="columnY">';
            print '<aside>';
            print '<div class="content">';
            print '<h2><a href="/' . spaceDash($section) . '/" title="' . spaceDash($section) . '">' . spaceDash($section) . '</a>:</h2>';
            print '<ul class="side">';
            fetchSome($section, 'list', '0', 'sort');
            // See function below.
            print '</ul><br>';
            print '</div>' . sideContent();
            print '</aside>';
            print '</div>';
            pageFooter();
            // End the object buffer.
            $content = ob_get_contents();
            ob_end_clean();
            $content = $htmlHeader . $content;
            print $content;
            break;
            // -----[ FEED ]-----
            // Layout define for the "/feed/".
            // Do enclose case 'example' or PHP will interpret them as constants.
        // -----[ FEED ]-----
        // Layout define for the "/feed/".
        // Do enclose case 'example' or PHP will interpret them as constants.
        case 'feed':
            $title = SITETITLE;
            $subtitle = SITESUBTITLE;
            $date = date('c');
            $xmlLink = 'http://' . SITEURL . '/feed/';
            $guid = 'a5dddb5c-83af-40d8-9d8a-406134db9ba7';
            // Create your own http://www.guidgenerator.com/
            // Create XML header.
            $xmlHeader = xmlHeader($title, $subtitle, $xmlLink, $guid, $date);
            // Starts the object buffer.
            ob_start();
            fetchSome('articles', 'feed', '100', 'sort');
            print '</feed>';
            // End the object buffer.
            $content = ob_get_contents();
            ob_end_clean();
            $content = $xmlHeader . $content;
            print $content;
            break;
    }
    // End: "switch()".
}
예제 #3
0
function generateXml($id)
{
    $xml = xmlHeader($id);
    $xml .= baseDataXml();
    $xml .= projectDetailsXml();
    $xml .= xmlFooter();
    return $xml;
}