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  
//////////// Check Inclusion de pages ////////////  
    include_once("../lib/lib_common.php");  
if (isset ($_GET['id']))    $id= $_GET['id'];  
if (isset ($_POST['id'])) $id= $_POST['id'];  
if(isset ($_POST['enregistrer'])) {  
    $result= $newsletter_object->ModifyNewsletter($id, $data_table, $sql_object);      
    $link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo;  
    if($result) header("Location: ". $link_confirm);  
// Titre de la newsletter en cours de modification  
$result= $sql_object->DBSelect($requete);  
if($result== 0 ||  count($result)!= 1) exit;  
else $news_current_title= formatText($result[0]['newsletter_title'],'2HTML');  
// Obtention des données  de la BDD  
$req_det=  SQL_getoneCompleteNewsletter($id);  
$result= $sql_object->DBSelect($req_det);  
if($result== 0 ||  count($result)!= 1) exit;  
$form_title= formatText($result[0]['newsletter_title'], '2FIELD');  
$form_body= formatText($result[0]['newsletter_body'], '2FIELD');  
$form_statut= $result[0]['newsletter_statut'];  
$news_owner =  $result[0]['newsletter_posted_by'];  
//////////// Check Droits utilisateur + statut newsletter courante ////////////  
if(isset ($_POST['valider'])) {  
    $table[0]= $_POST['newsletter_title'];  
    $table[1]= $_POST['newsletter_body'];  
    $table[2]= $_POST['newsletter_statut'];  
    $integrity= $newsletter_object->CheckDataIntegrity($table);  
    if(is_string($integrity)) $text_format= '2FIELD';  
    else $text_format= '2HTML';  
    $form_title= formatText($_POST['newsletter_title'],$text_format);  
    $form_body= formatText($_POST['newsletter_body'], $text_format);  
    $form_statut= $_POST['newsletter_statut'];  
    if($_POST['newsletter_statut']== 'D') $mask_statut_D= 'checked="checked"'; else $mask_statut_D= '';  
    if($_POST['newsletter_statut']== 'P') $mask_statut_P= 'checked="checked"'; else $mask_statut_W= '';  
if($form_statut== 'W') $mask_statut_W= 'checked="checked"';  
if($form_statut== 'D') $mask_statut_D= 'checked="checked"';  
            <a href="index.php"> <? echo  $GLOBALS['lang']['way']['home']; ?></a>  
            <a href=" <?php echo  $rub_link; ?>"> <? echo  $GLOBALS['lang']['menu']['news'];?></a>  
            <span> <? echo  formatNavTitle($GLOBALS['lang']['newsletter']['mod'].  ' : '. $news_current_title); ?></span>  
include_once("quickicons.php");  
if(!isset ($integrity) ||  is_string($integrity)) {  
<div class="contentcontainer">  
        include_once($dir. "/menurub.php");  
            <form id="modnews" action=" <?php echo  $_SERVER['SCRIPT_NAME']; ?>" method="post" enctype="multipart/form-data">  
                <label for="newsletter_title"> <? echo  $GLOBALS['lang']['newsletter']['title']; ?> : *</label>  
                <input name="newsletter_title" type="text" class="textfield" id="newsletter_title" maxlength="200" value=" <?php echo  $form_title; ?>" />  
                <label for="newsletter_body"> <? echo  $GLOBALS['lang']['newsletter']['body']; ?> : *</label>  
                <textarea id="newsletter_body" name="newsletter_body" class="largetextfield"  <?php echo  AREA_SETTINGS; ?>> <?php echo  $form_body; ?></textarea>  
                <label for="statut_W" > <? echo  $GLOBALS['lang']['newsletter']['statut']; ?> : </label>  
                <input name="newsletter_statut" type="radio" id="statut_D" value="D"  <?php echo  $mask_statut_D; ?> /><span class="radio"> <?php echo  display_statut('D'); ?></span>  
                <input name="newsletter_statut" type="radio" id="statut_W" value="W"  <?php echo  $mask_statut_W; ?> /><span class="radio"> <?php echo  $GLOBALS['lang']['newsletter']['nightsend']; ?></span>  
                <input name="id" type="hidden" value=" <?php echo  $id; ?>" id="id" />  
                <input name="rub" type="hidden" value=" <?php echo  $rub; ?>" id="rub" />  
                <input name="todo" type="hidden" value=" <?php echo  $todo; ?>" id="todo" />  
                <input name="valider" type="submit" value=" <? echo  $GLOBALS['lang']['btn']['valid']; ?>" class="button" id="valider" />  
<?php include_once($dir. "/help.php"); ?>  
<div class="contentcontainer">  
include_once($dir. "/menurub.php");  
            <h2> <? echo  formatTitleh2($GLOBALS['lang']['recap']['title']); ?></h2>  
            echo  "<dl class=\"dl3\">\n"; 
            echo  "<dt>". $GLOBALS['lang']['newsletter']['title']. "</dt>\n"; 
            echo  "<dd>". $form_title. "</dd>\n"; 
            echo  "<dt>". $GLOBALS['lang']['newsletter']['body']. " :</dt>\n"; 
            echo  "<dt>". $GLOBALS['lang']['divers']['statut'] . "</dt>\n"; 
            <form id="modscale" action=" <?php echo  $_SERVER['SCRIPT_NAME']; ?>" method="post">  
                <input name="id" type="hidden" value=" <?php echo  $id; ?>" id="id" />  
                <input name="rub" type="hidden" value=" <?php echo  $rub; ?>" id="rub" />  
                <input name="todo" type="hidden" value=" <?php echo  $todo; ?>" id="todo" />  
                <input name="data_table" type="hidden" value=" <?php echo  $table; ?>" id="data_table" />  
                <input name="retour" type="button" value=" <? echo  $GLOBALS['lang']['btn']['preview']; ?>" class="button" id="retour" onclick="history.go(-1);" />  
                <input name="enregistrer" type="submit" value=" <? echo  $GLOBALS['lang']['btn']['save']; ?>" class="button" id="valider" />  
    <?php include_once($dir. "/help.php"); ?>  
 
 
        
       |