Source for file mod.php
Documentation is available at mod.php 
 * @package linea21.modules  
 * @subpackage yellowpages  
 * @author linea21 <info@linea21.com>  
 * @license http://opensource.org/licenses/gpl-3.0.html  
//////////// Check Inclusion de pages ////////////   
include_once("../lib/lib_common.php");  
include_once("../lib/input_helpers.php");  
if (isset ($_GET['id']))    $yp_id= $_GET['id'];  
if (isset ($_POST['id']))    $yp_id= $_POST['id'];  
$data_yp= $sql_object->DBSelect($requete, 'OBJECT');  
$navtitle= _t('yp','mod'). " : ". $data_yp[0]->yellowp_name;  
            <a href="index.php" class="chemin_home"> <? echo  _t('way','home'); ?></a>  
               <a href=" <?php echo  $rub_link; ?>" id="chemin_ <? echo  $rub; ?>" class="chemin_rub"> <? echo  _t('menu','yellowpages');?></a>  
            <span> <? echo  formatnavTitle($navtitle); ?></span>  
if(isset ($_POST['enregistrer'])) {  
    $result= $yp_object->ModifyYellowPages($yp_id, $data_table, $sql_object);  
    $link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $yp_id;  
    if($result) header("Location: ". $link_confirm);  
$form_name= formatText($data_yp[0]->yellowp_name, '2FIELD');  
$form_activity= formatText($data_yp[0]->yellowp_activity, '2FIELD');  
$form_theme= $data_yp[0]->yellowp_theme;  
$form_street= formatText($data_yp[0]->yellowp_street, '2FIELD');  
$form_postal_code= formatText($data_yp[0]->yellowp_postal_code, '2FIELD');  
$form_city= formatText($data_yp[0]->yellowp_city, '2FIELD');  
$form_phone= $data_yp[0]->yellowp_phone;  
$form_fax= $data_yp[0]->yellowp_fax;  
$form_email= formatText($data_yp[0]->yellowp_email, '2FIELD');  
$form_website= formatText($data_yp[0]->yellowp_website, '2FIELD');  
$form_statut= $data_yp[0]->yellowp_statut;  
if($form_statut== 'AA') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';  
if($form_statut== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';  
if(isset ($_POST['valider'])) {  
    $table[0]= $_POST['yp_name'];  
    $table[1]= $_POST['yp_activity'];  
    $table[2]= $_POST['yp_theme'];  
    $table[3]= $_POST['yp_street'];  
    $table[4]= $_POST['yp_postal_code'];  
    $table[5]= $_POST['yp_city'];  
    $table[7]= $_POST['yp_phone'];  
    $table[8]= $_POST['yp_fax'];  
    $table[9]= $_POST['yp_email'];  
    $table[10]= $_POST['yp_website'];  
    $table[11]= $_POST['yp_statut'];  
    $integrity= $yp_object->CheckDataIntegrity($table);  
    $form_name= formatText($_POST['yp_name'], '2FIELD');  
    $form_activity= formatText($_POST['yp_activity'], '2FIELD');  
    $form_theme= $_POST['yp_theme'];  
    $form_street= formatText($_POST['yp_street'], '2FIELD');  
    $form_postal_code= formatText($_POST['yp_postal_code'], '2FIELD');  
    $form_city= formatText($_POST['yp_city'], '2FIELD');  
    $form_phone= $_POST['yp_phone'];  
    $form_fax= $_POST['yp_fax'];  
    $form_email= formatText($_POST['yp_email'], '2FIELD');  
    $form_website= formatText($_POST['yp_website'], '2FIELD');  
    $form_statut= $_POST['yp_statut'];  
    if($form_statut== 'AA') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';  
    if($form_statut== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';  
include_once(THEME_ADMIN_PATH. "quickicons.php");  
$data= $sql_object->DBSelect($req_list_theme);  
if(!isset ($integrity) ||  is_string($integrity)) {  
<div class="contentcontainer">  
        include_once($dir. "/menurub.php");  
            $link_det_state= $rub_link. "&todo=det&state=". $form_statut. "&id=";   
            if ($form_statut== 'D') {  ?>  
            <a href=" <? echo  $link_det_state. $yp_id ;?>"> <?echo  _t('yp','confirmation');?></a>  
            </div><br class="brendstep" />  
            <h2> <?php echo  $display_title; ?></h2>  
            <form id="addyp" action=" <?php echo  $_SERVER['SCRIPT_NAME']; ?>" method="post">  
                <label for="yp_name" > <? echo  _t('yp','name2') ?> * :</label>  
                <input name="yp_name" type="text" class="textfield" id="yp_name" maxlength="150" value=" <?php echo  $form_name; ?>" />  
                <label for="yp_activity" > <? echo  _t('yp','activity') ?> * :</label>  
                <input name="yp_activity" type="text" class="textfield" id="yp_activity" maxlength="255" value=" <?php echo  $form_activity; ?>" />  
                <label for="yp_theme" > <? echo  _t('yp','theme') ?> : </label>  
                <?php echo  $select_theme; ?>  
                <?php if($form_statut== 'P' ||  $form_statut== 'AA'){?>  
                <label for="statut_P"> <? echo  _t('divers','statut'); ?> * : </label>  
                <input name="yp_statut" type="radio" id="statut_P" value="P"  <?php echo  $mask_statut_P; ?> /><span class="radio"> <?php echo  _t('statut','public'); ?></span>  
                <input name="yp_statut" type="radio" id="statut_D" value="AA"  <?php echo  $mask_statut_D; ?> /><span class="radio"> <?php echo  _t('statut','AA'); ?></span>  
                <?php } else echo  "<input name=\"yp_statut\" type=\"hidden\" value=\"D\" id=\"yp_statut\" />" ;?>  
                <? echo  _t('yp','infos_adresse') ?>  
                <label for="yp_street" > <? echo  _t('yp','street') ?> * :</label>  
                <input name="yp_street" type="text" class="textfield" id="yp_street" maxlength="200" value=" <?php echo  $form_street; ?>" />  
                <label for="yp_postal_code" > <? echo  _t('yp','postal_code') ?> * :</label>  
                <input name="yp_postal_code" type="text" class="textfield" id="yp_postal_code" maxlength="6" value=" <?php echo  $form_postal_code; ?>" />  
                <label for="yp_city" > <? echo  _t('yp','city') ?> * :</label>  
                <input name="yp_city" type="text" class="textfield" id="yp_city" maxlength="100" value=" <?php echo  $form_city; ?>" />  
                <label for="yp_phone" > <? echo  _t('yp','phone') ?> :</label>  
                <input name="yp_phone" type="text" class="textfield" id="yp_phone" maxlength="12" value=" <?php echo  $form_phone; ?>" />  
                <label for="yp_fax" > <? echo  _t('yp','fax') ?> :</label>  
                <input name="yp_fax" type="text" class="textfield" id="yp_fax" maxlength="12" value=" <?php echo  $form_fax; ?>" />  
                <label for="yp_email" > <? echo  _t('yp','email') ?> * :</label>  
                <input name="yp_email" type="text" class="textfield" id="yp_email" maxlength="150" value=" <?php echo  $form_email; ?>" />  
                <label for="yp_website" > <? echo  _t('yp','website') ?> :</label>  
                <input name="yp_website" type="text" class="textfield" id="yp_website" maxlength="150" value=" <?php echo  $form_website; ?>" />  
                <input name="rub" type="hidden" value=" <?php echo  $rub; ?>" id="rub" />  
                <input name="todo" type="hidden" value=" <?php echo  $todo; ?>" id="todo" />  
                <? echo  cancel_button($rub_link. "&todo=det&id=". $yp_id); ?>  
                <input name="id" type="hidden" value=" <?php echo  $yp_id; ?>" id="id" />  
                <input name="valider" type="submit" value=" <? echo  _t('btn','valid') ?>" class="button" id="valider" />  
<?php include_once($dir. "/help.php"); ?>  
if($form_theme==- 1) $display_form_theme= _t('yp','notheme');  
$onetheme= $sql_object->DBSelect($onetheme);  
$display_form_theme= formatText($onetheme[0]['theme_name'], '2HTML');  
if ($form_statut== 'D') $display_form_statut= _t('yp','draft');  
<div class="contentcontainer">  
include_once($dir. "/menurub.php");  
            <h2> <? echo  _t('recap','title'); ?></h2>  
                <dt> <? echo  _t('yp','name2'); ?> : </dt>  
                <dd> <?php echo  $display_form_name; ?><br /></dd>  
                <dt> <? echo   _t('yp','activity') ;?> :</dt>  
                <dd> <?php echo  $display_form_activity; ?><br /></dd>  
                <dt> <? echo  _t('yp','theme'); ?> :</dt>  
                <dd> <?php echo  $display_form_theme; ?><br /></dd>  
                <dt> <? echo  _t('divers','statut'); ?> : </dt>  
                <dd> <?php echo  $display_form_statut; ?><br /></dd>  
                <dt> <? echo  _t('yp','street'); ?> : </dt>  
                <dd> <?php echo  $display_form_street; ?><br /></dd>  
                <dt> <? echo  _t('yp','postal_code') ;?> : </dt>  
                <dd> <?php echo  $display_form_postal_code; ?><br /></dd>  
                <dt> <? echo  _t('yp','city'); ?> : </dt>  
                <dd> <?php echo  $display_form_city; ?><br /></dd>  
                <dt> <? echo   _t('yp','phone') ;?> : </dt>  
                <dd> <?php echo  $display_form_phone; ?><br /></dd>  
                <dt> <? echo  _t('yp','fax') ;?> : </dt>  
                <dd> <?php echo  $display_form_fax; ?><br /></dd>  
                <dt> <? echo  _t('yp','email') ;?> : </dt>  
                <dd> <?php echo  $display_form_email; ?><br /></dd>  
                <dt> <? echo   _t('yp','website'); ?> : </dt>  
                <dd> <?php echo  $display_form_website; ?><br /></dd>  
            <form id="addscale" action=" <?php echo  $_SERVER['SCRIPT_NAME']; ?>" method="post">  
                <input name="rub" type="hidden" value=" <?php echo  $rub; ?>" id="rub" />  
                <input name="todo" type="hidden" value=" <?php echo  $todo; ?>" id="todo" />  
                <input name="id" type="hidden" value=" <?php echo  $yp_id; ?>" id="id" />  
                <? echo  cancel_button($rub_link. "&todo=det&id=". $yp_id); ?>  
                <input name="data_table" type="hidden" value=" <?php echo  $table; ?>" id="data_table" />  
                <input name="retour" type="button" value=" <? echo  _t('btn','preview') ?>" class="button" id="retour" onclick="history.go(-1);" />  
                <input name="enregistrer" type="submit" value=" <? echo  _t('btn','save') ?>" class="button" id="valider" />  
    <?php include_once($dir. "/help.php"); ?>  
 
 
        
       |