Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<?
global $template;
if(!$_GET['site']){
sql_query("UPDATE ".TABLE_TOPICS." SET topic_views=topic_views+1 WHERE topic_id='".$_GET['topic_id']."' LIMIT 1");
}
$res=sql_query("SELECT * FROM ".TABLE_POSTS." AS p
LEFT JOIN ".TABLE_USER." AS u ON u.user_id=p.poster_id
LEFT JOIN ".TABLE_STARS." AS s ON u.user_id=s.user_id
WHERE p.topic_id='".$_GET['topic_id']."'");
while($row=mysql_fetch_assoc($res)){
$posts[$row['post_id']]=$row;
}
$template->set_filenames(array('content' => 'content_view_posts.htm'));
$res=sql_query("SELECT * FROM ".TABLE_FORUM." AS f
LEFT JOIN ".TABLE_TOPICS." AS t ON t.topic_id='".$_GET['topic_id']."'
WHERE f.forum_id='".$_GET['forum_id']."' LIMIT 1");
$row=mysql_fetch_assoc($res);
$page=$_GET['page'] ? $_GET['page'] : 1;
$template->assign_vars(array( "V_FORUM_ID"=>$_GET['forum_id'],
"V_TOPIC_ID"=>$_GET['topic_id'], 'V_FORUM_NAME'=>$row['forum_name_ru'],
'V_TOPIC_NAME'=>$row['topic_name'], 'SELECT_SITE'=>make_pages_post(count($posts),$page,$site_config['posts_per_page']),
'V_SITES'=>$pages, 'U_VIEW_TOPIC'=>get_href_link('forum.php','act=view_topic&forum_id='.$_GET['forum_id'])
));
$i=0;
foreach ($posts as $post_id=>$post_data){
if($i>=$page*$site_config['posts_per_page']-$site_config['posts_per_page'] && $i<$page*$site_config['posts_per_page']){
$other=array('post_time'=>date("h:i",$post_data['post_time']),
'post_date'=>date("d.m.y",$post_data['post_time']),
'V_ROW'=>get_other_string(array("row2","row3"),$vf++)
);
$ausgabe=array_merge($post_data,$other);
$template->assign_block_vars("r",$ausgabe);
}
$i++;
}
$template->assign_var_from_handle('content', 'content');
?>