コード例 #1
0
ファイル: getComment.php プロジェクト: MungBeanSoup/Delete-So
$row4['type'] = $acMsg['type'];
$row4['title'] = $acMsg['title'];
$row4['up'] = $acMsg['up'];
$row4['postTime'] = $acMsg['postTime'];
$result = mysql_query($sql4);
$store4 = rePrint($row4);
$objs4[] = $store4;
$acMsgSQL = mysql_query("SELECT * FROM accommentsinfo WHERE id = " . $row5['acid']);
$acMsg = mysql_fetch_array($acMsgSQL, MYSQL_ASSOC);
$row5['url'] = $acMsg['url'];
$row5['type'] = $acMsg['type'];
$row5['title'] = $acMsg['title'];
$row5['up'] = $acMsg['up'];
$row5['postTime'] = $acMsg['postTime'];
$result = mysql_query($sql5);
$store5 = rePrint($row5);
$objs5[] = $store5;
/*header("header('Content-type: text/json');");*/
header("Access-Control-Allow-Origin:*");
echo '{"title1":[';
echo json_encode($row1);
echo '],"comments1":';
echo json_encode($objs1);
echo ',"title2":[';
echo json_encode($row2);
echo '],"comments2":';
echo json_encode($objs2);
echo ',"title3":[';
echo json_encode($row3);
echo '],"comments3":';
echo json_encode($objs3);
コード例 #2
0
        $emojNum = substr($limit, $k + 1, 2);
        $store4['content'] = substr_replace($store4['content'], "<img src=\"asset/image/emoj/" . $emojType . "/" . $emojNum . ".gif\">", $i, $j);
    }
    $store4['content'] = preg_replace("/(\\[(.*?)\\])/", "", $store4['content']);
    $objs4[] = $store4;
}
$acMsgSQL = mysql_query("SELECT * FROM accommentsinfo WHERE id = " . $row5['acid']);
$acMsg = mysql_fetch_array($acMsgSQL, MYSQL_ASSOC);
$row5['url'] = $acMsg['url'];
$row5['type'] = $acMsg['type'];
$row5['title'] = $acMsg['title'];
$row5['up'] = $acMsg['up'];
$row5['postTime'] = $acMsg['postTime'];
$result = mysql_query($sql5);
while ($store5 = mysql_fetch_row($result, MYSQL_ASSOC)) {
    $store5 = rePrint($store5);
    $objs5[] = $store5;
}
/*header("header('Content-type: text/json');");*/
header("Access-Control-Allow-Origin:*");
echo '{"title1":[';
echo json_encode($row1);
echo '],"comments1":';
echo json_encode($objs1);
echo ',"title2":[';
echo json_encode($row2);
echo '],"comments2":';
echo json_encode($objs2);
echo ',"title3":[';
echo json_encode($row3);
echo '],"comments3":';