Advertisement
jargon

Erroneous vod inclusion

Aug 18th, 2021
1,640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. function include_vods()
  2. {
  3.     global $nen, $prj;
  4.     $ret = '';
  5.    
  6.     if( !is_dir( $nen['root'] . 'showcase/vault/' . $prj . '/vods' ) )
  7.     {
  8.         return '';
  9.     }
  10.    
  11.     $d = array_diff( scandir( $nen['root'] . 'showcase/vault/' . $prj . '/vods/' ), array('..', '.' ) );       
  12.     trk_echo2( 'd', $d );   foreach( $d as $entry );
  13.     {
  14.        
  15.         if( strtolower( substr( $entry, -4, 4 ) ) === '.mp4' )
  16.         {
  17.             $ret .= '<span>{{vod|' . $prj . '|' . strtolower( substr( $entry, 0, -4 ) ) . '|' . strtolower( substr( $entry, 0, -4 ) ) . '}}</span>' . "\r\n";
  18.         }
  19.     }
  20.    
  21.     if ( strlen( $ret ) !== 0)
  22.     {
  23.         $ret = '<table><th><h2>Vods</h2></th><tr><td>' . $ret . '</td></tr></table>';
  24.     }
  25.     return $ret;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement