* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Is a network type handler selected?
if (isGetRequestElementSet('network_type_id')) {
// Load data for given network
- $result = SQL_QUERY_ESC('SELECT
- t.`network_id`,
- t.`network_type_id`,
- t.`network_type_handler`,
- t.`network_type_reload_time_unit`,
- d.`network_active`,
+ $result = sqlQueryEscaped('SELECT
+ `t`.`network_id`,
+ `t`.`network_type_id`,
+ `t`.`network_type_handler`,
+ `t`.`network_type_reload_time_unit`,
+ `d`.`network_active`,
NULL AS `network_data_id`,
NULL AS `network_max_reload_time`,
NULL AS `network_min_waiting_time`,
NULL AS `network_media_size`,
NULL AS `network_media_output`
FROM
- `{?_MYSQL_PREFIX?}_network_types` AS t
+ `{?_MYSQL_PREFIX?}_network_types` AS `t`
INNER JOIN
- `{?_MYSQL_PREFIX?}_network_data` AS d
+ `{?_MYSQL_PREFIX?}_network_data` AS `d`
ON
d.network_id=t.network_id
WHERE
- t.`network_id`=%s AND
- t.`network_type_id`=%s
+ `t`.`network_id`=%s AND
+ `t`.`network_type_id`=%s
LIMIT 1',
array(
bigintval(getRequestElement('network_id')),
), __FUNCTION__, __LINE__);
// Is there a record?
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Load it
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
// Is the network active?
if (($content['network_active'] == 'N') && (!isAdminsExpertWarningEnabled()) && (!isDebugModeEnabled())) {
} // END - if
// Check for network type configuration
- $result_config = SQL_QUERY_ESC('SELECT
+ $result_config = sqlQueryEscaped('SELECT
`network_data_id`,
`network_max_reload_time`,
`network_min_waiting_time`,
$templateName = 'admin_add_config_network_type_form';
// Do we also have configuration?
- if (SQL_NUMROWS($result_config) == 1) {
+ if (sqlNumRows($result_config) == 1) {
// Load as well and merge it
- $content = merge_array($content, SQL_FETCHARRAY($result_config));
+ $content = merge_array($content, sqlFetchArray($result_config));
// Use template for editing
$templateName = 'admin_edit_config_network_type_form';
} // END - if
// Free result
- SQL_FREERESULT($result_config);
+ sqlFreeResult($result_config);
// "Translate" some values
$content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms');
} // END - if
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - if
// Get all type handlers
- $result = SQL_QUERY_ESC('SELECT
+ $result = sqlQueryEscaped('SELECT
`network_id`,
`network_type_id`,
`network_type_handler`,
), __FUNCTION__, __LINE__);
// Are there entries left?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Init row output
$OUT = '';
// List all entries
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Check if config entry is there
- $result_config = SQL_QUERY_ESC('SELECT
+ $result_config = sqlQueryEscaped('SELECT
`network_data_id`,
`network_max_reload_time`,
`network_min_waiting_time`,
), __FUNCTION__, __LINE__);
// Is there an entry?
- if (SQL_NUMROWS($result_config) == 1) {
+ if (sqlNumRows($result_config) == 1) {
// Load this data as well
- $content = merge_array($content, SQL_FETCHARRAY($result_config));
+ $content = merge_array($content, sqlFetchArray($result_config));
// Add it with extra template
$content['network_type_config_content'] = loadTemplate('admin_show_config_network_type', TRUE, $content);
}
// Free result
- SQL_FREERESULT($result_config);
+ sqlFreeResult($result_config);
// Load row template
$OUT .= loadTemplate('admin_config_network_types_row', TRUE, $content);
}
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} else {
// Generate network list for this script
$OUT = generateAdminNetworkList(FALSE, TRUE, FALSE);