Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/media_manager/mediaTypesDetails.inc.php
<?php
	function chkEmptyOptions($typeID) {
		global $mediaOption;
		
		if($mediaOption->getSingleOption("resizeImages",          $typeID) == "") 
			$mediaOption->insertOption(  "resizeImages", "",      $typeID);
		if($mediaOption->getSingleOption("imageResizeWidth",      $typeID) == "") 
			$mediaOption->insertOption(  "imageResizeWidth", "",  $typeID);
		if($mediaOption->getSingleOption("imageResizeHeight",     $typeID) == "") 
			$mediaOption->insertOption(  "imageResizeHeight", "", $typeID);
		if($mediaOption->getSingleOption("thumbnails",            $typeID) == "") 
			$mediaOption->insertOption(  "thumbnails", "",        $typeID);
		if($mediaOption->getSingleOption("thumbnailsWidth",       $typeID) == "") 
			$mediaOption->insertOption(  "thumbnailsWidth", "",   $typeID);
		if($mediaOption->getSingleOption("thumbnailsHeight",      $typeID) == "") 
			$mediaOption->insertOption(  "thumbnailsHeight", "",  $typeID);
		$mediaOption->getOptionList();
	}
	
	if($typeSub != 2) {
		$display = "overview";
	} else {
		$display = "own";
		$modSet = false;
		if (ereg("(^[1-9]?[0-9]*$)", $typeID)) {
			$modQuery = mysql_fetch_object(mysql_query("SELECT * FROM ".TABLE."_mm_type WHERE typeID = '$typeID'"));
			$modName = $modQuery->name;
			$modExt = $modQuery->extension;
			if($modName != "" && $modExt != "") { $modSet = true; }
			$modThumb        = $mediaOption->getSingleOption("thumbnails", $modQuery->typeID);
			$modResizeHeight = $mediaOption->getSingleOption("imageResizeHeight", $modQuery->typeID);
			$modResizeWidth  = $mediaOption->getSingleOption("imageResizeWidth",  $modQuery->typeID);
			$modResize       = $mediaOption->getSingleOption("resizeImages",      $modQuery->typeID);
			$modThumbHeight  = $mediaOption->getSingleOption("thumbnailsHeight",  $modQuery->typeID);
			$modThumbWidth   = $mediaOption->getSingleOption("thumbnailsWidth",   $modQuery->typeID);
		} else {
			unset($typeID);
			unset($mod);
		}
		
		if(empty($uploadbutton)) {
			if($modThumb)  $modThumbChk  = "checked";
			if($modResize) $modResizeChk = "checked";
			$tpl->assign("type_form",
				array ( "TID"                => $typeID,
						"MOD"                => $mod,
						"NAME"               => $modName,
						"CHK_TN"             => $modThumbChk,
						"CHK_RS"             => $modResizeChk,
						"RS_HEIGHT"          => $modResizeHeight,
						"RS_WIDTH"           => $modResizeWidth,
						"TN_HEIGHT"          => $modThumbHeight,
						"TN_WIDTH"           => $modThumbWidth
				)
			);
			$tpl->assign("type_form_set", "1");
			$tpl->assign("type_mod_elements_set", "1");
		} else {
			// Prüfen, ob alles korrekt ist
			if (empty($error)) {
				chkEmptyOptions($typeID);
				$mediaOption->updateOption("resizeImages", $rsImage, $typeID);
				$mediaOption->updateOption("thumbnails", $thumbnails, $typeID);
				if (isset($_POST[imgRsWidth]))  $mediaOption->updateOption("imageResizeWidth",  $_POST[imgRsWidth], $typeID);
				if (isset($_POST[imgRsHeight])) $mediaOption->updateOption("imageResizeHeight", $_POST[imgRsHeight], $typeID);
				if (isset($_POST[tnWidth]))     $mediaOption->updateOption("thumbnailsWidth",   $_POST[tnWidth], $typeID);
				if (isset($_POST[tnHeight]))    $mediaOption->updateOption("thumbnailsHeight",  $_POST[tnHeight], $typeID);
				$display = "overview";
			} 
		}
	}
?>
Return current item: Content*Builder