' . $data['ns2'] . '
');
$this->tagClose('div', 2);
+ $this->rowColOpen('row m-row', 'col-4');
+ $this->HTMLphrase('p', 'm-desc', 'SSH Port');
+ $this->tagClose('div');
+ $this->colOpen('col-8');
+ $this->HTMLphrase('p', 'm-value', ''.$data['ssh_port'].'
');
+ $this->tagClose('div', 2);
+
$this->rowColOpen('row m-row', 'col-4');
$this->HTMLphrase('p', 'm-desc', 'Bandwidth');
$this->tagClose('div');
@@ -2730,8 +2746,8 @@ class itemInsert extends idlers
(empty($data['ipv6'])) ? $ipv6 = null : $ipv6 = $data['ipv6'];
$location_id = $this->handleLocation($data['location']);
$provider_id = $this->handleProvider($data['provider']);
- $insert = $this->dbConnect()->prepare('INSERT IGNORE INTO `servers` (id, hostname, location, provider, ipv4,ipv6, owned_since, os, is_cpu_dedicated, is_dedicated, was_special, bandwidth, virt, has_yabs, ns1, ns2) VALUES (?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?)');
- $insert->execute([$item_id, $data['hostname'], $location_id, $provider_id, $data['ipv4'], $ipv6, $data['owned_since'], $data['os'], $dedi_cpu, $dedi, $offer, $data['bandwidth'], $data['virt'], $data['has_yabs'], $data['ns1'], $data['ns2']]);
+ $insert = $this->dbConnect()->prepare('INSERT IGNORE INTO `servers` (id, hostname, location, provider, ipv4,ipv6, owned_since, os, is_cpu_dedicated, is_dedicated, was_special, bandwidth, virt, has_yabs, ns1, ns2, ssh_port) VALUES (?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?)');
+ $insert->execute([$item_id, $data['hostname'], $location_id, $provider_id, $data['ipv4'], $ipv6, $data['owned_since'], $data['os'], $dedi_cpu, $dedi, $offer, $data['bandwidth'], $data['virt'], $data['has_yabs'], $data['ns1'], $data['ns2'], $data['ssh_port']]);
$this->insertPrice($data['price'], $data['currency'], $data['term'], $data['next_due_date']);
return $item_id;
}
@@ -2749,8 +2765,8 @@ class itemInsert extends idlers
($data['disk_type'] == 'TB') ? $disk_gb = $this->TBtoGB($data['disk']) : $disk_gb = $data['disk'];
$location_id = $this->handleLocation($data['location']);
$provider_id = $this->handleProvider($data['provider']);
- $insert = $this->dbConnect()->prepare('INSERT IGNORE INTO `servers` (id, hostname, location, provider, ipv4,ipv6, owned_since, os, is_cpu_dedicated, is_dedicated, was_special, bandwidth, virt, cpu, cpu_freq, ram, ram_type, swap, swap_type, disk, disk_type, ram_mb, swap_mb, disk_gb, ns1, ns2) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)');
- $insert->execute([$item_id, $data['hostname'], $location_id, $provider_id, $data['ipv4'], $ipv6, $data['owned_since'], $data['os'], $dedi_cpu, $dedi, $offer, $data['bandwidth'], $data['virt'], $data['cpu_amount'], $data['cpu_speed'], $data['ram'], $data['ram_type'], $data['swap'], $data['swap_type'], $data['disk'], $data['disk_type'], $ram_mb, $swap_mb, $disk_gb, $data['ns1'], $data['ns2']]);
+ $insert = $this->dbConnect()->prepare('INSERT IGNORE INTO `servers` (id, hostname, location, provider, ipv4,ipv6, owned_since, os, is_cpu_dedicated, is_dedicated, was_special, bandwidth, virt, cpu, cpu_freq, ram, ram_type, swap, swap_type, disk, disk_type, ram_mb, swap_mb, disk_gb, ns1, ns2, ssh_port) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)');
+ $insert->execute([$item_id, $data['hostname'], $location_id, $provider_id, $data['ipv4'], $ipv6, $data['owned_since'], $data['os'], $dedi_cpu, $dedi, $offer, $data['bandwidth'], $data['virt'], $data['cpu_amount'], $data['cpu_speed'], $data['ram'], $data['ram_type'], $data['swap'], $data['swap_type'], $data['disk'], $data['disk_type'], $ram_mb, $swap_mb, $disk_gb, $data['ns1'], $data['ns2'], $data['ssh_port']]);
$this->insertPrice($data['price'], $data['currency'], $data['term'], $data['next_due_date']);
return $item_id;
}
@@ -2924,8 +2940,8 @@ class itemUpdate extends idlers
} elseif ($data['me_non_active'] == 'on') {
$this->updateActiveStatus(0);
}
- $update = $this->dbConnect()->prepare("UPDATE `servers` SET `hostname` = ?,`ipv4` = ?,`ipv6` = ?,`cpu` = ?,`bandwidth` = ?,`disk` = ?,`ram` = ?,`ram_type` = ?,`swap` = ?,`swap_type` = ?, `virt` = ?, `tags` = ?, `owned_since` = ?, `ns1` = ?, `ns2` = ? WHERE `id`= ? LIMIT 1;");
- return $update->execute([$data['me_hostname'], $data['me_ipv4'], $data['me_ipv6'], $data['me_cpu_amount'], $data['me_bandwidth'], $data['me_disk'], $data['me_ram'], $data['me_ram_type'], $data['me_swap'], $data['me_swap_type'], $data['me_virt'], $data['me_tags'], $data['me_owned_since'], $data['me_ns1'], $data['me_ns2'], $this->item_id]);
+ $update = $this->dbConnect()->prepare("UPDATE `servers` SET `hostname` = ?,`ipv4` = ?,`ipv6` = ?,`cpu` = ?,`bandwidth` = ?,`disk` = ?,`ram` = ?,`ram_type` = ?,`swap` = ?,`swap_type` = ?, `virt` = ?, `tags` = ?, `owned_since` = ?, `ns1` = ?, `ns2` = ?, `ssh_port` = ? WHERE `id`= ? LIMIT 1;");
+ return $update->execute([$data['me_hostname'], $data['me_ipv4'], $data['me_ipv6'], $data['me_cpu_amount'], $data['me_bandwidth'], $data['me_disk'], $data['me_ram'], $data['me_ram_type'], $data['me_swap'], $data['me_swap_type'], $data['me_virt'], $data['me_tags'], $data['me_owned_since'], $data['me_ns1'], $data['me_ns2'], $data['me_ssh_port'], $this->item_id]);
}
public function updateServerPricingFromModal()
diff --git a/my_idlers.sql b/my_idlers.sql
index 6b6c219..ef4f11f 100644
--- a/my_idlers.sql
+++ b/my_idlers.sql
@@ -322,6 +322,7 @@ CREATE TABLE IF NOT EXISTS `servers`
`is_cpu_dedicated` tinyint(1) DEFAULT '0',
`was_special` tinyint(1) DEFAULT '0',
`os` int(11) DEFAULT NULL,
+ `ssh_port` int(11) DEFAULT '22',
`still_have` tinyint(1) DEFAULT '1',
`owned_since` date DEFAULT NULL,
`tags` varchar(255) DEFAULT NULL,
diff --git a/update.sql b/update.sql
index 1f2e341..9ed008e 100644
--- a/update.sql
+++ b/update.sql
@@ -1,2 +1,5 @@
ALTER TABLE `disk_speed`
- ADD COLUMN `datetime` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `1m_as_mbps`;
\ No newline at end of file
+ ADD COLUMN `datetime` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `1m_as_mbps`;
+
+ALTER TABLE `servers`
+ ADD COLUMN `ssh_port` INT(11) NULL DEFAULT '22' AFTER `os`;
\ No newline at end of file