'; print '' ."\n"; $LICENSE = 'GPL'; print '' ."\n"; $VH = $_SERVER['SERVER_NAME']; print '' ."\n"; $IAM = $_SERVER['SCRIPT_NAME']; $SCRIPT = $VH . $IAM; $namelist = array( 'youtube' => 'YouTube' ); $actionlist = array( 'vlbt' => 'videos.list_by_tag' ); $match_found = 0; if ( isset( $_GET['interface_name'] ) ) { $interface_name = $_GET['interface_name']; } else { $interface_name = $namelist['youtube']; } ## end if print '' ."\n"; print '' ."\n"; print 'Interface to WWW::' . $interface_name . '::Com' ."\n"; print '' ."\n"; print '' ."\n"; if ( isset( $_GET['interface_action'] ) ) { $interface_action = $_GET['interface_action']; } else { $interface_action = $actionlist['vlbt']; } ## end if if ( isset( $_GET['sstr'] ) ) { $sstr_value = preg_replace( '/[`]/', '', $_GET['sstr'] ); } else { $sstr_value = ''; } ## end if if ( isset( $_GET['submission'] ) ) { $submitted_value = $_GET['submission']; } else { $submitted_value = 'Enter'; } ## end if $vlbt_wnt = 'found'; $vlbt_dly = 1; ## I'll calc this $vlbt_1st = 1; $vlbt_max = 2; $vlbt_per = 6; $vlbt_col = 3; $vlbt_siz = 'large_window'; $vlbt_flg = ''; $vlbt_type = ''; if ( isset( $_GET['submission'] ) && ! isset( $_GET['arm'] ) ) { $arm_value = 0; $vlbt_type = 'PNP'; ## for kids $arm_cbox = ''; $vlbt_flg .= ' --html_disarm'; } else { $arm_value = 1; $vlbt_type = 'P2P'; ## for adults $arm_cbox = ''; } ## end if if ( isset( $_GET['method'] ) ) { $method_value = $_GET['method']; if ( $method_value == 'stdmethod' ) { $stdmethod_rbtn = ''; $auto_play_rbtn = ''; $thumbnail_rbtn = ''; } else { $vlbt_flg .= ' --html_' . $_GET['method']; if ( $method_value == 'auto_play' ) { $stdmethod_rbtn = ''; $auto_play_rbtn = ''; $thumbnail_rbtn = ''; } elseif ( $method_value == 'thumbnail' ) { $stdmethod_rbtn = ''; $auto_play_rbtn = ''; $thumbnail_rbtn = ''; } ## end if } ## end if } else { $stdmethod_rbtn = ''; $auto_play_rbtn = ''; $thumbnail_rbtn = ''; } ## end if if ( isset( $_GET['want'] ) ) { $vlbt_wnt = $_GET['want']; if ( $vlbt_wnt == 'all' ) { $want_all_rbtn = ''; $want_fnd_rbtn = ''; $want_nfd_rbtn = ''; } else { if ( $vlbt_wnt == 'found' ) { $want_all_rbtn = ''; $want_fnd_rbtn = ''; $want_nfd_rbtn = ''; } elseif ( $vlbt_wnt == 'not_found' ) { $want_all_rbtn = ''; $want_fnd_rbtn = ''; $want_nfd_rbtn = ''; } ## end if } ## end if } else { $vlbt_wnt = 'all'; $want_all_rbtn = ''; $want_fnd_rbtn = ''; $want_nfd_rbtn = ''; } ## end if if ( isset( $_GET['1st'] ) ) { $vlbt_1st = $_GET['1st']; } ## end if if ( isset( $_GET['max'] ) ) { $vlbt_max = $_GET['max']; } ## end if if ( isset( $_GET['per'] ) ) { $vlbt_per = $_GET['per']; } ## end if if ( isset( $_GET['col'] ) ) { $vlbt_col = $_GET['col']; } ## end if foreach ( $namelist as $n ) { if ( $interface_name == $n ) { $match_found++; } ## end if } ## end foreach print '
' ."\n"; print ''. "\n"; print '' ."\n"; print '' ."\n"; print '' ."\n"; print '' ."\n"; print '' ."\n"; print '' ."\n"; print ''. "\n"; print '' ."\n"; print '' ."\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print '' ."\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print ''. "\n"; print '' ."\n"; print '
WWW::'.$interface_name.'::Com
' ."\n"; print '' ."\n"; print 'Matthew 3:12' ."\n"; print '' ."\n"; print '' ."\n"; print '"His winnowing fork is in his hand, and he will clear his threshing floor, gathering his wheat into the barn and burning up the chaff with unquenchable fire." -- NIV' ."\n"; print '
'. "\n"; print '
  • P : Pornography or Obscenity
  • ' ."\n"; print '
  • I : Illegal Acts
  • ' ."\n"; print '
  • G : Graphic Violence
  • ' ."\n"; print '
  • R : Racially or Ethnically Offensive Content
' ."\n"; print '
'. "\n"; print '
  • [S] : Submit
' ."\n"; print '
'. "\n"; print '' . $AUTHOR . '
'. '
' . '
' . 'to protect children'. "\n"; print '
'. "\n"; print $arm_cbox . 'PARENTS: If you're logging into ' . $interface_name . ' to flag videos, like me, then use my armed interface.' ."\n"; print '
'. "\n"; if ( 1 ) { print '' ."\n"; } else { print '' ."\n"; } ## end if if ( 1 ) { print '' ."\n"; } else { print '' ."\n"; } ## end if print '
' ."\n"; print 'Tag:' ."\n"; print '' ."\n"; print '
'. "\n"; print 'Refresh' ."\n"; print '
' ."\n"; print '' ."\n"; print '
'. "\n"; print '"Keep it FUN, CLEAN and REAL!"' ."\n"; print '
' ."\n"; print 'Please help to protect all children, by flagging all adult content as inappropriate material.' ."\n"; print '
'. "\n"; print 'First Page: ' ."\n"; print 'Pages: ' ."\n"; print ''. "\n"; print 'Per Page: ' ."\n"; print ''. "\n"; print 'Columns: ' ."\n"; print '
'. "\n"; print 'View results:' ."\n"; if ( $interface_action == $actionlist['vlbt'] && $sstr_value != '' ) { $sstr_canon = preg_replace( '/\s+/', '_nbsp_', $sstr_value ); print '' . $sstr_value . '' ."\n"; } elseif ( $interface_action == $actionlist['vlbu'] ) { #print shell_exec( 'do_something_here ' . $interface_name . ' 2>&1' ); } ## end if if ( isset( $_GET{'cannon'} ) ) { remove_directory( '/var/www/html/youtube/tag/tag_'.$_GET{'cannon'} ); } ## end if list_tag_results( '/var/www/html/youtube/tag', 0, $sstr_value ); print ''. "\n"; print 'Remove results:' ."\n"; if ( ( $interface_action == $actionlist['vlbt'] ) && ( $submitted_value == 'Enter' ) && ( $sstr_value != '' ) ) { print shell_exec( 'umask 0000;/var/www/html/youtube/tag/tag.plx' . ' --apache' . ' --ml_tag=' . $sstr_canon . ' ' . ' --ml_vlbt_want=' . $vlbt_wnt . ' --ml_delay_sec=' . $vlbt_dly . ' --ml_first_page=' . $vlbt_1st . ' --ml_max_pages=' . $vlbt_max . ' --ml_per_page=' . $vlbt_per . ' --html_columns=' . $vlbt_col . ' --html_watch_size=' . $vlbt_siz . $vlbt_flg . ' 2>&1' ); } elseif ( $interface_action == $actionlist['vlbu'] ) { #print shell_exec( 'do_something_here ' . $interface_name . ' 2>&1' ); } ## end if list_tag_results( '/var/www/html/youtube/tag', 1 ); print '
'. "\n"; print 'Display method:' ."\n"; print '
' ."\n"; print $stdmethod_rbtn . 'STANDARD Display method: This will load slowly.' ."\n"; ##print '
' ."\n"; ## ##print $auto_play_rbtn . 'AUTO-PLAY Display method: This will load more slowly, and makes a mess of the audio.' ."\n"; print '
' ."\n"; print $thumbnail_rbtn . 'THUMBNAIL Display method: This will load quickly.' ."\n"; print '
'. "\n"; print 'Display:' ."\n"; print '
' ."\n"; print $want_all_rbtn . 'ALL: This will display all videos returned.' ."\n"; print '
' ."\n"; print $want_fnd_rbtn . 'FOUND: This will display all videos found to match the tags you've entered.' ."\n"; print '
' ."\n"; print $want_nfd_rbtn . 'NOT_FOUND: This will display all videos not found to match the tags you've entered.' ."\n"; print '
'. "\n"; print '
' ."\n"; function list_tag_results( $dir, $rmdir_flag, $sstr_excluded ) { $IAM = $_SERVER['SCRIPT_NAME']; $dir_contents = scandir( $dir ); foreach ( $dir_contents as $tag_item ) { if ( ! preg_match( '/^tag_/', $tag_item ) ) { continue; }; $item_canon = preg_replace( '/^tag_/', '', $tag_item ); $item = preg_replace( '/_nbsp_/', ' ', $item_canon ); if ( ! $rmdir_flag ) { if ( $item != $sstr_excluded ) { print '' . $item . '' ."\n"; } ## end if } else { print '' . $item . '' ."\n"; } ## end if } ## end foreach } ## end function function remove_directory( $dir ) { $dir_contents = scandir( $dir ); foreach ( $dir_contents as $item ) { if ( ( $item == '.' ) || ( $item == '..' ) ) { continue; }; ##debug##print $dir . '/' . $item ."\n"; if ( is_dir( $dir . '/' . $item ) ) { ##debug##print 'call is ' . $dir . '/' . $item ."\n"; remove_directory( $dir . '/' . $item ); } elseif ( file_exists( $dir . '/' . $item ) ) { unlink( $dir . '/' . $item ); } ## end if } ## end foreach rmdir( $dir ); } ## end function ?>