Example #1
0
           <div class="row">
				<div class="col-md-6 ">
					<!-- BEGIN SAMPLE FORM PORTLET-->
					<div class="portlet box blue">
						<div class="portlet-title">
							<div class="caption">
								<i class="fa fa-cogs"></i> Nuevo archivo
							</div>
						</div>
						<div class="portlet-body form">
                        	<?php 
echo '<div class="alert alert-warning">
									<button class="close" data-close="alert"></button>
									Solo se aceptan archivos PDF, DOC, DOCX, XLS, XLSX y JPG
								</div>';
$forma = array("action" => "files_proc.php", "id" => "file_form", "method" => "post", "enctype" => 1, "edit" => 1, "edit_values" => array(array("name" => "user_id", "value" => $_SESSION['id'])), "submit" => "Subir");
$fields = array(array("type" => "text", "label" => "Titulo", "icon" => "fa-cogs", "required" => true, "name" => "file_title", "value" => "", "placeholder" => "Nombre del archivo", "disabled" => false, "data_values" => array(), "editor" => false), array("type" => "text", "label" => "Fecha", "icon" => "fa-calendar", "required" => true, "name" => "fecha", "value" => date('d') . " - " . date_mes(date('m')) . " - " . date('Y'), "placeholder" => "", "disabled" => true, "data_values" => array(), "editor" => false), array("type" => "textarea", "label" => "Comentarios", "icon" => "fa-calendar", "required" => true, "name" => "comentarios", "value" => "", "placeholder" => "comentarios sobre el archivo", "disabled" => false, "data_values" => array(), "editor" => false), array("type" => "file", "label" => "Archivo", "icon" => "fa-file", "required" => true, "name" => "file", "value" => "", "placeholder" => "", "disabled" => false, "data_values" => array(), "editor" => false));
echo create_form($forma, $fields);
?>
						</div>
					</div>
            <!-- end content -->           
            
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->

<?php 
include "includes/footer.php";
Example #2
0
} else {
    if ($ext[1] == "xls" || $ext[1] == "xlsx") {
        $icon = "xls.png";
    } else {
        if ($ext[1] == "doc" || $ext[1] == "docx") {
            $icon = "doc.png";
        } else {
            if ($ext[1] == "jpg" || $ext[1] == "jpeg") {
                $icon = "pic.png";
            } else {
                $icon = "view.png";
            }
        }
    }
}
$fecha = $row['file_day'] . " de " . date_mes($row['file_month']) . " de " . $row['file_year'];
echo '<p>
								<strong>Archivo:</strong> ' . $row['file_title'] . '<br>
								<strong>Creador:</strong> ' . $row['user_fullname'] . '<br>
								<strong>Fecha:</strong> ' . $fecha . '<br>
								<strong>Descargar:</strong> <a href="download.php?mes=' . $hash . '&id=' . $row['file_month'] . '&file=' . $row['file_id'] . '&day=' . $hash . '&file=' . $row['file_filename'] . '&y=' . $row['file_year'] . '&year=' . date('Y') . $hash . date('m') . '"><img title="Ver archivos" src="images/icons/' . $icon . '"></a>
								<br><br>
								<strong>Comentarios al subir:</strong> 
								<br>' . utf8_decode($row['file_comment']) . '<br>
								<br><br>
							</p>';
?>
	
						</div>
					</div>
					<!-- END SAMPLE TABLE PORTLET-->
Example #3
0
File: blog.php Project: Zilus/cms
                                <th style="text-align:center">Acciones</th>
							</tr>
							</thead>
                            
							<tbody>
							<?php 
$sql = "SELECT * FROM posts WHERE posts_section=:posts_section ORDER BY posts_date DESC";
$database->query($sql);
$database->bind(':posts_section', 'blog');
$rows = $database->resultset();
foreach ($rows as &$row) {
    $date = explode("/", mysql_date_to_php("d/m/Y", $row['posts_date']));
    echo '<tr>
											<td>' . $row['posts_title'] . '</a></td>	
											<td>
												<a>' . $date[0] . ' de ' . date_mes($date[1]) . ' de ' . $date[2] . '</a>
											</td>								
											<td style="text-align:center">
												<a href="blog_edit.php?id=' . $row['posts_id'] . '"><i class="fa fa-pencil pencil" title="Editar entrada"></i></a>
												<a href="blog_delete.php?id=' . $row['posts_id'] . '"  OnClick="return Confirm();"><i class="fa fa-trash-o trash" title="Eliminar entrada"></i></a>	
											</td>                        
										</tr>';
}
?>
   
							</tbody>
							</table>
						</div>
					</div>
					<!-- END SAMPLE TABLE PORTLET-->
            	</div>