AvocadoAmber/AvocadoEdition_Light/adm/viewer_form_update.php

28 lines
701 B
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
$sub_menu = "100250";
include_once('./_common.php');
$sql_common = " co_html = '1',
co_tag_filter_use = '0' ";
// -- 메인 정보 가져오기
$sql = " select co_id from {$g5['content_table']} where co_id = 'site_main' ";
$main_co = sql_fetch($sql);
2024-09-19 20:57:39 +09:00
if (!$main_co['co_id']) {
// Insert
$sql = " insert {$g5['content_table']}
2022-09-17 20:50:50 +09:00
set co_id = 'site_main',
co_content = '{$main_content}',
{$sql_common} ";
2024-09-19 20:57:39 +09:00
sql_query($sql);
2022-09-17 20:50:50 +09:00
} else {
2024-09-19 20:57:39 +09:00
// Update
$sql = " update {$g5['content_table']}
2022-09-17 20:50:50 +09:00
set co_content = '{$main_content}',
{$sql_common}
where co_id = 'site_main' ";
2024-09-19 20:57:39 +09:00
sql_query($sql);
2022-09-17 20:50:50 +09:00
}
2024-09-19 20:57:39 +09:00
goto_url('./viewer_form.php');