summaryrefslogtreecommitdiffstats
path: root/main.php
diff options
context:
space:
mode:
Diffstat (limited to 'main.php')
-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()