本文整理汇总了PHP中dossier类的典型用法代码示例。如果您正苦于以下问题:PHP dossier类的具体用法?PHP dossier怎么用?PHP dossier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了dossier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header_txt
function header_txt($p_cn)
{
$own = new own($p_cn);
$soc = $own->MY_NAME;
$date = date('d / m / Y H:i ');
$dossier = utf8_decode(" Dossier : " . dossier::name());
return $dossier . " " . $soc . " " . $date;
}
示例2: input
public function input($p_name = null, $p_value = null)
{
$this->name = $p_name == null ? $this->name : $p_name;
$this->value = $p_value == null ? $this->value : $p_value;
if ($this->readOnly == true) {
return $this->display();
}
$this->id = $this->id == "" ? $this->name : $this->id;
$r = sprintf("\n <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"search_action(" . dossier::id() . ",'%s')\" value=\"?\">\n <INPUT TYPE=\"text\" style=\"color:black;background:lightyellow;border:solid 1px grey;\" NAME=\"%s\" ID=\"%s\" VALUE=\"%s\" SIZE=\"8\" readonly>\n\t\t\t\t <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"\$('%s').value=''\" value=\"X\">\n\n ", $this->id, $this->name, $this->id, $this->value, $this->id);
return $r;
}
示例3: sub_menu
/**
* 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
}
示例4: die
/*! \file
* \brief Send a report in PDF
*/
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
include_once "class_acc_report.php";
include_once "ac_common.php";
require_once NOALYSS_INCLUDE . '/class_database.php';
include_once "class_impress.php";
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/header_print.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_pdf.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
extract($_GET);
$ret = "";
$Form = new Acc_Report($cn, $form_id);
$Libelle = sprintf("%s ", $Form->get_name());
$pdf = new PDF($cn);
$pdf->setDossierInfo($Libelle);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Rapport " . $Libelle, true);
// Step ??
//--
$step = HtmlInput::default_value_get("p_step", 0);
if ($step == 0) {
示例5: Periode
$per = new Periode($cn, $obj->det->jr_tech_per);
if ($per->is_closed() == 0 && $owner->MY_STRICT == 'N' && $g_user->check_action(RMOPER) == 1) {
$remove = new IButton('Effacer');
$remove->label = _('Effacer');
$remove->javascript = "return confirm_box(null,'Vous confirmez effacement ?',function () {removeOperation('" . $obj->det->jr_id . "'," . dossier::id() . ",'" . $div . "')})";
echo $remove->input();
}
$reverse = new IButton('bext' . $div);
$reverse->label = _('Extourner');
$reverse->javascript = "g('ext" . $div . "').style.display='block'";
echo $reverse->input();
echo '</p>';
echo '</form>';
echo '<div id="ext' . $div . '" class="inner_box" style="position:relative;top:-150px;display:none">';
$date = new IDate('ext_date');
$r = "<form id=\"form_" . $div . "\" onsubmit=\"return false;\">";
$r .= HtmlInput::hidden('jr_id', $_REQUEST['jr_id']) . HtmlInput::hidden('div', $div) . dossier::hidden() . HtmlInput::hidden('act', 'reverseop');
$r .= HtmlInput::title_box(_('Extourner'), 'ext' . $div, 'hide');
$r .= "<p>";
$r .= _("Extourner une opération vous permet de l'annuler par son écriture inverse");
$r .= "</p>";
$r .= _("entrez une date") . " :" . $date->input();
$r .= '<p style="text-align:center">';
$r .= HtmlInput::submit('x', 'accepter', 'onclick="confirm_box($(\'form_' . $div . '\'),\'Vous confirmez ? \',function () {$(\'form_' . $div . '\').divname=\'' . $div . '\';reverseOperation($(\'form_' . $div . '\'))}); return false"');
$r .= "</p>";
$r .= '</form>';
echo $r;
echo '</div>';
} else {
echo '</p>';
}
示例6: test_me
static function test_me()
{
$cn = new Database(dossier::id());
$a = new Acc_Report($cn);
print_r($a->get_list());
$array = array("text0" => "test1", "form0" => "7%", "text1" => "test2", "form1" => "6%", "fr_id" => 110, "form_nom" => "Tableau");
$a->from_array($array);
print_r($a);
echo '<form method="post">';
echo $a->form(10);
echo HtmlInput::submit('update', 'Enregistre');
/* Add a line should be a javascript see comptanalytic */
// $r.= '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">';
echo HtmlInput::submit('del_form', 'Efface ce rapport');
echo HtmlInput::hidden('test_select', $_REQUEST['test_select']);
echo "</FORM>";
if (isset($_POST['update'])) {
$b = new Acc_Report($cn);
$b->from_array($_POST);
echo '<hr>';
print_r($b);
}
}
示例7: _
$last--;
}
}
echo $last;
?>
</td>
</tr>
<tr>
<td>
<?php
echo _("Redémarrer la séquence (laisser à 0 pour ne pas changer)");
?>
</td>
<td>
<?php
$pj = new INum('seq');
$pj->value = 0;
echo $pj->input();
?>
</td>
</tr>
</table>
<?php
echo HtmlInput::hidden('p_action', 'document');
echo dossier::hidden();
echo HtmlInput::hidden('sa', 'mod_template');
echo HtmlInput::hidden('id', $doc->md_id);
echo HtmlInput::submit("mod", _('Sauver'));
?>
</form>
示例8: test_me
static function test_me()
{
$cn = new Database(dossier::id());
}
示例9: h2
echo HtmlInput::anchor_close('mod_predf_op');
echo h2(_('Modification du nom'), ' class="title"');
echo '
<form method="POST" onsubmit="save_predf_op(this);return false;">';
$name = new IText('opd_name');
$name->value = $op->od_name;
$name->size = 60;
echo "Nom =" . $name->input();
$opd_description = new ITextarea('od_description');
$opd_description->style = ' class="itextarea" style="width:30em;height:4em;vertical-align:top"';
$opd_description->value = $op->od_description;
echo '<p>';
echo _("Description (max 50 car.)");
echo $opd_description->input();
echo '</p>';
echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']);
echo "<hr>";
//////////////////////////////////////////////////////////////////////////////
// Detail operation
//////////////////////////////////////////////////////////////////////////////
echo $op->display();
echo HtmlInput::submit('save', _('Sauve'));
echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"');
echo '</form>';
$html1 = ob_get_contents();
ob_end_clean();
$html = escape_xml($html1);
if (headers_sent()) {
echo $html1;
} else {
header('Content-type: text/xml; charset=UTF-8');
示例10: die
die('Forbidden');
}
/*!\file
* \brief Management of the folder
*
*/
require_once NOALYSS_INCLUDE . '/class_itext.php';
require_once NOALYSS_INCLUDE . '/class_icheckbox.php';
require_once NOALYSS_INCLUDE . '/class_itextarea.php';
require_once NOALYSS_INCLUDE . '/class_html_input.php';
$sa = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : 'list';
//---------------------------------------------------------------------------
// Update
$dossier_id = HtmlInput::default_value_request('d', -1);
if (isset($_POST['upd']) && isNumber($dossier_id) == 1 && $dossier_id != -1) {
$dos = new dossier($dossier_id);
$name = HtmlInput::default_value_post('name', "--vide--");
$desc = HtmlInput::default_value_post('desc', "--vide--");
$dos->set_parameter('name', $name);
$dos->set_parameter('desc', $desc);
$dos->save();
}
echo '<div class="content" style="width:80%;margin-left:10%">';
/*
* check and add an new folder
*/
if (isset($_POST["DATABASE"])) {
$repo = new Database();
$dos = HtmlInput::default_value_post('DATABASE', "");
$dos = sql_string($dos);
if (strlen($dos) == 0) {
示例11: display_form
function display_form($p_hidden = "")
{
/* if there is no analytic plan return */
$pa = new Anc_Plan($this->db);
if ($pa->count() == 0) {
echo '<div class="content">';
echo '<h2 class="error">' . _('Aucun plan défini') . '</h2>';
echo '</div>';
return;
}
$from = new IDate('from', 'from');
$from->size = 10;
$from->value = $this->from;
$to = new IDate('to', 'to');
$to->value = $this->to;
$to->size = 10;
$from_poste = new IAncCard('from_poste', 'from_poste');
$from_poste->size = 10;
$from_poste->plan_ctl = 'pa_id';
$from_poste->value = $this->from_poste;
$to_poste = new IAncCard('to_poste', 'to_poste');
$to_poste->value = $this->to_poste;
$to_poste->size = 10;
$hidden = new IHidden();
$r = dossier::hidden();
$r .= $hidden->input("result", "1");
$r .= HtmlInput::request_to_hidden(array('ac'));
$r .= $p_hidden;
$plan = new Anc_Plan($this->db);
$plan_id = new ISelect("pa_id");
$plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
$plan_id->selected = $this->pa_id;
$choose_from = new IButton();
$choose_from->name = _("Choix Poste");
$choose_from->label = _("Recherche");
$choose_from->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste','pa_id')";
$choose_to = new IButton();
$choose_to->name = _("Choix Poste");
$choose_to->label = _("Recherche");
$choose_to->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste','pa_id')";
$r .= HtmlInput::request_to_hidden(array('ac'));
ob_start();
?>
<table>
<tr>
<td>
<?php
echo _('Depuis');
echo HtmlInput::infobulle(37);
?>
</td>
<td>
<?php
echo $from->input();
?>
</td>
</tr>
<tr>
<td>
<?php
echo _('Jusque');
echo HtmlInput::infobulle(37);
?>
</td>
<td>
<?php
echo $to->input();
?>
</td>
</tr>
</table>
<span style="padding:5px;margin:5px;display:block;">
<?php
echo _("Plan Analytique :") . $plan_id->input();
echo HtmlInput::infobulle(42);
?>
</span>
<?php
$r .= ob_get_clean();
$r .= _("Entre l'activité ") . $from_poste->input();
$r .= $choose_from->input();
$r .= _(" et l'activité ") . $to_poste->input();
$r .= $choose_to->input();
$r .= '</span>';
return $r;
}
示例12: menu_acc_plan
function menu_acc_plan($p_start = 1)
{
$base = "?ac=" . $_REQUEST['ac'];
$str_dossier = "&" . dossier::get();
for ($i = 0; $i < 10; $i++) {
$class[$i] = "tabs";
}
$class[$p_start] = "tabs_selected";
$idx = 0;
?>
<ul class="tabs">
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=0' . $str_dossier;
?>
">0 <?php
echo _(' Hors Bilan');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=1' . $str_dossier;
?>
">1 <?php
echo _(' Immobilisé');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=2' . $str_dossier;
?>
">2 <?php
echo _('Actif a un an au plus');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=3' . $str_dossier;
?>
">3 <?php
echo _('Stock et commande');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=4' . $str_dossier;
?>
">4 <?php
echo _('Compte tiers');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=5' . $str_dossier;
?>
">5 <?php
echo _('Financier');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=6' . $str_dossier;
?>
">6 <?php
echo _('Charges');
?>
</A></li>
<li class="<?php
echo $class[$idx];
$idx++;
?>
"><A HREF="<?php
echo $base . '&p_start=7' . $str_dossier;
?>
">7 <?php
echo _('Produits');
?>
</A></li>
<li class="<?php
//.........这里部分代码省略.........
示例13: show_menu
/**
* show the module
* @global $g_user
* @param $module the $_REQUEST['ac'] exploded into an array
* @param $idx the index of the array : the AD code is splitted into an array thanks the slash
*/
function show_menu($module)
{
if ($module == 0) {
return;
}
static $level = 0;
global $g_user;
$cn = Dossier::connect();
/**
* Show the submenus
*/
$amenu = $cn->get_array("\n select \n pm_id,\n me_code,\n pm_id_dep,\n me_file,\n me_javascript,\n me_url,\n me_menu,\n me_description,\n me_description_etendue\n from profile_menu \n join menu_ref using (me_code) \n where pm_id_dep=\$1 and p_id=\$2\n\t order by p_order", array($module, $g_user->get_profile()));
// There are submenuS, so show them
if (!empty($amenu) && count($amenu) > 1) {
$a_style_menu = array('topmenu', 'menu2', 'menu3');
if ($level > count($a_style_menu)) {
$style_menu = 'menu3';
} else {
$style_menu = $a_style_menu[$level];
}
require 'template/menu.php';
} elseif (count($amenu) == 1) {
if (trim($amenu[0]['me_url']) != "" || trim($amenu[0]['me_file']) != "" || trim($amenu[0]['me_javascript']) != "") {
echo '<div class="topmenu">';
echo h2info(_($amenu[0]['me_menu']));
echo '</div>';
$module = $amenu[0]['pm_id'];
} else {
$url = $_REQUEST['ac'] . '/' . $amenu[0]['me_code'];
echo '<a href="do.php?gDossier=' . Dossier::id() . '&ac=' . $url . '">';
echo _($amenu[0]['me_menu']);
echo '</a>';
$level++;
return;
}
}
// There is no submenu or only one
if (empty($amenu) || count($amenu) == 1) {
$file = $cn->get_array("select me_file,me_parameter,me_javascript,me_type\n\t\tfrom menu_ref\n\t\tjoin profile_menu using (me_code)\n\t\tjoin profile_user using (p_id)\n\t\twhere\n\t\tpm_id=\$1 and\n\t\tuser_name=\$2 and\n\t\t(me_file is not null or trim(me_file) <>'' or\n\t\tme_javascript is not null or trim (me_javascript) <> '')", array($module, $g_user->login));
if (count($file) == 0) {
return;
}
if ($file[0]['me_file'] != "") {
if ($file[0]['me_parameter'] !== "") {
// if there are paramter put them in superglobal
$array = compute_variable($file[0]['me_parameter']);
put_global($array);
}
if (DEBUG) {
echo $file[0]['me_file'], " param : ", $file[0]['me_parameter'];
}
/*
* Log the file we input to put in the folder test-noalyss for replaying it
*/
if (LOGINPUT) {
$file_loginput = fopen($_ENV['TMP'] . '/scenario-' . $_SERVER['REQUEST_TIME'] . '.php', 'a+');
fwrite($file_loginput, "include '" . $file[0]['me_file'] . "';");
fwrite($file_loginput, "\n");
fclose($file_loginput);
}
// if file is not a plugin, include the file, otherwise
// include the plugin launcher
if ($file[0]['me_type'] != 'PL') {
require_once $file[0]['me_file'];
} else {
require 'extension_get.inc.php';
}
exit;
}
if ($file[0]['me_javascript'] != '') {
$js = str_replace('<DOSSIER>', dossier::id(), $file[0]['me_javascript']);
echo create_script($js);
}
}
$level++;
}
示例14: test_me
static function test_me()
{
$cn = new Database(dossier::id());
$a = new Acc_Tva($cn);
echo $a->get_info();
$a->set_parameter("id", 1);
$a->load();
$a->set_parameter("id", 0);
$a->set_parameter("rate", "0.2222");
$a->set_parameter("label", "test");
$a->save();
$a->load();
print_r($a);
$a->set_parameter("comment", "un cht'it test");
$a->save();
$a->load();
print_r($a);
$a->delete();
}
示例15: input_new
function input_new()
{
$single = new Tool_Uos("dup");
echo '<form method="post" style="display:inline">';
echo $single->hidden();
echo HtmlInput::hidden("p_action", "fiche");
echo dossier::hidden();
echo $this->input();
// CreateCategory($cn,$search);
echo HtmlInput::submit("add_modele", _("Sauve"));
echo '</FORM>';
}