'See these series as a portfolio exhibition', 2 => 'previous', 3 => 'next', 4 => 'sold out edition', 'COMMENT_THE_IMAGE' => 'Comment this photograph' ); break; case 'fr': $RSGal=array( 1 => 'Voir cette série en mode portfolio', 2 => 'précédente', 3 => 'suivante', 4 => 'édition épuisée', 'COMMENT_THE_IMAGE' => 'Commenter cette photographie' ); break; } define('PAGE_WIDTH_MAX',800); // ----------------------------------------------------------------------- // -- DISPLAY THE SELECTED PICTURE, AND NAVIGATION ----------------------- // ----------------------------------------------------------------------- // http://coding.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/ if (empty($_GET['title'])) { header('location: /artwork/gallery/'); exit(0); } $Row=get_photograph(array( 'ConnId' => $db, 'ImageId' => $_GET['id'], 'CultureId' => $_SESSION['UserCulture'], 'CollectionId' => $_SESSION['COLLECTION_ID'], )); if (empty($Row)) { require_once('/home/www/denisolivier/error/404/index.php'); exit(); } // ---- start building values $ObjectType=OBJ_PHOTOGRAPHY_SHOT; $ObjectId=$Row['Id']; $Meta['Property']['Type']='product'; if ($Row['PrintsLimits']['Price']['Min']['Value']>0) { $Meta['Property']['Availability']='instock'; $Meta['Property']['Price']['Amount']=round($Row['PrintsLimits']['Price']['Min']['Value']*$Units[$_SESSION['UserCulture']]['Currency']['Change']); $Meta['Property']['Price']['Currency']=$CurrencyName[$Units[$_SESSION['UserCulture']]['Currency']['ShortId']][0]; } $MetaCanonical=$MetaLink=url_text_format($Row['Id'],$Row['UrlText']); if ('https://www.'.$SiteDomain.$_SERVER['REQUEST_URI']!=$MetaLink) { header('HTTP/1.1 301 Moved Permanently',TRUE,301); header('location: '.$MetaLink); exit(); } $Navigation=artwork_bounding($Row['Id'],$db); $PrintCount=$Row['PrintCount']; $MetaTitle=$Row['FullTitle']; if ($Row['Prints']) { $MetaDescription=$Row['FullDescriptionWithoutSale']; } else { $MetaDescription=$MetaTitle; } $MetaKeywords=$Row['Keywords_'.$_SESSION['UserLang']]; $ImageFileData=array( 'Id' => $Row['Id'], 'Type' => 'large', 'Slug' => $Row['UrlText'], ); $MetaImage[0]=$Row['ImageFull']; // ---- Build Schema offers foreach ($Row['Prints'] as $Key => $Prints) { $PrintOffers.='{ "@type": "Offer", "price":"'.round($Prints['Price']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).'", "availability":"http://schema.org/InStock", "itemCondition":"https://schema.org/NewCondition", "acceptedPaymentMethod":["http://purl.org/goodrelations/v1#PayPal","http://purl.org/goodrelations/v1#PaymentMethodCreditCard"], "sameas":"http://www.productontology.org/id/Photograph", "name":"'.$Row['FullTitle'].'", "description":"'.htmlspecialchars($Prints['Label'],ENT_COMPAT,'UTF-8').'", "url":"'.$Prints['OrderUrl'].'", "seller":{"type":"Organization","name":"'.$RsDic['PHOTOGRAPH_BY'].'"}, "mpn":"'.$Row['Id'].'-'.$Key.'", "sku":"'.$Row['Id'].'-'.$Key.'" },'; } $Schema[]='{"@context":"http://schema.org", "@type":"Photograph", "about":"'.$RsDic['ARTWORK_TONE_VALUES'][$Row['Color']].', '.$Row['MediumName'].', '.$Row['MediumDescription'].'.", "name":"'.$Row['FullTitle'].'", "genre":"http://vocab.getty.edu/aat/300021143", "accountablePerson":"Denis Olivier", "locationCreated":"France", "creator":"Denis Olivier", "keywords":"'.$MetaKeywords.'", "description":"'.htmlspecialchars($MetaDescription,ENT_COMPAT,'UTF-8').'", "image":"'.$MetaImage[0].'", "url":"'.$MetaLink.'", "offers": { "@type":"AggregateOffer", "priceCurrency":"'.$CurrencyName[$Units[$_SESSION['UserCulture']]['Currency']['ShortId']][0].'", "highPrice":'.round($Row['PrintsLimits']['Price']['Max']['Value']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).', "lowPrice":'.round($Row['PrintsLimits']['Price']['Min']['Value']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).', "offerCount":"'.count($Row['Prints']).'", "priceValidUntil":"'.sprintf('%4d-%02d-%02d',(date('Y')+10),random_int(1,12),random_int(1,28)).'", "offers": [ '.trim($PrintOffers,',').' ] } }'; $Schema[]='{"@context":"http://schema.org/", "@type":"Product", "name":"'.$Row['FullTitle'].'", "image":"'.$MetaImage[0].'", "description":"'.htmlspecialchars($MetaDescription,ENT_COMPAT,'UTF-8').'", "productID":"'.$Row['Id'].'", "mpn":"'.$Row['Id'].'", "sku":"'.$Row['Id'].'", "brand": { "@type": "Brand", "name": "'.$RsDic['PHOTOGRAPH_BY'].'" },'. ($Row['VoteCount']>20 ? ' "aggregateRating": { "@type": "AggregateRating", "ratingValue": "'.$Row['VoteRate'].'", "reviewCount": "'.$Row['VoteCount'].'" },':''). '"offers": { "@type":"AggregateOffer", "priceCurrency":"'.$CurrencyName[$Units[$_SESSION['UserCulture']]['Currency']['ShortId']][0].'", "highPrice":'.round($Row['PrintsLimits']['Price']['Max']['Value']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).', "lowPrice":'.round($Row['PrintsLimits']['Price']['Min']['Value']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).', "offerCount":"'.count($Row['Prints']).'", "priceValidUntil":"'.sprintf('%4d-%02d-%02d',(date('Y')+10),random_int(1,12),random_int(1,28)).'", "offers": [ '.trim($PrintOffers,',').' ] } }'; // ---- starting display // debug(var_export($_SESSION,1)); exit; // mail(SITE_EMAIL,'Session '.session_id(),var_export($_SESSION,1)); require(DIR_PATH.'include/i_page_haut.php'); echo '
'; echo '
'; // left column // ---- Enlarge library require_once(DIR_PATH.'include/i_enlarge.php'); // ---- display image // $ImageLink=($Navigation['NEXT'] ? $Navigation['NEXT']:($Navigation['PREVIOUS'] ? $Navigation['PREVIOUS']:'')); echo '
'; // masonry #1 echo '
'; // start frames + image block // ---- original framing situation require_once(DIR_PATH.'/artwork/frame/index.php'); $FramesList=array(); // create the frames' array while (count($FramesList) < 16) { // do while different 16 frames are filled $FrameId=mt_rand(1,count($FramesCollection)); // find a random entry in existing frame array $FramesList[$FrameId] = $FrameId; // assign random entry to both key and value } shuffle($FramesList); // shuffle the selected random array $FrameValues=array( 'PhotoPath' => DIR_PATH.sprintf(ARTWORK_FULL_FILE_PATH,$Row['Id']), 'Frames' => $FramesList, 'CustomId' => $Row['Id'], 'Title' => $MetaTitle, 'max-width' => '', 'div-class' => '', 'Slug' => $Row['UrlText'], 'GetImageUrl' => 1, /* 'PageUrl' => __FILE__, 'PageLine' => __LINE__, 'GeneratorGuid' => uniqid(), */ ); $FrameUrls=build_framing_context($FrameValues); $DisplayCount=1; echo '
'; // start framed block foreach ($FrameUrls AS $FrameId => $Url) { $UrlSmall=str_replace('.jpg','-small.jpg',$Url); echo '
'; $SourceId='Frame'.$Row['Id'].$FrameId; set_enlarge(array( 'Img' => '
'.ucfirst($RsDic['PHOTOGRAPHY_ART_COLLECTION_WORD']).' Denis Olivier, '.$MetaTitle.', '.$FramesCollection[$FrameId]['Alt'][$_SESSION['UserCulture']].'
', 'SourceId' => $SourceId, 'Src' => 'src-large', )); echo'
'; if ($DisplayCount++==7) break; } echo '
'; // end framed block echo '
'; // start image block $ImageFileData=array( 'Id' => $Row['Id'], 'Type' => 'large', 'Slug' => $Row['UrlText'], 'Alt' => $MetaTitle, 'Orientation' => '', 'Class' => 'ArtworkImage AlignHC', 'Return' => 1, 'Width' => $Row['Width'], 'Height' => $Row['Height'], 'Lazy' => 0, 'Style' => 'width:100%;height:auto;max-height:100%;max-width:100%;', 'Priority' => 1, ); $ZoomId=set_enlarge(array( 'Img' => display_image_set($ImageFileData), 'SourceId' => 'Artwork'.$Row['Id'], )); // ---- Navigation bar $Toolbar=array( // ---- Previous image (isset($Navigation['PREVIOUS']) ? array( 'Icon' => 'chevron-left', 'Label' => $RsDic['ARTWORK_TOOL_PREVIOUS_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_PREVIOUS_INFO'], 'Action' => 'location.href=\''.$Navigation['PREVIOUS'].'\';', 'Swap' => 0, ):''), // ---- Enlarge image array( 'Icon' => 'search-plus', 'Label' => $RsDic['ARTWORK_TOOL_ENLARGE_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_ENLARGE_INFO'], 'Action' => 'go_fullscreen(\''.'Artwork'.$Row['Id'].'\',\''.$ZoomId.'\',\'src\');', 'Swap' => 0, ), /* // ---- Buy image array( 'Icon' => 'cart', 'Label' => $RsDic['ARTWORK_TOOL_ORDER_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_ORDER_INFO'], 'Action' => 'scroll_to_id(\'#SectionOrder\',-40,300);', 'Swap' => 0, ), // ---- Framed array( 'Icon' => 'framed', 'Label' => $RsDic['ARTWORK_TOOL_FRAMED_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_FRAMED_INFO'], 'Action' => 'scroll_to_id(\'#SectionFramed\',-40,300);', 'Swap' => 0, ), */ // ---- Gallery ($_SESSION['COLLECTION_TYPE']==OBJ_SERIES && $_SESSION['COLLECTION_ID']>0 ? array( 'Icon' => 'series', 'Label' => $RsDic['ARTWORK_TOOL_SERIES_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_SERIES_INFO'], 'Action' => 'location.href=\'/series/themes/'.$Row['CollectionSlug'].'/'.$_SESSION['UserLang'].'/'.$Row['CollectionId'].'\';', 'Swap' => 0, ):''), // ---- Next image (isset($Navigation['NEXT']) ? array( 'Icon' => 'chevron-right', 'Label' => $RsDic['ARTWORK_TOOL_NEXT_LABEL'], 'Info' => $RsDic['ARTWORK_TOOL_NEXT_INFO'], 'Action' => 'location.href=\''.$Navigation['NEXT'].'\';', 'Swap' => 1, ):''), ); echo '
'; foreach ($Toolbar as $Tool) { if ($Tool) { echo '
'; $CodeA=''.$Tool['Info'].''; $CodeB=''.$Tool['Label'].''; echo ($Tool['Swap'] ? $CodeB.$CodeA:$CodeA.$CodeB); echo '
'; } } echo '
'; // ---- Display title and other information echo '
'; echo CRLF.'

'.$Row['Title'].''.CRLF.'
'.($Row['Location'] ? $Row['Location']:'').ucwords($Row['CountryName']!='' ? ', '.$Row['CountryName'].' - ':'').$Row['Date'].'
'.CRLF.$RsDic['ARTWORK_PRINT_ORDER_IMAGE_ID'].$Row['Id'].'

'; echo '
'; // ---- story if (!empty($Row['Comment_'.$_SESSION['UserLang']])) echo '
« '.$Row['Comment_'.$_SESSION['UserLang']].' »
'; echo '
'; // end image block echo '
'; // end frames + image block echo '
'; // end masonry #1 // ---- admin if ($_SESSION['Admin'] && $Row['Id']>0) { echo '
'; create_button('button','Edit image',' onclick="location.href=\''.HTTP_WWW.SITE_DOMAIN.'/admin/edit/?id='.$Row['Id'].'\'"'); require_once(PATH_COMMON.'/library/hashtags/i_functions.php'); foreach ($Networks as $SocialName => $Social) { $SocialData=array( 'ImageId' => $Row['Id'], 'SocialName' => $SocialName, 'SocialHashTags' => $Row[ucfirst($SocialName).'Hashtags'], 'MediumHashtags' => $Row['MediumHashtags'], 'FacultativeHashtags' => array( 'List' => explode(' ',GENERIC_HASHTAGS_LIST), 'SelectCount' => 5, ), 'Color' => $Row['Color'], 'Keywords' => $Row['Keywords_'.$_SESSION['UserLang']], // 'Logs' => $SQL.CRLF.CRLF.'$Row='.var_export($Row,1), // 'LogsSend' => 0, 'HashtagsLenMin' => 0, ); $ReturnSNH=social_networks_hashtags($SocialData); echo '
'.$SocialName.'
'; echo ''; } echo '
Keywords_'.$_SESSION['UserLang'].'
'; echo '
Sale description
'; echo '
API Array
'; echo '
'; // if (!empty($_POST['NewGal']) && intval($_POST['NewGal'])<0 && $Row['Id']>0) { // $SQL='UPDATE photography SET ShowHome=0,Galleries='.intval($_POST['NewGal']).' WHERE Id='.$Row['Id'].' LIMIT 1'; // //echo '
'.$SQL; // db_query(__FILE__,__LINE__,$SQL,$db); // } // if ($_POST['NewGal']=='delete' && md5($Row['Id'])==$_POST['key']) { // $SQL='SELECT Pic FROM photography WHERE id='.$Row['Id'].' LIMIT 1'; // $Result=db_query(__FILE__,__LINE__,$SQL,$db); // $RowDel=mysqli_fetch_assoc($Result); // unlink(sprintf("img/show/%s.jpg",$RowDel['Pic'])); // unlink(sprintf("img/show/%s_s.jpg",$RowDel['Pic'])); // $SQL='DELETE FROM photography WHERE Id='.intval($Row['Id']); // db_query(__FILE__,__LINE__,$SQL,$db); // $SQL='DELETE FROM stock_photo WHERE PhotoID='.intval($Row['Id']); // db_query(__FILE__,__LINE__,$SQL,$db); // } // echo '
'; // $SQL="SELECT photography_serie.Id,Description_en,Serie FROM photography_serie LEFT JOIN photography ON photography.Id=".intval($Row['Id'])." WHERE photography_serie.Id<0 ORDER BY Description_en"; // // echo '
'.$SQL; // $Result=db_query(__FILE__,__LINE__,$SQL,$db); // echo "

'; // echo ''; // echo ''; // echo '

'; } // ---- comment zone echo '
'; // masonry comment echo '
'; // echo '
'.$RSGal['COMMENT_THE_IMAGE'].'
'; echo '

'.$RSGal['COMMENT_THE_IMAGE'].'

'; require_once(PATH_COMMON.'class/comment/interface.php'); try { $Data=array( 'DB_CONN' => $db, 'OBJECT_TYPE' => OBJ_PHOTOGRAPHY_SHOT, 'OBJECT_ID' => $Row['Id'], 'CULTURE_ID' => $_SESSION['UserCulture'], 'KEY' => 'ecc4376b563c3ea45817de643ddae034', 'ValidationEmail' => SITE_EMAIL, ); $Comment=new Comment($Data); echo '
'; $Comment->messages_show(); echo '
'; echo '
'; $Comment->interface_draw(); echo '
'; } catch (Exception $e) { echo 'Can\'t create comment interface'; } echo '
'; echo '
'; // masonry comment // ---- sharing zone ------------- echo '
'; // masonry share require_once(DIR_PATH.'/social/share/i_functions.php'); $DataShare=array( 'Type' => 0, 'Guid' => $Row['Id'], 'Url' => $MetaLink, 'Title' => $MetaTitle, 'Description' => $Description, 'Image' => $MetaImage[0], ); echo '
'; echo '

'.$RsDic['SHARE_HEADLINE_INFO'].'

'; social_networks_share($DataShare); echo '
'; echo '
'; // masonry share // --------------------------------------------------------------------------------------------------------- // ---- COLUMNS --------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------- echo '
'; // end left column echo '
'; // start right column // ---- false marker for moving ordering a the good place echo ''; // ---- e-commerce if ($Row['Prints']) { echo '
'; // masonry #2 echo '
'; echo '

'.$RsDic['ARTWORK_PRINT_ORDER_LABEL'].'

'; echo $RsDic['PRINT_SHIPPING_WORLDWIDE_INFO']; // ---- prices // echo '
'; // foreach ($Row['Prints'] as $PrintId => $Prints) { // echo '
'; // echo ''; // echo '
'; // echo '
'; // $Btn=array( // 'Type' => 'button', // 'Icon' => '/img/icons/cart_w.svg', // 'Class' => 'Button', // 'Label' => $RsDic['MORE_INFO_LABEL'], // 'Script' => 'onclick="location.href=\''.$Prints['OrderUrl'].'\'"', // ); // new_button($Btn); // echo '
'; // echo '
'; // echo '

'.$Prints['Label'].'

'; // echo '
'; // } // echo '
'; // echo ''; // // echo '


'; echo '

'; echo ''; echo '
'; echo ''.$RsDic['ARTWORK_ORDERING_PRINT_SELECTOR_INFO'].''; echo '
    '; foreach ($Row['Prints'] as $PrintId => $Prints) { $BuyLabel=round($Prints['Price']*$Units[$_SESSION['UserCulture']]['Currency']['Change']).' '.$CurrencyName[$Units[$_SESSION['UserCulture']]['Currency']['ShortId']][0].' - '.$Prints['Title']; echo '
  • '.$BuyLabel.''.$Prints['Size']['Cm']['Width'].'x'.$Prints['Size']['Cm']['Height'].' '.$Units[33]['Length']['NotationShort'].' ('.$Prints['Size']['In']['Width'].'x'.$Prints['Size']['In']['Height'].$Units[44]['Length']['NotationShort'].'), '.sprintf($Prints['Resume'],($Prints['Edition']>0 ? sprintf($RsDic['ARTWORK_PRINT_EDITION_LIMITED'],$Prints['Edition']).', ':$RsDic['ARTWORK_PRINT_EDITION_UNLIMITED'])).'
  • '; } echo '
'; echo '
'; $Btn=array( 'Type' => 'button', 'Icon' => '/img/icons/cart_w.svg', 'Class' => 'Button DisIB MaB20px', 'Label' => $RsDic['ARTWORK_ORDERING_PRINT_BUY_NOW'], 'Script' => 'onclick="go_ordering();"', 'Style' => 'max-width:400px;width:100%;', ); new_button($Btn); // echo ''; // ---- Original signed prints echo '

'.$RsDic['ARTWORK_PRINT_ORIGINAL_TITLE'].'

'; echo '
'.$RsDic['ARTWORK_PRINT_ORIGINAL_INFO'].'
'; // ---- decoration situation echo '

'.$RsDic['ARTWORK_PRINT_REPRODUCTION_TITLE'].'

'; echo '
'.$RsDic['ARTWORK_PRINT_REPRODUCTION_INFO'].'
'; // require_once(PATH_COMMON.'class/decoration/interface.php'); // try { // $Data=array( // 'InteriorId' => random_int(1,5), // 'ArtworkPath' => DIR_PATH.sprintf(ARTWORK_FULL_FILE_PATH,$Row['Id']), // 'SiteHomePath' => DIR_PATH, // 'CachePath' => '/img/decoration/cache/', // 'SiteUrl' => HTTP_WWW.SITE_DOMAIN, // 'Slug' => 'denis-olivier-'.$Row['UrlText'], // 'CustomId' => $Row['Id'], // 'ImageAlt' => $MetaTitle, // 'ImageWidth' => 640, // 'Information' => $RsDic['ARTWORK_DECORATION_NOTICE'], // 'PrintSizeCm' => 70, // 'FrameSectionSizeCm' => 2, // 'FrameWidthHeightRatio' => 1, // 1.25, // 'MattingSizeCm' => 6, // 'MattingSizeGutCm' => 3, // 'ForceRebuild' => ($_SESSION['Admin'] ? 1:0), // ); // // debug(var_export($Data,1)); // // $Interior=new Decoration_Scene($Data); // echo '
'; // $Interior->display_scene(); // echo '
'; // // } catch (Exception $e) { // echo 'Can\'t display decoration scene'; // } echo '
'; echo '
'; // end masonry #2 } // else { // echo ''; // } // ---- Rating /* remove 20231127, not sure it brings people to buy because of few ratings echo '
'; // masonry rating echo '

'.$RsDic['RATE_IMAGE_LABEL'].'

'; require_once(PATH_COMMON.'/library/rating/i_functions.php'); $Rating=array( 'ObjectType' => OBJ_PHOTOGRAPHY_SHOT, 'ObjectId' => $Row['Id'], 'DatabaseKey' => 'ecc4376b563c3ea45817de643ddae034', 'TextClickEngage' => $RsDic['RATE_IMAGE_INFORMATION'].'.', 'TextVoteSaved' => $RsDic['RATE_IMAGE_SAVED_INFO'], 'Email' => SITE_EMAIL, ); rate_element($Rating); */ echo '
'; // masonry rating // ---- keywords ands tags echo '
'; // masonry tags echo '

'.$RsDic['ARTWORK_KEYWORDS_LABEL'].'

'; $Tags=explode(',',$Row['Keywords_'.$_SESSION['UserLang']]); $Tags=array_merge($Tags,$RSCommon['KEYWORDS_TAGS']); $Tags=array_unique($Tags); shuffle($Tags); echo '
    '; foreach ($Tags as $Tag) { if ($Tag) echo '
  • '.$Tag.'
  • '; } echo '
'; echo '
'; // masonry tags // ---- Columns echo '
'; // right column // ---- end of display echo '
'; // ---- display other images in the same section echo '
'; // masonry #7 $SQL='SELECT DISTINCT Id,Title,Location,UrlText,Width,Height FROM photography '.($_SESSION['COLLECTION_ID']>0 ? 'INNER JOIN photography_themes_artworks PSA ON PSA.SeriesId='.$_SESSION['COLLECTION_ID'].' AND PSA.ArtworkId=photography.Id':'').' WHERE Removed=0 '.(empty($_SESSION['COLLECTION_ID']) ? 'AND photography.Id IN ( SELECT ArtworkId FROM photography_themes_artworks WHERE SeriesId IN ( SELECT SeriesId FROM photography_themes_artworks INNER JOIN photography_themes ON photography_themes.TypeId!=1 AND photography_themes.Id=SeriesId WHERE ArtworkId='.$Row['Id'].' ) )':'').' ORDER BY RAND('.TIME_STAMP_BY_HOUR.') DESC LIMIT 12'; // debug($SQL); $Result=db_query(__FILE__,__LINE__,$SQL,$db); // echo '
'.$RsDic['ARTWORK_GALLERIES_OTHER_PHOTOGRAPHY_LABEL'].'
'; echo '

'.$RsDic['ARTWORK_GALLERIES_OTHER_PHOTOGRAPHY_LABEL'].'

'; echo '
'; while ($Galleries=mysqli_fetch_assoc($Result)) { $Title=$Galleries['Title'].', '.$Galleries['Location']; echo ''; } echo '
'; echo '
'; // masonry #7 // ---- load scripting echo ''; // ---- update counter if (!$_SESSION['CountersUpdated']) { $SQL='UPDATE LOW_PRIORITY photography SET HitCount='.intval($Row['HitCount']+1).' WHERE Id=\''.$Row['Id'].'\' LIMIT 1'; db_query(__FILE__,__LINE__,$SQL,$db); $_SESSION['CountersUpdated']=1; } // ---- end of page require(DIR_PATH.'include/i_page_bas.php'); ?>