Changeset 988005
- Timestamp:
- 09/12/2014 07:23:35 AM (12 years ago)
- Location:
- wp-flash-player
- Files:
-
- 4 edited
-
tags/1.3/functions.php (modified) (17 diffs)
-
tags/1.3/manage.php (modified) (4 diffs)
-
trunk/functions.php (modified) (17 diffs)
-
trunk/manage.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-flash-player/tags/1.3/functions.php
r984272 r988005 8 8 $media = filter_input ( INPUT_GET, 'media' ); 9 9 if (isset ( $name )) { 10 return hd_ajax_add_playlist ( $name, $media );10 return hd_ajax_add_playlist_player ( $name, $media ); 11 11 } 12 12 // Function used for rendering error message … … 210 210 $ytb_pattern = "@youtube.com\/watch\?v=([0-9a-zA-Z_-]*)@i"; 211 211 if (strpos ( $act_filepath, 'www.youtube.com' ) > 0) { 212 $youtube_data = hd_GetSingleYoutubeVideo ( $imageUrl );212 $youtube_data = hd_GetSingleYoutubeVideo_player ( $imageUrl ); 213 213 $act_image = "http://img.youtube.com/vi/" . $imageUrl . "/mqdefault.jpg"; 214 214 $act_opimage = "http://img.youtube.com/vi/" . $imageUrl . "/maxresdefault.jpg"; … … 248 248 $tags = explode ( ',', $act_tags ); 249 249 250 render_message ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );250 render_message_player ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) ); 251 251 } 252 252 … … 300 300 $updateID = intval ( $updateID ); 301 301 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET image= '$updated_thumb_value' WHERE vid = '$updateID'" ); 302 render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );302 render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) ); 303 303 return; 304 304 } … … 330 330 $updated_preview_value = $wp_showPath . $updated_preview; 331 331 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET opimage= '$updated_preview_value' WHERE vid = '$updateID'" ); 332 render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );332 render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) ); 333 333 return; 334 334 } … … 336 336 337 337 // Function used for retrieving YOUTUBE url 338 function youtubeurl () {338 function youtubeurl_player() { 339 339 $act_filepath = addslashes ( trim ( filter_input ( INPUT_POST, 'filepath' ) ) ); 340 340 if (! empty ( $act_filepath )) { … … 349 349 $act_filepath = "http://www.youtube.com/watch?v=" . $imgstr [3]; 350 350 } 351 $youtube_data = hd_GetSingleYoutubeVideo ( $match );351 $youtube_data = hd_GetSingleYoutubeVideo_player ( $match ); 352 352 if ($youtube_data) { 353 353 $act [0] = addslashes ( $youtube_data ['title'] ); … … 440 440 if (strlen ( $act_name ) > 30) 441 441 $videoName = substr ( $act_name, 0, 30 ) . ' ...'; 442 render_message ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );442 render_message_player ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) ); 443 443 return $videoName; 444 444 } … … 479 479 480 480 if (empty ( $text )) 481 render_message ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );481 render_message_player ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) ); 482 482 483 483 return; … … 485 485 486 486 // calling via Ajax to add playlist hdflvscript.js file this is calling 487 function hd_ajax_add_playlist ($name, $media) {487 function hd_ajax_add_playlist_player($name, $media) { 488 488 global $wpdb; 489 489 … … 508 508 if ($insert_plist != 0) { 509 509 $pid = $wpdb->insert_id; // get index_id 510 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );510 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media ); 511 511 } 512 512 } … … 541 541 if ($insert_plist != 0) { 542 542 $pid = $wpdb->insert_id; // get index_id 543 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );543 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) ); 544 544 } 545 545 } … … 567 567 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv_playlist SET playlist_name = '$p_name', playlist_desc = '$p_description', playlist_order = '$p_playlistorder' WHERE pid = '$p_id' " ); 568 568 569 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );569 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) ); 570 570 } 571 571 return; … … 581 581 $delete_plist2 = $wpdb->query ( "DELETE FROM " . $wpdb->prefix . "hdflv_med2play WHERE playlist_id = $act_pid" ); 582 582 583 render_message ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );583 render_message_player ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) ); 584 584 585 585 return; … … 587 587 588 588 // Function used for rendering message 589 function render_message ($message, $timeout = 0) {589 function render_message_player($message, $timeout = 0) { 590 590 ?> 591 591 … … 600 600 601 601 // Function used to return YOUTUBE single video 602 function hd_GetSingleYoutubeVideo ($youtube_media) {602 function hd_GetSingleYoutubeVideo_player($youtube_media) { 603 603 if ($youtube_media == '') 604 604 return; 605 605 $url = 'http://gdata.youtube.com/feeds/api/videos/' . $youtube_media; 606 $ytb = hd_ParseYoutubeDetails ( hd_GetYoutubePage( $url ) );606 $ytb = hd_ParseYoutubeDetails_player ( hd_GetYoutubePage_player ( $url ) ); 607 607 return $ytb [0]; 608 608 } 609 609 610 610 // Function used for parsing xml fron youtube 611 function hd_ParseYoutubeDetails ($ytVideoXML) {611 function hd_ParseYoutubeDetails_player($ytVideoXML) { 612 612 613 613 // Create parser, fill it with xml then delete it … … 701 701 702 702 // Function used get content of url given using curl 703 function hd_GetYoutubePage ($url) {703 function hd_GetYoutubePage_player($url) { 704 704 705 705 // Try to use curl first -
wp-flash-player/tags/1.3/manage.php
r984272 r988005 326 326 return $uploads; 327 327 } 328 function render_message($message, $timeout = 0) {328 function manage_render_message($message, $timeout = 0) { 329 329 ?> 330 330 <div style="margin-bottom: 0px; margin-top: -20px;" class="wrap"> … … 460 460 $youtube_media = filter_input ( INPUT_POST, 'youtube_media' ); 461 461 if (isset ( $youtube_media )) { 462 $act1 = youtubeurl ();462 $act1 = youtubeurl_player (); 463 463 $act0_str = str_replace ( '"', '', $act1 [0] ); 464 464 ?> … … 483 483 $siteUrl = '?page=hdflv&edit=succ'; 484 484 } 485 // echo '<script type="text/javascript">';486 // echo "window.location.href = '$siteUrl'";487 // echo '</script>';488 485 } 489 486 490 487 $edit = filter_input ( INPUT_GET, 'edit' ); 491 488 if (isset ( $edit )) { 492 render_message ( 'Video file "' . $videoname . '" Updated Successfully' );489 manage_render_message ( 'Video file "' . $videoname . '" Updated Successfully' ); 493 490 } 494 491 /* updating thumb image */ … … 1599 1596 $playlist_name = filter_input ( INPUT_GET, 'pname' ); 1600 1597 $message = hd_delete_playlist ( $this->act_pid, $playlist_name ); 1601 // $this->render_message($message);1602 1598 $this->mode = 'playlist'; 1603 1599 // show playlist -
wp-flash-player/trunk/functions.php
r984272 r988005 8 8 $media = filter_input ( INPUT_GET, 'media' ); 9 9 if (isset ( $name )) { 10 return hd_ajax_add_playlist ( $name, $media );10 return hd_ajax_add_playlist_player ( $name, $media ); 11 11 } 12 12 // Function used for rendering error message … … 210 210 $ytb_pattern = "@youtube.com\/watch\?v=([0-9a-zA-Z_-]*)@i"; 211 211 if (strpos ( $act_filepath, 'www.youtube.com' ) > 0) { 212 $youtube_data = hd_GetSingleYoutubeVideo ( $imageUrl );212 $youtube_data = hd_GetSingleYoutubeVideo_player ( $imageUrl ); 213 213 $act_image = "http://img.youtube.com/vi/" . $imageUrl . "/mqdefault.jpg"; 214 214 $act_opimage = "http://img.youtube.com/vi/" . $imageUrl . "/maxresdefault.jpg"; … … 248 248 $tags = explode ( ',', $act_tags ); 249 249 250 render_message ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );250 render_message_player ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) ); 251 251 } 252 252 … … 300 300 $updateID = intval ( $updateID ); 301 301 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET image= '$updated_thumb_value' WHERE vid = '$updateID'" ); 302 render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );302 render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) ); 303 303 return; 304 304 } … … 330 330 $updated_preview_value = $wp_showPath . $updated_preview; 331 331 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET opimage= '$updated_preview_value' WHERE vid = '$updateID'" ); 332 render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );332 render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) ); 333 333 return; 334 334 } … … 336 336 337 337 // Function used for retrieving YOUTUBE url 338 function youtubeurl () {338 function youtubeurl_player() { 339 339 $act_filepath = addslashes ( trim ( filter_input ( INPUT_POST, 'filepath' ) ) ); 340 340 if (! empty ( $act_filepath )) { … … 349 349 $act_filepath = "http://www.youtube.com/watch?v=" . $imgstr [3]; 350 350 } 351 $youtube_data = hd_GetSingleYoutubeVideo ( $match );351 $youtube_data = hd_GetSingleYoutubeVideo_player ( $match ); 352 352 if ($youtube_data) { 353 353 $act [0] = addslashes ( $youtube_data ['title'] ); … … 440 440 if (strlen ( $act_name ) > 30) 441 441 $videoName = substr ( $act_name, 0, 30 ) . ' ...'; 442 render_message ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );442 render_message_player ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) ); 443 443 return $videoName; 444 444 } … … 479 479 480 480 if (empty ( $text )) 481 render_message ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );481 render_message_player ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) ); 482 482 483 483 return; … … 485 485 486 486 // calling via Ajax to add playlist hdflvscript.js file this is calling 487 function hd_ajax_add_playlist ($name, $media) {487 function hd_ajax_add_playlist_player($name, $media) { 488 488 global $wpdb; 489 489 … … 508 508 if ($insert_plist != 0) { 509 509 $pid = $wpdb->insert_id; // get index_id 510 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );510 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media ); 511 511 } 512 512 } … … 541 541 if ($insert_plist != 0) { 542 542 $pid = $wpdb->insert_id; // get index_id 543 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );543 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) ); 544 544 } 545 545 } … … 567 567 $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv_playlist SET playlist_name = '$p_name', playlist_desc = '$p_description', playlist_order = '$p_playlistorder' WHERE pid = '$p_id' " ); 568 568 569 render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );569 render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) ); 570 570 } 571 571 return; … … 581 581 $delete_plist2 = $wpdb->query ( "DELETE FROM " . $wpdb->prefix . "hdflv_med2play WHERE playlist_id = $act_pid" ); 582 582 583 render_message ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );583 render_message_player ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) ); 584 584 585 585 return; … … 587 587 588 588 // Function used for rendering message 589 function render_message ($message, $timeout = 0) {589 function render_message_player($message, $timeout = 0) { 590 590 ?> 591 591 … … 600 600 601 601 // Function used to return YOUTUBE single video 602 function hd_GetSingleYoutubeVideo ($youtube_media) {602 function hd_GetSingleYoutubeVideo_player($youtube_media) { 603 603 if ($youtube_media == '') 604 604 return; 605 605 $url = 'http://gdata.youtube.com/feeds/api/videos/' . $youtube_media; 606 $ytb = hd_ParseYoutubeDetails ( hd_GetYoutubePage( $url ) );606 $ytb = hd_ParseYoutubeDetails_player ( hd_GetYoutubePage_player ( $url ) ); 607 607 return $ytb [0]; 608 608 } 609 609 610 610 // Function used for parsing xml fron youtube 611 function hd_ParseYoutubeDetails ($ytVideoXML) {611 function hd_ParseYoutubeDetails_player($ytVideoXML) { 612 612 613 613 // Create parser, fill it with xml then delete it … … 701 701 702 702 // Function used get content of url given using curl 703 function hd_GetYoutubePage ($url) {703 function hd_GetYoutubePage_player($url) { 704 704 705 705 // Try to use curl first -
wp-flash-player/trunk/manage.php
r984272 r988005 326 326 return $uploads; 327 327 } 328 function render_message($message, $timeout = 0) {328 function manage_render_message($message, $timeout = 0) { 329 329 ?> 330 330 <div style="margin-bottom: 0px; margin-top: -20px;" class="wrap"> … … 460 460 $youtube_media = filter_input ( INPUT_POST, 'youtube_media' ); 461 461 if (isset ( $youtube_media )) { 462 $act1 = youtubeurl ();462 $act1 = youtubeurl_player (); 463 463 $act0_str = str_replace ( '"', '', $act1 [0] ); 464 464 ?> … … 483 483 $siteUrl = '?page=hdflv&edit=succ'; 484 484 } 485 // echo '<script type="text/javascript">';486 // echo "window.location.href = '$siteUrl'";487 // echo '</script>';488 485 } 489 486 490 487 $edit = filter_input ( INPUT_GET, 'edit' ); 491 488 if (isset ( $edit )) { 492 render_message ( 'Video file "' . $videoname . '" Updated Successfully' );489 manage_render_message ( 'Video file "' . $videoname . '" Updated Successfully' ); 493 490 } 494 491 /* updating thumb image */ … … 1599 1596 $playlist_name = filter_input ( INPUT_GET, 'pname' ); 1600 1597 $message = hd_delete_playlist ( $this->act_pid, $playlist_name ); 1601 // $this->render_message($message);1602 1598 $this->mode = 'playlist'; 1603 1599 // show playlist
Note: See TracChangeset
for help on using the changeset viewer.