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


PHP PMF_String::strtoupper方法代码示例

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


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

示例1: printf

" />
<?php 
    if ($parentId > 0) {
        $userAllowed = $categoryUser->fetch($parentId);
        $groupAllowed = $categoryGroup->fetch($parentId);
        ?>
    <input type="hidden" name="restricted_users" value="<?php 
        print $userAllowed->user_id;
        ?>
" />
    <input type="hidden" name="restricted_groups" value="<?php 
        print $groupAllowed->group_id;
        ?>
" />
<?php 
        printf("    <p>%s: %s (%s)</p>\n", $PMF_LANG["msgMainCategory"], $categoryData->name, $languageCodes[PMF_String::strtoupper($categoryData->lang)]);
    }
    ?>
    <label class="left"><?php 
    print $PMF_LANG["ad_categ_titel"];
    ?>
:</label>
    <input type="text" id="name" name="name" size="30" style="width: 300px;" /><br />

    <label class="left"><?php 
    print $PMF_LANG["ad_categ_desc"];
    ?>
:</label>
    <textarea id="description" name="description" rows="3" cols="80" style="width: 300px;"></textarea><br />
    
    <label class="left"><?php 
开发者ID:rybal06,项目名称:phpMyFAQ,代码行数:31,代码来源:category.add.php

示例2: strtoupper

 /**
  * Make a string upper case
  * 
  * @param string $str String
  * 
  * @return string
  */
 public static function strtoupper($str)
 {
     return self::$instance->strtoupper($str);
 }
开发者ID:noon,项目名称:phpMyFAQ,代码行数:11,代码来源:String.php

示例3: round

        $num = round($searchItem['number'] * 100 / $searchesCount, 2);
        ?>
        <tr class="row_search_id_<?php 
        print $searchItem['id'];
        ?>
">
            <td><?php 
        print PMF_String::htmlspecialchars($searchItem['searchterm']);
        ?>
</td>
            <td><?php 
        print $searchItem['number'];
        ?>
</td>
            <td><?php 
        print $languageCodes[PMF_String::strtoupper($searchItem['lang'])];
        ?>
</td>
            <td><?php 
        print $num;
        ?>
 %</td>
            <td>
                <a onclick="deleteSearchTerm('<?php 
        print $searchItem['searchterm'];
        ?>
', <?php 
        print $searchItem['id'];
        ?>
); return false;"
                   href="javascript:;">
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:stat.search.php

示例4: validateCaptchaCode

 /**
  * Validate the Captcha
  *
  * @param  string $captchaCode Captcha code
  * @return boolean
  */
 public function validateCaptchaCode($captchaCode)
 {
     // Sanity check
     if (0 == PMF_String::strlen($captchaCode)) {
         return false;
     }
     $captchaCode = PMF_String::strtoupper($captchaCode);
     // Help the user: treat "0" (ASCII 48) like "O" (ASCII 79)
     //                if "0" is not in the realm of captcha code letters
     if (!in_array("0", $this->letters)) {
         $captchaCode = str_replace("0", "O", $captchaCode);
     }
     // Sanity check
     for ($i = 0; $i < PMF_String::strlen($captchaCode); $i++) {
         if (!in_array($captchaCode[$i], $this->letters)) {
             return false;
         }
     }
     // Search for this Captcha in the db
     $query = sprintf("\n            SELECT\n                id\n            FROM\n                %sfaqcaptcha\n            WHERE\n                id = '%s'", PMF_Db::getTablePrefix(), $this->_config->getDb()->escape($captchaCode));
     if ($result = $this->_config->getDb()->query($query)) {
         $num = $this->_config->getDb()->numRows($result);
         if ($num > 0) {
             $this->code = $captchaCode;
             $this->removeCaptcha($captchaCode);
             return true;
         }
     }
     return false;
 }
开发者ID:kapljr,项目名称:Jay-Kaplan-Farmingdale-BCS-Projects,代码行数:36,代码来源:Captcha.php

示例5: array

        $groupsAllowed = $category->getPermissions('group', array($parentId));
        ?>
            <input type="hidden" name="restricted_users" value="<?php 
        echo $userAllowed[0];
        ?>
">
            <?php 
        foreach ($groupsAllowed as $group) {
            ?>
            <input type="hidden" name="restricted_groups[]" value="<?php 
            echo $group;
            ?>
">
            <?php 
        }
        printf('<div class="control-group">%s: %s (%s)</div>', $PMF_LANG['msgMainCategory'], $category->categoryName[$parentId]['name'], $languageCodes[PMF_String::strtoupper($category->categoryName[$parentId]['lang'])]);
    }
    ?>
            <div class="control-group">
                <label class="control-label" for="name"><?php 
    echo $PMF_LANG['ad_categ_titel'];
    ?>
:</label>
                <div class="controls">
                    <input type="text" id="name" name="name" required="required">
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="description"><?php 
    echo $PMF_LANG['ad_categ_desc'];
开发者ID:kapljr,项目名称:Jay-Kaplan-Farmingdale-BCS-Projects,代码行数:31,代码来源:category.add.php

示例6: getRecordsFromLetter

 /**
  * Returns all records from the current first letter
  *
  * @param  string $letter Letter
  * @return array
  * @since  2007-03-30
  * @author Thorsten Rinne <thorsten@phpmyfaq.de>
  */
 public function getRecordsFromLetter($letter = 'A')
 {
     global $sids, $PMF_LANG;
     if ($this->groupSupport) {
         $permPart = sprintf("( fdg.group_id IN (%s)\n            OR\n                (fdu.user_id = %d AND fdg.group_id IN (%s)))", implode(', ', $this->groups), $this->user, implode(', ', $this->groups));
     } else {
         $permPart = sprintf("( fdu.user_id = %d OR fdu.user_id = -1 )", $this->user);
     }
     $letter = PMF_String::strtoupper($this->db->escape_string(PMF_String::substr($letter, 0, 1)));
     $writeMap = '';
     switch ($this->type) {
         case 'db2':
         case 'sqlite':
             $query = sprintf("\n                    SELECT\n                        fd.thema AS thema,\n                        fd.id AS id,\n                        fd.lang AS lang,\n                        fcr.category_id AS category_id,\n                        fd.content AS snap\n                    FROM\n                        %sfaqcategoryrelations fcr,\n                        %sfaqdata fd\n                    LEFT JOIN\n                        %sfaqdata_group AS fdg\n                    ON\n                        fd.id = fdg.record_id\n                    LEFT JOIN\n                        %sfaqdata_user AS fdu\n                    ON\n                        fd.id = fdu.record_id\n                    WHERE\n                        fd.id = fcr.record_id\n                    AND\n                        SUBSTR(fd.thema, 1, 1) = '%s'\n                    AND\n                        fd.lang = '%s'\n                    AND\n                        fd.active = 'yes'\n                    AND\n                        %s", SQLPREFIX, SQLPREFIX, SQLPREFIX, SQLPREFIX, $letter, $this->language, $permPart);
             break;
         default:
             $query = sprintf("\n                    SELECT\n                        fd.thema AS thema,\n                        fd.id AS id,\n                        fd.lang AS lang,\n                        fcr.category_id AS category_id,\n                        fd.content AS snap\n                    FROM\n                        %sfaqcategoryrelations fcr,\n                        %sfaqdata fd\n                    LEFT JOIN\n                        %sfaqdata_group AS fdg\n                    ON\n                        fd.id = fdg.record_id\n                    LEFT JOIN\n                        %sfaqdata_user AS fdu\n                    ON\n                        fd.id = fdu.record_id\n                    WHERE\n                        fd.id = fcr.record_id\n                    AND\n                        SUBSTRING(fd.thema, 1, 1) = '%s'\n                    AND\n                        fd.lang = '%s'\n                    AND\n                        fd.active = 'yes'\n                    AND\n                        %s", SQLPREFIX, SQLPREFIX, SQLPREFIX, SQLPREFIX, $letter, $this->language, $permPart);
             break;
     }
     $result = $this->db->query($query);
     $oldId = 0;
     while ($row = $this->db->fetch_object($result)) {
         if ($oldId != $row->id) {
             $title = PMF_String::htmlspecialchars($row->thema, ENT_QUOTES, 'utf-8');
             $url = sprintf('%saction=artikel&amp;cat=%d&amp;id=%d&amp;artlang=%s', $sids, $row->category_id, $row->id, $row->lang);
             $oLink = new PMF_Link(PMF_Link::getSystemRelativeUri() . '?' . $url);
             $oLink->itemTitle = $row->thema;
             $oLink->text = $title;
             $oLink->tooltip = $title;
             $writeMap .= '<li>' . $oLink->toHtmlAnchor() . '<br />' . "\n";
             $writeMap .= PMF_Utils::chopString(strip_tags($row->snap), 25) . " ...</li>\n";
         }
         $oldId = $row->id;
     }
     $writeMap = empty($writeMap) ? '' : '<ul>' . $writeMap . '</ul>';
     return $writeMap;
 }
开发者ID:atlcurling,项目名称:tkt,代码行数:45,代码来源:Sitemap.php

示例7: array

" />
<?php 
    if ($parent_id > 0) {
        $user_allowed = $category->getPermissions('user', array($parent_id));
        $group_allowed = $category->getPermissions('group', array($parent_id));
        ?>
            <input type="hidden" name="restricted_users" value="<?php 
        print $user_allowed[0];
        ?>
" />
            <input type="hidden" name="restricted_groups" value="<?php 
        print $group_allowed[0];
        ?>
" />
<?php 
        printf("<p>%s: %s (%s)</p>", $PMF_LANG["msgMainCategory"], $category->categoryName[$parent_id]["name"], $languageCodes[PMF_String::strtoupper($category->categoryName[$parent_id]["lang"])]);
    }
    ?>

            <p>
                <label><?php 
    print $PMF_LANG["ad_categ_titel"];
    ?>
:</label>
                <input type="text" id="name" name="name" size="30" style="width: 300px;" autofocus="autofocus" />
            </p>

            <p>
                <label><?php 
    print $PMF_LANG["ad_categ_desc"];
    ?>
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:category.add.php

示例8: header

 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    $protocol = 'http';
    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
        $protocol = 'https';
    }
    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
if ($user->perm->checkRight($user->getUserId(), 'addcateg')) {
    $parentId = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT, 0);
    $templateVars = array('LANGCODE' => $LANGCODE, 'PMF_LANG' => $PMF_LANG, 'csrfToken' => $user->getCsrfTokenFromSession(), 'parentId' => $parentId, 'renderGroupPermissions' => false, 'userOptions' => $user->getAllUserOptions());
    $category = new PMF_Category($faqConfig, [], false);
    $category->setUser($currentAdminUser);
    $category->setGroups($currentAdminGroups);
    if ($parentId > 0) {
        $userAllowed = $category->getPermissions('user', array($parentId));
        $groupsAllowed = $category->getPermissions('group', array($parentId));
        $templateVars['userAllowed'] = $userAllowed[0];
        $templateVars['groupsAllowed'] = $groupsAllowed;
        $templateVars['parentCategoryName'] = $category->categoryName[$parentId]['name'];
        $templateVars['parentCategoryLanguage'] = $languageCodes[PMF_String::strtoupper($category->categoryName[$parentId]['lang'])];
    } elseif ($faqConfig->get('security.permLevel') != 'basic') {
        $templateVars['renderGroupPermissions'] = true;
        $templateVars['groupOptions'] = $user->perm->getAllGroupsOptions([]);
    }
    $twig->loadTemplate('category/add.twig')->display($templateVars);
    unset($templateVars, $parentId, $category, $userAllowed, $groupsAllowed);
} else {
    require 'noperm.php';
}
开发者ID:ae120,项目名称:phpMyFAQ,代码行数:31,代码来源:category.add.php


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