本文整理汇总了PHP中img_edit函数的典型用法代码示例。如果您正苦于以下问题:PHP img_edit函数的具体用法?PHP img_edit怎么用?PHP img_edit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了img_edit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: percentile_actions
/** 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));
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:8,代码来源:percentile_helper.php
示例2: testsurvey_actions
/** 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));
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:9,代码来源:testsurvey_helper.php
示例3: user_actions
/** 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));
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:10,代码来源:user_helper.php
示例4: testcat_actions
/** 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));
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:10,代码来源:testcat_helper.php
示例5: editfieldkey
/**
* Output key field for an editable field
* @param text Text of label
* @param htmlname Name of select field
* @param preselected Preselected value for parameter
* @param paramkey Key of parameter (unique if there is several parameter to show)
* @param paramvalue Value of parameter
* @param perm Permission to allow button to edit parameter
* @param typeofdata Type of data (string by default, email, ...)
* @return string HTML edit field
* TODO no GET or POST in class file, use a param
*/
function editfieldkey($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string')
{
global $langs;
$ret='';
$ret.='<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
$ret.=$langs->trans($text);
$ret.='</td>';
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&'.$paramkey.'='.$paramvalue.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
$ret.='</tr></table>';
return $ret;
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:23,代码来源:html.form.class.php
示例6: comment_actions
/** 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));
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:13,代码来源:comment_helper.php
示例7: Societe
print '</td></tr></table>';
print '</td>';
print '<td colspan="3">';
print $object->display_rib();
print '</td></tr>';
}
// Parent company
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
{
print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('ParentCompany');
print '<td><td align="right">';
if ($user->rights->societe->creer)
print '<a href="'.DOL_URL_ROOT.'/societe/lien.php?socid='.$object->id.'">'.img_edit() .'</a>';
else
print ' ';
print '</td></tr></table>';
print '</td>';
print '<td colspan="3">';
if ($object->parent)
{
$socm = new Societe($db);
$socm->load($object->parent);
print $socm->getNomUrl(1).' '.($socm->code_client?"(".$socm->code_client.")":"");
print $socm->town?' - '.$socm->town:'';
}
else {
print $langs->trans("NoParentCompany");
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:soc.php
示例8: foreach
print '<td align="center">' . $langs->trans("Unique") . '</td>';
print '<td align="center">' . $langs->trans("Required") . '</td>';
print '<td width="80"> </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 " <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
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:facturedet_cust_extrafields.php
示例9: img_edit
print '<td>';
if ($soc->id) {
print $soc->getNomUrl(1);
}
print '</td></tr>';
// Project
if (!empty($conf->projet->enabled)) {
$langs->load('projects');
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($action != 'classify' && $user->rights->deplacement->creer) {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&id=' . $object->id . '">';
print img_edit($langs->trans('SetProject'), 1);
print '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'classify') {
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
} else {
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0);
}
print '</td>';
print '</tr>';
}
// Statut
print '<tr><td>' . $langs->trans("Status") . '</td><td>' . $object->getLibStatut(4) . '</td></tr>';
// Other attributes
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card.php
示例10: img_edit
if ($user->rights->societe->creer) {
print '<a href="' . DOL_URL_ROOT . '/comm/multiprix.php?id=' . $objsoc->id . '">' . img_edit($langs->trans("Modify")) . '</a>';
}
print '</td></tr></table>';
print '</td><td colspan="3">' . $objsoc->price_level . "</td>";
print '</tr>';
}
// Old way to define delivery address (deprecated).
// Now all addresses types (like delivery addresses, invoices addresses,...) are saved as contacts.
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) {
print '<tr><td nowrap>';
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
print $langs->trans("DeliveriesAddress");
print '<td><td align="right">';
if ($user->rights->societe->creer) {
print '<a href="' . DOL_URL_ROOT . '/comm/address.php?socid=' . $objsoc->id . '">' . img_edit($langs->trans("Modify")) . '</a>';
}
print '</td></tr></table>';
print '</td><td colspan="3">';
$sql = "SELECT count(rowid) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_address";
$sql .= " WHERE fk_soc =" . $objsoc->id;
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$objal = $db->fetch_object($resql);
print $objal->nb ? $objal->nb : $langs->trans("NoOtherDeliveryAddress");
} else {
dol_print_error($db);
}
print '</td>';
开发者ID:netors,项目名称:dolibarr,代码行数:31,代码来源:fiche.php
示例11: dol_print_date
print '<input type="hidden" name="action" value="setdate">';
$form->select_date($object->date_bordereau, 'datecreate_', '', '', '', "setdate");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $object->date_bordereau ? dol_print_date($object->date_bordereau, 'day') : ' ';
}
print '</td>';
print '</tr>';
// External ref
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('RefExt');
print '</td>';
if ($action != 'editrefext') {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editrefext&id=' . $object->id . '">' . img_edit($langs->trans('SetRefExt'), 1) . '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editrefext') {
print '<form name="setrefext" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="setrefext">';
print '<input type="text" name="ref_ext" value="' . $object->ref_ext . '">';
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $object->ref_ext;
}
print '</td>';
print '</tr>';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php
示例12:
else
{
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
}
print '</td></tr>';
// Project
if ($conf->projet->enabled)
{
$langs->load("projects");
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project').'</td>';
if (1 == 2 && $user->rights->propale->creer)
{
if ($_GET['action'] != 'classer') print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=classer&id='.$object->id.'">'.img_edit($langs->trans('SetProject')).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($_GET['action'] == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
}
else
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
}
print '</td></tr>';
}
else
{
print '</td></tr></table>';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:propal.php
示例13: img_warning
} else {
print '<td align="left" class="nowrap">';
if ($objp->cotisation == 'yes') {
print $langs->trans("SubscriptionNotReceived");
if ($objp->statut > 0) {
print " " . img_warning();
}
} else {
print ' ';
}
print '</td>';
}
// Actions
print '<td align="center">';
if ($user->rights->adherent->creer) {
print '<a href="card.php?rowid=' . $objp->rowid . '&action=edit&return=list.php">' . img_edit() . '</a>';
}
print ' ';
if ($user->rights->adherent->supprimer) {
print '<a href="card.php?rowid=' . $objp->rowid . '&action=resign&return=list.php">' . img_picto($langs->trans("Resiliate"), 'disable.png') . '</a>';
}
print "</td>";
print "</tr>\n";
$i++;
}
print "</table>\n";
if ($num > $conf->liste_limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
}
} else {
dol_print_error($db);
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:type.php
示例14: price
// Price quantity
print '<td align="right">';
print $objp->price?price($objp->price):"";
print '</td>';
// Unit price
print '<td align="right">';
print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):" ");
print '</td>';
// Modify-Remove
print '<td align="center">';
if ($user->rights->produit->creer || $user->rights->service->creer)
{
print '<a href="fournisseurs.php?id='.$product->id.'&socid='.$objp->socid.'&action=add_price&rowid='.$objp->rowid.'">'.img_edit()."</a>";
print '<a href="fournisseurs.php?id='.$product->id.'&socid='.$objp->socid.'&action=remove_pf&rowid='.$objp->rowid.'">'.img_picto($langs->trans("Remove"),'disable.png').'</a>';
}
print '</td>';
print '</tr>';
$i++;
}
$db->free($resql);
}
else {
dol_print_error($db);
}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:fournisseurs.php
示例15: img_edit
print $company->getNomUrl(1);
} else {
print $langs->trans("NoThirdPartyAssociatedToMember");
}
}
print '</td></tr>';
}
// Login Dolibarr
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans("LinkedToDolibarrUser");
print '</td>';
if ($action != 'editlogin' && $user->rights->adherent->creer) {
print '<td align="right">';
if ($user->rights->user->user->creer) {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=editlogin&rowid=' . $object->id . '">' . img_edit($langs->trans('SetLinkToUser'), 1) . '</a>';
}
print '</td>';
}
print '</tr></table>';
print '</td><td colspan="2" class="valeur">';
if ($action == 'editlogin') {
$form->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $object->id, $object->user_id, 'userid', '');
} else {
if ($object->user_id) {
$form->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $object->id, $object->user_id, 'none');
} else {
print $langs->trans("NoDolibarrAccess");
}
}
print '</td></tr>';
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card_subscriptions.php
示例16: assign_values
//.........这里部分代码省略.........
$this->tpl['localtax'] .= '</td><td>' . $langs->trans("LocalTax2IsUsedES") . '</td><td>';
$this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1);
$this->tpl['localtax'] .= '</td></tr>';
} elseif ($mysoc->localtax1_assuj == "1") {
$this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax1IsUsedES") . '</td><td colspan="3">';
$this->tpl['localtax'] .= $form->selectyesno('localtax1assuj_value', $this->object->localtax1_assuj, 1);
$this->tpl['localtax'] .= '</td><tr>';
} elseif ($mysoc->localtax2_assuj == "1") {
$this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax2IsUsedES") . '</td><td colspan="3">';
$this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1);
$this->tpl['localtax'] .= '</td><tr>';
}
}
} else {
$head = societe_prepare_head($this->object);
$this->tpl['showhead'] = dol_get_fiche_head($head, 'card', '', 0, 'company');
$this->tpl['showend'] = dol_get_fiche_end();
$this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
$this->tpl['checkcustomercode'] = $this->object->check_codeclient();
$this->tpl['checksuppliercode'] = $this->object->check_codefournisseur();
$this->tpl['address'] = dol_nl2br($this->object->address);
$img = picto_from_langcode($this->object->country_code);
if ($this->object->isInEEC()) {
$this->tpl['country'] = $form->textwithpicto(($img ? $img . ' ' : '') . $this->object->country, $langs->trans("CountryIsInEEC"), 1, 0);
}
$this->tpl['country'] = ($img ? $img . ' ' : '') . $this->object->country;
$this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL');
$this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX');
$this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 'AC_EMAIL');
$this->tpl['url'] = dol_print_url($this->object->url);
$this->tpl['tva_assuj'] = yn($this->object->tva_assuj);
// Third party type
$arr = $formcompany->typent_array(1);
$this->tpl['typent'] = $arr[$this->object->typent_code];
if (!empty($conf->global->MAIN_MULTILANGS)) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
//$s=picto_from_langcode($this->default_lang);
//print ($s?$s.' ':'');
$langs->load("languages");
$this->tpl['default_lang'] = $this->default_lang ? $langs->trans('Language_' . $this->object->default_lang) : '';
}
$this->tpl['image_edit'] = img_edit();
$this->tpl['display_rib'] = $this->object->display_rib();
// Sales representatives
$this->tpl['sales_representatives'] = '';
$listsalesrepresentatives = $this->object->getSalesRepresentatives($user);
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) {
$this->tpl['sales_representatives'] .= '<a href="' . DOL_URL_ROOT . '/societe/commerciaux.php?socid=' . $this->object->id . '">';
$this->tpl['sales_representatives'] .= $nbofsalesrepresentative;
$this->tpl['sales_representatives'] .= '</a>';
} else {
if ($nbofsalesrepresentative > 0) {
$userstatic = new User($this->db);
$i = 0;
foreach ($listsalesrepresentatives as $val) {
$userstatic->id = $val['id'];
$userstatic->lastname = $val['name'];
$userstatic->firstname = $val['firstname'];
$this->tpl['sales_representatives'] .= $userstatic->getNomUrl(1);
$i++;
if ($i < $nbofsalesrepresentative) {
$this->tpl['sales_representatives'] .= ', ';
}
}
} else {
$this->tpl['sales_representatives'] .= $langs->trans("NoSalesRepresentativeAffected");
}
}
// Linked member
if (!empty($conf->adherent->enabled)) {
$langs->load("members");
$adh = new Adherent($this->db);
$result = $adh->fetch('', '', $this->object->id);
if ($result > 0) {
$adh->ref = $adh->getFullName($langs);
$this->tpl['linked_member'] = $adh->getNomUrl(1);
} else {
$this->tpl['linked_member'] = $langs->trans("ThirdpartyNotLinkedToMember");
}
}
// Local Tax
// TODO mettre dans une classe propre au pays
if ($mysoc->country_code == 'ES') {
$this->tpl['localtax'] = '';
if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
$this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax1IsUsedES") . '</td>';
$this->tpl['localtax'] .= '<td>' . yn($this->object->localtax1_assuj) . '</td>';
$this->tpl['localtax'] .= '<td>' . $langs->trans("LocalTax2IsUsedES") . '</td>';
$this->tpl['localtax'] .= '<td>' . yn($this->object->localtax2_assuj) . '</td></tr>';
} elseif ($mysoc->localtax1_assuj == "1") {
$this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax1IsUsedES") . '</td>';
$this->tpl['localtax'] .= '<td colspan="3">' . yn($this->object->localtax1_assuj) . '</td></tr>';
} elseif ($mysoc->localtax2_assuj == "1") {
$this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax2IsUsedES") . '</td>';
$this->tpl['localtax'] .= '<td colspan="3">' . yn($this->object->localtax2_assuj) . '</td></tr>';
}
}
}
}
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:101,代码来源:actions_card_common.class.php
示例17: img_edit
print '<tr ' . $bc[$var] . '>';
print '<td colspan="2" align="center">' . $lit->nbRes . ' ' . $langs->trans("TranslationsFound") . '</td>';
print '</tr>';
}
print '</table>';
print '</form>';
if (!empty($lit->searchRes)) {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("File") . '</td>' . "\n";
print '<td>' . $langs->trans("TranslationKey") . '</td>' . "\n";
print '<td>' . $langs->trans("OfficialTranslation") . '</td>' . "\n";
print '<td>' . $langs->trans("CustomizedTranslation") . '</td>' . "\n";
print '<td width="40"> </td>' . "\n";
print '</tr>';
$btedit = '<a class="edittrans">' . img_edit() . '</a>';
$btreset = '<a class="resettrans">' . img_picto($langs->trans('ResetToOfficialTranslation'), 'disable.png') . '</a>';
$pattern = '/' . $word . '/';
if (!empty($other_options['case_insensitive'])) {
$pattern .= 'i';
}
$replace = '<span class="highlight">$0</span>';
foreach ($lit->searchRes as $langfile => $trads) {
foreach ($trads as $key => $val) {
// Textarea pour personnaliser la traduction
$input = '<div class="formcustomtrans"><form method="POST">';
$input .= '<input type="hidden" name="action" value="save_translation" />';
$input .= '<input type="hidden" name="langtosearch" value="' . $langtosearch . '" />';
$input .= '<input type="hidden" name="word" value="' . $word . '" />';
$input .= '<input type="hidden" name="langfile" value="' . $langfile . '" />';
$input .= '<input type="hidden" name="key" value="' . $key . '" />';
开发者ID:ATM-Consulting,项目名称:dolibarr_module_lostintranslation,代码行数:31,代码来源:lostintranslation_setup.php
示例18: while
$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> <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> ' . ' ' . '<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">';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:index.php
示例19: listOfLinks
/**
* 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 ' <a href="' . $_SERVER['PHP_SELF'] . '?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>';
// id= is included into $param
} else {
print ' ';
}
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;
}
开发者ID:Samara94,项目名称:dolibarr,代码行数:95,代码来源:html.formfile.class.php
示例20: User
// User
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
print '<td align="right">';
|
请发表评论