コード例 #1
0
 /** Possible actions for a caller: delete */
 function percentile_actions($percentile_id)
 {
     $CI =& get_instance();
     $edit_link = anchor('percentile/edit/' . $percentile_id, img_edit());
     $delete_link = anchor('percentile/delete/' . $percentile_id, img_delete(), warning(lang('sure_delete_percentile')));
     return implode(' ', array($edit_link, $delete_link));
 }
コード例 #2
0
 /** Possible actions for a language: prioritize and delete */
 function language_actions($language_id)
 {
     $CI =& get_instance();
     $c = $CI->languageModel->get_language_by_id($language_id);
     $d_link = anchor('language/delete/' . $c->id, img_delete(), warning(lang('sure_delete_language')));
     return $d_link;
 }
コード例 #3
0
 /** Possible actions for a testsurvey: edit, view scores, delete */
 function testsurvey_actions($testsurvey_id)
 {
     $inspect_link = anchor('testsurvey/get/' . $testsurvey_id, img_zoom('testsurvey'));
     $find_link = anchor('testsurvey/find/' . $testsurvey_id, img_email(lang('testinvite')));
     $edit_link = anchor('testsurvey/edit/' . $testsurvey_id, img_edit());
     $delete_link = anchor('testsurvey/delete/' . $testsurvey_id, img_delete(), warning(lang('sure_delete_testsurvey')));
     return implode(' ', array($inspect_link, $find_link, $edit_link, $delete_link));
 }
コード例 #4
0
 /** Possible actions for a user: edit, view participants, call, archive, delete */
 function user_actions($user_id)
 {
     $CI =& get_instance();
     $u = $CI->userModel->get_user_by_id($user_id);
     $edit_link = anchor('user/edit/' . $u->id, img_edit());
     $act_link = is_activated($u) ? anchor('user/deactivate/' . $u->id, img_active(TRUE)) : anchor('user/activate/' . $u->id, img_active(FALSE));
     $delete_link = is_admin($u) ? img_delete(TRUE) : anchor('user/delete/' . $u->id, img_delete(), warning(lang('sure_delete_user')));
     return implode(' ', array($edit_link, $act_link, $delete_link));
 }
コード例 #5
0
 /** Possible actions for a testcat: edit, show scores and delete */
 function testcat_actions($testcat_id)
 {
     $CI =& get_instance();
     $scores = $CI->scoreModel->get_scores_by_testcat($testcat_id);
     $edit_link = anchor('testcat/edit/' . $testcat_id, img_edit());
     $score_link = count($scores) > 0 ? anchor('score/testcat/' . $testcat_id, img_scores()) : img_scores(TRUE);
     $delete_link = anchor('testcat/delete/' . $testcat_id, img_delete(), warning(lang('sure_delete_testcat')));
     return implode(' ', array($edit_link, $score_link, $delete_link));
 }
コード例 #6
0
 /** Possible actions for a comment: prioritize and delete */
 function comment_actions($comment_id)
 {
     $CI =& get_instance();
     $c = $CI->commentModel->get_comment_by_id($comment_id);
     $p = $CI->participantModel->get_participant_by_id($c->participant_id);
     $prio_link = anchor('comment/prioritize/' . $comment_id . ($c->priority ? '/0' : ''), img_star(!$c->priority));
     $handled_link = anchor('comment/mark_handled/' . $comment_id . ($c->handled ? '/0' : ''), img_accept(lang('mark_handled'), !$c->handled));
     $edit_link = anchor('comment/edit/' . $comment_id, img_edit());
     $p_link = anchor('participant/edit/' . $c->participant_id, img_edit_participant($p));
     $d_link = anchor('comment/delete/' . $comment_id, img_delete(), warning(lang('sure_delete_comment')));
     return implode(' ', array($prio_link, $handled_link, $edit_link, $p_link, $d_link));
 }
コード例 #7
0
 /** Possible actions for a testinvite: edit, view scores, delete */
 function testinvite_actions($testinvite_id)
 {
     $CI =& get_instance();
     $testinvite = $CI->testInviteModel->get_testinvite_by_id($testinvite_id);
     $scores = $CI->scoreModel->get_scores_by_testinvite($testinvite_id);
     $reminder_available = !$testinvite->datecompleted && $testinvite->datereminder;
     $reminder_link = anchor('testinvite/manual_reminder/' . $testinvite_id, img_email(lang('manual_reminder'), FALSE));
     $score_link = anchor('score/testinvite/' . $testinvite_id, img_scores(empty($scores)));
     $reminder_link = $reminder_available ? $reminder_link : img_email('', TRUE);
     $delete_link = anchor('testinvite/delete/' . $testinvite_id, img_delete(), warning(lang('sure_delete_testinvite')));
     if (is_caller()) {
         $actions = array($reminder_link, $delete_link);
     }
     if (is_leader()) {
         $actions = array($score_link, $reminder_link);
     }
     if (is_admin()) {
         $actions = array($score_link, $reminder_link, $delete_link);
     }
     return implode(' ', $actions);
 }
コード例 #8
0
ファイル: bookmark.lib.php プロジェクト: remyyounes/dolibarr
/**
 *	    \file       htdocs/lib/bookmark.lib.php
 *		\brief      List of functions for bookmark module
 *		\version    $Id: bookmark.lib.php,v 1.6 2011/07/31 23:25:41 eldy Exp $
 *
 *		Ensemble de fonctions de base de dolibarr sous forme d'include
 */

function showArrayOfBookmark($fac)
{
	$sql = "SELECT s.rowid as socid, s.nom, b.rowid as bid";
	$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b";
	$sql .= " WHERE b.fk_soc = s.rowid AND b.fk_user = "******" ORDER BY lower(s.nom) ASC";

	$resql = $db->query($sql);

	if ( $resql )
	{
	  $num = $db->num_rows($resql);
	  $i = 0;
	  if ($num)
	    {
	      print '<table class="noborder" width="100%">';
	      print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Bookmarks")."</td></tr>\n";
	      $var = True;
	      while ($i < $num)
		{
		  $obj = $db->fetch_object($resql);
		  $var = !$var;
		  print "<tr $bc[$var]>";
		  print '<td><a href="fiche.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>';
		  print '<td align="right"><a href="index.php?action=del_bookmark&amp;bid='.$obj->bid.'">'.img_delete().'</a></td>';
		  print '</tr>';
		  $i++;
		}
	      print '</table>';
	    }
	  $db->free($resql);
	}
	else
	{
	  dol_print_error($db);
	}
}
コード例 #9
0
    {
        if(is_object($value))
        {
            print "<tr>";
            print '<td align="center">'.$value->position.'</td>';
            print "<td>".(empty($value->label)?$langs->trans($key1):$langs->trans($value->label))."</td>";
            print "<td>".$key1."</td>";
            print "<td>".$value->type."</td>";
            print '<td align="right">'.$value->length.'</td>';
            print '<td class "content_actions" align="right">';
            print '<a class="sepV_a" href="'.$_SERVER["PHP_SELF"].'?'.'&fields='.$key.'&attrname='.$key1.'&action='.$acts[$value->enable].'">'.$actl[$value->enable].'</a>';
            if($aRow->edit)
            {
                
                print '<a class="sepV_a" href="'.$_SERVER["PHP_SELF"].'?action=edit&fields='.$key.'&attrname='.$key1.'">'.img_edit().'</a>';
                print '<a class="sepV_a" href="'.$_SERVER["PHP_SELF"].'?action=delete&fields='.$key.'&attrname='.$key1.'">'.img_delete().'</a>';
            }
            print '</td>';
            print "</tr>";
        }
    }

    print "</tbody>";
    print "</table>";
    print "</div>";
    
    print $extrafields->_datatables($obj,$key);
    
    print end_box();
    print '</div>';
}
コード例 #10
0
            print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
            // Date operation
            print '<td align="center">' . ($objp->num_chq ? $objp->num_chq : '&nbsp;') . '</td>';
            print '<td>' . dol_trunc($objp->emetteur, 24) . '</td>';
            print '<td>' . dol_trunc($objp->banque, 24) . '</td>';
            print '<td align="right">' . price($objp->amount) . '</td>';
            print '<td align="center">';
            $accountlinestatic->rowid = $objp->rowid;
            if ($accountlinestatic->rowid) {
                print $accountlinestatic->getNomUrl(1);
            } else {
                print '&nbsp;';
            }
            print '</td>';
            if ($object->statut == 0) {
                print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=remove&amp;lineid=' . $objp->rowid . '">' . img_delete() . '</a></td>';
            } else {
                print '<td>&nbsp;</td>';
            }
            print '</tr>';
            $var = !$var;
            $i++;
        }
        print "</table>";
    } else {
        dol_print_error($db);
    }
    dol_fiche_end();
}
/*
 * Boutons Actions
コード例 #11
0
 /**
  * Show array with linked files
  *
  * @param 	Object		$object			Object
  * @param 	int			$permtodelete	Deletion is allowed
  * @param 	string		$action			Action
  * @param 	string		$selected		???
  * @param	string		$param			More param to add into URL
  * @return 	int							Number of links
  */
 public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '')
 {
     global $user, $conf, $langs, $user;
     global $bc;
     global $sortfield, $sortorder;
     $langs->load("link");
     require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
     $link = new Link($this->db);
     $links = array();
     if ($sortfield == "name") {
         $sortfield = "label";
     } elseif ($sortfield == "date") {
         $sortfield = "datea";
     } else {
         $sortfield = null;
     }
     $res = $link->fetchAll($links, $object->element, $object->id, $sortfield, $sortorder);
     $param .= isset($object->id) ? '&id=' . $object->id : '';
     // Show list of associated links
     print load_fiche_titre($langs->trans("LinkedFiles"));
     print '<form action="' . $_SERVER['PHP_SELF'] . ($param ? '?' . $param : '') . '" method="POST">';
     print '<table width="100%" class="liste">';
     print '<tr class="liste_titre">';
     print_liste_field_titre($langs->trans("Links"), $_SERVER['PHP_SELF'], "name", "", $param, 'align="left"', $sortfield, $sortorder);
     print_liste_field_titre("", "", "", "", "", 'align="right"');
     print_liste_field_titre($langs->trans("Date"), $_SERVER['PHP_SELF'], "date", "", $param, 'align="center"', $sortfield, $sortorder);
     print_liste_field_titre('', $_SERVER['PHP_SELF'], "", "", $param, 'align="center"');
     print_liste_field_titre('', '', '');
     print '</tr>';
     $nboflinks = count($links);
     if ($nboflinks > 0) {
         include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
     }
     $var = true;
     foreach ($links as $link) {
         $var = !$var;
         print '<tr ' . $bc[$var] . '>';
         //edit mode
         if ($action == 'update' && $selected === $link->id) {
             print '<td>';
             print '<input type="hidden" name="id" value="' . $object->id . '">';
             print '<input type="hidden" name="linkid" value="' . $link->id . '">';
             print '<input type="hidden" name="action" value="confirm_updateline">';
             print $langs->trans('Link') . ': <input type="text" name="link" size="50" value="' . $link->url . '">';
             print '</td>';
             print '<td>';
             print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
             print '</td>';
             print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
             print '<td align="right"></td>';
             print '<td align="right">';
             print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
             print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
             print '</td>';
         } else {
             print '<td>';
             print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
             print $link->label;
             print '</a>';
             print '</td>' . "\n";
             print '<td align="right"></td>';
             print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
             print '<td align="center"></td>';
             print '<td align="right">';
             print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>';
             // id= is included into $param
             if ($permtodelete) {
                 print ' &nbsp; <a href="' . $_SERVER['PHP_SELF'] . '?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>';
                 // id= is included into $param
             } else {
                 print '&nbsp;';
             }
             print '</td>';
         }
         print "</tr>\n";
     }
     if ($nboflinks == 0) {
         print '<tr ' . $bc[false] . '><td colspan="5">';
         print $langs->trans("NoLinkFound");
         print '</td></tr>';
     }
     print "</table>";
     print '</form>';
     return $nboflinks;
 }
コード例 #12
0
             }
         }
         print '</td>';
         print '<td>';
         $label = $langs->trans("Notify_" . $obj->code) != "Notify_" . $obj->code ? $langs->trans("Notify_" . $obj->code) : $obj->label;
         print $label;
         print '</td>';
         print '<td>';
         if ($obj->type == 'email') {
             print $langs->trans("Email");
         }
         if ($obj->type == 'sms') {
             print $langs->trans("SMS");
         }
         print '</td>';
         print '<td align="right"><a href="fiche.php?socid=' . $socid . '&action=delete&actid=' . $obj->rowid . '">' . img_delete() . '</a></td>';
         print '</tr>';
         $i++;
     }
     $db->free($resql);
 } else {
     dol_print_error($db);
 }
 print '</table>';
 print '<br>';
 // List of notifications done
 print_fiche_titre($langs->trans("ListOfNotificationsDone"), '', '');
 $var = true;
 // Line with titles
 print '<table width="100%" class="noborder">';
 print '<tr class="liste_titre">';
コード例 #13
0
ファイル: categ.php プロジェクト: remyyounes/dolibarr
$result = $db->query($sql);
if ($result)
{
  $num = $db->num_rows($result);
  $i = 0; $total = 0;

  $var=True;
  while ($i < $num)
    {
      $objp = $db->fetch_object($result);
      $var=!$var;
      print "<tr $bc[$var]>";
      print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/budget.php?bid='.$objp->rowid.'">'.$objp->rowid.'</a></td>';
      print "<td>$objp->label</td>";
      print '<td style="text-align: center;"><a href="categ.php?categid='.$objp->rowid.'&amp;action=delete">'.img_delete().'</a></td>';
      print "</tr>";
      $i++;
    }
  $db->free($result);
}

/*
 * Affichage ligne ajout de categorie
 */
$var=!$var;
print "<tr $bc[$var]>";
print "<td>&nbsp;</td><td><input name=\"label\" type=\"text\" size=45></td>";
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
print "</table></form>";
コード例 #14
0
 /**
  *	Output list all export models
  *  TODO Move this into a class htmlxxx.class.php
  *
  *	@return	void
  */
 function list_export_model()
 {
     global $conf, $langs;
     $sql = "SELECT em.rowid, em.field, em.label, em.type, em.filter";
     $sql .= " FROM " . MAIN_DB_PREFIX . "export_model as em";
     $sql .= " ORDER BY rowid";
     $result = $this->db->query($sql);
     if ($result) {
         $num = $this->db->num_rows($result);
         $i = 0;
         while ($i < $num) {
             $obj = $this->db->fetch_object($result);
             $keyModel = array_search($obj->type, $this->array_export_code);
             print "<tr>";
             print '<td><a href=export.php?step=2&action=select_model&exportmodelid=' . $obj->rowid . '&datatoexport=' . $obj->type . '>' . $obj->label . '</a></td>';
             print '<td>';
             print img_object($this->array_export_module[$keyModel]->getName(), $this->array_export_icon[$keyModel]) . ' ';
             print $this->array_export_module[$keyModel]->getName() . ' - ';
             // recuperation du nom de l'export
             $string = $langs->trans($this->array_export_label[$keyModel]);
             print $string != $this->array_export_label[$keyModel] ? $string : $this->array_export_label[$keyModel];
             print '</td>';
             //print '<td>'.$obj->type.$keyModel.'</td>';
             print '<td>' . str_replace(',', ' , ', $obj->field) . '</td>';
             if (!empty($obj->filter)) {
                 $filter = json_decode($obj->filter, true);
                 print '<td>' . str_replace(',', ' , ', $filter['field']) . '</td>';
                 print '<td>' . str_replace(',', ' , ', $filter['value']) . '</td>';
             }
             // suppression de l'export
             print '<td align="right">';
             print '<a href="' . $_SERVER["PHP_SELF"] . '?action=deleteprof&id=' . $obj->rowid . '">';
             print img_delete();
             print '</a>';
             print "</tr>";
             $i++;
         }
     } else {
         dol_print_error($this->db);
     }
 }
コード例 #15
0
         print '<td align="right">' . price($line->price) . "</td>";
         print '<td align="right">' . price($line->price_ttc) . "</td>";
         print '<td align="right">' . price($line->price_min) . '</td>';
         print '<td align="right">' . price($line->price_min_ttc) . '</td>';
         // User
         $userstatic = new User($db);
         $userstatic->fetch($line->fk_user);
         print '<td align="right">';
         print $userstatic->getLoginUrl(1);
         print '</td>';
         // Todo Edit or delete button
         // Action
         if ($user->rights->produit->creer || $user->rights->service->creer) {
             print '<td align="right">';
             print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete_customer_price&amp;socid=' . $soc->id . '&amp;lineid=' . $line->id . '">';
             print img_delete();
             print '</a>';
             print '<a href="' . $_SERVER["PHP_SELF"] . '?action=edit_customer_price&amp;socid=' . $soc->id . '&amp;lineid=' . $line->id . '">';
             print img_edit();
             print '</a>';
             print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;socid=' . $soc->id . '&amp;prodid=' . $line->fk_product . '">';
             print img_info();
             print '</a>';
             print '</td>';
         }
         print "</tr>\n";
     }
     print "</table>";
     print "</form>";
 } else {
     print $langs->trans('None');
コード例 #16
0
ファイル: facture.php プロジェクト: Samara94/dolibarr
     $invoice = new Facture($db);
     while ($i < $num) {
         $obj = $db->fetch_object($resql);
         $invoice->fetch($obj->fk_facture_source);
         print '<tr><td colspan="' . $nbcols . '" align="right">';
         if ($invoice->type == Facture::TYPE_CREDIT_NOTE) {
             print $langs->trans("CreditNote") . ' ';
         }
         if ($invoice->type == Facture::TYPE_DEPOSIT) {
             print $langs->trans("Deposit") . ' ';
         }
         print $invoice->getNomUrl(0);
         print ' :</td>';
         print '<td align="right">' . price($obj->amount_ttc) . '</td>';
         print '<td align="right">';
         print '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
         print '</td></tr>';
         $i++;
         if ($invoice->type == Facture::TYPE_CREDIT_NOTE) {
             $creditnoteamount += $obj->amount_ttc;
         }
         if ($invoice->type == Facture::TYPE_DEPOSIT) {
             $depositamount += $obj->amount_ttc;
         }
     }
 } else {
     dol_print_error($db);
 }
 // Paye partiellement 'escompte'
 if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') {
     print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
コード例 #17
0
    echo $bc[$var];
    ?>
 >
    <td><?php 
    echo $objectlink->getNomUrl(1);
    ?>
</td>
	<td align="center"><?php 
    echo dol_print_date($objectlink->date_contrat, 'day');
    ?>
</td>
	<td align="right">&nbsp;</td>
	<td align="right"><?php 
    echo $objectlink->getLibStatut(6);
    ?>
</td>
	<td align="right"><a href="<?php 
    echo $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&dellinkid=' . $key;
    ?>
"><?php 
    echo img_delete($langs->transnoentitiesnoconv("RemoveLink"));
    ?>
</a></td>
</tr>
<?php 
}
?>

</table>

<!-- END PHP TEMPLATE -->
コード例 #18
0
ファイル: dict.php プロジェクト: Samara94/dolibarr
                                } else {
                                    print $langs->trans("AlwaysActive");
                                }
                            }
                        }
                    }
                    print "</td>";
                    // Modify link
                    if ($iserasable) {
                        print '<td align="center"><a class="reposition" href="' . $url . 'action=edit">' . img_edit() . '</a></td>';
                    } else {
                        print '<td>&nbsp;</td>';
                    }
                    // Delete link
                    if ($iserasable) {
                        print '<td align="center"><a href="' . $url . 'action=delete">' . img_delete() . '</a></td>';
                    } else {
                        print '<td>&nbsp;</td>';
                    }
                    print "</tr>\n";
                }
                $i++;
            }
        }
    } else {
        dol_print_error($db);
    }
    print '</table>';
    print '</form>';
} else {
    /*
コード例 #19
0
     print '<td>';
     print $obj->description;
     print '</td>';
 }
 print '<td class="nowrap">' . $langs->trans("NotConsumed") . '</td>';
 print '<td align="right">' . price($obj->amount_ht) . '</td>';
 print '<td align="right">' . price2num($obj->tva_tx, 'MU') . '%</td>';
 print '<td align="right">' . price($obj->amount_ttc) . '</td>';
 print '<td align="center">';
 print '<a href="' . DOL_URL_ROOT . '/user/fiche.php?id=' . $obj->user_id . '">' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $obj->login . '</a>';
 print '</td>';
 if ($user->rights->societe->creer || $user->rights->facture->creer) {
     print '<td class="nowrap">';
     print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $objsoc->id . '&amp;action=split&amp;remid=' . $obj->rowid . '">' . img_picto($langs->trans("SplitDiscount"), 'split') . '</a>';
     print ' &nbsp; ';
     print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $objsoc->id . '&amp;action=remove&amp;remid=' . $obj->rowid . '">' . img_delete($langs->trans("RemoveDiscount")) . '</a>';
     print '</td>';
 } else {
     print '<td>&nbsp;</td>';
 }
 print '</tr>';
 if ($_GET["action"] == 'split' && $_GET['remid'] == $obj->rowid) {
     print "<tr " . $bc[$var] . ">";
     print '<td colspan="8">';
     $amount1 = price2num($obj->amount_ttc / 2, 'MT');
     $amount2 = $obj->amount_ttc - $amount1;
     $formquestion = array('text' => $langs->trans('TypeAmountOfEachNewDiscount'), array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC") . ' 1', 'value' => $amount1, 'size' => '5'), array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC") . ' 2', 'value' => $amount2, 'size' => '5'));
     $langs->load("dict");
     print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $objsoc->id . '&remid=' . $obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($obj->amount_ttc), $langs->transnoentities("Currency" . $conf->currency)), 'confirm_split', $formquestion, 0, 0);
     print '</td>';
     print '</tr>';
コード例 #20
0
ファイル: fiche.php プロジェクト: netors/dolibarr
         if (!empty($groupslist)) {
             $var = true;
             foreach ($groupslist as $group) {
                 $var = !$var;
                 print "<tr " . $bc[$var] . ">";
                 print '<td>';
                 if ($caneditgroup) {
                     print '<a href="' . DOL_URL_ROOT . '/user/group/fiche.php?id=' . $group->id . '">' . img_object($langs->trans("ShowGroup"), "group") . ' ' . $group->nom . '</a>';
                 } else {
                     print img_object($langs->trans("ShowGroup"), "group") . ' ' . $group->nom;
                 }
                 print '</td>';
                 print '<td align="right">';
                 if ($caneditgroup) {
                     print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $fuser->id . '&amp;action=removegroup&amp;group=' . $group->id . '&amp;entity=' . $group->usergroup_entity . '">';
                     print img_delete($langs->trans("RemoveFromGroup"));
                 } else {
                     print "&nbsp;";
                 }
                 print "</td></tr>\n";
             }
         } else {
             print '<tr ' . $bc[false] . '><td colspan=2>' . $langs->trans("None") . '</td></tr>';
         }
         print "</table>";
         print "<br>";
     }
 }
 /*
  * Fiche en mode edition
  */
コード例 #21
0
ファイル: const.php プロジェクト: TAASA/Dolibarr-ERP-3.8.1
        print '<input type="text" id="note_' . $i . '" class="flat inputforupdate" size="40" name="const[' . $i . '][note]" value="' . htmlspecialchars($obj->note, 1) . '">';
        print '</td>';
        // Entity limit to superadmin
        if (!empty($conf->multicompany->enabled) && !$user->entity) {
            print '<td>';
            print '<input type="text" class="flat" size="1" name="const[' . $i . '][entity]" value="' . $obj->entity . '">';
            print '</td>';
            print '<td align="center">';
        } else {
            print '<td align="center">';
            print '<input type="hidden" name="const[' . $i . '][entity]" value="' . $obj->entity . '">';
        }
        if ($conf->use_javascript_ajax) {
            print '<input type="checkbox" class="flat checkboxfordelete" id="check_' . $i . '" name="const[' . $i . '][check]" value="1">';
        } else {
            print '<a href="' . $_SERVER['PHP_SELF'] . '?rowid=' . $obj->rowid . '&entity=' . $obj->entity . '&action=delete' . (empty($user->entity) && $debug ? '&debug=1' : '') . '">' . img_delete() . '</a>';
        }
        print "</td></tr>\n";
        print "\n";
        $i++;
    }
}
print '</table>';
if ($conf->use_javascript_ajax) {
    print '<br>';
    print '<div id="updateconst" align="right">';
    print '<input type="submit" name="update" class="button" value="' . $langs->trans("Modify") . '">';
    print '</div>';
    print '<div id="delconst" align="right">';
    print '<input type="submit" name="delete" class="button" value="' . $langs->trans("Delete") . '">';
    print '</div>';
コード例 #22
0
 /** Possible actions for a leader: delete */
 function leader_actions($leader_id)
 {
     return anchor('leader/delete/' . $leader_id, img_delete(), warning(lang('sure_delete_leader')));
 }
コード例 #23
0
ファイル: dynamic_prices.php プロジェクト: Samara94/dolibarr
        if ($entry->fk_variable > 0) {
            $res = $price_globals->fetch($entry->fk_variable);
            if ($res > 0) {
                $code = $price_globals->code;
            }
        }
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td>' . $code . '</td>';
        print '<td>' . $entry->description . '</td>';
        print '<td>' . $langs->trans("GlobalVariableUpdaterType" . $entry->type) . '</td>';
        print '<td style="max-width: 250px; word-wrap: break-word; white-space: pre-wrap;">' . $entry->parameters . '</td>';
        print '<td>' . $entry->update_interval . '</td>';
        print '<td>' . $entry->getLastUpdated() . '</td>';
        print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=edit_updater&selection=' . $entry->id . '">' . img_edit() . '</a> &nbsp;';
        print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete_updater&selection=' . $entry->id . '">' . img_delete() . '</a></td>';
        print '</tr>';
    }
    print '</table>';
}
//Updater editor
if ($action == 'create_updater' || $action == 'edit_updater') {
    //Form
    print '<form id="updaterform" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="' . $action . '">';
    print '<input type="hidden" name="selection" value="' . $selection . '">';
    //Table
    print '<br><table summary="listofattributes" class="border centpercent">';
    //Code
    print '<tr>';
コード例 #24
0
ファイル: index.php プロジェクト: Samara94/dolibarr
 $sql .= " FROM " . MAIN_DB_PREFIX . "menu as m";
 $sql .= " WHERE menu_handler = '" . $menu_handler_to_search . "'";
 $sql .= " AND entity = " . $conf->entity;
 $sql .= " AND fk_menu >= 0";
 $sql .= " ORDER BY m.position, m.rowid";
 // Order is position then rowid (because we need a sort criteria when position is same)
 $res = $db->query($sql);
 if ($res) {
     $num = $db->num_rows($res);
     $i = 1;
     while ($menu = $db->fetch_array($res)) {
         if (!empty($menu['langs'])) {
             $langs->load($menu['langs']);
         }
         $titre = $langs->trans($menu['titre']);
         $data[] = array('rowid' => $menu['rowid'], 'fk_menu' => $menu['fk_menu'], 'title' => $titre, 'mainmenu' => $menu['mainmenu'], 'leftmenu' => $menu['leftmenu'], 'fk_mainmenu' => $menu['fk_mainmenu'], 'fk_leftmenu' => $menu['fk_leftmenu'], 'entry' => '<table class="nobordernopadding centpercent"><tr><td>' . '<strong> &nbsp; <a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=edit&menuId=' . $menu['rowid'] . '">' . $titre . '</a></strong>' . '</td><td align="right">' . '<a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=edit&menuId=' . $menu['rowid'] . '">' . img_edit('default', 0, 'class="menuEdit" id="edit' . $menu['rowid'] . '"') . '</a> ' . '<a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=create&menuId=' . $menu['rowid'] . '">' . img_edit_add('default') . '</a> ' . '<a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=delete&menuId=' . $menu['rowid'] . '">' . img_delete('default') . '</a> ' . '&nbsp; &nbsp; &nbsp;' . '<a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=up&menuId=' . $menu['rowid'] . '">' . img_picto("Monter", "1uparrow") . '</a><a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=down&menuId=' . $menu['rowid'] . '">' . img_picto("Descendre", "1downarrow") . '</a>' . '</td></tr></table>');
         $i++;
     }
 }
 // Appelle de la fonction recursive (ammorce)
 // avec recherche depuis la racine.
 //var_dump($data);
 tree_recur($data, $data[0], 0);
 print '</td>';
 print '</tr>';
 print '</table>';
 print '</div>';
 /*
  * Boutons actions
  */
 print '<div class="tabsAction">';
print '<td align="center">' . $langs->trans("Required") . '</td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
$var = True;
foreach ($extrafields->attribute_type as $key => $value) {
    $var = !$var;
    print "<tr " . $bc[$var] . ">";
    print "<td>" . $extrafields->attribute_pos[$key] . "</td>\n";
    print "<td>" . $extrafields->attribute_label[$key] . "</td>\n";
    print "<td>" . $key . "</td>\n";
    print "<td>" . $type2label[$extrafields->attribute_type[$key]] . "</td>\n";
    print '<td align="right">' . $extrafields->attribute_size[$key] . "</td>\n";
    print '<td align="center">' . yn($extrafields->attribute_unique[$key]) . "</td>\n";
    print '<td align="center">' . yn($extrafields->attribute_required[$key]) . "</td>\n";
    print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=edit&attrname=' . $key . '">' . img_edit() . '</a>';
    print "&nbsp; <a href=\"" . $_SERVER["PHP_SELF"] . "?action=delete&attrname={$key}\">" . img_delete() . "</a></td>\n";
    print "</tr>";
    // $i++;
}
print "</table>";
dol_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit') {
    print '<div class="tabsAction">';
    print "<a class=\"butAction\" href=\"" . $_SERVER["PHP_SELF"] . "?action=create\">" . $langs->trans("NewAttribute") . "</a>";
    print "</div>";
}
/* ************************************************************************** */
/* */
/* Creation d'un champ optionnel
/* */
コード例 #26
0
ファイル: price.php プロジェクト: Samara94/dolibarr
                print '<td align="right">';
                print $userstatic->getLoginUrl(1);
                print '</td>';
                // Todo Edit or delete button
                // Action
                if ($user->rights->produit->creer || $user->rights->service->creer) {
                    print '<td align="right">';
                    print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;socid=' . $object->id . '&amp;prodid=' . $line->fk_product . '">';
                    print img_info();
                    print '</a>';
                    print ' ';
                    print '<a href="' . $_SERVER["PHP_SELF"] . '?action=edit_customer_price&amp;socid=' . $object->id . '&amp;lineid=' . $line->id . '">';
                    print img_edit('default', 0, 'style="vertical-align: middle;"');
                    print '</a>';
                    print ' ';
                    print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete_customer_price&amp;socid=' . $object->id . '&amp;lineid=' . $line->id . '">';
                    print img_delete('default', 'style="vertical-align: middle;"');
                    print '</a>';
                    print '</td>';
                }
                print "</tr>\n";
            }
        } else {
            print '<tr ' . $bc[false] . '><td colspan="10">' . $langs->trans('NoPriceSpecificToCustomer') . '</td></tr>';
        }
        print "</table>";
        print "</form>";
    }
}
llxFooter();
$db->close();
コード例 #27
0
ファイル: viewcat.php プロジェクト: Samara94/dolibarr
                if ($typeid == Categorie::TYPE_PRODUCT) {
                    $permission = $user->rights->produit->creer || $user->rights->service->creer;
                }
                if ($typeid == Categorie::TYPE_SUPPLIER) {
                    $permission = $user->rights->societe->creer;
                }
                if ($typeid == Categorie::TYPE_CUSTOMER) {
                    $permission = $user->rights->societe->creer;
                }
                if ($typeid == Categorie::TYPE_MEMBER) {
                    $permission = $user->rights->adherent->creer;
                }
                if ($typeid == Categorie::TYPE_CONTACT) {
                    $permission = $user->rights->societe->creer;
                }
                if ($permission) {
                    print "<a href= '" . $_SERVER['PHP_SELF'] . "?" . (empty($socid) ? 'id' : 'socid') . "=" . $object->id . "&amp;type=" . $typeid . "&amp;removeelem=" . $contact->id . "'>";
                    print img_delete($langs->trans("DeleteFromCat")) . ' ';
                    print $langs->trans("DeleteFromCat") . "</a>";
                }
                print '</td>';
                print "</tr>\n";
            }
        } else {
            print "<tr " . $bc[false] . "><td>" . $langs->trans("ThisCategoryHasNoContact") . "</td></tr>";
        }
        print "</table>\n";
    }
}
llxFooter();
$db->close();
コード例 #28
0
ファイル: ligne.php プロジェクト: NoisyBoy86/Dolibarr_test
    print '<select class="flat" name="cat1">' . $options . '</select>&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Add") . '"></td>';
}
print '</tr>';
$sql = "SELECT c.label, c.rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "bank_class as a, " . MAIN_DB_PREFIX . "bank_categ as c";
$sql .= " WHERE a.lineid=" . $rowid . " AND a.fk_categ = c.rowid";
$sql .= " ORDER BY c.label";
$result = $db->query($sql);
if ($result) {
    $var = True;
    $num = $db->num_rows($result);
    $i = 0;
    $total = 0;
    while ($i < $num) {
        $objp = $db->fetch_object($result);
        $var = !$var;
        print "<tr " . $bc[$var] . ">";
        print "<td>" . $objp->label . "</td>";
        print "<td align=\"center\"><a href=\"budget.php?bid=" . $objp->rowid . "\">" . $langs->trans("ListBankTransactions") . "</a></td>";
        if ($user->rights->banque->modifier) {
            print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=delete_categ&amp;rowid=' . $rowid . '&amp;fk_categ=' . $objp->rowid . '">' . img_delete($langs->trans("Remove")) . '</a></td>';
        }
        print '</tr>';
        $i++;
    }
    $db->free($result);
}
print '</table></form>';
llxFooter();
$db->close();
コード例 #29
0
ファイル: contacts.tpl.php プロジェクト: Samara94/dolibarr
            echo $contactstatic->LibStatut($tab[$i]['statuscontact'], 3);
        }
        ?>
			<?php 
        //if ($object->statut >= 0) echo '</a>';
        ?>
		</div>
		<div class="tagtd nowrap" align="right">
			<?php 
        if ($permission) {
            ?>
				&nbsp;<a href="<?php 
            echo $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=deletecontact&amp;lineid=' . $tab[$i]['rowid'];
            ?>
"><?php 
            echo img_delete();
            ?>
</a>
			<?php 
        }
        ?>
		</div>
	</form>

<?php 
        $i++;
    }
}
?>

</div>
コード例 #30
0
ファイル: traduction.php プロジェクト: Albertopf/prueba
    dol_fiche_end();
    print '<div class="center">';
    print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
    print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
    print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
    print '</div>';
    print '</form>';
} else {
    dol_fiche_head($head, 'translation', $titre, 0, $picto);
    dol_banner_tab($object, 'ref', '', $user->societe_id ? 0 : 1, 'ref');
    $cnt_trans = 0;
    if (!empty($object->multilangs)) {
        foreach ($object->multilangs as $key => $value) {
            $cnt_trans++;
            $s = picto_from_langcode($key);
            print "<br>" . ($s ? $s . ' ' : '') . " <b>" . $langs->trans('Language_' . $key) . ":</b> " . '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&langtodelete=' . $key . '">' . img_delete('', '') . "</a><br>";
            print '<table class="border" width="100%">';
            print '<tr><td width="15%">' . $langs->trans('Label') . '</td><td>' . $object->multilangs[$key]["label"] . '</td></tr>';
            print '<tr><td width="15%">' . $langs->trans('Description') . '</td><td>' . $object->multilangs[$key]["description"] . '</td></tr>';
            print '<tr><td width="15%">' . $langs->trans('Note') . '</td><td>' . $object->multilangs[$key]["note"] . '</td></tr>';
            print '</table>';
        }
    }
    if (!$cnt_trans) {
        print '<br>' . $langs->trans('NoTranslation');
    }
    dol_fiche_end();
}
/* ************************************************************************** */
/*                                                                            */
/* Barre d'action                                                             */