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


PHP ev_gettext函数代码示例

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


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

示例1: outputDownload

 /**
  * Method used to output the headers and the binary data for
  * an attachment file.
  *
  * This method never returns to caller.
  *
  * @param   string $data The binary data of this file download
  * @param   string $filename The filename
  * @param   integer $filesize The size of this file
  * @param   string $mimetype The mimetype of this file
  * @param   boolean $force_inline If the file should be forced to render in the browser
  * @return  void
  */
 public static function outputDownload(&$data, $filename, $filesize, $mimetype, $force_inline = false)
 {
     if ($force_inline == true) {
         header('Content-Type: text/plain');
         if (stristr($mimetype, 'gzip')) {
             header('Content-Encoding: gzip');
         }
         header('Content-Disposition: inline; filename="' . urlencode($filename) . '"');
         header('Content-Length: ' . $filesize);
         echo $data;
         exit;
     }
     if (empty($mimetype)) {
         $mimetype = 'application/octet-stream';
     }
     if (empty($filename)) {
         $filename = ev_gettext('Untitled');
     }
     $disposition = self::displayInline($mimetype) ? 'inline' : 'attachment';
     $filename = rawurlencode($filename);
     header('Content-Type: ' . $mimetype);
     header("Content-Disposition: {$disposition}; filename=\"{$filename}\"; filename*=" . APP_CHARSET . "''{$filename}");
     header("Content-Length: {$filesize}");
     echo $data;
     exit;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:39,代码来源:class.attachment.php

示例2: smarty_function_get_display_label

function smarty_function_get_display_label($params, &$smarty)
{
    $print_result = true;
    $show = ev_gettext('show');
    $hide = ev_gettext('hide');
    extract($params);
    $cookie_name = 'visibility_' . $element_name;
    if (!empty($_COOKIE[$cookie_name])) {
        if ($_COOKIE[$cookie_name] == 'none') {
            $html_result = $show;
        } else {
            $html_result = $hide;
        }
    } else {
        $html_result = $hide;
    }
    // automatically hide the table if there is nothing to be displayed
    if (isset($total)) {
        if ($total < 1) {
            $html_result = $show;
        }
    }
    if ($print_result) {
        print $html_result;
    } else {
        return $html_result;
    }
}
开发者ID:dabielkabuto,项目名称:eventum,代码行数:28,代码来源:function.get_display_label.php

示例3: markAsDuplicateAction

 private function markAsDuplicateAction()
 {
     $res = Issue::markAsDuplicate($this->issue_id);
     $map = array(1 => array(ev_gettext('Thank you, the issue was marked as a duplicate successfully'), Misc::MSG_INFO), -1 => array(ev_gettext('Sorry, an error happened while trying to run your query.'), Misc::MSG_ERROR));
     Misc::mapMessages($res, $map);
     $this->redirect(APP_RELATIVE_URL . 'view.php', array('id' => $this->issue_id));
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:7,代码来源:DuplicateController.php

示例4: defaultAction

 /**
  * @inheritdoc
  */
 protected function defaultAction()
 {
     AuthCookie::setProjectCookie($this->prj_id);
     Misc::setMessage(ev_gettext('The project has been switched'), Misc::MSG_INFO);
     $url = $this->getRedirectUrl();
     $this->redirect($url);
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:10,代码来源:SwitchController.php

示例5: getLocalizedRoles

 private static function getLocalizedRoles()
 {
     if (self::$localized_roles === null) {
         foreach (self::$roles as $id => $role) {
             self::$localized_roles[$id] = ev_gettext($role);
         }
     }
     return self::$localized_roles;
 }
开发者ID:korusdipl,项目名称:eventum,代码行数:9,代码来源:class.user.php

示例6: updateReporterAction

 private function updateReporterAction()
 {
     $post = $this->getRequest()->request;
     $email = trim($post->get('email'));
     $res = Edit_Reporter::update($this->issue_id, $email);
     $map = array(1 => array(ev_gettext('Thank you, the Reporter was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the Reporter.'), Misc::MSG_ERROR));
     Misc::mapMessages($res, $map);
     $this->redirect(APP_RELATIVE_URL . 'view.php', array('id' => $this->issue_id));
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:EditReporterController.php

示例7: getTopics

 private static function getTopics()
 {
     if (self::$topics !== null) {
         return self::$topics;
     }
     // we need this in function as function calls are not allowed in static properties
     self::$topics = array('main' => array('title' => ev_gettext('Help Topics'), 'parent' => ''), 'report' => array('title' => ev_gettext('Reporting Issues'), 'parent' => 'main'), 'report_category' => array('title' => ev_gettext('Category Field'), 'parent' => 'report'), 'report_priority' => array('title' => ev_gettext('Priority Field'), 'parent' => 'report'), 'report_assignment' => array('title' => ev_gettext('Assignment Field'), 'parent' => 'report'), 'report_release' => array('title' => ev_gettext('Scheduled Release Field'), 'parent' => 'report'), 'report_summary' => array('title' => ev_gettext('Summary Field'), 'parent' => 'report'), 'report_description' => array('title' => ev_gettext('Description Field'), 'parent' => 'report'), 'report_estimated_dev_time' => array('title' => ev_gettext('Estimated Development Time Field'), 'parent' => 'report'), 'scm_integration' => array('title' => ev_gettext('SCM Integration'), 'parent' => 'main'), 'scm_integration_usage' => array('title' => ev_gettext('Usage Examples'), 'parent' => 'scm_integration'), 'scm_integration_installation' => array('title' => ev_gettext('Installation Instructions'), 'parent' => 'scm_integration'), 'list' => array('title' => ev_gettext('Listing / Searching for Issues'), 'parent' => 'main'), 'adv_search' => array('title' => ev_gettext('Advanced Search / Creating Custom Queries'), 'parent' => 'main'), 'support_emails' => array('title' => ev_gettext('Associate Emails'), 'parent' => 'main'), 'preferences' => array('title' => ev_gettext('Account Preferences'), 'parent' => 'main'), 'notifications' => array('title' => ev_gettext('Email Notifications'), 'parent' => 'main'), 'view' => array('title' => ev_gettext('Viewing Issues'), 'parent' => 'main'), 'email_blocking' => array('title' => ev_gettext('Email Blocking'), 'parent' => 'main'), 'link_filters' => array('title' => ev_gettext('Link Filters'), 'parent' => 'main'), 'field_display' => array('title' => ev_gettext('Edit Fields to Display'), 'parent' => 'main'), 'column_display' => array('title' => ev_gettext('Edit Columns to Display'), 'parent' => 'main'), 'customize_listing' => array('title' => ev_gettext('Customize Issue Listing Screen'), 'parent' => 'main'), 'segregate_reporter' => array('title' => ev_gettext('Segregate Reporters'), 'parent' => 'main'), 'permission_levels' => array('title' => ev_gettext('User Permission Levels'), 'parent' => 'main'));
     return self::$topics;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:9,代码来源:class.help.php

示例8: checkRequirements

 private function checkRequirements()
 {
     $errors = array();
     // check if templates_c is writable by the web server user
     if (!Misc::isWritableDirectory($dir = APP_TPL_COMPILE_PATH)) {
         $errors[] = ev_gettext('Directory "%1$s" is not writable.', $dir);
         Misc::displayRequirementErrors($errors);
         exit;
     }
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:10,代码来源:IndexController.php

示例9: attachmentAction

 private function attachmentAction()
 {
     $file = Attachment::getDetails($this->iaf_id);
     if (!$file) {
         $this->error(ev_gettext('No such attachment'));
     }
     if (!Issue::canAccess($file['iat_iss_id'], $this->usr_id)) {
         $this->error(ev_gettext('No access to requested attachment'));
     }
     Attachment::outputDownload($file['iaf_file'], $file['iaf_filename'], $file['iaf_filesize'], $file['iaf_filetype'], $this->force_inline);
     exit;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:12,代码来源:DownloadController.php

示例10: createVisitorAccountAction

 private function createVisitorAccountAction()
 {
     $setup = Setup::get();
     if ($setup['open_signup'] != 'enabled') {
         $error = ev_gettext('Sorry, but this feature has been disabled by the administrator.');
         $this->error($error);
     }
     $res = User::createVisitorAccount($setup['accounts_role'], $setup['accounts_projects']);
     $this->tpl->assign('signup_result', $res);
     //  TODO: translate
     $map = array(1 => array('Thank you, your account creation request was processed successfully. For security reasons a confirmation email was sent to the provided email address with instructions on how to confirm your request and activate your account.', Misc::MSG_INFO), -1 => array('Error: An error occurred while trying to run your query.', Misc::MSG_ERROR), -2 => array('Error: The email address specified is already associated with an user in the system.', Misc::MSG_ERROR));
     Misc::mapMessages($res, $map);
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:13,代码来源:SignupController.php

示例11: defaultAction

 /**
  * @inheritdoc
  */
 protected function defaultAction()
 {
     if (User::isClockedIn($this->usr_id)) {
         User::ClockOut($this->usr_id);
         $message = ev_gettext('You have been clocked out');
     } else {
         User::ClockIn($this->usr_id);
         $message = ev_gettext('You have been clocked in');
     }
     Misc::setMessage($message, Misc::MSG_INFO);
     $url = $this->url ?: APP_RELATIVE_URL . 'list.php';
     $this->redirect($url);
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:16,代码来源:ClockStatusController.php

示例12: prepareTemplate

 /**
  * @inheritdoc
  */
 protected function prepareTemplate()
 {
     $note = Note::getDetails($this->note_id);
     if (!$note) {
         $this->tpl->assign('note', '');
         return;
     }
     $note['message'] = $note['not_note'];
     $seq_no = Note::getNoteSequenceNumber($this->issue_id, $this->note_id);
     // TRANSLATORS: %1: note sequence number, %2: note title
     $extra_title = ev_gettext('Note #%1$s: %2$s', $seq_no, $note['not_title']);
     $this->tpl->assign(array('note' => $note, 'issue_id' => $this->issue_id, 'extra_title' => $extra_title, 'recipients' => Mail_Queue::getMessageRecipients('notes', $this->note_id)));
     $this->setSideLinks();
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:17,代码来源:ViewNoteController.php

示例13: getListing

 /**
  * Method used to get the list of changes made against a specific issue.
  *
  * @param   integer $iss_id The issue ID
  * @param   string $order_by The order to sort the history
  * @return  array The list of changes
  */
 public static function getListing($iss_id, $order_by = 'DESC')
 {
     $order_by = DB_Helper::orderBy($order_by);
     $stmt = "SELECT\n                    *\n                 FROM\n                    {{%issue_history}},\n                    {{%history_type}}\n                 WHERE\n                    htt_id = his_htt_id AND\n                    his_is_hidden != 1 AND\n                    his_iss_id=? AND\n                    his_min_role <= ?\n                 ORDER BY\n                    his_id {$order_by}";
     $params = array($iss_id, Auth::getCurrentRole());
     try {
         $res = DB_Helper::getInstance()->getAll($stmt, $params);
     } catch (DbException $e) {
         return '';
     }
     foreach ($res as &$row) {
         $row['his_summary'] = Misc::processTokens(ev_gettext($row['his_summary']), $row['his_context']);
     }
     return $res;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:22,代码来源:class.history.php

示例14: getAssignOptions

 /**
  * Generate options for assign list.
  * If there are groups and user is above a customer, include groups
  *
  * @param array $users
  * @return array
  */
 public function getAssignOptions($users)
 {
     $assign_options = array('' => ev_gettext('Any'), '-1' => ev_gettext('un-assigned'), '-2' => ev_gettext('myself and un-assigned'));
     if (Auth::isAnonUser()) {
         unset($assign_options['-2']);
     } elseif (User::getGroupID($this->usr_id)) {
         $assign_options['-3'] = ev_gettext('myself and my group');
         $assign_options['-4'] = ev_gettext('myself, un-assigned and my group');
     }
     if (Auth::getCurrentRole() > User::ROLE_CUSTOMER && ($groups = Group::getAssocList($this->prj_id))) {
         foreach ($groups as $grp_id => $grp_name) {
             $assign_options["grp:{$grp_id}"] = ev_gettext('Group') . ': ' . $grp_name;
         }
     }
     return $assign_options + $users;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:23,代码来源:AssignHelper.php

示例15: dirname

// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: Dave Anderson <dave@anderson.net.nz>                             |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/email_alias.tpl.html');
Auth::checkAuthentication(APP_COOKIE, null, true);
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('manager')) {
    $tpl->setTemplate('permission_denied.tpl.html');
    $tpl->displayTemplate();
    exit;
}
$usr_id = $_REQUEST['id'];
if (@$_POST['cat'] == 'save') {
    $res = User::addAlias($usr_id, trim($_POST['alias']));
    Misc::mapMessages($res, array(true => array(ev_gettext('Thank you, the alias was added successfully.'), Misc::MSG_INFO), false => array(ev_gettext('An error occurred while trying to add the alias.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'remove') {
    foreach ($_POST['item'] as $aliastmp) {
        $res = User::removeAlias($usr_id, $aliastmp);
    }
    Misc::mapMessages($res, array(true => array(ev_gettext('Thank you, the alias was removed successfully.'), Misc::MSG_INFO), false => array(ev_gettext('An error occurred while trying to remove the alias.'), Misc::MSG_ERROR)));
}
$tpl->assign('list', User::getAliases($usr_id));
$tpl->assign('username', User::getFullName($usr_id));
$tpl->assign('id', $usr_id);
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:email_alias.php


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