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

PHP intl_get函数代码示例

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

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



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

示例1: onSubmit

 function onSubmit($vals)
 {
     // 1. prepare vals for insertion
     if ($vals['contact_url'] == 'http://') {
         $vals['contact_url'] = '';
     }
     if ($vals['loc_map'] == 'http://') {
         $vals['loc_map'] = '';
     }
     $vals['details'] = nl2br(wordwrap(htmlentities_compat($vals['details']), 70, "\n", true));
     if (!$vals['public'] || empty($vals['public'])) {
         $vals['public'] = 'no';
     }
     if (!$vals['media'] || empty($vals['media'])) {
         $vals['media'] = 'no';
     }
     if (!empty($vals['loc_addr2'])) {
         $vals['loc_address'] .= "\n" . $vals['loc_addr2'];
     }
     $data = array('title' => $vals['title'], 'date' => $vals['date'], 'until_date' => $vals['end_date'], 'time' => $vals['time'], 'until_time' => $vals['end_time'], 'category' => $vals['category'], 'audience' => $vals['audience'], 'details' => $vals['details'], 'contact' => $vals['contact'], 'contact_email' => $vals['contact_email'], 'contact_phone' => $vals['contact_phone'], 'contact_url' => $vals['contact_url'], 'loc_name' => $vals['loc_name'], 'loc_address' => $vals['loc_address'], 'loc_city' => $vals['loc_city'], 'loc_province' => $vals['loc_province'], 'loc_country' => $vals['loc_country'], 'sponsor' => $vals['sponsor'], 'rsvp' => $vals['rsvp'], 'public' => $vals['public'], 'media' => $vals['media'], 'sitellite_status' => 'draft', 'sitellite_access' => 'public');
     if (session_valid()) {
         $data['sitellite_owner'] = session_username();
         $data['sitellite_team'] = session_team();
     }
     // 2. submit event as 'draft'
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteevent_event');
     $res = $rex->create($data, 'Event submission.');
     $vals['id'] = $res;
     // 3. email notification
     @mail(appconf('submissions'), 'Event Submission Notice', template_simple('submission_email.spt', $vals));
     // 4. thank you screen
     page_title(intl_get('Thank You!'));
     echo template_simple('submissions.spt');
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:35,代码来源:index.php


示例2: sitesearch_filter_uptime

function sitesearch_filter_uptime($duration)
{
    $days = floor($duration / 86400);
    $hours = floor(($duration - $days * 86400) / 3600);
    $mins = ceil(($duration - $days * 86400 - $hours * 3600) / 60);
    return $days . ' ' . intl_get('days') . ', ' . $hours . ' ' . intl_get('hours') . ', ' . $mins . ' ' . intl_get('minutes');
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:Filters.php


示例3: sitepoll_virtual_enable_comments

function sitepoll_virtual_enable_comments(&$obj)
{
    if ($obj->enable_comments == 'no') {
        return intl_get('Disabled');
    }
    return db_shift('select count(*) from sitepoll_comment where poll = ?', $obj->id);
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:Filters.php


示例4: SitepresenterEditSlideForm

    function SitepresenterEditSlideForm()
    {
        parent::MailForm();
        $this->parseSettings('inc/app/sitepresenter/forms/edit/slide/settings.php');
        page_add_script('
			function cms_cancel (f) {
				if (arguments.length == 0) {
					window.location.href = "/index/cms-app";
				} else {
					if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
						window.location.href = f.elements["_return"].value;
					} else {
						window.location.href = "/index/sitepresenter-app";
					}
				}
				return false;
			}
		');
        $this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
        global $cgi;
        page_title(intl_get('Adding Slide to Presentation') . ': ' . db_shift('select title from sitepresenter_presentation where id = ?', $cgi->presentation));
        $res = db_single('select * from sitepresenter_slide where id = ?', $cgi->id);
        foreach (get_object_vars($res) as $k => $v) {
            $this->widgets[$k]->setValue($v);
        }
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:index.php


示例5: AppdocTranslationAddForm

 function AppdocTranslationAddForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/appdoc/forms/translation/add/settings.php');
     page_title(intl_get('Add Language'));
     global $cgi;
     if ($cgi->appname == 'GLOBAL') {
         $this->_file = 'inc/lang/languages.php';
     } else {
         $this->_file = 'inc/app/' . $cgi->appname . '/lang/languages.php';
     }
     $list = array('no' => 'None');
     $info = ini_parse($this->_file);
     foreach ($info as $k => $v) {
         $list[$k] = $v['name'];
     }
     $this->widgets['fallback']->setValues($list);
     $this->widgets['default']->setValues(array('yes' => 'Yes', 'no' => 'No'));
     if (count($list) == 1) {
         $this->widgets['default']->setDefault('yes');
     } else {
         $this->widgets['default']->setDefault('no');
     }
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="window.history.go (-1); return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:index.php


示例6: BoxchooserSettingsForm

 function BoxchooserSettingsForm()
 {
     parent::MailForm();
     page_title(intl_get('Box Settings'));
     //set(array('title'=>'Add a Box'));
     global $cgi;
     //set
     if (!$cgi->box) {
         echo 'Missing parameter: box';
         exit;
     }
     ini_add_filter('ini_filter_split_comma_single', array('rule 0', 'rule 1', 'rule 2', 'rule 3', 'rule 4', 'rule 5', 'rule 6', 'rule 7', 'rule 8', 'button 0', 'button 1', 'button 2', 'button 3', 'button 4', 'button 5', 'button 6', 'button 7', 'button 8'));
     $this->_box_settings = ini_parse('inc/app/' . $cgi->app . '/boxes/' . $cgi->box . '/settings.php');
     ini_clear();
     unset($this->_box_settings['Meta']);
     if (count($this->_box_settings) === 0) {
         $this->onSubmit((array) $cgi);
         return;
     }
     foreach ($this->_box_settings as $k => $v) {
         $this->createWidget($k, $v);
     }
     $this->addWidget('hidden', 'app');
     $this->addWidget('hidden', 'box');
     $this->addWidget('hidden', 'name');
     $w =& $this->addWidget('submit', 'sub');
     $w->setValues(intl_get('Done'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:28,代码来源:index.php


示例7: filter_translation_default

function filter_translation_default($v)
{
    if ($v) {
        return intl_get('Yes');
    }
    return intl_get('No');
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例8: SitetemplateEditsetForm

 function SitetemplateEditsetForm()
 {
     parent::MailForm();
     global $cgi;
     $set = $cgi->set;
     $this->parseSettings('inc/app/sitetemplate/forms/editset/settings.php');
     $settings = array();
     if (file_exists('inc/html/' . $set . '/config.ini.php')) {
         $settings = ini_parse('inc/html/' . $set . '/config.ini.php', false);
     }
     $name = $settings['set_name'];
     if (!$name) {
         $name = $set;
     }
     $settings['set'] = $set;
     //put form values into respective forms
     foreach ($settings as $k => $v) {
         $this->widgets[$k]->setDefault($v);
     }
     if (@file_exists('inc/html/' . $set . '/modes.php')) {
         $this->widgets['modes']->setDefault(@join('', @file('inc/html/' . $set . '/modes.php')));
     } else {
         $this->widgets['modes']->setDefault($modesd);
     }
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="history.go (-1); return false"';
     page_title(intl_get('Editing Properties') . ': ' . $name);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例9: onSubmit

 function onSubmit($vals)
 {
     $vals['name'] = strtolower($vals['name']);
     //make sure that file doesnt exit
     if (file_exists('inc/html/' . $vals['set_name'] . '/' . $vals['name'] . '.css')) {
         echo '<p>' . intl_get('A file with that name already exists. Choose a different file name.') . '</p>';
         echo '<p>' . intl_get('Go <a href=javascript:history.back()>back</a> to choose a different file name.') . '</p>';
     }
     if (preg_match('/\\.css$/i', $vals['name'])) {
         $ext = '';
     } else {
         $ext = '.css';
     }
     if (!file_overwrite('inc/html/' . $vals['set_name'] . '/' . $vals['name'] . $ext, $vals['body'])) {
         page_title(intl_get('An Error Occurred'));
         echo '<p>' . intl_get('The file was unable to be saved.  Please verify your server settings before trying again.') . '</p>';
         return;
     }
     umask(00);
     chmod('inc/html/' . $vals['set_name'] . '/' . $vals['name'] . $ext, 0777);
     list($set, $tpl) = explode('/', $vals['path']);
     echo $set . ' ' . $tpl;
     page_title('File Saved');
     echo '<p><a href="' . site_prefix() . '/index/sitetemplate-templateselect-action?set_name=' . $vals['set_name'] . '">' . intl_get('Return to template set') . '</a></p>';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:index.php


示例10: EditForm

 function EditForm()
 {
     parent::MailForm();
     global $cgi, $_helpdoc;
     $this->addWidget('hidden', 'appname');
     $this->addWidget('hidden', 'lang');
     $this->addWidget('hidden', 'helpfile');
     $w =& $this->addWidget('text', 'filename');
     $w->alt = intl_get('File Name (ie. 001-about-myApp)');
     $w->addRule('not empty', intl_get('You must specify a file name.'));
     $w->addRule('not contains ".."', intl_get('Your file name contains invalid characters.'));
     $w->setValue($cgi->helpfile);
     $w =& $this->addWidget('text', 'title');
     $w->alt = intl_get('Title');
     $w->addRule('not empty', intl_get('You must specify a title.'));
     $w->setValue($_helpdoc->title);
     session_set('imagechooser_path', 'inc/app/' . $cgi->appname . '/pix');
     $this->extra = 'onsubmit="xed_copy_value (this, \'body\')"';
     $w =& $this->addWidget('xed.Widget.Xeditor', 'body');
     $w->setValue($_helpdoc->body);
     $w =& $this->addWidget('msubmit', 'submit_button');
     $b =& $w->getButton();
     $b->setValues(intl_get('Save'));
     $b =& $w->addButton('submit_button');
     $b->setValues(intl_get('Cancel'));
     $b->extra = 'onclick="window.location.href = \'' . site_prefix() . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang . '\'; return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例11: onSubmit

 function onSubmit($vals)
 {
     global $cgi;
     if ($vals['submit_buttons'] == 'Cancel') {
         header('Location: ' . $vals['refer']);
         exit;
     }
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteblog_post');
     $id = $cgi->_key;
     $subject = $vals['subject'];
     $author = $vals['author'];
     $status = $vals['status'];
     $category = $vals['category'];
     $created = $vals['created'];
     $body = $vals['body'];
     $data = array('subject' => $subject, 'author' => $author, 'status' => $status, 'category' => $category, 'created' => $created, 'body' => $body);
     if (!empty($id)) {
         if (!$data['created']) {
             unset($data['created']);
         }
         $method = $rex->determineAction($id);
         $rex->{$method}($id, $data);
     } else {
         if (!$data['created']) {
             $data['created'] = date('Y-m-d H:i:s');
         }
         $id = $rex->create($data);
     }
     session_set('sitellite_alert', intl_get('Your item has been saved.'));
     // view post
     if (!empty($vals['_return'])) {
         header('Location: ' . $vals['_return']);
     } else {
         header('Location: ' . site_prefix() . '/index/siteblog-post-action/id.' . $id . '/title.' . siteblog_filter_link_title($subject));
     }
     // ping blog directories via pingomatic.com
     $host = 'rpc.pingomatic.com';
     $path = '';
     $out = template_simple('ping.spt', $obj);
     $len = strlen($out);
     $req = 'POST /' . $path . " HTTP/1.0\r\n";
     $req .= 'User-Agent: Sitellite ' . SITELLITE_VERSION . "/SiteBlog\r\n";
     $req .= 'Host: ' . $host . "\r\n";
     $req .= "Content-Type: text/xml\r\n";
     $req .= 'Content-Length: ' . $len . "\r\n\r\n";
     $req .= $out . "\r\n";
     if ($ph = @fsockopen($host, 80)) {
         @fputs($ph, $req);
         //echo '<pre>';
         //echo htmlentities ($req);
         while (!@feof($ph)) {
             $res = @fgets($ph, 128);
             //echo htmlentities ($res);
         }
         @fclose($ph);
     }
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:59,代码来源:index.php


示例12: ExampleContactForm

 function ExampleContactForm()
 {
     parent::MailForm();
     // load settings file
     $this->parseSettings('inc/app/example/forms/contact/settings.php');
     // set the page title
     page_title(intl_get('Contact Us'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:8,代码来源:index.php


示例13: usradm_msg

function usradm_msg($msg)
{
    $messages = array('restored' => intl_get('The item has been restored.'), 'deleted' => intl_get('The items have been deleted.'), 'sent' => intl_get('Your message has been sent.'));
    if (isset($messages[$msg])) {
        return $messages[$msg];
    } else {
        return intl_get($msg);
    }
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:9,代码来源:properties.php


示例14: onSubmit

 function onSubmit($vals)
 {
     if (!@mail($this->member->email, $vals['subject'], $vals['message'], 'From: ' . $vals['email'])) {
         page_title('Unknown Error');
         echo '<p>' . intl_get('An error occurred trying to send the message.  Please try again later.') . '</p>';
         return;
     }
     page_title(intl_get('Message Sent'));
     echo '<p>' . intl_get('Your message has been sent.') . '</p>';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:10,代码来源:index.php


示例15: onSubmit

 function onSubmit($vals)
 {
     loader_import('news.Comment');
     $c = new NewsComment();
     $vals['ts'] = date('Y-m-d H:i:s');
     unset($vals['submit_button']);
     $c->modify($vals['id'], $vals);
     page_title(intl_get('Comment Updated'));
     echo template_simple('comment_updated.spt', $vals);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:10,代码来源:index.php


示例16: siteevent_virtual_recurring

function siteevent_virtual_recurring($vals)
{
    if ($vals->until_date > $vals->date) {
        if ($vals->recurring == 'no') {
            return intl_get('Daily');
        }
        return ucfirst($vals->recurring);
    }
    return intl_get('No');
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:10,代码来源:Filters.php


示例17: SitelliteExportForm

 function SitelliteExportForm()
 {
     parent::MailForm(__FILE__);
     $user = session_get_user();
     $groups = array('' => '- All -');
     foreach (db_pairs('select id, name from sitellite_form_type order by name asc') as $k => $v) {
         $groups[$k] = $v;
     }
     $this->widgets['group']->setValues($groups);
     page_title(intl_get('Export Contacts'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:11,代码来源:index.php


示例18: display

 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     parent::display($generate_html);
     global $intl, $simple;
     $attrstr = $this->getAttrs();
     $len = $this->length > 0 ? 'maxlength="' . $this->length . '" ' : '';
     if ($generate_html) {
         return "\t" . '<tr>' . "\n\t\t" . '<td class="label" valign="top"><label for="' . $this->name . '" id="' . $this->name . '-label"' . $this->invalid() . '>' . $simple->fill($this->label_template, $this, '', true) . '</label></td>' . "\n\t\t" . '<td class="field"><textarea rows="' . $this->rows . '" cols="' . $this->cols . '" ' . $attrstr . ' ' . $len . $this->extra . '>' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '</textarea><br />' . '<a href="#" onclick="this.blur (); window.open (\'' . site_prefix() . '/index/cms-keywords-action?el=' . $this->name . '&sel=\' + document.forms[0].elements.' . $this->name . '.value, \'KeywordsWindow\', \'top=100,left=100,width=350,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no\'); return false">' . intl_get('Global Keyword List') . '</a>' . '</td>' . "\n\t" . '</tr>' . "\n";
     } else {
         return '<input type="text" ' . $attrstr . ' value="' . htmlentities_compat($this->data_value, ENT_COMPAT, $intl->charset) . '" ' . $this->extra . ' />';
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:22,代码来源:Keywords.php


示例19: XedImporterForm

 function XedImporterForm()
 {
     parent::MailForm();
     $this->extra = 'enctype="multipart/form-data"';
     $this->uploadFiles = false;
     $w =& $this->addWidget('hidden', 'ifname');
     $w =& $this->addWidget('file', 'doc');
     $w->alt = intl_get('Word Document');
     $w =& $this->addWidget('submit', 'submit_button');
     $w->setValues(intl_get('Import'));
     page_title(intl_get('Word Importer'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:12,代码来源:index.php


示例20: sitefaq_facet_assigned_to

function sitefaq_facet_assigned_to()
{
    $res = db_shift_array('select distinct assigned_to from sitefaq_submission order by assigned_to asc');
    $ret = array();
    foreach ($res as $a) {
        if (empty($a)) {
            continue;
            $ret[''] = intl_get('None');
        } else {
            $ret[$a] = db_shift('select concat(lastname, ", ", firstname, " (", username, ")") from sitellite_user where username = ?', $a);
        }
    }
    return $ret;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:Filters.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP intl_get_error_code函数代码示例发布时间:2022-05-15
下一篇:
PHP interval_check函数代码示例发布时间: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