Example #1
0
function getFeedback($tid, $fid)
{
    $data = array();
    global $_G;
    $lastpostid = 0;
    if ($_G['forum_thread']["author"] == $_G['forum_thread']["lastposter"]) {
        $lastpostid = $_G['forum_thread']["authorid"];
    } else {
        $userarr = C::t("common_member")->fetch_by_username($_G['forum_thread']["lastposter"]);
        if (is_array($userarr) && !empty($userarr)) {
            $lastpostid = $userarr["uid"];
        }
    }
    //$lastpostid == uid ?
    $_G['forum_thread']["lastpostid"] = $lastpostid;
    $_G['forum_thread']['lastpost'] = date("Y-m-d H:i", $_G['forum_thread']['lastpost']);
    $_G['forum_thread']['dateline'] = date("Y-m-d", $_G['forum_thread']['dateline']);
    $data = C::t('#bug_feedback#feedback_bug')->fetch_by_tid($tid);
    if ($data["snapshot"] == 1) {
        $data["attachlist"] = getAttachlist($tid);
    }
    if ($data["model"]) {
        $data["model_name"] = getDataBycode('MODEL_DATA', $data["model"]);
    }
    if ($data["product_version"]) {
        $data["product_version_name"] = getDataBycode('VERSION_DATA', $data["product_version"]);
    }
    if ($data["logurl"]) {
        if (strpos($data["logurl"], '|') > -1) {
            $logarr = explode('|', $data["logurl"]);
            if (count($logarr) == 2 && !empty($logarr[0]) && $logarr[0] != "''" && !empty($logarr[1]) && $logarr[1] != "''") {
                $data["logname"] = $logarr[1];
                $data["logurl"] = $logarr[0];
            }
            unset($logarr);
        }
    }
    return $data;
}
Example #2
0
function getFeedback($tid, $fid)
{
    $data = array();
    global $_G;
    $lastpostid = 0;
    if ($_G['forum_thread']["author"] == $_G['forum_thread']["lastposter"]) {
        $lastpostid = $_G['forum_thread']["authorid"];
    } else {
        $userarr = C::t("common_member")->fetch_by_username($_G['forum_thread']["lastposter"]);
        if (is_array($userarr) && !empty($userarr)) {
            $lastpostid = $userarr["uid"];
        }
    }
    //$lastpostid == uid ?
    $_G['forum_thread']["lastpostid"] = $lastpostid;
    $_G['forum_thread']['lastpost'] = date("Y-m-d H:i", $_G['forum_thread']['lastpost']);
    $_G['forum_thread']['dateline'] = date("Y-m-d", $_G['forum_thread']['dateline']);
    $data = C::t('#product_proposal#feedback_proposal')->fetch_by_tid($_G['tid']);
    if ($data["snapshot"] == 1) {
        $data["attachlist"] = getAttachlist($_G['tid']);
    }
    return $data;
}