function verifyLogin($username, $password, $persistentLogin = 0)
{
    global $db, $_config;
    $result = sql_query("SELECT `useid`,`useIsSuspended`,`useIsBanned`,`useIsActive`,`useEmail`,`useUsername`,`useSuspendedReason` FROM `users`,`useExtData` WHERE `useid` = `useEid` AND `useUsername` = '" . mysql_real_escape_string($username) . "' AND `usePassword` = '" . SHA1($password) . "' LIMIT 1", $db);
    // find user data
    if (mysql_num_rows($result)) {
        $loginData = mysql_fetch_assoc($result);
        // get user data
        if (!$loginData["useIsActive"]) {
            notice(sprintf(_USE_INACTIVE, $loginData["useEmail"]));
            // alert user that they should activate the account
            echo '<div class="sep"><a href="' . url("emailresend/" . strtolower($loginData["useUsername"])) . '">' . _USE_ACTIVATE_RESEND . '</a></div>';
            echo '<div class="sep"><a href="' . url("emailchange/" . strtolower($loginData["useUsername"])) . '">' . _USE_ACTIVATE_CHANGE . '</a></div>';
            return false;
            // fail login verification
        } elseif ($loginData["useIsBanned"]) {
            notice(sprintf(_ABUSE_BANNED_NOTICE, $loginData["useSuspendedReason"]));
            // alert user that they are banned
            sql_query("DELETE FROM `sessions` WHERE `sesCreator` = '" . $loginData["useid"] . "'", $db);
            // remove all user sessions
            return false;
            // fail login verification
        } elseif ($loginData["useIsSuspended"]) {
            $useSuspendedUntil = mysql_result(sql_query("SELECT UNIX_TIMESTAMP(`useSuspendedUntil`) FROM `useExtData` WHERE `useEid` = '" . $loginData["useid"] . "' LIMIT 1", $db), 0);
            // get suspension time
            if ($useSuspendedUntil <= time()) {
                sql_query("UPDATE `users` SET `useIsSuspended` = '0' WHERE `useid` = '" . $loginData["useid"] . "' LIMIT 1", $db);
                // suspension is over
                return createSession($loginData["useid"]);
                // succeed login verification
            } else {
                notice(sprintf(_ABUSE_SUSPENDED_NOTICE, gmdate($_config["dateFormat"], applyTimezone($useSuspendedUntil)), $loginData["useSuspendedReason"]));
                // alert user that they are suspended
                sql_query("DELETE FROM `sessions` WHERE `sesCreator` = '" . $loginData["useid"] . "'", $db);
                // remove all user sessions
                return false;
                // fail login verification
            }
        } else {
            return createSession($loginData["useid"], $persistentLogin);
        }
        // normal user, succeed login verification
    } else {
        // user not found or password mismatch
        notice(_USE_LOGIN_ERROR);
        return false;
        // fail login verification
    }
}
			<a name="modlog"></a>
			<?php 
if (isset($_GET['all'])) {
    $modLimit = "";
} else {
    $modLimit = "LIMIT {$modOffset},30";
}
$modResult = sql_query("SELECT * FROM `adminChat` ORDER BY `adcSubmitdate` DESC {$modLimit}");
while ($modData = mysql_fetch_assoc($modResult)) {
    ?>
				<div class="sep mar_left mar_right">
					#<?php 
    echo $modData["adcId"];
    ?>
 - <?php 
    echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($modData["adcSubmitDate"])));
    ?>
					- <?php 
    echo getUserLink($modData["adcCreator"]);
    ?>
:
					<?php 
    echo formatText($modData["adcText"]);
    ?>
				</div>
				<?php 
}
mysql_free_result($modResult);
?>
			<div class="sep a_center">
				<?php 
Exemple #3
0
echo _NEWS;
?>
		</div>
		<table cellspacing="4" cellpadding="0" border="0" width="300">
		<?php 
$newResult = sql_query("SELECT * FROM `news` " . "ORDER BY `newSubmitDate` DESC LIMIT 5");
$first = true;
while ($newData = mysql_fetch_assoc($newResult)) {
    $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 
			<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 />
								<?php 
        if (time() - $_config["abuseGrace"] < strtotime($abuData["abuCloseDate"])) {
            echo "On Hold for Deletion Until:<br /> " . gmdate($_auth["useDateFormat"], applyTimezone(strtotime($abuData["abuCloseDate"]) + $_config["abuseGrace"]));
        } else {
            echo "Eligible for Deletion";
        }
        ?>
						</div></td>
							</tr>
						<?php 
    } elseif (!$abuData["abuResolved"] && trim($abuData["abuReason"]) != "" && $abuData["abuMod"] != $abuData["abusMod"] && $abuData["aburMod"] == "?") {
        ?>
							<tr class="v_top">
								<td class="a_right"></td>
								<td><div class="error"><b>Waiting on Administrator</b></div></td>
							</tr>
						<?php 
    }
Exemple #5
0
			</div>
			<form action="<?php 
    echo url(".");
    ?>
" method="post">
			<div class="sep mar_left mar_right">
				<div class="caption">
					<?php 
    echo sprintf(_MOD_SUSPENDED_UNTIL, getUserLink($useData["useid"]));
    ?>
:
				</div>
				<div>
					<input type="text" name="suspendUntil" size="40"
						value="<?php 
    echo gmdate("j F Y H:i", applyTimezone($suspendedUntil));
    ?>
" />
				</div>

				<div class="mar_left smalltext">
					<?php 
    $susLeft = $suspendedUntil - time();
    $susLeft = round(($susLeft < 0 ? 0 : $susLeft) / (60 * 60 * 24));
    ?>
					(<?php 
    echo sprintf(_MOD_SUSPENDED_LEFT, $susLeft);
    ?>
)
				</div>
Exemple #6
0
				<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">&nbsp;</div>
				<?php 
        iefixEnd();
        $togo--;
        if ($togo == 0) {
            break;
        }
    }
    if (count($entries) == 9) {
        ?>
				<div class="a_right">
					<a class="disable_wrapping smalltext" href="<?php 
        echo url("announcement/" . $cluid);
Exemple #7
0
    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"])));
    ?>
				</div>
				<div class="clear">&nbsp;</div>
				<?php 
    iefixEnd();
    $found = true;
}
if (!$found) {
    echo _PM_NONE_FOUND;
}
?>
        <button type="submit" class="submit button" style="vertical-align: middle;">Delete</button>
        </form>
		</div>
		<div class="sep">
Exemple #8
0
        ?>
 
						(<a href="javascript:popup('<?php 
        echo url("favs/" . $objData['objid'] . "", array("popup" => "yes"));
        ?>
','tos',900,600)">Who?</a>)
					</div>
					
					<?php 
    }
}
// Show submission date
?>
			<div class="a_right smalltext">
				<?php 
printf(_COMMENT_POSTED_ON, gmdate($_auth["useDateFormat"], applyTimezone(strtotime($objData["objSubmitDate"]))));
?>
			</div>
		</div>
		<?php 
/*
if( atLeastModerator() || $objData[ "objCreator" ] == $_auth[ "useid" ])
{
	?>
	<div class="sep caption"><?= _EDIT_SUBMISSION ?>:</div>
	<div class="container2">
		<b>Notice</b>: Please click on the &quot;Edit submission&quot;
		tab on the top of the page to edit this submission. This notice
		will be removed later.
	</div>
	<?
Exemple #9
0
    ?>
</b>:
					<?php 
    echo formatText($objData["abuReason"]);
    ?>
				</div>
				<?php 
}
if ($objData["objPendingUser"]) {
    ?>
					<div class="mar_top">
						<b>Object is Pending User Input</b>:<br />
						Note, you must wait 48 hours before you can delete the image. You may restore the image at any time.<br />
						<?php 
    if (time() - $_config["abuseGrace"] < strtotime($objData["abuCloseDate"])) {
        echo "This submission may be deleted on " . gmdate($_auth["useDateFormat"], applyTimezone(strtotime($objData["abuCloseDate"]) + $_config["abuseGrace"]));
    }
    ?>
						<form action="<?php 
    echo url(".");
    ?>
" method="post">
						<div class="sep">
							<select id="<?php 
    echo $pendingActionId = generateId();
    ?>
" name="pendingAction" size="2">
								<?php 
    if (time() - $_config["abuseGrace"] > strtotime($objData["abuCloseDate"])) {
        ?>
								<option value="-">&ndash; <?php 
Exemple #10
0
$active = 1;
include INCLUDES . "mod_usermenu.php";
?>
</div>

<div class="container">
<?php 
iefixStart();
if ($useData["useIsBanned"] || $useData["useIsSuspended"]) {
    ?>
	<div class="container2 mar_top largetext">
	<?php 
    if ($useData["useIsBanned"]) {
        printf(_ABUSE_BANNED_NOTICE, formatText($useData["useSuspendedReason"]));
    } elseif ($useData["useIsSuspended"]) {
        printf(_ABUSE_SUSPENDED_NOTICE, gmdate($_auth["useDateFormat"], applyTimezone(strtotime($useData["useSuspendedUntil"]))), formatText($useData["useSuspendedReason"]));
    }
    ?>
	</div>
	<?php 
}
?>
<div class="header f_left">
	<?php 
echo _PROFILE;
?>
</div>
<div class="header f_right a_right">
	<?php 
echo isset($_GET["replied"]) ? _COMMENTS : _LEAVE_COMMENT;
?>
Exemple #11
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>";
    }
}
		<?php 
    $url = url("helpdesk/request/improve/faq/" . $faqData["hfqid"]);
    ?>
		<div class="mar_top">
			This article was created by <?php 
    echo getUserLink($faqData["hfqCreatedBy"]);
    ?>
 on <?php 
    echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($faqData["hfqCreateDate"])));
    if ($faqData["hfqEditDate"] != $faqData["hfqCreateDate"]) {
        ?>
				and was last modified by <?php 
        echo getUserLink($faqData["hfqEditedBy"]);
        ?>
 on <?php 
        echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($faqData["hfqEditDate"])));
    }
    ?>
.
		</div>
		<div class="mar_top">
			If you feel that this article is outdated, needs improvement
			or lacks some important tags that would help to link it better
			with the other articles, please <a href="<?php 
    echo $url;
    ?>
">report to helpdesk</a>.
		</div>
	</div>
	<?php 
}