AvocadoAmber/AvocadoEdition_Light/adm/viewer_form_update.php

34 lines
1,017 B
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
$sub_menu = "100250";
2024-09-23 11:10:50 +09:00
include_once "./_common.php";
2022-09-17 20:50:50 +09:00
2024-09-19 21:06:35 +09:00
if (defined("G5_THEME_PATH") && file_exists(G5_THEME_PATH . "/config/viewer_form_update.php")) {
include_once G5_THEME_PATH . "/config/viewer_form_update.php";
2022-09-17 20:50:50 +09:00
} else {
2024-09-19 21:06:35 +09:00
$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);
if (!$main_co['co_id']) {
// Insert
$sql = " insert {$g5['content_table']}
set co_id = 'site_main',
co_content = '{$main_content}',
{$sql_common} ";
sql_query($sql);
} else {
// Update
$sql = " update {$g5['content_table']}
set co_content = '{$main_content}',
{$sql_common}
where co_id = 'site_main' ";
sql_query($sql);
}
2022-09-17 20:50:50 +09:00
}
2024-09-28 13:03:15 +09:00
EventHandler::triggerEvent("gnuboard.admin.viewer_update", $main_content);
2024-09-19 20:57:39 +09:00
goto_url('./viewer_form.php');