mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Merge pull request #201 from zydronium/master
Deprecated: Creation of dynamic properties is deprecated in PHP8.2
This commit is contained in:
commit
76d70251bb
4 changed files with 49 additions and 3 deletions
|
@ -3,6 +3,19 @@
|
||||||
include_once('includes/config.inc.php');
|
include_once('includes/config.inc.php');
|
||||||
|
|
||||||
class ApiHandler {
|
class ApiHandler {
|
||||||
|
public $headers;
|
||||||
|
public $hostname;
|
||||||
|
public $port;
|
||||||
|
public $auth;
|
||||||
|
public $proto;
|
||||||
|
public $sslverify;
|
||||||
|
public $curlh;
|
||||||
|
public $method;
|
||||||
|
public $content;
|
||||||
|
public $apiurl;
|
||||||
|
public $url;
|
||||||
|
public $json;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
global $apiip, $apiport, $apipass, $apiproto, $apisslverify;
|
global $apiip, $apiport, $apipass, $apiproto, $apisslverify;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
include_once('ApiHandler.php');
|
include_once('ApiHandler.php');
|
||||||
|
|
||||||
class PdnsAPI {
|
class PdnsAPI {
|
||||||
|
public $http;
|
||||||
|
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->http = new ApiHandler();
|
$this->http = new ApiHandler();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Zone {
|
class Zone {
|
||||||
|
public $id;
|
||||||
|
public $name;
|
||||||
|
public $kind;
|
||||||
|
public $url;
|
||||||
|
public $serial;
|
||||||
|
public $dnssec;
|
||||||
|
public $soa_edit;
|
||||||
|
public $soa_edit_api;
|
||||||
|
public $keyinfo;
|
||||||
|
public $account;
|
||||||
|
public $zone;
|
||||||
|
public $nameservers;
|
||||||
|
public $rrsets;
|
||||||
|
public $masters;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->id = '';
|
$this->id = '';
|
||||||
$this->name = '';
|
$this->name = '';
|
||||||
|
@ -221,6 +236,13 @@ class Zone {
|
||||||
}
|
}
|
||||||
|
|
||||||
class RRSet {
|
class RRSet {
|
||||||
|
public $name;
|
||||||
|
public $type;
|
||||||
|
public $ttl;
|
||||||
|
public $changetype;
|
||||||
|
public $records;
|
||||||
|
public $comments;
|
||||||
|
|
||||||
public function __construct($name = '', $type = '', $content = '', $disabled = FALSE, $ttl = 3600, $setptr = FALSE) {
|
public function __construct($name = '', $type = '', $content = '', $disabled = FALSE, $ttl = 3600, $setptr = FALSE) {
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
|
@ -306,6 +328,10 @@ class RRSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Record {
|
class Record {
|
||||||
|
public $content;
|
||||||
|
public $disabled;
|
||||||
|
public $setptr;
|
||||||
|
|
||||||
public function __construct($content, $disabled = FALSE, $setptr = FALSE) {
|
public function __construct($content, $disabled = FALSE, $setptr = FALSE) {
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
$this->disabled = $disabled;
|
$this->disabled = $disabled;
|
||||||
|
@ -326,6 +352,10 @@ class Record {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Comment {
|
class Comment {
|
||||||
|
public $content;
|
||||||
|
public $account;
|
||||||
|
public $modified_at;
|
||||||
|
|
||||||
public function __construct($content, $account, $modified_at) {
|
public function __construct($content, $account, $modified_at) {
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
$this->account = $account;
|
$this->account = $account;
|
||||||
|
|
|
@ -52,7 +52,7 @@ function _check_csrf_token($user) {
|
||||||
}
|
}
|
||||||
|
|
||||||
define('CSRF_TOKEN', $csrf_token);
|
define('CSRF_TOKEN', $csrf_token);
|
||||||
header("X-CSRF-Token: ${csrf_token}");
|
header("X-CSRF-Token: {$csrf_token}");
|
||||||
}
|
}
|
||||||
|
|
||||||
function enc_secret($message) {
|
function enc_secret($message) {
|
||||||
|
@ -122,13 +122,13 @@ function dec_secret($code) {
|
||||||
|
|
||||||
function _unset_cookie($name) {
|
function _unset_cookie($name) {
|
||||||
$is_ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
|
$is_ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
|
||||||
setcookie($name, null, -1, null, null, $is_ssl);
|
setcookie($name, "", -1, "", "", $is_ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _store_auto_login($value) {
|
function _store_auto_login($value) {
|
||||||
$is_ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
|
$is_ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
|
||||||
// set for 30 days
|
// set for 30 days
|
||||||
setcookie('NSEDIT_AUTOLOGIN', $value, time()+60*60*24*30, null, null, $is_ssl);
|
setcookie('NSEDIT_AUTOLOGIN', $value, time()+60*60*24*30, "", "", $is_ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
function try_login() {
|
function try_login() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue