Esempio n. 1
0
function echoSettingsOptions($filter) {
	// get system settings:
	$page_data_object = new CASHSettings(getPersistentData('cash_effective_user'));
	$settings_types_data = $page_data_object->getSettingsTypes($filter);
	$applicable_settings_array = false;
	foreach ($settings_types_data as $type_data) {
		$result = $page_data_object->getSettingsByType($type_data->type);
		if ($result) {
			if (!$applicable_settings_array) { $applicable_settings_array = array(); }
			$applicable_settings_array = $applicable_settings_array + $result;
		}
	}
	
	// echo out the proper dropdown bits
	if ($applicable_settings_array) {
		$settings_count = 1;
		foreach ($applicable_settings_array as $setting) {
			echo '<option value="' . $setting['id'] . '">' . $setting['name'] . '</option>';
		}
	}
}
Esempio n. 2
0
<?php
// add unique page settings:
$page_title = 'Platform Settings';
$page_tips = 'This page manages settings for all external services and APIs. Connect to third-party accounts like Twitter, S3, MailChimp, and more.';

$page_data_object = new CASHSettings(getPersistentData('cash_effective_user'));
$settings_types_data = $page_data_object->getSettingsTypes();
$settings_for_user = $page_data_object->getAllSettingsforUser();

if ($request_parameters) {
	$settings_action = $request_parameters[0];
}
?>