本文整理汇总了PHP中SettingsManager::getAllRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP SettingsManager::getAllRecords方法的具体用法?PHP SettingsManager::getAllRecords怎么用?PHP SettingsManager::getAllRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SettingsManager
的用法示例。
在下文中一共展示了SettingsManager::getAllRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SettingsManager
$id = request_isset('id');
$key = request_isset('key');
$value = request_isset('value');
$settingsManager = new SettingsManager();
switch ($page_action) {
case 'add_setting':
$settingsManager->addRecord($key, $value);
break;
case 'delete_by_id':
$settingsManager->deleteRecord($id);
break;
case 'update_by_id':
$settingsManager->updateRecord($id, $key, $value);
break;
}
$settings_data = $settingsManager->getAllRecords();
$page_title = 'Settings';
$alt_menu = '<a href="#" class="add">Add</a>';
$addView = new AddView('Add', 'add_setting');
$addView->addRow('key', 'Key');
$addView->addRow('value', 'Value');
$tableView = new TableView(array('Key', 'Value', ''));
while (($settings_row = mysql_fetch_array($settings_data)) != null) {
$tableView->addRow(array(TableView::createCell('key', $settings_row['key']), TableView::createCell('value', $settings_row['value']), TableView::createEdit($settings_row['SETTING_ID'])));
}
$views_to_load = array();
$views_to_load[] = '../../views/_add.php';
$views_to_load[] = '_warning.php';
$views_to_load[] = '../../views/_table.php';
include '../../views/_generic.php';
}