Example #1
0
    $table1 .= '<p>
					<input type="submit" name="f_deactivate_submit" value="&nbsp;- &nbsp;&nbsp;' . t('Выключить') . '">
					<input type="submit" name="f_uninstall_submit" value="&nbsp;x&nbsp;&nbsp;' . t('Деинсталировать') . '">
					</p>';
} else {
    $table1 = '';
}
// вторая таблица
$tmpl = array('table_open' => '<table class="page tablesorter inactive-plugins" id="pagetable2">', 'row_alt_start' => '<tr class="alt">', 'cell_alt_start' => '<td class="alt">');
$CI->table->clear();
$CI->table->set_template($tmpl);
// шаблон таблицы
$CI->table->set_caption('<h2>' . t('Неактивные плагины') . '</h2>');
// заголовки
$CI->table->set_heading(' ', t('Каталог'), ' ', t('Название'), t('Версия'), t('Автор'), t('Описание'));
$flag_present_plugins = _create_table(false);
if ($flag_present_plugins) {
    $table2 = $CI->table->generate();
    // вывод подготовленной таблицы
    # добавим строчку для дополнительного действия
    $table2 .= '<p><input type="submit" name="f_activate_submit" value="&nbsp;+ &nbsp;&nbsp;' . t('Включить') . '"></p>';
} else {
    $table2 = '';
}
echo mso_load_jquery('jquery.tablesorter.js') . '
		<script>
		$(function() {
			$("table.tablesorter").tablesorter( {headers: { 0: {sorter: false}, 2: {sorter: false} }});
		});
		</script>';
// добавляем форму, а также текущую сессию
Example #2
0
    $table1 .= '<p>
					<button type="submit" name="f_deactivate_submit" class="button i-chain-broken">' . t('Выключить') . '</button>
					<button type="submit" name="f_uninstall_submit" class="button i-remove">' . t('Деинсталировать') . '</button>
					</p>';
} else {
    $table1 = '';
}
// вторая таблица
$tmpl = array('table_open' => '<table class="page tablesorter inactive-plugins" id="pagetable2">', 'row_alt_start' => '<tr class="alt">', 'cell_alt_start' => '<td class="alt">');
$CI->table->clear();
$CI->table->set_template($tmpl);
// шаблон таблицы
// $CI->table->set_caption('<h2>' . t('Неактивные плагины') . '</h2>');
// заголовки
$CI->table->set_heading(' ', t('Каталог'), ' ', t('Название'), t('Версия'), t('Автор'), t('Описание'));
$flag_present_plugins = _create_table(false, $temp);
if ($flag_present_plugins) {
    $table2 = $CI->table->generate();
    // вывод подготовленной таблицы
    # добавим строчку для дополнительного действия
    $table2 .= '<p><button type="submit" name="f_activate_submit" class="button i-chain">' . t('Включить') . '</button></p>';
} else {
    $table2 = '';
}
echo '<script>
		$(function() {
			$("table.tablesorter").tablesorter( {headers: { 0: {sorter: false}, 2: {sorter: false} }});
		});
		</script>';
// быстрые настройки плагинов
// echo '<p class="nav"><strong>' . t('Настройки') . '</strong> '
Example #3
0
function _build_claiming_table()
{
    $schema = array('description' => 'author collection claiming table', 'fields' => array('id' => array('type' => 'serial', 'not null' => TRUE), 'cid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), 'hd' => array('type' => 'int', 'not null' => TRUE), 'copyright' => array('type' => 'int', 'not null' => TRUE), 'display' => array('type' => 'text'), 'note' => array('type' => 'text'), 'created' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => '0'), 'verified' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), 'openmosaic' => array('type' => 'int', 'not null' => TRUE, 'default' => 1)), 'unique keys' => array('ukeys' => array('cid', 'uid')), 'primary key' => array('id'));
    _create_table(CLAIM_COLL, $schema);
}
Example #4
0
function _build_claim_author_table()
{
    $schema = array('description' => 'author table', 'fields' => array('uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), 'login_name' => array('type' => 'text'), 'real_name' => array('type' => 'text'), 'email' => array('type' => 'text'), 'phone' => array('type' => 'text'), 'address' => array('type' => 'text'), '4digitid' => array('type' => 'text'), 'created' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => '0')), 'primary key' => array('uid'));
    _create_table(CLAIM_AUTHOR, $schema);
}
Example #5
0
function user_table_post($tableData)
{
    $dev = '{
		"name": "API_TEST_TABLE",
		"cols": [
								{
										"name": "col_1",
										"type": "VARCHAR2",
										"size": 20,
										"notNull": false,
										"unique" : true
								},
								{
										"name": "col_2",
										"type": "NUMBER",
										"size": 20,
										"notNull": true,
										"unique": false
								},
								{
										"name": "col_3",
										"type": "int",
										"size": null,
										"notNull": false,
										"unique": true
								}
					],
		"primaryKey": {
																"constraintName": "pk_table_1",
																"cols": [
																					"col_1",
																					"col_2"
																			]
								},
		"foreignKey":  [
																{
																		"constraintName": "fk_table_1_col_2",
																		"tableCol": "col_2",
																		"refTable": "test_table_3",
																		"refCol": "col_1",
																		"deferrable": false
																},
																{
																		"constraintName": "fk_table_1_col_3",
																		"tableCol": "col_3",
																		"refTable": "test_table_6",
																		"refCol": "col_1",
																		"deferrable": true
																}
									]
    }';
    //$tabeData = stripslashes($tableData);
    //print_r($tableData);
    $table_data = json_decode($tableData, true);
    $table_columns_and_constraints = _create_columns($table_data['cols']) . _primary_keys($table_data['primaryKey']) . _foreign_keys($table_data['foreignKey']);
    $table_columns_and_constraints = rtrim($table_columns_and_constraints);
    $table_columns_and_constraints = rtrim($table_columns_and_constraints, ',');
    $create_statement = _create_table($table_data['name']) . "(\n\t\t\t" . $table_columns_and_constraints . "\n)";
    $results = executeQuery($create_statement);
    return $results;
}