0){ $sm=new School_membersDBRecord($dbconn); $sm->getById($_SESSION["school_member"]); } $qw = $_REQUEST["query"]; if ($sel==$SEARCHSCHOOLNODEID) $qw= $_REQUEST["query_s"]; if(isset($_REQUEST["seopage"])) { $seodata=getSEOURL($_REQUEST["seopage"]); if($seodata["type"]=="c" && $seodata["seourl"]!="") { $nr=new CategoryDBRecord($dbconn); $nr->getbySEOURL($seodata["seourl"],0); $sel=$nr->cat_id; } else if($seodata["type"]=="a" && $seodata["seourl"]!="") { $ar=new ArticleDBRecord($dbconn); $ar->getbySEOURL($seodata["seourl"],0); $artid=$ar->art_id; $_SESSION["ses_locale"]=$ar->locale; if (intval($_SESSION["ses_locale"])==0) $_SESSION["ses_locale"]=$DEFLOC; } } // no parameters, it's home if($sel<=0 && $artid<=0) $sel=$HOMEPAGENODEID; else if ($sel==$JELLYFISHNODEID) $sel=$JELLYFISHHOMENODEID; // caching techniques if($_CACHE_TIME>0 && intval($_GET["artid"])>0 && !$_GET["preview"] && $query=="" && !$_GET["pf"] && $query_s=="") { // start caching $docache=true; $_f=decideCacheFilename(); if($_f) { $_ts=@filemtime($_CACHE_DIR.$_f); if($_ts) { if($_ts+$_CACHE_TIME>=time()) { // show cached page print file_get_contents($_CACHE_DIR.$_f); //print "cached on ".date("d/m/Y H:i:s",$_ts); exit(); } } } } else $docache=false; // create sitemap if($_GET['preview']=='true') //condition to provide preview capability from console $cm=new CategoryMap($dbconn,"","",1,$_SESSION["ses_locale"]); else $cm=new CategoryMap($dbconn,"I","<>",1,$_SESSION["ses_locale"]); if ($_SESSION["ses_locale_j"]>1){ if($_GET['preview']=='true') //condition to provide preview capability from console $cm_j=new CategoryMap($dbconn,"","",1,$_SESSION["ses_locale_j"]); else $cm_j=new CategoryMap($dbconn,"I","<>",1,$_SESSION["ses_locale_j"]); } else $cm_j=$cm; if($sel!=$SEARCHNODEID) $_SESSION["psearch_sel"]=$sel; if ($_SESSION["psearch_sel"]=="") $_SESSION["psearch_sel"]=$MAINMENUNODEID; // get Node info and see if Public or Private $nr=new CategoryDBRecord($dbconn); $nr->get($sel); if($_SESSION["mem_id"]>0) { $mr=new MemberDBRecord($dbconn); $mr->member_id=$_SESSION["mem_id"]; $mr->get(); } else{ if(isset($_COOKIE["ML_LOGGEDIN"]) && $_COOKIE["ML_LOGGEDIN"]>0) {//echo $_COOKIE["ML_LOGGEDIN"]; $mid=$_COOKIE["ML_LOGGEDIN"]; if($mid>0) { //include_once("../classes/member.php"); $mr=new MemberDBRecord($dbconn); $mr->member_id=@intval($mid); $mr->get(); if ($mr->username!=""){ $_SESSION["mem_id"]=$mr->member_id; $_SESSION["mem_username"]=$mr->username; $_SESSION["mem_email"]=$mr->email; $_SESSION["mem_fname"]=$mr->fname; $_SESSION["mem_lname"]=$mr->lname; $ms_id=$mr->login(); $_SESSION["mem_sesid"]=$ms_id; }else{ $_SESSION["mem_id"]=0; $_SESSION["mem_id"]=""; $_SESSION["mem_username"]=""; $_SESSION["mem_email"]=""; $_SESSION["mem_fname"]=""; $_SESSION["mem_lname"]=""; $_SESSION["mem_sesid"]=""; setcookie("ML_LOGGEDIN",""); } } } } // get path if(!$path) $path=$cm->getPath($sel); $curr_level=count($path); $sel_temp=$sel; if($nr->status=="P" && ($_SESSION["school_member"]<=0 ) && $path[0]->cat_id==$SCHOOLNODEID){ $sel==$sel_temp; } else if($nr->status=="P" && ($_SESSION["mem_id"]<=0 || ($mr->status!='A' && $mr->status!='R'))) { $_SESSION['ses_catid']=$PROJECTDOCSNODEID; $sel=$HOMEPAGENODEID; $path=$cm->getPath($sel); $curr_level=count($path); //Header( "HTTP/1.1 301 Moved Permanently" ); //Header( "Location: ".$BASE_URL."" ); // } else $_SESSION['ses_catid']=0; // get Articles $al=new ArticleList(); if($artid>0) { $ar=new ArticleDBRecord($dbconn); $ar->art_id=$artid; $ar->by_locale = $_SESSION['ses_locale']; $ar->get(); if($sel<=0) $sel=$ar->getCategory(); $ar->cat_id=$sel; $ar->parent_id=$cm->getParent($sel); $al->list[0]=$ar; if ($start==0) $ar->incrementViews(); // ?na mpei se tag pou dixnei to fulltxt // get path if(!$path) $path=$cm->getPath($sel); $curr_level=count($path); } else { $al->by_status="3"; // only Published articles $al->status_comp="="; $al->full_info=true; $al->only_active_today=true; // get non-expired articles if ($path[0]->cat_id==$JELLYFISHNODEID || $path[0]->cat_id==$SCHOOLNODEID) $al->by_locale=$_SESSION["ses_locale_j"]; else $al->by_locale=$_SESSION["ses_locale"]; if($sel!=$SEARCHNODEID && $sel!=$SEARCHSCHOOLNODEID) { if ($sel==$CONSONTRIUMNODEID){ $al->sort_order="a.art_order"; $al->sorting="ASC"; }else if ($path[0]->cat_id==$TOOLBOXNODEID){ $al->sort_order="a.art_order"; $al->sorting="ASC"; }else{ $al->sort_order="a.createdate"; $al->sorting="DESC"; } $al->getArticlesOfNode($dbconn,$sel,1,1,0,999); } else { $al->sort_order="title"; $al->sorting="ASC"; $al->active_cat=true; $path_search=$cm->getPath($_SESSION["psearch_sel"]); //echo $path_search[0]->cat_id; //echo $path[0]->cat_id; if ($path_search[0]->cat_id==$MAINMENUNODEID){ $children=$cm->util_FindAllChildren($_SESSION["psearch_sel"]); } else if ($sel==$SEARCHSCHOOLNODEID){ $children=$cm->util_FindAllChildren($MAINMENUSCHOOLNODEID); } else{ $children=$cm->util_FindAllChildren($MAINMENUNODEID); } $catstr=implode(",",$children); if($catstr!=""){ if ($sel==$SCIENTISTNODEID || $sel==$MAINMENUNODEID) $catstr.=",".$CONSONTRIUMNODEID; $al->extra_sql=" AND (c.cat_id IN (".$catstr.")"; if ($sel!=$SEARCHSCHOOLNODEID)$al->extra_sql.=" OR c.cat_id=".$_SESSION["psearch_sel"]; else $al->extra_sql.=" OR c.cat_id=".$NEWSSCHOOLNODEID; $al->extra_sql.=")"; } else{ $mycat=$_SESSION["psearch_sel"]; if ($_SESSION["psearch_sel"]==$CONSORTIUMFAKE) $mycat=$CONSONTRIUMNODEID; $al->by_cat=$mycat; } $al->searchfull($dbconn,$qw,$tag,0); } } $art_count=count($al->list); // get Node info and see if Public or Private $nr=new CategoryDBRecord($dbconn); $nr->get($sel); //echo $_SESSION['ses_catid']; $nrloc=new CatlocDBRecord($dbconn); $nrloc->cat_id=$sel; $nrloc->locale=$_SESSION["ses_locale"]; $nrloc->get(); $locl=new LocaleList(); $locl->populate($dbconn); $loc_iso=$locl->getIso($_SESSION["ses_locale"]); $loc_iso_j=$locl->getIso($_SESSION["ses_locale_j"]); // Locale for Jellyfish or Perseus@school include_once("../common/siteconfig_words.php"); for ($i=1; $ilist); $i++){ if ($loc_iso_j==$locl->list[$i]->iso) include_once("../common/siteconfig_words_".$locl->list[$i]->iso.".php"); } // get related material if($art_count==1) { $ral=new ArticleList(); $ral->by_status="3"; // only Published articles $ral->status_comp="="; $ral->full_info=true; $ral->only_active_today=true; // get non-expired articles $ral->sort_order="b.rel_order"; // $ral->getRelatedArticles($dbconn,$al->list[0]->art_id,1,1,"",STtime()); $ral->getRelatedArticles($dbconn,$al->list[0]->art_id,1,1); $total_relart=count($ral->list); $arfl=new AttachmentList(); $arfl->by_status="A"; $arfl->by_locale=$_SESSION["ses_locale"]; $arfl->getRelatedAtt($dbconn,$al->list[0]->art_id,$ATTYPE_FILES,1,1); $total_relfil=count($arfl->list); $arml=new AttachmentList(); $arml->by_status="A"; $arml->by_locale=$_SESSION["ses_locale"]; $arml->getRelatedAtt($dbconn,$al->list[0]->inherit_rel?$al->list[0]->trans_id:$al->list[0]->art_id,$ATTYPE_MEDIA,1,1); $total_relmed=count($arml->list); $rll=new LinksList(); $rll->by_locale=$_SESSION["ses_locale"]; $rll->ofArticle($dbconn,$al->list[0]->art_id); $total_rellink=count($rll->list); ////////////////// $xl=new ExtrasList(); if($al->list[0]->xcat_id>0) { $xl->by_xcat=$al->list[0]->xcat_id; if($al->list[0]->locale>0) $xl->by_locale=$al->list[0]->locale; $xl->populate($dbconn); } $xcount=count($xl->list); $ar=new ArticleDBRecord($dbconn); $ar->art_id=$al->list[0]->art_id; $ar->by_locale = $_SESSION['ses_locale']; $ar->get(); //if ($sel==$WPNODEID){ $wpcat=$WPNODEID; if ($path[1]->cat_id==$SCIENTISTNODEID) $wpcat=$WPSCIENTISTNODEID; else if ($path[1]->cat_id==$POLICYNODEID) $wpcat=$WPPOLICYNODEID; else if ($path[1]->cat_id==$MEDIAADVNODEID) $wpcat=$WPMEDIAADVNODEID; //else if ($path[1]->cat_id==$GENERALPUBLICNODEID) $wpcat=$WPGENERALPUBLICNODEID; $wp=$cm->getSubNodes($wpcat,1); for ($i=0; $ifulltxt,"[%".$wp[$i]->name."%]")) { $art_spec=new ArticleList(); $art_spec->by_status="3"; // only Published articles $art_spec->status_comp="="; $art_spec->full_info=true; $art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="a.art_order"; $art_spec->sorting="ASC"; $art_spec->getArticlesOfNode($dbconn,$wp[$i]->cat_id,1,1,0,1); //if ($wp[$i]->name=="WP1") echo count($art_spec->list); //echo $art_spec->list[0]->title; $wptemp="name."link\" href=\"#".$wp[$i]->name."link\">".$wp[$i]->name.""; $wpfancy="
name."link\" style=\"width:692px;height:auto;overflow:auto;padding:25px;\">".$art_spec->list[0]->title."

".$art_spec->list[0]->fulltxt."  
"; $ar->fulltxt=str_replace("[%".$wp[$i]->name."%]",$wptemp,$ar->fulltxt); $ar->fulltxt.=$wpfancy; } } // [%AB$i%] $wp=$cm->getSubNodes($sel,1); for ($i=0; $ifulltxt,"[%AB".$nexti."%]")) { $art_spec=new ArticleList(); $art_spec->by_status="3"; // only Published articles $art_spec->status_comp="="; $art_spec->full_info=true; $art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="a.art_order"; $art_spec->sorting="ASC"; $art_spec->getArticlesOfNode($dbconn,$wp[$i]->cat_id,1,1,0,1); //if ($wp[$i]->name=="WP1") echo count($art_spec->list); //echo $art_spec->list[0]->title; $wptemp="".$wp[$i]->name.""; $wpfancy="
".$art_spec->list[0]->title."

".$art_spec->list[0]->fulltxt."  
"; $ar->fulltxt=str_replace("[%AB".$nexti."%]",$wptemp,$ar->fulltxt); $ar->fulltxt.=$wpfancy; } } if (strstr($ar->fulltxt,"[%WP_IMAGE%]")){ $art_spec=new ArticleList(); //$art_spec->by_status="3"; // only Published articles //$art_spec->status_comp="="; $art_spec->full_info=true; //$art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="b.rel_order"; //$art_spec->sorting="ASC"; $art_spec->getRelatedArticles($dbconn,$ar->art_id,1,1); //echo $art_spec->list[0]->title; //$wptemp="name."\" href=\"#".$wp[$i]->name."\">".$wp[$i]->name."
name."\" style=\"width:692px;height:auto;overflow:auto;padding:25px;\">

".$art_spec->list[0]->title."

".$art_spec->list[0]->fulltxt."  

"; $wp_img="

".$art_spec->list[9]->title."

".$art_spec->list[9]->fulltxt."  

"; if (count($art_spec->list)>10) $wp_img.="

".$art_spec->list[10]->title."

".$art_spec->list[10]->fulltxt."  

"; else $wp_img.="
"; $wp_img.="

".$art_spec->list[0]->title."

".$art_spec->list[0]->fulltxt."  

".$art_spec->list[1]->title."

".$art_spec->list[1]->fulltxt."  

"; if (count($art_spec->list)>11)$wp_img.="

".$art_spec->list[11]->title."

".$art_spec->list[11]->fulltxt."  

"; else $wp_img.=""; $wp_img.="

".$art_spec->list[4]->title."

".$art_spec->list[4]->fulltxt."  

".$art_spec->list[5]->title."

".$art_spec->list[5]->fulltxt."  

"; if (count($art_spec->list)>12)$wp_img.="

".$art_spec->list[12]->title."

".$art_spec->list[12]->fulltxt."  

"; else $wp_img.=""; $wp_img.="

".$art_spec->list[2]->title."

".$art_spec->list[2]->fulltxt."  

".$art_spec->list[3]->title."

".$art_spec->list[3]->fulltxt."  

".$art_spec->list[6]->title."

".$art_spec->list[6]->fulltxt."  

".$art_spec->list[7]->title."

".$art_spec->list[7]->fulltxt."  

".$art_spec->list[8]->title."

".$art_spec->list[8]->fulltxt."  

"; if (count($art_spec->list)>13) $wp_img.="

".$art_spec->list[13]->title."

".$art_spec->list[13]->fulltxt."  

"; else $wp_img.=""; $wp_img.=""; $ar->fulltxt=str_replace("[%WP_IMAGE%]",$wp_img,$ar->fulltxt); } $extras_array=$ar->getExtras(); /////////////////// } else{ $arml=new AttachmentList(); $arml->by_status="A"; $arml->by_locale=$_SESSION["ses_locale"]; $arml->getRelatedAtt($dbconn,$al->list[0]->inherit_rel?$al->list[0]->trans_id:$al->list[0]->art_id,$ATTYPE_MEDIA,1,1); $total_relmed=count($arml->list); } if ($path[0]->cat_id==$JELLYFISHNODEID){ $jelly=new ArticleList(); $jelly->by_status="3"; // only Published articles $jelly->status_comp="="; $jelly->full_info=true; $jelly->only_active_today=true; // get non-expired articles $jelly->by_locale=$_SESSION["ses_locale_j"]; $jelly->sort_order="a.title"; $jelly->sorting="ASC"; $jelly->getArticlesOfNode($dbconn,$ALLJELLYFISHNODEID,1,1,0,999); $defco=new ArticleList(); $defco->by_status="3"; // only Published articles $defco->status_comp="="; $defco->full_info=true; $defco->only_active_today=true; // get non-expired articles $defco->by_locale=$DEFLOC; $defco->sort_order="a.title"; $defco->sorting="ASC"; $defco->getArticlesOfNode($dbconn,$JELLYFISHNODEID,1,1,0,0); //echo count($defco->list); } // Background photo $bg_att=new AttachmentList(); if ($sel==$HOMEPAGENODEID || $sel==$CONSONTRIUMNODEID) $bg_att->populateCategPhotos($dbconn,$sel,$_SESSION["ses_locale"],$ATTYPE_MEDIA,1,1); else $bg_att->populateCategPhotos($dbconn,$path[1]->cat_id,$_SESSION["ses_locale"],$ATTYPE_MEDIA,1,1); // get Template -- search in the template tags [%#cccccc#%] $tempr=new TemplateDBRecord($dbconn); if($pf)$tempr->temp_id=2; else if ($artid>0 && $al->list[0]->temp_id>0) $tempr->temp_id=$al->list[0]->temp_id; else{ $tempr->temp_id=$cm->getTemplate($sel); } $tempr->get(); //echo "lala".$sel.$tempr->temp_id.$pf; //get template list $templs = new TemplateList(); $templs->full = 1; $templs->populate($dbconn,1,1); $html = $tempr->html; $html=includeTemplates($tempr->temp_id,$templs->list,$html); $PAGE = $html; // [%PAGE_TITLE%] $PAGE_TITLE=""; if(strstr($PAGE,"[%PAGE_TITLE%]")) { if($artid>0) $PAGE_TITLE=$al->list[0]->seo_title!=""?$al->list[0]->seo_title:$al->list[0]->title; else $PAGE_TITLE=$nrloc->seo_title!=""?$nrloc->seo_title:$cm->getName($sel); $PAGE_TITLE.=" | perseus"; $PAGE=str_replace("[%PAGE_TITLE%]",$PAGE_TITLE,$PAGE); } // [%PAGE_KEYWORDS%] $PAGE_KEYWORDS=""; if(strstr($PAGE,"[%PAGE_KEYWORDS%]")) { if($artid>0) $PAGE_KEYWORDS=$al->list[0]->seo_keyw; else $PAGE_KEYWORDS=$nrloc->seo_keyw; $PAGE=str_replace("[%PAGE_KEYWORDS%]",$PAGE_KEYWORDS,$PAGE); } // [%PAGE_DESCRIPTION%] $PAGE_DESCRIPTION=""; if(strstr($PAGE,"[%PAGE_DESCRIPTION%]")) { if($artid>0) $PAGE_DESCRIPTION=$al->list[0]->seo_descr; else $PAGE_DESCRIPTION=$nrloc->seo_descr; if($PAGE_DESCRIPTION=="") $PAGE_DESCRIPTION=getSummary($al->list[0],200); if($start>0) $PAGE_DESCRIPTION=$PAGE_DESCRIPTION." - starting at ".$start; $PAGE=str_replace("[%PAGE_DESCRIPTION%]",$PAGE_DESCRIPTION,$PAGE); } // [%FOOTER%] $FOOTER=""; if(strstr($PAGE,"[%FOOTER%]")) { $subs=$cm->getSubNodes($FOOTERMENUNODEID,1); $FOOTER.="
© 2012 PERSEUS | "; for ($i=0; $icat_id!=432) $FOOTER.="".$subs[$i]->name." "; else $FOOTER.="".$subs[$i]->name.""; if ($i!=(count($subs)-1)) $FOOTER.="| "; } $FOOTER.="
"; $PAGE=str_replace("[%FOOTER%]",$FOOTER,$PAGE); } // [%REGISTRATION_SCRIPT%] $REGISTRATION_SCRIPT=""; if(strstr($PAGE,"[%REGISTRATION_SCRIPT%]")) { if ($sel==$REGFORMNODEID || $path[0]->cat_id==$JELLYFISHNODEID) $REGISTRATION_SCRIPT.=' '; $PAGE=str_replace("[%REGISTRATION_SCRIPT%]",$REGISTRATION_SCRIPT,$PAGE); } // [%CYCLE2_SCRIPT%] $CYCLE2_SCRIPT=""; if(strstr($PAGE,"[%CYCLE2_SCRIPT%]")) { if ($path[2]->cat_id==$STUDENTSEXHIBITIONSNODEID || $tempr->temp_id==$TEACHERS_CORNER_TEMP_ID){ $CYCLE2_SCRIPT.=" "; } $PAGE=str_replace("[%CYCLE2_SCRIPT%]",$CYCLE2_SCRIPT,$PAGE); } // [%BG_SCRIPT%] $BG_SCRIPT=""; if(strstr($PAGE,"[%BG_SCRIPT%]")) { $rmt1='158.169.9.14'; $rmt2='158.169.131.14'; if ($_SERVER['REMOTE_ADDR']!=$rmt1 && $_SERVER['REMOTE_ADDR']!=$rmt2) $BG_SCRIPT.=""; $ph_url="[%BU%]images/body_bg.jpg"; $ph_width=2044; $ph_height=1035; if (count($bg_att->list)>0){ $ph_url=$IN_MEDIA_URL.$bg_att->list[0]->URI; $ph_width=$bg_att->list[0]->width; $ph_height=$bg_att->list[0]->height; } $BG_SCRIPT.=" "; $PAGE=str_replace("[%BG_SCRIPT%]",$BG_SCRIPT,$PAGE); } // [%JELLY_SCRIPT%] $JELLY_SCRIPT=""; if(strstr($PAGE,"[%JELLY_SCRIPT%]")) { if ($sel==$JELLYFISHFORMNODEID){ $JELLY_SCRIPT.=' '; } $PAGE=str_replace("[%JELLY_SCRIPT%]",$JELLY_SCRIPT,$PAGE); } // [%BG_SCRIPT_TEST%] $BG_SCRIPT_TEST=""; if(strstr($PAGE,"[%BG_SCRIPT_TEST%]")) { $ph_url="[%BU%]images/body_bg.jpg"; $ph_width=2044; $ph_height=1035; if (count($bg_att->list)>0){ $ph_url=$IN_MEDIA_URL.$bg_att->list[0]->URI; $ph_width=$bg_att->list[0]->width; $ph_height=$bg_att->list[0]->height; } $BG_SCRIPT_TEST.=" "; $PAGE=str_replace("[%BG_SCRIPT_TEST%]",$BG_SCRIPT_TEST,$PAGE); } // [%BG_BODY%] $BG_BODY=""; /*$BG_BODY.="
list)>0) $BG_BODY.=" style=\"background:#fff url(".$IN_MEDIA_URL.$bg_att->list[0]->URI.") center 0px no-repeat; z-index:1;\""; $BG_BODY.=">
";*/ $PAGE=str_replace("[%BG_BODY%]",$BG_BODY,$PAGE); // [%TOP_LINKS%] $TOP_LINKS=""; if(strstr($PAGE,"[%TOP_LINKS%]")) { $TOP_LINKS.=""; $PAGE=str_replace("[%TOP_LINKS%]",$TOP_LINKS,$PAGE); } // [%HEAD_TOP%] $HEAD_TOP=""; if (strstr($PAGE,"[%HEAD_TOP%]")) { $HEAD_TOP.=""; $PAGE=str_replace("[%HEAD_TOP%]",$HEAD_TOP,$PAGE); } // [%MAIN_MENU%] $MAIN_MENU=""; if(strstr($PAGE,"[%MAIN_MENU%]")) { $subs=$cm->getSubNodes($MAINMENUNODEID,1); $MAIN_MENU.="
    "; for ($i=0; $igetSubNodes($subs[$i]->cat_id,1); $MAIN_MENU.="
  • cat_id gia na fainontai kai ta submenus if (($path[0]->cat_id==$TOOLBOXNODEID && $subs[$i]->cat_id==$POLICYNODEID) || $path[1]->cat_id==$subs[$i]->cat_id || ($path[0]->cat_id==$CONSONTRIUMNODEID && $i==0)) $MAIN_MENU.=" allow on"; $MAIN_MENU.="\"> ".$subs[$i]->name.""; if (count($second_subs)>0 && (($path[0]->cat_id==$TOOLBOXNODEID && $subs[$i]->cat_id==$POLICYNODEID) || $path[1]->cat_id==$subs[$i]->cat_id || ($path[0]->cat_id==$CONSONTRIUMNODEID && $i==0)) && $path[0]->cat_id!=$JELLYFISHNODEID){ $MAIN_MENU.="
      "; for ($j=0; $jgetSubNodes($second_subs[$j]->cat_id,1); $MAIN_MENU.="
    • "; //if ($second_subs[$j]->cat_id==$PARTNERSCORNERNODEID && ($_SESSION["mem_id"]<=0||$mr->status!="A")){ if (($second_subs[$j]->status=="P"&& ($_SESSION["mem_id"]<=0||($mr->status!="A"&&$mr->status!="R"))) || ($second_subs[$j]->cat_id==442 && ($_SESSION["mem_id"]<=0||($mr->status!="A"&&$mr->status!="R"))) ){ $MAIN_MENU.="getObject($PROJECTDOCSNODEID,1))."');\">".$second_subs[$j]->name.""; } /*else if ($second_subs[$j]->status=="P" && $mr->status!="R"){ $MAIN_MENU.="getObject($REGFORMNODEID,1))."\">".$second_subs[$j]->name.""; }*/ else if ($second_subs[$j]->cat_id!=394 && $second_subs[$j]->cat_id!=407 && $second_subs[$j]->cat_id!=442 && $second_subs[$j]->cat_id!=411 && $second_subs[$j]->cat_id!=421 && $second_subs[$j]->cat_id!=457) $MAIN_MENU.="".$second_subs[$j]->name.""; else $MAIN_MENU.="".$second_subs[$j]->name.""; if (count($third_subs)>0 && $second_subs[$j]->cat_id!=$WPSCIENTISTNODEID && $second_subs[$j]->cat_id!=$WPPOLICYNODEID && $second_subs[$j]->cat_id!=$WPMEDIAADVNODEID && ($path[1]->cat_id==$subs[$i]->cat_id || ($path[0]->cat_id==$CONSONTRIUMNODEID && $i==0))){ //if ($second_subs[$j]->cat_id==$PARTNERSCORNERNODEID && ($_SESSION["mem_id"]<=0||$mr->status!="A")){} //else{ $MAIN_MENU.=""; //} //if ($j<(count($second_subs)-1)) $MAIN_MENU.="
    • "; } $MAIN_MENU.=""; } $MAIN_MENU.="
    "; } $MAIN_MENU.="
  • "; } $MAIN_MENU.="

close
Welcome to PERSEUS Partners Corner.
This is the private area of the PERSEUS consortium.
To get access to this area please log in.
getObject($PROJECTDOCSNODEID,1))."\">
0 && $_SESSION['ses_catid']==$REGFORMNODEID && $sel==$HOMEPAGENODEID)$MAIN_MENU.=" style=\"display:block\">"; else $MAIN_MENU.=" style=\"display:none\">"; $MAIN_MENU.="
close
Change your password
"; $PAGE=str_replace("[%MAIN_MENU%]",$MAIN_MENU,$PAGE); } // [%LOGO%] $LOGO.="getObject($HOMEPAGENODEID,1))."\">\"\""; $PAGE=str_replace("[%LOGO%]",$LOGO,$PAGE); // [%SEARCH_FORM%] $SEARCH_FORM=""; if(strstr($PAGE,"[%SEARCH_FORM%]")) { $SEARCH_FORM.="
getObject($SEARCHNODEID,1))."\" class=\"search_form\">
"; $SEARCH_FORM.="member_id>0) $SEARCH_FORM.=" style=\"display:none;\""; $SEARCH_FORM.=">
login
member_id<=0) $SEARCH_FORM.=" style=\"display:none;\""; $SEARCH_FORM.=">
logout
"; $PAGE=str_replace("[%SEARCH_FORM%]",$SEARCH_FORM,$PAGE); } // [%HOME_TITLE_TEXT%] $HOME_TITLE_TEXT=""; if(strstr($PAGE,"[%HOME_TITLE_TEXT%]")) { $HOME_TITLE_TEXT.="

".$al->list[0]->menu_title."

".$al->list[0]->title."".$al->list[0]->subtitle."
".$al->list[0]->shortdesc."

".$al->list[0]->fulltxt."

"; $PAGE=str_replace("[%HOME_TITLE_TEXT%]",$HOME_TITLE_TEXT,$PAGE); } // [%MAP_BOX%] $MAP_BOX=""; if(strstr($PAGE,"[%MAP_BOX%]")) { //$MAP_BOX.="getObject($MAPNODEID))."\"> $mapal=new ArticleList(); $mapal->by_status="3"; // only Published articles $mapal->status_comp="="; $mapal->full_info=true; $mapal->only_active_today=true; // get non-expired articles $mapal->by_locale=$_SESSION["ses_locale"]; $mapal->sort_order="a.createdate"; $mapal->sorting="DESC"; $mapal->getArticlesOfNode($dbconn,$MAPIMGNODEID,1,1,0,9999); $MAP_BOX.=""; $PAGE=str_replace("[%MAP_BOX%]",$MAP_BOX,$PAGE); } // [%EVENTS_HOME%] $EVENTS_HOME=""; if(strstr($PAGE,"[%EVENTS_HOME%]")) { $ev=new ArticleList(); $ev->by_status="3"; // only Published articles $ev->status_comp="="; $ev->full_info=true; $ev->only_active_today=true; // get non-expired articles $ev->by_locale=$_SESSION["ses_locale"]; $ev->sort_order="a.eventdate_from"; $ev->sorting="DESC"; if ($sel==$SCIENTISTNODEID) $ev->flags="S"; else if ($sel==$POLICYNODEID) $ev->flags="P"; else if ($sel==$MEDIAADVNODEID) $ev->flags="M"; else if ($sel==$GENERALPUBLICNODEID) $ev->flags="U"; else $ev->flags="HE"; $ev->getAllArticles($dbconn,1,1,0,2); if (count($ev->list)>0){ $EVENTS_HOME.="

Events

    "; for ($i=0; $ilist); $i++){ $event_date=""; if ($ev->list[$i]->eventdate_from>0 || $ev->list[$i]->eventdate_to>0){ if (@date('n',$ev->list[$i]->eventdate_from)==@date('n',$ev->list[$i]->eventdate_to) && $ev->list[$i]->eventdate_to>0) $event_date.=@date('d',$ev->list[$i]->eventdate_from)." - ".timestamp2fulldate($ev->list[$i]->eventdate_to); else{ if ($ev->list[$i]->eventdate_from>0) $event_date.=timestamp2fulldate($ev->list[$i]->eventdate_from); if ($ev->list[$i]->eventdate_to>0) $event_date.=" - ".timestamp2fulldate($ev->list[$i]->eventdate_to); } //$event_date=timestamp2fulldate($ev->list[$i]->eventdate_from); //if ($ev->list[$i]->eventdate_to>0) $event_date.=" – ".timestamp2fulldate($ev->list[$i]->eventdate_to); $event_date.=": "; } $EVENTS_HOME.="list)-1)) $EVENTS_HOME.=" class=\"last\""; $EVENTS_HOME.=">
    "; if ($ev->list[$i]->subtitle!='') $EVENTS_HOME.="list[$i]->subtitle."\" target=\"_blank\">".$event_date.$ev->list[$i]->title.""; else if (getSummary($ev->list[$i],200)!="" && trim($ev->list[$i]->fulltxt)!=" ") $EVENTS_HOME.="list[$i])."\">".$event_date.$ev->list[$i]->title.""; else $EVENTS_HOME.="".$event_date.$ev->list[$i]->title; $EVENTS_HOME.="
    "; if (getSummary($ev->list[$i],350)!="" && trim($ev->list[$i]->fulltxt)!=" "){ $EVENTS_HOME.="

    ".getSummary($ev->list[$i],350)."

    "; } $EVENTS_HOME.=""; } $EVENTS_HOME.="
"; } $PAGE=str_replace("[%EVENTS_HOME%]",$EVENTS_HOME,$PAGE); } // [%NEWS_HOME%] $NEWS_HOME=""; if(strstr($PAGE,"[%NEWS_HOME%]")) { if ($cm->getParent($sel)!=$FOOTERMENUNODEID){ $news=new ArticleList(); $news->by_status="3"; // only Published articles $news->status_comp="="; $news->full_info=true; $news->only_active_today=true; // get non-expired articles $news->by_locale=$_SESSION["ses_locale"]; $news->sort_order="a.createdate"; $news->sorting="DESC"; if ($sel==$HOMEPAGENODEID){ $news->flags="HN"; } else { $news->flags="NC"; $children=$cm->util_FindAllChildren($path[1]->cat_id); $catstr=implode(",",$children); if($catstr!="") $news->extra_sql=" AND (c.cat_id IN (".$catstr."))"; } //$news->flags="HN"; $news->getAllArticlesWithCat($dbconn,1,1,0,2); if ($sel==$HOMEPAGENODEID) $NEWS_HOME.="
"; if ($sel==$TRAININGNODEID){ $subs=$cm->getSubNodes($TRAININGNODEID,1); $train=new ArticleList(); $train->by_status="3"; // only Published articles $train->status_comp="="; $train->full_info=true; $train->only_active_today=true; // get non-expired articles $train->by_locale=$_SESSION["ses_locale"]; $train->sort_order="a.createdate"; $train->sorting="DESC"; $train->flags="H"; $train->getArticlesOfNode($dbconn,$subs[0]->cat_id,1,1,0,2); if (count($train->list)>0){ $NEWS_HOME.="

".$PHRASE_TRAINING_TITLE['el']."

"; } } if ($sel!=$TRAININGNODEID && $sel!=$HOMEPAGENODEID && $path[3]->cat_id!=$PROJECTDOCSNODEID && $cm->getTemplate($sel)!=$cm->getTemplate($HOMEPAGENODEID)){ $NEWS_HOME.="
    "; for ($i=0; $igetObject($CATLISTSIDEBAR[$i]))."\"> ".$PHRASE_CATLIST_TITLE[$loc_iso][$i].""; } $NEWS_HOME.="
"; $NEWS_HOME.="
"; } else if ($path[3]->cat_id==$PROJECTDOCSNODEID){ $pr_subs=$cm->getSubNodes($PROJECTDOCSNODEID,1); $NEWS_HOME.="
    "; for ($i=0; $icat_id==$pr_subs[$i]->cat_id) $NEWS_HOME.=" active"; $NEWS_HOME.="\">".$pr_subs[$i]->name.""; } $NEWS_HOME.="
"; } if (count($news->list)>0 && $path[3]->cat_id!=$PROJECTDOCSNODEID){ if ($sel!=$HOMEPAGENODEID) $NEWS_HOME.="
"; $NEWS_HOME.="

".$PHRASE_NEWS_TITLE[$loc_iso]."

"; } $NEWS_HOME.="
"; } $PAGE=str_replace("[%NEWS_HOME%]",$NEWS_HOME,$PAGE); } // [%ARTICLE_CONTENT%] $ARTICLE_CONTENT=""; if(strstr($PAGE,"[%ARTICLE_CONTENT%]")) { $ssub_proj=$cm->getSubNodes($sel,1); if ($path[3]->cat_id!=$PROJECTDOCSNODEID || $path[3]->cat_id!=$PUBLICATIONSMODEID){ $ARTICLE_CONTENT.="

".$ar->menu_title."

"; $ARTICLE_CONTENT.="
".$ar->title."
"; if ($ar->shortdesc!='') $ARTICLE_CONTENT.="
".$ar->shortdesc."
"; if (trim($arml->list[0]->embed)!=''){ $ARTICLE_CONTENT.=$arml->list[0]->embed; } else if (count($arml->list)>0){ $ARTICLE_CONTENT.="
    "; for ($i=0; $ilist); $i++){ $ratio=($arml->list[$i]->width)/($arml->list[$i]->height); $temp_height=200; $temp_width=350; $pad_top=0; $pad_left=0; if ($arml->list[$i]->width > $arml->list[$i]->height){ $temp_height=round(350/$ratio); if ($temp_height>200){ $temp_height=200; $temp_width=200*$ratio; $pad_left=round(abs(350-$temp_width)/2); } else $pad_top=round(abs(200-$temp_height)/2); } else if ($arml->list[$i]->width==$arml->list[$i]->height){ $temp_width=200*$ratio; $pad_left=round(abs(350-$temp_width)/2); } else if ($arml->list[$i]->width < $arml->list[$i]->height){ $temp_width=200*$ratio; if ($temp_width>350){ $temp_width=350; $temp_height=350/$ratio; $pad_top=round(abs(200-$temp_height)/2); } $pad_left=round(abs(350-$temp_width)/2); } $ARTICLE_CONTENT.="
  • list[$i]->ltitle."\" href=\"".$IN_MEDIA_URL.$arml->list[$i]->URI."\">list[$i]->URI."\" alt=\"\" width=\"".$temp_width."\" height=\"".$temp_height."\" style=\"padding:".$pad_top."px ".$pad_left."px\">
    ".$arml->list[$i]->ltitle."
  • "; } $ARTICLE_CONTENT.="
"; if (count($arml->list)>1) $ARTICLE_CONTENT.="
btn_prev photo from ".count($arml->list)." btn_next
"; $ARTICLE_CONTENT.="
"; } $ARTICLE_CONTENT.="

".$ar->fulltxt."

"; } else $ARTICLE_CONTENT.="

".$cm->getName($path[3]->cat_id)."

"; if ($path[3]->cat_id==$PUBLICATIONSMODEID){ $subs_temp=$cm->getSubNodes($PUBLICATIONSMODEID,1); for ($j=0; $jby_status="3"; // only Published articles $train->status_comp="="; $train->full_info=true; $train->only_active_today=true; // get non-expired articles $train->by_locale=$_SESSION["ses_locale"]; $train->sort_order="a.createdate"; $train->sorting="DESC"; $train->getArticlesOfNode($dbconn,$subs_temp[$j]->cat_id,1,1,0,0); $file_list=new AttachmentList(); $file_list->by_status="A"; $file_list->by_locale=$_SESSION["ses_locale"]; $file_list->getRelatedAtt($dbconn,$train->list[0]->art_id,$ATTYPE_FILES,1,1); if (trim($train->list[0]->fulltxt)!=''){ $ARTICLE_CONTENT.="
".$cm->getName($subs_temp[$j]->cat_id)."

".$train->list[0]->fulltxt."

"; if (count($file_list->list)>0){ $ARTICLE_CONTENT.=""; } } } } else if ($sel!=$WPSCIENTISTNODEID && $sel!=$WPPOLICYNODEID && $sel!=$WPMEDIAADVNODEID && $sel!=$SITEMAPNODEID && $sel!=$REGFORMNODEID && $path[3]->cat_id!=$PROJECTDOCSNODEID){ if (count($ral->list)>0){ $ARTICLE_CONTENT.="".$PHRASE_RELATED_CATATEGORY[$loc_iso]."
"; } if ($ar->participants!='' && $ar->ytube!=''){ $vcode_t=explode("watch?v=",$ar->ytube); $vcode_t2=explode("&",$vcode_t[1]); $vcode=$vcode_t2[0]; $ARTICLE_CONTENT.="".$PHRASE_RELATED_VIDEO[$loc_iso].""; } } else if ($sel==$PROJECTDOCSNODEID || (count($ssub_proj)==0 && $path[3]->cat_id==$PROJECTDOCSNODEID)){ if ($sel!=$PROJECTDOCSNODEID) $ARTICLE_CONTENT.="
".$cm->getName($sel)."
"; $ARTICLE_CONTENT.=""; } else if ($path[3]->cat_id==$PROJECTDOCSNODEID){ $ARTICLE_CONTENT.="
".$cm->getName($sel)."
".print_cat_tree($sel,$cm->getParent($sel)+0,1)."
"; } else if ($sel==$SITEMAPNODEID){ $subs=$cm->getSubNodes($MAINMENUNODEID,1); $ARTICLE_CONTENT.="
"; for ($i=0; $igetSubNodes($subs[$i]->cat_id,1); $ARTICLE_CONTENT.="".$subs[$i]->name."
"; for ($j=0; $j0){ if ($second_subs[$j]->cat_id==394 || $second_subs[$j]->cat_id==407 || $second_subs[$j]->cat_id==411 || $second_subs[$j]->cat_id==421 || $second_subs[$j]->cat_id==442 || $second_subs[$j]->cat_id==457 || $second_subs[$j]->cat_id==492 || $second_subs[$j]->cat_id==484 || $second_subs[$j]->cat_id==510) $ARTICLE_CONTENT.="    ".$second_subs[$j]->name."
"; else $ARTICLE_CONTENT.="    ".$second_subs[$j]->name."
"; $third_subs=$cm->getSubNodes($second_subs[$j]->cat_id,1); if (count($third_subs)>0 && $second_subs[$j]->cat_id!=$WPSCIENTISTNODEID && $second_subs[$j]->cat_id!=$WPPOLICYNODEID && $second_subs[$j]->cat_id!=$WPMEDIAADVNODEID){ $ARTICLE_CONTENT.="    "; for ($k=0; $k".$third_subs[$k]->name."
"; $ARTICLE_CONTENT.="
"; } } } } $ARTICLE_CONTENT.="
"; } else if ( $sel==$REGFORMNODEID && $_GET['artid'] == 233){ $pdates=explode(",",$mr->program_dates); $profs=explode("|",$mr->profession); $defOther="enter"; $defFname="enter your first name"; $defLname="enter your last name"; $defInstitute="enter your institute name"; $defEmail="enter your e-mail"; if (count($profs==3) && $profs[2]!='')$defOther=$profs[2]; if ($mr->fname!='') $defFname=$mr->fname; if ($mr->lname!='') $defLname=$mr->lname; if ($mr->school!='')$defInstitute=$mr->school; if ($mr->email!='') $defEmail=$mr->email; $ARTICLE_CONTENT.='
'; for ($i=0; $i gender=="M")$ARTICLE_CONTENT.=' checked=\"checked\"'; $ARTICLE_CONTENT.=' value="M"> gender=="F")$ARTICLE_CONTENT.=' checked=\"checked\"'; $ARTICLE_CONTENT.=' value="F">
dinner=='Y') $ARTICLE_CONTENT.=' checked=\"checked\"'; $ARTICLE_CONTENT.='
-->
'; } if($_GET['artid'] == 3472 ){ $ARTICLE_CONTENT.='
Scientific Workshop
'; if($_GET['artid'] == 3481){ $ARTICLE_CONTENT.=''; } $ARTICLE_CONTENT.='
'; } $ARTICLE_CONTENT.='
'; $PAGE=str_replace("[%ARTICLE_CONTENT%]",$ARTICLE_CONTENT,$PAGE); } // [%GALLERY_CONTENT%] /* $GALLERY_CONTENT=""; if(strstr($PAGE,"[%GALLERY_CONTENT%]")) { $GALLERY_CONTENT.="

".$cm->getName($sel)."

"; if ($arml->list[0]->embed!=''){ $GALLERY_CONTENT.=$arml->list[0]->embed; $GALLERY_CONTENT.="
"; } else{ $GALLERY_CONTENT.="
    "; for ($i=0; $ilist); $i++){ $ratio=($arml->list[$i]->width)/($arml->list[$i]->height); $temp_height=348; $temp_width=536; $pad_top=0; $pad_left=0; if ($arml->list[$i]->width > $arml->list[$i]->height){ $temp_height=round(536/$ratio); if ($temp_height>348){ $temp_height=348; $temp_width=348*$ratio; $pad_left=round(abs(536-$temp_width)/2); } else $pad_top=round(abs(348-$temp_height)/2); } else if ($arml->list[$i]->width==$arml->list[$i]->height){ $temp_width=348*$ratio; $pad_left=round(abs(536-$temp_width)/2); } else if ($arml->list[$i]->width < $arml->list[$i]->height){ $temp_width=348*$ratio; if ($temp_width>536){ $temp_width=536; $temp_height=536/$ratio; $pad_top=round(abs(348-$temp_height)/2); } $pad_left=round(abs(536-$temp_width)/2); } $GALLERY_CONTENT.="
  • list[$i]->URI."\" title=\"".$arml->list[$i]->ltitle."\">list[$i]->URI."\" alt=\"\" width=\"".$temp_width."\" height=\"".$temp_height."\" style=\"padding:".$pad_top."px ".$pad_left."px\">
  • "; } $GALLERY_CONTENT.="
btn_prev btn_next"; } $GALLERY_CONTENT.="
"; $PAGE=str_replace("[%GALLERY_CONTENT%]",$GALLERY_CONTENT,$PAGE); } */ // [%GALLERY_CONTENT%] $GALLERY_CONTENT=""; if(strstr($PAGE,"[%GALLERY_CONTENT%]")) { $title_name=$cm->getName($sel); if ($sel==$CONSONTRIUMNODEID) $title_name=$PHRASE_CONSORTIUM[$loc_iso]; $GALLERY_CONTENT.="

".$title_name."

"; if ($arml->list[0]->embed==''){ $GALLERY_CONTENT.="
"; /*if ($arml->list[0]->embed!=''){ $GALLERY_CONTENT.=$arml->list[0]->embed; $GALLERY_CONTENT.="
"; } else{*/ $GALLERY_CONTENT.="
"; } else{ $GALLERY_CONTENT.="
"; // $GALLERY_CONTENT.="
$GALLERY_CONTENT.=""; //} //$GALLERY_CONTENT.=" $GALLERY_CONTENT.="
"; $PAGE=str_replace("[%GALLERY_CONTENT%]",$GALLERY_CONTENT,$PAGE); } // [%ARTICLE_LIST_CONTENT%] $ARTICLE_LIST_CONTENT=""; if(strstr($PAGE,"[%ARTICLE_LIST_CONTENT%]")) { $title_name=$cm->getName($sel); if ($sel==$CONSONTRIUMNODEID) $title_name=$PHRASE_CONSORTIUM[$loc_iso]; $ARTICLE_LIST_CONTENT.="

".$title_name."

"; if ($sel==$CONSONTRIUMNODEID){ $ARTICLE_LIST_CONTENT.=" "; } $ARTICLE_LIST_CONTENT.="
"; if ($sel==$CONSONTRIUMNODEID){ $ARTICLE_LIST_CONTENT.="
".$PHRASE_EVENT_TITLE1[$loc_iso]."
".$PHRASE_EVENT_TITLE2[$loc_iso]."
".$PHRASE_EVENT_TITLE3[$loc_iso]."
".$PHRASE_EVENT_TITLE4[$loc_iso]."
"; } for ($i=0; $ilist); $i++){ $link=""; $link_end=""; if ($al->list[$i]->subtitle!=''){ $link="list[$i]->subtitle."\" target=\"_blank\">"; $link_end=""; } else if (getSummary($al->list[$i],100)!='' && trim($al->list[$i]->fulltxt)!=" "){ $link="list[$i])."\">"; $link_end=""; } if ($sel==$CONSONTRIUMNODEID){ $al_att=new AttachmentList(); $al_att->by_status="A"; $al_att->by_locale=$_SESSION["ses_locale"]; $al_att->getRelatedAtt($dbconn,$al->list[$i]->art_id,$ATTYPE_MEDIA,1,1); $total_atts=count($al_att->list); $al_file=new AttachmentList(); $al_file->by_status="A"; $al_file->by_locale=$_SESSION["ses_locale"]; $al_file->getRelatedAtt($dbconn,$al->list[$i]->art_id,$ATTYPE_FILES,1,1); $total_files=count($al_file->list); $rel_al=new ArticleList(); $rel_al->by_status="3"; // only Published articles $rel_al->status_comp="="; $rel_al->full_info=true; $rel_al->only_active_today=true; // get non-expired articles $rel_al->sort_order="b.rel_order"; // $ral->getRelatedArticles($dbconn,$al->list[0]->art_id,1,1,"",STtime()); $rel_al->getRelatedArticles($dbconn,$al->list[$i]->art_id,1,1); $ARTICLE_LIST_CONTENT.="
"; if ($total_atts>0){ $ratio=($al_att->list[0]->width)/($al_att->list[0]->height); $temp_height=59; $temp_width=79; $pad_top=0; $pad_left=0; if ($al_att->list[0]->width > $al_att->list[0]->height){ $temp_height=round(79/$ratio); if ($temp_height>59){ $temp_height=59; $temp_width=59*$ratio; $pad_left=round(abs(79-$temp_width)/2); } else $pad_top=round(abs(59-$temp_height)/2); } else if ($al_att->list[0]->width==$al_att->list[0]->height){ $temp_width=59*$ratio; $pad_left=round(abs(59-$temp_width)/2); } else if ($al_att->list[0]->width < $al_att->list[0]->height){ $temp_width=59*$ratio; if ($temp_width>79){ $temp_width=79; $temp_height=79/$ratio; $pad_top=round(abs(59-$temp_height)/2); } $pad_left=round(abs(79-$temp_width)/2); } $ARTICLE_LIST_CONTENT.=$link."list[0]->URI."\" style=\"margin-right: 9px; padding:".$pad_top."px ".$pad_left."px;\" height=\"".$temp_height."\" width=\"".$temp_width."\" alt=\"\">".$link_end; } $ARTICLE_LIST_CONTENT.="
"; $ARTICLE_LIST_CONTENT.="
"; $ARTICLE_LIST_CONTENT.="

".$link."".$al->list[$i]->title."".$link_end."

"; if ($al->list[$i]->participants!='') $ARTICLE_LIST_CONTENT.="
".$al->list[$i]->participants."
"; $ARTICLE_LIST_CONTENT.="
"; $art4wp=new ArticleDBRecord($dbconn); $art4wp->art_id=$al->list[$i]->art_id; $selectedWorks=$art4wp->getattachedWorks(); $ARTICLE_LIST_CONTENT.="
"; if(count($selectedWorks)>0){ $ARTICLE_LIST_CONTENT.="
    "; $modal_mes=''; for ($j=(count($selectedWorks)-1); $j>=0; $j--){ $art_spec=new ArticleList(); $art_spec->by_status="3"; // only Published articles $art_spec->status_comp="="; $art_spec->full_info=true; $art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="a.art_order"; $art_spec->sorting="ASC"; $art_spec->getArticlesOfNode($dbconn,$selectedWorks[$j],1,1,0,1); //$modal_mes.="
    getName($selectedWorks[$j]))."\" style=\"width:692px;height:auto;overflow:auto;padding:25px;\">

    ".$art_spec->list[0]->title."

    ".$art_spec->list[0]->fulltxt."  

    "; $ARTICLE_LIST_CONTENT.="
  • getName($selectedWorks[$j]))."\" href=\"#".trim($cm->getName($selectedWorks[$j]))."\">".$cm->getName($selectedWorks[$j])."
  • "; } $ARTICLE_LIST_CONTENT.="
"; } $ARTICLE_LIST_CONTENT.="
"; //for ($k=0; $k"; if ($total_atts>1){ $ARTICLE_LIST_CONTENT.="
list[1]->width/$al_att->list[1]->height; $temp_height=76/$ratio; $pad_top=intval(round(58-$temp_height)/2)+1; */ $ratio=($al_att->list[1]->width)/($al_att->list[1]->height); $temp_height=58; $temp_width=76; $pad_top=0; $pad_left=0; if ($al_att->list[1]->width > $al_att->list[1]->height){ $temp_height=round(76/$ratio); if ($temp_height>58){ $temp_height=58; $temp_width=58*$ratio; $pad_left=round(abs(76-$temp_width)/2); } else $pad_top=round(abs(58-$temp_height)/2); } else if ($al_att->list[1]->width==$al_att->list[1]->height){ $temp_width=58*$ratio; $pad_left=round(abs(76-$temp_width)/2); } else if ($al_att->list[1]->width < $al_att->list[1]->height){ $temp_width=58*$ratio; if ($temp_width>76){ $temp_width=76; $temp_height=76/$ratio; $pad_top=round(abs(58-$temp_height)/2); } $pad_left=round(abs(76-$temp_width)/2); } $ARTICLE_LIST_CONTENT.=" style=\"border-width:".($pad_top+1)."px;\">list[1]->URI."\" alt=\"\" width=\"".$temp_width."\" height=\"".$temp_height."\" >"; $ARTICLE_LIST_CONTENT.="
"; } //else $ARTICLE_LIST_CONTENT.=">"; /*if ($total_files>0 || $al->list[$i]->ytube!='' || $al->list[$i]->participants!='') $ARTICLE_LIST_CONTENT.="
"; } else{ $ARTICLE_LIST_CONTENT.="
"; $ARTICLE_LIST_CONTENT.="
list[$i]->participants!='') $ARTICLE_LIST_CONTENT.="style=\"top:23% !important;\""; $ARTICLE_LIST_CONTENT.=">"; $ARTICLE_LIST_CONTENT.="

".$link; if ($al->list[$i]->eventdate_from>0 || $al->list[$i]->eventdate_to>0){ if (@date('n',$al->list[$i]->eventdate_from)==@date('n',$al->list[$i]->eventdate_to)) $ARTICLE_LIST_CONTENT.=@date('d',$al->list[$i]->eventdate_from)." - ".timestamp2fulldate($al->list[$i]->eventdate_to); else{ if ($al->list[$i]->eventdate_from>0) $ARTICLE_LIST_CONTENT.=timestamp2fulldate($al->list[$i]->eventdate_from); if ($al->list[$i]->eventdate_to>0) $ARTICLE_LIST_CONTENT.=" - ".timestamp2fulldate($al->list[$i]->eventdate_to); } $ARTICLE_LIST_CONTENT.=": "; } $ARTICLE_LIST_CONTENT.=$al->list[$i]->title."".$link_end."

"; if ($al->list[$i]->participants!='') $ARTICLE_LIST_CONTENT.="
name: ".$al->list[$i]->participants."
"; $ARTICLE_LIST_CONTENT.="
"; } } $ARTICLE_LIST_CONTENT.=""; $modal_mes=''; $wp_all=$cm->getSubNodes($WPNODEID,1); for ($j=0; $jby_status="3"; // only Published articles $art_spec->status_comp="="; $art_spec->full_info=true; $art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="a.art_order"; $art_spec->sorting="ASC"; $art_spec->getArticlesOfNode($dbconn,$wp_all[$j]->cat_id,1,1,0,1); $modal_mes.="
getName($wp_all[$j]->cat_id))."\" style=\"width:692px;height:auto;overflow:auto;padding:25px;\">

".$art_spec->list[0]->title."

".$art_spec->list[0]->fulltxt."  

"; } $ARTICLE_LIST_CONTENT.=$modal_mes; //if ($sel==$CONSONTRIUMNODEID)$ARTICLE_LIST_CONTENT.="[%MAP%]"; $PAGE=str_replace("[%ARTICLE_LIST_CONTENT%]",$ARTICLE_LIST_CONTENT,$PAGE); } // [%MAP%] tag gia thn content $MAP=""; if(strstr($PAGE,"[%MAP%]")) { $MAPNODEID=$sel; $MAP.="

".$cm->getName($CONSORTIUMNODEID)."

"; $MAP.=""; $MAP.="
"; $PAGE=str_replace("[%MAP%]",$MAP,$PAGE); } // [%CALENDAR%] $CALENDAR=""; if(strstr($PAGE,"[%CALENDAR%]")) { $event_active_the_month=STtime(); $event_active_the_day=STtime(); $mon_agenda_al=new ArticleList(); $mon_agenda_al->by_status="3"; // only Published articles $mon_agenda_al->status_comp="="; $mon_agenda_al->full_info=true; $mon_agenda_al->only_active_today=true; // get non-expired articles $mon_agenda_al->event_active_the_month=$event_active_the_month; $mon_agenda_al->by_locale=$_SESSION["ses_locale"]; $mon_agenda_al->flags="E"; /*$children=$cm->util_FindAllChildren($path[0]->cat_id); $catstr=implode(",",$children); $mon_agenda_al->extra_sql=" AND (c.cat_id IN (".$catstr."))";*/ $mon_agenda_al->sort_order="a.eventdate_from"; $mon_agenda_al->sorting="ASC"; //$mon_agenda_al->getArticlesOfNode($dbconn,$EVENTSNODEID,1,1,0,999); $mon_agenda_al->getAllArticlesWithCat($dbconn,1,1,0,999); $count_mon_agenda_al=count($mon_agenda_al->list); if ($_year) $this_year=$_year; else $this_year=date("Y",STtime()); if ($_month) $this_month=$_month; else $this_month=date("n",STtime()); if ($_month*$_year>0) $this_day=1; else $this_day=date("j",STtime()); $this_date=mktime(0, 0, 0, $this_month, $this_day, $this_year); $month_days=date("t",$this_date); $_apo=mktime(0, 0, 0, date("n",STtime()), 1, date("Y",STtime())); $cnt=$_apo; $cnt_abs_add=31*24*3600; $cnt_abs_afer=5*24*3600; $the_year=date("Y",$cnt); $the_month=date("n",$cnt); $the_year_next=date("Y",$cnt+$cnt_abs_add); $the_month_next=date("n",$cnt+$cnt_abs_add); $the_year_prev=date("Y",$cnt-$cnt_abs_afer); $the_month_prev=date("n",$cnt-$cnt_abs_afer); $CALENDAR.="

".$cm->getName($sel)."

"; $tab0=""; $tab1=""; $tab2=""; $display0="none"; $display1="none"; $display2="none"; if ($evtab==1){ $tab1="on"; $display1="block"; } else if ($evtab==2){ $tab2="on"; $display2="block"; } else{ $tab0="on"; $display0="block"; } $CALENDAR.=''; $CALENDAR.="
"; $CALENDAR.="
".$the_month_prev."
".$the_year_prev."
".$the_month."
".$the_year."
".$the_month_next."
".$the_year_next."
"; $first_day_of_month=correct_day( date("w",mktime(0, 0, 0, $this_month, 1, $this_year)) ); $counter_day=1; $counter_day_after=1; $counter_day_before=date("t",mktime(0, 0, 0, $this_month, 1, $this_year)-5*24*3600)-$first_day_of_month+2; $counter_num=1; for ($k=1;$k<=6;$k++){ $CALENDAR.=""; for ($j=1;$j<=7;$j++){ if ($counter_num>=$first_day_of_month && $counter_day<=$month_days){ $CALENDAR.=""; $counter_day++; }else if ($counter_num>=$month_days) { $CALENDAR.=""; $counter_day_after++; }else { $CALENDAR.=""; $counter_day_before++; } $counter_num++; } $CALENDAR.=""; if ($counter_day>$month_days) $k=6; } $CALENDAR.="
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
"; $CALENDAR.="
"; for ($i=0;$i<$count_mon_agenda_al;$i++){ $loop_day_of_month=mktime(0, 0, 0, $this_month, $counter_day, $this_year); if ($mon_agenda_al->list[$i]->eventdate_from<=$loop_day_of_month && $mon_agenda_al->list[$i]->eventdate_to>=$loop_day_of_month){ if (strstr( $mon_agenda_al->list[$i]->flags,"G" ) ) $art_type="event_type1"; else if (strstr( $mon_agenda_al->list[$i]->flags,"B" ) ) $art_type="event_type2"; else if (strstr( $mon_agenda_al->list[$i]->flags,"O" ) )$art_type="event_type3"; else $art_type="event_type1"; if ($mon_agenda_al->list[$i]->subtitle!="") $art_link=$mon_agenda_al->list[$i]->subtitle; else if (strip_tags($mon_agenda_al->list[$i]->fulltxt)!="") $art_link=buildlink("a",$mon_agenda_al->list[$i]); else $art_link="#"; $CALENDAR.=""; } } $CALENDAR.="
"; $CALENDAR.="".$counter_day."
".$counter_day_after."
".$counter_day_before."
".$in_flags['B']."
".$in_flags['G']."
".$in_flags['O']."
"; $evmonth=new ArticleList(); $evmonth->by_status="3"; // only Published articles $evmonth->status_comp="="; $evmonth->full_info=true; $evmonth->only_active_today=true; // get non-expired articles $evmonth->event_active_the_month=$event_active_the_month; $evmonth->by_locale=$_SESSION["ses_locale"]; $evmonth->flags="E"; /*$children=$cm->util_FindAllChildren($path[1]->cat_id); $catstr=implode(",",$children); $evmonth->extra_sql=" AND (c.cat_id IN (".$catstr."))";*/ $evmonth->sort_order="a.eventdate_from"; $evmonth->sorting="DESC"; //$mon_agenda_al->getArticlesOfNode($dbconn,$EVENTSNODEID,1,1,0,999); $evmonth->getAllArticlesWithCat($dbconn,1,1,0,999); $CALENDAR.="
"; for ($k=0; $klist); $k++){ if (strstr( $evmonth->list[$k]->flags,"G" ) ) $art_type="event_type_list1"; else if (strstr( $evmonth->list[$k]->flags,"B" ) ) $art_type="event_type_list2"; else if (strstr( $evmonth->list[$k]->flags,"O" ) )$art_type="event_type_list3"; else $art_type="event_type_list1"; if ($k==0 || ($k>0 && date("m",$evmonth->list[$k]->eventdate_from)!=date("m",$evmonth->list[($k-1)]->eventdate_from))){ $CALENDAR.="

".date("F Y",$evmonth->list[$k]->eventdate_from)."

Date
Title
 
"; } $CALENDAR.="
".timestamp2date_new($evmonth->list[$k]->eventdate_from); if ($evmonth->list[$k]->eventdate_to>0) $CALENDAR.=" - ".timestamp2date_new($evmonth->list[$k]->eventdate_to); $CALENDAR.="
"; $CALENDAR.="
"; } $CALENDAR.="
".$in_flags['B']."
".$in_flags['G']."
".$in_flags['O']."
"; $evmonth=new ArticleList(); $evmonth->by_status="3"; // only Published articles $evmonth->status_comp="="; $evmonth->full_info=true; $evmonth->only_active_today=true; // get non-expired articles $evmonth->event_active_the_month=$event_active_the_month; $evmonth->by_locale=$_SESSION["ses_locale"]; $evmonth->flags="E"; /*$children=$cm->util_FindAllChildren($path[1]->cat_id); $catstr=implode(",",$children); $evmonth->extra_sql=" AND (c.cat_id IN (".$catstr."))";*/ $evmonth->sort_order="a.eventdate_from"; $evmonth->sorting="DESC"; //$mon_agenda_al->getArticlesOfNode($dbconn,$EVENTSNODEID,1,1,0,999); $evmonth->getAllArticlesWithCat($dbconn,1,1,0,999); $CALENDAR.="
"; for ($k=0; $klist); $k++){ if (strstr( $evmonth->list[$k]->flags,"G" ) ) $art_type="event_type_list1"; else if (strstr( $evmonth->list[$k]->flags,"B" ) ) $art_type="event_type_list2"; else if (strstr( $evmonth->list[$k]->flags,"O" ) )$art_type="event_type_list3"; else $art_type="event_type_list1"; if ($k==0 || ($k>0 && date("Y",$evmonth->list[$k]->eventdate_from)!=date("Y",$evmonth->list[($k-1)]->eventdate_from))){ $CALENDAR.="

".date("Y",$evmonth->list[$k]->eventdate_from)."

Date
Title
 
"; } $CALENDAR.="
".timestamp2date_new($evmonth->list[$k]->eventdate_from); if ($evmonth->list[$k]->eventdate_to>0) $CALENDAR.=" - ".timestamp2date_new($evmonth->list[$k]->eventdate_to); $CALENDAR.="
"; $CALENDAR.="
"; } $CALENDAR.="
".$in_flags['B']."
".$in_flags['G']."
".$in_flags['O']."
"; $CALENDAR.="
"; $PAGE=str_replace("[%CALENDAR%]",$CALENDAR,$PAGE); } // [%NEWSLIST_CONTENT%] $NEWSLIST_CONTENT=""; if(strstr($PAGE,"[%NEWSLIST_CONTENT%]")) { $artl=new ArticleList(); $artl->by_status="3"; // only Published articles $artl->status_comp="="; $artl->full_info=true; $artl->only_active_today=true; // get non-expired articles $artl->by_locale=$_SESSION["ses_locale"]; $artl->sort_order="a.createdate"; $artl->sorting="DESC"; $NEWSLIST_CONTENT1.="

".$cm->getName($sel)."

"; /*for ($j=3; $j>=1; $j--){ $NEWSLIST_CONTENT.="".$PHRASE_NEWS_TAB[$loc_iso][$j]."corner"; }*/ for ($j=3; $j>=1; $j--){ if ($j==1) $artl->flags="B"; else if ($j==2) $artl->flags="G"; else if ($j==3) $artl->flags="O"; $artl->getArticlesOfNode($dbconn,$sel,1,1,$start[$j]*$_SITE_PAGING,$_SITE_PAGING-1); if (count($artl->list)>0){ $NEWSLIST_CONTENT1.="getObject($sel))."&start".$j."=".$start[$j]."&newstab=".$j."\" title=\"".$j."|".$start[$j]."\" class=\"tab_button tab_button".$j.""; if ($j==$newstab) $NEWSLIST_CONTENT1.=" on"; $NEWSLIST_CONTENT1.="\">".$PHRASE_NEWS_TAB[$loc_iso][$j]."corner"; $NEWSLIST_CONTENT2.="
"; for ($i=0; $ilist); $i++){ $ml_news=new AttachmentList(); $ml_news->by_status="A"; $ml_news->by_locale=$_SESSION["ses_locale"]; $ml_news->getRelatedAtt($dbconn,$artl->list[$i]->art_id,$ATTYPE_MEDIA,1,1); $t_pages=get_totalpages($artl->totalrecords,$_SITE_PAGING); $title_len=strlen($artl->list[$i]->title); if ($title_len>100){ $this_title=cutatword($artl->list[$i]->title,100); $this_fulltxt=''; } else{ $this_title=$artl->list[$i]->title; $this_fulltxt=cutatword(strip_tags($artl->list[$i]->fulltxt),(140-$title_len)); } $NEWSLIST_CONTENT2.="
list)==0) $NEWSLIST_CONTENT2.=" noimage"; $NEWSLIST_CONTENT2.="\">"; if (count($ml_news->list)>0)$NEWSLIST_CONTENT2.="
list[0]->URI."\" width=\"159\" height=\"113\" alt=\"".$ml_news->list[0]->URI."\"/>
"; $NEWSLIST_CONTENT2.="

".$this_title."

"; if ($this_fulltxt!='')$NEWSLIST_CONTENT2.="

".$this_fulltxt."

"; if ($artl->list[$i]->eventdate_from>0 || $artl->list[$i]->eventdate_to>0){ $NEWSLIST_CONTENT2.=""; if (@date('n',$artl->list[$i]->eventdate_from)==@date('n',$artl->list[$i]->eventdate_to)) $NEWSLIST_CONTENT2.=@date('d',$artl->list[$i]->eventdate_from)." - ".timestamp2fulldate($artl->list[$i]->eventdate_to); else{ if ($artl->list[$i]->eventdate_from>0) $NEWSLIST_CONTENT2.=timestamp2fulldate($artl->list[$i]->eventdate_from); if ($artl->list[$i]->eventdate_to>0) $NEWSLIST_CONTENT2.=" - ".timestamp2fulldate($artl->list[$i]->eventdate_to); } $NEWSLIST_CONTENT2.=""; } $NEWSLIST_CONTENT2.="list[$i]->subtitle!="") $NEWSLIST_CONTENT2.=$artl->list[$i]->subtitle; else $NEWSLIST_CONTENT2.=buildlink("a",$artl->list[$i]); $NEWSLIST_CONTENT2.="\" class=\"link_more\">MORE
"; } ////////////////// PAGINATION ///////////////////////////////////////// $NEWSLIST_CONTENT2.="
"; if ($start[$j]>0) $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=".($start[$j]-1)."&newstab=".$j."\" class=\"prev\">".$PHRASE_NEWS_PREVIOUS[$loc_iso].""; else $NEWSLIST_CONTENT2.="
".$PHRASE_NEWS_PREVIOUS[$loc_iso]."
"; $NEWSLIST_CONTENT2.="
".$PHRASE_NEWS_PAGES[$loc_iso]." ".($start[$j]+1)." ".$PHRASE_NEWS_TO[$loc_iso]." ".$t_pages." "; if ($t_pages<=10){ for ($k=0; $k<$t_pages; $k++){ if ($k==$start[$j]) $NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=".$k."&newstab=".$j."\">"; $NEWSLIST_CONTENT2.=($k+1); if ($k<($t_pages-1)) $NEWSLIST_CONTENT2.="|"; if ($k==$start[$j]) $NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.=""; } } else{ if ($start[$j]==0)$NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=0&newstab=".$j."\">"; $NEWSLIST_CONTENT2.=1; if ($start[$j]==0)$NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.=""; $NEWSLIST_CONTENT2.="..."; if ($start[$j]>=4 && $start[$j]<=($t_pages-4)){ $st=$start[$j]-2; $telos=$start[$j]+2; } else if($start[$j]<4){ $st=1; $telos=5; } else{ $st=$t_pages-6; $telos=$t_pages-2; } for ($k=$st; $k<=$telos; $k++){ if ($k==$start[$j]) $NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=".$k."&newstab=".$j."\">"; $NEWSLIST_CONTENT2.=($k+1); if ($k<($telos-1)) $NEWSLIST_CONTENT2.="|"; if ($k==$start[$j]) $NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.=""; } $NEWSLIST_CONTENT2.="..."; if ($start[$j]==($t_pages-1))$NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=".($t_pages-1)."&newstab=".$j."\">"; $NEWSLIST_CONTENT2.=$t_pages; if ($start[$j]==($t_pages-1))$NEWSLIST_CONTENT2.=""; else $NEWSLIST_CONTENT2.=""; } $NEWSLIST_CONTENT2.="
"; if ($start[$j]<($t_pages-1)) $NEWSLIST_CONTENT2.="getObject($sel))."&start".$j."=".($start[$j]+1)."&newstab=".$j."\" class=\"next\">".$PHRASE_NEWS_NEXT[$loc_iso].""; else $NEWSLIST_CONTENT2.="
".$PHRASE_NEWS_NEXT[$loc_iso]."
"; $NEWSLIST_CONTENT2.="
"; /////////////////////////////////////////////////////////////////////////////////////// $NEWSLIST_CONTENT2.="
"; } } $NEWSLIST_CONTENT1.="
"; $NEWSLIST_CONTENT2.="
"; $NEWSLIST_CONTENT.=$NEWSLIST_CONTENT1.$NEWSLIST_CONTENT2; $PAGE=str_replace("[%NEWSLIST_CONTENT%]",$NEWSLIST_CONTENT,$PAGE); } // [%JELLY_TOPCONTENT%] $JELLY_TOPCONTENT=""; if(strstr($PAGE,"[%JELLY_TOPCONTENT%]")) { if ($sel==$JELLYFISHFORMNODEID) $JELLY_TOPCONTENT.="
"; else if ($sel==$JELLYFISHSHEETSNODEID) $JELLY_TOPCONTENT.="
"; else $JELLY_TOPCONTENT.="
"; $PAGE=str_replace("[%JELLY_TOPCONTENT%]",$JELLY_TOPCONTENT,$PAGE); } // [%JELLY_BANNERS%] $JELLY_BANNERS=""; if(strstr($PAGE,"[%JELLY_BANNERS%]")) { $banners=new ArticleList(); $banners->by_status="3"; // only Published articles $banners->status_comp="="; $banners->full_info=true; $banners->only_active_today=true; // get non-expired articles $banners->sort_order="a.art_order"; $banners->sorting="ASC"; $banners->getArticlesOfNode($dbconn,$JELLYFISHLOGONODEID,1,1,0,999); for ($i=0; $ilist); $i++){ $banml=new AttachmentList(); $banml->by_status="A"; $banml->by_locale=$_SESSION["ses_locale"]; $banml->getRelatedAtt($dbconn,$banners->list[$i]->inherit_rel?$banners->list[$i]->trans_id:$banners->list[$i]->art_id,$ATTYPE_MEDIA,1,1); $url="#"; if (trim($banners->list[$i]->shortdesc)!='') $url=trim($banners->list[$i]->shortdesc); $JELLY_BANNERS.="list[0]->URI."\" height=\"61\" alt=\"".$banners->list[$i]->title."\" />"; } $PAGE=str_replace("[%JELLY_BANNERS%]","",$PAGE); } // [%JELLY_CONTENT%] $JELLY_CONTENT=""; if(strstr($PAGE,"[%JELLY_CONTENT%]")) { if ($sel==$JELLYFISHFORMNODEID){ $JELLY_CONTENT.="

".$al->list[0]->title."

".$al->list[0]->fulltxt."

".$PHRASE_SPECIES[$loc_iso_j].":*

  • \"med\" ".$PHRASE_SPECIES[$loc_iso_j]."
"; $JELLY_CONTENT.="
"; for ($i=0; $ilist); $i++){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale_j"]; $ph->getRelatedAtt($dbconn,$jelly->list[$i]->inherit_rel?$jelly->list[$i]->trans_id:$jelly->list[$i]->art_id,$ATTYPE_MEDIA,1,1); $this_photo=$ph->list[0]->URI3; if (trim($ph->list[0]->URI3)=='') $this_photo=$ph->list[0]->URI2; $JELLY_CONTENT.="
\"med\"
list[$i]->art_id."\">".$jelly->list[$i]->title."
".$in_jelly_sting["".trim($jelly->list[$i]->flag).""]."
"; } $JELLY_CONTENT.="
\"med\"
".$PHRASE_UKNOWNSPECIES[$loc_iso]."
 
"; if (((count($jelly->list)+1)%2)!=0){ $JELLY_CONTENT.="
"; } $JELLY_CONTENT.="

".$PHRASE_RECLOC_TITLE[$loc_iso_j].": *

".$PHRASE_RECLOC_TXT[$loc_iso_j]."

".$PHRASE_RECTEXTAREA_SUB[$loc_iso_j]."
".$PHRASE_RECMAXSIZE[$loc_iso_j]." ".$PHRASE_RECYOURNAME_SUB[$loc_iso_j]." ".$PHRASE_RECEMAIL_SUB[$loc_iso_j]."*
"; } else if ($sel==$JELLYFISHHOMENODEID){ $JELLY_CONTENT.="

".$al->list[0]->title."

".$al->list[0]->fulltxt."

"; } else if ($sel==$JELLYFISHSHEETSNODEID){ $JELLY_CONTENT.="

".$al->list[0]->title."

".$al->list[0]->fulltxt."

".$in_jelly_sting[$loc_iso_j]['R']."
".$in_jelly_sting[$loc_iso_j]['T']."
"; for ($i=0; $ilist); $i++){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$jelly->list[$i]->inherit_rel?$jelly->list[$i]->trans_id:$jelly->list[$i]->art_id,$ATTYPE_MEDIA,1,1); if ($i==0 || ($i%3==0))$JELLY_CONTENT.="".$jellyinfo."
"; $jellyinfo=''; } } if (count($jelly->list)%3!=0){ $JELLY_CONTENT.="".$jellyinfo."
"; $jellyinfo=''; } $JELLY_CONTENT.="
"; } else { $JELLY_CONTENT.="

".$al->list[0]->title."

".$al->list[0]->fulltxt."

"; } $PAGE=str_replace("[%JELLY_CONTENT%]",$JELLY_CONTENT,$PAGE); } // [%TOP_JELLY_LOC%] $TOP_JELLY_LOC=""; if(strstr($PAGE,"[%TOP_JELLY_LOC%]")) { $loc_list=new LocaleList(); $loc_list->populate($dbconn); $TOP_JELLY_LOC.='
'; $banners=new ArticleList(); $banners->by_status="3"; // only Published articles $banners->status_comp="="; $banners->full_info=true; $banners->only_active_today=true; // get non-expired articles $banners->sort_order="a.art_order"; $banners->sorting="ASC"; $banners->getArticlesOfNode($dbconn,$JELLYFISHLOGONODEID,1,1,0,999); for ($i=0; $ilist); $i++){ if (in_array($loc_list->list[$i]->locale,array(1,3,4,5,10,13))) { $TOP_JELLY_LOC.='
getObject($sel),"","",$loc_list->list[$i]->iso).'">'.strtoupper($loc_list->list[$i]->iso).''; for ($j=0;$jlist);$j++){ if ( $banners->list[$j]->locale==$loc_list->list[$i]->locale ) { $banml=new AttachmentList(); $banml->by_status="A"; $banml->by_locale=$_SESSION["ses_locale"]; $banml->getRelatedAtt($dbconn,$banners->list[$j]->inherit_rel?$banners->list[$j]->trans_id:$banners->list[$j]->art_id,$ATTYPE_MEDIA,1,1); $url="#"; if (trim($banners->list[$j]->shortdesc)!='') $url=trim($banners->list[$j]->shortdesc); $TOP_JELLY_LOC.=""; } } $TOP_JELLY_LOC.="
"; } } $TOP_JELLY_LOC.='
'; $PAGE=str_replace("[%TOP_JELLY_LOC%]",$TOP_JELLY_LOC,$PAGE); } // [%JELLY_RIGHTMENU%] $JELLY_RIGHTMENU=""; if(strstr($PAGE,"[%JELLY_RIGHTMENU%]")) { $jarray=array(); for ($i=0; $i<5; $i++) $jarray=''; if ($sel==$JELLYFISHHOMENODEID) $jarray[0]="active"; else if ($sel==$JELLYFISHFORMNODEID) $jarray[1]="active"; else if ($sel==$JELLYFISHSHEETSNODEID) $jarray[2]="active"; else if ($sel==$JELLYFISHSTINGNODEID) $jarray[3]="active"; else $jarray[4]="active"; if ($sel==$JELLYFISHHOMENODEID){ $JELLY_RIGHTMENU.="".$PHRASE_FILTER_THEMAP[$loc_iso_j]."

".$PHRASE_JELLYTYPE[$loc_iso_j]."

  • \"med\" ".$PHRASE_SPECIES[$loc_iso_j]."
"; $JELLY_RIGHTMENU.="
"; for ($i=0; $ilist); $i++){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$jelly->list[$i]->inherit_rel?$jelly->list[$i]->trans_id:$jelly->list[$i]->art_id,$ATTYPE_MEDIA,1,1); $this_photo=$ph->list[0]->URI3; if (trim($ph->list[0]->URI3)=='') $this_photo=$ph->list[0]->URI2; $JELLY_RIGHTMENU.="
\"med\"
list[$i]->art_id."\">".$jelly->list[$i]->title."
".$in_jelly_sting["".trim($jelly->list[$i]->flag).""]."
"; } $JELLY_RIGHTMENU.="
\"med\"
".$PHRASE_UKNOWNSPECIES[$loc_iso_j]."
 
"; if (((count($jelly->list)+1)%2)!=0){ $JELLY_RIGHTMENU.="
"; } $JELLY_RIGHTMENU.="
list[0]->lat."&lng=".$defco->list[0]->lng."\">

".$PHRASE_DATE_OF_FINDINGS[$loc_iso_j]."

".$PHRASE_CANCEL[$loc_iso_j]." ".$PHRASE_FIND[$loc_iso_j]."
"; } $JELLY_RIGHTMENU.=""; $PAGE=str_replace("[%JELLY_RIGHTMENU%]",$JELLY_RIGHTMENU,$PAGE); } // [%SCHOOL_HOMECONTENT%] $SCHOOL_HOMECONTENT=""; if(strstr($PAGE,"[%SCHOOL_HOMECONTENT_TOP%]")) { $sub_menu=$cm_j->getSubNodes($MAINMENUSCHOOLNODEID,1); $SCHOOL_HOMECONTENT.='

'.$cm_j->getName($SCHOOLNODEID).'

'; $SCHOOL_HOMECONTENT.='
'.$locl->getName($_SESSION["ses_locale_j"]).'
'; if (isset($_SESSION["school_member"]) && $_SESSION["school_member"]>0){ $SCHOOL_HOMECONTENT.='

'.$PHRASE_SCHOOL_WELCOME[$loc_iso_j].': '.$sm->name.'

'.$PHRASE_SCHOOL_DISCONNECT[$loc_iso_j].'
'; } $SCHOOL_HOMECONTENT.='
    '; for ($i=0; $iby_status="3"; // only Published articles $hlp_list->status_comp="="; $hlp_list->full_info=false; $hlp_list->only_active_today=true; // get non-expired articles $hlp_list->by_locale=$_SESSION["ses_locale_j"]; $hlp_list->getArticlesOfNode($dbconn,$sub_menu[$i]->cat_id,1,1,0,0); $sub_sub_nemu=$cm_j->getSubNodes($sub_menu[$i]->cat_id,1); $SCHOOL_HOMECONTENT.='
  • cat_id || $cm->getParent($sel)==$sub_menu[$i]->cat_id || $cm->getParent($cm->getParent($sel))==$sub_menu[$i]->cat_id) $SCHOOL_HOMECONTENT.=' class="selected"'; $SCHOOL_HOMECONTENT.='>'.$sub_menu[$i]->name.'
  • '; if (count($sub_sub_nemu)>0 && $sub_menu[$i]->cat_id!=$STUDENTSEXHIBITIONSNODEID) { $SCHOOL_HOMECONTENT.='
      cat_id || $cm->getParent($sel)==$sub_menu[$i]->cat_id || $cm->getParent($cm->getParent($sel))==$sub_menu[$i]->cat_id) $SCHOOL_HOMECONTENT.=' style="display:block;"'; else $SCHOOL_HOMECONTENT.=' style="display:none;"'; $SCHOOL_HOMECONTENT.='>'; for ($j=0; $jcat_id==$sel || $cm->getParent($sel)==$sub_sub_nemu[$j]->cat_id)$SCHOOL_HOMECONTENT.=' class="selected_dashed"'; else $SCHOOL_HOMECONTENT.=' href="'.buildlink("c",$sub_sub_nemu[$j],"","",$loc_iso_j).'"'; $SCHOOL_HOMECONTENT.='>'.$sub_sub_nemu[$j]->name.''; } $SCHOOL_HOMECONTENT.='
    '; } } $SCHOOL_HOMECONTENT.='

'.$cm_j->getName($SEARCHSCHOOLNODEID).'

'.$PHRASE_SCHOOL_SEARCH_BTN[$loc_iso_j].'

'; $postit_class='post_it'; if (isset($_SESSION["school_member"]) && $_SESSION["school_member"]>0) $postit_class='seaquest_post_it'; else{ $postit_class='post_it'; $SCHOOL_HOMECONTENT.='

login

ok

'.$PHRASE_SCHOOL_FORGOT_USER_PASS[$loc_iso_j].'

'; } $SCHOOL_HOMECONTENT.='
'.$cm_j->getName($BESCHOOLMEMBERNODEID).'
'.$cm_j->getName($BESCHOOLFRIENDNODEID).'
'.$cm_j->getName($ASSESMENTNODEID).'
'; $PAGE=str_replace("[%SCHOOL_HOMECONTENT_TOP%]",$SCHOOL_HOMECONTENT,$PAGE); } // [%SCHOOL_HOMECONTENT_MIDDLE%] $SCHOOL_HOMECONTENT=""; if(strstr($PAGE,"[%SCHOOL_HOMECONTENT_MIDDLE%]")) { $SCHOOL_HOMECONTENT.='

'.$cm_j->getName($sel).'

'; if ($sel==$SEARCHSCHOOLNODEID){ if (count($al->list)>0) $SCHOOL_HOMECONTENT.=''; } else { $SCHOOL_HOMECONTENT.='

'.$al->list[0]->title.'

'.$al->list[0]->fulltxt.'

'; } $SCHOOL_HOMECONTENT.='

'.$cm_j->getName($NEWSSCHOOLNODEID).'

'; $news_s=new ArticleList(); $news_s->by_status="3"; // only Published articles $news_s->status_comp="="; $news_s->full_info=true; $news_s->only_active_today=true; // get non-expired articles $news_s->by_locale=$_SESSION["ses_locale_j"]; $news_s->sort_order="a.eventdate_from DESC, a.art_order"; $news_s->sorting="DESC"; $news_s->getArticlesOfNode($dbconn,$NEWSSCHOOLNODEID,1,1,0,1); if (count($news_s->list)>0){ $SCHOOL_HOMECONTENT.=''; } $SCHOOL_HOMECONTENT.='
'; $PAGE=str_replace("[%SCHOOL_HOMECONTENT_MIDDLE%]",$SCHOOL_HOMECONTENT,$PAGE); } // [%SCHOOL_MEMBER%] $SCHOOL_MEMBER=""; if(strstr($PAGE,"[%SCHOOL_MEMBER%]")) { $SCHOOL_MEMBER=' [%SCHOOL_ASSESMENTS_POPUP%]'; $PAGE=str_replace("[%SCHOOL_MEMBER%]",$SCHOOL_MEMBER,$PAGE); } // [%SCHOOL_EXLIST_CONTENT%] $SCHOOL_EXLIST_CONTENT=""; if(strstr($PAGE,"[%SCHOOL_EXLIST_CONTENT%]")) { $subs=$cm_j->getSubNodes($STUDENTSEXHIBITIONSNODEID,1); $SCHOOL_EXLIST_CONTENT.='

'.$PHRASE_SCHOLL_EX_ALL_TRANS[$loc_iso_j].'

'; for ($i=0; $iby_status="3"; // only Published articles $exal->status_comp="="; $exal->full_info=true; $exal->only_active_today=true; // get non-expired articles $exal->by_locale=$_SESSION["ses_locale_j"]; $exal->sort_order="a.eventdate_from DESC, a.art_order"; $exal->sorting="DESC"; $exal->getArticlesOfNode($dbconn,$subs[$i]->cat_id,1,1,0,1); $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$exal->list[0]->inherit_rel?$exal->list[0]->trans_id:$exal->list[0]->art_id,$ATTYPE_MEDIA,1,1); $SCHOOL_EXLIST_CONTENT.='list[0],"","",$loc_iso_j).'\';"> '; } $SCHOOL_EXLIST_CONTENT.='
'.$PHRASE_SCHOLL_EX_TRANS[$loc_iso_j].' '.$PHRASE_SCHOLL_EX_DATE[$loc_iso_j].' '.$PHRASE_SCHOLL_EX_ORGAN[$loc_iso_j].' '.$PHRASE_SCHOLL_EX_COUNTRY[$loc_iso_j].'

'.$subs[$i]->name.'

'.$exal->list[0]->subtitle.' '.$exal->list[0]->shortdesc.'
'; $PAGE=str_replace("[%SCHOOL_EXLIST_CONTENT%]",$SCHOOL_EXLIST_CONTENT,$PAGE); } // [%STUDENTSEX_CONTENT%] $STUDENTSEX_CONTENT=""; if(strstr($PAGE,"[%STUDENTSEX_CONTENT%]")) { $STUDENTSEX_CONTENT.='

'.$cm_j->getName($sel).' ('.$ar->subtitle.')

'; $subs=$cm_j->getSubNodes($sel,1); for ($i=0; $iby_status="3"; // only Published articles $exal->status_comp="="; $exal->full_info=true; $exal->only_active_today=true; // get non-expired articles $exal->by_locale=$_SESSION["ses_locale_j"]; $exal->sort_order="a.art_order"; $exal->sorting="DESC"; $exal->getArticlesOfNode($dbconn,$subs[$i]->cat_id,1,1,0,1); $sub_subs=$cm_j->getSubNodes($subs[$i]->cat_id,1); if (count($exal->list)>0 || count($sub_subs)>0){ $STUDENTSEX_CONTENT.='

'.small2capitaltext($subs[$i]->name).'

'; if ($i==0){ if (count($exal->list)>0){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$exal->list[0]->inherit_rel?$exal->list[0]->trans_id:$exal->list[0]->art_id,$ATTYPE_MEDIA,1,1); if (count($ph->list)>0){ $STUDENTSEX_CONTENT.='
'; for ($j=0; $jlist); $j++){ $STUDENTSEX_CONTENT.=''; } $STUDENTSEX_CONTENT.='
'; } $STUDENTSEX_CONTENT.='

'.$exal->list[0]->fulltxt.'

'; } if (count($sub_subs)>0 && $i==0){ for ($m=0; $mby_status="3"; // only Published articles $q->status_comp="="; $q->full_info=true; $q->only_active_today=true; // get non-expired articles $q->by_locale=$_SESSION["ses_locale_j"]; $q->sort_order="a.eventdate_from DESC, a.art_order"; $q->sorting="DESC"; $q->getArticlesOfNode($dbconn,$sub_subs[$m]->cat_id,1,1); if ($m==0){ $STUDENTSEX_CONTENT.='

'.$sub_subs[$m]->name.'

'; if (count($q->list)>0){ for ($j=0; $jlist); $j++){ $rel_art=new ArticleList(); $rel_art->by_status="3"; // only Published articles $rel_art->status_comp="="; $rel_art->full_info=true; $rel_art->only_active_today=true; // get non-expired articles $rel_art->sort_order="b.rel_order"; // $ral->getRelatedArticles($dbconn,$al->list[0]->art_id,1,1,"",STtime()); $rel_art->getRelatedArticles($dbconn,$q->list[$j]->art_id,1,1); $STUDENTSEX_CONTENT.='
'.$q->list[$j]->title.' '.$q->list[$j]->shortdesc.'

'.$q->list[$j]->fulltxt.'

'.$PHRASE_SCHOLL_EX_SHOWANSWER[$loc_iso_j].' '; for ($k=0; $klist); $k++){ $STUDENTSEX_CONTENT.=''; } $STUDENTSEX_CONTENT.='
'; } } $STUDENTSEX_CONTENT.='
'; } else if ($m==1){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$q->list[0]->inherit_rel?$q->list[0]->trans_id:$q->list[0]->art_id,$ATTYPE_MEDIA,1,1); $STUDENTSEX_CONTENT.='

'.$sub_subs[$m]->name.'

'; } } } } else if ($i==1){ $STUDENTSEX_CONTENT.='

'.$exal->list[0]->fulltxt.'

'; for ($m=0; $mby_status="3"; // only Published articles $day_al->status_comp="="; $day_al->full_info=true; $day_al->only_active_today=true; // get non-expired articles $day_al->by_locale=$_SESSION["ses_locale_j"]; $day_al->sort_order="a.art_order"; $day_al->sorting="DESC"; $day_al->getArticlesOfNode($dbconn,$sub_subs[$m]->cat_id,1,1); $STUDENTSEX_CONTENT.='
'.($m+1).'

'.$sub_subs[$m]->name.'

'; if ($m==0){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$day_al->list[0]->inherit_rel?$day_al->list[0]->trans_id:$day_al->list[0]->art_id,$ATTYPE_MEDIA,1,1); $STUDENTSEX_CONTENT.='
'; for ($j=0; $jlist); $j++){ $STUDENTSEX_CONTENT.=''; } $STUDENTSEX_CONTENT.='

'.$day_al->list[0]->fulltxt.'

'; } else if ($m==1 || $m==2){ if ($m==1){ $num=2; $gal=3; } else { $num=3; $gal=4; } for ($k=0; $klist); $k++){ //print_r($day_al->list[$k]); $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$day_al->list[$k]->inherit_rel?$day_al->list[$k]->trans_id:$day_al->list[$k]->art_id,$ATTYPE_MEDIA,1,1); if ($k==0 && $m==1){ if($day_al->list[$k]->flags == 'B'){ $STUDENTSEX_CONTENT.=getExCarousel($ph->list,$num,$gal,$loc_iso_j); }else{ $STUDENTSEX_CONTENT.='

'.$day_al->list[$k]->fulltxt.'

'; } } else if ($k==1){ $STUDENTSEX_CONTENT.=''.$day_al->list[$k]->title.'

'.$day_al->list[$k]->fulltxt.'

'; } else if ($k==2){ $STUDENTSEX_CONTENT.=getExCarousel($ph->list,$num,$gal,$loc_iso_j); } else{ $STUDENTSEX_CONTENT.=''.$day_al->list[$k]->title.'

'.$day_al->list[$k]->fulltxt.'

'; } } } else if ($m==3){ for ($k=0; $klist); $k++){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$day_al->list[$k]->inherit_rel?$day_al->list[$k]->trans_id:$day_al->list[$k]->art_id,$ATTYPE_MEDIA,1,1); if ($k==0 || $k==1){ $STUDENTSEX_CONTENT.=''.$day_al->list[$k]->title.'

'.$day_al->list[$k]->fulltxt.'

'; } else if ($k==2){ $STUDENTSEX_CONTENT.=getExCarousel($ph->list,4,5,$loc_iso_j); } else if ($k==3){ $STUDENTSEX_CONTENT.=getExCarousel($ph->list,5,6,$loc_iso_j); } } } $STUDENTSEX_CONTENT.="
"; } } else{ $day_al=new ArticleList(); $day_al->by_status="3"; // only Published articles $day_al->status_comp="="; $day_al->full_info=true; $day_al->only_active_today=true; // get non-expired articles $day_al->by_locale=$_SESSION["ses_locale_j"]; $day_al->sort_order="a.art_order"; $day_al->sorting="DESC"; $day_al->getArticlesOfNode($dbconn,$subs[$i]->cat_id,1,1); for ($k=0; $klist); $k++){ $ph=new AttachmentList(); $ph->by_status="A"; $ph->by_locale=$_SESSION["ses_locale"]; $ph->getRelatedAtt($dbconn,$day_al->list[$k]->inherit_rel?$day_al->list[$k]->trans_id:$day_al->list[$k]->art_id,$ATTYPE_MEDIA,1,1); if ($k<(count($day_al->list)-1)){ $STUDENTSEX_CONTENT.=''.$day_al->list[$k]->title.'

'.$day_al->list[$k]->fulltxt.'

'; } else { $STUDENTSEX_CONTENT.=getExCarousel($ph->list,6,7,$loc_iso_j,true); } } } $STUDENTSEX_CONTENT.="
"; } } $STUDENTSEX_CONTENT.="
"; $PAGE=str_replace("[%STUDENTSEX_CONTENT%]",$STUDENTSEX_CONTENT,$PAGE); } /* jrou code start*/ include_once('content_school.php'); include_once('content_toolbox.php'); if ($tempr->temp_id==109) include_once('content_home_new.php'); else $PAGE=str_replace("[%HOME_NEW_CSS%]","",$PAGE); /* jrou code end*/ // [%BODY_JELLY%] $BODY_JELLY=""; if(strstr($PAGE,"[%BODY_JELLY%]")) { if ($sel==$JELLYFISHFORMNODEID) $BODY_JELLY.=""; else $BODY_JELLY.=""; $PAGE=str_replace("[%BODY_JELLY%]",$BODY_JELLY,$PAGE); } // [%NODE_NAME%] $NODE_NAME=$cm->getName($sel); $PAGE=str_replace("[%NODE_NAME%]",$NODE_NAME,$PAGE); // [%NODE_ID%] $NODE_ID=$path[1]->cat_id; $PAGE=str_replace("[%NODE_ID%]",$NODE_ID,$PAGE); //[%CSS%] if ($loc_iso_j=='ar') { $CSS=''; }else{ $CSS=''; } $PAGE=str_replace("[%CSS%]",$CSS,$PAGE); //[%CANONICAL_URL%] $PAGE=str_replace("[%CANONICAL_URL%]",getCanonicalURL(),$PAGE); // [%BU%] $PAGE=str_replace("[%BU%]",$BASE_URL."site/",$PAGE); // [%JS_BU%] $JS_BU=" "; $PAGE=str_replace("[%JS_BU%]",$JS_BU,$PAGE); // fix words preg_match_all("/PHRASE_[A-Za-z0-9_]+/",$PAGE,$matches); $words=$matches[0]; foreach ($words as $word) { $PAGE=str_replace("[%@".$word."@%]",${$word}[$loc_iso],$PAGE); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// functions ////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function getSEOURL($s) { $arr=explode("/",$s); $l=count($arr); if($l>0) { if($arr[$l-1]=="index") return array("type"=>"c","seourl"=>$arr[$l-2]); else return array("type"=>"a","seourl"=>$arr[$l-1]); } return null; } function get_include_contents($filename) { global $al,$dbconn; if (is_file($filename)) { ob_start(); include $filename; $contents = ob_get_contents(); ob_end_clean(); return $contents; } return false; } //this is a recursive function !!! function includeTemplates($tempid,$array,$html){ global $dbconn; $ids = array(); $tags = array(); //search tags in html and add their ids in array $ids for($i = 0; $i < count($array); ++$i){ $tag2search = "[%#".$array[$i]->title."#%]"; if(strstr($html,$tag2search)!==FALSE){ $ids[count($ids)] = $array[$i]->temp_id; $tags[count($tags)] = $tag2search; } }//for //for each id get its html - replace it in the parent html and call function for($j = 0; $j < count($ids); ++$j){ $tempr=new TemplateDBRecord($dbconn); $tempr->temp_id=$ids[$j]; $tempr->get(); $html = str_replace($tags[$j],$tempr->html,$html); //call fuction $html=includeTemplates($ids[$j],$array,$html); }//for return $html; }//function function getXtraValue($extid,$xtype) { global $extras_array; for($i=0; $iext_id=$_extras_array[$num]["ext_id"]; $ext->get(); $xnames=unserialize($ext->name); return $xnames[$loc]; } function in_path($parr,$id) { $l=count($parr); $i=0; while($i<$l) if($parr[$i++]->cat_id==$id) return true; return false; } function getThumb($aid,$prefwidth=168) { global $dbconn,$ATTYPE_MEDIA,$IN_MEDIA_URL; /* if($aid>0){ $art=new ArticleDBRecord($dbconn); $art->art_id=$aid; $art->get(); }*/ $rml=new AttachmentList(); $rml->by_locale=$_SESSION["ses_locale"]; if($aid>0) $rml->getRelatedAtt($dbconn,$aid,$ATTYPE_MEDIA,1,1); // if($aid>0) $rml->getRelatedAtt($dbconn,$art->inherit_rel?$art->trans_id:$art->art_id,$ATTYPE_MEDIA,1,1); $img=""; for($ii=0; $iilist); $ii++) { if($rml->list[$ii]->URI2!="" && $prefwidth<=100 && $img=="") $img=decideSource($IN_MEDIA_URL,$rml->list[$ii]->URI2); //else if($rml->list[$ii]->URI3!="" && $prefwidth==106) $img=decideSource($IN_MEDIA_URL,$rml->list[$ii]->URI3); } if($img=="" && $rml->list[0]->URI!="") $img=decideSource($IN_MEDIA_URL,$rml->list[0]->URI); return $img; } function getRelatedImage($aid) { global $dbconn,$ATTYPE_MEDIA,$IN_MEDIA_URL; $rml=new AttachmentList(); $rml->by_locale=$_SESSION["ses_locale"]; if($aid>0) $rml->getRelatedAtt($dbconn,$aid,$ATTYPE_MEDIA,1,1); $img=""; for($ii=0; $iilist); $ii++) { if($rml->list[$ii]->URI!="" /*&& $rml->list[$ii]->width<400*/) $img=decideSource($IN_MEDIA_URL,$rml->list[$ii]->URI); } return $img; } function getRelatedAttachment($aid) { global $dbconn,$ATTYPE_MEDIA; $rml=new AttachmentList(); $rml->by_locale=$_SESSION["ses_locale"]; if($aid>0) $rml->getRelatedAtt($dbconn,$aid,$ATTYPE_MEDIA,1,1); return $rml->list[0]; } function getSummary($ar,$len=100) { return (strlen($ar->shortdesc)>=10)?cutatword(strip_tags($ar->shortdesc),$len):cutatword(strip_tags($ar->fulltxt),$len); } function getKeywordArray($artid) { global $dbconn; $rkl=new KeywordsList(); $rkl->ofArticle($dbconn,$artid); $total_relkey=count($rkl->list); $k=array(); for($j=0; $j<$total_relkey; $j++) $k[count($k)]=$rkl->list[$j]->keyword; return $k; } function fget_contents($f) { $fd = fopen ($f, "r"); $buffer=""; while (!feof ($fd)) { $buffer .= fgets($fd, 4096); } fclose ($fd); return $buffer; } function to_upper($str) { $keywords=array("α"=>"A","π"=>"Π","ά"=>"Α","β"=>"Β","γ"=>"Γ","δ"=>"Δ","ε"=>"Ε","έ"=>"Ε","ζ"=>"Ζ","η"=>"Η","ή"=>"Η","θ"=>"Θ","ι"=>"Ι","ί"=>"Ι","ϊ"=>"Ι","ΐ"=>"Ι","κ"=>"Κ","λ"=>"Λ","μ"=>"Μ","ν"=>"Ν","ξ"=>"Ξ","ο"=>"Ο","ό"=>"Ο","π"=>"Π","ρ"=>"Ρ","σ"=>"Σ","ς"=>"Σ","τ"=>"Τ","υ"=>"Υ","ύ"=>"Υ","ϋ"=>"Υ","ΰ"=>"Υ","φ"=>"Φ","χ"=>"Χ","ψ"=>"Ψ","ω"=>"Ω","ώ"=>"Ω", "α"=>"A","π"=>"Π","β"=>"Β","γ"=>"Γ","δ"=>"Δ","ε"=>"Ε","ζ"=>"Ζ","η"=>"Η","θ"=>"Θ","ι"=>"Ι","κ"=>"Κ","λ"=>"Λ","μ"=>"Μ","ν"=>"Ν","ξ"=>"Ξ","ο"=>"Ο","ρ"=>"Ρ","σ"=>"Σ","ς"=>"Σ","τ"=>"Τ","υ"=>"Y","φ"=>"Φ","χ"=>"Χ","ψ"=>"Ψ","ω"=>"Ω", "Α"=>"A","Β"=>"Β","Γ"=>"Γ","Δ"=>"Δ","Ε"=>"Ε","Ζ"=>"Ζ","Η"=>"Η","Θ"=>"Θ","Ι"=>"Ι","Κ"=>"Κ","Λ"=>"Λ","Μ"=>"Μ","Ν"=>"Ν","Ξ"=>"Ξ","Ο"=>"Ο","Ρ"=>"Ρ","Σ"=>"Σ","&Sigmaf;"=>"Σ","Τ"=>"Τ","Υ"=>"Y","Φ"=>"Φ","Χ"=>"Χ","Ψ"=>"Ψ","Ω"=>"Ω"); foreach($keywords as $k=>$v) $str=str_replace($k,$v,$str); $str=mb_strtoupper($str); return $str; } function clean1stcomma($str) { $ret=trim($str); if(substr($ret,0,1)==",") $ret=substr($ret,1); return $ret; } function decideCacheFilename() { global $artid,$sel; $ret=""; $_a=$artid; $_s=$sel; if($_a>0 && $_s>0) $ret="artid_".$_a."_sel_".$_s.".html"; else if($_a>0) $ret="artid_".$_a.".html"; else if($_s>0) $ret="sel_".$_s.".html"; return $ret; } function getCanonicalURL_old() { global $BASE_URL,$sel,$artid; $params=array(); if(isset($_REQUEST["query"])) $params["query"]=$_REQUEST["query"]; if(isset($_REQUEST["start"])) $params["start"]=$_REQUEST["start"]; if(isset($_REQUEST["slideshow"])) $params["slideshow"]=$_REQUEST["slideshow"]; if(isset($_REQUEST["trailer"])) $params["trailer"]=$_REQUEST["trailer"]; $ret=$BASE_URL."site/content.php?"; if($artid>0) $ret.="artid=".$artid; else $ret.="sel=".$sel; foreach($params as $n=>$v) $ret.="&".$n."=".$v; return $ret; } function getCanonicalURL() { global $BASE_URL,$sel,$artid,$al,$nr; if(isset($_REQUEST["query"])) $ret=$BASE_URL."site/content.php?query=".$_REQUEST["query"]; else { if($artid>0) { $ar=$al->list[0]; $ret=buildlink("a",$ar); } else { $ret=buildlink("c",$nr); } if(isset($_REQUEST["start"])) $ret.=",".$_REQUEST["start"]; } return $ret; } function print_tree($cid) { global $cm,$path,$sel,$locl,$MAINMENUNODEID; $ret=""; //$parent=$cm->getParent($cid); //if (($parent==1)||($cid==1)){ $subs=$cm->getSubNodes($cid,1); //} else { //$subs=$cm->getSubNodes($parent,1); //} $c=count($subs); if($c>0 && $cid!=$MAINMENUNODEID) $ret.="
    \n"; for($i=0; $i<$c; $i++) { //if(in_path($path,$subs[$i]->cat_id)) { if($subs[$i]->cat_id==$sel) $clas=" class=\"active selected\""; else $clas=" class=\"active\""; } else $clas=""; $ret.="getIso($_SESSION["ses_locale"]))."\">".$subs[$i]->name.""; $ret.=print_tree($subs[$i]->cat_id); $ret.="\n"; } if($c>0 && $cid!=$MAINMENUNODEID) $ret.="
\n"; return $ret; } function get_totalpages($total_recs,$arxeio_paging){ $total_pages=$total_recs/$arxeio_paging; $total_pages=($total_pages==intval($total_pages))?intval($total_pages):(intval($total_pages)+1); return $total_pages; } function print_cat_tree($sc,$selid,$param) { global $cm,$ret_cat,$ATTYPE_FILES,$dbconn; $t=$cm->getSubNodes($sc,$param); $ret_cat.="
    "; for($i=0; $i".$t[$i]->name.""; $t2=$cm->getSubNodes($t[$i]->cat_id,$param); if(count($t2)>0) { print_cat_tree($t[$i]->cat_id,$selid,$param); } else{ $art_spec=new ArticleList(); $art_spec->by_status="3"; // only Published articles $art_spec->status_comp="="; $art_spec->full_info=true; $art_spec->only_active_today=true; // get non-expired articles $art_spec->by_locale=$_SESSION["ses_locale"]; $art_spec->sort_order="a.art_order"; $art_spec->sorting="DESC"; $art_spec->getArticlesOfNode($dbconn,$t[$i]->cat_id,1,1,0,1); $prj_fl=new AttachmentList(); $prj_fl->by_status="A"; $prj_fl->by_locale=$_SESSION["ses_locale"]; $prj_fl->getRelatedAtt($dbconn,$art_spec->list[0]->art_id,$ATTYPE_FILES,1,1); $total_prj_fl=count($prj_fl->list); if ($total_prj_fl>0){ $ret_cat.=""; } } $ret_cat.=""; } $ret_cat.="
"; return $ret_cat; } function getExCarousel($ph,$num,$gal,$loc_j,$fwidth=false){ global $dbconn,$ATTYPE_MEDIA,$IN_MEDIA_URL,$PHRASE_SCHOLL_EX_PHOTOS,$PHRASE_SCHOLL_EX_FROM,$PHRASE_SCHOLL_EX_VIDEO,$PHRASE_SCHOLL_EX_PHOTOS_VIDEO; $ret=''; $hasEmbed=false; $hasImg=false; for ($i=0; $iembed)!=''){ $ret.=''; $from=$PHRASE_SCHOLL_EX_FROM[$loc_j]; $ftitle=$PHRASE_SCHOLL_EX_PHOTOS[$loc_j]; if ($hasEmbed && $hasImg)$ftitle=$PHRASE_SCHOLL_EX_PHOTOS_VIDEO[$loc_j]; else if ($hasImg)$ftitle=$PHRASE_SCHOLL_EX_PHOTOS[$loc_j]; else if ($hasEmbed)$ftitle=$PHRASE_SCHOLL_EX_VIDEO[$loc_j]; $ret1='