* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html * */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// if(isset($_POST['id'])) $id=$_POST['id']; if(isset($_GET['id'])) $id=$_GET['id']; $resources_object= new resources; if($type=='P') { $requete= SQL_getPublicationTitle($parent); $result=$sql_object->DBSelect($requete); // Do record exists? if(!isset($result[0]['publi_title'])) redirect_to('publication'); $current_title=FormatText($result[0]['publi_title'], '2HTML'); $complete_type='PUBLICATION'; $publi_owner=$result[0]['publi_posted_by']; //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('publication')) ReloadIndex('admin'); if ($l21auth->GetSessionElement('id')!=$publi_owner && !$l21auth->isSuperAdmin()) ReloadIndex('admin'); /////////// } if($type=='W') { $requete= SQL_getWorkshopTitle($parent); $result=$sql_object->DBSelect($requete); // Do record exists? if(!isset($result[0]['workrep_title'])) redirect_to('workshop'); $current_title=FormatText($result[0]['workrep_title'], '2HTML'); $complete_type='WORKSHOP'; $workshop_id=$result[0]['workrep_workshop_id']; //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('workshop')) ReloadIndex('admin'); if (!$l21auth->isWorkgroupOrganiser($l21auth->GetSessionElement('id'), $sql_object, $workshop_id) && !$l21auth->isSuperAdmin()) ReloadIndex('admin'); /////////// } if(!isset($_POST['valider'])) { $requete= SQL_getMultiInfo($id); $result=$sql_object->DBSelect($requete); // Do record exists? if(!isset($result[0]['multires_name']) && $type == 'W') redirect_to('workshop'); if(!isset($result[0]['multires_name']) && $type == 'P') redirect_to('publication'); $form_name=formatText($result[0]['multires_name'], '2FIELD'); $form_description=formatText($result[0]['multires_description'], '2FIELD'); $form_url=$result[0]['multires_media_uri']; } ?>
ModifyMultiRes($id, $data_table, $sql_object); $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&type=".$type."&id=".$parent; if($result) { header("Location: ".safe_redirect($link_confirm)); exit; } else system_error(); } if(isset($_POST['valider'])) { $table = array(); $table[0]=$_POST['multi_name']; $table[1]=$_POST['multi_description']; $table[2]=$_POST['multi_url']; $integrity=$resources_object->CheckDataIntegrity($table,'MULTI'); if(is_string($integrity)) { $text_format='2FIELD'; } else { $text_format='2HTML'; } $form_name=formatText($_POST['multi_name'], $text_format); $form_description=formatText($_POST['multi_description'], $text_format); $form_url=formatText($_POST['multi_url'], $text_format); $table=urlencode(serialize($table)); } ?>