get_var("SELECT id FROM ".$globalConfig['dbprefix']."pages WHERE public>0 ORDER BY sort ASC LIMIT 1 "); } else { $thispage=$page; } $pagesmenublock = PagesMenu(); //$userbarblock = UserBar(); $languagemenublock = LanguageMenu(); //page info echo "\n"; $results = $ezdb->get_results("SELECT * FROM ".$globalConfig['dbprefix']."pages WHERE id=$thispage AND public>0"); foreach ($results as $result){ $thispage = $result->$titlelang; $thisid = $result->id; $thistext = $result->$textlang; $thisintro = $result->$introlang; $table="pages"; $record=$thisid; $relatedinfo=GetRelated($table, $record); //only related to pages, maybe only download? $pagetext = ProcessAssets($thistext); $pagepicture = PagePicture($thisid ); $pagetext = $pagepicture." ".$pagetext; echo "
"; echo "
$pagesmenublock
"; echo "
$userbarblock
$languagemenublock
"; //echo ""; if ($thisintro<>''){ echo "
$thisintro
"; } if ($pagetext<>''){ echo "
$pagetext
"; } if (($relatedinfo<>NULL) and ($relatedinfo<>"") and ($relatedinfo<>false)){ echo "
$relatedinfo
"; } } echo "
"; echo "\n"; $page=$thispage; function PagePicture($pageid){ global $ezdb, $lang, $dblang, $dbprefix, $cat, $page, $mode, $theme, $folder, $file, $pn, $pp, $dbname, $ezdb, $globalConfig; $textlang="text_".$dblang; //FIND THE PAGE WITH THE FILES ASSET $pageresult=mysql_query("SELECT * FROM ".$globalConfig['dbprefix']."pages WHERE $textlang LIKE '%__FOLDERS__%' AND public>0 ORDER BY sort ASC LIMIT 1"); while($pageresultrow=mysql_fetch_array($pageresult)){ $files_page=$pageresultrow[id]; } //THE IMAGE LINKED TO THE POST $results3 = $ezdb->get_results("SELECT * FROM ".$globalConfig['dbprefix']."files RIGHT JOIN ".$globalConfig['dbprefix']."binder ON (".$globalConfig['dbprefix']."files.id=".$globalConfig['dbprefix']."binder.record2) WHERE ".$globalConfig['dbprefix']."binder.table1='pages' AND ".$globalConfig['dbprefix']."binder.record1='".$pageid."' AND ".$globalConfig['dbprefix']."binder.table2='files' AND ".$globalConfig['dbprefix']."files.type='jpg' "); $thisform = ""; if (count($results3)>0){ foreach ($results3 as $result3){ $picid= $result3->record2; $picfile= $result3->file; $folderid= $result3->folderid; $size= $result3->size; $folder = GetFolder($folderid); $pictureurl=$globalConfig['foliodomain']."/files/".$folder."/thumbs150/".$picfile; $picture = ""; //$thisform.="
$picture
"; $thisform.="$picture"; } }else{ $thisform .=""; } return $thisform; } ?>