Пример #1
0
 function investigate()
 {
     global $bd;
     if ($this->dbrow != false) {
         $this->origrow = $this->dbrow;
     } else {
         $this->origrow = get_searchrow($this->sid);
     }
     if ($this->origrow != false) {
         $this->fexists = false;
         $this->drive = $this->origrow['drive'];
         $this->investigated = true;
         $this->relativepath = $this->origrow['fpath'];
         $this->fsize = $this->origrow['fsize'];
         $this->fdate = $this->origrow['date'];
         $this->xid = $this->origrow['xid'];
         $this->free = $this->origrow['free'];
         if ($bd->isdrive($this->drive)) {
             $this->fname = $this->origrow['fname'];
             switch ($bd->gtype($this->drive)) {
                 case 'l':
                     $this->fullpath = $bd->getpath($this->drive) . $this->relativepath . $this->fname;
                     if (OPTIMISTICFILE) {
                         $this->fexists = true;
                     } else {
                         if (@file_exists($this->fullpath)) {
                             $this->fexists = true;
                         }
                     }
                     break;
                 case 'n':
                     $kp = new kpnetwork();
                     if ($kp->setdrive($this->drive)) {
                         $this->fullpath = $kp->gensidurl($this);
                     } else {
                         $this->fullpath = '';
                     }
                     $this->fexists = true;
                     break;
             }
         }
     } else {
         return false;
     }
 }