Location: PHPKode > scripts > phpFlickrSynch > phpflickrsynch/backoffice/_ajax/ajax_resynchPhotoAlbum.php
<?php
	require_once('../../phpFlickrSynch.php');
	require_once('../../_classes/class_FlickrToPortfolio.php');
	
	$FLICKRIDS = isset($_REQUEST['flickrids']) ? $_REQUEST['flickrids'] : 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>';
		}		
	}	
?>

<h1>Resynch photo albums</h1>

<?php	
		if (isset($FLICKRIDS) && strlen($FLICKRIDS) > 0) {
			$tabFlickrids = explode(',', $FLICKRIDS);
			foreach ($tabFlickrids as $FLICKRID) {
				$response = $MAPPING->photoalbum_update($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>
</ol>
</div>   
<?php	
			}
?>
<ul>
	<li>
		<span id="tagupdate">Update tag statistic</span>
	</li>
</ul>
<?php			
		}	
?>	

</div>
Return current item: phpFlickrSynch