Example #1
0
}
$sn = (int) GtInput_Secure($parameters["sn"]);
if ($sn <= 0) {
    if ($lang == $GT_LANG_EN_US) {
        $sn = 1057;
    } else {
        if ($lang == $GT_LANG_ZH_TW) {
            $sn = 1093;
        } else {
            if ($lang == $GT_LANG_ZH_CN) {
                $sn = 1102;
            }
        }
    }
}
$page = (int) GtInput_Secure($parameters["page"]);
if ($page <= 0) {
    $page = 1;
}
$gotoUrl = "/forum/index?sn={$sn}";
$accountSn = GtAccount_GetSn();
$accountType = GtAccount_GetType($accountSn);
$sql = "SELECT name, keyword, subject FROM dir WHERE sn = '{$sn}' AND status = '{$GT_DIR_STATUS_PUBLISH}'";
$result = mysql_query($sql, $dbLink);
$row = mysql_fetch_array($result);
$name = $row[name];
$keyword = $row[keyword];
$subject = $row[subject];
$pageModule = t("FORUM");
$pageTitle = t($name);
$pageKeywords = t($keyword);
Example #2
0
        $parameters = $_POST;
    }
}
$sn = (int) GtInput_Secure($parameters["dirsn"]);
if ($sn == NULL) {
    $sn = 1;
}
//$name = GtInput_Secure($parameters["name"]);
//$desc = GtInput_SecureForArticle($parameters["desc"]);
$accountSn = GtAccount_GetSn();
$accountType = GtAccount_GetType($accountSn);
$og_image = GtInput_Secure($parameters["og_image"]);
$website = GtInput_Secure($parameters["website"]);
$og_title = GtInput_Secure($parameters["og_title"]);
$og_description = GtInput_SecureForArticle($parameters["og_description"]);
$og_site_name = GtInput_Secure($parameters["og_site_name"]);
$userCont = GtInput_SecureForArticle($parameters["userCont"]);
if ($og_title == "none") {
    $og_title = substr($userCont, 0, 20);
}
if (strlen($og_title) > 20) {
    $og_title = $og_title . "...";
}
$timeSec = GtTime_GetGmtTimeSec();
$sqlForum = "INSERT INTO forum SET dirSn = '{$sn}', website='{$website}', subject='{$og_site_name}', userCont='{$userCont}', imageUrl='{$og_image}', type = '{$GT_DIR_TYPE_ARTICLE}', name = '{$og_title}', description = '{$og_description}', status = '1', createAccountSn = '{$accountSn}', createTimeSec = '{$timeSec}', lang = '{$lang}'";
$resultForum = mysql_query($sqlForum, $dbLink);
//$og_image=$_GET["og_image"];
//$json_e = json_encode("og_image = $og_image, website = $website, og_title = $og_title, og_description = $og_description, og_site_name = $og_site_name, userCont = $userCont");
//echo $json_e;
//
//success