예제 #1
0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************************************/
if (!defined('JXBOT_ADMIN')) {
    die('Direct script access not permitted.');
}
if (isset($_POST['new-name']) && trim($_POST['new-name']) !== '') {
    JxBotConfig::bot_add_prop($_POST['new-name'], '');
    JxBotConfig::save_configuration();
}
if (isset($_REQUEST['del-name']) && trim($_REQUEST['del-name']) !== '') {
    JxBotConfig::bot_delete_prop($_REQUEST['del-name']);
    JxBotConfig::save_configuration();
}
if (isset($_POST['action']) && $_POST['action'] == 'Save') {
    //JxBotConfig::set_option('bot_name', $_POST['bot_name']);
    foreach ($_POST as $key => $value) {
        if (substr($key, 0, 4) == 'bot_') {
            JxBotConfig::set_option($key, $value);
        }
    }
    JxBotConfig::save_configuration();
}
$bot_properties = JxBotConfig::bot_properties();
$rows_per_col = ceil(count($bot_properties) / 2.0);
function editable_section(&$properties, $row_count)
{