summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-01-03 17:14:21 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-01-03 17:14:21 +0100
commitb8997d1f66aa5d89a4ba91900def70e5d06e036c (patch)
tree9ed8a21a1a94f9c4aab269f4b660b85db654184c
parentfix (diff)
downloaditisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar.gz
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar.bz2
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar.lz
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar.xz
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.tar.zst
itisclient-b8997d1f66aa5d89a4ba91900def70e5d06e036c.zip
-rw-r--r--main.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.php b/main.php
index 9000d31..06f9d34 100644
--- a/main.php
+++ b/main.php
@@ -15,7 +15,17 @@ function strip_tags_content($text, $tags = '', $invert = FALSE) {
}
return $text;
}
-function DOMinnerHTML(DOMNode $element) {
+function is_domDocument($object)
+{
+ if($object instanceof DOMDocument) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+function DOMinnerHTML($element) {
+ if(!is_domDocument($element)) return -6;
$innerHTML = "";
$children = $element->childNodes;
foreach ($children as $child) {
@@ -49,12 +59,12 @@ Errors:
-3 bad username and/or password (diplomatski odgovor ;-)
-4 not written yet (suka bljet)
-5 session exists in another system (sucky)
- -6
+ -6 error in fetched data
*/
class itisClient {
private $username;
private $password;
- public $version = array(0, 0, 1);
+ public $version = array(0, 0, 2);
private $programname = "itisclient";
private $programdomain = 'itisclient.sijanec.tk';
private $cookiedir; // set at runtime, ker je get_curerent_user, v login()