add images to Gallery2 by user

custom addItemToAlbum php giving ERROR_PLATFORM_FAILURE | Gallery

this code is almost right, you just need to change below:

$usersName = “Ceads";
$filePath = “gallery2/g2data_hg/albums/$usersName/";
$itemName = “testimage.jpg";
$title = “test image 2″;
$base_dir = $filePath; // where to find files to process
$processed_dir = ‘user_images/’; // where to put files when done
$albumId = ’81’; // the id of the target Gallery2 album

if ($handle = opendir($base_dir)) {
    if(importToGallery2($base_dir, $itemName, $albumId) != 1) {
        //rename ($base_dir.$itemName, $processed_dir.$itemName); // move file to processed directory
        echo “<BR>*-* importToGallery2 called and processed and file moved *-*<BR>";
    }
    closedir($handle);
}

to

    $usersName = “Ceads";
    $filePath = “F:\\download_test1.jpg";
    $itemName = “download_test1.jpg";
    $title = “test image 2″;
    $base_dir = $filePath; // where to find files to process
    $processed_dir = ‘user_images/’; // where to put files when done
    $albumId = ’85’; // the id of the target Gallery2 album

 
    if(importToGallery2($base_dir, $itemName, $albumId) != 1) {
        //rename ($base_dir.$itemName, $processed_dir.$itemName); // move file to processed directory
        echo “<BR>*-* importToGallery2 called and processed and file moved *-*<BR>";
    }

and

$ret = GalleryEmbed::init(array(‘activeUserId’ => 6, ‘fullInit’ => true));

to

$ret = GalleryEmbed::init(array(‘fullInit’ => true, ’embedUri’ => ‘/gallery2/main.php’, ‘g2Uri’ => ‘/gallery2/’));

Creating a Custom Java Desktop Database Application

Creating a Custom Java Desktop Database Application – NetBeans 6.7 Tutorial

Creating a Custom Java Desktop Database Application

This tutorial guides you through the creation of a complete desktop database application that enables its user to browse and edit customer records and purchase history. The resulting application includes the following main features:

* A main view that enables users to browse customer records and customer purchases.
* A search field for the customer records.
* Separate dialog boxes for entering new records or modifying existing records.
* Code to interact with multiple related database tables.