public function __construct($iCustomerId) { $this->iCustomerId = $iCustomerId; $this->iCrawled = 0; $this->iSeen = 0; //crawl settings $res = mysql_query("SELECT * from user where id='" . $this->iCustomerId . "'") or die(mysql_error()); if ($row = mysql_fetch_array($res)) { if ($row['level_limit'] > 0) { $this->iMaxLevel = $row['level_limit']; } else { $this->iMaxLevel = 20; } if ($row['crawl_limit'] > 0) { $this->iCrawlLimit = $row['crawl_limit']; } else { $this->iCrawlLimit = 500; } } else { $this->iMaxLevel = 20; $this->iCrawlLimit = 500; } //fetch domains to be crawled $u = new UserManagement(); $aDomain = $u->getDomains($iCustomerId); $aFilterAdd = array(); for ($i = 0; $i < sizeof($aDomain); $i++) { array_push($aFilterAdd, $aDomain[$i]); } $this->aFilterAdd = $aFilterAdd; $this->aFound = array(); $this->aCrawled = array(); $this->aProcess = array(); }