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


PHP studip_utf8decode函数代码示例

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


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

示例1: add_topic_action

 public function add_topic_action()
 {
     if (!$GLOBALS['perm']->have_studip_perm("tutor", $_SESSION['SessionSeminar'])) {
         throw new AccessDeniedException();
     }
     if (!Request::get("title")) {
         throw new Exception("Geben Sie einen Titel an.");
     }
     $date = new CourseDate(Request::option("termin_id"));
     $seminar_id = $date['range_id'];
     $title = studip_utf8decode(Request::get("title"));
     $topic = CourseTopic::findByTitle($seminar_id, $title);
     if (!$topic) {
         $topic = new CourseTopic();
         $topic['title'] = $title;
         $topic['seminar_id'] = $seminar_id;
         $topic['author_id'] = $GLOBALS['user']->id;
         $topic['description'] = "";
         $topic->store();
     }
     $date->addTopic($topic);
     $factory = $this->get_template_factory();
     $output = array('topic_id' => $topic->getId());
     $template = $factory->open($this->get_default_template("_topic_li"));
     $template->set_attribute("topic", $topic);
     $template->set_attribute("date", $date);
     $output['li'] = $template->render();
     $this->render_json($output);
 }
开发者ID:ratbird,项目名称:hope,代码行数:29,代码来源:dates.php

示例2: po_unescape

/**
 * Unescapes a string for use in .po file.
 *
 * @param String $string String to unescape
 * @return String Unescaped string
 */
function po_unescape($string)
{
    $replaces = array('\\"' => '"', '\\n' => "\n");
    $string = str_replace(array_keys($replaces), array_values($replaces), $string);
    $string = studip_utf8decode($string);
    return $string;
}
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:help-translation-tool.php

示例3: before_filter

 /**
  * Things to do before every page load.
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // AJAX request, so no page layout.
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
         // Open base layout for normal
     } else {
         $layout = $GLOBALS['template_factory']->open('layouts/base');
         $this->set_layout($layout);
         PageLayout::setTitle(_('Anmeldesets'));
         // Get only own courses if user doesn't have permission to edit institute-wide coursesets.
         $this->onlyOwnCourses = true;
         if ($GLOBALS['perm']->have_perm('admin') || $GLOBALS['perm']->have_perm('dozent') && get_config('ALLOW_DOZENT_COURSESET_ADMIN')) {
             // We have access to institute-wide course sets, so all courses may be assigned.
             $this->onlyOwnCourses = false;
             Navigation::activateItem('/tools/coursesets/sets');
         } else {
             throw new AccessDeniedException();
         }
     }
     PageLayout::addSqueezePackage('admission');
     $this->set_content_type('text/html;charset=windows-1252');
     $views = new ViewsWidget();
     $views->setTitle(_('Aktionen'));
     $views->addLink(_('Anmeldeset anlegen'), $this->url_for('admission/courseset/configure'))->setActive($action == 'configure');
     Sidebar::Get()->addWidget($views);
 }
开发者ID:ratbird,项目名称:hope,代码行数:36,代码来源:courseset.php

示例4: __construct

 /**
  * Construct an array object from a json string
  *
  * @param string $input a json string
  */
 function __construct($input)
 {
     if (is_string($input)) {
         $input = studip_utf8decode((array) json_decode($input, true));
     }
     parent::__construct((array) $input);
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:JSONArrayObject.class.php

示例5: before_filter

 /**
  * Before filter, set up the page by initializing the session and checking
  * all conditions.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!Config::Get()->LITERATURE_ENABLE) {
         throw new AccessDeniedException(_('Die Literaturverwaltung ist nicht aktiviert.'));
     }
     $this->attributes['textarea'] = array('style' => 'width:98%', 'rows' => 2);
     $this->attributes['select'] = array();
     $this->attributes['date'] = array();
     $this->attributes['combo'] = array('style' => 'width:45%; display: inline;');
     $this->attributes['lit_select'] = array('style' => 'font-size:8pt;width:100%');
     // on AJAX request set no page layout.
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     }
     $this->set_content_type('text/html;charset=windows-1252');
     /*      checkObject(); // do we have an open object?
             checkObjectModule('literature');
             object_set_visit_module('literature');/**/
 }
开发者ID:ratbird,项目名称:hope,代码行数:32,代码来源:literature.php

示例6: before_filter

 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     global $perm;
     parent::before_filter($action, $args);
     if (Request::get('termin_id')) {
         $this->dates[0] = new SingleDate(Request::option('termin_id'));
         $this->course_id = $this->dates[0]->range_id;
     }
     if (Request::get('issue_id')) {
         $this->issue_id = Request::option('issue_id');
         $this->dates = array_values(array_map(function ($data) {
             $d = new SingleDate();
             $d->fillValuesFromArray($data);
             return $d;
         }, IssueDB::getDatesforIssue(Request::option('issue_id'))));
         $this->course_id = $this->dates[0]->range_id;
     }
     if (!get_object_type($this->course_id, array('sem')) || SeminarCategories::GetBySeminarId($this->course_id)->studygroup_mode || !$perm->have_studip_perm("tutor", $this->course_id)) {
         throw new Trails_Exception(400);
     }
     PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenAendernVonZeitenUndTerminen");
     PageLayout::setTitle(Course::findCurrent()->getFullname() . " - " . _("Veranstaltungstermine absagen"));
     $this->set_content_type('text/html;charset=windows-1252');
     if (Request::isXhr()) {
         $this->set_layout(null);
         $this->response->add_header('X-Title', PageLayout::getTitle());
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:35,代码来源:cancel_dates.php

示例7: fetchData

 /**
  * You can specify a custom import.
  * @return bool
  */
 public function fetchData()
 {
     $wsdl = FleximportConfig::get("SEMIRO_SOAP_PARTICIPANTS_WSDL");
     $soap = new SoapClient($wsdl, array('trace' => 1, 'exceptions' => 0, 'cache_wsdl' => $GLOBALS['CACHING_ENABLE'] || !isset($GLOBALS['CACHING_ENABLE']) ? WSDL_CACHE_BOTH : WSDL_CACHE_NONE, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS));
     $file = strtolower(substr($wsdl, strrpos($wsdl, "/") + 1));
     $soapHeaders = new SoapHeader($file, 'Header', array('pw' => FleximportConfig::get("SEMIRO_SOAP_PASSWORD")));
     $soap->__setSoapHeaders($soapHeaders);
     $result = $soap->getTeilnehmerXML(array('pw' => FleximportConfig::get("SEMIRO_SOAP_PASSWORD")));
     if (is_a($result, "SoapFault")) {
         throw new Exception("SOAP-error: " . $result->faultstring);
     }
     $fields = array();
     $doc = new DOMDocument();
     $doc->loadXML(studip_utf8decode($result->return));
     $seminar_data = array();
     foreach ($doc->getElementsByTagName("teilnehmer") as $seminar) {
         $seminar_data_row = array();
         foreach ($seminar->childNodes as $attribute) {
             if ($attribute->tagName) {
                 if (!in_array(studip_utf8decode(trim($attribute->tagName)), $fields)) {
                     $fields[] = studip_utf8decode(trim($attribute->tagName));
                 }
                 $seminar_data_row[] = studip_utf8decode(trim($attribute->nodeValue));
             }
         }
         $seminar_data[] = $seminar_data_row;
     }
     $this->table->createTable($fields, $seminar_data);
 }
开发者ID:Krassmus,项目名称:Fleximport,代码行数:33,代码来源:fleximport_semiro_participant_import.php

示例8: edit_action

 function edit_action($area_id)
 {
     ForumPerm::check('edit_area', $this->getId(), $area_id);
     if (Request::isAjax()) {
         ForumEntry::update($area_id, studip_utf8decode(Request::get('name')), studip_utf8decode(Request::get('content')));
         $this->render_json(array('content' => ForumEntry::killFormat(ForumEntry::killEdit(studip_utf8decode(Request::get('content'))))));
     } else {
         ForumEntry::update($area_id, Request::get('name'), Request::get('content'));
         $this->flash['messages'] = array('success' => _('Die Änderungen am Bereich wurden gespeichert.'));
         $this->redirect(PluginEngine::getLink('coreforum/index/index'));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:area.php

示例9: store_action

 public function store_action($version)
 {
     $body = Request::get('body');
     if (Request::isXhr()) {
         $body = studip_utf8decode($body);
     }
     submitWikiPage($this->keyword, $version, $body, $GLOBALS['user']->id, $this->range_id);
     $latest_version = getLatestVersion($this->keyword, $this->range_id);
     if (Request::isXhr()) {
         $this->render_json(array('version' => $latest_version['version'], 'body' => $latest_version['body'], 'messages' => implode(PageLayout::getMessages()) ?: false, 'zusatz' => getZusatz($latest_version)));
     } else {
         // Yeah, wait for the whole trailification of the wiki...
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:wiki.php

示例10: before_filter

 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     $this->current_action = $action;
     parent::before_filter($action, $args);
     if (Request::isXhr()) {
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     } else {
         $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
     }
     $this->set_content_type('text/html;charset=windows-1252');
 }
开发者ID:ratbird,项目名称:hope,代码行数:18,代码来源:helpers.php

示例11: before_filter

 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $this->course_id = $args[0];
     if (!in_array($action, words('apply claim delete order_down order_up'))) {
         $this->redirect($this->url_for('/apply/' . $action));
         return false;
     }
     if (!get_object_type($this->course_id, array('sem'))) {
         throw new Trails_Exception(400);
     }
     $course = Seminar::GetInstance($this->course_id);
     $enrolment_info = $course->getEnrolmentInfo($GLOBALS['user']->id);
     //Ist bereits Teilnehmer/Admin/freier Zugriff -> gleich weiter
     if ($enrolment_info['enrolment_allowed'] && (in_array($enrolment_info['cause'], words('root courseadmin member')) || $enrolment_info['cause'] == 'free_access' && $GLOBALS['user']->id == 'nobody')) {
         $redirect_url = UrlHelper::getUrl('seminar_main.php', array('auswahl' => $this->course_id));
         if (Request::isXhr()) {
             $this->response->add_header('X-Location', $redirect_url);
             $this->render_nothing();
         } else {
             $this->redirect($redirect_url);
         }
         return false;
     }
     //Grundsätzlich verboten
     if (!$enrolment_info['enrolment_allowed']) {
         throw new AccessDeniedException($enrolment_info['description']);
     }
     PageLayout::setTitle($course->getFullname() . " - " . _("Veranstaltungsanmeldung"));
     PageLayout::addSqueezePackage('enrolment');
     if (Request::isXhr()) {
         $this->set_layout(null);
         $this->response->add_header('X-No-Buttons', 1);
         $this->response->add_header('X-Title', PageLayout::getTitle());
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     } else {
         $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
     }
     $this->set_content_type('text/html;charset=windows-1252');
     if (Request::submitted('cancel')) {
         $this->redirect(URLHelper::getURL('dispatch.php/course/details/', array('sem_id' => $this->course_id)));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:49,代码来源:enrolment.php

示例12: before_filter

 function before_filter(&$action, &$args)
 {
     $this->current_action = $action;
     // allow only "word" characters in arguments
     $this->validate_args($args);
     parent::before_filter($action, $args);
     if ($this->with_session) {
         # open session
         page_open(array('sess' => 'Seminar_Session', 'auth' => $this->allow_nobody ? 'Seminar_Default_Auth' : 'Seminar_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User'));
         // show login-screen, if authentication is "nobody"
         $GLOBALS['auth']->login_if((Request::get('again') || !$this->allow_nobody) && $GLOBALS['user']->id == 'nobody');
         // Setup flash instance
         $this->flash = Trails_Flash::instance();
         // set up user session
         include 'lib/seminar_open.php';
     }
     # Set base layout
     #
     # If your controller needs another layout, overwrite your controller's
     # before filter:
     #
     #   class YourController extends AuthenticatedController {
     #     function before_filter(&$action, &$args) {
     #       parent::before_filter($action, $args);
     #       $this->set_layout("your_layout");
     #     }
     #   }
     #
     # or unset layout by sending:
     #
     #   $this->set_layout(NULL)
     #
     $layout_file = Request::isXhr() ? 'layouts/dialog.php' : 'layouts/base.php';
     $layout = $GLOBALS['template_factory']->open($layout_file);
     $this->set_layout($layout);
     if ($this->encoding) {
         $this->set_content_type('text/html;charset=' . $this->encoding);
     }
     if (Request::isXhr() && $this->utf8decode_xhr) {
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:45,代码来源:studip_controller.php

示例13: before_filter

 /**
  * @see AuthenticatedController::before_filter
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     } else {
         $layout = $GLOBALS['template_factory']->open('layouts/base');
         $this->set_layout($layout);
         PageLayout::setTitle(_('Anmeldesets'));
         Navigation::activateItem('/tools/coursesets');
     }
     $this->set_content_type('text/html;charset=windows-1252');
 }
开发者ID:ratbird,项目名称:hope,代码行数:21,代码来源:rule.php

示例14: before_filter

 /**
  * Callback function being called before an action is executed.
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // AJAX request, so no page layout.
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
         // Open base layout for normal view
     } else {
         $layout = $GLOBALS['template_factory']->open('layouts/base');
         $this->set_layout($layout);
     }
     $this->set_content_type('text/html;charset=windows-1252');
     $this->help_admin = $GLOBALS['perm']->have_perm('root') || RolePersistence::isAssignedRole($GLOBALS['user']->id, 'Hilfe-Administrator(in)');
 }
开发者ID:ratbird,项目名称:hope,代码行数:22,代码来源:help_content.php

示例15: before_filter

 /**
  * @see AuthenticatedController::before_filter
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     } else {
         $this->via_ajax = false;
         $layout = $GLOBALS['template_factory']->open('layouts/base');
         $this->set_layout($layout);
         PageLayout::setTitle(_('Verwaltung von Anmelderegeln'));
         Navigation::activateItem('/admin/config/admissionrules');
     }
     PageLayout::addSqueezePackage('admission');
     $this->set_content_type('text/html;charset=windows-1252');
 }
开发者ID:ratbird,项目名称:hope,代码行数:23,代码来源:ruleadministration.php


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