* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html * 'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('workshop')) ReloadIndex('admin'); //////////// if(isset($_POST['id'])) $id=$_POST['id']; if(isset($_GET['id'])) $id=$_GET['id']; $req_det= SQL_getoneCompleteWorkshopRep($id); $result=$sql_object->DBSelect($req_det); // Do record exists? if(!isset($result[0]['workrep_title'])) redirect_to('@module_default'); $workrep_title=formatText($result[0]['workrep_title'], '2HTML'); $workrep_resume=formatText($result[0]['workrep_resume'], '2HTML'); $workrep_comment=formatText(empty_none($result[0]['workrep_comment']), '2HTML'); $workrep_statut=display_statut($result[0]['workrep_statut']); $display_date_crea=$result[0]['workrep_date_crea_display']; $display_last_modify=$result[0]['workrep_last_modify_display']; if (formatDate($result[0]['workrep_published_date_display'], true) == formatDate('0001-01-01', true)) $display_published_date=_t('workshoprep','not_published'); else $display_published_date=$result[0]['workrep_published_date_display']; $workrep_workshop_name=formatText($result[0]['workshop_denomination'], '2HTML'); $workshop_title=$workrep_workshop_name; $work_id=$result[0]['workrep_workshop_id']; ($result[0]['workrep_visible'] == 1) ? $display_form_visible = _t('divers', 'yes') : $display_form_visible = _t('divers', 'no'); $link_sup=$rub_link."&todo=sup&id="; $link_mod=$rub_link."&todo=mod&id="; // formattage des données include_once('../class/class.resources.php'); $resources_object = new resources; //prepa affichage des infos générales $reca_generals ="

"._t('workshoprep','generals')." :

\n"; $reca_generals.="
\n"; $reca_generals.="
".mb_ucfirst(_t('workshoprep','title'))." :
\n"; $reca_generals.="
". $workrep_title."
\n"; $reca_generals.="
". mb_ucfirst(_t('workshoprep','resume')). " :
\n"; $reca_generals.="
".$workrep_resume."
\n"; $reca_generals.="
". mb_ucfirst(_t('workshoprep','visible')) ." :
\n"; $reca_generals.="
". $display_form_visible. "
\n"; $reca_generals.="
".mb_ucfirst(_t('workshoprep','workshop_product')). " :
\n"; $reca_generals.="
".$workrep_workshop_name."
\n"; $reca_generals.="
".mb_ucfirst(_t('workshoprep','published_on')) ." :
\n"; $reca_generals.="
".$display_published_date. "
\n"; $reca_generals.="
".mb_ucfirst(_t('divers','date_crea')) ." :
\n"; $reca_generals.="
". $display_date_crea. "
\n"; $reca_generals.="
".mb_ucfirst(_t('divers','last_modify')) ." :
\n"; $reca_generals.="
". $display_last_modify. "
\n"; $reca_generals.="
".mb_ucfirst(_t('divers','statut'))." :
\n"; $reca_generals.="
". $workrep_statut. "
\n"; $reca_generals.="
".mb_ucfirst(_t('workshoprep','comment'))." :
\n"; $reca_generals.="
". $workrep_comment. "
\n"; $reca_generals.="
\n"; //prepa affichage des différentes parties du dossier $part_link_add="?rub=contents&todo=add&parent=".$id."&type=W"; $part_link_sup="?rub=contents&todo=sup&parent=".$id."&type=W&id="; $part_link_mod="?rub=contents&todo=mod&parent=".$id."&type=W&id="; $part_link_det="?rub=contents&todo=det&parent=".$id."&type=W&id="; $req_parts=SQL_getWorkshopParts($id); $result=$sql_object->DBSelect($req_parts); if($result==0) $contents_parts="
"._t('workshoprep','no_part')."
"; else { $contents_parts ="\n"; $contents_parts.="\n"; for($i=0; $i\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $contents_parts.="\n"; } else { $contents_parts.="\n"; } $contents_parts.="\n"; $contents_parts.="\n"; } $contents_parts.="\n"; $contents_parts.="
".formatText($result[$i]['workrepcon_title'], '2HTML')."".formatText($result[$i]['workrepcon_title'], '2HTML')."\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $contents_parts.="
\n"; $contents_parts.="\t" . _t('workshoprep','del_part') . "\n"; $contents_parts.="\t" . _t('workshoprep','mod_part') . "\n"; $contents_parts.="
\n"; } $contents_parts.="
\n"; } $reca_parts ="
\n"; $reca_parts.="
\n"; $reca_parts.=""._t('workshoprep','parts')."\n"; $reca_parts.="
\n"; $reca_parts.="
\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $reca_parts.="\t". _t('workshoprep','add_new_part')."
\n"; } $reca_parts.=$contents_parts; $reca_parts.="
\n"; $reca_parts.="
\n"; //prepa affichage des ressources LINK associées $link_res_add="?rub=resources&todo=add_l&parent=".$id."&type=W"; $link_res_sup="?rub=resources&todo=sup&parent=".$id."&type=W&res=link&id="; $link_res_mod="?rub=resources&todo=mod_l&parent=".$id."&type=W&res=link&id="; $result=SQL_GetResources($id, 'WORKSHOP', 'LINK', $sql_object); if($result==0) { $contents_link="
"._t('workshoprep','no_link')."
"; } else { $contents_link ="\n"; $contents_link.="\n"; for($i=0; $i\n"; $contents_link.="\n"; $contents_link.="\n"; $contents_link.="\n"; } $contents_link.="\n"; $contents_link.="
".formatText($result[$i]['linkres_mask'], '2HTML')."\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $contents_link.="
\n"; $contents_link.="\t" . _t('workshoprep','del_link') . "\n"; $contents_link.="\t" . _t('workshoprep','mod_link') . "\n"; $contents_link.="
\n"; } $contents_link.="
\n"; } $reca_link=''; $reca_link.="
\n"; $reca_link.=""._t('workshoprep','link_res')."\n"; $reca_link.="
\n"; $reca_link.="
\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $reca_link.="\t". _t('workshoprep','add_new_linkres')."
\n"; } $reca_link.=$contents_link; $reca_link.="
\n"; $reca_link.="
\n"; //prepa affichage des ressources biblio associés $biblio_res_add="?rub=resources&todo=add_b&parent=".$id."&type=W"; $biblio_res_sup="?rub=resources&todo=sup&parent=".$id."&type=W&res=biblio&id="; $biblio_res_mod="?rub=resources&todo=mod_b&parent=".$id."&type=W&id="; $result=SQL_GetResources($id, 'WORKSHOP', 'BIBLIO', $sql_object); if($result==0) { $contents_biblio="
"._t('workshoprep','no_biblio')."
"; } else { $contents_biblio ="\n"; $contents_biblio.="\n"; for($i=0; $i\n"; $contents_biblio.="\n"; $contents_biblio.="\n"; $contents_biblio.="\n"; } $contents_biblio.="\n"; $contents_biblio.="
\n"; $contents_biblio.="".formatText($result[$i]['bibliores_author'], '2HTML')." - ".formatText($result[$i]['bibliores_title'], '2HTML').",\n"; $contents_biblio.="

".$subtitle.$editor.$biblio_date."

\n"; $contents_biblio.="
\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $contents_biblio.="
\n"; $contents_biblio.="\t" . _t('workshoprep','del_biblio') . "\n"; $contents_biblio.="\t" . _t('workshoprep','mod_biblio') . "\n"; $contents_biblio.="
\n"; } $contents_biblio.="
\n"; } $reca_biblio=''; $reca_biblio.="
\n"; $reca_biblio.=""._t('workshoprep','biblio_res')."\n"; $reca_biblio.="
\n"; $reca_biblio.="
\n"; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { $reca_biblio.="\t". _t('workshoprep','add_new_bibliores')."
\n"; } $reca_biblio.=$contents_biblio; $reca_biblio.="
\n"; $reca_biblio.="
\n"; $rub_link="index.php?rub=workshop"; ?>
".formatTitleh2($workrep_title)."\n"; echo '
'.$workshop_title.'
'; if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { echo "\t" . _t('workshoprep','sup') . "\n"; echo "\t" . _t('workshoprep','mod') . "\n"; } echo $reca_generals; echo $reca_parts; echo $reca_link; echo $reca_biblio; // Ability to drag'n drop items if($l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $work_id) || $l21auth->isSuperAdmin()) { footerAddJS('../lib/js/TableDnD/dist/jquery.tablednd.1.0.5.min.js'); dragTableSettings(); } ?>