当前位置: 首页>>代码示例>>PHP>>正文


PHP info_admin函数代码示例

本文整理汇总了PHP中info_admin函数的典型用法代码示例。如果您正苦于以下问题:PHP info_admin函数的具体用法?PHP info_admin怎么用?PHP info_admin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了info_admin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dol_print_error

    $db->free($result);
} else {
    dol_print_error($db);
}
/*
 * Ecran ajout/suppression permission
 */
$linkback = '<a href="' . DOL_URL_ROOT . '/user/index.php">' . $langs->trans("BackToList") . '</a>';
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
if ($user->admin) {
    print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
}
// Show warning about external users
if (empty($user->societe_id)) {
    print info_admin(showModulesExludedForExternal($modules)) . "\n";
}
// For multicompany transversal mode
// TODO Place a hook here
if (!empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode)) {
    $aEntities = array_keys($permsgroupbyentity);
    sort($aEntities);
    $entity = GETPOST('entity', 'int') ? GETPOST('entity', 'int') : $aEntities[0];
    $head = entity_prepare_head($object, $aEntities);
    $title = $langs->trans("Entities");
    dol_fiche_head($head, $entity, $title, 1, 'multicompany@multicompany');
}
print "\n";
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Module") . '</td>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:perms.php

示例2: picto_from_langcode

    print '</div>';
    print '</form>';
} else {
    $var = true;
    // Language
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre"><td>' . $langs->trans("Parameters") . '</td><td>' . $langs->trans("Value") . '</td><td>&nbsp;</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("DefaultLanguage") . '</td><td>';
    $s = picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
    print $s ? $s . ' ' : '';
    print $conf->global->MAIN_LANG_DEFAULT == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_" . $conf->global->MAIN_LANG_DEFAULT);
    print '</td>';
    print '<td width="20">';
    if ($user->admin && $conf->global->MAIN_LANG_DEFAULT != 'auto') {
        print info_admin($langs->trans("SubmitTranslation" . ($conf->global->MAIN_LANG_DEFAULT == 'en_US' ? 'ENUS' : ''), $conf->global->MAIN_LANG_DEFAULT), 1);
    }
    print '</td>';
    print "</tr>";
    $var = !$var;
    print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("EnableMultilangInterface") . '</td><td>' . yn($conf->global->MAIN_MULTILANGS) . '</td>';
    print '<td width="20">&nbsp;</td>';
    print "</tr>";
    print '</table><br>' . "\n";
    // Themes
    show_theme(null, 0);
    print '<br>';
    // List of search forms to show
    if (!empty($searchform)) {
        print '<table class="noborder" width="100%">';
        print '<tr class="liste_titre"><td width="35%">' . $langs->trans("PermanentLeftSearchForm") . '</td><td>' . $langs->trans("Activated") . '</td><td>&nbsp;</td></tr>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:ihm.php

示例3: accessforbidden

  accessforbidden();



/*
 * View
 */

llxHeader();

$form = new Form($db);


print_fiche_titre($langs->trans("SystemToolsArea"),'','setup');

print $langs->trans("SystemToolsAreaDesc").'<br>';
print "<br>";


if ($message) print $message.'<br>';


print info_admin($langs->trans("SystemAreaForAdminOnly")).'<br>';



$db->close();

llxFooter('$Date: 2011/08/03 00:45:43 $ - $Revision: 1.7 $');
?>
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:index.php

示例4: info_admin

print '</td><td>' . $langs->trans("LDAPFieldTownExample") . '</td>';
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_TOWN"' . ($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS == $conf->global->LDAP_CONTACT_FIELD_TOWN ? ' checked="checked"' : '') . "></td>";
print '</tr>';
// COUNTRY
$var = !$var;
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("LDAPFieldCountry") . '</td><td>';
print '<input size="25" type="text" name="fieldcountry" value="' . $conf->global->LDAP_CONTACT_FIELD_COUNTRY . '">';
print '</td><td>&nbsp;</td>';
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_COUNTRY"' . ($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS == $conf->global->LDAP_CONTACT_FIELD_COUNTRY ? ' checked="checked"' : '') . "></td>";
print '</tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '><td colspan="4" align="center"><input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td></tr>';
print '</table>';
print '</form>';
print '</div>';
print info_admin($langs->trans("LDAPDescValues"));
/*
 * Test de la connexion
 */
$butlabel = $langs->trans("LDAPTestSynchroContact");
$testlabel = 'test';
$key = $conf->global->LDAP_KEY_CONTACTS;
$dn = $conf->global->LDAP_CONTACT_DN;
$objectclass = $conf->global->LDAP_CONTACT_OBJECT_CLASS;
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
if (function_exists("ldap_connect")) {
    if ($_GET["action"] == 'test') {
        // Creation objet
        $object = new Contact($db);
        $object->initAsSpecimen();
        // Test synchro
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:ldap_contacts.php

示例5: form_attach_new_file

 /**
  *  Show form to upload a new file
  *
  *  @param  string	$url			Url
  *  @param  string	$title			Title zone (Title or '' or 'none')
  *  @param  int		$addcancel		1=Add 'Cancel' button
  *	@param	int		$sectionid		If upload must be done inside a particular ECM section
  * 	@param	int		$perm			Value of permission to allow upload
  *  @param  int		$size           Length of input file area
  *  @param	Object	$object			Object to use (when attachment is done on an element)
  *  @param	string	$options		Add an option column
  *  @param	boolean	$useajax		Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used.
  *  @param	string	$savingdocmask	Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
  *  @param	string	$linkfiles		1=Also add form to link files, 0=Do not show form to link files
  *  @param	string	$htmlname		Name and id of HTML form
  * 	@return	int						<0 if KO, >0 if OK
  */
 function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile')
 {
     global $conf, $langs, $hookmanager;
     $hookmanager->initHooks(array('formfile'));
     if (!empty($conf->browser->layout) && $conf->browser->layout != 'classic') {
         $useajax = 0;
     }
     if (!empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax || $useajax == 2) {
         // TODO: Check this works with 2 forms on same page
         // TODO: Check this works with GED module, otherwise, force useajax to 0
         // TODO: This does not support option savingdocmask
         // TODO: This break feature to upload links too
         return $this->_formAjaxFileUpload($object);
     } else {
         $maxlength = $size;
         $out = "\n\n<!-- Start form attach new file -->\n";
         if (empty($title)) {
             $title = $langs->trans("AttachANewFile");
         }
         if ($title != 'none') {
             $out .= load_fiche_titre($title, null, null);
         }
         $out .= '<form name="' . $htmlname . '" id="' . $htmlname . '" action="' . $url . '" enctype="multipart/form-data" method="POST">';
         $out .= '<input type="hidden" id="' . $htmlname . '_section_dir" name="section_dir" value="">';
         $out .= '<input type="hidden" id="' . $htmlname . '_section_id"  name="section_id" value="' . $sectionid . '">';
         $out .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
         $out .= '<table width="100%" class="nobordernopadding">';
         $out .= '<tr>';
         if (!empty($options)) {
             $out .= '<td>' . $options . '</td>';
         }
         $out .= '<td valign="middle" class="nowrap">';
         $max = $conf->global->MAIN_UPLOAD_DOC;
         // En Kb
         $maxphp = @ini_get('upload_max_filesize');
         // En inconnu
         if (preg_match('/m$/i', $maxphp)) {
             $maxphp = $maxphp * 1024;
         }
         // Now $max and $maxphp are in Kb
         if ($maxphp > 0) {
             $max = min($max, $maxphp);
         }
         if ($max > 0) {
             $out .= '<input type="hidden" name="max_file_size" value="' . $max * 1024 . '">';
         }
         $out .= '<input class="flat" type="file" name="userfile" size="' . $maxlength . '"';
         $out .= empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '';
         $out .= '>';
         $out .= '&nbsp;';
         $out .= '<input type="submit" class="button" name="sendit" value="' . $langs->trans("Upload") . '"';
         $out .= empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '';
         $out .= '>';
         if ($addcancel) {
             $out .= ' &nbsp; ';
             $out .= '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
         }
         if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
             if ($perm) {
                 $langs->load('other');
                 //$out .= ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
                 $out .= ' ';
                 $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphp), 1);
                 //$out .= ')';
             }
         } else {
             $out .= ' (' . $langs->trans("UploadDisabled") . ')';
         }
         $out .= "</td></tr>";
         if ($savingdocmask) {
             $out .= '<tr>';
             if (!empty($options)) {
                 $out .= '<td>' . $options . '</td>';
             }
             $out .= '<td valign="middle" class="nowrap">';
             $out .= '<input type="checkbox" checked name="savingdocmask" value="' . dol_escape_js($savingdocmask) . '"> ' . $langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
             $out .= '</td>';
             $out .= '</tr>';
         }
         $out .= "</table>";
         $out .= '</form>';
         if (empty($sectionid)) {
             $out .= '<br>';
//.........这里部分代码省略.........
开发者ID:Samara94,项目名称:dolibarr,代码行数:101,代码来源:html.formfile.class.php

示例6: select_type_actions

 /**
  *  Output list of type of event
  *
  *  @param	string		$selected       Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'
  *  @param  string		$htmlname       Nom champ formulaire
  *  @param	string		$excludetype	Type to exclude
  *  @param	string		$onlyautoornot	Group list by auto events or not: We keep only the 2 generic lines (AC_OTH and AC_OTH_AUTO)
  * 	@return	void
  */
 function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0)
 {
     global $langs, $user, $form;
     if (!is_object($form)) {
         $form = new Form($db);
     }
     require_once DOL_DOCUMENT_ROOT . '/comm/action/class/cactioncomm.class.php';
     require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
     $caction = new CActionComm($this->db);
     // Suggest a list with manual events or all auto events
     $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot);
     array_unshift($arraylist, '&nbsp;');
     // Add empty line at start
     //asort($arraylist);
     if ($selected == 'manual') {
         $selected = 'AC_OTH';
     }
     if ($selected == 'auto') {
         $selected = 'AC_OTH_AUTO';
     }
     print $form->selectarray($htmlname, $arraylist, $selected);
     if ($user->admin && empty($onlyautoornot)) {
         print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
     }
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:34,代码来源:html.formactions.class.php

示例7: unset

            unset($liste[$key]);
        }
        $var = !$var;
        print '<tr ' . $bc[$var] . '>';
        print '<td width="16">' . img_picto_common($key, $objmodelexport->getPictoForKey($key)) . '</td>';
        $text = $objmodelexport->getDriverDescForKey($key);
        $label = $listeall[$key];
        print '<td>' . $form->textwithpicto($label, $text) . '</td>';
        print '<td>' . $objmodelexport->getLibLabelForKey($key) . '</td><td align="right">' . $objmodelexport->getLibVersionForKey($key) . '</td></tr>' . "\n";
    }
    print '</table>';
    print '</div>';
    print '<table width="100%">';
    if ($sqlusedforexport && $user->admin) {
        print '<tr><td>';
        print info_admin($langs->trans("SQLUsedForExport") . ':<br> ' . $sqlusedforexport);
        print '</td></tr>';
    }
    print '</table>';
    print '<table width="100%"><tr><td width="50%">';
    if (!is_dir($conf->export->dir_temp)) {
        dol_mkdir($conf->export->dir_temp);
    }
    // Affiche liste des documents
    // NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste
    $formfile->show_documents('export', '', $upload_dir, $_SERVER["PHP_SELF"] . '?step=5&datatoexport=' . $datatoexport, $liste, 1, !empty($_POST['model']) ? $_POST['model'] : 'csv', 1, 1);
    print '</td><td width="50%">&nbsp;</td></tr>';
    print '</table>';
}
print '<br>';
llxFooter();
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:export.php

示例8: main_area

/**
 *  Begin main area
 *
 *  @param	string	$title		Title
 *  @return	void
 */
function main_area($title = '')
{
    global $conf, $langs;
    if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) {
        print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->' . "\n";
    }
    if (empty($conf->dol_hide_leftmenu)) {
        print '<div id="id-right">';
    }
    print "\n";
    if (!empty($conf->dol_use_jmobile)) {
        print '<div data-role="page">';
    }
    print '<div class="fiche"> <!-- begin div class="fiche" -->' . "\n";
    if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) {
        print info_admin($langs->trans("WarningYouAreInMaintenanceMode", $conf->global->MAIN_ONLY_LOGIN_ALLOWED));
    }
}
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:24,代码来源:main.inc.php

示例9: info_admin

 print '</td></tr>';
 print '</table>';
 if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) {
     print '<br>';
     /*
     	    // Warning 1
         	if ($linuxlike)
         	{
         		$sendmailoption=ini_get('mail.force_extra_parameters');
         		if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption))
         		{
         			print info_admin($langs->trans("SendmailOptionNotComplete"));
         		}
         	}*/
     // Warning 2
     print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA"));
 }
 // Boutons actions
 print '<div class="tabsAction">';
 print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit">' . $langs->trans("Modify") . '</a>';
 if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || !$linuxlike) {
     if (function_exists('fsockopen') && $port && $server) {
         print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testconnect">' . $langs->trans("DoTestServerAvailability") . '</a>';
     }
 } else {
     print '<a class="butActionRefused" href="#" title="' . $langs->trans("FeatureNotAvailableOnLinux") . '">' . $langs->trans("DoTestServerAvailability") . '</a>';
 }
 print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=test&amp;mode=init">' . $langs->trans("DoTestSend") . '</a>';
 if (!empty($conf->fckeditor->enabled)) {
     print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testhtml&amp;mode=init">' . $langs->trans("DoTestSendHTML") . '</a>';
 }
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:mails.php

示例10: select_type_actions

 /**
  *  Output html select list of type of event
  *
  *  @param	string		$selected       Type pre-selected (can be 'manual', 'auto' or 'AC_xxx')
  *  @param  string		$htmlname       Nom champ formulaire
  *  @param	string		$excludetype	A type to exclude ('systemauto', 'system', '')
  *  @param	string		$onlyautoornot	1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type
  *  @param	int		    $hideinfohelp	1=Do not show info help
  *  @param  int		    $multiselect    1=Allow multiselect of action type
  * 	@return	void
  */
 function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0)
 {
     global $langs, $user, $form, $conf;
     if (!is_object($form)) {
         $form = new Form($db);
     }
     require_once DOL_DOCUMENT_ROOT . '/comm/action/class/cactioncomm.class.php';
     require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
     $caction = new CActionComm($this->db);
     // Suggest a list with manual events or all auto events
     $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot);
     array_unshift($arraylist, '&nbsp;');
     // Add empty line at start
     //asort($arraylist);
     if ($selected == 'manual') {
         $selected = 'AC_OTH';
     }
     if ($selected == 'auto') {
         $selected = 'AC_OTH_AUTO';
     }
     if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) {
         unset($arraylist['AC_OTH_AUTO']);
     }
     if (!empty($multiselect)) {
         if (!is_array($selected) && !empty($selected)) {
             $selected = explode(',', $selected);
         }
         print $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
     } else {
         print $form->selectarray($htmlname, $arraylist, $selected);
     }
     if ($user->admin && empty($onlyautoornot) && empty($hideinfohelp)) {
         print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
     }
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:46,代码来源:html.formactions.class.php

示例11: main_area

/**
 *  Begin main area
 *
 *  @param	string	$title		Title
 *  @return	void
 */
function main_area($title = '') {
    global $conf, $langs;

    print '<div class="container">';

    if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
        print info_admin($langs->trans("WarningYouAreInMaintenanceMode", $conf->global->MAIN_ONLY_LOGIN_ALLOWED));
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:14,代码来源:main.inc.php

示例12: assign_values

    /**
     *  Set content of ->tpl array, to use into template
     *
     *  @param	string		$action    Type of action
     *  @param	int			$id			Id
     *  @return	string					HTML output
     */
    function assign_values(&$action, $id)
    {
        global $conf, $langs, $user, $canvas;
        global $form, $formcompany, $objsoc;
        if ($action == 'add' || $action == 'update') {
            $this->assign_post();
        }
        foreach ($this->object as $key => $value) {
            $this->tpl[$key] = $value;
        }
        $this->tpl['error'] = $this->error;
        $this->tpl['errors'] = $this->errors;
        if ($action == 'create' || $action == 'edit') {
            if ($conf->use_javascript_ajax) {
                $this->tpl['ajax_selectcountry'] = "\n" . '<script type="text/javascript" language="javascript">
				jQuery(document).ready(function () {
						jQuery("#selectcountry_id").change(function() {
							document.formsoc.action.value="' . $action . '";
							document.formsoc.canvas.value="' . $canvas . '";
							document.formsoc.submit();
						});
					})
				</script>' . "\n";
            }
            if (is_object($objsoc) && $objsoc->id > 0) {
                $this->tpl['company'] = $objsoc->getNomUrl(1);
                $this->tpl['company_id'] = $objsoc->id;
            } else {
                $this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1);
            }
            // Civility
            $this->tpl['select_civility'] = $formcompany->select_civility($this->object->civility_id);
            // Predefined with third party
            if (isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) {
                if (dol_strlen(trim($this->object->address)) == 0) {
                    $this->tpl['address'] = $objsoc->address;
                }
                if (dol_strlen(trim($this->object->zip)) == 0) {
                    $this->object->zip = $objsoc->zip;
                }
                if (dol_strlen(trim($this->object->town)) == 0) {
                    $this->object->town = $objsoc->town;
                }
                if (dol_strlen(trim($this->object->phone_pro)) == 0) {
                    $this->object->phone_pro = $objsoc->phone;
                }
                if (dol_strlen(trim($this->object->fax)) == 0) {
                    $this->object->fax = $objsoc->fax;
                }
                if (dol_strlen(trim($this->object->email)) == 0) {
                    $this->object->email = $objsoc->email;
                }
            }
            // Zip
            $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
            // Town
            $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
            if (dol_strlen(trim($this->object->country_id)) == 0) {
                $this->object->country_id = $objsoc->country_id;
            }
            // Country
            $this->tpl['select_country'] = $form->select_country($this->object->country_id, 'country_id');
            $countrynotdefined = $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')';
            if ($user->admin) {
                $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
            }
            // State
            if ($this->object->country_id) {
                $this->tpl['select_state'] = $formcompany->select_state($this->object->fk_departement, $this->object->country_code);
            } else {
                $this->tpl['select_state'] = $countrynotdefined;
            }
            // Public or private
            $selectarray = array('0' => $langs->trans("ContactPublic"), '1' => $langs->trans("ContactPrivate"));
            $this->tpl['select_visibility'] = $form->selectarray('priv', $selectarray, $this->object->priv, 0);
        }
        if ($action == 'view' || $action == 'edit' || $action == 'delete') {
            // Emailing
            if (!empty($conf->mailing->enabled)) {
                $langs->load("mails");
                $this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
            }
            // Linked element
            $this->tpl['contact_element'] = array();
            $i = 0;
            $this->object->load_ref_elements();
            if (!empty($conf->commande->enabled)) {
                $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForOrders");
                $this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_commande ? $this->object->ref_commande : $langs->trans("NoContactForAnyOrder");
                $i++;
            }
            if (!empty($conf->propal->enabled)) {
                $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForProposals");
//.........这里部分代码省略.........
开发者ID:Samara94,项目名称:dolibarr,代码行数:101,代码来源:actions_contactcard_common.class.php

示例13: info_admin

// Security warning repertoire install existe (si utilisateur admin)
if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) {
    $message = '';
    // Check if install lock file is present
    $lockfile = DOL_DATA_ROOT . '/install.lock';
    if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT . "/install")) {
        $langs->load("errors");
        //if (! empty($message)) $message.='<br>';
        $message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT) . ' ' . $langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT . "/install"));
    }
    // Conf files must be in read only mode
    if (is_writable($conffile)) {
        $langs->load("errors");
        //$langs->load("other");
        //if (! empty($message)) $message.='<br>';
        $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly") . ' ' . $langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT . "/install"));
    }
    if ($message) {
        print $message;
        //$message.='<br>';
        //print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install"));
    }
}
//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
llxFooter();
$db->close();
/**
 *  Show weather logo. Logo to show depends on $totallate and values for
 *  $conf->global->MAIN_METEO_OFFSET
 *  $conf->global->MAIN_METEO_GAP
 *
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:index.php

示例14: OtpTranslate

    require_once '../../../core/lib/admin.lib.php';
} else {
    require_once '../../core/lib/admin.lib.php';
}
require_once __DIR__ . '/../class/OtpTranslate.class.php';
$otplangs = new OtpTranslate('', $conf);
$otplangs->setDefaultLang($langs->getDefaultLang());
$otplangs->load('otp@otp');
$title = $otplangs->trans('OTPAdminTitle');
llxHeader('', $title);
$otplangs->load('admin');
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $otplangs->trans("BackToModuleList") . '</a>';
print_fiche_titre($title, $linkback);
print '<br />';
if (!function_exists('mcrypt_encrypt')) {
    echo info_admin($otplangs->trans('OTPAdminNotCompatible'));
    llxFooter();
    die;
}
print '<div class="titre">' . $otplangs->trans('OTPAdminUsage') . '</div>';
print '

<p>' . sprintf($otplangs->trans('OTPAdminInfoDevices'), '<a href="http://en.wikipedia.org/wiki/HMAC-based_One-time_Password_Algorithm">', '</a>', '<a href="https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8">', '</a>', '<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=es">', '</a>', '<a href="https://support.google.com/accounts/answer/1066447?hl=es">', '</a>') . '</p>

<p>' . $otplangs->trans('OTPAdminInfoRegenerate') . '</p>

<p>' . $otplangs->trans('OTPAdminInfoConfig') . '</p>

<p style="text-align:center">' . sprintf($otplangs->trans('OTPAdminInfoLine'), '<i style="font-family:monospace;font-weight:bold">$dolibarr_main_authentication=\'dolibarr\';</i>', '<i style="font-family:monospace;font-weight:bold">$dolibarr_main_authentication=\'otp\';</i>') . '</p>

<p>' . $otplangs->trans('OTPAdminInfoLogin') . '</p>
开发者ID:Getron,项目名称:dolibarr-otp,代码行数:31,代码来源:admin.php

示例15: post_admin_check

        /* 数据检查 */
        post_admin_check(array($_POST['field'] => $_POST['val']));
        /* 管理员信息 */
        $info = info_admin(array('admin_id' => $_POST['id']));
        /* 更新数据库 */
        $db->update(tname('admin'), array($_POST['field'] => trim($_POST['val'])), 'admin_id=' . $info['admin_id']);
        /* 写入日志和系统提示 */
        admin_log(admin_privilege_name_fk('admin.php', 'edit') . ': ' . $info['name']);
        make_json_ok();
    }
    make_json_fail();
} elseif ($_REQUEST['act'] == 'del') {
    /* 权限检查 */
    admin_privilege_valid('admin.php', 'del');
    /* 管理员信息(连表角色,拥有信任的角色信息) */
    $info = info_admin(array('admin_id' => $_POST['id']));
    /* 允许删除检查 */
    allow_del($info);
    /* 删除管理员 */
    del_admin(array('admin_id' => $info['admin_id']));
    /* 初始化管理员的权限文件 */
    init_privilege_sys_pfile($info['username']);
    /* 写入日志和系统提示 */
    admin_log(admin_privilege_name_fk('admin.php', 'del') . ': ' . $info['name']);
    make_json_ok();
} elseif ($_REQUEST['act'] == 'exportdo') {
    /* 权限检查 */
    admin_privilege_valid('admin.php', 'list');
    /* 要导出的字段 */
    $fields['sql'] = tname('admin') . '.username,' . tname('admin') . '.name,' . tname('role') . '.name AS role_name';
    $fields['filter'] = 'username,name,role_name';
开发者ID:laiello,项目名称:lengdoframe,代码行数:31,代码来源:admin.php


注:本文中的info_admin函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。