?>
</td>
                <td class="okbc_td1"><?php 
                echo htmlspecialchars(mysql_result($dData['qlist'], $i, "category"));
                ?>
</td>
                <td class="okbc_td1"><?php 
                echo htmlspecialchars(mysql_result($dData['qlist'], $i, "subcategory"));
                ?>
</td>
                <td class="okbc_td1"><?php 
                echo htmlspecialchars(mysql_result($dData['qlist'], $i, "question"));
                ?>
</td>
                <td class="okbc_td2"><?php 
                echo dateStamp(mysql_result($dData['qlist'], $i, "date"));
                ?>
</td>
                <td class="okbc_td2"><?php 
                echo mysql_result($dData['qlist'], $i, "online");
                ?>
</td>
                <td class="okbc_td2"><?php 
                echo mysql_result($dData['qlist'], $i, "visited");
                ?>
</td>
                <td class="okbc_td2">
                  <form action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
" method="post">
Пример #2
0
/* ***** Unpack Subcategories for Selected Category *********** */
$dData['categories'] = mysql_query("SELECT * FROM `{$dData['tblcateg']}` ORDER BY `category`;");
if ($dData['usercat']) {
    $grabSubs = mysql_query("SELECT * FROM `{$dData['tblcateg']}` WHERE `category`='" . slashes($dData['usercat']) . "';");
    $dData['subcategories'] = unserialize(stripslashes(mysql_result($grabSubs, 0, "subcategory")));
} else {
    $dData['usersub'] = "";
}
/* ***** Get Selected Question ******************************** */
if (isset($_GET['qid'])) {
    $aData['action'] = true;
    $qQry = mysql_query("SELECT * FROM `{$dData['tblquest']}` WHERE `QID`='{$_GET['qid']}' AND `online`='Yes';");
    if (mysql_numrows($qQry) && preg_match("/\\d/", $_GET['qid'])) {
        $qIncre = mysql_query("UPDATE `{$dData['tblquest']}` SET `visited`='" . (mysql_result($qQry, 0, "visited") + 1) . "' WHERE `QID`='{$_GET['qid']}';");
        $aData['question'] = htmlspecialchars(mysql_result($qQry, 0, "question"));
        $aData['date'] = dateStamp(mysql_result($qQry, 0, "date"));
        $aData['category'] = htmlspecialchars(mysql_result($qQry, 0, "category"));
        $aData['subcategory'] = htmlspecialchars(mysql_result($qQry, 0, "subcategory"));
        $aData['answer'] = www_nl2br(mysql_result($qQry, 0, "answer"));
        $dData['pagetitle'] = $aData['question'];
    } else {
        $aData['action'] = false;
    }
}
/* ***** Do not cache this page ******************************* */
if (!isset($aData['action']) || $aData['action']) {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");