Ejemplo n.º 1
0
    /**
     * Display the content of a profile menu for printing
     * @param type $resource
     * @param type $p_id
     */
    function sub_menu($resource, $p_id)
    {
        if (Database::num_row($resource) != 0) {
            ////
            // If there are submenus
            $gDossier = dossier::id();
            echo '<td>';
            for ($e = 0; $e < Database::num_row($resource); $e++) {
                $menu = Database::fetch_array($resource, $e);
                $me_code = $menu['me_code'];
                $me_code_dep = $menu['me_code_dep'];
                $mp_type = $menu['p_type_display'];
                $me_menu = $menu['me_menu'];
                $me_desc = $menu['me_description'];
                $me_def = $menu['pm_default'] == '1' ? '<span class="notice" style="display:inline">Défaut</span>' : '';
                ?>
                <li id="sub<?php 
                echo $menu['pm_id'];
                ?>
">

                    <?php 
                echo $me_menu;
                ?>
                    <?php 
                echo $me_desc;
                ?>
  <?php 
                echo $me_def;
                ?>
                    <?php 
                $ret2 = $this->cn->exec_sql("\n                                    SELECT pm_id,\n                                            pm.me_code,\n                                            me_code_dep,\n                                            p_id,\n                                            p_order,\n                                            p_type_display,\n                                            pm_default,\n                                            pm_desc,\n                                            me_menu,\n                                            me_description\n                                            FROM profile_menu as pm\n                                                    join profile_menu_type on (p_type_display=pm_type)\n                                                    join menu_ref as mr on (mr.me_code=pm.me_code)\n                                            where\n                                            p_id=\$1 and me_code_dep=\$2\n                                            order by p_order asc\n                        ", array($p_id, $me_code));
                ?>
                    <span>
                        <?php 
                echo HtmlInput::anchor(SMALLX, "", sprintf(" onclick = \"remove_sub_menu(%d,%d)\"", Dossier::id(), $menu['pm_id']), 'class="tinybutton"');
                ?>
                    </span>
                    <?php 
                echo "</li>";
            }
            //end loop e
            echo '</ul>';
        }
        // end if
    }
Ejemplo n.º 2
0
    echo $a_change[$e]['str_date'];
    ?>
		</td>
		<td>
			<?php 
    echo h($a_change[$e]['c_comment']);
    ?>
		</td>
		<td>
			<?php 
    echo h($a_change[$e]['r_name']);
    ?>
		</td>
		<td>
			<?php 
    echo $a_change[$e]['tech_user'];
    ?>
		</td>
		<td>
			<?php 
    echo HtmlInput::anchor(_("Détail"), "javascript:void()", sprintf("onclick=\"stock_inv_detail('%s','%s')\"", $gDossier, $a_change[$e]['c_id']));
    ?>
		</td>

	</tr>
	<?php 
}
?>
</table>
</div>
Ejemplo n.º 3
0
            $str_name = domaine . 'dossier' . $Dossier['dos_id'];
            echo "<TD><I>  " . h($Dossier['dos_description']) . "</I></td>";
            $database_exist = $repocn->exist_database($str_name);
            if ($database_exist > 0) {
                $size = $repocn->get_value("select pg_database_size(\$1)/(1024*1024)::float", array($str_name));
                echo td(nbm($size) . "MB", ' style="text-align:right"');
            } else {
                echo td(_("Dossier inexistant"), 'style="color:red"');
            }
            echo td($str_name);
            if ($database_exist > 0) {
                echo td(HtmlInput::anchor(_('Effacer'), '?action=dossier_mgt&sa=del&d=' . $Dossier['dos_id'], " onclick=\"folder_drop('" . $Dossier['dos_id'] . "')\""));
                echo td(HtmlInput::anchor(_('Modifier'), '?action=dossier_mgt&sa=mod&d=' . $Dossier['dos_id'], " onclick=\"folder_modify('" . $Dossier['dos_id'] . "')\""));
                echo td(HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=d&d=' . $Dossier['dos_id']));
            } else {
                echo td(HtmlInput::anchor(_('Effacer'), '?action=dossier_mgt&sa=del&d=' . $Dossier['dos_id'], " onclick=\"folder_drop('" . $Dossier['dos_id'] . "')\""));
            }
            $compteur++;
        }
        echo "</TR>";
    }
    echo '</table>';
}
?>
<div id="folder_add_id" class="inner_box" style="display:none;top:50px">
    <?php 
//---------------------------------------------------------------------------
// Add a new folder
echo HtmlInput::title_box(_("Ajout d'un dossier"), 'folder_add_id', "hide");
$repo = new Database();
// Load the available Templates
        $url = HtmlInput::anchor(_('Menu'), '', sprintf(" onclick = \" \$('menu_table').innerHTML='';display_sub_menu(%d,%d,%d,%d)\" ", Dossier::id(), $this->p_id, $row['pm_id'], 0));
    }
    ?>
		<td class="<?php 
    echo $style;
    ?>
" id="sub<?php 
    echo $row['pm_id'];
    ?>
">
                        <?php 
    echo HtmlInput::anchor(gettext($row['me_menu']), '', sprintf(" onclick =\"mod_menu (%d,%d) \" ", Dossier::id(), $row['pm_id']), ' class="line" ');
    ?>
                        <span>
                            <?php 
    echo HtmlInput::anchor(SMALLX, "", sprintf(" onclick = \"remove_sub_menu(%d,%d)\"", Dossier::id(), $row['pm_id']), 'class="tinybutton"');
    ?>
                        </span>
                        <p>
                        <?php 
    echo _($row['me_description']);
    ?>
                        </p>
                        <p>
                        <?php 
    echo $url;
    ?>
                        </p>
                        <p>
                        <?php 
    echo _('ordre apparition'), " ", $row['p_order'];
Ejemplo n.º 5
0
        <th>
            <?php 
echo _("Description");
?>
        </th>
    </tr>
<?php 
$gDossier = Dossier::id();
for ($i = 0; $i < $max; $i++) {
    $row = Database::fetch_array($ret, $i);
    ?>
    <tr class="<?php 
    echo $i % 2 == 0 ? 'even' : 'odd';
    ?>
">
        <td>
            <?php 
    $js = sprintf("search_add_tag('%s','%s','%s')", $gDossier, $row['t_id'], $p_prefix);
    echo HtmlInput::anchor($row['t_tag'], "", "onclick=\"{$js}\"");
    ?>
        </td>
        <td>
            <?php 
    echo $row['t_description'];
    ?>
        </td>
    </tr>
<?php 
}
?>
</table>
Ejemplo n.º 6
0
?>
        <?php 
// section if the user can share note with other
//users
if ($g_user->check_action(SHARENOTE)) {
    ?>
        
        <tr>
            <td>
                <?php 
    echo _('Partage');
    ?>
            </td>
            <td>
               <?php 
    echo HtmlInput::anchor(_('Partage'), "", " onclick=\"todo_list_share({$this->tl_id},{$dossier}) \";");
    ?>
            </td>
        </tr>
        <?php 
}
?>
    </table>
    <?php 
echo h($wDesc->input());
?>
    <?php 
echo dossier::hidden();
?>
    <?php 
echo HtmlInput::hidden('act', 'save');
Ejemplo n.º 7
0
 /**
  * Title for boxes, you can customize the symbol thanks symbol with
  * the mode "custom"
  * @param type $name Title
  * @param type $div element id, except for mode none or custom
  * @param type $mod hide , close , zoom , custom or none, with
  * custom , the $name contains all the code
  * @param type $p_js contains the javascript with "custom" contains button + code 
  * @return type
  */
 static function title_box($name, $div, $mod = "close", $p_js = "")
 {
     if ($mod == 'close') {
         $r = HtmlInput::anchor_close($div, $p_js);
     } else {
         if ($mod == 'hide') {
             $r = HtmlInput::anchor_hide("&#10761;", "\$('{$div}').hide();{$p_js}");
         } else {
             if ($mod == 'zoom') {
                 $r = '<span  id="span_' . $div . '" style="float:right;margin-right:5px">' . HtmlInput::anchor("&#11036;", "", $p_js, ' name="small' . $div . '" id="close_div" class="input_text"  ') . '</span>';
             } else {
                 if ($mod == 'custom') {
                     $r = '<span  id="span_' . $div . '" style="float:right;margin-right:5px">' . $p_js . "</span>";
                 } else {
                     if ($mod == 'none') {
                         $r = "";
                     } else {
                         die(__FILE__ . ":" . __LINE__ . _('Paramètre invaide'));
                     }
                 }
             }
         }
     }
     $r .= h2($name, ' class="title" ');
     return $r;
 }
Ejemplo n.º 8
0
        echo $class;
        ?>
">
                <td>
                    <?php 
        echo h($rDossier['dos_name']);
        ?>
                </td>
                <td>
                    <?php 
        echo h($rDossier['dos_description']);
        ?>
                </td>
                <td>
                    <?php 
        echo HtmlInput::anchor(_('Enleve'), "", " onclick=\"folder_remove({$mod_user->id},{$rDossier['dos_id']});\"");
        ?>
                </td>
                
            </tr>
<?php 
    }
    ?>
        </TABLE>
        <?php 
    echo HtmlInput::button("database_add_button", _('Ajout'), " onclick=\"folder_display({$mod_user->id});\"");
    ?>
        <?php 
    // If UserChange->admin==1 it means he can access all databases
    //
} else {
Ejemplo n.º 9
0
    echo HtmlInput::button(_('Ajouter'), _('Ajouter un modèle'), " onclick=\$('folder_add_id').show()");
    echo '</p>';
    if ($count == 0) {
        echo _("Aucun modèle disponible");
    } else {
        echo '<span style="display:block;margin-top:10">';
        echo _('Filtre') . HtmlInput::infobulle(23);
        echo HtmlInput::filter_table("t_modele", "0,1,2", "1");
        echo '</span>';
        echo '<table id="t_modele" class="table_large" style="border-spacing:10;border-collapse:separate" >';
        echo "<TR>" . "<TH>" . $header->get_header(0) . "</TH>" . "<TH>" . $header->get_header(1) . "</TH>" . "<TH>" . $header->get_header(2) . "</TH>" . "<TH>" . _('Nom base de données') . "</TH>" . "<th> </th>" . "<th> </th>" . "</TR>";
        for ($i = 0; $i < $count; $i++) {
            $mod = Database::fetch_array($Res, $i);
            $class = $i % 2 == 0 ? "odd" : "even";
            $str_name = domaine . 'mod' . $mod['mod_id'];
            printf('<TR class="' . $class . '" style="vertical-align:top">' . '<TD>%d </td><td><b> %s</b> </TD>' . '<TD><I> %s </I></TD>' . '<td>' . $str_name . '</td>' . '<td> ' . HtmlInput::anchor(_('Effacer'), '?action=modele_mgt&sa=del&m=' . $mod['mod_id'], " onclick = \"modele_drop('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Modifie'), '?action=modele_mgt&sa=mod&m=' . $mod['mod_id'], " onclick = \"modele_modify('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=m&d=' . $mod['mod_id']) . '</td>' . '</TR>', $mod['mod_id'], $mod['mod_name'], $mod['mod_desc']);
        }
        // for
        echo "</table>";
    }
    // if count = 0
    echo "<p class=\"notice\">" . _("Si vous voulez r&eacute;cup&eacute;rer toutes les adaptations d'un dossier " . " dans un autre dossier, vous pouvez en faire un modèle." . " Seules les fiches, la structure des journaux, les p&eacute;riodes,... seront reprises " . "et aucune donn&eacute;e du dossier sur lequel le dossier est bas&eacute;. Les données contenues dans les extensions ne sont pas effacées") . "</p>";
}
?>
<div id="folder_add_id" class="inner_box" style="display:none;top:50px">
    <?php 
echo HtmlInput::title_box(_("Ajout d'un modèle"), 'folder_add_id', "hide");
//---------------------------------------------------------------------------
// Add a template
//---------------------------------------------------------------------------
// Show All available folder
Ejemplo n.º 10
0
			Description
		</th>
	</tR>
<?php 
$dossier = Dossier::id();
for ($i = 0; $i < $max; $i++) {
    $class = $i % 2 == 0 ? ' class="even" ' : ' class="odd" ';
    $row = Database::fetch_array($res, $i);
    ?>
	<tr <?php 
    echo $class;
    ?>
 >
		<td>
		<?php 
    echo HtmlInput::anchor(h($row['fd_label']), "javascript:void(0)", "onclick=\"detail_category_show('detail_category_div','" . $dossier . "','" . $row['fd_id'] . "')\"");
    ?>
		</td>
		<td>
			<?php 
    echo h($row['fd_class_base']);
    ?>
		</td>
		<td>
			<?php 
    $v = $row['fd_create_account'] == 't' ? _("Automatique") : _("Manuel");
    echo $v;
    ?>
		</td>
		<td>
			<?php 
Ejemplo n.º 11
0
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

* 
*/
/**
 * @file
 * @brief display the calendar as a list. Included from the Calendar::zoom_list()
 */
?>
<div class="content" id="user_cal" style="width:100%">
<?php 
$short = HtmlInput::default_value_get('from', 0);
$js = sprintf("calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s','notitle':%d})", dossier::id(), 'per_div', 'calendar_zoom_div', 'cal', $notitle);
echo HtmlInput::anchor(_('Calendrier'), '', " onclick=\"{$js}\"");
echo HtmlInput::button_action_add();
?>
    <table class="result">
<?php 
$nb_event = count($a_event);
$a_status = array('R' => _('Retard'), 'N' => 'Auj.', 'F' => '');
for ($i = 0; $i < $nb_event; $i++) {
    $class = $i % 2 == 0 ? 'even' : 'odd';
    $idx = $a_event[$i]['status'];
    $class = $idx == 'R' ? 'notice' : $class;
    ?>
        <tr class="<?php 
    echo $class;
    ?>
">
Ejemplo n.º 12
0
// user
if ($op == 'folder_add') {
    $cn = new Database();
    $user_id = HtmlInput::default_value_get("p_user", 0);
    // get variable
    $dossier_id = HtmlInput::default_value_get("p_dossier", 0);
    // get variable
    if ($user_id == 0 || $dossier_id == 0 || isNumber($user_id) == 0 || $dossier_id == 0) {
        $content = _('Erreur paramètre');
        $status = "NOK";
    } else {
        $user = new User($cn, $user_id);
        $user->set_folder_access($dossier_id, true);
        $dossier = new Dossier($dossier_id);
        $dossier->load();
        $content = "<td>" . h($dossier->dos_name) . "</td><td>" . h($dossier->dos_description) . "</td>" . "<td>" . HtmlInput::anchor(_('Enleve'), "", " onclick=\"folder_remove({$user_id},{$dossier_id});\"") . "</td>";
        $status = 'OK';
    }
    //----------------------------------------------------------------
    // Answer in XML
    header('Content-type: text/xml; charset=UTF-8');
    $dom = new DOMDocument('1.0', 'UTF-8');
    $xml_content = $dom->createElement('content', $content);
    $xml_status = $dom->createElement('status', $status);
    $root = $dom->createElement("root");
    $root->appendChild($xml_content);
    $root->appendChild($xml_status);
    $dom->appendChild($root);
    echo $dom->saveXML();
    exit;
}
Ejemplo n.º 13
0
 /**
  * Display the other concerned (tiers, supplier...)
  * @return string
  */
 function display_linked()
 {
     $a_linked = $this->db->get_array('select ap_id,f_id from action_person where ag_id=$1', array($this->ag_id));
     if (count($a_linked) == 0) {
         return "";
     }
     for ($i = 0; $i < count($a_linked); $i++) {
         $fiche = new Fiche($this->db, $a_linked[$i]['f_id']);
         $qc = $fiche->get_quick_code();
         $js_remove = sprintf("onclick=\"action_remove_concerned('%s','%s','%s')\"", dossier::id(), $a_linked[$i]['f_id'], $this->ag_id);
         echo '<span style="border:1px solid black;margin-right:5px;">';
         echo $qc;
         echo HtmlInput::anchor(SMALLX, "javascript:void(0)", $js_remove, ' class="smallbutton" style="padding:0px;display:inline" ');
         echo '</span>';
         echo '&nbsp;';
         echo '&nbsp;';
     }
 }
Ejemplo n.º 14
0
<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
?>
<div class="pc_calendar" id="user_cal" style="width:100%">
<?php 
echo $month_year;
$js = sprintf("calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s','notitle':%d})", dossier::id(), 'per_div', 'calendar_zoom_div', 'list', $notitle);
echo HtmlInput::anchor(_('Liste'), '', " onclick=\"{$js}\"");
echo HtmlInput::button_action_add();
?>
    
<?php 
if ($zoom == 1) {
    ?>
    
<table style="width:100%;height:80%">
    <?php 
} else {
    ?>
<table style="width:100%;">
    <?php 
}
?>
<tr>
<?php 
for ($i = 0; $i <= 6; $i++) {
    echo "<th>";
    echo $week[$i];
    echo "</th>";
Ejemplo n.º 15
0
    echo th('prénom');
    echo th('profil');
    echo '<th>' . $header->get_header(2) . '</th>';
    for ($i = 0; $i < $MaxUser; $i++) {
        echo '<tr>';
        $l_line = Database::fetch_array($user_sql, $i);
        $str = "";
        $str = _('Utilisateur Normal');
        if ($l_line['use_admin'] == 1) {
            $str = _('Administrateur');
        }
        // get profile
        $profile = $cn->get_value("select p_name from profile\n\t\t\t\tjoin profile_user using(p_id) where user_name=\$1", array($l_line['use_login']));
        $url = $base_url . "&action=view&user_id=" . $l_line['use_id'];
        echo "<td>";
        echo HtmlInput::anchor($l_line['use_login'], $url);
        echo "</td>";
        echo td($l_line['use_name']);
        echo td($l_line['use_first_name']);
        echo td($profile);
        echo td($str);
        echo "</TR>";
    }
    echo '</TABLE>';
}
$action = "";
if (isset($_GET["action"])) {
    $action = $_GET["action"];
}
//----------------------------------------------------------------------
// Action = save
Ejemplo n.º 16
0
require_once NOALYSS_INCLUDE . '/class_profile_menu.php';
require_once NOALYSS_INCLUDE . '/class_html_input.php';
$p_id = HtmlInput::default_value_request('p_id', -1);
$profile = new Profile_sql($cn, $p_id);
$gDossier = Dossier::id();
$add_impression = HtmlInput::button("add", _("Ajout Menu"), "onclick=\"add_menu({dossier:{$gDossier},p_id:{$p_id},type:'pr'})\"");
$call_tab = HtmlInput::default_value_post('tab', 'none');
$a_tab = array('profile_gen_div' => 'tabs', 'profile_menu_div' => 'tabs', 'profile_print_div' => 'tabs', 'profile_gestion_div' => 'tabs', 'profile_repo_div' => 'tabs');
$a_tab[$call_tab] = 'tabs_selected';
?>
<h1>Profil <?php 
echo $profile->p_name;
?>
</h1>
<?php 
echo HtmlInput::anchor(_('Retour'), "", " onclick = \" \$('detail_profile').hide();\$('list_profile').show(); \" ", 'class="line"');
if ($p_id > 0) {
    ?>
<ul class="tabs">
    
    <li class="<?php 
    echo $a_tab['profile_gen_div'];
    ?>
"><a href="javascript:void(0)"  onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';profile_show('profile_gen_div')"><?php 
    echo _('Nom');
    ?>
</a></li>
    <li class="<?php 
    echo $a_tab['profile_menu_div'];
    ?>
"><a href="javascript:void(0)"  onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';profile_show('profile_menu_div')"><?php 
Ejemplo n.º 17
0
    echo '<th>' . $header->get_header(3) . '</th>';
    echo "<th>" . _('Type') . "</th>";
    echo '<th>' . $header->get_header(2) . '</th>';
    echo '</tr>';
    foreach ($a_user as $r_user) {
        $compteur++;
        $class = $compteur % 2 == 0 ? "odd" : "even";
        echo "<tr class=\"{$class}\">";
        if ($r_user['use_active'] == 0) {
            $Active = $g_failed;
        } else {
            $Active = $g_succeed;
        }
        $det_url = $url . "&det&use_id=" . $r_user['use_id'];
        echo "<td>";
        echo HtmlInput::anchor($r_user['use_login'], $det_url);
        echo "</td>";
        echo td($r_user['use_name']);
        echo td($r_user['use_first_name']);
        echo td($Active);
        $type = $r_user['use_admin'] == 1 ? _("Administrateur") : _("Utilisateur");
        echo "<td>" . $type . "</td>";
        echo td($r_user['ag_dossier']);
        echo '</tr>';
    }
    // foreach
    echo '</table>';
}
// $cn != null
?>
Ejemplo n.º 18
0
 /**
  * In the screen search add this data to the cell
  */
 function update_search_cell($p_prefix)
 {
     echo '<span id="sp_' . $p_prefix . $this->data->t_id . '" style="border:1px solid black;margin-right:5px;">';
     echo h($this->data->t_tag);
     echo HtmlInput::hidden($p_prefix . 'tag[]', $this->data->t_id);
     $js = sprintf("\$('sp_" . $p_prefix . $this->data->t_id . "').remove();");
     echo HtmlInput::anchor(SMALLX, "javascript:void(0)", "onclick=\"{$js}\"", ' class="smallbutton " style="padding:0px;display:inline" ');
     echo '</span>';
 }