function __showUpdatesTab($id, $icon, $title, $count, $insertCmtId = false, $insertJouId = false) { ?> <div id="bar_<?php echo $id; ?> " class="tab" onclick="open_tab( this, 'tabs', 'tab_<?php echo $id; ?> ' )"> <?php echo getIMG(url() . "images/emoticons/" . $icon) . " " . $title; if ($count > 0) { echo " (" . ($insertCmtId ? '<span id="_updCmtCnt">' : '') . ($insertJouId ? '<span id="_updJouCnt">' : '') . fuzzy_number($count) . ($insertCmtId | $insertJouId ? '</span>' : '') . ")"; } ?> </div> <?php }
function displayTab($isSelected = false, $title, $url, $icon = "") { global $_newUI; if (isset($_GET["newTabs"])) { $iconImg = $icon != "" ? getIMG(url() . "images/emoticons/" . $icon) . " " : ""; $class = $isSelected ? ' class="active"' : ""; ?> <li<?php echo $class; ?> ><a href="<?php echo $url; ?> "><?php echo $iconImg; echo $title; ?> </a></li> <?php } else { ?> <div class="tab<?php echo $isSelected ? " tab_active" : ""; ?> " onclick="document.location='<?php echo $url; ?> '"> <?php echo $icon != "" ? getIMG(url() . "images/emoticons/" . $icon) : ""; ?> <?php echo $title; ?> </div> <?php } }
<div class="header"> Request Details </div> <div class="notsowide"> <?php sql_where(array("hlpid" => $_cmd[2])); if ($hlpData = sql_row("helpdesk")) { putRequestData($hlpData, true); } ?> </div> <form action="<?php echo url("helpdesk"); ?> " method="get"> <button class="smalltext"> <?php echo getIMG(url() . "images/emoticons/nav-prev.png"); ?> Return to list </button> </form>
function __updIcon($count, $hint, $icon, $insertCmtId = false) { global $_auth, $_commentCountId; if ($count > 0) { return getIMG(url() . "images/emoticons/" . $icon, 'alt="' . substr($hint, 0, 1) . '" title="' . $hint . '"') . ($_auth["useFuzzyNumbers"] ? " " : "") . '<span' . ($insertCmtId ? ' id="' . $_commentCountId . '"' : '') . ' class="v_middle">' . fuzzy_number($count) . '</span>' . ($_auth["useFuzzyNumbers"] ? "<br />" : " "); } else { return ""; } }
function showPrevNext($cl, $cluVar) { global $_objects, $isExtras, $objData, $useData; if ($cl == 1 && $objData[$cluVar] == 0) { return; } if ($cl == 1 && $isExtras) { return; } $prevId = 0; $nextId = 0; if ($cl == 1) { // Navigate inside this club/project. $select = "SELECT `objid`,`objTitle` FROM {$_objects},`clubObjects`"; $where = "`cloObject` = `objid` AND `cloClub` = '" . $objData[$cluVar] . "'"; $browseURL = url("clubgallery/" . $objData[$cluVar]); } else { // Navigate inside the artist's gallery (this also includes // submissions posted to clubs). $select = "SELECT `objid`,`objTitle` FROM {$_objects}"; $where = "`objCreator` = '" . $objData["objCreator"] . "'"; $browseURL = url(($isExtras ? "extras/" : "gallery/") . strtolower($useData["useUsername"])); } // Make sure deleted and pending submissions don't display. $where = "({$where}) AND `objDeleted` = '0' AND `objPending` = '0'"; // Make sure mature submissions don't display if the user has chosen // not to view them. applyObjFilters($where); // To find the next submission, sort all submissions that were // posted after the current submission by submission dates // in the ascending order and then get the very first one. $result = sql_query("{$select} WHERE {$where} " . "AND `objSubmitDate` > '" . $objData["objSubmitDate"] . "' " . "ORDER BY `objSubmitDate` LIMIT 1"); if ($rowData = mysql_fetch_row($result)) { $nextId = $rowData[0]; } // To find the previous submission, sort all submissions that were // posted before the current submission by submission dates // in the descending order and then get the very first one. $result = sql_query("{$select} WHERE {$where} " . "AND `objSubmitDate` < '" . $objData["objSubmitDate"] . "' " . "ORDER BY `objSubmitDate` DESC LIMIT 1"); if ($rowData = mysql_fetch_row($result)) { $prevId = $rowData[0]; } // Display navigation buttons (Prev, Browse, Next). ?> <div class="mar_top mar_bottom smalltext"> <?php if ($prevId > 0) { echo getObjectThumb($prevId, 30, $isExtras) . getIMG(url() . "images/emoticons/nav-prev.png") . " " . _PAGE_PREVIOUS; } ?> <a class="disable_wrapping" href="<?php echo $browseURL; ?> "> <?php echo $cl == 0 ? $isExtras ? _EXTRA_BROWSE : _BROWSE_GALLERY : _BROWSE_CLUB; ?> </a> <?php if ($nextId > 0) { echo _PAGE_NEXT . " " . getIMG(url() . "images/emoticons/nav-next.png") . getObjectThumb($nextId, 30, $isExtras); } ?> </div> <?php }
</td> </tr> <?php } ?> </table> <div class="a_right"> <a href="<?php echo url("abuse/" . $abuData["abuid"]); ?> "> <?php echo _ABUSE_STATUS; ?> <?php echo getIMG(url() . "images/emoticons/nav-next.png"); ?> </a> </div> </div> </div> </td> </tr> <?php } ?> </table> <br /> <?php navControls($offset, $limit, $totalCount); ?>
$result = sql_query("SELECT `cluName` FROM `clubs` " . "WHERE `cluid` = '" . $objData["objForClub"] . "'"); $club = '<a href="' . url("club/" . $objData["objForClub"]) . '">' . mysql_result($result, 0) . '</a>'; $objTitle .= '</div><div> ' . sprintf(_IN, $club); } $id = generateId("au_v"); $all_ids[] = $id; $divId = ""; $starId = ""; echo '<div ' . $divId . ' class="gallery_col a_center"' . ($view == 1 ? ' style="width: 31%"' : "") . '>' . '<div class="padded ' . ($cols < 3 ? " mar_right" : "") . '">' . '<a href="' . $anchor . '">'; echo '<img alt="' . htmlspecialchars(strip_tags($objTitle)) . '" class="thumb' . ($objData["objMature"] ? " mature" : "") . '" src="' . $src . '" title="' . htmlspecialchars(strip_tags($objTitle)) . '" width="' . $objData["objThumbWidth"] . '" height="' . $objData["objThumbHeight"] . '" /></a>'; echo '</div><div>'; echo '<input class="checkbox" id="' . $id . '" name="' . $key . '" type="checkbox" />'; if (in_array($objData["objExtension"], array("txt", "html"))) { echo getIMG(url() . "images/emoticons/pm.png", 'alt="' . $objData["objExtension"] . '"') . ' '; } else { echo getIMG(url() . "images/emoticons/submission.png", 'alt="' . $objData["objExtension"] . '"') . ' '; } echo $objTitle . '</div></div>'; $cols++; if ($cols >= $maxcols) { $cols = 0; echo '<div class="clear"> </div>'; } } echo '<div class="clear"> </div>'; iefixEnd(); } if (!isset($_GET["popup"])) { ?> </div> <?php
<form action="<?php echo url("pm/delete/"); ?> " method="post"> <input type="hidden" name="deleteSentMessage" value="1" /> <div class="f_left mar_bottom"> <input type="checkbox" name="pmsid_<?php echo $rowData["pmsid"]; ?> " /> <a href="<?php echo url("pm/read/" . $rowData["pmsid"]); ?> "> <?php echo getIMG(url() . "images/emoticons/pmout.png"); ?> <?php echo formatText($rowData["pmsTitle"], false, true); ?> </a> <?php echo _PM_FOR; ?> <?php echo getUserLink($rowData["pmsPmUser"]); ?> </div> <div class="f_right mar_bottom a_right"> <?php echo date($_auth['useDateFormat'], applyTimezone(strtotime($rowData["pmsSubmitDate"])));
echo isset($_POST["gift"]) && $_POST["gift"] == $watData["useid"] ? 'selected="selected"' : ""; ?> value="<?php echo $watData["useid"]; ?> "><?php echo htmlspecialchars($watData["useUsername"]); ?> </option> <?php } mysql_free_result($watResult); ?> </select> <a target="new-tab" href="<?php echo url("helpdesk/faq/general/gifts"); ?> "> <?php echo getIMG(url() . "images/emoticons/help.png"); ?> <?php echo _WHATS_THIS; ?> </a> <div class="clear"> </div> <div><br /></div>
function showChildComments($comid, $comObjType, $level, $showChilds = true, $first = false, $oldestFirst = true) { global $_cmd, $_commentsPerPage, $_config; if ($comObjType == "com") { $sql = "SELECT `comCreator` FROM `comments`" . dbWhere(array("comid" => $comid)); $comResult = sql_query($sql); if (!($comData = mysql_fetch_assoc($comResult))) { return false; } if (isTwit($comData["comCreator"])) { return false; } if (!isLoggedIn()) { $result = sql_query("SELECT `useGuestAccess` FROM `useExtData`" . dbWhere(array("useEid" => $comData["comCreator"]))); if (!mysql_result($result, 0)) { return false; } } } if ($level > 0) { $offset = 0; } else { $offset = isset($_GET["offset"]) ? intval($_GET["offset"]) : 0; } $isLastOffset = isset($_GET["offset"]) && $_GET["offset"] == "last"; if ($_cmd[0] != "user" || $isLastOffset) { $result = sql_query("SELECT COUNT(*) FROM `comments` " . "WHERE `comObjType` = '{$comObjType}' AND `comObj` = '{$comid}'" . getTwitWhere("comCreator")); $totalcount = mysql_result($result, 0); if ($isLastOffset && $_cmd[0] == "user") { $lastOffset = floor($totalcount / $_commentsPerPage) * $_commentsPerPage; redirect(url(".", array("last" => $lastOffset, "offset" => $lastOffset))); } } else { $totalcount = $offset + $_commentsPerPage + 1; } $result = sql_query("SELECT * FROM `comments` " . "WHERE `comObjType` = '{$comObjType}' " . "AND `comObj` = '{$comid}' " . getTwitWhere("comCreator") . "ORDER BY `comSubmitDate`" . ($oldestFirst ? "" : " DESC") . " LIMIT " . $offset . "," . ($_commentsPerPage + 1)); if (!mysql_num_rows($result)) { return false; } $minLevel = 2; //$_cmd[0] == "view" ? 2 : 3; if ($level >= $minLevel && $_cmd[0] != "comment") { for ($i = 0; $i <= $level - 1; $i++) { ?> <div class="<?php echo $level > 0 && $i < $level - 1 ? "cmt_border_left" : ""; ?> "> <?php } $result1 = sql_query("SELECT `comSubmitDate` FROM `comments` WHERE `comid` = '{$comid}' LIMIT 1"); $comSubmitDate = mysql_result($result1, 0); $readURL = url("comment/" . $comid . ($_config["checkSubmitDate"] ? "/" . preg_replace('/[^0-9]/', "", $comSubmitDate) : '')); ?> <div class="a_left smalltext" style="padding-top: 4px; padding-left: 20px"> <a href="<?php echo $readURL; ?> #replies"><?php echo _READ_MORE_REPLIES; ?> <?php echo getIMG(url() . "images/emoticons/nav-next.png"); ?> </a> </div> <?php for ($i = 0; $i <= $level - 1; $i++) { echo "</div>"; } return true; } $commentsToGo = $_commentsPerPage; $useids = array(); $comments = array(); while ($comData = mysql_fetch_assoc($result)) { $useids[] = $comData["comCreator"]; $comments[] = $comData; } prefetchUserData(array_unique($useids)); foreach ($comments as $comData) { $first = false; showComment($comData, $level); if ($showChilds) { showChildComments($comData["comid"], "com", $level + 1, true, false, $oldestFirst); } $commentsToGo--; if (!$commentsToGo) { break; } // do not display more than $_commentsPerPage comments } if ($level == 0) { ?> <div class="padded"> <?php navControls($offset, $_commentsPerPage, $totalcount); ?> </div> <?php } return true; }
</div> <?php } $clubContents = ob_get_contents(); ob_end_clean(); if ($clubContents != "") { ?> <div class="container2 mar_bottom"> <div class="a_center"> <form action="<?php echo url("clubs/" . strtolower($useData["useUsername"])); ?> " method="get"> <button class="submit wide largetext" type="submit"> <?php echo getIMG(url() . "images/emoticons/club2.png"); ?> <?php echo _CLUBS; ?> </button> </form> </div> <div class="sep"> <?php echo $clubContents; ?> </div> </div> <?php }
function putRequestDetail($hlpData, $hddData) { global $_auth; ?> <div class="container2 mar_bottom"> <?php if ($hddData["hddAttachment"] != "") { ?> <div class="f_right a_right" style="margin-left : 2em; margin-bottom : 1em;"> <b>Attachment</b>:<br /> <a target="new-tab" href="<?php echo url("/") . $hddData["hddAttachment"] . "/" . $hddData["hddAttachOrigName"]; ?> "> <?php echo htmlspecialchars($hddData["hddAttachOrigName"]); ?> </a> <?php echo getIMG(url() . "images/emoticons/zip.png"); ?> </div> <?php } ?> <div class="mar_bottom"> <?php echo getRequestPrivacyText($hddData["hddPrivacy"], $hlpData); ?> </div> <div> <?php echo getUserLink($hddData["hddCreator"]); ?> : <?php echo formatText($hddData["hddMessage"], true, true); ?> </div> </div> <?php }
?> </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>
</div> <?php } ?> </div> <form action="<?php echo url("."); ?> " method="post"> <div class="caption">Abuse comment:</div> <?php $commentNoOptions = true; include INCLUDES . "mod_comment.php"; if (isset($_POST["submit"]) && !$_POST["comment"]) { notice(_SUBMIT_NO_COMMENT); } ?> <div class="sep"> <button class="submit" name="submit" type="submit"> <?php echo getIMG(url() . "images/emoticons/abuse.png"); ?> <?php echo _ABUSE_REPORT; ?> </button> </div> </form> </div>
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&PartDetailId=jre-1.5.0_04-oth-JPR&SiteId=JSC&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 }
$baseFilename = preg_replace('/\\..+$/', "", findNewestFile("files/oekakitemp/" . $oekakiSession . "-*", "")); if (file_exists($baseFilename . ".png")) { ?> <div class="subheader"><?php echo _OEKAKI; ?> </div> </div></div> <div class="container"> <div><?php echo _SUBMIT_OEKAKI; ?> :</div> <div class="sep"> <?php echo getIMG(url() . $baseFilename . ".png"); ?> </div> <?php if (file_exists($baseFilename . ".pch") || file_exists($baseFilename . ".oeb")) { ?> <div class="sep"><?php echo _SUBMIT_OEKAKI_ANIM; ?> </div> <?php } } } else { // TODO: move text to strings_??.php ?>
function showKeywordSubcatEdit($keywords, $listId, $parentId = 0, $parentKeyName = "", $parentLastKeyName = "") { global $requiredTabs, $firstKeywordId; $noSubcats = true; foreach ($keywords as $keyData) { if (isset($keyData["subcats"])) { $noSubcats = false; break; } } if ($parentId == 0) { ?> <div class="clear"> </div> <div class="sep notsowide mar_left mar_bottom"> Add more keyword groups to the Root separated by ; <br /> <input class="notsowide" name="addKeywordsUnder<?php echo $parentId; ?> " type="text" /> </div> <?php } foreach ($keywords as $keyData) { $tabid = generateId("kwcache_tab"); $keyName = "• " . $parentKeyName . $keyData["keyWord"]; $nonSelectable = preg_match('/\\@$/', $keyData["keyWord"]); $keyData["keyWord"] = preg_replace('/\\@$/', "", $keyData["keyWord"]); ?> <div class="f_left"> <div class="tab normaltext" id="<?php echo $tabid; ?> " onclick="open_tab(this,'keywords_<?php echo $parentId; ?> ','keywordTab_<?php echo $keyData["keyid"]; ?> ')"> <a href="<?php echo url("keywords", array("delete" => $keyData["keyid"])); ?> "> <?php echo getIMG(url() . "images/emoticons/keydelete.gif", 'alt="del" title="' . _KEYWORDS_DELETE . '" ' . 'onmouseout="this.style.background=\'none\'" ' . 'onmouseover="this.style.background=\'#fff\'"'); ?> </a> <a href="<?php echo url("keywords", array("edit" => $keyData["keyid"])); ?> "> <?php echo getIMG(url() . "images/emoticons/keyedit.gif", 'alt="edit" title="' . _KEYWORDS_EDIT . '" ' . 'onmouseout="this.style.background=\'none\'" ' . 'onmouseover="this.style.background=\'#fff\'"'); ?> </a> <?php echo htmlspecialchars($keyData["keyWord"]); if ($nonSelectable) { echo "@"; } ?> </div> </div> <?php } ?> <div class="clear"> </div> <?php foreach ($keywords as $keyData) { $keyData["keyWord"] = preg_replace('/\\@$/', "", $keyData["keyWord"]); unset($requiredTabs[$keyData["keyid"]]); ?> <div style="display: none" id="keywordTab_<?php echo $keyData["keyid"]; ?> "> <?php iefixStart(); ?> <div class="hline"> </div> <div class="hline"> </div> <div class="sep notsowide_fix mar_left mar_bottom"> Add more keywords to the group <b><?php echo $parentKeyName . htmlspecialchars($keyData["keyWord"]); ?> </b> separated by ; <br /> <input class="notsowide_fix" name="addKeywordsUnder<?php echo $keyData["keyid"]; ?> " type="text" /> </div> <div class="clear"> </div> <?php iefixEnd(); ?> <?php if (isset($keyData["subcats"])) { iefixStart(); showKeywordSubcatEdit($keyData["subcats"], $listId, $keyData["keyid"], $parentKeyName . htmlspecialchars($keyData["keyWord"]) . " – ", $parentId != 0 ? htmlspecialchars($keyData["keyWord"]) : ""); iefixEnd(); } ?> <div class="clear"> </div> </div> <?php } }
function putSidebarModStuff() { global $_newUI, $_auth; if (isModerator() || $_auth["useid"] == 7) { $found = false; ob_start(); for ($isExtras = 0; $isExtras < 2; $isExtras++) { $_objects = $isExtras ? "`extras`" : "`objects`"; // Bring attention to the abuse cases pending a moderator's decision. $_tmpResult = sql_query("SELECT `objid`,`objTitle`,`abuid` FROM `abuses`,{$_objects}" . dbWhere(array("abuObj*" => "objid", "abuIsExtras" => $isExtras, "abuMod" => "?")) . "ORDER BY `abuSubmitDate` DESC LIMIT 5"); while ($rowData = mysql_fetch_assoc($_tmpResult)) { ?> <div> <?php echo getIMG(url() . "images/emoticons/" . ($isExtras ? "star4.png" : "keydelete.gif")); ?> <a href="<?php echo url("abuse/" . $rowData["abuid"]); ?> "> <?php echo htmlspecialchars($rowData["objTitle"]); ?> </a> </div> <?php $found = true; } } $ht = ob_get_contents(); ob_end_clean(); if ($found) { if (isset($_newUI)) { ?> <div class="ui2-layout-bg ui2-section-closed"><?php echo _MODERATOR; ?> </div> <div class="ui2-section-body"> <?php echo $ht; ?> </div> <?php } else { ?> <div class="caption error"><?php echo _MODERATOR; ?> <br /><?php echo _ABUSE_LIST; ?> :</div> <div class="container2 mar_bottom"> <?php echo $ht; ?> </div> <?php } } } if (isSModerator() || $_auth["useid"] == 7) { $found = false; ob_start(); $mod_count = 0; $adm_count = 0; for ($isExtras = 0; $isExtras < 2; $isExtras++) { $_objects = $isExtras ? "`extras`" : "`objects`"; // Bring attention to the abuse cases pending a supermoderator's decision. $_tmpResult = sql_query("SELECT `objid`,`objTitle`,`abuid` FROM `abuses`,{$_objects} " . "WHERE `abuObj` = `objid` AND `abuIsExtras` = '{$isExtras}' AND `abuMod` <> '?' AND `abusMod` = '?' " . "ORDER BY `abuSubmitDate` DESC LIMIT 5"); $_tmpResult_mod = sql_query("SELECT COUNT(*) FROM `abuses`,{$_objects} " . "WHERE `abuObj` = `objid` AND `abuIsExtras` = '{$isExtras}' AND `abuMod` = '?'"); $mod_count += mysql_result($_tmpResult_mod, 0); $_tmpResult_adm = sql_query("SELECT COUNT(*) FROM `abuses`,{$_objects} " . "WHERE `abuObj` = `objid` AND `abuIsExtras` = '{$isExtras}' AND `abuMod` <> '?' AND `abusMod` <> '?' " . "AND `abuMod` <> `abusMod` AND `aburMod` = '?'"); $adm_count += mysql_result($_tmpResult_adm, 0); while ($rowData = mysql_fetch_assoc($_tmpResult)) { ?> <div> <?php echo getIMG(url() . "images/emoticons/" . ($isExtras ? "star4.png" : "keydelete.gif")); ?> <a href="<?php echo url("abuse/" . $rowData["abuid"]); ?> "> <?php echo htmlspecialchars($rowData["objTitle"]); ?> </a> </div> <?php $found = true; } } if ($mod_count > 0) { ?> <div<?php echo $found ? ' class="sep"' : ""; ?> ><?php echo _ABUSE_WAIT_MODERATOR . ": " . $mod_count; ?> </div> <?php $found = true; } if ($adm_count > 0) { ?> <div<?php echo $found ? ' class="sep"' : ""; ?> ><?php echo _ABUSE_WAIT_ADMINISTRATOR . ": " . $adm_count; ?> </div> <?php $found = true; } $ht = ob_get_contents(); ob_end_clean(); if ($found) { if (isset($_newUI)) { ?> <div class="ui2-layout-bg ui2-section-closed"><?php echo _SUPERMODERATOR; ?> </div> <div class="ui2-section-body"> <?php echo $ht; ?> </div> <?php } else { ?> <div class="caption error"><?php echo _SUPERMODERATOR; ?> <br /><?php echo _ABUSE_LIST; ?> :</div> <div class="container2 mar_bottom"> <?php echo $ht; ?> </div> <?php } } } if (isAdmin() || $_auth["useid"] == 7) { $found = false; ob_start(); for ($isExtras = 0; $isExtras < 2; $isExtras++) { $_objects = $isExtras ? "`extras`" : "`objects`"; // Bring attention to the abuse cases pending admin's decision. $_tmpResult = sql_query("SELECT `objid`,`objTitle`,`abuid` FROM `abuses`,{$_objects} " . "WHERE `abuObj` = `objid` AND `abuMod` <> '?' AND `abusMod` <> '?' " . "AND `abuMod` <> `abusMod` AND `aburMod` = '?' " . "ORDER BY `abuSubmitDate` DESC LIMIT 5"); while ($rowData = mysql_fetch_assoc($_tmpResult)) { ?> <div> <?php echo getIMG(url() . "images/emoticons/" . ($isExtras ? "star4.png" : "keydelete.gif")); ?> <a href="<?php echo url("abuse/" . $rowData["abuid"]); ?> "> <?php echo htmlspecialchars($rowData["objTitle"]); ?> </a> </div> <?php $found = true; } } $ht = ob_get_contents(); ob_end_clean(); if ($found) { if (isset($_newUI)) { ?> <div class="ui2-layout-bg ui2-section-closed"><?php echo _ADMINISTRATOR; ?> </div> <div class="ui2-section-body"> <?php echo $ht; ?> </div> <?php } else { ?> <div class="caption error"><?php echo _ADMINISTRATOR; ?> <br /><?php echo _ABUSE_LIST; ?> :</div> <div class="container2 mar_bottom"> <?php echo $ht; ?> </div> <?php } } } }
?> <?php echo _WATCH_LIST; ?> </div> <div class="tab<?php echo $active == 3 ? " tab_active" : ""; ?> " onclick="document.location='<?php echo url("watchedby/" . $useUsername); ?> '"> <?php echo getIMG(url() . "images/emoticons/watch.png"); ?> <?php echo _WATCHED_BY; ?> </div> <?php navControls($fr_offset, $fr_limit, $fr_totalCount); ?> <div class="clear"> </div> </div> <div class="hline"> </div> <?php
<div class="container2 mar_bottom"> <?php $found = false; foreach ($entries as $entry) { // do not display the current entry on the list // disabled - because it looks confusing //if($entry["polid"] == $currentEntry["polid"]) continue; iefixStart(); ?> <div class="f_left mar_bottom"> <a href="<?php echo url("poll/" . $useUsername . "/" . $entry["polid"]); ?> "> <?php echo getIMG(url() . "images/emoticons/poll.png"); ?> <?php echo formatText($entry["polSubject"]); ?> </a> </div> <div class="f_right mar_bottom"> <?php echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($entry["polSubmitDate"]))); ?> </div> <div class="clear"> </div> <?php iefixEnd(); $found = true;
echo url("helpdesk/faq"); ?> "> <?php echo getIMG(url() . "images/ui2/help.png"); ?> <?php echo _HELP; ?> </a></li> <li><a href="<?php echo url("helpdesk/faq/staff/info"); ?> "> <?php echo getIMG(url() . "images/ui2/queue.png"); ?> <?php echo _STAFF; ?> </a></li> <?php } ?> </ul> <?php } ?> <div class="ui2-layout-outer"> <div class="ui2-layout"> <div class="ui2-page">
function textUnderIcon($targetURL, $text, $src) { if ($targetURL == "") { return; } $cssClass = "smalltext text_under_icon" . ($targetURL == "" ? " text_under_icon_grayed" : ""); if ($targetURL != "") { echo '<a href="' . $targetURL . '" style="text-decoration: none">'; } echo '<span class="' . $cssClass . '">' . getIMG($src) . '<br />' . $text . '</span>'; if ($targetURL != "") { echo '</a>'; } }
function getImgStr($httpurl, $content, $nOK) { $splStr = ''; $i = ''; $c = ''; $url = ''; $UrlList = ''; $content = getIMG($content); $splStr = aspSplit($content, vbCrlf()); $nOK = 0; foreach ($splStr as $key => $url) { if (inStr('|' . $UrlList . '|', '|' . $url . '|') == false) { if (left($url, 1) == '/' || inStr($url, 'http://') == false && inStr($url, 'www.') == false) { $url = fullHttpUrl($httpurl, $url); } $nOK = $nOK + 1; $c = $c . $url . '<br>'; } } $getImgStr = $c; return @$getImgStr; }
</div> <div style="padding: 6px"> <label for="id_bUI2Layout"><b>New style layout</b>: #</label> <input type="text" class="text" name="bUI2Layout" size="6" id="id_bUI2Layout" value="<?php echo isset($data["c"]["bUI2Layout"]) ? $data["c"]["bUI2Layout"] : ""; ?> " /> </div> </div> <div class="clear"><br /></div> <div class="sep"> <button class="submit" name="submitTheme" type="submit"> <?php echo getIMG(url() . "images/emoticons/checked.png"); ?> <?php echo _SAVE_CHANGES; ?> </button> <?php if ($lastThemeFile != "") { ?> <a href="<?php echo url(".", array("remove" => "yes")); ?> " onclick="return confirm('<?php echo _ARE_YOU_SURE;
<div class="container2 mar_bottom"> <?php $found = false; foreach ($entries as $entry) { // do not display the current entry on the list // disabled - because it looks confusing //if($entry["jouid"] == $currentEntry["jouid"]) continue; iefixStart(); ?> <div class="f_left mar_bottom"> <a href="<?php echo url("announcement/" . $cluid . "/" . $entry["jouid"]); ?> "> <?php echo getIMG(url() . "images/emoticons/journal.png"); ?> <?php echo formatText($entry["jouTitle"]); ?> </a> </div> <div class="f_right mar_bottom"> <?php echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($entry["jouSubmitDate"]))); ?> </div> <div class="clear"> </div> <?php iefixEnd(); $found = true;
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> <?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"> </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"> </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"> </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"> </div> <?php }
function updateEmoticons() { $_emoticons = array(); // order them first by the length of the emoticon expression in the ascending order, // so that ":XD:" would apply before "XD". $result = sql_query("SELECT SQL_CACHE SQL_SMALL_RESULT * FROM `emoticons` " . "ORDER BY LENGTH(`emoExpr`) DESC,`emoExpr`"); $str = "<?\n\n" . '$_emoticons = array();' . "\n"; $n = 1; while ($row = mysql_fetch_assoc($result)) { $str .= '$_emoticons[] = array( '; foreach ($row as $key => $value) { if ($key != "emoid") { $str .= '"' . $key . '" => \'' . $value . '\', '; } } $str .= '"img" => \'' . getIMG(url() . 'images/emoticons/' . $row["emoFilename"], 'alt="' . $row["emoExpr"] . '" title="' . $row["emoExpr"] . '"') . '\' );' . "\n"; $n++; } $str .= "\n?>"; $fp = fopen(INCLUDES . "emoticons.inc", "w"); fwrite($fp, $str); fclose($fp); }
?> </div> <?php } if (atLeastModerator()) { ?> <div class="tab<?php echo $active == 5 ? " tab_active" : ""; ?> " onclick="document.location='<?php echo url("managegallery/" . $useUsername); ?> '"> <?php echo getIMG(url() . "images/ui2/settings.png", 'width="14px"'); ?> <?php echo _GALLERY_MANAGEMENT; ?> </div> <?php } } ?> <div class="clear"> </div> </div> <div class="hline"> </div>
?> </a> <br /><br /> <a href="<?php echo url("confirm/" . $objid, array("accept" => "0")); ?> " onclick="return confirm('<?php echo _REFUSE; ?> ? <?php echo _ARE_YOU_SURE; ?> ')"> <?php echo getIMG(url() . "images/emoticons/cancel.png"); ?> <?php echo _REFUSE; ?> </a> </td> </tr> </table> </div> <?php } } putSidebarBanner(); if (!isset($_auth["useSidebarThumbs"]) || $_auth["useSidebarThumbs"]) { ?>
} ?> </div> </div> <div style="clear: both" class="normaltext"> <div class="tab<?php echo $active == 1 ? " tab_active" : ""; ?> " onclick="document.location='<?php echo url("view/" . ($isExtras ? "e" : "") . $objid); ?> '"> <?php echo getIMG(url() . "images/emoticons/submission.png"); ?> <?php echo _SUBMISSION; ?> </div> <?php /* <div class="tab<?= $active == 2 ? " tab_active" : "" ?>" onclick="document.location='<?= url( "discuss/".( $isExtras ? "e" : "" ).$objid ) ?>'"> <?= getIMG( url()."images/emoticons/comment.png" )?> <?= _COMMENTS ?></div> <?*/ /* if( isLoggedIn() && !$isExtras && $objData[ "objFavs" ] >= 3 ) {