get_value("select count(*) from bookmark" . " where b_action=$1 and login=$2", array($_GET['ac'],$g_user->login) ); // Add bookmark only if absent if ( $count == 0 ){ $cn->exec_sql("insert into bookmark(b_action,login) values($1,$2)", array($_GET['ac'],$g_user->login)); } else { $js="error_message('"._("Ce favori a déjà été ajouté")."');"; echo create_script($js); } } // remove bookmark if (isset($_GET['bookmark_delete']) && isset ($_GET['book'])){ $a_book=$_GET['book']; for ($e=0;$eexec_sql("delete from bookmark where b_id=$1 and login=$2", array($a_book[$e],$g_user->login)); } } $bookmark_sql="select distinct b_id,b_action,b_order,me_code,me_description, javascript" . " from bookmark " . "join v_menu_description_favori on (code=b_action or b_action=me_code)" . "where " . "login=$1 order by me_code"; $a_bookmark=$cn->get_array($bookmark_sql,array($g_user->login)); $url="do.php?gDossier=".Dossier::id()."&ac="; ?>
value=$a_bookmark[$i]['b_id']; echo $ch->input(); ?>
0) : echo HtmlInput::submit("bookmark_delete",_("Supprimez favoris sélectionnés"),"","smallbutton"); endif; ?>