Source for file mod.php
Documentation is available at mod.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
<script type="text/javascript">
$(document).ready( function()
// Autocomplete initialization
var t = new $.TextboxList('#workshop_organizer', {unique: true, plugins: {autocomplete: {onlyFromValues: true}}});
$.ajax({url: '../workshop/_ajax_user_autocomplete.php?type=O', dataType: 'json', success: function(r){
t.plugins['autocomplete'].setValues(r);
include_once("../lib/input_helpers.php");
if(isset ($_POST['id'])) $id= $_POST['id'];
if(isset ($_GET['id'])) $id= $_GET['id'];
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
//////////// Check Droits utilisateur ////////////
$result= $sql_object->DBSelect($req_det);
$result_user = $sql_object -> DBSelect($req_user);
//$result_user=$workshop_object->GetWorkshopUserList($id, $sql_object);
for($i= 0; $i< count($result_user); $i++ ) {
if ($result_user[$i]['jwu_user_right']== 'O') {
if ($j<> 1) $form_organizer.= ', ';
$form_organizer.= $result_user[$i]['user_login'];
if ($result[0]['workshop_denomination']<> "") {
$workshop_denomination= $result[0]['workshop_denomination'];
$form_denomination= formatText($result[0]['workshop_denomination']);
else $form_denomination= "";
if ($result[0]['workshop_resume']<> "") $form_resume= formatText($result[0]['workshop_resume']);
if ($result[0]['workshop_comment']<> "") $form_comment= formatText($result[0]['workshop_comment']);
$form_theme= $result[0]['workshop_theme'];
$form_level= $result[0]['workshop_level'];
if($result[0]['workshop_statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($result[0]['workshop_statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
if(isset ($_POST['enregistrer'])) {
$result= $workshop_object->ModifyWorkshop($id, $data_table, $sql_object);
$result= $workshop_object->StateWorkshop($id, $data_table[5], $sql_object);
$result= $workshop_object->ModifyOrganizerWorkshop($id, $data_table[6], $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $id;
header("Location: ". $link_confirm);
if(isset ($_POST['valider'])) {
$table[0]= $_POST['workshop_denomination'];
$table[1]= $_POST['workshop_resume'];
$table[2]= $_POST['workshop_theme'];
$table[3]= $_POST['workshop_comment'];
$table[4]= $_POST['workshop_level'];
$table[5]= $_POST['workshop_statut'];
$table[6]= $_POST['workshop_organizer'];
$integrity= $workshop_object->CheckDataIntegrity($table, $sql_object);
$form_denomination= formatText($_POST['workshop_denomination'], $text_format);
$form_resume= formatText($_POST['workshop_resume'], $text_format);
$form_theme= $_POST['workshop_theme'];
$form_level= $_POST['workshop_level'];
$form_comment= formatText($_POST['workshop_comment'], $text_format);
if($_POST['workshop_statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($_POST['workshop_statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
if(!isset ($integrity) || is_string($integrity)) {
$data= $sql_object->DBSelect($req_list_theme);
// select-box des niveaux
$data= $sql_object->DBSelect($req_list_level);
include_once(THEME_ADMIN_PATH. "quickicons.php");
$navtitle= _t('workshop','mod'). " : ". $workshop_denomination;
<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home') ?></a></li>
<li><a href=" <?php echo $rub_link; ?>" id="chemin_ <?php echo $rub; ?>" class="chemin_rub"> <?php echo _t('menu','workshop')?></a></li>
<li><span> <?php echo formatnavTitle($navtitle); ?></span></li>
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<h2> <?php echo formatTitleh2(_t('workshop','name'). " : ". $workshop_denomination); ?></h2>
<form id="addworkshop" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="workshop_denomination"> <?php echo _t('workshop','title'); ?> * : </label>
<input name="workshop_denomination" type="text" class="textfield" id="workshop_denomination" maxlength="255" value=" <?php echo $form_denomination; ?>" />
<label for="workshop_resume"> <?php echo _t('workshop','resume'); ?> * : </label>
<textarea id="workshop_resume" name="workshop_resume" <?php echo AREA_SETTINGS; ?> class="largetextfield"> <?php echo $form_resume; ?></textarea>
<label for="workshop_theme"> <?php echo _t('workshop','theme'); ?> * : </label>
<?php echo $select_theme; ?>
<label for="workshop_level"> <?php echo _t('workshop','level'); ?> : </label>
<?php echo $select_level; ?></p>
<label for="workshop_organizer"> <?php echo _t('workshop','organizer'); ?> * : </label>
<input name="workshop_organizer" type="text" class="textfield" id="workshop_organizer" maxlength="150" value=" <?php echo $form_organizer; ?>" />
<div class="label"> <?php echo _t('workshop','statut'); ?> * : </div>
<input name="workshop_statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P; ?> />
<label for="statut_P"> <?php echo _t('statut','public'); ?></label>
<input name="workshop_statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D; ?> />
<label for="statut_D"> <?php echo _t('statut','draft'); ?></label>
<label for="workshop_comment"> <?php echo _t('workshop','comment'); ?> : </label>
<textarea id="workshop_comment" name="workshop_comment" <?php echo AREA_SETTINGS; ?> class="largetextfield"> <?php echo $form_comment; ?></textarea>
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<?php echo cancel_button($rub_link. "&todo=det&id=". $id); ?>
<input name="id" type="hidden" value=" <?php echo $id; ?>" id="id_workshop" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="valider" type="submit" value=" <?php echo _t('btn','valid') ?>" class="button" id="valider" />
<?php include_once($dir. "/help.php"); ?></div>
$result= $sql_object->DBSelect($requete);
if($result== 0 || count($result)!= 1) exit;
else $theme_denomination= formatText($result[0]['theme_name'], '2HTML');
$result= $sql_object->DBSelect($requete);
if($result== 0 || count($result)!= 1) exit;
else $level_denomination= formatText($result[0]['level_name'], '2HTML');
} else $level_denomination= _t('divers','none');
$display_form_resume= empty_nc($form_resume);
$display_form_comment= empty_nc($form_comment);
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<div id="content"> <?php afflinkbar($todo,$id, $lang); ?>
<h2> <?php echo _t('recap','title') ?></h2>
echo "<dl class=\"dl3\">\n";
echo "<dt>". _t('workshop','title'). "</dt>\n";
echo "<dd>". $form_denomination. "</dd>\n";
echo "<dt>". _t('workshop','resume'). "</dt>\n";
echo "<dd>". $display_form_resume. "</dd>\n";
echo "<dt>". _t('workshop','theme'). " :</dt>\n";
echo "<dd>". $theme_denomination. "</dd>\n";
echo "<dt>". _t('workshop','level'). " :</dt>\n";
echo "<dd>". $level_denomination. "</dd>\n";
echo "<dt>". _t('workshop','organizer'). " :</dt>\n";
echo "<dd>". $form_organizer. "</dd>\n";
echo "<dt>". _t('divers','statut') . "</dt>\n";
echo "<dt>". _t('workshop','comment') . "</dt>\n";
echo "<dd>". $display_form_comment. "</dd>\n";
<form id="addworkshop" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>"
<div><input name="rub" type="hidden" value=" <?php echo $rub; ?>"
id="rub" /> <input name="todo" type="hidden"
value=" <?php echo $todo; ?>" id="todo" /> <?php echo cancel_button($rub_link. "&todo=det&id=". $id); ?>
<input name="data_table" type="hidden" value=" <?php echo $table; ?>"
id="data_table" /> <input name="id" type="hidden"
value=" <?php echo $id; ?>" id="id_workshop" /> <input name="retour"
type="button" value=" <?php echo _t('btn','preview') ?>" class="button"
id="retour" onclick="history.go(-1);" /> <input name="enregistrer"
type="submit" value=" <?php echo _t('btn','save') ?>" class="button"
<?php include_once($dir. "/help.php"); ?></div>
|