Annotation of parser3/www/htdocs/auto.p, revision 1.2
1.2 ! paf 1: @USE
! 2: common/lib.p
! 3: common/layout.p
! 4: common/implode.p
! 5: common/graph.p
! 6: date/dtf.p
! 7: engine_mdm.p
! 8: mysql.p
! 9:
! 10:
! 11: @auto[]
! 12: ^if(in "/admin/"){
! 13: ^use[admin.p]
! 14: }
! 15: $MAIN:pSQL[^mysql::init[$SQL.connect-string]]
! 16: ^detectBrowser[]
! 17: $MAIN:newsfileDir[/i/news/]
! 18: #end
! 19:
! 20:
! 21: @exception[origin;source;comment;type;code;stack][i;j]
! 22: <body>
! 23: <font color="black">
! 24: ^if(def $source){$origin '$source'}
! 25: ${comment}.
! 26: ^if(def $type){type=$type}
! 27: ^if(def $code){code=$code}
! 28: ^if($stack){
! 29: <hr>
! 30: stack backtrace:<br />
! 31: ^stack.menu{
! 32: $stack.origin: $stack.name<br />
! 33: }
! 34: }
! 35: #end
! 36:
! 37:
! 38:
! 39: #################################################################################################
! 40: @error404[]
! 41: ^location[http://$env:SERVER_NAME/404/]
! 42: #end @error404[]
! 43:
! 44:
! 45:
! 46: #################################################################################################
! 47: @pageHeader[header]
! 48: $header
! 49: #end @pageHeader[]
! 50:
! 51:
! 52:
! 53: #################################################################################################
! 54: @pageFooter[]
! 55: footer
! 56: #end @pageFooter[]
! 57:
! 58:
! 59:
! 60: #################################################################################################
! 61: @body[content]
! 62: <body bgcolor="#F4F4F4" text="#000000" link="#0000C4" alink="#0000C4" vlink="#073683" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0" onLoad="init()">
! 63: $content
! 64: </body>
! 65: #end @body[]
! 66:
! 67:
! 68:
! 69: #################################################################################################
! 70: @html[header;content]
! 71: <!-- Copyright (c) Art. Lebedev Studio | http://www.design.ru/ -->
! 72: <html>
! 73: <head>
! 74: <base target="_top">
! 75: <link rel="stylesheet" type="text/css" href="/main.css"></link>
! 76: <title>AB.LV^if(def $header){ | ^taint[as-is][$header] }</title>
! 77: </head>
! 78: ^body{
! 79: <table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ffffff">
! 80: ^pageHeader[]
! 81: $content
! 82: ^pageFooter[]
! 83: </table>
! 84: }
! 85: <html>
! 86: #end @html[]
! 87:
! 88:
! 89: #################################################################################################
1.1 paf 90: @main[]
1.2 ! paf 91: ^pSQL.server{
! 92: <html>
! 93: <head>
! 94: ^if(def $prepare){^prepare[]}
! 95: </head>
! 96: ^body{
! 97: ^content[]
! 98: }
! 99: </html>
! 100: }
! 101: # @main[]
! 102:
! 103:
! 104:
! 105: #################################################################################################
! 106: @postprocess[body][repl]
! 107: ^if($MAIN:browser eq "nn" && $MAIN:browser_ver < 5){
! 108: $repl[^table::set{a b
! 109: &hellip^; …^;
! 110: &rdquo^; ”^;
! 111: &ldquo^; “^;
! 112: &mdash^; —^;
! 113: &ndash^; –^;
! 114: &bull^; •^;}]
! 115: $result[^if(def $body){^body.replace[$repl]}]
! 116: }{
! 117: $result[$body]
! 118: }
! 119: #end @postprocess[body]
! 120:
! 121:
! 122:
! 123: #################################################################################################
! 124: @getNewsType[]
! 125: $result[^table::sql{
! 126: SELECT
! 127: news_type_id AS id,
! 128: name,
! 129: path
! 130: FROM
! 131: news_type
! 132: WHERE
! 133: is_published = '1'
! 134: ORDER BY
! 135: sort_order
! 136: }]
! 137:
! 138:
! 139:
! 140: #################################################################################################
! 141: @sendSubscribeMail[type;from;pass]
! 142: ^mail:send[
! 143: $.to[$form:email]
! 144: $.from[$from]
! 145: $.charset[KOI8-R]
! 146: $.content-type[
! 147: $.value[text/plain]
! 148: $.charset[KOI8-R]
! 149: ]
! 150: $.subject[^if($type eq "insert"){mdm subscribe}{mdm update subscription}]
! 151: $.body[^if($type eq "insert"){Адрес "$form:email" был внесен в список рассылки новостей сайта МДМ
! 152:
! 153: Чтобы сделать подписку активной и/или изменить ее параметры, достаточно зайти на страницу:
! 154: http://${env:SERVER_NAME}/press/subscribe/edit/?email=$form:email&code=$pass
! 155:
! 156: Если подписка не будет подтверждена в течение 30 дней с момента
! 157: отправки данного сообщения, ваш адрес будет автоматически удален из
! 158: базы данных
! 159:
! 160: С уважением,
! 161: Служба новостей МДМ
! 162: http://${env:SERVER_NAME}/
! 163: }{Чтобы изменить параметры подписки, достаточно зайти на страницу:
! 164: http://${env:SERVER_NAME}/press/subscribe/edit/?email=$form:email&code=$pass
! 165:
! 166: С уважением,
! 167: Служба новостей МДМ
! 168: http://${env:SERVER_NAME}/}]
! 169: ]
! 170: #end @sendMail[]
! 171:
! 172:
! 173:
E-mail: