PHP
5
Вклад в тег
this.props.navigation.setParams({
makeSaveRequestCallback: this.makeSaveRequest.bind(this)
});
navigation.state.makeSaveRequestCallback();
$access_token = "Токен"
switch($data->type) {
case 'video_new':
$video_id = $data->object->id;
$video_owner_id = $data->object->owner_id;
$videos = $video_owner_id . '_'.$video_id;
$videoInfo = file_get_contents("https://api.vk.com/method/video.get?videos={$videos}&count=1&extended=1&v=5.95&access_token={$access_token}");
$iframe = "<iframe src=\"{$videoInfo['response'][items][0]['player']}\" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>";
if (isset($data->object->live)) { $video_live = $data->object->live; }
if ($video_live == 1) {
file_put_contents('./frame.txt', $iframe);
}
break;
}
$(".game-thumb").each(function(index, el){
var gamethumbnum1 = Number($(el).find('.new-price span').text());
var gamethumbnum2 = Number($(el).find('.old-price span').text());
var gamethumbnum = 100 - (gamethumbnum1*100/gamethumbnum2);
$(el).find('.percent-price').text("-" + gamethumbnum + "%");
});