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


PHP CSRFProtection::tokenTag方法代码示例

本文整理汇总了PHP中CSRFProtection::tokenTag方法的典型用法代码示例。如果您正苦于以下问题:PHP CSRFProtection::tokenTag方法的具体用法?PHP CSRFProtection::tokenTag怎么用?PHP CSRFProtection::tokenTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSRFProtection的用法示例。


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

示例1: getAdminModuleLinks

 /**
  * get admin module links
  *
  * returns links add or remove a module from course
  * @access public
  * @return string returns html-code
  */
 function getAdminModuleLinks()
 {
     global $connected_cms, $view, $search_key, $cms_select, $current_module;
     $output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">\n";
     $output .= CSRFProtection::tokenTag();
     $output .= "<input type=\"HIDDEN\" name=\"view\" value=\"" . htmlReady($view) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"search_key\" value=\"" . htmlReady($search_key) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"cms_select\" value=\"" . htmlReady($cms_select) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_type\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_id\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getId()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_system_type\" value=\"" . htmlReady($this->cms_type) . "\">\n";
     if ($connected_cms[$this->cms_type]->content_module[$current_module]->isConnected()) {
         $output .= "&nbsp;" . Button::create(_('Entfernen'), 'remove');
     } elseif ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_WRITE)) {
         $output .= "<div align=\"left\"><input type=\"CHECKBOX\" value=\"1\" name=\"write_permission\" style=\"vertical-align:middle\">";
         $output .= _("Mit Schreibrechten für alle Dozenten/Tutoren dieser Veranstaltung") . "<br>";
         $output .= "<input type=\"CHECKBOX\" value=\"1\" style=\"vertical-align:middle\" name=\"write_permission_autor\">";
         $output .= _("Mit Schreibrechten für alle Teilnehmer dieser Veranstaltung") . "</div>";
         $output .= Button::create(_('Hinzufügen'), 'add') . "<br>";
     } else {
         $output .= "&nbsp;" . Button::create(_('Hinzufügen'), 'add');
     }
     $output .= "</form>";
     return $output;
     //      $output .= parent::getAdminModuleLinks();
 }
开发者ID:ratbird,项目名称:hope,代码行数:33,代码来源:Ilias3ConnectedLink.class.php

示例2: navigator

 function navigator ($print_view = false) {
     global $cssSw, $view_mode;
     $semester = SemesterData::GetSemesterArray();
     unset($semester[0]);
     if (!$print_view){
     ?>
     <table border="0" celpadding="2" cellspacing="0" width="99%" align="center">
     <form method="POST" name="schedule_form" action="<?echo URLHelper::getLink('?navigate=TRUE&quick_view=view_sem_schedule&quick_view_mode='.$view_mode) ?>">
         <?= CSRFProtection::tokenTag() ?>
         <tr>
             <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="96%" colspan="3"><font size=-1><b><?=_("Semester:")?></b></font>
             </td>
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" width="4%" rowspan="2">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="40%" valign="bottom">
             <font size="-1">
             <?=SemesterData::GetSemesterSelector(array('name' => 'sem_schedule_choose', 'onChange' => 'document.schedule_form.submit()'), $this->semester['semester_id'],'semester_id',false)?>
             <?= Button::create(_('Auswählen'), 'jump') ?><br>
             </font>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="30%" valign="middle">
             <font size="-1">
             <?=_("Ein Semester als Liste ausgeben")?>
             </font>
             </td>
             <td class="<? echo $cssSw->getClass() ?>">
                 <?= Button::create(_('Ausgeben'), 'sem_schedule_start_list') ?><br>
             </td>
         </tr>
         <tr>
         <td class="<? echo $cssSw->getClass() ?>" width="40%" valign="middle">
             <label>
             <input type="radio" onChange="document.schedule_form.submit()" style="vertical-align:bottom" <?=($this->timespan == 'course_time' ? 'checked' : '')?> name="sem_time_choose" value="course_time">
             <?=_("Vorlesungszeit")?>
             </label>
             <label>
             <input type="radio" onChange="document.schedule_form.submit()" style="vertical-align:bottom" <?=($this->timespan == 'sem_time' ? 'checked' : '')?> name="sem_time_choose" value="sem_time">
             <?=_("vorlesungsfreie Zeit")?>
             </label>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="30%" valign="middle"><font size="-1">
                 <?=_("<i>oder</i> ein Semester grafisch ausgeben")?>
             </font>
             </td>
             <td class="<? echo $cssSw->getClass() ?>">
                 <?= Button::create(_('Ausgeben'), 'sem_schedule_start_graphical') ?><br>
             </td>
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" colspan="4"><font size="-1">&nbsp;</font>
             </td>
         </tr>
     </table>
 <?
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:60,代码来源:ShowSemSchedules.class.php

示例3: navigator

 function navigator ($print_view = false) {
     global $cssSw, $view_mode;
     if (!$print_view){
     ?>
     <table border="0" celpadding="2" cellspacing="0" width="99%" align="center">
     <form method="POST" name="schedule_form" action="<?= URLHelper::getLink('?navigate=TRUE&quick_view=view_group_schedule&quick_view_mode='.$view_mode) ?>">
         <?= CSRFProtection::tokenTag() ?>
         <tr>
             <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="96%" colspan="3"><font size=-1><b><?=_("Semester:")?></b></font>
             </td>
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" width="4%" rowspan="2">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="40%" valign="top">
                 <?= SemesterData::GetSemesterSelector(array('name' => 'sem_schedule_choose', 'onChange' => 'document.schedule_form.submit()'), $this->semester['semester_id'],'semester_id',false)?>
                 <?= Button::create(_('Auswählen'), 'jump') ?><br>
                 <label>
                 <input type="radio" onChange="document.schedule_form.submit()" style="vertical-align:bottom" <?=($this->timespan == 'course_time' ? 'checked' : '')?> name="sem_time_choose" value="course_time">
                 <?=_("Vorlesungszeit")?>
                 </label>
                 <label>
                 <input type="radio" onChange="document.schedule_form.submit()" style="vertical-align:bottom" <?=($this->timespan == 'sem_time' ? 'checked' : '')?> name="sem_time_choose" value="sem_time">
                 <?=_("vorlesungsfreie Zeit")?>
                 </label>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="60%" valign="top">
                 <?=_("Eine Raumgruppe auswählen")?>:<br>
                 <select name="group_schedule_choose_group" onChange="document.schedule_form.submit()">
                 <?
                 $room_group = RoomGroups::GetInstance();
                 foreach($room_group->getAvailableGroups() as $gid){
                     echo '<option value="'.$gid.'" '
                         . ($this->group_id == $gid ? 'selected' : '') . '>'
                         .htmlReady(my_substr($room_group->getGroupName($gid),0,85))
                         .' ('.$room_group->getGroupCount($gid).')</option>';
                 }
                 ?>
                 </select>
                 <?= Button::create(_('Auswählen')) ?>
             </font>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" valign="middle">
                 
             </td>                    
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" colspan="4"><font size="-1">&nbsp;</font>
             </td>
         </tr>
     </table>
 <?
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:56,代码来源:ShowGroupSchedules.class.php

示例4: navigator

 function navigator ($print_view = false) {
     global $cssSw, $view_mode,$view;
     $start_time = $this->start_time;
     if (!$print_view){
     ?>
     <table border="0" celpadding="2" cellspacing="0" width="99%" align="center">
     <form method="POST" name="schedule_form" action="<?echo URLHelper::getLink('?navigate=TRUE&quick_view='.$view.'&quick_view_mode='.$view_mode) ?>">
         <?= CSRFProtection::tokenTag() ?>
         <tr>
             <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="96%" colspan="3"><font size=-1><b><?=_("Datum:")?></b></font>
             </td>
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" width="4%" rowspan="2">&nbsp;
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="40%" valign="middle">
                 <!--CHANGE for Datepicker-->
                 <input type="text" id="schedule_begin_date" name="schedule_begin_date" size="10" value="<?echo date("d",$start_time).'.'.date("m",$start_time).'.'.date("Y",$start_time);; ?>">
                 <script>
                     jQuery('#schedule_begin_date').datepicker();
                 </script>                    
                 <!--
                 <input type="text" name="schedule_begin_day" size=2 maxlength=2 value="<?echo date("d",$start_time); ?>">.
                 <input type="text" name="schedule_begin_month" size=2 maxlength=2 value="<?echo date("m",$start_time); ?>">.
                 <input type="text" name="schedule_begin_year" size=4 maxlength=4 value="<?echo date("Y",$start_time); ?>">
                 -->
                 <?= Button::create(_('Auswählen'), 'jump') ?><br>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" width="60%" valign="bottom">
                 <?= ($view_mode == 'oobj' ? _("Eine Ressourcengruppe auswählen") : _("Eine Raumgruppe auswählen")) ?>:<br>
                 <select name="group_schedule_choose_group" onChange="document.schedule_form.submit()">
                 <? foreach($this->resources_groups->getAvailableGroups() as $gid) :
                     echo '<option value="'.$gid.'" '
                         . ($this->group_id == $gid ? 'selected' : '') . '>'
                         .htmlReady(my_substr($this->resources_groups->getGroupName($gid),0,80))
                         .' ('.$this->resources_groups->getGroupCount($gid).')</option>';
                 endforeach ?>
                 </select>
                 <?= Button::create(_('Auswählen')) ?>
             </td>
             <td class="<? echo $cssSw->getClass() ?>" valign="middle">
                 
             </td>
         </tr>
         <tr>
             <td class="<? echo $cssSw->getClass() ?>" colspan="4"><font size="-1">&nbsp;</font>
             </td>
         </tr>
     </table>
 <?
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:54,代码来源:ShowGroupSchedulesDaily.class.php

示例5: getAdminModuleLinks

 /**
  * get admin module links
  *
  * returns links add or remove a module from course
  * @access public
  * @return string returns html-code
  */
 function getAdminModuleLinks()
 {
     global $connected_cms, $view, $search_key, $cms_select, $current_module;
     if (!$connected_cms[$this->cms_type]->content_module[$current_module]->isDummy()) {
         $result = $connected_cms[$this->cms_type]->soap_client->getPath($connected_cms[$this->cms_type]->content_module[$current_module]->getId());
     }
     if ($result) {
         $output .= "<i>Pfad: " . htmlReady($result) . "</i><br><br>";
     }
     $output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">\n";
     $output .= CSRFProtection::tokenTag();
     $output .= "<input type=\"HIDDEN\" name=\"view\" value=\"" . htmlReady($view) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"search_key\" value=\"" . htmlReady($search_key) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"cms_select\" value=\"" . htmlReady($cms_select) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_type\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_id\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getId()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_system_type\" value=\"" . htmlReady($this->cms_type) . "\">\n";
     if ($connected_cms[$this->cms_type]->content_module[$current_module]->isConnected()) {
         $output .= "&nbsp;" . Button::create(_('Entfernen'), 'remove');
     } elseif ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_WRITE)) {
         $output .= "<div align=\"left\">";
         if ($connected_cms[$this->cms_type]->content_module[$current_module]->isAllowed(OPERATION_COPY) and !in_array($connected_cms[$this->cms_type]->content_module[$current_module]->module_type, array("lm", "htlm", "sahs", "cat", "crs", "dbk"))) {
             $output .= "<input type=\"CHECKBOX\" name=\"copy_object\" value=\"1\">";
             $output .= _("Als Kopie anlegen") . "&nbsp;";
             $output .= Icon::create('info-circle', 'inactive', ['title' => _('Wenn Sie diese Option wählen, wird eine identische Kopie als eigenständige Instanz des Lernmoduls erstellt. Anderenfalls wird ein Link zum Lernmodul gesetzt.')])->asImg();
             $output .= "<br>";
         }
         $output .= "<input type=\"RADIO\" name=\"write_permission\" value=\"none\" checked>";
         $output .= _("Keine Schreibrechte") . "&nbsp;";
         $output .= Icon::create('info-circle', 'inactive', ['title' => _('Nur der/die BesitzerIn des Lernmoduls hat Schreibzugriff für Inhalte und Struktur des Lernmoduls. Tutor/-innen und Lehrende können die Verknüpfung zur Veranstaltung wieder löschen.')])->asImg();
         $output .= "<br>";
         $output .= "<input type=\"RADIO\" name=\"write_permission\" value=\"dozent\">";
         $output .= _("Mit Schreibrechten für alle Lehrenden dieser Veranstaltung") . "&nbsp;";
         $output .= Icon::create('info-circle', 'inactive', ['title' => _('Lehrende haben Schreibzugriff für Inhalte und Struktur des Lernmoduls. Tutor/-innen und Lehrende können die Verknüpfung zur Veranstaltung wieder löschen.')])->asImg();
         $output .= "<br>";
         $output .= "<input type=\"RADIO\" name=\"write_permission\" value=\"tutor\">";
         $output .= _("Mit Schreibrechten für alle Lehrenden und Tutor/-innen dieser Veranstaltung") . "&nbsp;";
         $output .= Icon::create('info-circle', 'inactive', ['title' => _('Lehrende und Tutor/-innen haben Schreibzugriff für Inhalte und Struktur des Lernmoduls. Tutor/-innen und Lehrende können die Verknüpfung zur Veranstaltung wieder löschen.')])->asImg();
         $output .= "<br>";
         $output .= "<input type=\"RADIO\" name=\"write_permission\" value=\"autor\">";
         $output .= _("Mit Schreibrechten für alle Personen dieser Veranstaltung") . "&nbsp;";
         $output .= Icon::create('info-circle', 'inactive', ['title' => _('Lehrende, Tutor/-innen und Teilnehmer/-innen haben Schreibzugriff für Inhalte und Struktur des Lernmoduls. Tutor/-innen und Lehrende können die Verknüpfung zur Veranstaltung wieder löschen.')])->asImg();
         $output .= "</div>";
         $output .= "</div><br>" . Button::create(_('Hinzufügen'), 'add') . "<br>";
     } else {
         $output .= "&nbsp;" . Button::create(_('Hinzufügen'), 'add');
     }
     $output .= "</form>";
     return $output;
 }
开发者ID:ratbird,项目名称:hope,代码行数:57,代码来源:Ilias4ConnectedLink.class.php

示例6: getAdminModuleLinks

 /**
  * get module-links for admin
  *
  * returns links to remove or add module to object
  * @access public
  * @return string html-code
  */
 function getAdminModuleLinks()
 {
     global $connected_cms, $view, $search_key, $cms_select, $current_module;
     $output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">\n";
     $output .= CSRFProtection::tokenTag();
     $output .= "<input type=\"HIDDEN\" name=\"view\" value=\"" . htmlReady($view) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"search_key\" value=\"" . htmlReady($search_key) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"cms_select\" value=\"" . htmlReady($cms_select) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_type\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getModuleType()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_id\" value=\"" . htmlReady($connected_cms[$this->cms_type]->content_module[$current_module]->getId()) . "\">\n";
     $output .= "<input type=\"HIDDEN\" name=\"module_system_type\" value=\"" . htmlReady($this->cms_type) . "\">\n";
     if ($connected_cms[$this->cms_type]->content_module[$current_module]->isConnected()) {
         $output .= "&nbsp;" . Button::create(_('Entfernen'), 'remove');
     } else {
         $output .= "&nbsp;" . Button::create(_('Hinzufügen'), 'add');
     }
     $output .= "</form>";
     return $output;
 }
开发者ID:ratbird,项目名称:hope,代码行数:26,代码来源:ConnectedLink.class.php

示例7: navigator

    function navigator()
    {
        global $cssSw, $view_mode;

        //match start_time & end_time for a whole week
        $dow = date ("w", $this->start_time);
        if (date ("w", $this->start_time) >1)
            $offset = 1 - date ("w", $this->start_time);
        if (date ("w", $this->start_time) <1)
            $offset = -6;
        $start_time = mktime (0, 0, 0, date("n",$this->start_time), date("j", $this->start_time)+$offset+($this->week_offset*7), date("Y", $this->start_time));
        $end_time = mktime (23, 59, 0, date("n",$start_time), date("j", $start_time)+6, date("Y", $start_time));

        ?>
        <table border=0 celpadding=2 cellspacing=0 width="99%" align="center">
            <form method="POST" action="<?echo URLHelper::getLink('?navigate=TRUE&quick_view=view_schedule&quick_view_mode='.$view_mode)?>">
            <?= CSRFProtection::tokenTag() ?>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="96%" colspan="2"><font size=-1><b><?=_("Zeitraum:")?></b></font>
                </td>
            </tr>
            <tr>
                <td class="<? echo $cssSw->getClass() ?>" width="4%" rowspan="2">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="30%" rowspan="2" valign="middle"><font size=-1>
                    <font size=-1>Beginn:
                    <input type="text" id="startTime" name="startTime" size="8" value="<?if($start_time) : ?><?=date('j.n.Y', $start_time)?><?endif;?>">
                    <script>
                        jQuery("#startTime").datepicker();
                    </script>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<?= Button::create(_('Auswählen'), 'jump') ?>
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="66%" valign="bottom"><font size=-1>
                    <input type="text" name="schedule_length_factor" size=2 maxlength=2 / value="<? if (!$this->length_factor) echo "1"; else echo $this->length_factor; ?>">
                    &nbsp; <select name="schedule_length_unit">
                        <option <? if ($this->length_unit  == "d") echo "selected" ?> value="d"><?=_("Tag(e)")?></option>
                        <option <? if ($this->length_unit  == "w") echo "selected" ?> value="w"><?=_("Woche(n)")?></option>
                        <option <? if ($this->length_unit  == "m") echo "selected" ?> value="m"><?=_("Monat(e)")?></option>
                        <option <? if ($this->length_unit  == "y") echo "selected" ?> value="y"><?=_("Jahre(e)")?></option>
                    </select>
                    <?= Button::create(_('Als Liste ausgeben'), 'start_list') ?>
                </td>
            </tr>
            <tr>
                <td class="<? echo $cssSw->getClass() ?>" width="66%" valign="bottom">
                    <i>oder</i>
                    <?= Button::create(_('Eine Woche grafisch ausgeben'), 'start_graphical') ?>
                </td>
            </tr>
        </table>
    <?
    }
开发者ID:ratbird,项目名称:hope,代码行数:54,代码来源:ShowSchedules.class.php

示例8: _

    <?= MessageBox::info( _("Die Studiengruppen sind derzeit <b>nicht</b> aktiviert.")
            . '<br>'. _("Zum Aktivieren füllen Sie bitte das Formular aus und klicken Sie auf \"Speichern\".")); ?>
<? else: ?>
    <? if ($can_deactivate) : ?>
        <?= MessageBox::info( _("Die Studiengruppen sind aktiviert.")) ?>
        <form action="<?= $controller->url_for('course/studygroup/deactivate') ?>" method="post">
        <?= CSRFProtection::tokenTag() ?>
        <?= Button::create(_("Deaktivieren"), 'deaktivieren') ?>
        </form>
    <? else: ?>
        <?= MessageBox::info(_("Sie können die Studiengruppen nicht deaktivieren, solange noch welche in Stud.IP vorhanden sind!")) ?>
    <? endif; ?>
    <br>
<?php endif;?>
<form action="<?= $controller->url_for('course/studygroup/savemodules') ?>" method="post">
    <?= CSRFProtection::tokenTag() ?>
    <!-- Title -->
<table class="default">
    <tr>
        <th colspan="2"> <b><?= _("Einrichtungszuordnung") ?></b> </th>
    </tr>
    <tr>
        <td>
            <?= _("Alle Studiengruppen werden folgender Einrichtung zugeordnet:") ?><br>
        </td>
        <td>
            <select name="institute">
            <? if (!Config::getInstance()->getValue('STUDYGROUPS_ENABLE')):?>
                <option value='invalid' selected><?= _("-- bitte auswählen --")?></option>
            <? endif ?>
            <? foreach ($institutes as $fak_id => $faculty) : ?>
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:globalmodules.php

示例9: checkIntegrity

 /**
  * check db-integrity
  *
  * checks if there are broken links in the database
  * @access public
  * @return boolean successful
  */
 function checkIntegrity()
 {
     global $ELEARNING_INTERFACE_MODULES, $messages;
     $db = DBManager::get();
     foreach ($ELEARNING_INTERFACE_MODULES as $cms_type => $data) {
         $cmsystems[$cms_type] = array();
     }
     $config = Config::get();
     foreach ($config->getFields('global', null, 'ELEARNING_INTERFACE_') as $key) {
         $parts = explode("_", $key);
         $cmsystems[$parts[2]]["config"]++;
     }
     $rs = $db->query("SELECT external_user_system_type, COUNT(*) as c FROM auth_extern GROUP BY external_user_system_type");
     while ($row = $rs->fetch()) {
         $cmsystems[$row["external_user_system_type"]]["accounts"] = $row['c'];
     }
     $rs = $db->query("SELECT system_type, COUNT(*) FROM object_contentmodules GROUP BY system_type");
     while ($row = $rs->fetch()) {
         $cmsystems[$row["system_type"]]["modules"] = $row['c'];
     }
     if (Request::submitted('delete')) {
         $messages["info"] .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
         $messages["info"] .= CSRFProtection::tokenTag();
         $messages["info"] .= "<table>";
         $messages["info"] .= "<tr><td>&nbsp;</td></tr>";
         $messages["info"] .= "<tr><td>" . sprintf(_("Durch das Löschen der Daten zum System mit dem Index \"%s\" werden %s Konfigurationseinträge und Verknüpfungen von Stud.IP-Veranstaltungen und -User-Accounts unwiederbringlich aus der Stud.IP-Datenbank entfernt. Wollen Sie diese Daten jetzt löschen?"), Request::quoted('delete_cms'), $cmsystems[Request::quoted('delete_cms')]["accounts"] + $cmsystems[Request::quoted('delete_cms')]["modules"] + $cmsystems[Request::quoted('delete_cms')]["config"]) . "</td></tr>";
         $messages["info"] .= "<tr><td align=\"center\"><input type=\"hidden\" name=\"delete_cms\" value=\"" . Request::quoted('delete_cms') . "\">";
         $messages["info"] .= '<div class="button-group">' . Button::create(_('Alle löschen'), 'confirm_delete') . Button::createCancel(_('Abbrechen'), 'abbruch') . '<div></td></tr>';
         $messages["info"] .= "<tr><td align=\"center\"></td></tr>";
         $messages["info"] .= "</table>";
         $messages["info"] .= "</form>";
     }
     if (Request::submitted('confirm_delete')) {
         unset($cmsystems[Request::quoted('delete_cms')]);
         //          deleteCMSData(Request::quoted('delete_cms'));
         $messages["info"] .= _("Daten wurden gelöscht.");
     }
     foreach ($cmsystems as $cms_type => $data) {
         if ($ELEARNING_INTERFACE_MODULES[$cms_type]) {
             $output .= ELearningUtils::getCMSHeader($ELEARNING_INTERFACE_MODULES[$cms_type]["name"]);
             $output .= "<table>";
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             if (ELearningUtils::getConfigValue("ACTIVE", $cms_type)) {
                 $output .= "<tr><td>" . Icon::create('checkbox-checked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><b>" . sprintf(_("Die Schnittstelle zum System %s ist aktiv."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</b></td></tr>";
                 $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             } elseif ($data["config"] < 1) {
                 $output .= "<tr><td>" . Icon::create('checkbox-unchecked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Die Schnittstelle für das System %s wurde noch nicht eingerichtet."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</i></td></tr>";
             } elseif ($data["config"] < 1) {
                 $output .= "<tr><td>" . Icon::create('checkbox-unchecked', 'clickable')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Die Schnittstelle wurde noch nicht aktiviert."), $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</i></td></tr>";
             }
             if ($data["accounts"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Stud.IP-User-Accounts sind mit Accounts im System %s verknüpft."), $data["accounts"], $ELEARNING_INTERFACE_MODULES[$cms_type]["name"]) . "</td></tr>";
             }
             if ($data["modules"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Objekte sind Stud.IP-Veranstaltungen oder -Einrichtungen zugeordnet."), $data["modules"]) . "</td></tr>";
             }
             if ($data["config"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Einträge in der config-Tabelle der Stud.IP-Datenbank."), $data["config"]) . "</td></tr>";
             }
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             $output .= "</table>";
             $output .= ELearningUtils::getCMSFooter($ELEARNING_INTERFACE_MODULES[$cms_type]["logo_file"] ? "<img src=\"" . $ELEARNING_INTERFACE_MODULES[$cms_type]["logo_file"] . "\" border=\"0\">" : $cms_type);
         } else {
             $output .= ELearningUtils::getCMSHeader("<font color=FF0000> Unbekanntes System: " . $cms_type . "</font>");
             $output .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "\">";
             $output .= CSRFProtection::tokenTag();
             $output .= "<table>";
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             $output .= "<tr><td>" . Icon::create('decline', 'attention')->asImg(['class' => 'text-top']) . "</td><td><i>" . sprintf(_("Für das System mit dem Index \"%s\" existieren keine Voreinstellungen in den Konfigurationsdateien mehr."), $cms_type) . "</i></td></tr>";
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             $output .= "<tr><td colspan=\"2\"><b>" . _("In der Stud.IP-Datenbank sind noch folgende Informationen zu diesem System gespeichert:") . "</b></td></tr>";
             if ($data["accounts"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Stud.IP-User-Accounts sind mit externen Accounts mit dem Index \"%s\" verknüpft."), $data["accounts"], $cms_type) . "</td></tr>";
             }
             if ($data["modules"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Objekte sind Stud.IP-Veranstaltungen oder -Einrichtungen zugeordnet."), $data["modules"]) . "</td></tr>";
             }
             if ($data["config"]) {
                 $output .= "<tr><td colspan=\"2\">" . sprintf(_("%s Einträge in der config-Tabelle der Stud.IP-Datenbank."), $data["config"]) . "</td></tr>";
             }
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             $output .= "<tr><td align=\"center\" colspan=\"2\"><input type=\"hidden\" name=\"delete_cms\" value=\"" . $cms_type . "\">" . Button::create(_('Löschen'), 'delete') . "</td></tr>";
             $output .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
             $output .= "</table>";
             $output .= "</form>";
             $output .= ELearningUtils::getCMSFooter('');
         }
         $output .= "<br>";
     }
     return $output;
 }
开发者ID:ratbird,项目名称:hope,代码行数:98,代码来源:ELearningUtils.class.php

示例10: testTokenTag

 function testTokenTag()
 {
     $token = CSRFProtection::token();
     $this->assertTrue(strpos(CSRFProtection::tokenTag(), $token) !== FALSE);
 }
开发者ID:ratbird,项目名称:hope,代码行数:5,代码来源:CsrfProtectionTest.php

示例11: _

        if ($xh) $export_error .= sprintf(_("Bei der Konvertierung ist ein Fehler aufgetreten. %sDer XSLT-Prozessor meldet den Fehler  %s %s"), "<br>", $xh->code, "<br>");
        $xslt_info = _("Bei der Konvertierung ist ein Fehler aufgetreten.");
        $xslt_process = false;
        $export_error_num++;
    }


    if ($o_mode == "passthrough")
    {
        header("Location: " . GetDownloadLink($result_file, $xslt_filename .'.'. $format, 2, 'force'));
        unlink( $TMP_PATH . "/export/" . $xml_file_id);
    } else {

        $export_weiter_button = "<form method=\"POST\" action=\"" . URLHelper::getURL() . "\">";
        $export_weiter_button .= CSRFProtection::tokenTag();
        $export_weiter_button .= "<input type=\"hidden\" name=\"page\" value=\"4\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"choose\" value=\"" . htmlReady($choose) . "\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"format\" value=\"" . htmlReady($format) . "\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"o_mode\" value=\"" . htmlReady($o_mode) . "\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"ex_type\" value=\"" . htmlReady($ex_type) . "\">";
        $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem\" value=\"" . htmlReady($ex_sem) . "\">";
        foreach(array_keys($ex_sem_class) as $semclassid){
            $export_pagecontent .= "<input type=\"hidden\" name=\"ex_sem_class[". htmlReady($semclassid) ."]\" value=\"1\">";
        }
        $export_weiter_button .= "<input type=\"hidden\" name=\"range_id\" value=\"" . htmlReady($range_id) . "\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"xml_file_id\" value=\"" . htmlReady($xml_file_id) . "\">";
        $export_weiter_button .= "<input type=\"hidden\" name=\"xslt_filename\" value=\"" . htmlReady($xslt_filename) . "\">";
        if (Request::option('jump'))
            $export_weiter_button .= '<center>' . LinkButton::create('<< ' . _('Zurück'), URLHelper::getURL('seminar_main.php', array('auswahl' => $range_id, 'redirect_to' => $jump))) . "<br>";
        else
开发者ID:ratbird,项目名称:hope,代码行数:30,代码来源:export_run_xslt.inc.php

示例12: showSearch

    function showSearch() {
        ?>
        <form method="post" action="<?= URLHelper::getLink('?search_send=yes&quick_view=search&quick_view_mode='. Request::option('view_mode')) ?>">
            <?= CSRFProtection::tokenTag() ?>
            <table border=0 celpadding=2 cellspacing=0 width="99%" align="center">
                <?
                $this->searchForm();
                if (!$this->searchArray) {
                    if ($this->mode == "browse")
                        $this->browseLevels();
                    if ($this->check_assigns)
                        $this->showTimeRange();
                    if ($this->mode == "properties")
                        $this->showProperties();
                    if ($this->mode == "browse")
                        $this->showList();
                } else {
                    if ($this->check_assigns)
                        $this->showTimeRange();
                    if ($this->mode == "properties")
                        $this->showProperties();
                    $this->showSearchList(($_SESSION['resources_data']["check_assigns"]) ? TRUE : FALSE);

                }
                ?>
            </table>
        </form>
            <br>
        <?
    }
开发者ID:ratbird,项目名称:hope,代码行数:30,代码来源:ResourcesBrowse.class.php

示例13: showRequest

    /**
     *
     * @param $request_id
     */
    function showRequest($request_id)
    {
        global $cssSw, $perm;

        $reqObj = new RoomRequest($request_id);
        $semObj = new Seminar($reqObj->getSeminarId());
        $sem_link = $perm->have_studip_perm('tutor', $semObj->getId()) ?
            "seminar_main.php?auswahl=" . $semObj->getId() :
            "dispatch.php/course/details/?sem_id=" . $semObj->getId() . "&send_from_search=1&send_from_search_page="
            . URLHelper::getLink("resources.php?working_on_request=$request_id");
        ?>
        <form method="POST" action="<?echo URLHelper::getLink('?working_on_request=' . $request_id);?>">
        <?php 
echo CSRFProtection::tokenTag();
?>
        <input type="hidden" name="view" value="edit_request">
        <table border=0 celpadding=2 cellspacing=0 width="99%" align="center">
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top">
                    <a href="<?php 
echo URLHelper::getLink($sem_link);
?>
">
                        <b><?php 
echo $semObj->seminar_number ? htmlReady($semObj->seminar_number) . ':' : '';
echo htmlReady($semObj->getName());
?>
</b>
                    </a>
                    <font size="-1">
                        <br>
                        <?
                        $names = $this->selectSemInstituteNames($semObj->getInstitutId());

                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Art der Anfrage").": ".$reqObj->getTypeExplained()."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Erstellt von").": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='.get_username($reqObj->getUserId()))."\">".htmlReady(get_fullname($reqObj->getUserId()))."</a><br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Erstellt am") .": ". strftime('%x %H:%M', $reqObj->mkdate) . '<br>';
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Letzte Änderung") . ": ". strftime('%x %H:%M', $reqObj->chdate) . '<br>';
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Letzte Änderung von") . ": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='.get_username($reqObj->last_modified_by ?: $reqObj->user_id))."\">".htmlReady(get_fullname($reqObj->last_modified_by ?: $reqObj->user_id))."</a><br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Lehrende") . ': ';
                        foreach ($semObj->getMembers('dozent') as $doz) {
                            if ($dozent){
                                echo ", ";
                            }
                            echo '<a href ="'. URLHelper::getLink('dispatch.php/profile?username='.$doz['username']). '">'.HtmlReady($doz['fullname'])."</a>";
                            $dozent = true;
                        }
                        print "<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("verantwortliche Einrichtung").": ".htmlReady($names['inst_name'])."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("verantwortliche Fakultät").": ".htmlReady($names['fak_name'])."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("aktuelle Teilnehmerzahl").": ".$semObj->getNumberOfParticipants('total').'<br>';
                        ?>
                    </font>
                </td>
            </tr>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top">
                    <font size="-1"><b><?php 
echo _("angeforderte Belegungszeiten");
?>
:</b><br><br>
                    <?
                    $dates = $semObj->getGroupedDates($reqObj->getTerminId(),$reqObj->getMetadateId());
                    if ($dates['first_event']) {
                            $i = 1;
                            if(is_array($dates['info']) && sizeof($dates['info']) > 0 ){
                                 foreach ($dates['info'] as $info) {
                                      $name = $info['name'];
                                      if ($info['weekend']) $name = '<span style="color:red">'. $info['name'] . '</span>';
                                          printf ("<font color=\"blue\"><i><b>%s</b></i></font>. %s<br>", $i, $name);
                                      $i++;
                                 }
                            }

                            if ($reqObj->getType() != 'date') {
                                echo _("regelmäßige Buchung ab").": ".strftime("%x", $dates['first_event']);
                            }
                     } else {
                            print _("nicht angegeben");
                     }
                    ?>
                    </font>
                </td>
                <td style="border-left:1px dotted black; background-color: #f3f5f8" width="51%" rowspan="4" valign="top">
                    <table cellpadding="2" cellspacing="0" border="0" width="90%">
                        <tr>
                            <td width="70%">
                                <font size="-1"><b><?php 
echo _("angeforderter Raum");
?>
:</b></font>
                            </td>
//.........这里部分代码省略.........
开发者ID:ratbird,项目名称:hope,代码行数:101,代码来源:ShowToolsRequests.class.php

示例14: link_form

function link_form ($range_id, $updating=FALSE)
{
    global $SessSemName, $the_link, $protect, $description, $name, $folder_system_data, $user;
    if ($folder_system_data['update_link']) {
        $updating = TRUE;
    }
    if ($protect == 'on') {
        $protect = 'checked';
    }
    $print = '';
    $hiddenurl = FALSE;
    if ($updating == TRUE) {
        $query = "SELECT name, description, url, protected, user_id
                  FROM dokumente
                  WHERE dokument_id = ?";
        $statement = DBManager::get()->prepare($query);
        $statement->execute(array($range_id));
        $row = $statement->fetch(PDO::FETCH_ASSOC);
        if ($row) {
            $the_link = $row['url'];
            $protect  = $row['protected'];
            if ($protect == 1) {
                $protect = 'checked';
            }
            $name = $row['name'];
            $description = $row['description'];
            if ($row['user_id'] != $user->id) { // check if URL can be seen
                $url_parts = @parse_url( $the_link );
                if ($url_parts['user'] && $url_parts['user'] != 'anonymous') {
                    $hiddenurl = TRUE;
                }

            }
        }
    }
    if ($folder_system_data["linkerror"]==TRUE) {
        $print.="<hr>".  Icon::create('accept', 'attention')->asImg(['class' => 'text-top']) . "<font color=\"red\">";
        $print.=_("&nbsp;FEHLER: unter der angegebenen Adresse wurde keine Datei gefunden.<br>&nbsp;Bitte kontrollieren Sie die Pfadangabe!");
        $print.="</font><hr>";
    }
    // Check if URL can be seen



    $print.="\n<br><br>" . _("Sie haben diesen Ordner zum Upload ausgewählt:") . "<br><br><center><table width=\"90%\" style=\"border: 1px solid #000000;\" border=0 cellpadding=2 cellspacing=3>";

    $print.="</font></td></tr>";
    $print.= "\n<form enctype=\"multipart/form-data\" name=\"link_form\" action=\"" . URLHelper::getLink('#anker') . "\" method=\"post\">";
    $print.= CSRFProtection::tokenTag();
    $print.= "<tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("1. Geben Sie hier den <b>vollständigen Pfad</b> zu der Datei an, die Sie verlinken wollen.") . " </font></td></tr>";
    $print.= "\n<tr>";
    $print.= "\n<td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><label><font size=-1>&nbsp;" . _("Dateipfad:") . "&nbsp;</font><br>";
    if ($hiddenurl)
        $print.= "&nbsp;<input name=\"the_link\" type=\"text\"  style=\"width: 70%\" size=\"30\" value=\"***\"></label>&nbsp;</td></td>";
    else
        $print.= '&nbsp;<input name="the_link" type="text"  style="width: 70%" size="30" value="'.$the_link.'"></label>&nbsp;</td></td>';
    $print.= "\n</tr>";
    if (!$refresh) {

        $print.= "<tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("2. Schutz gemäß Urheberrecht.") . "</font></td></tr>";
        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><font size=-1>&nbsp;" . _("Dieses Dokument ist frei von Rechten Dritter:") . "&nbsp;";
        $print.= "\n&nbsp;<label><input type=\"RADIO\" name=\"protect\" value=\"0\"".(!$protect ? "checked" :"") .'>'._("Ja");
        $print.= "</label>\n&nbsp;<label><input type=\"RADIO\" name=\"protect\" value=\"1\"".($protect ? "checked" :"") .'>'._("Nein");

        $print.= "</label><tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("3. Geben Sie eine kurze Beschreibung und einen Namen für die Datei ein.") . "</font></td></tr>";
        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><label><font size=-1>&nbsp;" . _("Name:") . "&nbsp;</font><br>";
        $print.= "\n".'&nbsp;<input type="text" name="name" id="name" style="width: 70%" size="40" maxlength"255" value="'.$name.'"></label></td></tr>';

        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><label><font size=-1>&nbsp;" . _("Beschreibung:") . "&nbsp;</font><br>";
        $print.= "\n&nbsp;<textarea name=\"description\" id=\"description\" style=\"width: 70%\" COLS=40 ROWS=3 WRAP=PHYSICAL>$description</textarea></label>&nbsp;</td></tr>";
        $print.= "\n<tr><td class=\"content_seperator\"colspan=2 ><font size=-1>" . _("4. Klicken Sie auf <b>'Absenden'</b>, um die Datei zu verlinken") . "</font></td></tr>";
    } else
        $print.= "\n<tr><td class=\"content_seperator\"colspan=2 ><font size=-1>" . _("2. Klicken Sie auf <b>'Absenden'</b>, um die Datei hochzuladen und damit die alte Version zu überschreiben.") . "</font></td></tr>";
    $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"center\" valign=\"center\">";

    $print .= '<div class="button-group">';
    $print .= Button::createAccept(_("Absenden"), "create");
    $print .= LinkButton::createCancel(_("Abbrechen"), URLHelper::getURL("?cancel_x=true#anker"));
    $print .= '</div>';

    $print .="</td></tr>";
    $print.= "\n<input type=\"hidden\" name=\"upload_seminar_id\" value=\"".$SessSemName[1]."\">";
    if ($updating == TRUE) {
        $print.= "\n<input type=\"hidden\" name=\"cmd\" value=\"link_update\">";
        $print.= "\n<input type=\"hidden\" name=\"link_update\" value=\"$range_id\">";
    } else {
        $print.= "\n<input type=\"hidden\" name=\"cmd\" value=\"link\">";
    }
    $print.= "\n</form></table><br></center>";

    return $print;

}
开发者ID:ratbird,项目名称:hope,代码行数:93,代码来源:datei.inc.php

示例15: getFormStart

 function getFormStart($action = false, $attributes = false)
 {
     if (!$action) {
         $action = URLHelper::getLink();
     }
     $ret = "\n<form action=\"{$action}\" method=\"post\" name=\"{$this->form_name}\" " . $this->getAttributes($attributes) . ">";
     $ret .= CSRFProtection::tokenTag();
     return $ret;
 }
开发者ID:ratbird,项目名称:hope,代码行数:9,代码来源:StudipForm.class.php


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