Location: PHPKode > scripts > phpFlickrSynch > phpflickrsynch/backoffice/_ajax/ajax_field_update.php
<?php
	require_once('../../phpFlickrSynch.php');

	$fieldId = $_REQUEST["id"];

	$tab = explode('-', $fieldId);
	$fieldName = $tab[0];
	$id = $tab[1];

	$old_content = isset($_REQUEST["old_content"]) ? trim(urldecode($_REQUEST["old_content"])) : '';
	$new_content = trim(strip_tags(urldecode($_REQUEST["new_content"])));
	
	switch ($fieldName) {
		case 'groupname':
			$DBP = new TableFlickrPortfolio();
			$DBP->updateGroup($id, $new_content);
			
			$DB = new TableFlickrGroup();
			echo $DB->getGroupName($new_content);		
			break;

		case 'editgroupname':
			$DBG = new TableFlickrGroup();		
			$DBG->updateGroup($id, $new_content);
			echo $new_content;
			break;			
	}

?>
Return current item: phpFlickrSynch