mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Actually make it work
This commit is contained in:
parent
bc5a4964ec
commit
ee0729e6c0
3 changed files with 9 additions and 4 deletions
|
@ -112,7 +112,7 @@ function jtable_respond($records, $method = 'multiple', $msg = 'Undefined errorm
|
||||||
} else {
|
} else {
|
||||||
if (isset($_GET['jtPageSize'])) {
|
if (isset($_GET['jtPageSize'])) {
|
||||||
$jTableResult['TotalRecordCount'] = count($records);
|
$jTableResult['TotalRecordCount'] = count($records);
|
||||||
$records = array_slice($records, $_GET['jtStartIndex'], $_GET['jtPageSize']);
|
$records = array_slice($records, $_GET['jtStartIndex']-1, $_GET['jtPageSize']);
|
||||||
}
|
}
|
||||||
$jTableResult['Result'] = "OK";
|
$jTableResult['Result'] = "OK";
|
||||||
$jTableResult['Records'] = $records;
|
$jTableResult['Records'] = $records;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
include_once('config.inc.php');
|
include_once('config.inc.php');
|
||||||
include_once('misc.inc.php');
|
include_once('misc.inc.php');
|
||||||
|
include_once('wefactauth.inc.php');
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
@ -39,6 +40,9 @@ function logout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function try_login() {
|
function try_login() {
|
||||||
|
global $wefactapiurl;
|
||||||
|
global $wefactapikey;
|
||||||
|
|
||||||
if (isset($_POST['username']) and isset($_POST['password'])) {
|
if (isset($_POST['username']) and isset($_POST['password'])) {
|
||||||
if (valid_user($_POST['username']) === FALSE) {
|
if (valid_user($_POST['username']) === FALSE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -50,7 +54,7 @@ function try_login() {
|
||||||
if ($wefact === FALSE) {
|
if ($wefact === FALSE) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ($wefact != -1) {
|
if ($wefact !== -1) {
|
||||||
$do_local_auth = 0;
|
$do_local_auth = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,15 @@ include_once('misc.inc.php');
|
||||||
/* This class is written by Wefact. See https://www.wefact.nl/wefact-hosting/apiv2/
|
/* This class is written by Wefact. See https://www.wefact.nl/wefact-hosting/apiv2/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WeFactAPI
|
class WeFactAPI {
|
||||||
{
|
|
||||||
|
|
||||||
private $url;
|
private $url;
|
||||||
private $responseType;
|
private $responseType;
|
||||||
private $apiKey;
|
private $apiKey;
|
||||||
|
|
||||||
function __construct(){
|
function __construct(){
|
||||||
|
global $wefactapiurl;
|
||||||
|
global $wefactapikey;
|
||||||
$this->url = $wefactapiurl;
|
$this->url = $wefactapiurl;
|
||||||
$this->api_key = $wefactapikey;
|
$this->api_key = $wefactapikey;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue