예제 #1
0
파일: dict.php 프로젝트: Samara94/dolibarr
 $obj = $db->fetch_object($resql);
 //print_r($obj);
 print '<tr ' . $bc[$var] . ' id="rowid-' . $obj->rowid . '">';
 if ($action == 'edit' && $rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code)) {
     print '<form action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '" method="POST">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="page" value="' . $page . '">';
     print '<input type="hidden" name="rowid" value="' . $rowid . '">';
     $tmpaction = 'edit';
     $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
     $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction);
     // Note that $action and $object may have been modified by some hooks
     $error = $hookmanager->error;
     $errors = $hookmanager->errors;
     if (empty($reshook)) {
         fieldList($fieldlist, $obj, $tabname[$id], 'edit');
     }
     print '<td colspan="3" align="right"><a name="' . (!empty($obj->rowid) ? $obj->rowid : $obj->code) . '">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="' . $langs->trans("Modify") . '">';
     print '&nbsp;<input type="submit" class="button" name="actioncancel" value="' . $langs->trans("Cancel") . '"></td>';
 } else {
     $tmpaction = 'view';
     $parameters = array('var' => $var, 'fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
     $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction);
     // Note that $action and $object may have been modified by some hooks
     $error = $hookmanager->error;
     $errors = $hookmanager->errors;
     if (empty($reshook)) {
         foreach ($fieldlist as $field => $value) {
             $showfield = 1;
             $align = "left";
             $valuetoshow = $obj->{$fieldlist}[$field];
예제 #2
0
echo _FAMILY;
?>
:</td>
					<td style="width: 20%">
					<select class="jss-FieldAuto" name="family" onchange="javascript: frOpciones.submit()" size="1">
					<option>-</option>
					<?php 
echo putOptions("select family from [familys] order by family", $family);
?>
					</select></td>
				</tr>
				<tr>
					<td style="text-align: left">
					<select class="jss-FieldAuto" name="buscaPor" size="1">
					<?php 
echo fieldList($strbase, $buscaPor);
?>
					</select> </td>
					<td style="text-align: left">
					<input id="valorBuscar" class="jss-FieldAuto" name="valorBuscar" size="45" value="<?php 
echo $valorBuscar;
?>
">
					</td>
					<td style="text-align: right" class="jss-Bar"><?php 
echo _RATE;
?>
:</td>
					<td style="text-align: left">
					<select class="jss-FieldAuto" name="rate" onchange="javascript: frOpciones.submit()" size="1">
					<option>-</option>
예제 #3
0
파일: dict.php 프로젝트: ADDAdev/Dolibarr
 $obj = $db->fetch_object($resql);
 //print_r($obj);
 print '<tr ' . $bc[$var] . ' id="rowid-' . $obj->rowid . '">';
 if ($action == 'edit' && $rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code)) {
     print '<form action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '" method="POST">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="page" value="' . $page . '">';
     print '<input type="hidden" name="rowid" value="' . $rowid . '">';
     $tmpaction = 'edit';
     $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
     $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction);
     // Note that $action and $object may have been modified by some hooks
     $error = $hookmanager->error;
     $errors = $hookmanager->errors;
     if (empty($reshook)) {
         fieldList($fieldlist, $obj, $tabname[$id]);
     }
     print '<td colspan="3" align="right"><a name="' . (!empty($obj->rowid) ? $obj->rowid : $obj->code) . '">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="' . $langs->trans("Modify") . '">';
     print '&nbsp;<input type="submit" class="button" name="actioncancel" value="' . $langs->trans("Cancel") . '"></td>';
 } else {
     $tmpaction = 'view';
     $parameters = array('var' => $var, 'fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
     $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction);
     // Note that $action and $object may have been modified by some hooks
     $error = $hookmanager->error;
     $errors = $hookmanager->errors;
     if (empty($reshook)) {
         foreach ($fieldlist as $field => $value) {
             $showfield = 1;
             $align = "left";
             $valuetoshow = $obj->{$fieldlist}[$field];
예제 #4
0
파일: dict.php 프로젝트: netors/dolibarr
 print_liste_field_titre($langs->trans("Status"), "dict.php", "active", ($page ? 'page=' . $page . '&' : '') . '&id=' . GETPOST("id"), "", 'align="center"', $sortfield, $sortorder);
 print '<td colspan="2"  class="liste_titre">&nbsp;</td>';
 print '</tr>';
 // Lines with values
 while ($i < $num) {
     $obj = $db->fetch_object($resql);
     $var = !$var;
     //print_r($obj);
     print "<tr " . $bc[$var] . ">";
     if ($_GET["action"] == 'modify' && $_GET["rowid"] == ($obj->rowid ? $obj->rowid : $obj->code)) {
         print '<form action="dict.php" method="post">';
         print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
         print '<input type="hidden" name="id" value="' . GETPOST("id") . '">';
         print '<input type="hidden" name="page" value="' . $page . '">';
         print '<input type="hidden" name="rowid" value="' . $_GET["rowid"] . '">';
         fieldList($fieldlist, $obj);
         print '<td colspan="3" align="right"><a name="' . ($obj->rowid ? $obj->rowid : $obj->code) . '">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="' . $langs->trans("Modify") . '">';
         print '&nbsp;<input type="submit" class="button" name="actioncancel" value="' . $langs->trans("Cancel") . '"></td>';
     } else {
         foreach ($fieldlist as $field => $value) {
             $showfield = 1;
             $valuetoshow = $obj->{$fieldlist}[$field];
             if ($valuetoshow == 'all') {
                 $valuetoshow = $langs->trans('All');
             } else {
                 if ($fieldlist[$field] == 'pays') {
                     if (empty($obj->pays_code)) {
                         $valuetoshow = '-';
                     } else {
                         $key = $langs->trans("Country" . strtoupper($obj->pays_code));
                         $valuetoshow = $key != "Country" . strtoupper($obj->pays_code) ? $obj->pays_code . " - " . $key : $obj->pays;
 }
 print_liste_field_titre($langs->trans("Status"), "reports.php", "active", ($page ? 'page=' . $page . '&' : '') . '&id=' . GETPOST("id"), "", 'align="center"', $sortfield, $sortorder);
 print '<td colspan="2"  class="liste_titre">&nbsp;</td>';
 print '</tr>';
 // Lines with values
 while ($i < $num) {
     $obj = $db->fetch_object($resql);
     $var = !$var;
     print "<tr " . $bc[$var] . ">";
     if (GETPOST("action", "aZ") == 'modify' && GETPOST("id", "int") == 2 && GETPOST("rowid", "int") == ($obj->rowid ? $obj->rowid : $obj->code)) {
         print '<form action="reports.php" method="post">';
         print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
         print '<input type="hidden" name="id" value="' . GETPOST("id") . '">';
         print '<input type="hidden" name="page" value="' . $page . '">';
         print '<input type="hidden" name="rowid" value="' . GETPOST("rowid", "int") . '">';
         fieldList($fieldlist, $obj, true);
         print '<td colspan="3" align="right"><a name="' . ($obj->rowid ? $obj->rowid : $obj->code) . '">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="' . $langs->trans("Modify") . '">';
         print '&nbsp;<input type="submit" class="button" name="actioncancel" value="' . $langs->trans("Cancel") . '"></td>';
     } else {
         foreach ($fieldlist as $field => $value) {
             $showfield = 1;
             $valuetoshow = $obj->{$fieldlist}[$field];
             if ($valuetoshow == '0000') {
                 $valuetoshow = $langs->trans('NoAssigned');
             } else {
                 if ($fieldlist[$field] == 'fk_group') {
                     $key = $langs->trans("group" . strtoupper($obj->fk_group));
                     $valuetoshow = $obj->fk_group && $key != "group" . strtoupper($obj->fk_group) ? $key : $obj->{$fieldlist}[$field];
                 } else {
                     if ($fieldlist[$field] == 'name') {
                         $key = $langs->trans("report" . strtoupper($obj->code));