Ejemplo n.º 1
0
if (!isset($_FILES['image']['tmp_name'])) {
    echo "";
} else {
    $file = $_FILES["image"]["tmp_name"];
    $image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
    $imgtype = $_FILES["image"]["type"];
    $ext = GetImageExtension($imgtype);
    $image_name = addslashes($_FILES['image']['name']);
    move_uploaded_file($_FILES["image"]["tmp_name"], "photos/" . $_FILES["image"]["name"]);
    $location = "photos/" . $_FILES["image"]["name"];
    $caption = $_POST['caption'];
    $genre = $_POST['genre'];
    $uitgave = $_POST['uitgave'];
    $totaltime = $_POST['total'];
    $listen = $_POST['fulalbum'];
    if (!findTags($caption . $genre . $uitgave . $totaltime)) {
        $capture_field_vals = "";
        if (isset($_POST["mytext"])) {
            foreach ($_POST["mytext"] as $key => $text_field) {
                echo '<br/>';
                $capture_field_vals .= $text_field . "<br/>";
            }
        }
        $query_upload = "INSERT into photo (location,caption,tracks,genre,uitgave,total,fulalbum) VALUES  ('{$location}','{$caption}','{$capture_field_vals}','{$genre}','{$uitgave}','{$totaltime}','{$listen}')";
        mysql_query($query_upload) or die("error in {$query_upload} == ----> " . mysql_error());
    }
    header("location: wall.php");
    exit;
}
?>
Ejemplo n.º 2
0
Archivo: learn.php Proyecto: vench/esee
        continue;
    }
    echo $file . "\n";
    $sing = getDirectionPath($dirFiles . $file);
    if (empty($sing)) {
        echo "...is empty\n";
        continue;
    }
    if (in_array($sing, $hashObj)) {
        echo "...isset\n";
        continue;
    }
    $id = registerTObject($idFetch, $sing);
    echo "\n";
    echo $sing, '-', $id;
    echo "\n";
    //find tags
    $tags = findTags($sing, $hashObj);
    //add new object to hash
    $hashObj[$id] = $sing;
    if (!empty($tags)) {
        echo "... add " . count($tags) . " tags\n";
        foreach ($tags as $tag) {
            list($idref, $tagData) = $tag;
            $tagId = !isset($hashTags[$tagData]) ? insertTag($tagData) : $hashTags[$tagData];
            $hashTags[$tagData] = $tagId;
            insertTagToTempl($idref, $tagId);
            insertTagToTempl($id, $tagId);
        }
    }
}