Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Prossima revisione | Revisione precedente | ||
test [2013/07/18 22:45] – creata Daniele Neroni | test [2021/05/14 21:31] (versione attuale) – modifica esterna 127.0.0.1 | ||
---|---|---|---|
Linea 6: | Linea 6: | ||
$objCpm1-> | $objCpm1-> | ||
</ | </ | ||
+ | |||
+ | |||
+ | {{stars> | ||
+ | {{stars> | ||
+ | {{stars> | ||
+ | |||
+ | <php> | ||
+ | |||
+ | |||
+ | |||
+ | | ||
+ | echo file_get_contents($base_url . "? | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ~~NOCACHE~~ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <script type=" | ||
+ | src="// | ||
+ | async> | ||
+ | </ | ||
+ | </ | ||
+ | | ||
+ | | ||
+ | < | ||
+ | <div id=" | ||
+ | <script type=" | ||
+ | src="// | ||
+ | async> | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <div id=" | ||
+ | <script type=" | ||
+ | src="// | ||
+ | async> | ||
+ | </ | ||
+ | </ | ||
+ | | ||
+ | | ||
+ | < | ||
+ | <div id=" | ||
+ | <style type=" | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | @media all and (max-device-width: | ||
+ | all and (max-width: 599px) | ||
+ | { | ||
+ | # | ||
+ | } | ||
+ | </ | ||
+ | <script type=" | ||
+ | src="// | ||
+ | async> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | | ||
+ | | ||
+ | ---- | ||
+ | |||
+ | |||
+ | <php> | ||
+ | $cat_id = 119; | ||
+ | $per_page = 2; | ||
+ | |||
+ | $webapi1 = " | ||
+ | |||
+ | $strXml1 = file_get_contents($webapi1); | ||
+ | $objXml1 = new SimpleXmlElement($strXml1); | ||
+ | |||
+ | $piwigo = array(); | ||
+ | $counter = 1; | ||
+ | foreach($objXml1-> | ||
+ | $thumbs_string = strval($value-> | ||
+ | $url_string = strval($value-> | ||
+ | $data_available = strval($value-> | ||
+ | $piwigo[$counter][' | ||
+ | $piwigo[$counter][' | ||
+ | $counter++; | ||
+ | } | ||
+ | foreach($piwigo as $value) { | ||
+ | echo ' | ||
+ | } | ||
+ | |||
+ | ?> | ||
+ | < | ||
+ | < | ||
+ | <?php | ||
+ | //we need to calculate the total number of pictures in the gallery | ||
+ | $cat_id = " | ||
+ | $per_page = " | ||
+ | $webapi2 = " | ||
+ | $strXml2 = file_get_contents($webapi2); | ||
+ | $objXml2 = new SimpleXmlElement($strXml2); | ||
+ | $count_images = 0; | ||
+ | foreach($objXml2-> | ||
+ | $count_images += $value-> | ||
+ | } | ||
+ | echo '< | ||
+ | |||
+ | //start parsing the web api output with the workaround logic | ||
+ | $per_page1 = $per_page * 2; //we need to retrive double number of specified pages because $count_images/ | ||
+ | $pages1 = intval($count_images/ | ||
+ | $webapi3 = " | ||
+ | echo '< | ||
+ | $strXml3 = file_get_contents($webapi3); | ||
+ | $objXml3 = new SimpleXmlElement($strXml3); | ||
+ | |||
+ | $piwigo2 = array(); | ||
+ | $counter2 = 1; | ||
+ | foreach($objXml3-> | ||
+ | $thumbs_string = strval($value-> | ||
+ | $url_string = strval($value-> | ||
+ | $piwigo2[$counter2][' | ||
+ | $piwigo2[$counter2][' | ||
+ | $counter2++; | ||
+ | } | ||
+ | $piwigo2 = array_reverse($piwigo2); | ||
+ | $piwigo2 = array_slice($piwigo2, | ||
+ | |||
+ | foreach($piwigo2 as $value) { | ||
+ | echo ' | ||
+ | } | ||
+ | </ | ||
+ |