+++ /dev/null
-<?php
-
-class AJAXBackendBase {
- protected $db;
- protected $relativeRootPath;
-
- public function __construct()
- {
- global $db;
- $this->db = $db;
-
- $path = substr($_SERVER['HTTP_REFERER'], strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'])+strlen($_SERVER['SERVER_NAME'])+1);
-
- $pos = 0;
- $this->relativeRootPath = '';
- while (($pos = strpos($path, '/', $pos)) !== false) {
- $this->relativeRootPath .= '../';
- $pos++;
- }
- }
-
- public function relativeRootPath()
- {
- return $this->relativeRootPath;
- }
-
-}