function fmtCallbackThumb($sender) { global $__maxIcons; if ($__maxIcons <= 0) { return '[' . _BBCODE_THUMB . '=' . $sender[1] . ']'; } $__maxIcons--; $size = 30; // default value fmtParseParams($sender[1], $id, $size); if ($size < 20) { $size = 20; } // minimum value if ($size > 60) { $size = 60; } // maximum value return getObjectThumb($id, $size); }
$objid = $objData["objid"]; ?> <div class="ui2-layout-bg ui2-section-closed"><?php echo _CONFIRMATION_NEEDED; ?> :</div> <div class="ui2-section-body"> <div class="a_left padded"> <?php echo _COLLAB_CONFIRM_EXPLAIN; ?> </div> <table align="center" cellspacing="0" cellpadding="8" border="0"> <tr> <td><?php echo getObjectThumb($objid, 40); ?> </td> <td> <a href="<?php echo url("confirm/" . $objid, array("accept" => "1")); ?> " onclick="return confirm('<?php echo _CONFIRM; ?> ? <?php echo _ARE_YOU_SURE; ?> ')"> <?php
$show = "`abuResolved`='0' AND `abuFinal`='?' "; } $abuResult = sql_query("SELECT SQL_CALC_FOUND_ROWS * FROM `abuses` WHERE {$show} " . "ORDER BY `abuSubmitDate` {$order} LIMIT {$offset}, {$limit}"); $cntResult = sql_query("SELECT FOUND_ROWS()"); $totalCount = mysql_result($cntResult, 0); navControls($offset, $limit, $totalCount); ?> <div class="clear"><br /></div> <br /> <table> <?php while ($abuData = mysql_fetch_assoc($abuResult)) { ?> <tr class="v_top"> <td class="a_center"><?php echo getObjectThumb($abuData["abuObj"], 100, $abuData["abuIsExtras"]); ?> </td> <td width="100%"> <div class="outer notsowide" style="padding: 2px"> <div class="<?php echo $abuData["abuResolved"] ? "container2" : "container"; ?> "> <table> <?php if (!$abuData["abuResolved"] && trim($abuData["abuReason"]) != "" && ($abuData["aburMod"] == "-" || $abuData["abuMod"] == $abuData["abusMod"])) { ?> <tr class="v_top"> <td class="a_right"></td> <td><div class="error"><b>Pending User Input</b><br />
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 }
?> </div> </div> <div class="clear"> </div> <?php $active = 3; include INCLUDES . "mod_adminmenu.php"; ?> </div> <div class="container"> <div class="gallery_col"> <div class="padded a_center"> <?php echo getObjectThumb($objData["objid"], 100, $isExtras); ?> <div><?php echo $objData["objTitle"]; ?> </div> <div class="sep">(<a href="<?php echo url("moderate/" . $useData["useUsername"]); ?> "><?php echo _USER . " " . _MODERATION; ?> </a>)</div> </div> </div> <?php
<?php if (isset($_POST["submissionId"])) { $submissionId = $_POST["submissionId"]; $result = sql_query("SELECT * FROM `objects`,`objExtData` WHERE `objid`=`objEid` AND `objid` = '" . addslashes($submissionId) . "' AND `objExtension`='txt' LIMIT 1"); $resultcount = mysql_num_rows($result); if ($resultcount == 0) { echo "Submission does not exist or is not a text file."; } else { sql_query("UPDATE `objects` SET `objThumbWidth`='150', `objThumbHeight`='150', `objThumbDefault`='1' WHERE `objid` = '" . addslashes($submissionId) . "' LIMIT 1"); ?> <div class="mar_bottom"> <b>Raeped</b> <?php echo getObjectThumb($submissionId); ?> </div> <?php } } ?> </div> <?php echo iefixEnd(); ?> </div> <?php }
function putRequestData($hlpData, $showDetails = false) { global $_auth; ?> <div class="container2 mar_bottom"> <div style="margin-left : 20px;"> <div style="margin-left : -20px; margin-top : 0.4em; float : left;"> <?php echo getIMG(url() . "images/emoticons/star.png"); ?> </div> <?php if ($hlpData["hlpReferenceType"] == "submission") { ?> <div style="float : right; margin-left : 1em; margin-bottom : 0.5em;"> <?php echo getObjectThumb($hlpData["hlpReferenceId"], 100, false); ?> </div> <?php } if ($hlpData["hlpReferenceType"] == "extras") { ?> <div style="float : right; margin-left : 1em; margin-bottom : 0.5em;"> <?php echo getObjectThumb($hlpData["hlpReferenceId"], 100, true); ?> </div> <?php } ?> <div class="header" style="padding : 0; padding-bottom : 0.3em;"> <a href="<?php echo url("helpdesk/details/" . $hlpData["hlpid"]); ?> "> <?php echo getRequestCategoryText($hlpData["hlpCategory"]); ?> </a> </div> <?php $ref = getRequestRefText($hlpData["hlpReferenceType"], $hlpData["hlpReferenceId"]); if ($ref != "--") { ?> <div> <b>In reference to</b>: <?php echo $ref; ?> </div> <?php } ?> <div> <b>Status</b>: <?php echo getRequestStatusText($hlpData["hlpStatus"]); ?> </div> <div> <b>Urgency</b>: <?php echo getRequestUrgencyText($hlpData["hlpUrgency"]); ?> </div> <?php $hasOwner = $hlpData["hlpOwner"] > 0; $isStaff = atLeastModerator(); $isSubmitter = isLoggedIn() && $_auth["useid"] == $hlpData["hlpSubmitter"]; $isOwner = isLoggedIn() && $_auth["useid"] == $hlpData["hlpOwner"]; if ($isOwner && $hlpData["hlpStatus"] == "wait-assign") { ?> <div class="mar_top"> <span class="error">Summary will be available after the request is assigned.</span> </div> <?php } else { ?> <div class="mar_top"> <?php echo formatText($hlpData["hlpSummary"], true, true); ?> </div> <?php } $allowedPrivacy = "'all'"; if ($isStaff) { $allowedPrivacy .= ",'private','submitter','owner'"; } else { if ($isSubmitter) { $allowedPrivacy .= ",'submitter'"; } if ($isOwner) { $allowedPrivacy .= ",'owner'"; } } if ($showDetails) { ?> <div style="clear : both;"></div> <?php sql_order("hddSubmitDate"); sql_where(array("hddItem" => $hlpData["hlpid"], "|1" => "`hddPrivacy` IN(" . $allowedPrivacy . ")")); $hddResult = sql_rowset("helpdeskDetails"); while ($hddData = sql_next($hddResult)) { putRequestDetail($hlpData, $hddData); } sql_free($hddResult); $doSubmitDetail = false; $detailPrivacy = "?"; if (isset($_POST["submitPrivate"])) { $doSubmitDetail = true; $detailPrivacy = "private"; } if (isset($_POST["submitSubmitter"])) { $doSubmitDetail = true; $detailPrivacy = "submitter"; } if (isset($_POST["submitOwner"])) { $doSubmitDetail = true; $detailPrivacy = "owner"; } if (isset($_POST["submitAll"])) { $doSubmitDetail = true; $detailPrivacy = "all"; } if ($doSubmitDetail) { addRequestDetail($hlpData["hlpid"], "detailText", "detailFile", $detailPrivacy); redirect(url(".")); } if ($hlpData["hlpStatus"] == "completed") { ?> <span class="error"><b>COMPLETED</b></span>. This request's status is 'completed', no further details are accepted. <?php } else { ?> <div class="container2 mar_bottom"> <div class="header" style="padding-left : 0; padding-top : 0;"> Submit new detail </div> <form action="<?php echo url("."); ?> " enctype="multipart/form-data" method="post"> <div class="mar_bottom"> <textarea name="detailText" rows="9" style="width : 95%;"></textarea> </div> <div class="mar_bottom" style="padding-right : 10%"> (optionally) <b>Upload a file</b>: </div> <div class="mar_bottom"> <input name="detailFile" type="file" size="30" /> </div> <?php if ($isSubmitter && !$hasOwner) { // A simple submit button. ?> <div class="mar_top"> <input type="submit" name="submitSubmitter" value="<?php echo _SUBMIT; ?> " /> </div> <?php } else { ?> <div class="mar_top"> Who should be able to read this detail: </div> <?php if ($hasOwner) { ?> <div class="mar_top"> <button name="submitAll"> <?php echo getRequestPrivacyText("all", $hlpData); ?> </button> </div> <?php if (!$isSubmitter) { ?> <div class="mar_top"> <button name="submitOwner"> <?php echo getRequestPrivacyText("owner", $hlpData); ?> </button> </div> <?php } } ?> <div class="mar_top"> <button name="submitSubmitter"> <?php echo getRequestPrivacyText("submitter", $hlpData); ?> </button> </div> <?php if ($isStaff) { // Only staff can submit staff-only details :3 ?> <div class="mar_top"> <button name="submitPrivate"> <?php echo getRequestPrivacyText("private", $hlpData); ?> </button> </div> <?php } ?> <div class="mar_top"> * <b>Submitter</b> — The user that made the request. <?php if ($hasOwner) { ?> <br /> * <b>Owner</b> — The user that owns the object questioned by the request. <?php } ?> </div> <?php } ?> </form> </div> <?php } } else { sql_where(array("hddItem" => $hlpData["hlpid"], "|1" => "`hddPrivacy` IN(" . $allowedPrivacy . ")")); $detailCount = sql_count("helpdeskDetails"); ?> <div style="text-align : left; margin-top : 0.6em;"> <a href="<?php echo url("helpdesk/details/" . $hlpData["hlpid"]); ?> "> View Request Details</a> (<?php echo $detailCount; ?> ) </div> <div style="clear : both;"></div> <?php } ?> </div> </div> <?php }