get($args['conf_change_type']); if($args['conf_change_type'] == 'users' ) { $real_conf = $conf; $conf = $real_conf[$args['name']]; } $model = $conf_obj->get_config_model($args['conf_change_type']); $saved = false; foreach( $model as $key => $item ) { if(!empty($args[$key])) { if($key == 'password') { # Hash it, save to correct param $conf['auth_hash'] = password_hash( $args[$key], PASSWORD_DEFAULT ); } else { $conf[$key] = $args[$key]; } } } if($args['conf_change_type'] == 'users' ) { unset($conf['name']); $real_conf[$args['name']] = $conf; $conf = $real_conf; } $conf_obj->set($args['conf_change_type'], $conf); $saved = $conf_obj->save($args['conf_change_type']); if($saved) { echo "

Successfully saved $saved bytes to " . $conf_obj->get_conf_dir() . '/' . $args['conf_change_type'] . ".json

"; } else { echo '

Failed to save to ' . $conf_obj->get_conf_dir() . '/' . $args['conf_change_type'] . '.json!

'; } } ?>

General settings:


get('main'); $model = $conf_obj->get_config_model('main'); $line = ''; foreach ( $model as $key => $item ) { $line .= ''; $line .= ''; if($item['form_field'] == 'select') { $line .= ''; } elseif($item['form_field'] == 'input') { $val = !empty($conf[$key]) ? $conf[$key] : ''; $line .= ''; } echo "$line\n"; ?>
'; } $line .= '


User management:


get('users'); $model = $conf_obj->get_config_model('users'); $line = ''; foreach ( $conf as $user => $data ) { $line .= ""; $line .= ""; foreach ( $model as $key => $item ) { $line .= ''; $val = ""; if( array_key_exists( $key, $data ) ) { $val = $data[$key]; } else if( array_key_exists( 'masks', $item ) && $item['masks'] == 'parent' ) { $val = $user; } $line .= ''; } $line .= '
Manage user '$user'"; $line .= ""; $line .= "
'; } echo "$line\n"; ?>

Add User:

$item ) { $line .= ''; $line .= ''; } echo "$line\n"; ?>


Theme cloner:


Want to write your own theme? Clone a theme here then see the styling guide for information on how tCMS' templates, image sets and CSS work in the theming system.

INSERT FORM HERE