Esempio n. 1
0
                _set_users("add", $userid, $groupid);
                break;
            case ' DELETE ':
                _page_sechead("exhibit.png", "User Management");
                _set_users("delete", $userid, $groupid);
                break;
            default:
                _page_sechead("exhibit.png", "User Management");
                break;
        }
        _display_users();
        break;
    case 'rolls':
    default:
        $roll = $_REQUEST['roll'];
        $library = $_REQUEST['library'];
        $public = $_REQUEST['public'];
        $group = $_REQUEST['group'];
        if (!isset($roll) and !isset($library)) {
            _page_sechead("exhibit.png", "Roll Management");
            _display_permissions();
        } elseif (isset($public) and isset($group)) {
            _page_sechead("exhibit.png", "Roll Management");
            _set_permissions($roll, $library, $public, $group);
        } else {
            _page_sechead("error.png", "An error occurred updating permissions.");
            _display_permissions();
        }
        break;
}
_page_footer();
Esempio n. 2
0
function _display_search($image_query, $search_text)
{
    global $__dbc;
    global $number_of_columns;
    global $image_src;
    global $rating;
    global $table_format;
    $images = __query($image_query, "", "");
    echo mysql_info($__dbc);
    _page_sechead("search.png", "Search Results For: " . $search_text . ".  " . mysql_num_rows($images) . " images found.");
    echo $table_format;
    while ($row = mysql_fetch_array($images)) {
        $image_thumb = $row['iPhotoLibraryID'] . $row["GUID"] . 'T.' . _find_file_extension($row["ThumbPath"]);
        $image_full = $row['iPhotoLibraryID'] . $row["GUID"] . "." . _find_file_extension($row["ImagePath"]);
        $image_slimbox_caption = "Keywords: ";
        $keyword_query = "SELECT exhibit_Keywords.Keyword AS Keyword FROM " . "exhibit_Keywords LEFT JOIN " . "exhibit_ImageKeywords ON (exhibit_Keywords.iPhotoLibraryID = " . "exhibit_ImageKeywords.iPhotoLibraryID AND exhibit_Keywords.KeywordID" . "=exhibit_ImageKeywords.KeywordID) WHERE " . "exhibit_ImageKeywords.iPhotoLibraryID=" . $row["iPhotoLibraryID"] . " AND exhibit_ImageKeywords.ImageID=" . $row["ImageID"];
        $image_keywords = __query($keyword_query, "", "");
        while ($keyword_row = mysql_fetch_array($image_keywords)) {
            $image_slimbox_caption .= $keyword_row["Keyword"] . ", ";
        }
        $image_slimbox_caption = rtrim($image_slimbox_caption, ", ") . "<br />";
        if ($row["Comment"] != "") {
            $image_slimbox_caption .= "Comments: " . $row["Comment"] . "<br />";
        }
        $image_slimbox_caption .= "Date: " . $row["OriginalDate"] . "<br />";
        $image_slimbox_caption .= $rating[$row["Rating"]] . "<br />";
        $image_slimbox_caption .= "&lt;a href=&quot;" . $image_src . $image_full . "&quot;&gt;";
        if ($row["MediaType"] == "Image") {
            $image_slimbox_caption .= "(See Full-sized Image)&lt;/a&gt;";
        } else {
            $image_slimbox_caption .= "(See Video)&lt;/a&gt;";
        }
        $process_results[] = array("<a href=\"" . $image_src . $image_thumb . "\" rel=\"lightbox[" . $roll_name[0] . "]\" title=\"" . $image_slimbox_caption . "\"><img border=\"0\" class=\"exhibit\" " . "src=\"" . $image_src . $image_thumb . "\" /></a>", "<span class=\"exhibitcontent\">" . $row["Comment"] . "</span>", "<span class=\"exhibitcontent\">" . $row["OriginalDate"] . "</span>", "<span class=\"exhibitcontent\">" . $rating[$row["Rating"]] . "</span>");
        if (count($process_results) == $number_of_columns) {
            _print_row($process_results);
            unset($process_results);
            $process_results = array();
        }
    }
    if (count($process_results) != 0) {
        _print_row($process_results);
    }
    echo "\n\t\t\t\t\t</table>\n";
}