Source for file display.php
Documentation is available at display.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once('../workshop/'. SQL. '.inc.php');
* DisplayUrlAllCalendar()
* affichage de l'URL de détails d'un calendrier
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['calendar']['linkvalue'],'id'=> $workshop_id);
$content.= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['cal_all'], '2ATT'). '">'. $GLOBALS['lang']['workshop']['cal_all']. '</a>'. END_LINE;
* DisplayUrlInscription()
* affichage de l'URL d'inscription au groupe de travail
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['subscribe-workgroup']['linkvalue'],'id'=> $workshop_id);
$link_table2= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-prefs']['linkvalue']);
if (!isset ($_COOKIE['linea21'])) {
$content= '<div class="info">'. $GLOBALS['lang']['divers']['noauth']. ''. END_LINE;
$content.= '<br />'. $GLOBALS['lang']['divers']['creaauth']. ' : '. END_LINE;
$content.= '<a href="'. HrefMaker($link_table2). '" title="'. formatText($GLOBALS['lang']['divers']['auth'], '2ATT'). '" >'. $GLOBALS['lang']['divers']['auth']. '</a>'. END_LINE;
$content= '<div class="info">'. $GLOBALS['lang']['workshop']['noinscription']. ''. END_LINE;
$content.= '<br />'. $GLOBALS['lang']['workshop']['creainscription2']. ' : '. END_LINE;
$content.= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['creainscription'], '2ATT'). '" onclick="return window.confirm(\''. $GLOBALS['lang']['workshop']['creainscription3']. '\')" >'. $GLOBALS['lang']['workshop']['creainscription']. '</a></div>'. END_LINE;
* affichage URL pour accéder aux discussions
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['discussion']['linkvalue'],'id'=> $work_id, 'name' => $work_name);
$content= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['com_public'], '2ATT'). '" id="barre_discussion" >'. $GLOBALS['lang']['workshop']['com_public']. '</a>'. END_LINE;
* affichage URL pour accéder aux calendrier
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['calendar']['linkvalue'],'id'=> $work_id, 'name' => $work_name);
$content= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['cal_all'], '2ATT'). '" id="barre_calendar" >'. $GLOBALS['lang']['workshop']['cal_all']. '</a>'. END_LINE;
* DisplayUrlListerapport()
* affichage URL pour accéder aux rapports
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['report-all']['linkvalue'],'id'=> $work_id, 'name' => $work_name);
$content= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['barre_report'], '2ATT'). '" id="barre_report" >'. $GLOBALS['lang']['workshop']['barre_report']. '</a>'. END_LINE;
* DisplayUrlListeutilisateurs()
* affichage URL pour accéder aux utilisatuers
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-all']['linkvalue'],'id'=> $work_id, 'name' => $work_name);
$content= '<a href="'. HrefMaker($link_table). '" title="'. formatText($GLOBALS['lang']['workshop']['barre_user'], '2ATT'). '" id="barre_user" >'. $GLOBALS['lang']['workshop']['barre_user']. '</a>'. END_LINE;
* affichage de la liste de groupe de travail
* @param integer $id_filter
if ($filter== "") $filter= 'public';
$data= $GLOBALS['sql_object'] -> DBSelect(SQL_getWorkshopList($debut=- 1, $limite=- 1, $filter , $id_filter));
for($i= 0; $i< count($data); $i++ ) {
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'id'=> $data[$i]['workshop_id'],'name'=> $data[$i]['workshop_denomination']);
$link_table2= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'filter'=> $GLOBALS['filters'][LANGUAGE]['theme']['linkvalue'],'id'=> $data[$i]['sdtheme_id'], 'name'=> $data[$i]['sdtheme_name']);
$link_table3= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'filter'=> $GLOBALS['filters'][LANGUAGE]['level']['linkvalue'],'id'=> $data[$i]['workshop_level'], 'name'=> $data[$i]['level_name']);
$workshop_title= formatText($data[$i]['workshop_denomination'], '2HTML');
$workshop_sdtheme= formatText($data[$i]['sdtheme_name'], '2HTML');
$workshop_level= formatText($data[$i]['level_name'], '2HTML');
$content.= '<p>'. $workshop_resume. '</p>'. END_LINE;
$content.= '<p class="filter_info">'. $GLOBALS['lang']['divers']['level']. ' : <a href="'. HrefMaker($link_table3). '" title="'. formatText($workshop_level, '2ATT'). '" class="filter_info_level" >'. $workshop_level. '</a> '. END_LINE;
$content.= ' '. $GLOBALS['lang']['divers']['themeref']. ': <a href="'. HrefMaker($link_table2). '" title="'. formatText($workshop_sdtheme, '2ATT'). '" class="filter_info_theme">'. $workshop_sdtheme. '</a></p>'. END_LINE;
$content= '<p class="info">'. $GLOBALS['lang']['divers']['nodata']. '</p>';
* affichage du calendrier
for($i= 0; $i< count($data); $i++ ) {
$workcal_title= formatText($data[$i]['workcal_task'], '2HTML');
$workcal_resume= formatText($data[$i]['workcal_task_details'], '2HTML');
$workcal_author= formatText($data[$i]['user_login'], '2HTML');
$workcal_date_publi= formatText($data[$i]['workcal_task_date_display'], '2HTML');
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'],'id'=> $data[$i]['workcal_posted_by'], 'name'=> $data[$i]['workcal_task']);
$datetask= $data[$i]['workcal_task_date_display'];
$datetask2 = mktime (0, 0, 0, $mois, $jour, $annee);
if (($datetask2+ $inter)> $datenow){
$content.= '<div class="task_in_date"><p>'. $workcal_date_publi. '</p>';
$content.= '<a href="'. HrefMaker($link_table). '" title="'. formatText($workcal_author, '2ATT'). '">'. $workcal_author. '</a></div>';
$content.= '<div class="task_in"><h3>'. $workcal_title. '</h3>'. END_LINE;
$content.= '<div class="task_out_date"><p>'. $workcal_date_publi. '</p>';
$content.= '<a href="'. HrefMaker($link_table). '" title="'. formatText($workcal_author, '2ATT'). '">'. $workcal_author. '</a></div>';
$content.= '<div class="task_out"><h3>'. $workcal_title. '</h3>'. END_LINE;
$content.= '<p>'. $workcal_resume. '</p></div>'. END_LINE;
//$content.='<p></p>'.END_LINE;
$content.= '<p class="info">'. $GLOBALS['lang']['divers']['nodata']. '</p>';
* affichage du détail d'un groupe de travail
for($i= 0; $i< count($data); $i++ ) {
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'id'=> $workshop_id);
$link_table2= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'filter'=> $GLOBALS['filters'][LANGUAGE]['theme']['linkvalue'],'id'=> $data[$i]['sdtheme_id'], 'name'=> $data[$i]['sdtheme_name']);
$link_table3= array('rub'=> $GLOBALS['links'][LANGUAGE]['workgroup']['linkvalue'],'filter'=> $GLOBALS['filters'][LANGUAGE]['level']['linkvalue'],'id'=> $data[$i]['workshop_level'], 'name'=> $data[$i]['level_name']);
$workshop_title= formatText($data[$i]['workshop_denomination'], '2HTML');
$workshop_resume= formatText($data[$i]['workshop_resume'], '2HTML');
//$workshop_comment=formatText(cutText($data[$i]['workshop_comment'],150), '2HTML');
$workshop_sdtheme= formatText($data[$i]['sdtheme_name'], '2HTML');
$workshop_level= formatText($data[$i]['level_name'], '2HTML');
$content.= '<h1>'. $workshop_title. '</h1>'. END_LINE;
//$content.='<h2>'.$GLOBALS['lang']['workshop']['det'].'</h2>'.END_LINE;
$content.= '<p class="h1_comment_bg" id="workshop_det">'. $workshop_resume. '</p>'. END_LINE;
//$content.='<p>'.$workshop_comment.'</p>'.END_LINE;
$content.= '<p class="filter_info">'. $GLOBALS['lang']['divers']['scale']. ' : <a href="'. HrefMaker($link_table3). '" title="'. formatText($workshop_level, '2ATT'). '" class="filter_info_level" >'. $workshop_level. '</a> '. END_LINE;
$content.= ' '. $GLOBALS['lang']['divers']['themeref']. ' : <a href="'. HrefMaker($link_table2). '" title="'. formatText($workshop_sdtheme, '2ATT'). '" class="filter_info_theme" >'. $workshop_sdtheme. '</a></p> '. END_LINE;
//.$GLOBALS['lang']['divers']['sousthemeref'].':'.$workshop_theme.'</p>'.END_LINE;
$content.= '<p class="info">'. $GLOBALS['lang']['divers']['nodata']. '</p>';
* affichage des utilisateurs/organisateurs d'un groupe de travail
$content1= '<p>'. $GLOBALS['lang']['workshop']['organizer2']. ' :';
$content2= '<p>'. $GLOBALS['lang']['workshop']['user']. ' :';
for($i= 0; $i< count($data); $i++ ) {
$workcal_author= formatText($data[$i]['user_login'], '2HTML');
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'],'id'=> $data[$i]['jwu_user_id'], 'name'=> $data[$i]['user_login']);
if($data[$i]['jwu_user_right']<> "U") $content1.= ' <a href="'. HrefMaker($link_table). '" title="'. formatText($workcal_author, '2ATT'). '">'. $workcal_author. '</a> '. END_LINE;
else $content2.= ' <a href="'. HrefMaker($link_table). '" title="'. formatText($workcal_author, '2ATT'). '">'. $workcal_author. '</a> '. END_LINE;
$content= $content1. $content2;
$content.= '<p class="info">'. $GLOBALS['lang']['workshop']['no_user']. '</p>';
* affichage de la liste des rapports d'un groupe de travail
for($i= 0; $i< count($data); $i++ ) {
$link_table= array('rub'=> $GLOBALS['links'][LANGUAGE]['report']['linkvalue'],'id'=> $data[$i]['workrep_id'], 'name'=> $data[$i]['workrep_title']);
$workrep_title= formatText($data[$i]['workrep_title'], '2HTML');
$workrep_date_publi= formatText($data[$i]['workrep_published_date'], '2HTML');
$content.= '<h3><a href="'. HrefMaker($link_table). '" title="'. formatText($workrep_title, '2ATT'). '">'. $workrep_title. '</a></h3>'. END_LINE;
$content.= '<p>'. $workrep_resume. '</p>'. END_LINE;
$content.= '<p class="filter_info">'. $GLOBALS['lang']['workshop']['date_report']. ' : <span>'. $workrep_date_publi. '</span></p>'. END_LINE;
$content.= '<p class="info">'. $GLOBALS['lang']['workshop']['no_report']. '</p>';
* DisplayListDiscussion()
* affichage de la liste des discussions
$result_workcom_list= $GLOBALS['sql_object'] -> DBSelect(SQL_getWorkcomList($debut, SELECT_LIMIT, $workshop_id));
$bdd_nb_com= $result_nb_com[0]['num_rows'];
$table_link= array('rub' => $GLOBALS['links'][LANGUAGE]['discussion']['linkvalue'],'id' => $workshop_id);
echo $bdd_nb_com_display = "<p class=\"nb_sujet\">". $bdd_nb_com. " ". $GLOBALS['lang']['workshop']['nb_total_com']. "</p>\n";
echo "<h2>". $GLOBALS['lang']['workshop']['com']. "</h2>";
if($result_workcom_list!= 0) {
$content= "<table cellspacing=\"1\" cellpadding=\"3\" class=\"table_discussion\" summary=\"". $GLOBALS['lang']['workshop']['com']. "\">". END_LINE;
$content.= "<td>". $GLOBALS['lang']['divers']['statut']. "</td>". END_LINE;
$content.= "<td>". $GLOBALS['lang']['workshop']['com_subject']. "</td>". END_LINE;
$content.= "<td>". $GLOBALS['lang']['workshop']['com_author']. "</td>". END_LINE;
$content.= "<td>". $GLOBALS['lang']['workshop']['com_nb_rep']. "</td>". END_LINE;
$content.= "<td>". $GLOBALS['lang']['workshop']['com_date_last']. "</td>". END_LINE;
for($i= 0; $i< count($result_workcom_list); $i++ ) {
$result_workcom_det= $GLOBALS['sql_object'] -> DBSelect(SQL_getWorkcom_detList($result_workcom_list[$i]['workcom_id']));
$link_user= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'],'id'=> $result_workcom_list[$i]['workcom_user_id'], 'name' => $result_workcom_list[$i]['user_login']);
$link_det_com= array('rub'=> $GLOBALS['links'][LANGUAGE]['subject']['linkvalue'],'id'=> $result_workcom_list[$i]['workcom_id'], 'parentid' => $workshop_id, 'name' => $result_workcom_list[$i]['workcom_subject']);
$workcom_title= formatText(cutText($result_workcom_list[$i]['workcom_subject'], 70, 1), '2HTML');
$workcom_user= formatText(cutText($result_workcom_list[$i]['user_login'], 10, 1), '2HTML');
if ($result_workcom_list[$i]['workcom_statut']== 'C') {
$content.= "<td><img src=\"../gfx/" . THEME_PUBLIC. "/images/public/ico_lock_dis.gif\" alt=\"\" /></td>". END_LINE;
else $content.= "<td> </td>\n";
$content.= "<td style=\"width:50%\"><a href=\"". HrefMaker($link_det_com). "\" title=\"". formatText($workcom_title, '2ATT'). "\" class=\"table_title\">". $workcom_title. "</a></td>". END_LINE;
$content.= "<td><a href=\"". HrefMaker($link_user). "\" title=\"". formatText($workcom_user, '2ATT'). "\" class=\"table_auth\">". $workcom_user. "</a></td>". END_LINE;
if ($result_workcom_det[0]['nb_rep']== "") {
else $content.= "<td style=\"width:11%\">". $result_workcom_det[0]['nb_rep']. "</td>". END_LINE;
if ($result_workcom_det[0]['workcom_date_crea_display']== "") {
$content.= "<td>". $result_workcom_list[$i]['workcom_date_crea_display']. "</td>". END_LINE;
$content.= "<td>". $result_workcom_list[$i]['workcom_date_crea_display']. "</td>". END_LINE;
$content= '<p class="info">'. $GLOBALS['lang']['workshop']['no_com']. '</p>'. END_LINE;
* affichage d'une discussion
function DisplayOneDiscussion($workshop_id, $discussion_id, $debut, $type=- 1, $body, $title, $type_message= "") {
$dataroot= $GLOBALS['sql_object'] -> DBSelect(SQL_getOnetopicWorkcom($workshop_id, $discussion_id, $discussion_id));
$subject_statut= $dataroot[0]['workcom_statut'];
if ($subject_statut== "P" && $type_message == "add_message") $result_display= GetWriteCom($title, $body, $discussion_id, $workshop_id);
$data= $GLOBALS['sql_object'] -> DBSelect(SQL_getOnetopicWorkcom2($workshop_id, $discussion_id, $root= - 1, $debut, SELECT_LIMIT));
$bdd_nb_com= $result_nb_com[0]['nb_rep'];
$table_link= array('rub' => $GLOBALS['links'][LANGUAGE]['subject']['linkvalue'],'id' => $discussion_id, 'parentid' => $workshop_id, 'name' => $dataroot[0]['workcom_subject'] );
$subject_title= formatText($dataroot[0]['workcom_subject'], '2HTML');
$subject_body= formatText($dataroot[0]['workcom_body'], '2HTML');
echo "<p class=\"nb_sujet\">". $bdd_nb_com_display = $bdd_nb_com. " ". $GLOBALS['lang']['workshop']['nb_total_com_mes']. "</p>". END_LINE;
echo '<h2>'. $GLOBALS['lang']['workshop']['com_name']. ' : '. $subject_title. '</h2>'. END_LINE;
$link_user= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'],'id'=> $dataroot[0]['workcom_user_id'], 'name' => $dataroot[0]['user_login']);
$content.= '<div class="blocksujet">'. END_LINE;
$content.= '<p class="workshop_auth_sujet"><a href="'. HrefMaker($link_user). '" title="'. formatText($subject_user, '2ATT'). '">'. $subject_user. '</a> dit :</p>'. END_LINE;
$content.= '<h3>'. $subject_title. '</h3>'. END_LINE;
$content.= '<p>'. $subject_body. '</p>'. END_LINE;
$content.= '<p class="workshop_date_sujet">'. $GLOBALS['lang']['workshop']['com_date_publi']. ' : <span>'. $dataroot[0]['workcom_date_crea_display']. '</span></p>'. END_LINE;
for($i= 0; $i< count($data); $i++ ) {
$subject_title= formatText($data[$i]['workcom_subject'], '2HTML');
$subject_body= formatText($data[$i]['workcom_body'], '2HTML');
$link_user= array('rub'=> $GLOBALS['links'][LANGUAGE]['user-profile']['linkvalue'],'id'=> $data[$i]['workcom_user_id'], 'name'=> $data[$i]['user_login']);
$link_edit= array('rub'=> $GLOBALS['links'][LANGUAGE]['message']['linkvalue'],'parentid'=> $workshop_id, 'id'=> $data[$i]['workcom_id'], 'parentparentid'=> $discussion_id, 'name'=> $data[$i]['workcom_subject']);
if(isset ($_COOKIE['linea21']['id'])) {
if ($data[$i]['workcom_user_id']== $_COOKIE['linea21']['id']) {
$edit= '<a href="'. HrefMaker($link_edit). '" title="'. formatText($GLOBALS['lang']['workshop']['mod_com_mes'], '2ATT'). '">'. $GLOBALS['lang']['workshop']['mod_com_mes']. '</a>'. END_LINE;
$content.= '<div class="blocksujet">'. END_LINE;
$content.= '<p class="workshop_auth_sujet"><a href="'. HrefMaker($link_user). '" title="'. formatText($subject_user, '2ATT'). '">'. $subject_user. '</a> dit :</p>'. END_LINE;
$content.= '<h3>'. $subject_title. '</h3>'. END_LINE;
$content.= '<p>'. $subject_body. '</p>'. END_LINE;
$content.= ' <p class="workshop_date_sujet">'. $edit. ' '. $GLOBALS['lang']['workshop']['com_date_publi']. ' : <span>'. $data[$i]['workcom_date_crea_display']. '</span></p>'. END_LINE;
$content.= '<p class="info">'. $GLOBALS['lang']['workshop']['no_com_rep']. '</p>';
if ($subject_statut== "P") DisplayFormMessageAdd($workshop_id, $discussion_id, $body, $title,$result_display);
else echo $content= '<p class="info">'. $GLOBALS['lang']['workshop']['com_p_lock']. '</p>';
* affichage du message de confirmation de modification d'un message
$content= '<p class="confirm">'. $GLOBALS['lang']['workshop']['confirm_mod_com']. ' <br /><a href="'. $link. '" title="'. $GLOBALS['lang']['workshop']['com_p_back_mes']. '" >'. $GLOBALS['lang']['workshop']['com_p_back_mes']. '</a>'. END_LINE;
* affichage du message de confirmation d'ajout d'un message
$content= '<p class="confirm">'. $GLOBALS['lang']['workshop']['confirm_add_com']. '</p>'. END_LINE;
* DisplayFormMessageAdd()
* affichage du formulaire d'ajout d'un message
if ($body== ''&& $title== '') {
if ($result_display<> 1) {
echo "<p class=\"error\">". $result_display. "</p>";
* DisplayFormMessageMod()
* affichage du formulaire de modification d'un message
* @param integer $message_id
$subject_title= formatText($data[0]['workcom_subject'], '2FIELD');
$subject_body= formatText($data[0]['workcom_body'], '2FIELD');
echo GetFormMessageMod($workshop_id, $discussion_id, $message_id, $subject_body, $subject_title);
$result_display= GetModCom($title, $body, $message_id, $workshop_id, $discussion_id);
if ($result_display<> 1) {
echo "<p class=\"error\">". $result_display. "</p>";
$link= HrefMaker(array('rub'=> $GLOBALS['links'][LANGUAGE]['subject']['linkvalue'], 'id'=> $discussion_id, 'parentid'=> $workshop_id, 'name' => $data[0]['workcom_subject']));
* formulaire de modification d'un message
* @param integer $message_id
function GetFormMessageMod($workshop_id, $discussion_id, $message_id=- 1, $subject_body, $subject_title) {
$form= '<h2>'. $GLOBALS['lang']['workshop']['mod_com_mes']. '</h2>'. END_LINE;
$form.= '<form action="index.php" method="post">'. END_LINE;
$form.= '<label for="title">'. $GLOBALS['lang']['workshop']['com_subject']. ' : </label>'. END_LINE;
$form.= '<input type="text" maxlength="50" name="title" id="title" value="'. $subject_title. '" class="textfield" />'. END_LINE;
$form.= '<label for="body">'. $GLOBALS['lang']['workshop']['com_body']. ' : </label>'. END_LINE;
$form.= '<textarea id="body" name="body" rows="12" cols="20" class="textfield">'. $subject_body. '</textarea>'. END_LINE;
$form.= '<input type="hidden" value="'. $GLOBALS['links'][LANGUAGE]['message']['linkvalue']. '" name="rub" id="rub" />'. END_LINE;
$form.= '<input type="hidden" value="'. $workshop_id. '" name="parentid" id="parentid" />'. END_LINE;
$form.= '<input type="hidden" value="'. $message_id. '" name="id" id="id" />'. END_LINE;
$form.= '<input type="hidden" value="'. $discussion_id. '" name="parentparentid" id="parentparentid" />'. END_LINE;
$form.= '<br /><input type="image" src="../gfx/' . THEME_PUBLIC. '/images/public/' . LANGUAGE. '/button_valid.gif" value="'. $GLOBALS['lang']['btn']['valid']. '" name="valider" id="valider" />'. END_LINE;
* formulaire d'ajout d'un message
$form= '<h2>'. $GLOBALS['lang']['workshop']['add_com_mes']. '</h2>'. END_LINE;
$form.= '<form action="index.php" method="post">'. END_LINE;
$form.= '<label for="title">'. $GLOBALS['lang']['workshop']['com_subject']. ' : </label>'. END_LINE;
$form.= '<input type="text" maxlength="50" name="title" id="title" value="'. $title. '" class="textfield" />'. END_LINE;
$form.= '<label for="body">'. $GLOBALS['lang']['workshop']['com_body']. ' : </label>'. END_LINE;
$form.= '<textarea id="body" name="body" rows="12" cols="20" class="textfield">'. $body. '</textarea>'. END_LINE;
$form.= '<input type="hidden" value="'. $GLOBALS['links'][LANGUAGE]['subject']['linkvalue']. '" name="rub" id="rub" />'. END_LINE;
$form.= '<input type="hidden" value="'. $discussion_id. '" name="id" id="id" />'. END_LINE;
$form.= '<input type="hidden" value="'. $workshop_id. '" name="parentid" id="parentid" /><br />'. END_LINE;
$form.= '<input type="hidden" value="add_message" name="type_message" id="type_message" />'. END_LINE;
$form.= '<input type="image" src="../gfx/' . THEME_PUBLIC. '/images/public/'. LANGUAGE. '/button_valid.gif" alt="'. $GLOBALS['lang']['btn']['valid']. '" value="'. $GLOBALS['lang']['btn']['valid']. '" name="valider" id="valider" />'. END_LINE;
* Vérification de l'intégrité des données
* @param $workshop_com_object
if (strlen($title) < 3) $integrity= $GLOBALS['lang']['workshop']['com_no_subject'];
if (strlen($body) < 3) $integrity= $GLOBALS['lang']['workshop']['com_no_body'];
* Ajout dans la base d'un nouveau message
function GetWriteCom($title, $body, $discussion_id, $workshop_id){
if(isset ($_COOKIE['linea21']['id'])) {
$user_id= $_COOKIE['linea21']['id'];
include_once('../class/class.workshop_com.php');
$table[2] = $discussion_id;
$table[4] = $workshop_id;
$result= $workshop_com_object->AddCom($table , $GLOBALS['sql_object']);
} else return "<p class=\"error\">". $GLOBALS['lang']['divers']['errorauth']. "</p>";
* Modification dans la base d'un message
function GetModCom($title, $body, $mes_id, $workshop_id, $discussion_id){
if(isset ($_COOKIE['linea21']['id'])) {
$user_id= $_COOKIE['linea21']['id'];
include_once('../class/class.workshop_com.php');
$result= $workshop_com_object->ModifyComUser($mes_id, $table , $user_id, $GLOBALS['sql_object']);
} else return "<p class=\"error\">". $GLOBALS['lang']['divers']['errorauth']. "</p>";
* DisplayConfirmInscription()
* affichage de la confirmation d'inscription
$content= '<p class="confirm">'. $GLOBALS['lang']['workshop']['confirm_inscription']. ' <a href="'. $link. '" title="'. $GLOBALS['lang']['workshop']['com_p_back_com']. '" >'. $GLOBALS['lang']['workshop']['com_p_back_com']. '</a>'. END_LINE;
* inscription d'un utilisateur au groupe de travail + affichage du résultat
if(isset ($_COOKIE['linea21']['login'])) {
$login= $_COOKIE['linea21']['login'];
include_once('../class/class.workshop.php');
$result= $workshop_object->AddUserWorkshop($workshop_id, $login , "U", $GLOBALS['sql_object']);
$link= HrefMaker(array('rub'=> $GLOBALS['links'][LANGUAGE]['discussion']['linkvalue'], 'id'=> $workshop_id));
} else echo "<p class=\"error\">". $GLOBALS['lang']['divers']['errorauth']. "</p>";
|