";
if($this->url){
$form.= "
";
}
create_tableau_mimetype();
$selector_mimetype = "
";
if($this->id){
$form.= "
".$selector_mimetype."
";
}
$collections=new cms_collections();
$form.="
".htmlentities($this->filename,ENT_QUOTES,$charset)."
".htmlentities($this->mimetype,ENT_QUOTES,$charset)."
".htmlentities($this->get_human_size(),ENT_QUOTES,$charset)."
".htmlentities(format_date($this->create_date),ENT_QUOTES,$charset)."
".$this->storage->get_storage_infos()."
".$collections->get_collections_selector('cms_document_collection', $this->num_object)."
";
if($this->id){
$form.="
".$opac_url_base."ajax.php?module=cms&categ=document&action=render&id=".$this->id."
";
}
$form.="
";
//utilisation
if(count($this->used)){
$form.="
|
".htmlentities($msg['cms_document_used_type'],ENT_QUOTES,$charset)." |
".htmlentities($msg['cms_document_used_title'],ENT_QUOTES,$charset)." |
";
$array_ids = array();
$id=1;
foreach($this->used as $type => $used){
$query ="";
switch($type){
case "article" :
$query = "select id_article as id ,article_title as title from cms_articles where id_article in (".implode(",",$used).") order by 2";
$use_link = "./cms.php?categ=article&sub=edit&id=";
break;
case "section" :
$query = "select id_section as id,section_title as title from cms_sections where id_section in (".implode(",",$used).") order by 2";
$use_link = "./cms.php?categ=section&sub=edit&id=";
break;
}
if($query){
$result = pmb_mysql_query($query) ;
if(pmb_mysql_num_rows($result)){
while($row = pmb_mysql_fetch_object($result)){
$form.="
|
".htmlentities($msg['cms_document_used_type_'.$type],ENT_QUOTES,$charset)." |
".htmlentities($row->title,ENT_QUOTES,$charset)." |
";
$array_ids[]=$id;
$id++;
}
}
}
}
$form.="
";
}else{
$form.="
";
}
$form.="