• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP gettext函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetXMLTreeProfile

function GetXMLTreeProfile($xmlloc)
{
    if (file_exists($xmlloc)) {
        $data = implode('', file($xmlloc));
    } else {
        $fp = fopen($xmlloc, 'r');
        $data = fread($fp, 100000000);
        fclose($fp);
    }
    $data = preg_replace("/<knows>.*<\\/knows>/is", "", $data);
    $parser = xml_parser_create('UTF-8');
    xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0);
    xml_parse_into_struct($parser, $data, $vals, $index);
    xml_parser_free($parser);
    $code = xml_get_error_code($parser);
    if ($code != XML_ERROR_NONE) {
        global $messages;
        $messages[] = gettext("XML error: ") . xml_error_string($code);
    }
    $tree = array();
    $i = 0;
    if (isset($vals[$i]['attributes'])) {
        $tree[$vals[$i]['tag']][]['ATTRIBUTES'] = $vals[$i]['attributes'];
        $index = count($tree[$vals[$i]['tag']]) - 1;
        $tree[$vals[$i]['tag']][$index] = array_merge($tree[$vals[$i]['tag']][$index], GetChildren($vals, $i));
    } else {
        $tree[$vals[$i]['tag']][] = GetChildren($vals, $i);
    }
    return $tree;
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:30,代码来源:main.php


示例2: data

 public function data($message = '')
 {
     if (!is_string($message)) {
         return Error::set(lang('Error', 'stringParameter', '1.(message)'));
     }
     return gettext($message);
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:7,代码来源:GT.php


示例3: __construct

 public function __construct($name, $title, $link = null, $icon = null)
 {
     // If we have a link; we're actually an <a class='btn'>
     if (isset($link)) {
         $this->_attributes['href'] = $link;
         $this->_tagName = 'a';
         $this->addClass('btn-default');
         unset($this->_attributes['type']);
         if (isset($icon)) {
             $this->_attributes['icon'] = $icon;
         }
     } else {
         if (isset($icon)) {
             $this->_tagSelfClosing = false;
             $this->_tagName = 'button';
             $this->_attributes['value'] = gettext($title);
             $this->_attributes['icon'] = $icon;
         } else {
             $this->_tagSelfClosing = true;
             $this->_attributes['value'] = gettext($title);
             $this->addClass('btn-primary');
         }
     }
     parent::__construct($name, $title, null);
     if (isset($link)) {
         unset($this->_attributes['name']);
     }
 }
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:28,代码来源:Button.class.php


示例4: getOptionsSupported

 function getOptionsSupported()
 {
     $MapTypes = array();
     // order matters here because the first allowed map is selected if the 'gmap_starting_map' is not allowed
     if (getOption('gmap_map_hybrid')) {
         $MapTypes[gettext('Hybrid')] = 'HYBRID';
     }
     if (getOption('gmap_map_roadmap')) {
         $MapTypes[gettext('Map')] = 'ROADMAP';
     }
     if (getOption('gmap_map_satellite')) {
         $MapTypes[gettext('Satellite')] = 'SATELLITE';
     }
     if (getOption('gmap_map_terrain')) {
         $MapTypes[gettext('Terrain')] = 'TERRAIN';
     }
     $defaultMap = getOption('gmap_starting_map');
     if (array_search($defaultMap, $MapTypes) === false) {
         // the starting map is not allowed, pick a new one
         $temp = $MapTypes;
         $defaultMap = array_shift($temp);
         setOption('gmap_starting_map', $defaultMap);
     }
     return array(gettext('Allowed maps') => array('key' => 'gmap_allowed_maps', 'type' => OPTION_TYPE_CHECKBOX_ARRAY, 'order' => 1, 'checkboxes' => array(gettext('Hybrid') => 'gmap_map_hybrid', gettext('Map') => 'gmap_map_roadmap', gettext('Satellite') => 'gmap_map_satellite', gettext('Terrain') => 'gmap_map_terrain'), 'desc' => gettext('Select the map types that are allowed.')), gettext('Initial map display selection') => array('key' => 'gmap_starting_map', 'type' => OPTION_TYPE_SELECTOR, 'order' => 2, 'selections' => $MapTypes, 'desc' => gettext('Select the initial type of map to display.')), gettext('Map display') => array('key' => 'gmap_display', 'type' => OPTION_TYPE_SELECTOR, 'order' => 3, 'selections' => array(gettext('show') => 'show', gettext('hide') => 'hide', gettext('colorbox') => 'colorbox'), 'desc' => gettext('Select <em>hide</em> to initially hide the map. Select <em>colorbox</em> for the map to display in a colorbox. Select <em>show</em> and the map will display when the page loads.')), gettext('Map controls') => array('key' => 'gmap_control_type', 'type' => OPTION_TYPE_RADIO, 'order' => 4, 'buttons' => array(gettext('None') => 'none', gettext('Default') => 'DEFAULT', gettext('Dropdown') => 'DROPDOWN_MENU', gettext('Horizontal') => 'HORIZONTAL_BAR'), 'desc' => gettext('Display options for the Map type control.')), gettext('Zoom controls') => array('key' => 'gmap_zoom_size', 'type' => OPTION_TYPE_RADIO, 'order' => 5, 'buttons' => array(gettext('Small') => 'SMALL', gettext('Default') => 'DEFAULT', gettext('Large') => 'LARGE'), 'desc' => gettext('Display options for the Zoom control.')), gettext('Max zoom level') => array('key' => 'gmap_cluster_max_zoom', 'type' => OPTION_TYPE_NUMBER, 'order' => 6, 'desc' => gettext('The max zoom level for clustering pictures on map.')), gettext('Map dimensions—width') => array('key' => 'gmap_width', 'type' => OPTION_TYPE_NUMBER, 'order' => 7, 'desc' => gettext('The default width of the map.')), gettext('Map dimensions—height') => array('key' => 'gmap_height', 'type' => OPTION_TYPE_NUMBER, 'order' => 8, 'desc' => gettext('The default height of the map.')), gettext('Map sessions') => array('key' => 'gmap_sessions', 'type' => OPTION_TYPE_CHECKBOX, 'order' => 9, 'desc' => gettext('If checked GoogleMaps will use sessions to pass map data for the <em>colorbox</em> display option. We recommend this option be selected. It protects against reference forgery security attacks and mitigates problems with data exceeding the allowed by some browsers.')));
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:25,代码来源:googleMap.php


示例5: zenphoto_sendmail

function zenphoto_sendmail($msg, $email_list, $subject, $message, $from_mail, $from_name, $cc_addresses, $replyTo, $html = false)
{
    $headers = sprintf('From: %1$s <%2$s>', $from_name, $from_mail) . "\n";
    if (count($cc_addresses) > 0) {
        $cclist = '';
        foreach ($cc_addresses as $cc_name => $cc_mail) {
            $cclist .= ',' . $cc_mail;
        }
        $headers .= 'Cc: ' . substr($cclist, 1) . "\n";
    }
    if ($replyTo) {
        $headers .= 'Reply-To: ' . array_shift($replyTo) . "\n";
    }
    $result = true;
    foreach ($email_list as $to_mail) {
        $result = $result && utf8::send_mail($to_mail, $subject, $message, $headers, '', $html);
    }
    if (!$result) {
        if (!empty($msg)) {
            $msg .= '<br />';
        }
        $msg .= sprintf(gettext('<code>zenphoto_sendmail</code> failed to send <em>%s</em> to one or more recipients.'), $subject);
    }
    return $msg;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:25,代码来源:zenphoto_sendmail.php


示例6: __construct

 function __construct($steam_object = FALSE)
 {
     self::$PATH = PATH_EXTENSIONS . "units_extern/";
     self::$DISPLAY_NAME = gettext("External Resource");
     self::$DISPLAY_DESCRIPTION = gettext("You can use this unit type for providing external web resources in an course. In the preferences of this unit you can specify an external web link that will thereafter be accessable as unit content.");
     parent::__construct(PATH_EXTENSIONS . "units_extern.xml", $steam_object);
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:units_extern.extension.class.php


示例7: sitemap_printAvailableSitemaps

function sitemap_printAvailableSitemaps()
{
    $cachefolder = SERVERPATH . '/' . STATIC_CACHE_FOLDER . '/sitemap/';
    $dirs = array_diff(scandir($cachefolder), array('.', '..', '.DS_Store', 'Thumbs.db', '.htaccess', '.svn'));
    echo '<h2>' . gettext('Available sitemap files:') . '</h2>';
    if (!$dirs) {
        echo '<p>' . gettext('No sitemap files available.') . '</p>';
    } else {
        echo '<ol>';
        foreach ($dirs as $dir) {
            $filemtime = filemtime($cachefolder . $dir);
            $lastchange = date('Y-m-d H:m:s', $filemtime);
            ?>
			<li><a target="_blank" href="<?php 
            echo FULLWEBPATH . '/' . STATIC_CACHE_FOLDER;
            ?>
/sitemap/<?php 
            echo $dir;
            ?>
"><?php 
            echo $dir;
            ?>
</a> (<small><?php 
            echo $lastchange;
            ?>
)</small>
			</li>
			<?php 
        }
        echo '</ol>';
    }
}
开发者ID:rb26,项目名称:zenphoto,代码行数:32,代码来源:sitemap-extended-admin.php


示例8: printNews

function printNews($side)
{
    $pos = zp_filter_slot('admin_overview', 'comment_form_print10Most') !== false;
    if ($pos && $side == 'left' || !$pos && $side == 'right') {
        if ($connected = is_connected()) {
            require_once dirname(__FILE__) . '/zenphoto_news/rsslib.php';
        }
        ?>
		<div class="box" id="overview-news">
		<h2 class="h2_bordered"><?php 
        echo gettext("News from Zenphoto.org");
        ?>
</h2>
		<?php 
        if ($connected) {
            echo RSS_Display("http://www.zenphoto.org/index.php?rss-news&withimages", 5);
        } else {
            ?>
			<ul>
				<li><?php 
            echo gettext('A connection to <em>Zenphoto.org</em> could not be established.');
            ?>
				</li>
			</ul>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
    return $side;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:32,代码来源:zenphoto_news.php


示例9: newsclient_pagesetup

function newsclient_pagesetup()
{
    // register links --
    global $profile_id;
    global $PAGE;
    global $CFG;
    $page_owner = $profile_id;
    if (isloggedin() && $CFG->your_resources_enabled) {
        if (defined("context") && context == "resources" && $page_owner == $_SESSION['userid']) {
            $PAGE->menu[] = array('name' => 'resources', 'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/feeds/\" class=\"selected\" >" . gettext("Your Resources") . '</a></li>');
        } else {
            $PAGE->menu[] = array('name' => 'resources', 'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/feeds/\" >" . gettext("Your Resources") . '</a></li>');
        }
        $rss_username = run("users:id_to_name", $page_owner);
    }
    if (defined("context") && context == "resources" && $CFG->your_resources_enabled) {
        if ($page_owner != -1) {
            if (run("permissions:check", "rss") && logged_on && $page_owner == $_SESSION['userid']) {
                $PAGE->menu_sub[] = array('name' => 'newsfeed:subscription', 'html' => a_hrefg($CFG->wwwroot . $_SESSION['username'] . "/feeds/", gettext("Feeds")));
                $PAGE->menu_sub[] = array('name' => 'newsfeed:subscription:publish:blog', 'html' => a_hrefg($CFG->wwwroot . "_rss/blog.php?page_owner=" . $_SESSION['userid'], gettext("Publish to blog")));
            }
            $PAGE->menu_sub[] = array('name' => 'newsclient', 'html' => a_hrefg($CFG->wwwroot . $rss_username . "/feeds/all/", gettext("View aggregator")));
        }
        $PAGE->menu_sub[] = array('name' => 'feed', 'html' => a_hrefg($CFG->wwwroot . "_rss/popular.php", gettext("Popular Feeds")));
        /*
        $PAGE->menu_sub[] = array( 'name' => 'feed',
                                   'html' => a_hrefg( $CFG->wwwroot."help/feeds_help.php", 
                                                      "Page help"));
        */
    }
}
开发者ID:pzingg,项目名称:saugus_elgg,代码行数:31,代码来源:lib.php


示例10: _getInput

    protected function _getInput()
    {
        $element = parent::_getInput();
        $options = '';
        foreach ($this->_values as $value => $name) {
            // Things can get weird if we have mixed types
            $sval = $this->_value;
            if (gettype($value) == "integer" && gettype($sval) == "string") {
                $value = strval($value);
            }
            if (isset($this->_attributes['multiple'])) {
                $selected = in_array($value, (array) $sval);
            } else {
                $selected = $sval == $value;
            }
            if (!empty(trim($name)) || is_numeric($name)) {
                $name_str = htmlspecialchars(gettext($name));
            } else {
                // Fixes HTML5 validation: Element option without attribute label must not be empty
                $name_str = "&nbsp;";
            }
            $options .= '<option value="' . htmlspecialchars($value) . '"' . ($selected ? ' selected' : '') . '>' . $name_str . '</option>';
        }
        return <<<EOT
\t{$element}
\t\t{$options}
\t</select>
EOT;
    }
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:29,代码来源:Select.class.php


示例11: pseudo_sendmail

function pseudo_sendmail($msg, $email_list, $subject, $message, $from_mail, $from_name, $cc_addresses)
{
    global $_zp_UTF8;
    $filename = str_replace(array('<', '>', ':', '"' . '/' . '\\', '|', '?', '*'), '_', $subject);
    $path = dirname(dirname(__FILE__)) . '/' . DATA_FOLDER . '/' . $filename . '.txt';
    $f = fopen($path, 'w');
    fwrite($f, str_pad('*', 49, '-') . "\n");
    $tolist = '';
    foreach ($email_list as $to) {
        $tolist .= ',' . $to;
    }
    fwrite($f, sprintf(gettext('To: %s'), substr($tolist, 1)) . "\n");
    fwrite($f, sprintf('From: %1$s <%2$s>', $from_name, $from_mail) . "\n");
    if (count($cc_addresses) > 0) {
        $cclist = '';
        foreach ($cc_addresses as $cc_name => $cc_mail) {
            $cclist .= ',' . $cc_mail;
        }
        fwrite($f, sprintf(gettext('Cc: %s'), substr($cclist, 1)) . "\n");
    }
    fwrite($f, sprintf(gettext('Subject: %s'), $subject) . "\n");
    fwrite($f, str_pad('*', 49, '-') . "\n");
    fwrite($f, $message . "\n");
    fclose($f);
    clearstatcache();
    return $msg;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:27,代码来源:pseudomail.php


示例12: __toString

    public function __toString()
    {
        $element = parent::__toString();
        $title = htmlspecialchars(gettext($this->_title));
        $body = implode('', $this->_groups);
        $hdricon = "";
        $bodyclass = '<div class="panel-body">';
        if ($this->_collapsible & COLLAPSIBLE) {
            $hdricon = '<span class="widget-heading-icon">' . '<a data-toggle="collapse" href="#' . $this->_attributes['id'] . '_panel-body">' . '<i class="fa fa-plus-circle"></i>' . '</a>' . '</span>';
            $bodyclass = '<div id="' . $this->_attributes['id'] . '_panel-body" class="panel-body collapse ';
            if ($this->_collapsible & SEC_CLOSED) {
                $bodyclass .= 'out">';
            } else {
                $bodyclass .= 'in">';
            }
        }
        return <<<EOT
\t{$element}
\t\t<div class="panel-heading">
\t\t\t<h2 class="panel-title">{$title}{$hdricon}</h2>
\t\t</div>
\t\t{$bodyclass}
\t\t\t{$body}
\t\t</div>
\t</div>
EOT;
    }
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:27,代码来源:Section.class.php


示例13: printLoginZone

/**
 * Prints out the links for login/out, register formular if asked
 */
function printLoginZone()
{
    if (!zp_loggedin() && (function_exists('printUserLogin_out') || function_exists('printUserLogin_out') || function_exists('printRegistrationForm'))) {
        $multi = 0;
        echo '<div id="loginout" class=" push_5 grid_10">';
        if (zp_loggedin() && function_exists('printUserLogin_out')) {
            printUserLogin_out('', '', false);
            $multi++;
        }
        if (!zp_loggedin() && function_exists('printUserLogin_out')) {
            if ($multi) {
                echo ' - ';
            }
            printCustomPageURL(gettext('Login'), 'login', '', '');
            $multi++;
        }
        if (!zp_loggedin() && function_exists('printRegistrationForm')) {
            if ($multi) {
                echo ' - ';
            }
            printCustomPageURL(gettext('Register for this site'), 'register', '', '');
        }
        echo '</div>';
    }
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:28,代码来源:functions.php


示例14: print_states

function print_states($tracker)
{
    global $rulescnt;
    $rulesid = "";
    $bytes = 0;
    $states = 0;
    $packets = 0;
    $evaluations = 0;
    $stcreations = 0;
    $rules = get_pf_rules($rulescnt, $tracker);
    if (is_array($rules)) {
        foreach ($rules as $rule) {
            $bytes += $rule['bytes'];
            $states += $rule['states'];
            $packets += $rule['packets'];
            $evaluations += $rule['evaluations'];
            $stcreations += $rule['state creations'];
            if (strlen($rulesid) > 0) {
                $rulesid .= ",";
            }
            $rulesid .= "{$rule['id']}";
        }
    }
    printf("<a href=\"diag_dump_states.php?ruleid=%s\" data-toggle=\"popover\" data-trigger=\"hover focus\" title=\"%s\" ", $rulesid, gettext("States details"));
    printf("data-content=\"evaluations: %s<br>packets: %s<br>bytes: %s<br>states: %s<br>state creations: %s\" data-html=\"true\">", format_number($evaluations), format_number($packets), format_bytes($bytes), format_number($states), format_number($stcreations));
    printf("%d/%s</a><br>", format_number($states), format_bytes($bytes));
}
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:27,代码来源:firewall_rules.php


示例15: RunFreeQuery

function RunFreeQuery()
{
    global $cnInfoCentral;
    global $aRowClass;
    global $rsQueryResults;
    global $sSQL;
    global $iQueryID;
    //Run the SQL
    $rsQueryResults = RunQuery($sSQL);
    if (mysql_error() != "") {
        echo gettext("An error occured: ") . mysql_errno() . "--" . mysql_error();
    } else {
        $sRowClass = "RowColorA";
        echo "<table align=\"center\" cellpadding=\"5\" cellspacing=\"0\">";
        echo "<tr class=\"" . $sRowClass . "\">";
        //Loop through the fields and write the header row
        for ($iCount = 0; $iCount < mysql_num_fields($rsQueryResults); $iCount++) {
            echo "<td align=\"center\"><b>" . mysql_field_name($rsQueryResults, $iCount) . "</b></td>";
        }
        echo "</tr>";
        //Loop through the recordsert
        while ($aRow = mysql_fetch_array($rsQueryResults)) {
            $sRowClass = AlternateRowStyle($sRowClass);
            echo "<tr class=\"" . $sRowClass . "\">";
            //Loop through the fields and write each one
            for ($iCount = 0; $iCount < mysql_num_fields($rsQueryResults); $iCount++) {
                echo "<td align=\"center\">" . $aRow[$iCount] . "</td>";
            }
            echo "</tr>";
        }
        echo "</table>";
        echo "<br><p class=\"ShadedBox\" style=\"border-style: solid; margin-left: 50px; margin-right: 50 px; border-width: 1px;\"><span class=\"SmallText\">" . str_replace(Chr(13), "<br>", htmlspecialchars($sSQL)) . "</span></p>";
    }
}
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:34,代码来源:QuerySQL.php


示例16: getOptionsSupported

 function getOptionsSupported()
 {
     global $_zp_gallery, $_zp_images_classes, $mysetoptions;
     $dir = opendir($albumdir = $_zp_gallery->getAlbumDir());
     $albums = array();
     while ($dirname = readdir($dir)) {
         if (is_dir($albumdir . $dirname) && substr($dirname, 0, 1) != '.' || hasDynamicAlbumSuffix($dirname)) {
             $albums[] = filesystemToInternal($dirname);
         }
     }
     closedir($dir);
     $albums = array_unique($albums);
     natcasesort($albums);
     $lista = array();
     foreach ($albums as $album) {
         $lista[$album] = 'filter_file_searches_albums_' . $album;
     }
     $list = array_keys($_zp_images_classes);
     natcasesort($list);
     $listi = array();
     foreach ($list as $suffix) {
         $listi[$suffix] = 'filter_file_searches_images_' . $suffix;
     }
     return array(gettext('Albums') => array('key' => 'filter_file_searches_albums', 'type' => OPTION_TYPE_CHECKBOX_UL, 'checkboxes' => $lista, 'desc' => gettext("Check album names to be ignored.")), gettext('Images') => array('key' => 'filter_file_searches_images', 'type' => OPTION_TYPE_CHECKBOX_UL, 'checkboxes' => $listi, 'desc' => gettext('Check image suffixes to be ignored.')));
 }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:25,代码来源:filter-fileSearches.php


示例17: process_button

    function process_button($transactionID = 0, $key= "") {
		global $order, $currencies, $currency;

		$my_currency = strtoupper(BASE_CURRENCY);

		if (!in_array($my_currency, $this->paypal_allowed_currencies)) {
			$my_currency = 'USD';
		}
		$currencyObject = new currencies();
		$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
					 tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
					 tep_draw_hidden_field('item_name', gettext('Payment for ').STORE_NAME) .
					 tep_draw_hidden_field('rm', '2') .
//					 tep_draw_hidden_field('bn', 'Credits_BuyNow_WPS_'.substr($order->customer['country'],0,2)) .
//					 tep_draw_hidden_field('country', substr($order->customer['country'],0,2)) .
					 tep_draw_hidden_field('lc', LANG) .
					 tep_draw_hidden_field('charset', 'UTF-8') .
					 tep_draw_hidden_field('email', $order->customer['email_address']) .
					 tep_draw_hidden_field('no_shipping', '1') .
					 tep_draw_hidden_field('PHPSESSID', session_id()) .
					 tep_draw_hidden_field('amount', number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency))) .
//					 tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) .
					 tep_draw_hidden_field('currency_code', $my_currency) .
					 tep_draw_hidden_field('notify_url', tep_href_link("checkout_process.php?transactionID=".$transactionID."&sess_id=".session_id()."&key=".$key, '', 'SSL')) .
					 tep_draw_hidden_field('return', tep_href_link("userinfo.php", '', 'SSL')) .
					 tep_draw_hidden_field('cbt', gettext('Return to ').STORE_NAME) .
					 tep_draw_hidden_field('cancel_return', tep_href_link("userinfo.php", '', 'SSL'));

		return $process_button_string;
    }
开发者ID:nixonch,项目名称:a2billing,代码行数:30,代码来源:paypal.php


示例18: block_formContent

 public function block_formContent($context, array $blocks = array())
 {
     // line 3
     echo "    <div class=\"form-group required\">\n        <label for=\"codigo\">";
     // line 4
     echo gettext("Código");
     echo "</label>\n        <input id=\"codigo\" type=\"text\" name=\"codigo\" class=\"form-control\" value=\"";
     // line 5
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["model"]) ? $context["model"] : null, "codigo", array()), "html", null, true);
     echo "\" maxlength=\"10\" />\n    </div>\n    <div class=\"form-group required\">\n        <label for=\"nome\">";
     // line 8
     echo gettext("Nome");
     echo "</label>\n        <input id=\"nome\" type=\"text\" name=\"nome\" class=\"form-control\" value=\"";
     // line 9
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["model"]) ? $context["model"] : null, "nome", array()), "html", null, true);
     echo "\" maxlength=\"50\" />\n    </div>\n    <div class=\"form-group required\">\n        <label for=\"grupo\">";
     // line 12
     echo gettext("Grupo");
     echo "</label>\n        <select id=\"grupo\" name=\"grupo_id\" class=\"form-control\">\n            <option value=\"\">";
     // line 14
     echo gettext("Selecione");
     echo "</option>\n            ";
     // line 15
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["grupos"]) ? $context["grupos"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
         // line 16
         echo "            <option value=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "id", array()), "html", null, true);
         echo "\" ";
         if ($this->getAttribute($context["item"], "id", array()) == $this->getAttribute($this->getAttribute(isset($context["model"]) ? $context["model"] : null, "grupo", array()), "id", array())) {
             echo "selected=\"selected\"";
         }
         echo ">";
         echo twig_escape_filter($this->env, $context["item"], "html", null, true);
         echo "</option>\n            ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 18
     echo "        </select>\n    </div>\n    <div class=\"form-group required\">\n        <label for=\"status\">Status</label>\n        <select id=\"status\" name=\"status\" class=\"form-control\">\n            <option value=\"\">";
     // line 23
     echo gettext("Selecione");
     echo "</option>\n            <option value=\"1\" ";
     // line 24
     if ($this->getAttribute(isset($context["model"]) ? $context["model"] : null, "status", array()) == 1) {
         echo "selected=\"selected\"";
     }
     echo ">";
     echo gettext("Ativo");
     echo "</option>\n            <option value=\"0\" ";
     // line 25
     if ($this->getAttribute(isset($context["model"]) ? $context["model"] : null, "status", array()) == "0") {
         echo "selected=\"selected\"";
     }
     echo ">";
     echo gettext("Inativo");
     echo "</option>\n        </select>\n    </div>\n";
 }
开发者ID:EDEJR92,项目名称:novoSGA,代码行数:60,代码来源:fc6e4cda3d29e90ace302e8ca2b15d0489f2734985b9bf45fc6cfc84f74ad81d.php


示例19: get_cmd

function get_cmd()
{
    if ($_REQUEST['cmd'] == 'mailq') {
        #exec("/usr/local/bin/mailq" . escapeshellarg('^'.$m.$j." ".$hour.".*".$grep)." /var/log/maillog", $lists);
        exec(POSTFIX_LOCALBASE . "/bin/mailq", $mailq);
        print '<table class="tabcont" width="100%" border="0" cellpadding="8" cellspacing="0">';
        print '<tr><td colspan="6" valign="top" class="listtopic">' . gettext($_REQUEST['cmd'] . " Results") . '</td></tr>';
        print '<tr><td class="listlr"><strong>SID</strong></td>';
        print '<td class="listlr"><strong>size</strong></td>';
        print '<td class="listlr"><strong>date</strong></td>';
        print '<td class="listlr"><strong>sender</strong></td>';
        print '<td class="listlr"><strong>info</strong></td>';
        print '<td class="listlr"><strong>Recipient </strong></td></tr>';
        #print '<table class="tabcont" width="100%" border="0" cellpadding="8" cellspacing="0">';
        $td = '<td valign="top" class="listlr">';
        $sid = "";
        foreach ($mailq as $line) {
            if (preg_match("/-Queue ID- --Size--/", $line, $matches)) {
                print "";
            } elseif (preg_match("/(\\w+)\\s+(\\d+)\\s+(\\w+\\s+\\w+\\s+\\d+\\s+\\d+:\\d+:\\d+)\\s+(.*)/", $line, $matches)) {
                print '<tr>' . $td . $matches[1] . '</td>' . $td . $matches[2] . '</td>' . $td . $matches[3] . '</td>' . $td . $matches[4];
                $sid = $matches[1];
            } elseif (preg_match("/(\\s+|)(\\W\\w+.*)/", $line, $matches) && $sid != "") {
                print $td . $matches[2] . '</td>';
            } elseif (preg_match("/\\s+(\\w+.*)/", $line, $matches) && $sid != "") {
                print $td . $matches[1] . '</td></tr>';
                $sid = "";
            }
        }
        print '</table>';
    }
    if ($_REQUEST['cmd'] == 'qshape') {
        if ($_REQUEST['qshape'] != "") {
            exec(POSTFIX_LOCALBASE . "/bin/qshape -" . preg_replace("/\\W/", "", $_REQUEST['type']) . " " . preg_replace("/\\W/", "", $_REQUEST['qshape']), $qshape);
        } else {
            exec(POSTFIX_LOCALBASE . "/bin/qshape", $qshape);
        }
        print '<table class="tabcont" width="100%" border="0" cellpadding="8" cellspacing="0">';
        print '<tr><td colspan="12" valign="top" class="listtopic">' . gettext($_REQUEST['cmd'] . " Results") . '</td></tr>';
        $td = '<td valign="top" class="listlr">';
        $sid = "";
        foreach ($qshape as $line) {
            if (preg_match("/\\s+(T\\s.*)/", $line, $matches)) {
                print '<tr><td class="listlr"></td>';
                foreach (explode(" ", preg_replace("/\\s+/", " ", $matches[1])) as $count) {
                    print '<td class="listlr"><strong>' . $count . '</strong></td>';
                }
                print "</tr>";
            } else {
                print "<tr>";
                $line = preg_replace("/^\\s+/", "", $line);
                $line = preg_replace("/\\s+/", " ", $line);
                foreach (explode(" ", $line) as $count) {
                    print '<td class="listlr"><strong>' . $count . '</strong></td>';
                }
                print "</tr>";
            }
        }
    }
}
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:60,代码来源:postfix_queue.php


示例20: can_delete_gateway_item

/**
 * check if gateway_item can be deleted
 * @param int $id sequence item in $a_gateways
 * @param array $a_gateways gateway list
 * @param array $input_errors input errors
 * @return bool has errors
 */
function can_delete_gateway_item($id, $a_gateways, &$input_errors)
{
    global $config;
    if (!isset($a_gateways[$id])) {
        return false;
    }
    if (isset($config['gateways']['gateway_group'])) {
        foreach ($config['gateways']['gateway_group'] as $group) {
            foreach ($group['item'] as $item) {
                $items = explode("|", $item);
                if ($items[0] == $a_gateways[$id]['name']) {
                    $input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Gateway Group '%s'"), $a_gateways[$id]['name'], $group['name']);
                    break;
                }
            }
        }
    }
    if (isset($config['staticroutes']['route'])) {
        foreach ($config['staticroutes']['route'] as $route) {
            if ($route['gateway'] == $a_gateways[$id]['name']) {
                $input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Static Route '%s'"), $a_gateways[$id]['name'], $route['network']);
                break;
            }
        }
    }
    if (isset($input_errors) && count($input_errors) > 0) {
        return false;
    }
    return true;
}
开发者ID:8191,项目名称:opnsense-core,代码行数:37,代码来源:system_gateways.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getthp函数代码示例发布时间:2022-05-15
下一篇:
PHP gettemplate函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap