function get_news_list(){
var today = new Date();
var timestamp = today.getTime();
var jsonDataUrl = "http://www.sympatik.jp/news/ajax/get_news.php?time="+timestamp;
$.getJSON(jsonDataUrl,function(json) {
successFunc(json);
return;
});
var successFunc = function(json) {
if(json == null){
// ニュースなし
} else {
// ニュースあり
var html = '';
var id = decodeURIComponent(json.id);
var date = decodeURIComponent(json.date);
var title = decodeURIComponent(json.title);
var content = decodeURIComponent(json.content);
html = html + '
';
html = html + '
新着情報
';
html = html + '
' + date + '
';
html = html + '
' + content + '
';
html = html + '
';
html = html + '
';
$('.news').html(html);
}
};
}
function get_achive_list(){
var today = new Date();
var timestamp = today.getTime();
var jsonDataUrl = "http://www.sympatik.jp/achive/ajax/get_achive.php?time="+timestamp;
$.getJSON(jsonDataUrl,function(json) {
successFunc(json);
return;
});
var successFunc = function(json) {
if(json == null){
// アーカイブなし
} else {
// アーカイブあり
var html = '';
var src = decodeURIComponent(json.src);
var top_title = decodeURIComponent(json.top_title);
html = html + '' + top_title + '
';
html = html + '';
$('.achive .inner').html(html);
}
};
}