Example #1
0
<?php

include '../../classes/Conector.php';
include '../../classes/ItemsPortfolio.php';
//$idItem = $match["params"]["idItem"];
if (isset($_GET["idItem"])) {
    $idItem = $_GET["idItem"];
    $ItemsPortfolio = new ItemsPortfolio();
    $ItemsPortfolio->idItem = $idItem;
    $ItemsPortfolio->EliminarItem();
    //$itFila = $ItemsPortfolio->Listado[0];
    echo "ok";
    /*
    echo " ¿Esta seguro que desea eliminar este proyecto?";
    echo "</br>";
    echo $itFila["titulo"];
    */
} else {
    echo "No llego nada";
}
Example #2
0
<?php

if (!isset($match)) {
    require 'classes/404.php';
    die;
}
include '../backend/classes/Conector.php';
include '../backend/classes/ItemsPortfolio.php';
$ItemsPortfolio = new ItemsPortfolio();
$ItemsPortfolio->Listar();
$max = count($ItemsPortfolio->Listado);
echo '<ul>';
for ($i = 0; $i < $max; $i++) {
    $proFila = $ItemsPortfolio->Listado[$i];
    echo '<li>';
    echo '<a class="ItemsPortfolio" href="';
    echo $router->generate("itemPortfolio", array("titPro" => $proFila['titulo']));
    echo '">';
    echo $proFila["titulo"];
    echo '</a>';
    echo "<br/>";
    echo '<a class="ItemsPortfolioDelete" data-nombreItem="';
    echo $proFila['titulo'];
    echo '"';
    echo ' data-idItem="';
    echo $proFila['idItem'];
    echo '"';
    echo 'href="#"> Eliminars </a>';
    echo "<br/>";
    echo '<a class="ItemsPortfolioMOdifi" data-idItem="';
    echo $proFila['idItem'];
Example #3
0
<?php

if (!isset($match)) {
    require 'classes/404.php';
    die;
}
include '../backend/classes/Conector.php';
include '../backend/classes/ItemsPortfolio.php';
$titPro = $match["params"]["titPro"];
$idItem = $match["params"]["idItem"];
$titPro = urldecode($titPro);
if ($titPro != "") {
    $ItemsPortfolio = new ItemsPortfolio();
    $ItemsPortfolio->Listar();
    $proFila = $ItemsPortfolio->Listado[0];
    ?>


<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Modificar ítem - <?php 
    echo $titPro;
    ?>
 </title>
		<script src="http://tinymce.cachefly.net/4.2/tinymce.min.js"></script>
	
	<script>tinymce.init({selector:'textarea'});</script>
	
<?php

if (!isset($match)) {
    require 'classes/404.php';
    die;
}
include '../backend/classes/Conector.php';
include '../backend/classes/ItemsPortfolio.php';
if (isset($_GET["titulo"])) {
    $titulo = $_GET["titulo"];
    $descripcion = $_GET["descripcion"];
    $itemPort = new ItemsPortfolio();
    $itemPort->titulo = $titulo;
    $itemPort->descripcion = $descripcion;
    $itemPort->Agregar();
    echo utf8_decode("Nuevo proyecto " . $titulo . " creado correctamente");
    echo utf8_decode("Agregue imágenes a su proyecto");
    ?>


<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Upload</title>
		

<script src="http://cdn.rawgit.com/enyo/dropzone/master/dist/dropzone.js" ></script>

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
Example #5
0
<?php

if (!isset($match)) {
    require 'classes/404.php';
    die;
}
include '../backend/classes/Conector.php';
include '../backend/classes/ItemsPortfolio.php';
$ds = DIRECTORY_SEPARATOR;
$storeFolder = 'fotosPortfolio';
$base = '/SENIOR/backend/services/itemsPortfolio/fotosPortfolio/';
if (!empty($_FILES)) {
    $tempFile = $_FILES['file']['tmp_name'];
    $targetPath = dirname(__FILE__) . $ds . $storeFolder . $ds;
    $targetFile = $targetPath . $_FILES['file']['name'];
    move_uploaded_file($tempFile, $targetFile);
    $targetFileForDB = $base . $_FILES['file']['name'];
    $enlace = mysqli_connect("localhost", "root", "", "alquimia");
    $urlAdaptado = mysqli_real_escape_string($enlace, $targetFileForDB);
    $subir = new ItemsPortfolio();
    $subir->urlImagen = $urlAdaptado;
    $subir->imagenperteneceitemportfolio();
}
?>