|
|
| version 1.2, 2002/01/31 12:40:35 | version 1.5, 2002/02/22 12:14:11 |
|---|---|
| Line 1 | Line 1 |
| @USE | @USE |
| common/lib.p | hosting.p |
| common/layout.p | document.p |
| common/implode.p | dtf.p |
| common/graph.p | secure.p |
| date/dtf.p | chart.p |
| engine_mdm.p | |
| mysql.p | |
| @auto[] | @404[] |
| ^if(in "/admin/"){ | $response:location[/404/] |
| ^use[admin.p] | |
| } | |
| $MAIN:pSQL[^mysql::init[$SQL.connect-string]] | |
| ^detectBrowser[] | |
| $MAIN:newsfileDir[/i/news/] | |
| #end | |
| @exception[origin;source;comment;type;code;stack][i;j] | |
| <body> | |
| <font color="black"> | |
| ^if(def $source){$origin '$source'} | |
| ${comment}. | |
| ^if(def $type){type=$type} | |
| ^if(def $code){code=$code} | |
| ^if($stack){ | |
| <hr> | |
| stack backtrace:<br /> | |
| ^stack.menu{ | |
| $stack.origin: $stack.name<br /> | |
| } | |
| } | |
| #end | |
| ################################################################################################# | |
| @error404[] | |
| ^location[http://$env:SERVER_NAME/404/] | |
| #end @error404[] | |
| ################################################################################################# | |
| @pageHeader[header] | |
| $header | |
| #end @pageHeader[] | |
| ################################################################################################# | |
| @pageFooter[] | |
| footer | |
| #end @pageFooter[] | |
| ################################################################################################# | |
| @body[content] | |
| <body bgcolor="#F4F4F4" text="#000000" link="#0000C4" alink="#0000C4" vlink="#073683" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0" onLoad="init()"> | |
| $content | |
| </body> | |
| #end @body[] | |
| ################################################################################################# | |
| @html[header;content] | |
| <!-- Copyright (c) Art. Lebedev Studio | http://www.design.ru/ --> | |
| <html> | |
| <head> | |
| <base target="_top"> | |
| <link rel="stylesheet" type="text/css" href="/main.css"></link> | |
| <title>AB.LV^if(def $header){ | ^taint[as-is][$header] }</title> | |
| </head> | |
| ^body{ | |
| <table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ffffff"> | |
| ^pageHeader[] | |
| $content | |
| ^pageFooter[] | |
| </table> | |
| } | |
| <html> | |
| #end @html[] | |
| ################################################################################################# | |
| @main[] | @main[] |
| ^pSQL.server{ | #определить текущий язык контента |
| <html> | $server_name[$env:SERVER_NAME] |
| <head> | $CUR_LANG(^if(^server_name.pos[ua]>0){1}{2}) |
| ^if(def $prepare){^prepare[]} | |
| </head> | #иннициализировать класс |
| ^body{ | ^hosting:server{ |
| ^content[] | $DOCUMENT[^document::init[]] |
| } | ^if(def $htmlDocument){^htmlDocument[]} |
| </html> | ^DOCUMENT.paint[] |
| } | |
| # @main[] | |
| ################################################################################################# | |
| @postprocess[body][repl] | |
| ^if($MAIN:browser eq "nn" && $MAIN:browser_ver < 5){ | |
| $repl[^table::set{a b | |
| &hellip^; …^; | |
| &rdquo^; ”^; | |
| &ldquo^; “^; | |
| &mdash^; —^; | |
| &ndash^; –^; | |
| &bull^; •^;}] | |
| $result[^if(def $body){^body.replace[$repl]}] | |
| }{ | |
| $result[$body] | |
| } | } |
| #end @postprocess[body] | |
| ################################################################################################# | |
| @getNewsType[] | |
| $result[^table::sql{ | |
| SELECT | |
| news_type_id AS id, | |
| name, | |
| path | |
| FROM | |
| news_type | |
| WHERE | |
| is_published = '1' | |
| ORDER BY | |
| sort_order | |
| }] | |
| ################################################################################################# | |
| @sendSubscribeMail[type;from;pass] | |
| ^mail:send[ | |
| $.to[$form:email] | |
| $.from[$from] | |
| $.charset[KOI8-R] | |
| $.content-type[ | |
| $.value[text/plain] | |
| $.charset[KOI8-R] | |
| ] | |
| $.subject[^if($type eq "insert"){mdm subscribe}{mdm update subscription}] | |
| $.body[^if($type eq "insert"){Адрес "$form:email" был внесен в список рассылки новостей сайта МДМ | |
| Чтобы сделать подписку активной и/или изменить ее параметры, достаточно зайти на страницу: | |
| http://${env:SERVER_NAME}/press/subscribe/edit/?email=$form:email&code=$pass | |
| Если подписка не будет подтверждена в течение 30 дней с момента | |
| отправки данного сообщения, ваш адрес будет автоматически удален из | |
| базы данных | |
| С уважением, | |
| Служба новостей МДМ | |
| http://${env:SERVER_NAME}/ | |
| }{Чтобы изменить параметры подписки, достаточно зайти на страницу: | |
| http://${env:SERVER_NAME}/press/subscribe/edit/?email=$form:email&code=$pass | |
| С уважением, | |
| Служба новостей МДМ | |
| http://${env:SERVER_NAME}/}] | |
| ] | |
| #end @sendMail[] | |