예제 #1
0
파일: resource_view.php 프로젝트: ztobs/wsf
$content = $rr->get($href);
$title = $content->title;
$parent_title = $content->parent_path;
$extracted_title = substr($title, strlen($parent_title) + 1);
$author = $content->author_username;
$created_time = date('M d Y h:i:s A', (int) $content->created_time);
$last_updated_user = $content->last_updated_username;
$last_updated_time = date('M d Y h:i:s A', (int) strtotime($content->updated));
$subtitle = $content->subtitle;
$avg_ratings = $rr->getAverageRating($href);
if ($username !== NULL && !empty($username)) {
    $user_ratings = $rr->getUserRating($href, $username);
} else {
    $user_ratings = 0;
}
$tags_array = $rr->getTags($href);
$tags = "";
foreach ($tags_array as $tag) {
    $tag_html = "<a href=\"tag_search.php?tag={$tag}\">{$tag}</a>";
    $tags .= $tag_html . " ";
}
$properties = $content->properties;
$src = $properties["src"];
$demo = $properties["demo"];
$download = $properties["download"];
$service = $properties["service"];
$custom_properties = array();
$docs = array();
if ($properties != NULL && is_array($properties)) {
    foreach ($properties as $key => $value) {
        if ("doc" == substr($key, 0, 3)) {
예제 #2
0
파일: tag_search.php 프로젝트: ztobs/wsf
        $content = $rr->get($extracted_href);
        if (strstr($extracted_href, $parent_title) === FALSE) {
            continue;
        }
        $extracted_title = substr($title, strlen($parent_title) + 1);
        if (strlen($extracted_title) == 0) {
            continue;
        }
        $resources[$i] = array();
        $resources[$i]["title"] = $extracted_title;
        $resources[$i]["path"] = $title;
        $resources[$i]["author"] = $content->author_username;
        $resources[$i]["subtitle"] = $content->subtitle;
        $ratings = $rr->getAverageRating($extracted_href);
        $resources[$i]["ratings"] = $ratings;
        $tags_array = $rr->getTags($extracted_href);
        $tags = "";
        foreach ($tags_array as $tagx) {
            $tag_html = "<a href=\"tag_search.php?tag={$tagx}\">{$tagx}</a>";
            $tags .= $tag_html . " ";
        }
        $resources[$i]["tags"] = $tags;
        $i++;
    }
}
$properties = $contents->properties;
if (is_array($properties)) {
    $demo = $properties["demo"];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">