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


PHP utf_ucfirst函数代码示例

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


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

示例1: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable} WHERE group_single_user = 0";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(102 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:10,代码来源:phpbb.inc.php

示例2: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(1 => 'Guests');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
开发者ID:phill104,项目名称:branches,代码行数:10,代码来源:mambo.inc.php

示例3: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = $this->query($sql);
     // XMB has no guest group in groups table, so adding one here
     $udb_groups = array(3 => 'Guests');
     while ($row = cpg_db_fetch_assoc($result)) {
         $udb_groups[$row['id'] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     $result->free();
     return $udb_groups;
 }
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:12,代码来源:xmb.inc.php

示例4: collect_groups

 function collect_groups()
 {
     // Use this version to exclude true post based groups
     //$sql ="SELECT * FROM {$this->groupstable} WHERE minposts=-1";
     // Use this version to include all SMF groups
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = cpg_db_query($sql, $this->link_id);
     $udb_groups = array(1 => 'Guests', 2 => 'Registered');
     while ($row = mysql_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     return $udb_groups;
 }
开发者ID:phill104,项目名称:branches,代码行数:13,代码来源:smf20.inc.php

示例5: synchronize_groups

 function synchronize_groups()
 {
     global $CONFIG;
     if ($this->use_post_based_groups) {
         if ($this->group_overrride) {
             $udb_groups = $this->collect_groups();
         } else {
             $sql = "SELECT * FROM {$this->groupstable} WHERE {$this->field['grouptbl_group_name']} <> ''";
             $result = cpg_db_query($sql, $this->link_id);
             $udb_groups = array();
             while ($row = mysql_fetch_assoc($result)) {
                 $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
             }
         }
     } else {
         $udb_groups = array(1 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     }
     $result = cpg_db_query("SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} WHERE 1");
     while ($row = mysql_fetch_array($result)) {
         $cpg_groups[$row['group_id']] = $row['group_name'];
     }
     mysql_free_result($result);
     /* Must be removed to allow new groups to be created in an unbridged install.
        // Scan Coppermine groups that need to be deleted
        foreach($cpg_groups as $c_group_id => $c_group_name) {
            if ((!isset($udb_groups[$c_group_id]))) {
                cpg_db_query("DELETE FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id = '" . $c_group_id . "' LIMIT 1");
                unset($cpg_groups[$c_group_id]);
            }
        }
        */
     // Scan udb groups that need to be created inside Coppermine table
     foreach ($udb_groups as $i_group_id => $i_group_name) {
         if (!isset($cpg_groups[$i_group_id])) {
             // add admin info
             $admin_access = in_array($i_group_id - 100, $this->admingroups) ? '1' : '0';
             cpg_db_query("INSERT INTO {$CONFIG['TABLE_USERGROUPS']} (group_id, group_name, has_admin_access) VALUES ('{$i_group_id}', '" . addslashes($i_group_name) . "', '{$admin_access}')");
             $cpg_groups[$i_group_id] = $i_group_name;
         }
     }
     // Update Group names
     foreach ($udb_groups as $i_group_id => $i_group_name) {
         if ($cpg_groups[$i_group_id] != $i_group_name) {
             cpg_db_query("UPDATE {$CONFIG['TABLE_USERGROUPS']} SET group_name = '" . addslashes($i_group_name) . "' WHERE group_id = '{$i_group_id}' LIMIT 1");
         }
     }
     // fix admin grp
     if (!$this->use_post_based_groups) {
         cpg_db_query("UPDATE {$CONFIG['TABLE_USERGROUPS']} SET has_admin_access = '1' WHERE group_id = '1' LIMIT 1");
     }
 }
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:51,代码来源:coppermine.inc.php

示例6: collect_groups

 function collect_groups()
 {
     $sql = "SELECT * FROM {$this->groupstable}";
     $result = $this->query($sql);
     $udb_groups = array(1 => 'Administrators', 2 => 'Registered', 3 => 'Guests');
     while ($row = cpg_db_fetch_assoc($result)) {
         $udb_groups[$row[$this->field['grouptbl_group_id']] + 100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
     }
     $result->free();
     return $udb_groups;
 }
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:11,代码来源:phorum.inc.php


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