31if ( ! defined (
'ALLOWED')) die(
'Appel direct ne sont pas permis');
33if (! isset(
$_GET[
'ac'])) {
43if (isset(
$_GET[
'bookmark_add'])){
44 $count=
$cn->get_value(
"select count(*) from bookmark"
45 .
" where b_action=$1 and login=$2",
50 $cn->exec_sql(
"insert into bookmark(b_action,login) values($1,$2)",
53 $js=
"error_message('"._(
"Ce favori a déjà été ajouté").
"');";
61if (isset(
$_GET[
'bookmark_delete']) && isset (
$_GET[
'book'])){
62 $a_book=
$_GET[
'book'];
63 for (
$e=0;
$e<count($a_book);
$e++)
65 $cn->exec_sql(
"delete from bookmark where b_id=$1 and login=$2",
70$bookmark_sql=
"select distinct b_id,b_action,b_order,me_code,me_description, javascript"
72 .
"join v_menu_description_favori on (code=b_action or b_action=me_code)"
74 .
"login=$1 order by me_code";
76$url=
"do.php?gDossier=".Dossier::id();
82 <?=\HtmlInput::filter_table(
"bookmark_tb",
"1,2",0)?>
83<form
id=
"bookmark_del_frm" method=
"get" onsubmit=
"bookmark.remove();return false">
84<?php echo HtmlInput::array_to_hidden(array(
"gDossier",
'ac'),
$_REQUEST); ?>
86 <
table id=
"bookmark_tb" class=
"result">
96 <
tr class=
"<?php echo (($i%2)==0?'odd':'even')?>">
105 <a
class=
'mtitle' style=
'text-decoration: underline' href=
"<?php echo $url."&ac=
".$a_bookmark[$i]['b_action']; ?>">
117 echo HtmlInput::submit(
"bookmark_delete",
_(
"Supprimez favoris sélectionnés"),
"",
"smallbutton");
121<form
id=
"bookmark_frm" method=
"get" onsubmit=
"bookmark.save();return false">
123echo
_(
"Menu actuel").
" : ".
hb(
$_GET[
'ac']);
124echo HtmlInput::array_to_hidden(array(
"gDossier",
"ac"),
$_REQUEST);
127<?php echo HtmlInput::submit(
"bookmark_add",
_(
"Ajoutez le menu actuel à vos favoris"),
"",
"smallbutton"); ?>
p($p_string, $p_extra='')
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
global $g_user
if no group available , then stop
if(! isset($_GET['ac'])) if(isset( $_GET[ 'bookmark_add'])) if(isset($_GET['bookmark_delete']) &&isset($_GET['book'])) $bookmark_sql
_("actif, passif,charge,...")
create_script($p_string)
create the HTML for adding the script tags around of the script