* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License in GPL.txt for more details. */ define('IN_PONEPASTE', 1); require_once('common.php'); const CONFIG_FILE_PATH = '../config/site.php'; updateAdminHistory($conn); function updateConfiguration(string $path, array $new_config) { $fp = fopen($path, 'w'); $new_config_text = var_export($new_config, true); $code = " trim($data['title']), 'description' => trim($data['description']), 'baseurl' => trim($data['baseurl']), 'keywords' => trim($data['keywords']), 'site_name' => trim($data['site_name']), 'email' => trim($data['email']), 'additional_scripts' => trim($data['additional_scripts']) ]; $current_config['site_info'] = $new_site_info; $current_site_info = $new_site_info; updateConfiguration(CONFIG_FILE_PATH, $current_config); $msg = '
Configuration saved.
'; } elseif ($action === 'permissions') { $new_permissions = [ 'disable_guest' => trim($_POST['disableguest']), 'private' => trim($_POST['siteprivate']) ]; $current_config['permissions'] = $new_permissions; $current_permissions = $new_permissions; updateConfiguration(CONFIG_FILE_PATH, $current_config); $msg = '
Site permissions saved.
'; } elseif ($action === 'captcha') { $new_captcha = [ 'enabled' => ($_POST['captcha']['enabled'] === '1'), 'multiple' => ($_POST['captcha']['multiple'] === '1') ]; $current_config['captcha'] = $new_captcha; $current_captcha = $new_captcha; updateConfiguration(CONFIG_FILE_PATH, $current_config); $msg = '
Captcha settings saved
'; } } ?> Paste - Configuration
;
type="checkbox" name="disableguest" id="disableguest">
type="checkbox" name="siteprivate" id="siteprivate">

type="checkbox" name="captcha[enabked]" id="captcha_enabled">


Internal Captcha Settings:
type="checkbox" name="captcha[multiple]" id="captcha_multiple">