^connect[$connect_string]{ ^string:sql{select head from news where id='^form:pid.int(0)'}. Православие на Северной земле. } ^if(def $form:pid){ ^connect[$connect_string]{ $news[^table::sql{select razdel, region_id, rub_id, topic_id, problem_id, date, head, anons, body, pic_body from news where id=^form:pid.int(0)}] } } ^if($news){ # $repl[^table::create[nameless]{^taint[^#0A]

}] $anons[^if(^news.anons.mid(0;5) eq " "){^news.anons.mid(6)}{$news.anons}] $body[^if(^news.body.mid(0;5) eq " "){^news.body.mid(6)}{$news.body}] $date[^date::create[$news.date]] ^connect[$connect_string]{ $region[^string:sql{select name from region where id='$news.region_id'}[$.default{}]] # $rubrika[^string:sql{select name from rubrika where id='$news.rub_id'}[$.default{}]] # $topic[^string:sql{select name from topics where topic_id='$news.topic_id'}[$.default{}]] # $problem[^string:sql{select name from problem where id='$news.problem_id'}[$.default{}]] }
Православие на Северной земле
^check[$date.day]/^check[$date.month]/$date.year, ^check[$date.hour]:^check[$date.minute]
#
^if(def $rubrika){ $rubrika} ^if(def $topic){- $topic} ^if(def $problem){- $problem}
$news.head
# ^if(def $region){${region}}. ^matchHrefs[^untaint{$anons}] ^if($news.pic_body ne ""){ ^if(-f "$news.pic_body"){ $foto[^image::measure[$news.pic_body]] ^foto.html[ $.align[left] $.hspace[5] $.vspace[5] ] } } #
^matchHrefs[^untaint{$body}]

}{

Новости с таким номером не найдено
}
^connect[$connect_string]{ $views(^int:sql{select total from views where id=^form:pid.int(0)}[$.default{0}]) ^if($views != 0){ ^void:sql{update views set total=total+1 where id=^form:pid.int(0)} }{ ^void:sql{insert into views (id, total) values ('^form:pid.int(0)', '1')} } }
^usePHP[/sape/sape.php?uri=$request:uri&url=$request:uri]

© Интернет-газета "Православие на Северной земле".2007.