Exemplo n.º 1
0
function sql_init()
{
    global $_auth, $_SQLUser, $_SQLCalc, $_SQLLog, $_SQLLogActivity, $_SQLDisplayActivity;
    // Users whose MySQL activity is logged to /_log_sql.html.
    $_SQLLogActivity = array();
    // Users whose MySQL activity is logged to /_log_sql.html.
    // Admins who can view MySQL queries for the current page.
    $_SQLDisplayActivity = array(4, 7, 34814);
    // Admins who can view MySQL queries for the current page.
    // Should MySQL query processing time be calculated?
    $_SQLCalc = atLeastSModerator() || in_array($_auth["useid"], $_SQLLogActivity) || in_array($_auth["useid"], $_SQLDisplayActivity);
    // Should MySQL queries be gathered?
    $_SQLLog = in_array($_auth["useid"], $_SQLDisplayActivity) || in_array($_auth["useid"], $_SQLLogActivity);
    $_SQLUser = $_auth["useid"];
}
Exemplo n.º 2
0
<?php

// This script can be ran by a supermod. It will force updating preview
// images for ALL submissions, from the first to the last. In fact,
// this script should not ever be ran unless you completely lost the
// /files/preview/ folder contents or something about preview images
// has been changed.
if (!atLeastSModerator()) {
    return;
}
if (!isset($_GET["first"]) || !isset($_GET["last"])) {
    redirect(url(".", array("first" => 1, "last" => 50)));
}
$first = intval($_GET["first"]);
$last = intval($_GET["last"]);
$isFinished = false;
$result = sql_query("SELECT MAX(`objid`) FROM `objects`");
if ($data = mysql_fetch_row($result)) {
    if ($last > $data[0]) {
        $last = $data[0];
        $isFinished = true;
    }
}
include_once INCLUDES . "files.php";
for ($objid = $first; $objid <= $last; $objid++) {
    $result = sql_query("SELECT * FROM `objects`, `objExtData` " . "WHERE `objid` = `objEid` AND `objid` = '{$objid}' LIMIT 1");
    if (!($objData = mysql_fetch_assoc($result))) {
        continue;
    }
    $imageFilename = applyIdToPath("files/data/", $objData["objid"]) . "-" . preg_replace('/[^0-9]/', "", $objData["objLastEdit"]) . "." . $objData["objExtension"];
    if (!file_exists($imageFilename)) {
Exemplo n.º 3
0
<?php

// -----------------------------------------------------------------------------
// This page is only accessible by a supermoderator or admin.
if (!atLeastSModerator() || $_cmd[1] != "") {
    include INCLUDES . "p_notfound.php";
    return;
}
updateEmoticons();
updateThemes();
$result = sql_query("SELECT `lanid` FROM `languages`");
while ($lanData = mysql_fetch_row($result)) {
    $lang1 = $lanData[0];
    updateStrings($lang1);
    updateJSStrings($lang1);
}
echo "Strings, emoticons and themes updated successfully.";
// -----------------------------------------------------------------------------
// Updates strings for the given language. Strings that are missing in the
// $lang but present in the default language (English) will be taken from the
// default language.
function updateStrings($lang)
{
    $filename = INCLUDES . "strings/" . $lang . ".php";
    $fp = fopen($filename . "_tmp", "w");
    fwrite($fp, "<?\n// DO NOT MODIFY THIS FILE, IT IS AUTOMATICALLY GENERATED.\n");
    $category = "";
    $result1 = sql_query("SELECT * FROM `strings` " . "WHERE `strLanguage` = 'en' ORDER BY `strName`");
    while ($strData = mysql_fetch_assoc($result1)) {
        if ($strData["strCategory"] != $category) {
            $category = $strData["strCategory"];
Exemplo n.º 4
0
    ?>
</div>
    <div class="container"><?php 
    notice(_READONLY);
    ?>
</div>
	<?php 
    return;
}
$pmsid = intval($_cmd[1]);
$result = sql_query("SELECT * FROM `pms`" . dbWhere(array("pmsid" => $pmsid)));
if (!($comData = mysql_fetch_assoc($result))) {
    include INCLUDES . "p_notfound.php";
    return;
}
if (!atLeastSModerator() && $comData["pmsCreator"] != $_auth["useid"]) {
    include INCLUDES . "p_notfound.php";
    return;
}
?>
<div class="header">
	<div class="header_title">
		<?php 
echo _PM;
?>
		<div class="subheader"><?php 
echo _EDIT;
?>
</div>
	</div>
</div>
Exemplo n.º 5
0
</select>
	&nbsp; (Tertiary)
</div>

<div class="clear">&nbsp;</div>
<?php 
$confirmed = false;
if ($_cmd[0] == "edit") {
    $sql = "SELECT `objCollabConfirmed` FROM `objExtData`" . dbWhere(array("objEid" => intval($_cmd[1])));
    $colResult = sql_query($sql);
    if ($colData = mysql_fetch_row($colResult)) {
        $confirmed = $colData[0];
    }
    mysql_free_result($colResult);
}
if (!$confirmed || atLeastSModerator()) {
    ?>
	<div class="sep caption"><?php 
    echo _SUBMIT_COLLAB;
    ?>
:</div>
	<div class="f_left mar_right mar_top">
		<?php 
    echo getIMG(url() . "images/emoticons/club.png");
    ?>
	</div>
	<select name="collab" class="largetext">
		<option value="0">( <?php 
    echo _NONE;
    ?>
 )</option>
Exemplo n.º 6
0
    $generationTime = round(($secdiff * 1000000 + $usecdiff) / 1000000, 3);
    $page = $_cmd[0];
    if ($_isSearchBot) {
        $page .= " (bot)";
    }
    sql_where(array("prfPage" => $page));
    if (sql_count("profiler") > 0) {
        sql_query("UPDATE `profiler` SET `prfCount` = `prfCount` + 1, " . "`prfTime` = `prfTime` + '" . $generationTime . "' " . "WHERE `prfPage` = '" . addslashes($page) . "'");
    } else {
        sql_values(array("prfPage" => $page, "prfCount" => 1, "prfTime" => $generationTime));
        sql_insert("profiler");
    }
}
// Show "Page generated in N seconds" if the user is at least
// a moderator.
if (atLeastSModerator() || $_auth["useid"] == 34814) {
    include_once "serverload.php";
    $time_start = $_stats["startTime"];
    $time_end = gettimeofday();
    $secdiff = $time_end["sec"] - $time_start["sec"];
    $usecdiff = $time_end["usec"] - $time_start["usec"];
    $generationTime = round(($secdiff * 1000000 + $usecdiff) / 1000000, 3);
    $mysqlStat = mysql_stat();
    $queriesPerSecond = round(preg_replace('/.*' . preg_quote("Queries per second avg: ") . '([0-9\\.]+).*/', "\\1", $mysqlStat), 2);
    //if( isset( $_stats[ "startQueries" ]))
    //{
    //	$queryCount = preg_replace( '/.*'.preg_quote( "Questions: " ).
    //		'([0-9]+).*/', "\\1", $mysqlStat ) - $_stats[ "startQueries" ];
    //}
    //else
    //{
Exemplo n.º 7
0
<?php

$_newsPerPage = 5;
$_documentTitle = _WHATSNEW;
?>
<div class="header">
	<div class="header_title">
		<?php 
$ableToPost = atLeastSModerator();
if ($ableToPost) {
    if (isset($_POST["subject"]) && isset($_POST["comment"])) {
        $noEmoticons = isset($_POST["commentNoEmoticons"]) ? 1 : 0;
        $noSig = isset($_POST["commentNoSig"]) ? 1 : 0;
        $noBBCode = isset($_POST["commentNoBBCode"]) ? 1 : 0;
        sql_query("INSERT INTO `news`(`newCreator`,`newSubmitDate`,`newSubject`,`newComment`,`newNoEmoticons`,`newNoSig`,`newNoBBCode`) " . "VALUES('" . $_auth["useid"] . "',NOW(),'" . addslashes($_POST["subject"]) . "','" . addslashes($_POST["comment"]) . "','{$noEmoticons}','{$noSig}','{$noBBCode}')");
        redirect(url("."));
    }
    ?>
			<div class="button normaltext" id="postNewsButton"
				onclick="<?php 
    if ($_isIE) {
        echo "document.location='" . url(".", array("postNews" => "yes")) . "'";
    } else {
        echo "make_invisible('postNewsButton'); make_visible('postNews');";
    }
    ?>
" style="float: right<?php 
    echo $_isIE && isset($_GET["postNews"]) ? "; display: none" : "";
    ?>
"><?php 
    echo _NEWS_POST;
Exemplo n.º 8
0
function eraseComments($comObjType, $comObj)
{
    if (!atLeastSModerator()) {
        return;
    }
    $sql = "SELECT `comid` FROM `comments`" . dbWhere(array("comObjType" => $comObjType, "comObj" => $comObj));
    $comResult = sql_query($sql);
    while ($comData = mysql_fetch_assoc($comResult)) {
        $sql = "DELETE FROM `comments`" . dbWhere(array("comid" => $comData["comid"]));
        sql_query($sql);
        eraseComments("com", $comData["comid"]);
    }
    mysql_free_result($comResult);
}
Exemplo n.º 9
0
<?php

$_documentTitle = "Frequently Asked Questions";
$allowEditMode = atLeastSModerator();
$isEditMode = $allowEditMode && isset($_GET["enableEditMode"]);
if ($allowEditMode && !$isEditMode) {
    ?>
	<div style="float : right;">
		<div class="button"><a href="<?php 
    echo url(".", array("enableEditMode" => "yes"));
    ?>
" class="smalltext">Edit Mode</a></div>
	</div>
	<?php 
}
if ($_cmd[2] == "tag") {
    include INCLUDES . "p_helpdesk!faq-tag.php";
    return;
}
if ($_cmd[3] != "") {
    include INCLUDES . "p_helpdesk!faq-article.php";
    return;
}
$cats = array();
$where = array();
if (!$isEditMode) {
    $where["hfcIsGeneral"] = 1;
}
if ($_cmd[2] != "") {
    $where["hfcIdent"] = $_cmd[2];
}
Exemplo n.º 10
0
							<?php 
                } else {
                    ?>
							<div class="mar_top">
								<a href="<?php 
                    echo url("edit/" . ($isExtras ? "e" : "") . $objid, array("edit" => "file"));
                    ?>
">
									<?php 
                    echo ($objData["objExtension"] == "txt" ? _TEXT : _FILE) . "/" . _THUMBNAIL;
                    ?>
</a>
							</div>
							<?php 
                }
                if (atLeastSModerator() || $useData["useid"] == $_auth["useid"] && $objData["objPendingUser"] != "1") {
                    if (!$objData["objDeleted"]) {
                        ?>
								<div class="mar_top">
									<a onclick="return confirm('<?php 
                        echo _ARE_YOU_SURE;
                        ?>
')"
										href="<?php 
                        echo url("edit/" . ($isExtras ? "e" : "") . $objid, array("edit" => "delete"));
                        ?>
">
										<?php 
                        echo _DELETE;
                        ?>
</a>
Exemplo n.º 11
0
<?php

if (!atLeastSModerator() && $_auth["useid"] != 34814) {
    include INCLUDES . "p_notfound.php";
    return;
}
if (isset($_GET["reset"])) {
    sql_query("UPDATE `profiler` SET `prfCount` = '0', `prfTime` = '0' WHERE 1");
    redirect(url("."));
}
if (isset($_GET["wmark"])) {
    sql_query("DELETE FROM `profiler` WHERE `prfCount` < 100");
    sql_query("UPDATE `profiler` SET `prfWMCount` = `prfCount`, `prfWMTime` = `prfTime` WHERE 1");
    sql_query("UPDATE `profiler` SET `prfCount` = '0', `prfTime` = '0' WHERE 1");
    redirect(url("."));
}
?>
<div class="container2">

<div>
	<a href="<?php 
echo url(".");
?>
">Refresh</a>
	&middot;
	<a onclick="return confirm('<?php 
echo _ARE_YOU_SURE;
?>
')"
		href="<?php 
echo url(".", array("wmark" => "yes"));
Exemplo n.º 12
0
<?php

$cluid = intval($_cmd[1]);
$extraRights = atLeastSModerator();
$result = sql_query("SELECT * FROM `clubs`,`cluExtData` WHERE `cluid` = '{$cluid}' AND `cluEid` = `cluid` LIMIT 1");
if (!($cluData = mysql_fetch_assoc($result))) {
    include INCLUDES . "p_notfound.php";
    return;
}
$_documentTitle = ($cluData["cluIsProject"] ? _PROJECT : _CLUB1) . ": " . $cluData["cluName"] . ": " . _MEMBERS;
?>

<div class="header">
	<div class="f_right mar_left a_center normaltext">
		<?php 
echo getClubIcon($cluData["cluid"]);
?>
	</div>
	<div class="f_left mar_right header_title">
		<?php 
echo $cluData["cluName"];
?>
		<div class="subheader"><?php 
echo _MEMBERS;
?>
</div>
	</div>
	<?php 
$active = 3;
include INCLUDES . "mod_clubmenu.php";
?>
Exemplo n.º 13
0
    $comData["comCreator"] = $jouData["jouAnnCreator"];
    $comData["comComment"] = $jouData["jouEntry"];
    $comData["comSubject"] = $jouData["jouTitle"];
    $comData["comSubmitDate"] = $jouData["jouSubmitDate"];
    $comData["comSubmitIp"] = $jouData["jouSubmitIp"];
    $comData["comLastEdit"] = $jouData["jouLastEdit"];
    $comData["comEditIp"] = $jouData["jouEditIp"];
    $comData["comNoEmoticons"] = $jouData["jouNoEmoticons"];
    $comData["comNoSig"] = $jouData["jouNoSig"];
    $comData["comNoBBCode"] = $jouData["jouNoBBCode"];
    $comData["comAllowImage"] = true;
    showComment($comData, 0);
    ?>
				</div>
				<?php 
    if ($currentEntry["jouAnnCreator"] == $_auth["useid"] || atLeastSModerator()) {
        $urlEdit = url(".", array("action" => "edit"));
        $urlDelete = url(".", array("action" => "delete"));
        ?>
					<div class="mar_bottom" style="margin-top: -8px">
						<?php 
        iefixStart();
        ?>
						<div class="button" style="float: right" onclick="if(confirm('<?php 
        echo _ARE_YOU_SURE;
        ?>
')) document.location='<?php 
        echo $urlDelete;
        ?>
'">
							<a href="<?php 
Exemplo n.º 14
0
function showComment($comData, $level, $showParent = false, $markAsReadId = '', $commentCountId = '', $markAsReadId2 = '')
{
    global $_config, $_signatureCache, $_auth, $_cmd, $_currentPageURL;
    // _HACKFIX - facsimilnym 2011-09-05
    // Workaround for the "blank" useDateFormat that ~140,000 users have.
    // Setting it up here, since there's like 5 code paths.
    if (!isset($_auth["useDateFormat"]) || $_auth["useDateFormat"] == "") {
        $_auth["useDateFormat"] = "Y-m-d \\@ g:i A";
    }
    if (isset($comData["pmsid"])) {
        $comData["comid"] = $comData["pmsid"];
        $comData["comCreator"] = $comData["pmsCreator"];
        $comData["comNoEmoticons"] = $comData["pmsNoEmoticons"];
        $comData["comNoSig"] = $comData["pmsNoSig"];
        $comData["comNoBBCode"] = $comData["pmsNoBBCode"];
        $comData["comSubject"] = $comData["pmsTitle"];
        $comData["comSubjectDateHide"] = true;
        $comData["comComment"] = $comData["pmsComment"];
        $comData["comObj"] = $comData["pmsObj"];
        $comData["comObjType"] = "pms";
        $comData["comSubmitDate"] = $comData["pmsSubmitDate"];
        $comData["comSubmitIp"] = $comData["pmsSubmitIp"];
        $comData["comLastEdit"] = $comData["pmsLastEdit"];
        $comData["comEditIp"] = $comData["pmsEditIp"];
        $comData["comTotalEdits"] = $comData["pmsTotalEdits"];
        $comData["comPmUser"] = $comData["pmsPmUser"];
    }
    if (isTwit($comData["comCreator"])) {
        return;
    }
    if (!isLoggedIn()) {
        $result = sql_query("SELECT `useGuestAccess` FROM `useExtData`" . dbWhere(array("useEid" => $comData["comCreator"])));
        if (!mysql_result($result, 0)) {
            return;
        }
    }
    $commentID = "yg-cmt" . $comData["comid"];
    $instantReplyOuterId = $commentID . "InstantReplyOuter";
    $instantReplyId = $commentID . "InstantReplyId";
    if (!isset($comData["comNoEmoticons"])) {
        $comData["comNoEmoticons"] = false;
    }
    if (!isset($comData["comNoSig"])) {
        $comData["comNoSig"] = false;
    }
    if (!isset($comData["comNoBBCode"])) {
        $comData["comNoBBCode"] = false;
    }
    if (isset($comData["pmsid"])) {
        if ($comData["comCreator"] != $_auth["useid"] && $comData["comPmUser"] != $_auth["useid"]) {
            echo '<div class="container2">' . _PM_NO_ACCESS . '</div>';
            return;
        }
    }
    $levellim = $level < 8 ? $level : 8;
    for ($i = 0; $i <= $levellim; $i++) {
        ?>
		<div class="<?php 
        echo $i == $levellim ? "pad_top" : "";
        echo $level > 0 && $i < $levellim ? "cmt_border_left" : "";
        ?>
">
		<?php 
    }
    //	if($_cmd[0] != "comment")
    echo '<a name="comment' . $comData["comid"] . '"></a>';
    //	echo '<div'.($markAsReadId != "" ? ' id="'.$markAsReadId.'"' : "" ).'>'; // Comment outer
    //	echo '<div'.($markAsReadId != "" ? ' id="'.$markAsReadId.'_"' : "" ).' class="container2">'; // Comment body
    echo '<div class="container2">';
    // Comment body
    iefixStart();
    // display parent comment
    if ($showParent && isset($comData["comObjType"]) && $comData["comObjType"] == "com") {
        $result = sql_query("SELECT * FROM `comments` WHERE `comid` = '" . $comData["comObj"] . "' LIMIT 1");
        if ($parData = mysql_fetch_assoc($result)) {
            ?>
			<div class="caption reminder_cap">
				<?php 
            echo sprintf(_WROTE, getUserLink($parData["comCreator"]));
            ?>
:
			</div>
			<div class="reminder">
				<?php 
            echo formatText($parData["comComment"], $parData["comNoEmoticons"], $parData["comNoBBCode"]);
            ?>
			</div>
			<?php 
        }
    } elseif ($showParent && isset($comData["pmsid"])) {
        $result = sql_query("SELECT * FROM `pms` WHERE `pmsid` = '" . $comData["comObj"] . "' LIMIT 1");
        if ($parData = mysql_fetch_assoc($result)) {
            if ($parData["pmsCreator"] == $_auth["useid"] || $parData["pmsPmUser"] == $_auth["useid"]) {
                ?>
				<div class="caption reminder_cap">
					<?php 
                echo sprintf(_WROTE, getUserLink($parData["pmsCreator"]));
                ?>
:
				</div>
				<div class="reminder">
					<?php 
                echo formatText($parData["pmsComment"], $parData["pmsNoEmoticons"], $parData["pmsNoBBCode"]);
                ?>
				</div>
				<?php 
            }
        }
    }
    if ($comData["comCreator"] != 0) {
        ?>
		<div class="f_right mar_left a_center" style="position: relative; top: -3px; left: 3px">
			<?php 
        echo getUserAvatar("", $comData["comCreator"], true);
        ?>
		</div>
		<?php 
    }
    if (isset($comData["comSubject"])) {
        if (!isset($comData["comSubjectDateHide"])) {
            ?>
<div class="smalltext mar_bottom"><?php 
            // Show IPs to moderators+ (as an acronym).
            if (atLeastModerator() && isset($comData["comSubmitIp"]) && isset($comData["comEditIp"])) {
                ?>
				<acronym style="cursor: help" title="Submitted from <?php 
                echo getDotDecIp($comData["comSubmitIp"]);
                ?>
, last edited from <?php 
                echo getDotDecIp($comData["comEditIp"]);
                ?>
">
				<?php 
            }
            printf(_COMMENT_POSTED_ON, gmdate($_auth["useDateFormat"], applyTimezone(strtotime($comData["comSubmitDate"]))));
            // Close the acronym opened above.
            if (atLeastModerator() && isset($comData["comSubmitIp"]) && isset($comData["comEditIp"])) {
                ?>
				</acronym>
				<?php 
            }
            ?>
</div><?php 
        }
        ?>
		<div class="largetext mar_bottom"><b><?php 
        echo formatText($comData["comSubject"], false, true);
        ?>
</b></div>
		<?php 
    }
    ?>
	<div class="commentData">
		<?php 
    $allowImages = isset($comData["comAllowImages"]) && $comData["comAllowImages"];
    echo formatText($comData["comComment"], $comData["comNoEmoticons"], $comData["comNoBBCode"], $allowImages);
    ?>
	</div>
	<?php 
    if (!$comData["comNoSig"] && $_cmd[0] != "updates") {
        if (!isset($_signatureCache[$comData["comCreator"]])) {
            $result = sql_query("SELECT `useSignature` FROM `useExtData` WHERE `useEid` = '" . $comData["comCreator"] . "' LIMIT 1");
            if (mysql_num_rows($result)) {
                $_signatureCache[$comData["comCreator"]] = mysql_result($result, 0);
            } else {
                $_signatureCache[$comData["comCreator"]] = "";
            }
        }
        if ($_signatureCache[$comData["comCreator"]] != "") {
            ?>
			<div class="hline" style="margin-right: 60px;">&nbsp;</div>
			<div class="smalltext">
			<?php 
            echo formatText($_signatureCache[$comData["comCreator"]]);
            ?>
			</div>
			<?php 
        }
    }
    ?>
	<div class="clear">&nbsp;</div>
	<?php 
    if (isset($comData["newid"])) {
        // News page.
        $result = sql_query("SELECT COUNT(*) FROM `comments` " . "WHERE `comObjType` = 'new' AND `comObj` = '" . $comData["newid"] . "'");
        $newsCount = mysql_result($result, 0);
        $newsURL = url("news/" . $comData["newid"]);
        ?>
		<div class="sep">
			<a href="<?php 
        echo $newsURL;
        ?>
">
			<span class="button smalltext" style="float: right"
				onclick="document.location='<?php 
        echo $newsURL;
        ?>
';"><?php 
        echo _COMMENTS;
        ?>
				<?php 
        if (!$_auth["useStatsHide"]) {
            echo "(" . fuzzy_number($newsCount) . ")";
        }
        ?>
			</span></a>
		</div>
		<?php 
    }
    if ($comData["comid"]) {
        ?>
		<div class="sep commentActions">
			<?php 
        getCommentParent($comData, $parentURL, $parentType, $parentTitle, false);
        getCommentParent($comData, $rootURL, $rootType, $rootTitle, true);
        $replyURL = url("comment/" . $comData["comid"] . ($_config["checkSubmitDate"] ? "/" . preg_replace('/[^0-9]/', "", $comData["comSubmitDate"]) : ''));
        $replyCommentId = $commentID . "ReplyCommentId";
        $replyButtonId = $commentID . "ReplyButtonId";
        $replyScript = "var elin = get_by_id( '" . $instantReplyId . "' );" . "var elb = get_by_id( '" . $replyButtonId . "' );" . "if( !elb ) return false;" . "if( elb.innerHTML == '" . _CANCEL . "' ) {" . "  reset_focus(); " . "  collapseAnim( '{$instantReplyOuterId}', -30, 0, '' ); " . "  elb.innerHTML = '" . _REPLY . "';" . "  return false;" . "}" . "_IR = { " . "commentId: '" . $replyCommentId . "'," . "commentName: 'comment'," . "commentDefault: ''," . "commentWide: true," . "commentRows: 7," . "commentNoBBCode: " . (isLoggedIn() && $_auth["useNoBBCode"] ? "true" : "false") . "," . "commentNoEmoticons: " . (isLoggedIn() && $_auth["useNoEmoticons"] ? "true" : "false") . "," . "commentNoOptions: false," . "commentNoSig: " . (isLoggedIn() && $_auth["useNoSig"] ? "true" : "false") . "," . "emoticonPopupURL: '" . url("emoticons", array("popup" => "yes", "comment" => $replyCommentId)) . "'," . "previewURL: '" . url("preview", array("popup" => "yes")) . "'" . "};" . "var ht = showReplyForm( '" . $replyURL . "', '" . $_currentPageURL . "' );" . "elin.innerHTML = ht;" . "collapseAnim( '{$instantReplyOuterId}', 30, 0, 'set_focus( \\'' + _IR.commentId + '\\' );' ); " . "elb.innerHTML = '" . _CANCEL . "';" . "return false;";
        if (!isset($comData["pmsid"]) && $replyURL != url(".") && $_cmd[0] != "editcomment") {
            ?>
				<span class="button smalltext" style="float: right"
					id="<?php 
            echo $replyButtonId;
            ?>
" onclick="<?php 
            echo $replyScript;
            ?>
">
					<?php 
            echo _REPLY;
            ?>
				</span>
				<?php 
        }
        if ($_cmd[0] == "comment" && $rootURL != url(".") && $level == 0) {
            ?>
				<a href="<?php 
            echo $rootURL;
            ?>
" title="<?php 
            echo htmlspecialchars($rootTitle);
            ?>
">
				<span class="button smalltext" style="float: right"
					onclick="document.location='<?php 
            echo $rootURL;
            ?>
';">
					<?php 
            echo _ROOT;
            ?>
 (<?php 
            echo $rootType;
            ?>
)
				</span></a>
				<?php 
        }
        if ($_cmd[0] == "comment" && $parentURL != url(".") && $level == 0 && $parentURL != $rootURL) {
            ?>
				<a href="<?php 
            echo $parentURL;
            ?>
" title="<?php 
            echo htmlspecialchars($parentTitle);
            ?>
">
				<span class="button smalltext" style="float: right"
					onclick="document.location='<?php 
            echo $parentURL;
            ?>
';">
					<?php 
            echo _PARENT;
            ?>
 (<?php 
            echo $parentType;
            ?>
)
				</span></a>
				<?php 
        }
        if ($_cmd[0] == "updates") {
            $comid = $comData["comid"];
            $script = "add_operation( 'm{$comid}' );\n" . "\$('{$markAsReadId}').hide(); " . ($markAsReadId2 != "" ? "if() \$('{$markAsReadId2}').hide(); " : "") . "var elb = \$( '{$replyButtonId}' );" . "if( !elb ) return false;" . "if( elb.innerHTML == '" . _CANCEL . "' ) {" . "  reset_focus(); " . "  collapseAnim( '{$instantReplyOuterId}', -30, 0, '' ); " . "  elb.innerHTML = '" . _REPLY . "';" . "  return false;" . "}" . "comment_count--; " . "\$('_updCmtCnt').innerHTML = fuzzy_number( comment_count ); " . "\$('_globCmtCnt').innerHTML = fuzzy_number( comment_count );";
            ?>
				<div id="<?php 
            echo $id1 = $commentID . "Updates1";
            ?>
" class="button smalltext" style="display: none; float: right"
					onclick="<?php 
            echo $script;
            ?>
"><?php 
            echo _MARK_AS_READ;
            ?>
: <span class="error"><?php 
            echo _CLICK_TO_CONFIRM;
            ?>
</span></div>
				<div id="<?php 
            echo $id2 = $commentID . "Updates2";
            ?>
" class="button smalltext" style="float: right"
					onclick="$('<?php 
            echo $id1;
            ?>
').show(); $('<?php 
            echo $id2;
            ?>
').hide();"><?php 
            echo _MARK_AS_READ;
            ?>
</div>
				<?php 
        }
        if ((atLeastSModerator() || $comData["comCreator"] == $_auth["useid"]) && $_cmd[0] != "editcomment" && $_cmd[0] != "updates") {
            $editURL = isset($comData["pmsid"]) ? url("editpm/" . $comData["pmsid"]) : url("editcomment/" . $comData["comid"]);
            ?>
				<a href="<?php 
            echo $editURL;
            ?>
">
				<span class="button smalltext" style="float: right"
					onclick="document.location='<?php 
            echo $editURL;
            ?>
';">
					<?php 
            echo _EDIT;
            ?>
				</span></a>
				<?php 
        }
        ?>
			<div class="f_left mar_top smalltext">
				<?php 
        // Show IPs to moderators+ (as an acronym).
        if (atLeastModerator()) {
            ?>
					<acronym style="cursor: help" title="Submitted from <?php 
            echo getDotDecIp($comData["comSubmitIp"]);
            ?>
, last edited from <?php 
            echo getDotDecIp($comData["comEditIp"]);
            ?>
">
					<?php 
        }
        if (!isset($comData["pmsid"])) {
            ?>
					<a class="originalUrl" href="<?php 
            echo $replyURL;
            ?>
">#</a>
					<?php 
        }
        printf(_COMMENT_POSTED_ON, gmdate($_auth["useDateFormat"], applyTimezone(strtotime($comData["comSubmitDate"]))));
        if (isset($comData["comTotalEdits"]) && $comData["comTotalEdits"] > 0) {
            echo "<br />" . sprintf(_COMMENT_EDITED, $comData["comTotalEdits"], gmdate($_auth["useDateFormat"], applyTimezone(strtotime($comData["comLastEdit"]))));
        }
        // Close the acronym opened above.
        if (atLeastModerator()) {
            ?>
					</acronym>
					<?php 
        }
        ?>
			</div>
		</div>
		<?php 
    }
    ?>
	<div class="clear">&nbsp;</div>
	<?php 
    iefixEnd();
    echo '</div>';
    // Comment body
    //echo '</div>'; // Comment outer
    ?>
	<table cellspacing="0" cellpadding="0" width="100%"><tr><td>
	<div id="<?php 
    echo $instantReplyOuterId;
    ?>
" style="display: none">
		<div class="cmt_border_left" style="padding: 4px; padding-right: 0;" id="<?php 
    echo $instantReplyOuterId;
    ?>
_">
			<div class="caption smalltext"><?php 
    echo _REPLY;
    ?>
:</div>
			<div style="padding: 1px; padding-bottom: 5px" id="<?php 
    echo $instantReplyId;
    ?>
"><br /></div>
		</div>
	</div>
	</td></tr></table>
	<?php 
    for ($i = 0; $i <= $levellim; $i++) {
        echo "</div>";
    }
}