Beispiel #1
0
 public function addContent()
 {
     global $oSmarty, $oSesion, $oUser, $oFile, $oProfile;
     // Call Content setting and html
     parent::addContent();
     //Para el título y la descripción de la página
     $metatitle = "UptoSave.com";
     $metadescription = "UptoSave is new Box bussines cloud for sharing files";
     $oSmarty->assign('metatitle', $metatitle);
     $oSmarty->assign('metadescription', $metadescription);
     $datos_usuario = $oSesion->getSesion('datos_usuario');
     $datos = $oUser->getDatosUsuario($datos_usuario['id_usuario']);
     $oSmarty->assign('nombre_usuario', $datos['nombre'] . " " . $datos['apellidos']);
     $oSmarty->assign('id_usuario', $datos['id_usuario']);
     $oSmarty->assign('foto', $datos['ruta_foto']);
     $datos_perfil = $oProfile->get($datos_usuario['id_usuario']);
     $oSmarty->assign('datos_perfil', $datos_perfil);
     //Comprobamos capacidad de almacenamiento máximo para el usuario
     $datos_usuario_configuracion = $oUser->getSettingParams($datos_usuario['id_usuario']);
     $oSmarty->assign('datos_usuario_configuracion', $datos_usuario_configuracion);
     //Calculamos el tamaño actual usado por el usuario
     $actual_size = $oFile->getActualSizeUser($datos_usuario['id_usuario']);
     $actual_size = Settings::getByteSize($actual_size);
     $oSmarty->assign('actual_size', $actual_size);
     //Calculamos el tamaño máximo en MB
     $max_size = Settings::getByteSize($datos_usuario_configuracion['max_size']);
     $oSmarty->assign('max_size', $max_size);
     //Ultimas actualizaciones de ficheros y carpetas
     $aRecentFile = $oFile->getRecentUpdates($datos_usuario['id_usuario']);
     $oSmarty->assign('aRecentFile', $aRecentFile);
     // Marcamos documentos como opción principal
     $oSmarty->assign('menu_principal', 'myaccount');
     $oSmarty->assign('contenido_central', 'profile');
     // Assign template for index file
     $oSmarty->setTemplateDir(APP_ROOT . 'www/templates/private/user');
     //Cargamos las variables de las etiquetas dinámicas de texto
     $oSmarty->assign('tx_titulo_display', Localizer::getTranslate('tx_options_display_folder'));
     $oSmarty->assign('tx_titulo_treeview', Localizer::getTranslate('tx_root_tree'));
     //Asignamos las plantillas que vamos a utilizar
     $oSmarty->assign('LATERAL_DERECHO', $oSmarty->fetch('right_side.tpl'));
     $oSmarty->assign('CONTENIDO_CENTRAL', $oSmarty->fetch('center_content.tpl'));
     $oSmarty->setTemplateDir(APP_ROOT . 'www/templates/private/layout');
     //Asignamos las plantillas que vamos a utilizar
     $oSmarty->assign('HEADER', $oSmarty->fetch('header.tpl'));
     $oSmarty->assign('FOOTER', $oSmarty->fetch('footer.tpl'));
     // Display Main Struct with index file
     $oSmarty->display('index.tpl');
 }
Beispiel #2
0
 public function addContent()
 {
     global $oSmarty, $oSesion, $oUser, $oFile;
     // Call Content setting and html
     parent::addContent();
     //Para el título y la descripción de la página
     $metatitle = "UptoSave.com";
     $metadescription = "UptoSave is new Box bussines cloud for sharing files";
     $oSmarty->assign('metatitle', $metatitle);
     $oSmarty->assign('metadescription', $metadescription);
     $datos_usuario = $oSesion->getSesion('datos_usuario');
     $datos = $oUser->getDatosUsuario($datos_usuario['id_usuario']);
     $oSmarty->assign('nombre_usuario', $datos['nombre'] . " " . $datos['apellidos']);
     $oSmarty->assign('id_usuario', $datos['id_usuario']);
     $oSmarty->assign('foto', $datos['ruta_foto']);
     //Comprobamos capacidad de almacenamiento máximo para el usuario
     $datos_usuario_configuracion = $oUser->getSettingParams($datos_usuario['id_usuario']);
     $oSmarty->assign('datos_usuario_configuracion', $datos_usuario_configuracion);
     //Calculamos el tamaño actual usado por el usuario
     $actual_size = $oFile->getActualSizeUser($datos_usuario['id_usuario']);
     $actual_size = Settings::getByteSize($actual_size);
     $oSmarty->assign('actual_size', $actual_size);
     //Calculamos el tamaño máximo en MB
     $max_size = Settings::getByteSize($datos_usuario_configuracion['max_size']);
     $oSmarty->assign('max_size', $max_size);
     // Marcamos documentos como opción principal
     $oSmarty->assign('menu_principal', 'files');
     $oSmarty->assign('contenido_central', 'inicio');
     //Nombre de la carpeta padre por defecto la carpeta raiz
     $name_parent_folder = Localizer::getTranslate('tx_sub_file');
     //Comprobamos el directorio en el que estamos sino nos metemos en el directorio root
     $aRoot = explode("/", $_GET['id_root']);
     if (count($aRoot) > 0) {
         $_GET['id_root'] = $aRoot[count($aRoot) - 1];
     }
     if (isset($_GET['id_root']) && $_GET['id_root'] != 0) {
         $aFile = $oFile->getDocumentosPadreArbol($datos_usuario['id_usuario'], $_GET['id_root']);
         $oSmarty->assign('aFile', $aFile);
         $oSmarty->assign('id_padre', $_GET['id_root']);
         $oSesion->setSesion('id_root', $_GET['id_root']);
         //Return name of parent folder
         $name_parent_folder = $oFile->getParentNameFolder($_GET['id_root']);
         if ($name_parent_folder == "") {
             $name_parent_folder = Localizer::getTranslate('tx_sub_file');
         }
     } else {
         //Nos traemos los ficheros y carpetas del directorio root
         $aFile = $oFile->getDocumentosPadreArbol($datos_usuario['id_usuario'], 0);
         $oSmarty->assign('aFile', $aFile);
         $oSmarty->assign('id_padre', 0);
         $oSesion->setSesion('id_root', 0);
         $name_parent_folder = Localizer::getTranslate('tx_sub_file');
     }
     //Asignamos el nombre de la carpeta padre
     $oSmarty->assign('name_parent_folder', $name_parent_folder);
     //Ultimas actualizaciones de ficheros y carpetas
     $aRecentFile = $oFile->getRecentUpdates($datos_usuario['id_usuario']);
     $oSmarty->assign('aRecentFile', $aRecentFile);
     // Assign template for index file
     $oSmarty->setTemplateDir(APP_ROOT . 'www/templates/private/user');
     //Cargamos las variables de las etiquetas dinámicas de texto
     $oSmarty->assign('tx_titulo_display', Localizer::getTranslate('tx_options_display_folder'));
     $oSmarty->assign('tx_titulo_treeview', Localizer::getTranslate('tx_root_tree'));
     //Asignamos las plantillas que vamos a utilizar
     $oSmarty->assign('LATERAL_DERECHO', $oSmarty->fetch('right_side.tpl'));
     $oSmarty->assign('CONTENIDO_CENTRAL', $oSmarty->fetch('center_content.tpl'));
     $oSmarty->setTemplateDir(APP_ROOT . 'www/templates/private/layout');
     //Asignamos las plantillas que vamos a utilizar
     $oSmarty->assign('HEADER', $oSmarty->fetch('header.tpl'));
     $oSmarty->assign('FOOTER', $oSmarty->fetch('footer.tpl'));
     // Display Main Struct with index file
     $oSmarty->display('index.tpl');
 }
    function content_4f5d2ccce2129($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date_format')) {
            include '/Applications/XAMPP/xamppfiles/htdocs/uptosave/smarty/libs/plugins/modifier.date_format.php';
        }
        ?>
<script>
$(document).ready(function() {
	
	//create bubble popups for each element with class "button"
	
	var positions = {
							'top-left'     : {position: 'top',    align: 'left'   },
							'top-center'   : {position: 'top',    align: 'center' },
							'top-right'    : {position: 'top',    align: 'right'  },
							'left-middle'  : {position: 'left',   align: 'middle' },
							'right-middle' : {position: 'right',  align: 'middle' },	
							'bottom-left'  : {position: 'bottom', align: 'left'   },
							'bottom-center': {position: 'bottom', align: 'center' },
							'bottom-right' : {position: 'bottom', align: 'right'  }
						};
			
			
		
  	
	$(".row_f:odd").css("background-color", "#F4F4F8");
    $(".row_f:even").css("background-color", "#FFFFFF");
    $(".row_f:odd").hover(function(){
    	$(this).css("background-color","#f5f5f5");
    	},
    	function(){
	        $(this).css('background-color', '#F4F4F8');
	    });
	 $(".row_f:even").hover(function(){
    	$(this).css("background-color","#f5f5f5");
    	},
    	function(){
	        $(this).css('background-color', '#FFF');
	    });

	
	$(".edit_folder").click(function() {
		var id = $(this).attr("id");
		var ids = id.split("_");
		cambiarBotonEditar(ids[1]);
		$.ajax({
		   type: "POST",
		    url: '<?php 
        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
        ?>
user/files/edit',
		    data: $('#form_edit_fold_'+ids[1]).serialize(),
		   cache: false,
		    success: function(data) {
	        	var result = jQuery.parseJSON(data);
	      	  	if (result[1]==1){
		      	  	$('#retorno_usuario').html(result[0]);
					$('#mensaje').css('display','block');
					$('#error').addClass('error');
					$('#error').removeClass('success');
					$('#nombre_'+ids[1]).val('');
					$('#mensaje').delay(4000).fadeOut(400);
					$("#bedit_"+result[3]).removeClass("gris");
					$("#bedit_"+result[3]).addClass("azul");
					$("#bedit_"+result[3]).removeAttr("disabled");
					$('#modal_edit_'+result[3]).modal('hide');
					$("#id_cargando").hide("slow");
					$("#bedit_"+result[3]).attr("value","Aceptar");
					$("#loading").toggle();
					$('#loading').delay(2000).fadeOut(400);
					$('#row_file').html(result[2]);
					
	      	  }else if (result[1]==2){
		      		$('#retorno_usuario').html(result[0]);
					$('#mensaje').css('display','block');
					$('#error').addClass('success');
					$('#error').removeClass('error');
					$('#nombre_'+ids[1]).val('');
					$('#mensaje').delay(4000).fadeOut(400);
					$("#bedit_"+result[3]).removeClass("gris");
					$("#bedit_"+result[3]).addClass("azul");
					$("#bedit_"+result[3]).removeAttr("disabled");
					$("#id_cargando").hide("slow");
					$('#modal_edit_'+result[3]).modal('hide');
					$("#bedit_"+result[3]).attr("value","Aceptar");
					$("#loading").toggle();
					$('#loading').delay(2000).fadeOut(400);
					$('#row_file').html(result[2]);
		      	  }

				
            }
		
		 });
		
		return false;
	});
});
	
</script>

<?php 
        if (isset($_smarty_tpl->tpl_vars['aFile']->value) && $_smarty_tpl->tpl_vars['aFile']->value == '') {
            ?>
	<div class="alert-message block-message warning">
        <p><strong><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
            $_block_repeat = true;
            echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
tx_init_message<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
</strong> <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
            $_block_repeat = true;
            echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
tx_init_message2<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
</p>
        <div class="alert-actions">
          <a id="bnew" onclick="createFolder('<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
            $_block_repeat = true;
            echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
tx_options_create_new_folder<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
');" href="#" class="btn small">
          	<img style="width:20px;vertical-align:bottom" src="<?php 
            echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
            ?>
images/icons/icon_button_folder.png"/><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
            $_block_repeat = true;
            echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
tx_options_new_folder<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

          </a> 
          
          <a href="#" class="btn small">
          	<img style="width:20px;vertical-align:bottom" src="<?php 
            echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
            ?>
images/icons/icon_button_upload.png"/><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
            $_block_repeat = true;
            echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
tx_options_upload_file<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

          </a>
        </div>
      </div>
 <?php 
        } else {
            ?>
	<?php 
            $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['item']->_loop = false;
            $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['aFile']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                $_smarty_tpl->tpl_vars['item']->_loop = true;
                $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
                ?>
				<div style="border-bottom: 1px solid  #DDDDDD;" id="more_options_row_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" class="row_f">
						<div style="clear:both;">
							  <div id="sprite_file" style="float:left;width:42px;margin-bottom: 5px;margin-top: 5px;">
								<?php 
                if ($_smarty_tpl->tpl_vars['item']->value['tipo'] == 0) {
                    ?>
									 <img style="vertical-align:bottom" src="<?php 
                    echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                    ?>
images/icons/icon_folder.png"/>
								 <?php 
                } else {
                    ?>
								 		<?php 
                    if ($_smarty_tpl->tpl_vars['item']->value['id_archivo_padre'] == 0) {
                        ?>
								 			<?php 
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['id_usuario']->value;
                        $_tmp1 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        $_tmp2 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                        $_tmp3 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['name_file'];
                        $_tmp4 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['ext'];
                        $_tmp5 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['type_file'];
                        $_tmp6 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        $_tmp7 = ob_get_clean();
                        echo Tools::getImageFromFile($_tmp1, $_tmp2, $_tmp3, $_tmp4, $_tmp5, $_tmp6, 0, 35, '', $_tmp7);
                        ?>

								 			<script>
								 				
								 				$(document).ready(function() {
									 					$('#div_<?php 
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        ?>
').CreateBubblePopup();
									 					$('#div_<?php 
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        ?>
').SetBubblePopupOptions({
				
				
														position : 'left',
														align	 :'middle',
														tail	 : {align: 'middle'},
														
														innerHtml: '<?php 
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['id_usuario']->value;
                        $_tmp8 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        $_tmp9 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                        $_tmp10 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['name_file'];
                        $_tmp11 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['ext'];
                        $_tmp12 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['type_file'];
                        $_tmp13 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        $_tmp14 = ob_get_clean();
                        echo Tools::getImageFromFile($_tmp8, $_tmp9, $_tmp10, $_tmp11, $_tmp12, $_tmp13, 0, 80, $_tmp14);
                        ?>
',
					
														innerHtmlStyle: {
																			color:'#FFFFFF', 
																			'text-align':'center',
																			'padding':'6px'
																		},
														
														themeName: 	'azure',
														themePath: 	'<?php 
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        ?>
libs/jquery/bubblePopup/Examples/images/jquerybubblepopup-theme',
														
														closingDelay: 200
													 
													});
												}); 
								 				
								 			</script>
								 		<?php 
                    } else {
                        ?>
								 			<?php 
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['id_usuario']->value;
                        $_tmp15 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        $_tmp16 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                        $_tmp17 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['name_file'];
                        $_tmp18 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['ext'];
                        $_tmp19 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['type_file'];
                        $_tmp20 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo_padre'];
                        $_tmp21 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        $_tmp22 = ob_get_clean();
                        echo Tools::getImageFromFile($_tmp15, $_tmp16, $_tmp17, $_tmp18, $_tmp19, $_tmp20, $_tmp21, 30, '', $_tmp22);
                        ?>

								 			<script>
								 				
								 				$(document).ready(function() {
									 					$('#div_<?php 
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        ?>
').CreateBubblePopup();
									 					$('#div_<?php 
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        ?>
').SetBubblePopupOptions({
				
				
														position : 'left',
														align	 :'middle',
														tail	 : {align: 'middle'},
														
														innerHtml: '<?php 
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['id_usuario']->value;
                        $_tmp23 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        $_tmp24 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                        $_tmp25 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['name_file'];
                        $_tmp26 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['ext'];
                        $_tmp27 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['type_file'];
                        $_tmp28 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo_padre'];
                        $_tmp29 = ob_get_clean();
                        ob_start();
                        echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                        $_tmp30 = ob_get_clean();
                        echo Tools::getImageFromFile($_tmp23, $_tmp24, $_tmp25, $_tmp26, $_tmp27, $_tmp28, $_tmp29, 80, '', $_tmp30);
                        ?>
',
					
														innerHtmlStyle: {
																			color:'#FFFFFF', 
																			'text-align':'center',
																			'padding':'6px'
																		},
														
														themeName: 	'azure',
														themePath: 	'<?php 
                        echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                        ?>
libs/jquery/bubblePopup/Examples/images/jquerybubblepopup-theme',
														
														closingDelay: 200
													 
													});
												}); 
								 				
								 			</script>
								 		<?php 
                    }
                    ?>
								 <?php 
                }
                ?>
						  	  </div>
					 		   <div id="data_file" style="margin-bottom: 5px;margin-top: 5px;">     
					        		 <h3>
					        		 	<a style="font-size:13px;color:#000;" href="#" onclick="loadPath('<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
','<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                ?>
' ,'<?php 
                echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                ?>
user/path/<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
/<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                ?>
');return false;"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                ?>
</a>
					        		 </h3>
					         		<span class="gris"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_update_name_file<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
 <span class="gris"> <?php 
                echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['fecha_update']);
                ?>
 <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_update_name_file2<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
</span></span>
					         		<?php 
                if ($_smarty_tpl->tpl_vars['item']->value['id_usuario'] != $_smarty_tpl->tpl_vars['id_usuario']->value) {
                    ?>
					         			 <a class="azul" style=" clear:right;" href="#"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre_usuario'];
                    ?>
 <?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['apellidos_usuario'];
                    ?>
</a>
					        		<?php 
                } else {
                    ?>
					         			<a class="azul" style=" clear:right;" href="<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
user/profile"><?php 
                    $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                    $_block_repeat = true;
                    echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                    while ($_block_repeat) {
                        ob_start();
                        ?>
tx_options_you<?php 
                        $_block_content = ob_get_clean();
                        $_block_repeat = false;
                        echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                    }
                    array_pop($_smarty_tpl->smarty->_tag_stack);
                    ?>
</a>
					         		<?php 
                }
                ?>
									<ul class="options_list right">
											<li class="op_more">
											 	<a id="more_options_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" data-placement="above" rel='twipsy'  href="#" data-original-title='More Options'></a>
											 	<?php 
                if ($_smarty_tpl->tpl_vars['item']->value['tipo'] == 0) {
                    ?>
 <!-- Folder Options -->
											 	<script>
											 		$("#more_options_<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
").contextMenu({
															menu: 'myMenu',
															leftButton: true
														}, function(action, el, pos) {
															
															if (action == 'open'){
																	cambiarUrl('/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo_padre'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
');
																	
																	$.ajax({
																            type: 'POST',
																            url: '<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
user/path/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
',
																            data: '',
																            // before: mostrarVentanaCargando(),
																            // complete: ocultarVentanaCargando(), 
																            success: function(data) {
																	        	var result = jQuery.parseJSON(data);
																	        	
																					$("#loading").toggle();
																					$('#loading').delay(2000).fadeOut(400);
																					$('#row_file').html(result[0]);
																					$('#id_padre').val(result[1]);
																					$('#title_root').html(result[3]);
																					$('#id_archivo').html(<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
);
																				
																            }
																        });
																
															}else if (action == 'settings_folder'){
																displaySettingsFolder(tx_titulo_display,<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
,'<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
','<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['descripcion'];
                    ?>
');
															}else if (action == 'new_tab'){
																window.open('<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
user/files/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
');
															}
															
														});
														
														
														$("#more_options_row_<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
").contextMenu({
															menu: 'myMenu',
															leftButton: false
														}, function(action, el, pos) {
															
															if (action == 'open'){
																	
																	cambiarUrl('/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
');
																	
																	$.ajax({
																            type: 'POST',
																            url: '<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
user/path/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
',
																            data: '',
																            // before: mostrarVentanaCargando(),
																            // complete: ocultarVentanaCargando(), 
																            success: function(data) {
																	        	var result = jQuery.parseJSON(data);
																					$("#loading").toggle();
																					$('#loading').delay(2000).fadeOut(400);
																					$('#row_file').html(result[0]);
																					$('#id_padre').val(result[1]);
																					$('#title_root').html(result[3]);
																					
																				
																            }
																        });
																
															}else if (action == 'settings_folder'){
																displaySettingsFolder(tx_titulo_display,<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
,'<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
','<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['descripcion'];
                    ?>
');
																
															}else if (action == 'new_tab'){
																window.open('<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
user/files/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
');
															}
															
														});
											 		
											 	</script>
											 	<?php 
                } else {
                    ?>
 <!-- Files Options -->
											 		 	<script>
											 		$("#more_options_<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
").contextMenu({
															menu: 'myMenuFile',
															leftButton: true
														}, function(action, el, pos) {
															
															if (action == 'preview'){
																
																(function($) {
																    $.extend({
																        doGet: function(url, params) {
																            document.location = url + '?' + $.param(params);
																        },
																        doPost: function(url, params) {
																            var $form = $("<form method='POST'>").attr("action", url);
																            $.each(params, function(name, value) {
																                $("<input type='hidden'>")
																                    .attr("name", name)
																                    .attr("value", value)
																                    .appendTo($form);
																            });
																            $form.appendTo("body");
																            $form.submit();
																        }
																    });
																})(jQuery);

																$.doPost("<?php 
                    echo $_smarty_tpl->tpl_vars['RUTA_WEB_ABSOLUTA']->value;
                    ?>
viewer", {
																    id: "<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
",
																    name: "<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                    ?>
"
																});
																	
															}else if (action == 'download'){
															}else if (action == 'upload'){
															}else if (action == 'share'){
															}else if (action == 'tags'){
															}else if (action == 'properties'){
															}else if (action == 'move_copy'){
															}else if (action == 'delete_file'){	
															}
															
														});
														
														
														$("#more_options_row_<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                    ?>
").contextMenu({
															menu: 'myMenuFile',
															leftButton: false
														}, function(action, el, pos) {
															
															if (action == 'preview'){
																
															}else if (action == 'download'){
															}else if (action == 'upload'){
															}else if (action == 'share'){
															}else if (action == 'tags'){
															}else if (action == 'properties'){
															}else if (action == 'move_copy'){
															}else if (action == 'delete_file'){	
															}
															
														});
											 		
											 	</script>
											 	<?php 
                }
                ?>
											</li>
									</ul>
								</div>
						
					 			<div id="modal_edit_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" name="modal_edit_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" class="modal hide fade" style="width:500px;">
								  	<form  method="post"  name="form_edit_fold_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" id="form_edit_fold_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" action="" class="form_edit_fold">
									    <div class="modal-header">
									    	<img style="vertical-align:bottom" src="<?php 
                echo $_smarty_tpl->tpl_vars['BASE_THEMES_URL']->value;
                ?>
images/icons/icon_folder.png"/>
										    <span style="font-size:22px;color:#525252;font-weight: bold;" id="titulo_archivo_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
"></span>
										    <a href="#" class="close">&times;</a><br/>
									    </div>
									    <div class="modal-body">
										 	<fieldset>
										 	<div class="clearfix">
									 			<label for="tx_form_name"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_name<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    		<div class="input">
									    			<div class="inline-inputs">
														<input type="text" class="span6 required" style="padding-left:4px;" id="nombre_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" name="nombre_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" placeholder="<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_name_placeholder<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
" value="<?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['nombre'])) {
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre'];
                }
                ?>
"/>
									      				<p id="textoobj"></p>
									      			</div>
									      		</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_description"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_description<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
: <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_name_optional<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<textarea  rows="3" class="span6 required" id="descripcion_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" name="descripcion_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
" style="width: 331px; height: 88px;padding-left:4px"><?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['descripcion'])) {
                    echo $_smarty_tpl->tpl_vars['item']->value['descripcion'];
                }
                ?>
</textarea>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_location"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_location<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<label for="form_location" class="span6 font-weight-normal"><?php 
                if (isset($_smarty_tpl->tpl_vars['name_parent_folder']->value)) {
                    echo $_smarty_tpl->tpl_vars['name_parent_folder']->value;
                }
                ?>
</label>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_owner"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_owner<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<label for="form_owner" class="span6 font-weight-normal"><?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['nombre_usuario'])) {
                    echo $_smarty_tpl->tpl_vars['item']->value['nombre_usuario'];
                }
                ?>
 <?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['apellidos_usuario'])) {
                    echo $_smarty_tpl->tpl_vars['item']->value['apellidos_usuario'];
                }
                ?>
</label>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_size"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_size<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<label for="form_size" class="span6 font-weight-normal"><?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['max_size'])) {
                    echo Settings::getByteSize($_smarty_tpl->tpl_vars['item']->value['max_size']);
                }
                ?>
</label>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_created"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_created<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<label for="form_created" class="span6 font-weight-normal"><?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['fecha'])) {
                    echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['fecha']);
                }
                ?>
</label>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      	<div class="clearfix">
									      			<label for="tx_form_update"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_form_update<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
:</label>
									    			<div class="input">
									    				<div class="inline-inputs">
															<label for="form_update" class="span6 font-weight-normal"><?php 
                if (isset($_smarty_tpl->tpl_vars['item']->value['fecha_update'])) {
                    echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['fecha_update']);
                }
                ?>
</label>
									      					<p id="textoobj"></p>
									      				</div>
									      			</div>
									      	</div>
									      </fieldset>
									    </div>
									    <div class="modal-footer" style="text-align:center;">
									    	<input type="hidden" name="id_usuario" id="id_usuario" value="<?php 
                echo $_smarty_tpl->tpl_vars['id_usuario']->value;
                ?>
"/> 
									    	<input type="hidden" name="id_archivo" id="id_archivo" value="<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
"/> 
									    	<input type="hidden" name="id_padre" id="id_padre" value="<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo_padre'];
                ?>
"/> 
											<a id="bedit_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['id_archivo'];
                ?>
"  href="#" class="btn small bold azul edit_folder"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_button_accept<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
</a>
											<input type="button" href="#"  class="btn small close bold azul" style="margin-top: 0px;opacity: 1;float:none;" value="<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('translate', array());
                $_block_repeat = true;
                echo Localizer::translate(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
tx_button_cancel<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo Localizer::translate(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
" />
											
								  		</div>
							  		</form>
							  	</div>
						</div>
				</div>
	<?php 
            }
        }
    }
Beispiel #4
0
require $config_urls['BASE_PATH'] . 'class/file.class.php';
require $config_urls['BASE_PATH'] . 'www/php/private/user/security.php';
$datos_usuario = $oSesion->getSesion('datos_usuario');
$datos = $oUser->getDatosUsuario($datos_usuario['id_usuario']);
$oSmarty->assign('nombre_usuario', $datos['nombre'] . " " . $datos['apellidos']);
$oSmarty->assign('id_usuario', $datos['id_usuario']);
$oSmarty->assign('foto', $datos['ruta_foto']);
//Comprobamos capacidad de almacenamiento máximo para el usuario
$datos_usuario_configuracion = $oUser->getSettingParams($datos_usuario['id_usuario']);
$oSmarty->assign('datos_usuario_configuracion', $datos_usuario_configuracion);
//Calculamos el tamaño actual usado por el usuario
$actual_size = $oFile->getActualSizeUser($datos_usuario['id_usuario']);
$actual_size = Settings::getByteSize($actual_size);
$oSmarty->assign('actual_size', $actual_size);
//Calculamos el tamaño máximo en MB
$max_size = Settings::getByteSize($datos_usuario_configuracion['max_size']);
$oSmarty->assign('max_size', $max_size);
$metatitle = "UptoSave.com";
$metadescription = "UptoSave is new Box bussines cloud for sharing files";
$oSmarty->assign('metatitle', $metatitle);
$oSmarty->assign('metadescription', $metadescription);
// Marcamos documentos como opción principal
$oSmarty->assign('menu_principal', 'files');
$oSmarty->assign('contenido_central', 'inicio');
$name_parent_folder = Localizer::getTranslate('tx_sub_file');
$path_url = "/" . FRAMEWORK_NAME . "/user/path/";
$request = str_replace("'" . $path_url . "'", "", $_SERVER['REQUEST_URI']);
$params = explode("/", $request);
$root = $params[0];
if (isset($_GET['id_root'])) {
    $root = $_GET['id_root'];