本文整理汇总了PHP中table::db_data_multichoice方法的典型用法代码示例。如果您正苦于以下问题:PHP table::db_data_multichoice方法的具体用法?PHP table::db_data_multichoice怎么用?PHP table::db_data_multichoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table
的用法示例。
在下文中一共展示了table::db_data_multichoice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: table
function table_services()
{
global $construct, $db, $main, $lang;
$form_search_services_edit = $this->form_search_services_edit();
$where = $form_search_services_edit->db_data_where();
$table_services = new table(array('TABLE_NAME' => 'table_services', 'FORM_NAME' => 'table_services'));
$table_services->db_data('services.title, nodes_services.id, nodes.name, nodes.id AS nodes__id, ip_addresses.ip, nodes_services.date_in, nodes_services.info, nodes_services.status, IFNULL(nodes_services.protocol, services.protocol) AS protocol, IFNULL(nodes_services.port, services.port) AS port', 'nodes_services
LEFT JOIN nodes on nodes_services.node_id = nodes.id
LEFT JOIN services on nodes_services.service_id = services.id
LEFT JOIN ip_addresses ON ip_addresses.id = nodes_services.ip_id', $where, '', "nodes_services.date_in DESC");
$table_services->db_data_search($form_search_services_edit);
foreach ((array) $table_services->data as $key => $value) {
if ($key != 0) {
if ($table_services->data[$key]['ip']) {
$table_services->data[$key]['ip'] = long2ip($table_services->data[$key]['ip']);
if ($table_services->data[$key]['protocol'] && $table_services->data[$key]['port']) {
$table_services->data[$key]['ip'] .= ' (' . $lang['db']['nodes_services__protocol-' . $table_services->data[$key]['protocol']] . '/' . $table_services->data[$key]['port'] . ')';
}
}
$table_services->data[$key]['name'] .= " (#" . $table_services->data[$key]['nodes__id'] . ")";
$table_services->info['EDIT'][$key] = make_ref('/node_editor/services', array("node" => $table_services->data[$key]['nodes__id'], "service" => $table_services->data[$key]['id']));
}
}
$table_services->info['EDIT_COLUMN'] = 'title';
$table_services->db_data_translate('nodes_services__status');
$table_services->db_data_multichoice('nodes_services', 'id');
$table_services->info['MULTICHOICE_LABEL'] = 'delete';
$table_services->db_data_remove('id', 'nodes__id', 'protocol', 'port');
return $table_services;
}
示例2: table
function table_ip_ranges()
{
global $construct, $db, $lang;
$form_search_ranges = $this->form_search_ranges();
$where = $form_search_ranges->db_data_where(array('ip' => 'exclude', 'nodes__name' => 'starts_with', "total_active_p2p" => 'exclude', "total_active_aps" => 'exclude'));
$table_ip_ranges = new table(array('TABLE_NAME' => 'table_ip_ranges', 'FORM_NAME' => 'table_ip_ranges'));
$where = $where != '' ? "(" . $where . ") AND " : "";
if ($form_search_ranges->data[0]['value'] != '') {
$where .= "(";
$s_ranges = ip_to_ranges($form_search_ranges->data[0]['value']);
foreach ($s_ranges as $s_range) {
$where .= "(ip_ranges.ip_start BETWEEN " . ip2long($s_range['min']) . " AND " . ip2long($s_range['max']) . ") OR ";
}
$where = substr($where, 0, -4) . ") AND ";
}
if ($where != '') {
$where = substr($where, 0, -5);
}
$having = $form_search_ranges->db_data_where(array('ip' => 'exclude', 'ip_ranges__status' => 'exclude', 'ip_ranges__delete_req' => 'exclude', 'nodes__id' => 'exclude', 'nodes__name' => 'exclude'));
$table_ip_ranges->db_data('ip_ranges.id,
"" AS ip_range,
ip_ranges.ip_start,
ip_ranges.ip_end,
ip_ranges.date_in,
ip_ranges.status,
ip_ranges.delete_req,
COUNT(DISTINCT p2p.id) AS total_active_p2p,
COUNT(DISTINCT aps.id) AS total_active_aps,
"" AS total_active_peers', 'ip_ranges ' . 'LEFT JOIN nodes ON ip_ranges.node_id = nodes.id
LEFT JOIN links ON ip_ranges.node_id = links.node_id AND links.status = "active"
LEFT JOIN links AS p2p ON links.type = "p2p"
AND links.peer_node_id = p2p.node_id
AND p2p.type = "p2p"
AND p2p.peer_node_id = links.node_id
AND p2p.status = "active"
LEFT JOIN links as aps ON links.type = "ap"
AND links.id = aps.id', $where, "ip_ranges.id" . ($having != '' ? ' HAVING (' . $having . ')' : ""), "ip_ranges.date_in DESC, ip_ranges.status ASC");
$table_ip_ranges->db_data_search($form_search_ranges);
foreach ((array) $table_ip_ranges->data as $key => $value) {
if ($key != 0) {
$table_ip_ranges->data[$key]['ip_start'] = long2ip($table_ip_ranges->data[$key]['ip_start']);
$table_ip_ranges->data[$key]['ip_end'] = long2ip($table_ip_ranges->data[$key]['ip_end']);
$table_ip_ranges->data[$key]['ip_range'] = $table_ip_ranges->data[$key]['ip_start'] . " - " . $table_ip_ranges->data[$key]['ip_end'];
}
}
$table_ip_ranges->db_data_multichoice('ip_ranges', 'id');
for ($i = 1; $i < count($table_ip_ranges->data); $i++) {
if (isset($table_ip_ranges->data[$i])) {
$table_ip_ranges->data[$i]['total_active_peers'] = ($table_ip_ranges->data[$i]['total_active_p2p'] > 0 ? $table_ip_ranges->data[$i]['total_active_p2p'] . " " . $lang['backbones_abbr'] : "") . ($table_ip_ranges->data[$i]['total_active_aps'] > 0 ? " + " . $table_ip_ranges->data[$i]['total_active_aps'] . " " . $lang['aps_abbr'] : "");
$table_ip_ranges->info['EDIT'][$i] = make_ref('/hostmaster/range', array("iprange" => $table_ip_ranges->data[$i]['id']));
}
}
$table_ip_ranges->info['EDIT_COLUMN'] = 'ip_range';
$table_ip_ranges->info['MULTICHOICE_LABEL'] = 'delete';
$table_ip_ranges->db_data_remove('id', 'ip_start', 'ip_end', 'total_active_p2p', 'total_active_aps');
$table_ip_ranges->db_data_translate('ip_ranges__status', 'ip_ranges__delete_req');
return $table_ip_ranges;
}
示例3: table
function table_services()
{
global $construct, $db, $main;
$table_services = new table(array('TABLE_NAME' => 'table_services', 'FORM_NAME' => 'table_services'));
$table_services->db_data('services.id, services.title, services.protocol, services.port', 'services', '', '', "services.title ASC");
foreach ((array) $table_services->data as $key => $value) {
if ($key != 0) {
$table_services->info['EDIT'][$key] = make_ref('/admin/services', array("service" => $table_services->data[$key]['id']));
}
}
$table_services->info['EDIT_COLUMN'] = 'title';
$table_services->db_data_translate('services__protocol');
$table_services->db_data_multichoice('services', 'id');
$table_services->info['MULTICHOICE_LABEL'] = 'delete';
$table_services->db_data_remove('id');
return $table_services;
}
示例4: table
function table_nodechangeslog()
{
global $construct, $db, $main;
$table_nodechangeslog = new table(array('FORM_NAME' => 'table_nodechangeslog', 'TABLE_NAME' => 'table_nodechangeslog'));
$table_nodechangeslog->db_data('node_settings_changes.dateline, nodes.name, node_settings_changes.changemenu, node_settings_changes.changemade, users.username, node_settings_changes.comment', 'node_settings_changes INNER JOIN `users` ON `users`.`id` = `node_settings_changes`.`uid` INNER JOIN `nodes` ON `nodes`.`id` = `node_settings_changes`.`node_id` ', "", "", "node_settings_changes.id DESC");
for ($i = 1; $i < count($table_nodechangeslog->data); $i++) {
if (isset($table_nodechangeslog->data[$i])) {
#$table_nodechangeslog->data[$i]['ip_start'] = long2ip($table_nodechangeslog->data[$i]['ip_start']);
#$table_nodechangeslog->data[$i]['ip_end'] = long2ip($table_nodechangeslog->data[$i]['ip_end']);
#$table_nodechangeslog->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "nodechangeslog", "area" => $table_nodechangeslog->data[$i]['id']));
}
}
#$table_nodechangeslog->info['EDIT_COLUMN'] = 'nodechangeslog__name';
$table_nodechangeslog->db_data_multichoice('dateline');
$table_nodechangeslog->info['MULTICHOICE_LABEL'] = '';
#$table_nodechangeslog->db_data_remove('id', 'uid');
return $table_nodechangeslog;
}
示例5: table
function table_actionlog()
{
global $construct, $db, $main;
$table_actionlog = new table(array('FORM_NAME' => 'table_actionlog', 'TABLE_NAME' => 'table_actionlog'));
$table_actionlog->db_data('actionlog.id, users.username,actionlog.ipaddress, actionlog.uid, actionlog.dateline AS actionlog__date, actionlog.page, actionlog.action, actionlog.data', 'actionlog ' . 'Left Join `users` ON `actionlog`.`uid` = `users`.`id`', "", "", "actionlog.id DESC");
for ($i = 1; $i < count($table_actionlog->data); $i++) {
if (isset($table_actionlog->data[$i])) {
#$table_actionlog->data[$i]['ip_start'] = long2ip($table_actionlog->data[$i]['ip_start']);
#$table_actionlog->data[$i]['ip_end'] = long2ip($table_actionlog->data[$i]['ip_end']);
#$table_actionlog->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "actionlog", "area" => $table_actionlog->data[$i]['id']));
}
}
#$table_actionlog->info['EDIT_COLUMN'] = 'actionlog__name';
$table_actionlog->db_data_multichoice('dateline', 'id');
$table_actionlog->info['MULTICHOICE_LABEL'] = 'delete';
$table_actionlog->db_data_remove('id', 'uid');
return $table_actionlog;
}
示例6: table
function table_areas()
{
global $construct, $db, $main;
$table_areas = new table(array('FORM_NAME' => 'table_areas', 'TABLE_NAME' => 'table_areas'));
$table_areas->db_data('areas.id, areas.name AS areas__name, areas.ip_start, areas.ip_end, areas.info, regions.name AS regions__name', 'areas ' . 'LEFT JOIN regions ON regions.id = areas.region_id', "", "", "areas.ip_start ASC");
for ($i = 1; $i < count($table_areas->data); $i++) {
if (isset($table_areas->data[$i])) {
$table_areas->data[$i]['ip_start'] = long2ip($table_areas->data[$i]['ip_start']);
$table_areas->data[$i]['ip_end'] = long2ip($table_areas->data[$i]['ip_end']);
$table_areas->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "areas", "area" => $table_areas->data[$i]['id']));
}
}
$table_areas->info['EDIT_COLUMN'] = 'areas__name';
$table_areas->db_data_multichoice('region', 'id');
$table_areas->info['MULTICHOICE_LABEL'] = 'delete';
$table_areas->db_data_remove('id');
return $table_areas;
}
示例7: table
function table_regions()
{
global $construct, $db, $main;
$table_regions = new table(array('FORM_NAME' => 'table_regions', 'TABLE_NAME' => 'table_regions'));
$table_regions->db_data('regions.id, regions.name, regions.ip_start, regions.ip_end, regions.v6net, regions.v6prefix, regions.info', 'regions', "", "", "ip_start ASC");
for ($i = 1; $i < count($table_regions->data); $i++) {
if (isset($table_regions->data[$i])) {
$table_regions->data[$i]['ip_start'] = long2ip($table_regions->data[$i]['ip_start']);
$table_regions->data[$i]['ip_end'] = long2ip($table_regions->data[$i]['ip_end']);
$table_regions->data[$i]['v6net'] = inet_ntop($table_regions->data[$i]['v6net']);
$table_regions->info['EDIT'][$i] = make_ref('/admin/regions', array("region" => $table_regions->data[$i]['id']));
}
}
$table_regions->info['EDIT_COLUMN'] = 'name';
$table_regions->db_data_multichoice('region', 'id');
$table_regions->info['MULTICHOICE_LABEL'] = 'delete';
$table_regions->db_data_remove('id');
return $table_regions;
}
示例8: table
function table_communities()
{
global $construct, $db, $main;
$table_communities = new table(array('FORM_NAME' => 'table_communities', 'TABLE_NAME' => 'table_communities'));
$table_communities->db_data('communities.id, communities.name, communities.windURL, communities.TOS, communities.fullname, communities.dnstld, communities.ns1, communities.ns2', 'communities', "", "", "name ASC");
for ($i = 1; $i < count($table_communities->data); $i++) {
if (isset($table_communities->data[$i])) {
$table_communities->data[$i]['ns1'] = long2ip($table_communities->data[$i]['ns1']);
$table_communities->data[$i]['ns2'] = long2ip($table_communities->data[$i]['ns2']);
$table_communities->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "communities", "community" => $table_communities->data[$i]['id']));
}
}
$table_communities->info['EDIT_COLUMN'] = 'dnstld';
$table_communities->info['EDIT_COLUMN'] = 'name';
$table_communities->db_data_multichoice('community', 'id');
$table_communities->info['MULTICHOICE_LABEL'] = 'delete';
$table_communities->db_data_remove('id', 'communities.id');
return $table_communities;
}
示例9: table
function table_regions()
{
global $construct, $db, $main;
$table_regions = new table(array('FORM_NAME' => 'table_regions', 'TABLE_NAME' => 'table_regions'));
$table_regions->db_data('regions.id, regions.name, regions.ip_start, regions.ip_end, regions.dns_suffix, regions.info, regions.image, regions.min_lat, regions.min_long, regions.max_lat, regions.max_long', 'regions', "", "", "ip_start ASC");
for ($i = 1; $i < count($table_regions->data); $i++) {
if (isset($table_regions->data[$i])) {
$table_regions->data[$i]['ip_start'] = long2ip($table_regions->data[$i]['ip_start']);
$table_regions->data[$i]['ip_end'] = long2ip($table_regions->data[$i]['ip_end']);
$table_regions->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "regions", "region" => $table_regions->data[$i]['id']));
}
}
$table_regions->info['EDIT_COLUMN'] = 'dns_suffix';
$table_regions->info['EDIT_COLUMN'] = 'name';
$table_regions->db_data_multichoice('region', 'id');
$table_regions->info['MULTICHOICE_LABEL'] = 'delete';
$table_regions->db_data_remove('id');
$table_regions->db_data_remove('image');
return $table_regions;
}
示例10: table
function table_users()
{
global $construct, $db, $main;
$form_search_users = $this->form_search_users();
$where = $form_search_users->db_data_where(array("users__username" => "starts_with", "users__surname" => "starts_with", "users__name" => "starts_with", "users__email" => "starts_with"));
$table_users = new table(array('FORM_NAME' => 'table_users', 'TABLE_NAME' => 'table_users'));
$table_users->db_data('users.id, users.username, "" AS fullname, users.surname, users.name, users.email, users.phone', 'users LEFT JOIN rights ON users.id = rights.user_id', $where, 'users.id', 'users.date_in DESC');
$table_users->db_data_search($form_search_users);
for ($i = 1; $i < count($table_users->data); $i++) {
if (isset($table_users->data[$i])) {
$table_users->data[$i]['fullname'] = $table_users->data[$i]['surname'] . " " . $table_users->data[$i]['name'];
$table_users->info['EDIT'][$i] = makelink(array("page" => "users", "user" => $table_users->data[$i]['id']));
}
}
$table_users->info['EDIT_COLUMN'] = 'username';
$table_users->db_data_multichoice('users', 'id');
$table_users->info['MULTICHOICE_LABEL'] = 'delete';
$table_users->db_data_remove('id', 'surname', 'name');
return $table_users;
}
示例11: table
function table_nodes()
{
global $construct, $db, $main;
$form_search_nodes = $this->form_search_nodes();
$where = $form_search_nodes->db_data_where(array("nodes__name" => "starts_with"));
$table_nodes = new table(array('FORM_NAME' => 'table_nodes', 'TABLE_NAME' => 'table_nodes'));
$table_nodes->db_data('nodes.id, nodes.name AS nodes__name, areas.name AS areas__name', 'nodes ' . 'LEFT JOIN areas ON nodes.area_id = areas.id ' . 'LEFT JOIN regions ON areas.region_id = regions.id', $where, "", "nodes.id ASC");
$table_nodes->db_data_search($form_search_nodes);
for ($i = 1; $i < count($table_nodes->data); $i++) {
if (isset($table_nodes->data[$i])) {
$table_nodes->data[$i]['nodes__name'] .= " (#" . $table_nodes->data[$i]['id'] . ")";
$table_nodes->info['EDIT'][$i] = make_ref('/node_editor', array("node" => $table_nodes->data[$i]['id']));
}
}
$table_nodes->info['EDIT_COLUMN'] = 'nodes__name';
$table_nodes->db_data_multichoice('node', 'id');
$table_nodes->info['MULTICHOICE_LABEL'] = 'delete';
$table_nodes->db_data_remove('id');
return $table_nodes;
}
示例12: table
function table_dns()
{
global $construct, $db, $vars;
$form_search_dns = $this->form_search_dns();
$where = $form_search_dns->db_data_where(array("dns_zones__name" => "starts_with", 'nodes__name' => 'starts_with'));
$table_dns = new table(array('TABLE_NAME' => 'table_dns', 'FORM_NAME' => 'table_dns'));
$table_dns->db_data('dns_zones.id, dns_zones.name, dns_zones.type, dns_zones.date_in, dns_zones.status, dns_zones.delete_req', 'dns_zones ' . 'LEFT JOIN nodes ON dns_zones.node_id = nodes.id', $where, "", "dns_zones.date_in DESC, dns_zones.status ASC");
$table_dns->db_data_multichoice('dns_zones', 'id');
for ($i = 1; $i < count($table_dns->data); $i++) {
if (isset($table_dns->data[$i])) {
if ($table_dns->data[$i]['type'] == 'forward') {
$table_dns->data[$i]['name'] .= "." . $vars['dns']['root_zone'];
}
$table_dns->info['EDIT'][$i] = makelink(array("page" => "hostmaster", "subpage" => "dnszone", "zone" => $table_dns->data[$i]['id']));
}
}
$table_dns->info['EDIT_COLUMN'] = 'name';
$table_dns->info['MULTICHOICE_LABEL'] = 'delete';
$table_dns->db_data_remove('id', 'type');
$table_dns->db_data_translate('dns_zones__status', 'dns_zones__delete_req');
return $table_dns;
}
示例13: unserialize
function table_nameservers()
{
global $construct, $db, $vars;
if (isset($_POST['dns_nameservers__ip']) && $_POST['dns_nameservers__ip'] != '') {
$_POST['dns_nameservers__ip'] = ip2long($_POST['dns_nameservers__ip']);
}
if (isset($_GET['form_search_nameservers_search']) && $_GET['form_search_nameservers_search'] != '') {
$t = unserialize(stripslashes($_GET['form_search_nameservers_search']));
if (isset($t['dns_nameservers__ip']) && $t['dns_nameservers__ip'] != '') {
$t['dns_nameservers__ip'] = ip2long($t['dns_nameservers__ip']);
}
$_GET['form_search_nameservers_search'] = addslashes(serialize($t));
}
$form_search_nameservers = $this->form_search_nameservers();
$where = $form_search_nameservers->db_data_where(array('nodes__name' => 'starts_with'));
$table_nameservers = new table(array('TABLE_NAME' => 'table_nameservers', 'FORM_NAME' => 'table_nameservers'));
$table_nameservers->db_data('dns_nameservers.id, dns_nameservers.name,communities.name AS communities__name, nodes.name_ns, dns_nameservers.ip, communities.dnstld , dns_nameservers.date_in, dns_nameservers.status, dns_nameservers.delete_req', 'dns_nameservers
LEFT JOIN nodes ON dns_nameservers.node_id = nodes.id
LEFT JOIN communities ON nodes.community_id = communities.id ', $where, "", "dns_nameservers.date_in DESC, dns_nameservers.status ASC");
$table_nameservers->db_data_search($form_search_nameservers);
foreach ((array) $table_nameservers->data as $key => $value) {
if ($key != 0) {
$table_nameservers->data[$key]['ip'] = long2ip($table_nameservers->data[$key]['ip']);
$table_nameservers->data[$key]['name'] = strtolower(($table_nameservers->data[$key]['name'] != '' ? $table_nameservers->data[$key]['name'] . "." : "") . $table_nameservers->data[$key]['name_ns'] . "." . $table_nameservers->data[$key]['dnstld'] . "." . $vars['dns']['ns_zone']);
}
}
$table_nameservers->db_data_multichoice('dns_nameservers', 'id');
for ($i = 1; $i < count($table_nameservers->data); $i++) {
if (isset($table_nameservers->data[$i])) {
$table_nameservers->info['EDIT'][$i] = makelink(array("page" => "hostmaster", "subpage" => "dnsnameserver", "nameserver" => $table_nameservers->data[$i]['id']));
}
}
$table_nameservers->info['EDIT_COLUMN'] = 'name';
$table_nameservers->info['MULTICHOICE_LABEL'] = 'delete';
$table_nameservers->db_data_remove('id', 'name_ns');
$table_nameservers->db_data_translate('dns_nameservers__status', 'dns_nameservers__delete_req');
return $table_nameservers;
}
示例14: table
function table_ip_ranges()
{
global $construct, $db;
$form_search_ranges = $this->form_search_ranges();
$where = $form_search_ranges->db_data_where(array('ip' => 'exclude', 'nodes__name' => 'starts_with'));
$table_ip_ranges = new table(array('TABLE_NAME' => 'table_ip_ranges', 'FORM_NAME' => 'table_ip_ranges'));
$s_ip = correct_ip($form_search_ranges->data[0]['value']);
$where = ($where != '' ? "(" . $where . ") AND " : "") . ($s_ip != '' ? "ip_ranges.ip_start <= " . ip2long($s_ip) . " AND ip_ranges.ip_end >= " . ip2long($s_ip) . " AND " : "");
if ($where != '') {
$where = substr($where, 0, -5);
}
$table_ip_ranges->db_data('ip_ranges.id, "" AS ip_range, ip_ranges.ip_start, ip_ranges.ip_end, communities.name AS communities__name,ip_ranges.date_in, ip_ranges.status, ip_ranges.delete_req', 'ip_ranges ' . 'LEFT JOIN nodes ON ip_ranges.node_id = nodes.id ' . 'LEFT JOIN communities ON nodes.community_id = communities.id ', $where, "", "ip_ranges.date_in DESC, ip_ranges.status ASC");
// .($this->is_cadmin()?'':', ip_ranges.delete_req'),
foreach ((array) $table_ip_ranges->data as $key => $value) {
if ($key != 0) {
$table_ip_ranges->data[$key]['ip_start'] = long2ip($table_ip_ranges->data[$key]['ip_start']);
$table_ip_ranges->data[$key]['ip_end'] = long2ip($table_ip_ranges->data[$key]['ip_end']);
$table_ip_ranges->data[$key]['ip_range'] = $table_ip_ranges->data[$key]['ip_start'] . " - " . $table_ip_ranges->data[$key]['ip_end'];
}
}
if (!$this->is_cadmin()) {
$table_ip_ranges->db_data_multichoice('ip_ranges', 'id');
}
for ($i = 1; $i < count($table_ip_ranges->data); $i++) {
if (isset($table_ip_ranges->data[$i])) {
$table_ip_ranges->info['EDIT'][$i] = makelink(array("page" => "hostmaster", "subpage" => "range", "iprange" => $table_ip_ranges->data[$i]['id']));
}
}
$table_ip_ranges->info['EDIT_COLUMN'] = 'ip_range';
if (!$this->is_cadmin()) {
$table_ip_ranges->info['MULTICHOICE_LABEL'] = 'delete';
}
$table_ip_ranges->db_data_remove('id', 'ip_start', 'ip_end');
$table_ip_ranges->db_data_translate('ip_ranges__status', 'ip_ranges__delete_req');
return $table_ip_ranges;
}
示例15: table
function table_ip_ranges_v6()
{
global $construct, $db, $lang;
$form_search_ranges_v6 = $this->form_search_ranges_v6();
$table_ip_ranges_v6 = new table(array('TABLE_NAME' => 'table_ip_ranges_v6', 'FORM_NAME' => 'table_ip_ranges_v6'));
$table_ip_ranges_v6->db_data('ipv6_node_repos.v6net AS v6net, ip_ranges_v6.id AS v6net_id, ip_ranges_v6.date_in, ip_ranges_v6.status, ip_ranges_v6.delete_req', 'ip_ranges_v6, ipv6_node_repos ', 'ipv6_node_repos.id = ip_ranges_v6.v6net_id', "ip_ranges_v6.id", "ip_ranges_v6.date_in DESC, ip_ranges_v6.status ASC");
$table_ip_ranges_v6->db_data_search($form_search_ranges_v6);
foreach ((array) $table_ip_ranges_v6->data as $key => $value) {
if ($key != 0) {
$table_ip_ranges_v6->data[$key]['v6net'] = inet_ntop($table_ip_ranges_v6->data[$key]['v6net']);
}
}
$table_ip_ranges_v6->db_data_multichoice('ip_ranges_v6', 'v6net_id');
for ($i = 1; $i < count($table_ip_ranges_v6->data); $i++) {
if (isset($table_ip_ranges_v6->data[$i])) {
$table_ip_ranges_v6->info['EDIT'][$i] = make_ref('/hostmaster/range_v6', array("v6net_id" => $table_ip_ranges_v6->data[$i]['v6net_id']));
}
}
$table_ip_ranges_v6->info['EDIT_COLUMN'] = 'v6net';
$table_ip_ranges_v6->info['MULTICHOICE_LABEL'] = 'delete';
$table_ip_ranges_v6->db_data_remove('v6net_id');
$table_ip_ranges_v6->db_data_translate('ip_ranges_v6__status', 'ip_ranges_v6__delete_req');
return $table_ip_ranges_v6;
}