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


PHP ClassTools::getDomainLink方法代码示例

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


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

示例1: generateSearchForm

 protected function generateSearchForm()
 {
     if (!$this->checkSearchDefinition()) {
         return '';
     }
     $controller = $this->search_definition['controller'];
     $form = $this->search_definition['form'];
     $search_session = $this->getValuesSessionPost($controller);
     // print_r($_SESSION);
     // print_r($_POST);
     // var_dump($search_session);
     $o = '<tr class="form_search">';
     $o .= '<form method="post" action="' . ClassTools::getDomainLink() . ClassTools::getValue('controller') . '">';
     foreach ($form as $column_name => $values) {
         $class = isset($values['class']) ? ' class="' . $values['class'] . '"' : '';
         $type = isset($values['type']) ? $values['type'] : false;
         $o .= "<td{$class}>";
         switch ($type) {
             case 'text':
                 $o .= '<input type="text" value="' . ($search_session && isset($search_session[$column_name]) ? htmlspecialchars($search_session[$column_name]) : '') . '" name="' . $column_name . '" />';
                 break;
             case 'select':
                 $class_select = isset($values['search']) && $values['search'] === true ? 'jsselect' : 'jsselectnosearch';
                 if (isset($values['optgroup']) && is_array($values['optgroup']) && count($values['optgroup']) > 0) {
                     $o .= '<select name="' . $column_name . '" class="' . $class_select . '">';
                     $o .= '<option value="">---</option>';
                     foreach ($values['optgroup'] as $group) {
                         $o .= '<optgroup label="' . htmlspecialchars($group['name']) . '">';
                         if (isset($group['childs']) && is_array($group['childs']) && count($group['childs']) > 0) {
                             foreach ($group['childs'] as $key_type => $type) {
                                 $selected = $search_session && isset($search_session[$column_name]) && $search_session[$column_name] != '' && $search_session[$column_name] == $key_type ? ' selected="selected"' : '';
                                 $o .= '<option value="' . $key_type . '"' . $selected . '>' . htmlspecialchars($type) . '</option>';
                             }
                         }
                         $o .= '</optgroup>';
                     }
                     $o .= '</select>';
                 } elseif (isset($values['options']) && is_array($values['options']) && count($values['options']) > 0) {
                     $o .= '<select name="' . $column_name . '" class="' . $class_select . '">';
                     $o .= '<option value="">---</option>';
                     foreach ($values['options'] as $option_key => $option_value) {
                         $selected = $search_session && isset($search_session[$column_name]) && $search_session[$column_name] != '' && $search_session[$column_name] == $option_key ? ' selected="selected"' : '';
                         $o .= '<option value="' . $option_key . '"' . $selected . '>' . $option_value . '</option>';
                     }
                     $o .= '</select>';
                 }
                 break;
             default:
                 if ($column_name == 'actions') {
                     $o .= '<div class="btn-group btn-group-sm">
                             <button class="btn btn-primary" value="search" name="form_action_search" type="submit">Szukaj</button>
                             <button class="btn btn-warning" value="search_delete" name="form_action_search" type="submit">Wyczyść</button>
                         </div>
                         ';
                 } else {
                     // $o .= '---';
                     $o .= '';
                 }
                 break;
         }
         $o .= '</td>';
     }
     $o .= '</form>';
     $o .= '</tr>';
     return $o;
 }
开发者ID:s9271,项目名称:SEW3,代码行数:66,代码来源:ControllerSearch.php

示例2: sendMailNewPasswordLink

 protected function sendMailNewPasswordLink($adres, $password_key)
 {
     // mail
     // $adres = "mariusz@nephax.com";
     // od kogo
     $from = "System Ewidencji Wojskowej <system@sew.org.pl>";
     // temat
     $temat = "Resetowanie hasła";
     // link
     $link = ClassTools::getDomainLink() . "haslo/{$password_key}";
     // wysylka
     $boundary = "-->===_54654747_===<---->>4255==_";
     $head = 'From: ' . $from . "\n";
     $head .= "MIME-version: 1.0\n";
     $head .= "Content-type: multipart/mixed; ";
     $head .= "boundary=\"{$boundary}\"\n";
     $head .= "Content-Transfer-Encoding: 8bit\n";
     $head .= "charset=\"iso-8859-2\"\n";
     $tresc_maila = "--" . $boundary . "\n";
     $tresc_maila .= "Content-Type: text/plain; charset=\"iso-8859-2\"\n\n";
     $tresc_maila .= "Aby zresetować hasło proszę wejść na na poniższy link:\n\n";
     $tresc_maila .= '<a href="' . $link . '">' . $link . '</a>' . "\n\n";
     $tresc_maila .= "Link aktywny jest tylko przez " . ClassAuth::$password_link_time . " godzin.\n\n";
     $tresc_maila .= "Wiadomość została wygenerowana przez system, prosimy na niego nie odpowiadać.\n\n";
     $tresc_maila .= "--" . $boundary . "-- \n\n";
     $temat_iso = iconv('UTF-8', 'ISO-8859-2//TRANSLIT', $temat);
     $tresc_maila_iso = iconv('UTF-8', 'ISO-8859-2//TRANSLIT', $tresc_maila);
     $head_iso = iconv('UTF-8', 'ISO-8859-2//TRANSLIT', $head);
     mail($adres, $temat_iso, $tresc_maila_iso, $head_iso);
     // mail($adres, $temat, $tresc_maila, $head);
 }
开发者ID:s9271,项目名称:SEW3,代码行数:31,代码来源:ControllerLogin.php


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