$Set_Picture = $Image5; } else { $Set_Picture = \SKT_URL_BASE . '_FileSystems/avatar.png'; } $FieldName5 = $User->username . '_Image5_' . \RAND_GLOBAL_INSTANCE; $Foto = new \CmsDev\CustomControl\ImageUpload\ImageUpload_Control(); $FieldRand = $Foto->Set_Random(md5(rand(9, 999999) . microtime())); $Foto->Set_fileType(array('image/jpeg', 'image/jpg', 'image/png')); $Foto->Set_fileTypeNames('JPG o PNG sin transparencia, con fondo blanco preferentemente.'); $Foto->Set_TextButton('Cargar imagen'); if ($Image5 != '') { $Foto->EnablePictureDefault(); } $Foto->SizeW(800); $Foto->SizeH(600); $Foto->ResizeSize(true); $Foto->CropSize(); $Foto->ShowDelete('Quitar imagen'); $Foto->Set_Max_Dimension_And_FileSize(1280, 900, 2097152); $Foto->Set_Picture($Set_Picture); $Foto->Set_Directory('_FileSystems' . \DS . 'Products' . \DS); $Foto->Set_Name($User->username . '_' . $FieldName5 . md5(microtime())); $Foto->Set_FieldName($FieldName5); $Foto->RealName('Image5'); $Foto->Make(); ?> </div> </div> <div class="clear"></div> <div class="gap"></div> <h3><strong>3.</strong> <span>Datos Opcionales</span></h3>
if ($CCParams->BackgroundCustom != '') { $Set_Picture = $CCParams->BackgroundCustom; } elseif ($CCParams->Background != '') { $Set_Picture = $CCParams->Background; } else { $Set_Picture = \SKT_URL_BASE . '_FileSystems/transparent.png'; } $FieldName = $User->username . '_BackgroundCustom'; $Foto = new \CmsDev\CustomControl\ImageUpload\ImageUpload_Control(); $FieldRand = $Foto->Set_Random(md5(rand(9, 999999) . microtime())); $Foto->Set_fileType(array('image/jpeg', 'image/jpg', 'image/png')); $Foto->Set_fileTypeNames('JPG o PNG sin transparencia, con fondo blanco preferentemente.'); $Foto->Set_TextButton('Cargar imagen de fondo'); //$Foto->SizeW(1280); //$Foto->SizeH(900); $Foto->ResizeSize(false); $Foto->Set_Max_Dimension_And_FileSize(1280, 900, 2097152); $Foto->Set_Picture($Set_Picture); $Foto->Set_FieldName($FieldName); $Foto->Set_Directory('_FileSystems' . \DS . 'users' . \DS); $Foto->Make(); ?> <button id="SKT_SetNewImageUpload" onclick="BackgroundCustom<?php echo $Foto->Get_OutputField(); ?> ('<?php echo $FieldName; ?> ');" class="btn btn-success btn-block mt20" style="display: none">Aplicar cambio de imagen</button> </div> <script type="text/javascript">