/
var
/
www
/
coeditor.org
/
site
/
coeditor.org
/
contacts
/
/var/www/coeditor.org/site/coeditor.org/contacts
mkdir
upload
Name
Size
Mode
Actions
index.html
9839
0644
edit
dl
rm
index.php
1585
0644
edit
dl
rm
Edit:
/var/www/coeditor.org/site/coeditor.org/contacts/index.php
(1585B)
<?php $now = new DateTime(); $months_ru = ['января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря']; $months_short_ru = ['янв','фев','мар','апр','май','июн','июл','авг','сен','окт','ноя','дек']; $months_en = ['January','February','March','April','May','June','July','August','September','October','November','December']; $months_short_en = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; $days_ru = ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота']; $days_en = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; $n = (int)$now->format('n') - 1; $w = (int)$now->format('w'); $vars = [ '{{_year}}' => $now->format('Y'), '{{_month}}' => $now->format('m'), '{{_day}}' => $now->format('d'), '{{_month_name}}' => $months_ru[$n], '{{_month_name_en}}' => $months_en[$n], '{{_month_short}}' => $months_short_ru[$n], '{{_month_short_en}}' => $months_short_en[$n], '{{_day_name}}' => $days_ru[$w], '{{_day_name_en}}' => $days_en[$w], '{{_date}}' => $now->format('d.m.Y'), '{{_date_iso}}' => $now->format('Y-m-d'), '{{_date_full}}' => $now->format('j') . ' ' . $months_ru[$n] . ' ' . $now->format('Y'), ]; $html = file_get_contents(__DIR__ . '/index.html'); echo str_replace(array_keys($vars), array_values($vars), $html);
Save
cmd:
run