Cambios webcam
git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_Web/trunk@29 77ab8c26-3d69-2c4d-86f2-786f4ba54905
This commit is contained in:
parent
5ee16b2ef3
commit
4280b9bc02
@ -1,5 +1,5 @@
|
|||||||
<?php echo
|
<?php echo
|
||||||
|
print_r($_POST);
|
||||||
$pixels = $_POST["pixels"];
|
$pixels = $_POST["pixels"];
|
||||||
if(is_null($pixels))
|
if(is_null($pixels))
|
||||||
{
|
{
|
||||||
@ -25,9 +25,10 @@
|
|||||||
else {
|
else {
|
||||||
$guid =$_POST['guid'];
|
$guid =$_POST['guid'];
|
||||||
//sanitize for illegal characters
|
//sanitize for illegal characters
|
||||||
$guid = mysql_real_escape_string(stripslashes($guid));
|
$guid = mysql_escape_string(stripslashes($guid));
|
||||||
$fileName = "images/".$guid.".jpg";
|
$fileName = "images/".$guid.".jpg";
|
||||||
}
|
}
|
||||||
|
echo $fileName;
|
||||||
|
|
||||||
/// Get Pixel Data and generate new Bitmap Data
|
/// Get Pixel Data and generate new Bitmap Data
|
||||||
/// Then save to server
|
/// Then save to server
|
||||||
@ -79,7 +80,9 @@ function GetPixelAndSave($fileName, $pixels, $width, $height)
|
|||||||
// free up memory
|
// free up memory
|
||||||
imagedestroy($im);
|
imagedestroy($im);
|
||||||
|
|
||||||
$fh = fopen($fileName, "a+" );
|
if(($fh = fopen($fileName,'w')) === FALSE) {
|
||||||
|
die('Failed to open file for writing!');
|
||||||
|
}
|
||||||
fwrite( $fh, $contents );
|
fwrite( $fh, $contents );
|
||||||
fclose( $fh );
|
fclose( $fh );
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -12,45 +12,6 @@ function save_application_form($cf7) {
|
|||||||
$result = rename($old_filename, $new_filename);
|
$result = rename($old_filename, $new_filename);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
//$table_name = $wpdb->prefix."posts";
|
|
||||||
/*$results = $wpdb->insert(
|
|
||||||
$table_name,
|
|
||||||
array('group_id' => 1,
|
|
||||||
'testimonial' => $cf7->posted_data["tu-mensaje"],
|
|
||||||
'client_name' => $cf7->posted_data["tu-nombre"],
|
|
||||||
'client_pic' => 'http://localhost/lqdvi/webcam/images/'.$cf7->posted_data["id"],
|
|
||||||
'client_website' => $cf7->posted_data["tu-email"],
|
|
||||||
'client_company' => '',
|
|
||||||
'show_in_widget' => 0,
|
|
||||||
'order' => 0));*/
|
|
||||||
/*$result = $wpdb->insert(
|
|
||||||
$table_name,
|
|
||||||
array( 'post_type' => 'slides',
|
|
||||||
'post_title' => $cf7->posted_data["tu-nombre"],
|
|
||||||
'post_content' => $cf7->posted_data["tu-mensaje"],
|
|
||||||
'post_status' => 'pending',
|
|
||||||
'post_date' => current_time('mysql'),
|
|
||||||
'post_date_gmt' => current_time('mysql',1)
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
);*/
|
|
||||||
|
|
||||||
/*$filename = 'http://localhost/lqdvi/webcam/images/'.$cf7->posted_data["id"];
|
|
||||||
$wp_filetype = wp_check_filetype(basename($filename), null );
|
|
||||||
$attachment = array(
|
|
||||||
'post_mime_type' => $wp_filetype['type'],
|
|
||||||
'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
|
|
||||||
'post_content' => '',
|
|
||||||
'post_status' => 'inherit'
|
|
||||||
);
|
|
||||||
$attach_id = wp_insert_attachment( $attachment, $filename, 37 );
|
|
||||||
// you must first include the image.php file
|
|
||||||
// for the function wp_generate_attachment_metadata() to work
|
|
||||||
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
|
||||||
$attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
|
|
||||||
wp_update_attachment_metadata( $attach_id, $attach_data );*/
|
|
||||||
|
|
||||||
|
|
||||||
// Create post object
|
// Create post object
|
||||||
$my_post_data = array(
|
$my_post_data = array(
|
||||||
|
|||||||
@ -22,7 +22,7 @@ Template Name: Webcam
|
|||||||
videoPreviewY: "10", // video preview y cord.
|
videoPreviewY: "10", // video preview y cord.
|
||||||
videoFps: "30", // video fps
|
videoFps: "30", // video fps
|
||||||
bandwidth: "0", // Specifies the maximum amount of bandwidth that the current outgoing video. The default value is 16384 , pass 0 for bandwidth.
|
bandwidth: "0", // Specifies the maximum amount of bandwidth that the current outgoing video. The default value is 16384 , pass 0 for bandwidth.
|
||||||
quality: "100", // quality for camera, value is 0-100.
|
quality: "80", // quality for camera, value is 0-100.
|
||||||
screenShotX: "10", // screen shot x cord
|
screenShotX: "10", // screen shot x cord
|
||||||
screenShotY: "10", // screen shot y cord
|
screenShotY: "10", // screen shot y cord
|
||||||
currentURL: "<?php echo get_bloginfo('url'); ?>"
|
currentURL: "<?php echo get_bloginfo('url'); ?>"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user