Beispiel #1
0
    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)
{
    if (count($properties) == 0) {
        return;
    }
    print '<table>';
    for ($i = 0; $i < $row_count; $i++) {
        $prop = array_shift($properties);
        if ($prop === null) {
            break;
        }
        print '<tr>';
        print '<td style="width: 10em;">' . $prop[1] . '</td>';
        print '<td><input type="text" name="' . $prop[0] . '" size="20" value="' . $prop[2] . '" style="width:95%"></td>';