RetrieveBy("numero", ElementType::AsInteger, $issuenumber) == false) { echo "error issue"; } $articletype = new ArticleType(); if($articletype->RetrieveBy("nome", ElementType::AsString, "Copertina") == false) { echo "error articletype"; } $articlestatus = new ArticleStatus(); if($articlestatus->RetrieveBy("label", ElementType::AsString, "ok") == false) { echo "error articlestatus"; } $issueid = $issue->Get("id"); $articletypeid = $articletype->Get("id"); $articlestatusid = $articlestatus->Get("id"); $table = new Table('tb_articolo'); $table->SetCondition('id_numero', $issueid, ElementType::AsInteger); $table->SetCondition('tipo', $articletypeid, ElementType::AsInteger); $table->SetCondition('stato', $articlestatusid, ElementType::AsInteger); $table->SetOrder('pos'); $table->Select('id'); $table->Get('id', $coverid, 0); $cover = new Article(); if($cover->Retrieve($coverid) == false) { echo "error cover"; } $pdfname = $issue->Get("number")."_larivistadiengramma.pdf"; $pdfpath = EOS_BOOKSTORE_BASEPATH.$pdfname; $pdfurl = EOS_BOOKSTORE_BASEURL.$pdfname; $pdflink = ""; if(file_exists($pdfpath)) $pdflink = "
"; ?> Get("text"); } else { ?>