}
    $filename = '';
    if (isset($images[1])) {
        $filename = $images[1];
    }
    if (isset($images[2])) {
        $extra_images1 = $images[2];
    }
    if (isset($images[3])) {
        $extra_images2 = $images[3];
    }
    if ($type == 1) {
        $page_title = 'Template Picture';
        $browse_title = 'Browse Picture';
        $button_title = 'Upload Template Picture';
        $newDesignId = $class_pp->updateTemplatePicture2($design_id, $filename, $session_userinfo['username'], $extra_images1, $extra_images2);
    } else {
        $newDesignId = $class_pp->updateSamplingPicture($design_id, $filename, $session_userinfo['username']);
    }
    $status_uploaded = '<h3 class="red">Picture Upload Success</h3>' . $newDesignId;
    if (isset($images[1])) {
        $imgthumb = webImage($filename, '285', '275', "Uploaded Picture", 'img-border');
    }
    if (isset($images[2])) {
        $imgthumb2 = webImage($extra_images1, '285', '275', "Uploaded Picture", 'img-border');
    }
    if (isset($images[3])) {
        $imgthumb3 = webImage($extra_images2, '285', '275', "Uploaded Picture", 'img-border');
    }
}
//START TEMPLATE