Example #1
0
function getFolderIcon($folid)
{
    return getIMG(urlf() . findNewestFile(applyIdToPath("files/foldericons/", $folid) . "-*", "images/folder_noicon.png"));
}
function updateThemes()
{
    global $_config;
    $result = sql_query("SELECT * FROM `themes`");
    // First, include the main stylesheet that defines the basic shapes of
    // the layout.
    $str = "";
    /*
    $str .= '<link href="'.urlf()."themes/style.css?1".
    	'" rel="stylesheet" type="text/css" media="screen, projection" />'."\n";
    */
    // Include the list of alternate stylesheets, so from the browsers such
    // as Firefox it will be possible to change the stylesheet on the fly.
    // The default theme is defined in the `config` table.
    while ($theData = mysql_fetch_assoc($result)) {
        $filename = "themes/theme-" . $theData["theName"] . ".css";
        $filetime = filemtime($filename);
        $str .= "\t" . '<link href="' . urlf() . $filename . '?' . $filetime . '" ' . 'rel="' . ($theData["theName"] != $_config["defaultTheme"] ? "alternate " : "") . 'stylesheet" title="' . $theData["theLongName"] . '" type="text/css" media="screen, projection" />' . "\n";
    }
    $fp = fopen(INCLUDES . "themes.inc", "w");
    fwrite($fp, $str);
    fclose($fp);
}
		try {
			var pageTracker = _gat._getTracker("UA-8845300-1");
			pageTracker._trackPageview();
		} catch(err) {}
	//]]></script>
	</body>
	</html>
	<?php 
    return;
}
?>
<div class="container2" id="idColorPicker" style="display: none">
	<a id="idColorPicker2" href="/">.</a>
</div>
<script src="<?php 
echo urlf();
?>
scripts/adcolors.js?1" type="text/javascript"></script>
<?php 
// -----------------------------------------------------------------------------
if (isset($_newUI)) {
    ?>
	<div class="ui2-layout-bg ui2-top"></div>
	<div class="ui2-layout-bg ui2-top-sidebar"></div>
	<div class="ui2-layout-bg ui2-top-yaoigal"></div>
	<?php 
    if ($_newUI == 1) {
        ?>
		<ul class="ui2-top-menu">
		<?php 
        if (isLoggedIn()) {
Example #4
0
    $time = strtotime($newData["newSubmitDate"]);
    $bold = time() - $time < 60 * 60 * 24 * 3;
    ?>
			<tr>
				<td class="nowrap" align="center" valign="top">
					<?php 
    echo $bold ? "<b>" : "";
    echo gmdate("M d", applyTimezone($time));
    ?>
					<?php 
    echo $bold ? "</b>" : "";
    ?>
</td>
				<td valign="top" align="center">
					<?php 
    echo $bold ? getIMG(urlf() . "images/emoticons/star.png") : "&middot;";
    ?>
</td>
				<td width="100%" valign="top">
					<?php 
    echo $bold ? "<b>" : "";
    ?>
<a href="<?php 
    echo url("news/" . $newData["newid"]);
    ?>
">
					<?php 
    echo $newData["newSubject"];
    ?>
</a><?php 
    echo $bold ? "</b>" : "";
Example #5
0
			</div>
			<?php 
    }
}
$result = sql_query("SELECT * FROM `objects` WHERE `objid` = '" . $cluData["cluFeaturedObj"] . "' AND `objDeleted` = '0' AND `objPending` = '0' {$whereMature} LIMIT 1");
if ($objData = mysql_fetch_assoc($result)) {
    ?>
		<div class="sep caption"><?php 
    echo _FEATURE;
    ?>
:</div>
		<div class="container2 a_center">
			<?php 
    if ($filename = findNewestFile(applyIdToPath("files/clubfeatures/", $cluData["cluFeaturedObj"]) . "-*", "")) {
        $objTitle = formatText($objData["objTitle"]) . ' <br />' . sprintf(_BY, getUserLink($objData["objCreator"]));
        echo '<div><a href="' . url("view/" . $objData["objid"]) . '">' . '<img alt="' . _ALT_IMAGE . '" class="thumb' . ($objData["objMature"] ? " mature" : "") . '" title="' . strip_tags(formatText($objData["objTitle"])) . '" src="' . urlf() . $filename . '" /></a></div>' . '<div class="sep">' . $objTitle . '</div>' . '<div class="hline">&nbsp;</div>' . '<div class="sep a_left">' . formatText($cluData["cluFeaturedDesc"]) . '</div>';
    }
    ?>
		</div>
		<?php 
}
?>

	<?php 
ob_start();
?>
	<div class="sep container2 a_center">
		<div>
			<form action="<?php 
echo url("clubgallery/" . $cluid);
?>
Example #6
0
if ($imageInfo[2] == 4 || $imageInfo[2] == 13) {
    echo getSWF($filename, 1, 150, 150);
} else {
    $width = round($imageInfo[0] * 0.25);
    $height = round($imageInfo[1] * 0.25);
    makeFloatingThumb("", url() . $filename, $imageInfo[0], $imageInfo[1], 0, false, $onmouseover, $onmouseout);
    echo getIMG(urlf() . $filename, 'style="width: ' . $width . 'px; height: ' . $height . 'px" ' . 'onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '"', true);
}
$script = "make_invisible('id_current'); " . "make_visible('id_hint'); " . "make_visible('id_choose'); " . "return false;";
?>
					&nbsp;<a href="" onclick="<?php 
echo $script;
?>
">
						<?php 
echo getIMG(urlf() . "images/emoticons/edit.png", "") . " " . _CHANGE;
?>
</a>
					&nbsp;<input type="checkbox" class="checkbox" name="removeId" id="idRemoveID" />
						<label for="idRemoveID"><?php 
echo _REMOVE;
?>
</label>
				</div>
				<div id="id_choose" style="display: none">
					<?php 
$script = "make_visible('id_preview_container'); " . "make_invisible('id_preview_hint'); " . "show_preview_image('id_preview', 'id_preview_message', this.value);";
?>
					<input accept="image/gif, image/jpeg, image/png" onchange="<?php 
echo $script;
?>
Example #7
0
function updateCustomTheme($useid, $isClub, $data, &$errors)
{
    $themePath = getCustomThemePath($useid, $isClub);
    forceFolders($themePath);
    $lastThemeFile = getLastCustomThemeFile($useid, $isClub);
    $err = !uploadSingleImage("logo", 0, 0, 51200, $fnLogo, $errors, $themePath);
    $err |= !uploadSingleImage("outer", 0, 0, 25600, $fnOuter, $errors, $themePath);
    $err |= !uploadSingleImage("container", 0, 0, 51200, $fnContainer, $errors, $themePath);
    $err |= !uploadSingleImage("container2", 0, 0, 25600, $fnContainer2, $errors, $themePath);
    if ($err) {
        return false;
    }
    $fileLogo = urlf() . findNewestFile($themePath . "logo-*.jpg");
    $fileOuter = urlf() . findNewestFile($themePath . "outer-*.jpg");
    $fileContainer = urlf() . findNewestFile($themePath . "container-*.jpg");
    $fileContainer2 = urlf() . findNewestFile($themePath . "container2-*.jpg");
    $pixLogo = PIX($fnLogo);
    $pixOuter = PIX($fnOuter);
    $pixContainer = PIX($fnContainer);
    $pixContainer2 = PIX($fnContainer2);
    $pix00Container = PIX($fnContainer, 0, 0);
    $avgLogo = AVG($fnLogo);
    $avgOuter = AVG($fnOuter);
    $avgContainer = AVG($fnContainer);
    $avgContainer2 = AVG($fnContainer2);
    $colors = array('{bBody}' => $pixLogo, '{bOuter}' => $pixOuter, '{bContainer}' => $pixContainer, '{bContainer2}' => $pixContainer2, '{bInput}' => BRIGHT($pixContainer2, 1.2), '{bInputHover}' => BRIGHT($pixContainer2, 1.5), '{bInputFocus}' => $pix00Container, '{bButton}' => BRIGHT($pixContainer2, 1.2), '{bButtonHover}' => BRIGHT($pixContainer2, 1.5), '{bTabActive}' => $pix00Container, '{bTabInactive}' => $pixOuter, '{bUI2Layout}' => $pixContainer2, '{cBody}' => BRIGHT(CONTRAST($avgLogo), 1.3), '{cOuter}' => BRIGHT(CONTRAST($avgOuter), 1.2), '{cContainer}' => BRIGHT(CONTRAST($avgContainer), 1.3), '{cContainer2}' => BRIGHT(CONTRAST($avgContainer2), 1.3), '{cOutline}' => BRIGHT(CONTRAST($avgContainer2), 1.3), '{cTabActive}' => CONTRAST($avgContainer), '{cTabInactive}' => CONTRAST($avgOuter), '{cInput}' => CONTRAST($avgContainer2), '{cLink}' => RICH(BRIGHT($pixContainer2, -2.5), 1.1), '{cLinkHover}' => RICH(BRIGHT($pixContainer2, -3), 1.1), '{cHeaderLink}' => RICH(BRIGHT($pixOuter, -2.5), 1.1), '{cHeaderLinkHover}' => RICH(BRIGHT($pixOuter, -3), 1.1), '{cMarkedText}' => BRIGHT(HARMONY($pixContainer2), 1.5), '{cTabOutline}' => BRIGHT(CONTRAST($avgContainer2), 1.3), '{cThumbBorder}' => BRIGHT(CONTRAST($avgContainer2), 1.3), '{cThumbBorderMature}' => RICH(BRIGHT($pixContainer2, -3), 1.1));
    if (tooClose($colors['{cLink}'], $colors['{cContainer2}'], 32)) {
        $colors['{cLink}'] = RICH(PIX($fnOuter), 2);
        $colors['{cLinkHover}'] = BRIGHT($colors['{cLink}'], 2.5);
    }
    if (tooClose($colors['{cContainer}'], $colors['{cMarkedText}'], 140)) {
        $colors['{cMarkedText}'] = BRIGHT(HARMONY(PIX($fnContainer2)), -1.3);
    }
    // Override auto-generated colors with POSTed colors.
    if (!isset($data["c"])) {
        $data["c"] = array();
    }
    $acceptedColors = array("cBody", "cOuter", "cContainer", "cContainer2", "cOutline", "cTabActive", "cTabInactive", "cInput", "cLink", "cLinkHover", "cHeaderLink", "cHeaderLinkHover", "cMarkedText", "cTabOutline", "cThumbBorder", "cThumbBorderMature", "sOutline", "sTitleMargin", "bButton", "bButtonHover", "bInput", "bInputFocus", "bUI2Layout");
    // Override some data from POST (if available)
    foreach ($acceptedColors as $c1) {
        if (isset($_POST[$c1]) && $_POST[$c1] != "") {
            $data["c"][$c1] = $_POST[$c1];
        }
    }
    foreach ($data["c"] as $key => $value) {
        if (preg_match('/^[0-9A-Fa-f]{3}$/', $value)) {
            $r = hexdec(substr($value, 0, 1)) * 17;
            $g = hexdec(substr($value, 1, 1)) * 17;
            $b = hexdec(substr($value, 2, 1)) * 17;
            $colors["{" . $key . "}"] = getColor($r, $g, $b);
        }
        if (preg_match('/^[0-9A-Fa-f]{6}$/', $value)) {
            $r = hexdec(substr($value, 0, 2));
            $g = hexdec(substr($value, 2, 2));
            $b = hexdec(substr($value, 4, 2));
            $colors["{" . $key . "}"] = getColor($r, $g, $b);
        }
    }
    $sOutline = 'border-width: 1px;';
    if (isset($data["c"]["sOutline"])) {
        switch ($data["c"]["sOutline"]) {
            case 2:
                $sOutline = 'border-width: 2px;';
                break;
            case 3:
                $sOutline = 'border-width: 2px; border-left: none; border-right: none;';
                break;
            case 4:
                $sOutline = 'border: none;';
                break;
        }
    }
    $sTitleMargin = 'padding-left: 0px;';
    if (isset($data["c"]["sTitleMargin"])) {
        $m = intval($data["c"]["sTitleMargin"]);
        $m = $m > 400 ? 400 : $m;
        $m = $m < 0 ? 0 : $m;
        $data["c"]["sTitleMargin"] = $m;
        $sTitleMargin = 'padding-left: ' . $m . 'px;';
    }
    $css = file_get_contents(INCLUDES . "p_themedesigner.css");
    $css = str_replace('{sOutline}', $sOutline, $css);
    $css = str_replace('{sTitleMargin}', $sTitleMargin, $css);
    $css = str_replace('{fileLogo}', $fileLogo, $css);
    $css = str_replace('{fileOuter}', $fileOuter, $css);
    $css = str_replace('{fileContainer}', $fileContainer, $css);
    $css = str_replace('{fileContainer2}', $fileContainer2, $css);
    foreach ($colors as $colorVar => $colorValue) {
        $css = str_replace($colorVar, getWebColor($colorValue), $css);
    }
    if (!isset($data["Tile"]) || isset($_POST["submitTheme"])) {
        $data["Tile"] = 0;
    }
    // Override some data from POST (if available)
    if (isset($_POST["BGLayoutTiledH"])) {
        $data["Tile"] |= 1;
    }
    if (isset($_POST["BGOuterTiledH"])) {
        $data["Tile"] |= 2;
    }
    if (isset($_POST["BGContainerTiledH"])) {
        $data["Tile"] |= 4;
    }
    if (isset($_POST["BGContainer2TiledH"])) {
        $data["Tile"] |= 8;
    }
    if (isset($_POST["BGLayoutTiledV"])) {
        $data["Tile"] |= 16;
    }
    if (isset($_POST["BGOuterTiledV"])) {
        $data["Tile"] |= 32;
    }
    if (isset($_POST["BGContainerTiledV"])) {
        $data["Tile"] |= 64;
    }
    if (isset($_POST["BGContainer2TiledV"])) {
        $data["Tile"] |= 128;
    }
    $css = str_replace('{layoutTiling}', getTiling($data["Tile"] & 1, $data["Tile"] & 16), $css);
    $css = str_replace('{outerTiling}', getTiling($data["Tile"] & 2, $data["Tile"] & 32), $css);
    $css = str_replace('{containerTiling}', getTiling($data["Tile"] & 4, $data["Tile"] & 64), $css);
    $css = str_replace('{container2Tiling}', getTiling($data["Tile"] & 8, $data["Tile"] & 128), $css);
    // Remove comments from the final CSS file.
    $css = preg_replace('/\\/\\*(.+?)\\*\\//', "", $css);
    if ($lastThemeFile != "") {
        $css_orig = file_get_contents($lastThemeFile);
    } else {
        $css_orig = "";
    }
    if ($css != $css_orig) {
        // Create new CSS file and delete the previous CSS file.
        $fp = fopen($themePath . "style-" . time() . ".css", "w");
        fwrite($fp, $css);
        fclose($fp);
        if ($lastThemeFile != "") {
            unlink($lastThemeFile);
        }
        // Store updated data to the database.
        $cusWhere = dbWhere(array("cusUser" => $useid, "cusIsClub" => $isClub));
        $result = sql_query("SELECT `cusid` FROM `customThemes`" . $cusWhere . "LIMIT 1");
        if (mysql_num_rows($result) == 0) {
            sql_query("INSERT INTO `customThemes`" . dbValues(array("cusUser" => $useid, "cusIsClub" => $isClub, "cusData" => serialize($data))));
        } else {
            sql_query("UPDATE `customThemes`" . dbSet(array("cusData" => serialize($data))) . $cusWhere . "LIMIT 1");
        }
        return true;
    } else {
        return false;
    }
}
Example #8
0
$fn2main .= " - " . trim(substr($objData["objTitle"], 0, 40));
$filename2 = $isExtras ? "" : ($_mod_rewrite ? htmlspecialchars("/" . preg_replace('/[^\\w\\s\'\\-\\!\\(\\)\\[\\]\\&]/', "", $fn2main) . "." . $objData["objExtension"]) : "");
// Gather submission's parameters.
$src = $isExtras ? $objData["objImageURL"] : urlf() . $filename . $filename2;
$src_orig = $src;
// will be used when the user clicks on the image
$title = formatText($objData["objTitle"]);
$width = $objData["objImageWidth"];
$height = $objData["objImageHeight"];
$containsAnimation = $isExtras ? false : $objData["objAniType"] != "no";
if ($isPreview) {
    if ($isExtras) {
        $src = $objData["objPreviewURL"];
    } else {
        $filename = applyIdToPath("files/preview/", $objData["objid"]) . "-" . preg_replace('/[^0-9]/', "", $objData["objLastEdit"]) . ".jpg";
        $src = urlf() . $filename . $filename2;
    }
    $width = $objData["objPreviewWidth"];
    $height = $objData["objPreviewHeight"];
    $objData["objExtension"] = "jpg";
}
if ($isExtras) {
    $objData["objExtension"] = substr($src, strlen($src) - 3);
}
if ($isPreview && isLoggedIn()) {
    // Supermoderator or admin can Reset edits.
    $urlHighQuality = url("view/" . ($isExtras ? "e" : "") . $objid, array("quality" => "high"));
    $script = "var el = get_by_id( 'idPreviewImage' ); " . "if( !el ) return false; " . "el.style.width = '" . $objData["objImageWidth"] . "px'; " . "el.style.height = '" . $objData["objImageHeight"] . "px'; " . "el.src = '" . str_replace("'", "\\'", $src_orig) . "'; " . "make_invisible( 'idViewInHQButton' ); " . "return false;";
    ?>
		<div class="mar_right mar_bottom button smalltext" id="idViewInHQButton"
			onclick="<?php 
Example #9
0
		</div>
		<?php 
}
$result = sql_query("SELECT * FROM `objects` " . "WHERE `objid` = '" . $useData["useFeaturedObj"] . "' " . "AND `objDeleted` = '0' AND `objPending` = '0' {$whereMature} LIMIT 1");
if ($objData = mysql_fetch_assoc($result)) {
    ?>
		<div class="caption">
			<?php 
    echo _FEATURE;
    ?>
:
		</div>
		<div class="container2 a_center mar_bottom">
			<?php 
    if ($filename = findNewestFile(applyIdToPath("files/features/", $useData["useid"]) . "-*", "")) {
        echo '<div><a href="' . url("view/" . $objData["objid"]) . '">' . '<img alt="' . strip_tags(formatText($objData["objTitle"])) . '" class="thumb' . ($objData["objMature"] ? " mature" : "") . '" title="' . strip_tags(formatText($objData["objTitle"])) . '" src="' . urlf() . $filename . '" /></a></div>' . '<div class="sep">' . formatText($objData["objTitle"]) . '</div>';
    }
    ?>
		</div>
		<?php 
}
ob_start();
$select = "SELECT `objects`.* FROM `objects` LEFT JOIN `clubs` ON(`objForClub` = `cluid`) ";
$where = "(`objForClub` = '0' OR `cluIsProject` = '0') " . "AND `objPending` = '0' AND `objDeleted` = '0' " . "AND `objCreator` = '" . $useData["useid"] . "' {$whereMature}";
$limit = 8;
unset($order);
$more = url("gallery/" . strtolower($useData["useUsername"]));
include INCLUDES . "mod_minigallery.php";
$objContents = ob_get_contents();
ob_end_clean();
if ($objectCount > 0) {
Example #10
0
<div class="clear">&nbsp;</div>

<div class="normaltext mar_bottom">
<?php 
if ($active == 1 || $active == 5) {
    if (isLoggedIn()) {
        $showFolders = isset($_GET["folders"]) ? intval($_GET["folders"]) : (isset($_COOKIE["yGalFolders"]) ? intval($_COOKIE["yGalFolders"]) : 1);
        setcookie("yGalFolders", $showFolders, strtotime("+9 years"), "/", "." . $_config["galRoot"]);
        ?>
		<div class="f_right" style="padding-top: 4px">
			<form action="<?php 
        echo url(".");
        ?>
" method="get">
				<?php 
        echo getIMG(urlf() . "images/emoticons/folder.png");
        ?>
				<select class="smalltext" name="folders" onchange="this.form.submit()">
					<option <?php 
        echo $showFolders == 0 ? 'selected="selected"' : "";
        ?>
						value="0"><?php 
        echo _SET_FOLDERS_OFF;
        ?>
</option>
					<option <?php 
        echo $showFolders == 1 ? 'selected="selected"' : "";
        ?>
						value="1"><?php 
        echo _SET_FOLDERS_ON;
        ?>
Example #11
0
        ?>
</a>
						</td>
					</tr>
					<?php 
    }
    ?>
				<tr>
					<td colspan="2">
						<div>
							<a href="<?php 
    echo url("folders/new");
    ?>
">
								<?php 
    echo getIMG(urlf() . "images/emoticons/new.png", "") . " " . _SET_FOLDER_CREATE;
    ?>
</a>
							<br />
						</div>
					</td>
				</tr>
			</table>
		</div>
		<?php 
    iefixEnd();
    ?>
		<?php 
}
?>
</div>
Example #12
0
    if ($togo < 0) {
        break;
    }
    $microId = generateId();
    $thumbId = generateId();
    $u = getUserData($objData["objCreator"]);
    $objTitle = formatText($objData["objTitle"]) . ' <br />';
    if ($objData["objCollab"] > 0) {
        $objTitle .= sprintf(_BY_AND, getUserLink($u["useid"]), getUserLink($objData["objCollab"]));
    } else {
        $objTitle .= sprintf(_BY, getUserLink($u["useid"]));
    }
    if ($objData["objThumbDefault"]) {
        $src = urlf() . "images/litthumb.png";
    } else {
        $src = urlf() . applyIdToPath("files/thumbs/", $objData["objid"]) . "-" . preg_replace('/[^0-9]/', "", $objData["objLastEdit"]) . ".jpg";
    }
    $url = url("view/" . $objData["objid"]);
    if ($limit > 1) {
        echo '<span id="' . $microId . '" ' . "onmouseover=\"open_tab(this,'{$tabsId}','{$thumbId}')\">" . '<a href="' . $url . '">' . '<img alt="' . _ALT_THUMB . '" class="microthumb' . ($objData["objMature"] ? " mature" : "") . ($objData["objPending"] ? " pending" : "") . ($objData["objDeleted"] ? " deleted" : "") . '" src="' . $src . '" title="' . strip_tags($objTitle) . '" />' . '</a></span>' . "\n";
    }
    $bigList .= '<div ' . ($first ? "" : 'style="display: none" ') . 'id="' . $thumbId . '">' . '<table align="center" border="0" cellpadding="0" cellspacing="0"><tr><td class="a_center v_middle pad_top" style="height: ' . $tableHeight . 'px">' . '<div style="width: ' . $tableWidth . 'px">' . '<a href="' . $url . '">' . '<img alt="' . strip_tags($objTitle) . '" class="thumb' . ($objData["objMature"] ? " mature" : "") . ($objData["objPending"] ? " pending" : "") . ($objData["objDeleted"] ? " deleted" : "") . '" src="' . $src . '" title="' . strip_tags($objTitle) . '" />' . '</a></div></td></tr></table>' . "\n" . '<table border="0" cellpadding="0" cellspacing="0" class="wide" style="height: 40px"><tr><td class="a_center v_middle">' . '<div>' . $objTitle . '</div>' . "\n" . '</td></tr></table></div>' . "\n";
    if ($first) {
        $first = false;
        $firstMicroId = $microId;
        $firstThumbId = $thumbId;
    }
    $objectCount++;
}
if (isset($more) && count($objList) > $limit) {
    ?>
Example #13
0
function oekakiViewAnimation($object)
{
    $appletWidth = 740;
    $appletHeight = 550;
    $imageURL = "";
    $query = "SELECT `objid`,`objSubmitDate`,`objLastEdit`,`objExtension`,`objImageWidth`,`objImageHeight`,`objFilename` FROM `objects`,`objExtData` WHERE `objEid` = `objid` AND `objid` = '" . intval($object) . "' AND `objAniType` <> 'no'" . (atLeastModerator() ? "" : " AND `objPending` = '0' AND `objDeleted` = '0'") . " LIMIT 1";
    $result = sql_query($query);
    if (!($objData = mysql_fetch_assoc($result))) {
        redirect(url("notfound"));
        return;
        // cannot edit this submission
    }
    $imageURL = applyIdToPath("files/data/", $objData["objid"]) . "-" . preg_replace('/[^0-9]/', "", $objData["objLastEdit"]) . "." . $objData["objExtension"];
    $editor = 0;
    switch ($objData["objFilename"]) {
        case "/oekaki/" . OEK_SHI:
            $editor = OEK_SHI;
            break;
        case "/oekaki/" . OEK_SHIPRO:
            $editor = OEK_SHIPRO;
            break;
        case "/oekaki/" . OEK_PAINTBBS:
            $editor = OEK_PAINTBBS;
            break;
        case "/oekaki/" . OEK_OEKAKIBBS:
            $editor = OEK_OEKAKIBBS;
            break;
    }
    switch ($editor) {
        case OEK_SHI:
        case OEK_SHIPRO:
            $appletArchive = url() . "scripts/oekaki/shipainter/PCHViewer.jar";
            $appletCode = "pch2.PCHViewer";
            $appletParams = array("speed" => 2, "image_width" => $objData["objImageWidth"], "image_height" => $objData["objImageHeight"], "pch_file" => preg_replace('/png$/', 'pch', urlf() . $imageURL), "res.zip" => "../scripts/oekaki/shipainter/res.zip", "tt.zip" => "../scripts/oekaki/shipainter/tt.zip", "run" => "true", "buffer_progress" => "true", "buffer_canvas" => "true", "color_icon" => "#eeeeee", "color_bar" => "#dddddd", "color_bar_select" => "#ffffff", "color_back" => "#eeeeee", "layer_count" => 5, "layer_max" => 8, "layer_last" => 2, "quality" => 1);
            break;
        case OEK_PAINTBBS:
            $appletArchive = url() . "scripts/oekaki/shipainter/PCHViewer.jar";
            $appletCode = "pch.PCHViewer";
            $appletParams = array("speed" => 2, "image_width" => $objData["objImageWidth"], "image_height" => $objData["objImageHeight"], "pch_file" => preg_replace('/png$/', 'pch', urlf() . $imageURL), "run" => "true", "buffer_progress" => "true", "buffer_canvas" => "true", "color_icon" => "#eeeeee", "color_bar" => "#dddddd", "color_bar_select" => "#ffffff", "color_back" => "#eeeeee");
            break;
        case OEK_OEKAKIBBS:
            $appletArchive = url() . "scripts/oekaki/shipainter/oekakibbs.jar";
            $appletCode = "a.p";
            $appletParams = array("popup" => 0, "anime" => 2, "readanm" => preg_replace('/png$/', 'oeb', basename($imageURL)), "readanmpath" => urlf() . dirname($imageURL) . "/", "picw" => $objData["objImageWidth"], "pich" => $objData["objImageHeight"], "baseC" => "888888", "brightC" => "aaaaaa", "darkC" => "666666", "backC" => "000000", "buffer_canvas" => "true");
            break;
        default:
            notice(_OEKAKI_UNKNOWN_EDITOR);
            return;
    }
    $params = "";
    foreach ($appletParams as $name => $value) {
        $params .= '<param name="' . $name . '" value="' . htmlspecialchars(strval($value)) . '" />' . "\n\t\t";
    }
    // Changed from embedded objects (which caused a "you need this plugin" message)
    // to browser detection
    ?>
	<div align="center">
	<?php 
    if (ereg("MSIE", $_SERVER["HTTP_USER_AGENT"]) && !ereg("Opera", $_SERVER["HTTP_USER_AGENT"])) {
        ?>
	<object
		classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
		codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,4"
		width="<?php 
        echo $appletWidth;
        ?>
" height="<?php 
        echo $appletHeight;
        ?>
" >
		<param name="code" value="<?php 
        echo $appletCode;
        ?>
" />
		<param name="archive" value="<?php 
        echo $appletArchive;
        ?>
" />
		<?php 
        echo $params;
        ?>
	</object>
	<?php 
    } else {
        ?>
	<object
		type="application/x-java-applet"
		classid="java:<?php 
        echo $appletCode;
        ?>
.class"
		archive="<?php 
        echo $appletArchive;
        ?>
"
		width="<?php 
        echo $appletWidth;
        ?>
" height="<?php 
        echo $appletHeight;
        ?>
">
		<?php 
        echo $params;
        ?>
		<?php 
        echo sprintf(_OEKAKI_NO_JAVA, 'http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;PartDetailId=jre-1.5.0_04-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg');
        ?>
	</object>
	<?php 
    }
    ?>
	<form action="<?php 
    echo url("view/" . $object);
    ?>
" method="get">
		<div class="sep">
			<button type="submit" class="submit">
				<?php 
    echo getIMG(url() . "images/emoticons/nav-prev.png");
    ?>
				<?php 
    echo _RETURN;
    ?>
			</button>
		</div>
	</form>
	</div>
	<?php 
}
Example #14
0
			<tr>
				<td align="right" class="nowrap"><?php 
    echo _SET_THEME;
    ?>
:</td>
				<td width="100%">
					<a href="<?php 
    echo url("clubthemedesigner/" . $cluid);
    ?>
">
						<span style="vertical-align: middle"><?php 
    echo _SET_DESIGN_CUSTOM_THEME;
    ?>
</span>
						<?php 
    echo getIMG(urlf() . "images/emoticons/nav-next.png", "");
    ?>
</a>
				</td>
			</tr>
			</table>
		</div>
		<?php 
    iefixEnd();
    ?>
		<?php 
    // ======================================================================================================
    // OPTIONS
    // ======================================================================================================
    ?>
		<?php 
Example #15
0
function showThumbnails($params)
{
    global $_config, $_cmd, $_auth;
    if (!isset($params["quickSearch"])) {
        $params["quickSearch"] = false;
    }
    if (!isset($params["isFavorites"])) {
        $params["isFavorites"] = false;
    }
    if (!isset($params["showDeleted"])) {
        $params["showDeleted"] = false;
    }
    if (!isset($params["countDisabled"])) {
        $params["countDisabled"] = false;
    }
    if (!isset($params["select"])) {
        $params["select"] = "SELECT * FROM `objects`";
    }
    if (!isset($params["where"])) {
        $params["where"] = "1";
    }
    if (!isset($params["having"])) {
        $params["having"] = "";
    }
    if (!isset($params["maxcols"])) {
        $params["maxcols"] = 4;
    }
    if (!isset($params["isExtras"])) {
        $params["isExtras"] = false;
    }
    if (!isset($params["disableFiltering"])) {
        $params["disableFiltering"] = false;
    }
    if (!isset($params["onDisplayFiltering"])) {
        $params["onDisplayFiltering"] = false;
    }
    if (!isset($params["sortById"])) {
        $params["sortById"] = "";
    }
    //if( !isset( $params[ "noMostFaved" ]))
    $params["noMostFaved"] = false;
    if (!isLoggedIn()) {
        if ($params["where"] == "1") {
            $params["where"] = "`objGuestAccess` = '1'";
        } else {
            $params["where"] = "(" . $params["where"] . ") AND `objGuestAccess` = '1'";
        }
    }
    // Define the sorting method. There are 5 sorting methods:
    //
    // 0 - newest first
    // 1 - oldest first
    // 2 - most viewed
    // 3 - most faved
    // 4 - random
    // 5 - relevant
    if (isset($params["order"])) {
        $order = $params["order"];
    } else {
        if ($_cmd[0] == "search") {
            $order = isset($_GET["order"]) ? intval($_GET["order"]) : (isset($_COOKIE["yGalOrder"]) ? intval($_COOKIE["yGalOrder"]) : 0);
        } else {
            $order = isset($_GET["order"]) ? intval($_GET["order"]) : (isset($_COOKIE["yGalOrderSearch"]) ? intval($_COOKIE["yGalOrderSearch"]) : 0);
        }
    }
    if ($params["noMostFaved"] && ($order == 2 || $order == 3)) {
        $order = 0;
    }
    if ($params["isExtras"] && $order == 2) {
        $order = 0;
    }
    // Disable sorting by favs and views for the searching engine because it's too slow :(
    if ($_cmd[0] == "search" && $order != 0 && $order != 1) {
        $order = 0;
    }
    $order1 = $order;
    // Disable sorting by popularity for favourites because it's too slow :(
    if ($_cmd[0] == "favourites" && $order1 != 0 && $order1 != 1) {
        $order1 = 0;
    }
    switch ($order1) {
        case 1:
            if ($params["sortById"]) {
                $orderString = "ORDER BY " . $params["sortById"];
            } else {
                $orderString = $params["isFavorites"] ? "ORDER BY `favSubmitDate`" : "ORDER BY `objSubmitDate`";
            }
            break;
        case 2:
            $orderString = "ORDER BY `objPopularity` DESC";
            /*
            $params[ "select" ] = str_replace(
            	"FROM `objects`",
            	"FROM `objects` USE INDEX(`objPopularity`)",
            	$params[ "select" ]);
            */
            break;
        default:
            if ($params["sortById"]) {
                $orderString = "ORDER BY " . $params["sortById"] . " DESC";
            } else {
                $orderString = $params["isFavorites"] ? "ORDER BY `favSubmitDate` DESC" : "ORDER BY `objSubmitDate` DESC";
            }
    }
    // Define the amount of thumbnails to show. The default value is 12.
    if (isset($params["limit"])) {
        $limit = $params["limit"];
    } else {
        $limit = isset($_GET["limit"]) ? intval($_GET["limit"]) : (isset($_COOKIE["yGalLimit"]) ? intval($_COOKIE["yGalLimit"]) : 12);
        if ($limit != 8 && $limit != 12 && $limit != 24 && $limit != 48) {
            $limit = 12;
        }
    }
    // All pages except the front page "remember" the new
    // sorting/limiting settings.
    if ($_cmd[0] != "") {
        if (!$params["noMostFaved"]) {
            if ($_cmd[0] == "search") {
                setcookie("yGalOrder", $order, strtotime("+9 years"), "/", "." . $_config["galRoot"]);
            } else {
                setcookie("yGalOrderSearch", $order, strtotime("+9 years"), "/", "." . $_config["galRoot"]);
            }
        }
        setcookie("yGalLimit", $limit, strtotime("+1 month"), "/", "." . $_config["galRoot"]);
    }
    // Define the current offset.
    $offset = isset($_GET["offset"]) ? intval($_GET["offset"]) : 0;
    if ($offset < 0) {
        $offset = 0;
    }
    if (!$params["disableFiltering"]) {
        // If the user isn't mature, hide mature submissions.
        applyObjFilters($params["where"]);
        if (isset($params["folderWhere"])) {
            applyObjFilters($params["folderWhere"]);
        }
        if (isset($params["folderCalcWhere"])) {
            applyObjFilters($params["folderCalcWhere"]);
        }
        if (!$params["showDeleted"]) {
            $params["where"] = "(" . $params["where"] . ") " . "AND `objDeleted` = '0' AND `objPending` = '0'";
            if (isset($params["folderWhere"])) {
                $params["folderWhere"] = "(" . $params["folderWhere"] . ") " . "AND `objDeleted` = '0' AND `objPending` = '0'";
            }
            if (isset($params["folderCalcWhere"])) {
                $params["folderCalcWhere"] = "(" . $params["folderCalcWhere"] . ") " . "AND `objDeleted` = '0' AND `objPending` = '0'";
            }
        }
    }
    $totalFolders = 0;
    $gallery = array();
    if (isset($params["folderParent"])) {
        $gallery[-1] = -1;
        $limit--;
    }
    if (isset($params["folderSelect"])) {
        $query = $params["folderSelect"] . " WHERE " . $params["folderWhere"] . " GROUP BY `folid` ORDER BY `folName` LIMIT {$offset}, {$limit}";
        $result = sql_query($query);
        while ($folData = mysql_fetch_assoc($result)) {
            $gallery[-$folData["folid"]] = $folData;
        }
        $query = $params["folderSelect"] . " WHERE " . $params["folderWhere"] . " GROUP BY `folid`";
        $result = sql_query($query);
        $totalFolders = mysql_num_rows($result);
        $offset -= $totalFolders;
    }
    // Query all the currently visible thumbnails and store the data in the
    // $gallery array.
    if ($params["countDisabled"]) {
        $selectCmd = $params["select"];
    } else {
        $selectCmd = preg_replace('/^SELECT/', "SELECT SQL_CALC_FOUND_ROWS", $params["select"]);
    }
    $tmpOffset = $offset < 0 ? 0 : $offset;
    $tmpLimit = $offset < 0 ? $limit + $offset : $limit;
    $limit1 = $limit;
    if ($params["countDisabled"]) {
        $limit1++;
    }
    $query = "{$selectCmd} WHERE " . $params["where"] . " " . $params["having"] . " {$orderString} LIMIT {$tmpOffset}, {$limit1}";
    /*
    if( $_auth[ "useid" ] == 7 )
    {
    	echo $query;
    }
    */
    $result = sql_query($query);
    while ($objData = mysql_fetch_assoc($result)) {
        $gallery[$objData["objid"]] = $objData;
    }
    // Calculate the total amount of submissions that's possible to browse
    // through with the current options.
    if ($params["countDisabled"]) {
        $totalCount = $offset + $limit;
        if (count($gallery) > $limit) {
            $totalCount++;
        }
    } else {
        $result = sql_query("SELECT FOUND_ROWS()");
        $totalCount = $totalFolders + mysql_result($result, 0);
    }
    // Generate the navigation bar.
    if ($_cmd[0] == "") {
        $galleryNavs = "";
    } else {
        iefixStart();
        ob_start();
        $tmpOffset = isset($_GET["offset"]) ? intval($_GET["offset"]) : 0;
        navControls($tmpOffset, $limit, $totalCount);
        ?>
		<div class="a_center">
			<?php 
        if ($params["quickSearch"]) {
            ?>
				<form action="<?php 
            echo url("search");
            ?>
" method="get">
				<?php 
            foreach ($_GET as $key => $value) {
                if ($key != "keywordList" && $key != "offset") {
                    echo '<input name="' . htmlspecialchars($key) . '" type="hidden" value="' . htmlspecialchars($value) . '" />';
                }
            }
            ?>
				<select name="keywordList" onchange="this.form.submit();">
				<option value=""></option>
				<option value=""><?php 
            echo _SEARCH;
            ?>
</option>
				<?php 
            // By default, select the first root keyword group.
            $result = sql_query("SELECT `keyid` FROM `keywords` " . "WHERE `keySubcat` = '0' ORDER BY `keyWord` LIMIT 1");
            if (mysql_num_rows($result)) {
                $mainSubcat = mysql_result($result, 0);
            } else {
                $mainSubcat = 0;
            }
            if (isset($_GET["keywordList"])) {
                // If it's already a search request then see what keyword groups are
                // involved in the search and allow selection of siblings inside
                // those groups.
                $list = preg_split('/\\s/', $_GET["keywordList"], -1, PREG_SPLIT_NO_EMPTY);
            } else {
                $list = array($mainSubcat);
            }
            $first1 = true;
            $where1 = "`keyid` IN(";
            foreach ($list as $keyid) {
                $keyid = intval($keyid);
                if ($keyid == 0) {
                    continue;
                }
                $result = sql_query("SELECT `keySubcat` FROM `keywords` " . "WHERE `keyid` = '{$keyid}' LIMIT 1");
                if (mysql_num_rows($result) > 0) {
                    $keySubcat = mysql_result($result, 0);
                    $where1 .= ($first1 ? "" : ",") . "'{$keySubcat}'";
                    $first1 = false;
                }
            }
            if ($mainSubcat > 0) {
                $where1 .= ($first1 ? "" : ",") . "'{$mainSubcat}'";
            }
            $where1 .= ")";
            $limit1 = 5;
            $result = sql_query("SELECT `keyid`,`keyWord` FROM `keywords` " . "WHERE {$where1} ORDER BY `keyWord` LIMIT {$limit1}");
            while ($keyData = mysql_fetch_assoc($result)) {
                $keyData["keyWord"] = trim(preg_replace('/^.*\\|/', "", $keyData["keyWord"]));
                if (preg_match('/\\@$/', $keyData["keyWord"])) {
                    continue;
                }
                ?>
					<optgroup label="<?php 
                echo $keyData["keyWord"];
                ?>
">
					<?php 
                $result2 = sql_query("SELECT * FROM `keywords` " . "WHERE `keySubcat` = '" . $keyData["keyid"] . "' ORDER BY `keyWord`");
                while ($rowData = mysql_fetch_assoc($result2)) {
                    $rowData["keyWord"] = trim(preg_replace('/^.*\\|/', "", $rowData["keyWord"]));
                    if (preg_match('/\\@$/', $rowData["keyWord"])) {
                        continue;
                    }
                    ?>
						<option <?php 
                    echo isset($_GET["keywordList"]) && $_GET["keywordList"] == $rowData["keyid"] ? 'selected="selected"' : "";
                    ?>
							value="<?php 
                    echo $rowData["keyid"];
                    ?>
"><?php 
                    echo htmlspecialchars($rowData["keyWord"]);
                    ?>
</option>
						<?php 
                }
                ?>
					</optgroup>
					<?php 
            }
            ?>
				</select>
				</form>
				&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
				<?php 
        }
        ?>
			<form action="<?php 
        echo url(".");
        ?>
" method="get">
			<?php 
        foreach ($_GET as $key => $value) {
            if ($key != "order" && $key != "limit" && $key != "offset") {
                echo '<input name="' . htmlspecialchars($key) . '" type="hidden" value="' . htmlspecialchars($value) . '" />';
            }
        }
        ?>
			<select name="order">
				<option <?php 
        echo $order == 0 ? 'selected="selected"' : "";
        ?>
 value="0"><?php 
        echo _NEWEST_FIRST;
        ?>
</option>
				<option <?php 
        echo $order == 1 ? 'selected="selected"' : "";
        ?>
 value="1"><?php 
        echo _OLDEST_FIRST;
        ?>
</option>
				<?php 
        if ($_cmd[0] != "search" && $_cmd[0] != "favourites") {
            if (!$params["noMostFaved"]) {
                if (!$params["isExtras"]) {
                    ?>
							<option <?php 
                    echo $order == 2 ? 'selected="selected"' : "";
                    ?>
 value="2"><?php 
                    echo _CLUB_POPULAR;
                    ?>
</option>
							<?php 
                }
                /*
                ?>
                <option <?= $order == 3 ? 'selected="selected"' : "" ?> value="3"><?=_MOST_VIEWED ?></option>
                <?
                */
            }
            /*
            ?>
            <!--<option <?= $order == 4 ? 'selected="selected"' : "" ?> value="4"><?=_RANDOM ?></option>-->
            <?
            
            if( $_cmd[ 0 ] == "search" )
            {
            	?>
            	<option <?= $order == 5 ? 'selected="selected"' : "" ?> value="5"><?=_SEARCH_RELEVANT ?></option>
            	<?
            }
            */
        }
        ?>
			</select>
			<?php 
        $tmpLimit = $limit;
        if (isset($params["folderParent"])) {
            $tmpLimit++;
        }
        ?>
			<select name="limit">
				<option <?php 
        echo $tmpLimit == 8 ? 'selected="selected"' : "";
        ?>
 value="8"><?php 
        echo fuzzy_number(8);
        ?>
</option>
				<option <?php 
        echo $tmpLimit == 12 ? 'selected="selected"' : "";
        ?>
 value="12"><?php 
        echo fuzzy_number(12);
        ?>
</option>
				<option <?php 
        echo $tmpLimit == 24 ? 'selected="selected"' : "";
        ?>
 value="24"><?php 
        echo fuzzy_number(24);
        ?>
</option>
				<option <?php 
        echo $tmpLimit == 48 ? 'selected="selected"' : "";
        ?>
 value="48"><?php 
        echo fuzzy_number(48);
        ?>
</option>
			</select>

			<input class="submit" type="submit" value="<?php 
        echo _UPDATE;
        ?>
"
				style="vertical-align: middle" />

			</form>
		</div>
		<?php 
        $galleryNavs = ob_get_contents();
        ob_end_flush();
        ?>
		<div class="hline">&nbsp;</div>
		<?php 
        iefixEnd();
    }
    $cols = 0;
    $imagesToGo = $limit;
    if (isset($params["folderParent"])) {
        $imagesToGo++;
    }
    $useids = array();
    foreach ($gallery as $objData) {
        if (isset($objData["objCreator"])) {
            $useids[] = $objData["objCreator"];
        }
    }
    prefetchUserData(array_unique($useids));
    if ($params["onDisplayFiltering"]) {
        // Prepare user filters array (used below).
        $useFilters = preg_split('/[^0-9]/', $_auth["useObjFilters"], 63, PREG_SPLIT_NO_EMPTY);
    }
    foreach ($gallery as $objid => $objData) {
        if ($objid < 0) {
            // Show a folder icon.
            ?>
			<div class="gallery_col">
				<div class="a_center padded mar_bottom<?php 
            echo $cols < 3 ? " mar_right" : "";
            ?>
">
					<?php 
            if (isset($params["folderParent"])) {
                $url = url(($params["isExtras"] ? "extras" : "gallery") . "/" . strtolower($params["folderParent"]["useUsername"]));
                ?>
						<div style="padding-top: 35px;">
							<a href="<?php 
                echo $url;
                ?>
">
								<?php 
                echo getIMG(urlf() . "images/folder_up.png");
                ?>
<br />
								<b><?php 
                echo _SET_FOLDER_BACK;
                ?>
</b>
							</a>
						</div>
						<?php 
            } else {
                $url = url(($params["isExtras"] ? "extras" : "gallery") . "/" . strtolower($params["folderCreator"]["useUsername"]) . "/" . $objData["folIdent"]);
                ?>
						<div style="background: url(<?php 
                echo urlf() . "images/folder.png";
                ?>
) center top no-repeat; height: 140px;">
							<div style="padding-top: 35px">
								<a href="<?php 
                echo $url;
                ?>
"><?php 
                echo getFolderIcon($objData["folid"]);
                ?>
</a>
							</div>
						</div>
						<div>
							<b><a href="<?php 
                echo $url;
                ?>
"><?php 
                echo formatText($objData["folName"], false, true);
                ?>
</a></b>
						</div>
						<?php 
                if (isset($params["folderCalcWhere"])) {
                    $query = $params["folderCalc"] . " WHERE " . $params["folderCalcWhere"] . " AND `objFolder` = '" . $objData["folid"] . "'";
                    $result = sql_query($query);
                    echo "( " . fuzzy_number(mysql_result($result, 0)) . " )";
                }
            }
            ?>
				</div>
			</div>
			<?php 
        } else {
            // Show a thumbnail.
            if ($params["onDisplayFiltering"]) {
                // Check objDeleted, objPending, objMature manually.
                if ($objData["objDeleted"] || $objData["objPending"]) {
                    continue;
                    // Don't show deleted/pending
                }
                if (count($useFilters) > 0) {
                    $objFilters = preg_split('/[^0-9]/', $objData["objMature"], 63, PREG_SPLIT_NO_EMPTY);
                    $isFiltered = false;
                    foreach ($objFilters as $filter) {
                        if (in_array($filter, $useFilters)) {
                            $isFiltered = true;
                            break;
                        }
                    }
                    if ($isFiltered) {
                        continue;
                        // Don't show filtered objects
                    }
                }
            }
            $anchor = url("view/" . ($params["isExtras"] ? "e" : "") . $objData["objid"]);
            if ($params["isExtras"]) {
                $src = $objData["objThumbURL"];
            } elseif ($objData["objThumbDefault"]) {
                $src = urlf() . "images/litthumb.png";
            } else {
                $src = urlf() . applyIdToPath("files/thumbs/", $objData["objid"]) . "-" . preg_replace('/[^0-9]/', "", $objData["objLastEdit"]) . ".jpg";
            }
            $objTitle = formatText($objData["objTitle"]);
            // Do not display "by <artist_name>" in /gallery and /galleryclubs.
            if ($_cmd[0] != "gallery" && $_cmd[0] != "galleryclubs" && $_cmd[0] != "extras") {
                $objTitle .= "<br /> ";
                if ($objData["objCollab"] > 0) {
                    $objTitle .= sprintf(_BY_AND, getUserLink($objData["objCreator"]), getUserLink($objData["objCollab"]));
                } else {
                    $objTitle .= sprintf(_BY, getUserLink($objData["objCreator"]));
                }
            } else {
                if ($objData["objCollab"] > 0) {
                    $objTitle .= " <br />" . sprintf(_BY_COLLAB_WITH, getUserLink($objData["objCollab"]));
                }
            }
            if ($objData["objForUser"] > 0 && $_cmd[0] != "gifts") {
                $objTitle .= " <br />" . sprintf(_FOR, getUserLink($objData["objForUser"]));
            }
            // Display "in <club_name>" in /gallery and /galleryclubs if the
            // work is submitted to a club.
            if ($_cmd[0] == "galleryclubs" || $_cmd[0] == "gallery" && $objData["objForClub"] > 0) {
                $result = sql_query("SELECT `cluName` FROM `clubs` " . "WHERE `cluid` = '" . $objData["objForClub"] . "'");
                if (mysql_num_rows($result) > 0) {
                    $club = '<a href="' . url("club/" . $objData["objForClub"]) . '">' . mysql_result($result, 0) . '</a>';
                    $objTitle .= '<br /> ' . sprintf(_IN, $club);
                }
            }
            ?>
			<div class="gallery_col">
				<div class="a_center padded mar_bottom<?php 
            echo $cols < 3 ? " mar_right" : "";
            ?>
">
					<a href="<?php 
            echo $anchor;
            ?>
">
						<?php 
            echo getIMG($src, 'alt="' . strip_tags($objTitle) . '" class="thumb' . ($objData["objMature"] && isLoggedIn() ? " mature" : "") . ($objData["objPending"] ? " pending" : "") . ($objData["objDeleted"] ? " deleted" : "") . '" width="' . $objData["objThumbWidth"] . '" height="' . $objData["objThumbHeight"] . '" title="' . strip_tags($objTitle) . '"');
            ?>
</a>
					<div><?php 
            echo $objTitle;
            ?>
</div>
				</div>
			</div>
			<?php 
        }
        $cols++;
        if ($cols >= $params["maxcols"]) {
            $cols = 0;
            ?>
			<div class="clear">&nbsp;</div>
			<?php 
        }
        $imagesToGo--;
        if ($imagesToGo <= 0) {
            break;
        }
    }
    if (count($gallery) == 0) {
        ?>
		<div><?php 
        echo _NO_SUBMISSIONS;
        ?>
</div>
		<?php 
    }
    if ($_cmd[0] != "" || $params["limit"] == 12) {
        ?>
		<div class="hline">&nbsp;</div>
		<?php 
    }
    // On the front page also show the "More >" link which leads to the
    // global gallery browsing.
    if ($_cmd[0] == "" && $params["limit"] == 12) {
        ?>
		<div class="a_right mar_bottom mar_right">
			<a class="disable_wrapping smalltext" href="<?php 
        echo url("browse");
        ?>
">
			<?php 
        echo _MORE;
        ?>
			<?php 
        echo getIMG(url() . "images/emoticons/nav-next.png");
        ?>
			</a>
		</div>
		<?php 
    }
    echo $galleryNavs;
    ?>
	<div class="clear">&nbsp;</div>
	<?php 
}