Location: PHPKode > scripts > phpFlickrSynch > phpflickrsynch/backoffice/_ajax/ajax_registerPhotoAlbum.php
<h1>Register photo album</h1>
<?php
	require_once('../../phpFlickrSynch.php');
	require_once('../../_classes/class_FlickrToPortfolio.php');
	
	$FLICKRID = isset($_REQUEST['flickrid']) ? $_REQUEST['flickrid'] : NULL;
	$MAPPING = new FlickrToPortfolio();
	
	function displayPhotosToProcess($response, $por_id) {
		$nb = 0;
		foreach ($response as $key => $val) {
			$nb++;
			echo '<span style="margin-right:30px" class="ajaxaction photoid" id="photo' . $val . '">' . $nb . '. Photo&nbsp;' . $val . '</span>';
		}		
	}
	
	if (isset($FLICKRID) && strlen($FLICKRID) > 0) {

		$response = $MAPPING->photoalbum_register($FLICKRID);
		$por_id = $MAPPING->getLastCreatedPhotoAlbumId();
?>
<div id="resynchalbum-<?php echo $por_id?>" class="albumajaxaction">
<ol>
<?php				
				echo $response->toString();
?>		
	<li>
    	The following photos will be updated: 
		<ul>
			<li>
<?php
				$response = $MAPPING->photoalbum_getPhotos($FLICKRID);
				displayPhotosToProcess($response, $por_id);
?>
			</li>
		</ul>
	</li>
	<li>
		<span id="geoupdate<?php echo $por_id;?>">Update geo data</span>
	</li>
	<li>
		<span id="tagupdate">Update tag statistic</span>
	</li>    
</ol>
</div> 		
<?php
	}
?>
Return current item: phpFlickrSynch