function plugin_convert_haik_move_inifile() { if (!file_exists('haik-contents/config/haik.ini.php')) { return false; } include 'haik-contents/config/haik.ini.php'; $_SESSION['qhmsetting'] = array(); foreach ($config as $key => $val) { switch ($key) { case 'display_login': $_SESSION['qhmsetting']['qhm_adminmenu'] = $val; break; case 'site_title': $_SESSION['qhmsetting']['page_title'] = $val; break; case 'user_head': $_SESSION['qhmsetting']['custom_meta'] = $val; break; case 'tracking_script': $_SESSION['qhmsetting']['accesstag'] = $val; break; case 'username': $_SESSION['qhmsetting']['admin_email'] = $_SESSION['qhmsetting']['username'] = $val; break; case 'logo_image': case 'passwd': case 'script': case 'script_ssl': case 'enable_cache': case 'autolink': case 'session_save_path': case 'site_close_all': case 'check_login': case 'unload_confirm': case 'http_scheme': case 'encrypt_ftp': case 'qhm_pw_str': case 'ogp_tag': case 'add_xmlns': $_SESSION['qhmsetting'][$key] = $val; break; } } plugin_qhmsetting_update_ini(); plugin_convert_haik_write_log("サイトの設定を移行しました"); return true; }
function plugin_qhmsetting_sssavepath_msg() { global $vars, $script, $username, $auth_users; $msg = ''; // -------------------------------------- // reset passwd $msg = "セッションが正常に動作しないサーバー用の設定をしました"; $oppasswd = $vars['op_passwd']; $opusername = $vars['op_username']; //error $error = ''; if ($username != $opusername) { $error = 'ユーザー名が一致しません。<br />'; } if ($auth_users[$username] != '{x-php-md5}' . md5($oppasswd)) { $error .= 'パスワードが一致しません。<br />'; } if ($error != '') { return plugin_qhmsetting_sssavepath_form($error); } if (isset($vars['set'])) { $_SESSION['qhmsetting']['session_save_path'] = CACHEQHM_DIR; } else { if (isset($vars['unset'])) { $_SESSION['qhmsetting']['session_save_path'] = ''; } } plugin_qhmsetting_update_ini(); header('location: ' . $script . '?cmd=qhmauth'); exit; // $msg = '変更しました'; // return plugin_qhmsetting_script_form($msg); }
function plugin_qblog_update_comment_notice() { global $script, $vars, $qblog_comment_notice, $admin_email; if (trim($admin_email) === '') { $vars['qblog_error'] = '管理者メールアドレスが設定されていません。'; return FALSE; } $notice = isset($vars['qblog_comment_notice']) && $vars['qblog_comment_notice'] ? 1 : 0; if (exist_plugin("qhmsetting")) { $params = array(); $params['qblog_comment_notice'] = $notice; $_SESSION['qhmsetting'] = $params; plugin_qhmsetting_update_ini(); $vars['phase'] = 'comment_notice'; $qblog_comment_notice = $notice; } return TRUE; }