Beispiel #1
0
     </div>
     <div class="col-md-2 col-xs-6 col-sm-6">
         <p>Imagen 5</p>
         <div class="controls">
             <?php 
 if ($Image5 != '') {
     $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();
Beispiel #2
0
<div class="controls" id="FotoPerfil">
    <?php 
$FieldName = $User->username . '_Logo';
$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 Logotipo');
$Foto->SizeW(300);
$Foto->SizeH(300);
$Foto->Set_Max_Dimension_And_FileSize(1000, 1000, 512000);
$Foto->Set_Picture(\SKT_URL_BASE . $User->ClientAuth_picture);
$Foto->Set_Directory('_FileSystems' . \DS . 'users' . \DS);
$Foto->Set_FieldName($FieldName);
$Foto->Make();
?>
    <div class="clear" id="DumySetNewImageUpload">
        <button id="SKT_SetNewImageUpload" onclick="NewLogo<?php 
echo $Foto->Get_OutputField();
?>
('<?php 
echo $FieldName;
?>
');" class="btn btn-success btn-block mt20" style="display: none">Aplicar cambio de imagen</button>
    </div>
</div>
<script type="text/javascript">
    function NewLogo<?php 
echo $Foto->Get_OutputField();
?>
(Image) {
Beispiel #3
0
            <p>Cargar una imagen propia para el fondo</p>
            <div class="controls" id="BackgroundCustom">
                <?php 
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;
?>