- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
# Обработка нажатия клавиш
# Если нажата кнопка СОХРАНИТЬ
if(CGI::param('sub_data_save'))
{
if(CGI::param('content')){ $content=CGI::param('content'); }
$content=~s/'/\\'/g;
$dbh->do("update public.m_content set content='$content' where id=70");
# Зафиксировали изменения
$dbh->commit;
# формируем страницу
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content,$www{'path'},'/turfirm.php');
# подгонка остальных страниц
# новости
$sql = "select content from public.m_content where \"id\"=20";
$sth=$dbh->prepare($sql);
$sth->execute;
($content0)=$sth->fetchrow_array;
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/news.php');
# Корпаративным клиентам
$sql = "select content from public.m_content where \"id\"=60";
$sth=$dbh->prepare($sql);
$sth->execute;
($content0)=$sth->fetchrow_array;
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/cor_clients.php');
# Главная
$sql = "select content from public.m_content where \"id\"=10";
$sth=$dbh->prepare($sql);
$sth->execute;
($content0)=$sth->fetchrow_array;
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/index.php');
# Контакты
$sql = "select content from public.m_content where \"id\"=30";
$sth=$dbh->prepare($sql);
$sth->execute;
($content0)=$sth->fetchrow_array;
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/contact.php');
# Базы
$sql = "select content from public.m_content where \"id\"=40";
$sth=$dbh->prepare($sql);
$sth->execute;
($content0)=$sth->fetchrow_array;
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/centre.php');
# Бронирование
$content0="<iframe width=100% scrolling='auto' height=100% frameborder=0 src='/cgi-bin/res.cgi' ></iframe>";
md::tools->create_page($www{'main_template'},"<#CONTENT#>",$content0,$www{'path'},'/reservation.php');
}