shownews(); } function headlines() { global $sysadm, $webid; /* echo '
hide small
'; echo '
hide-medium
'; echo '
hide-large
'; */ $sql='SELECT * FROM org_texts WHERE webid='.$webid .' and txttype=3 and publishdate>"0000-00-00" and deletedate="0000-00-00" ORDER BY publishdate desc, id DESC LIMIT 20'; //echo $sql; $txt=read($sql,true); //echo '
Antal: '.count($txt); echo chr(10).'
'; //echo 'Aktuellt: '; echo 'Aktuellt: '; foreach($txt as $t) { echo ' '.$t['name'].' |'; //class="currentnews" } echo '
Visa alla artiklar'; echo '
'; } function news($article) { global $scriptname,$sysadm; echo '
'; //echo '

Underhåll pågår

'; echo '
'; //echo $article['id']; echo ''; echo '

'.$article['publishdate'].' '.age($article['publishdate']); if ($sysadm) { echo ' Ändra'; } echo '

'; echo '

'; //echo ''; echo ''.$article['name'].''; echo '

'; //section($article); if ($article['ingress']>'') { echo '
'.$article['ingress'].'
'; } showtext($article); echo '

Läs mer...

'; echo '
'; echo '
'; } function shownews() { global $person, $sysadm, $webid; echo '
'; headlines(); //echo '

Systemunderhåll pågår

'; //echo '

Programunderhåll pågår."

'; exit; echo '

Aktuellt

'; $sql='SELECT * FROM org_texts WHERE webid='.$webid .' and txttype=3 and publishdate>"0000-00-00" and deletedate="0000-00-00" ORDER BY publishdate desc, id DESC LIMIT 20'; //echo $sql; $articles=read($sql,true); if (!$articles) { echo '

Det finns inga texter

'; } else { $q=count($articles); //echo 'Antal artiklar: '.$q; echo '
'; echo '
'; //echo 'kol 1'; for($i=0; $i<=round($q/2); $i++) { //echo $i; news($articles[$i]); } echo '
'; echo '
'; //echo 'kol 2'; for($i=round($q/2+1); $i<$q; $i++) { //echo $i; news($articles[$i]); } echo '
'; echo '
'; } echo '
'; } //echo 'Underhåll pågår '.$webid; //sys_cache_main(); startapp(); htmlstart(); content_page(); htmlend(); //sys_cache_save();