コード例 #1
0
ファイル: index.php プロジェクト: skaligotla/kplaylist
 function finddirimage($albumsearch)
 {
     for ($i = 0, $c = count($this->albumfiles); $i < $c; $i++) {
         for ($i2 = 0, $c2 = count($albumsearch); $i2 < $c2; $i2++) {
             if (fmatch(strtoupper(kp_basename($albumsearch[$i2][2])), $this->albumfiles[$i])) {
                 return $albumsearch[$i2][0];
             }
         }
     }
     return 0;
 }
コード例 #2
0
ファイル: index.php プロジェクト: Git-Host/AMPPS
 function finddirimage()
 {
     global $setctl;
     $albumfiles = explode(',', strtoupper($setctl->get('albumfiles')));
     for ($i = 0, $c = count($albumfiles); $i < $c; $i++) {
         $amatch = trim($albumfiles[$i]);
         if (empty($amatch)) {
             continue;
         }
         for ($i2 = 0, $c2 = count($this->rows); $i2 < $c2; $i2++) {
             if (fmatch(strtoupper(kp_basename($this->rows[$i2][1])), $amatch)) {
                 $fdesc = new filedesc(kp_basename($this->rows[$i2][1]));
                 $this->mime = $fdesc->mime;
                 $this->dirimageid = $this->rows[$i2][0];
                 return true;
             }
         }
     }
     return false;
 }