• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP fixup_string函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: exec

 case "timezone_select":
     exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
     $timezonelist = array_filter($timezonelist, 'is_timezone');
     sort($timezonelist);
     /* kill carriage returns */
     for ($x = 0; $x < count($timezonelist); $x++) {
         $timezonelist[$x] = str_replace("\n", "", $timezonelist[$x]);
     }
     if ($field['displayname']) {
         echo "<td width=\"22%\" align=\"right\" class=\"vncellreq\">\n";
         echo $field['displayname'];
         echo ":</td>\n";
     } else {
         if (!$field['dontdisplayname']) {
             echo "<td width=\"22%\" align=\"right\" class=\"vncellreq\">\n";
             echo fixup_string($field['name']);
             echo ":</td>";
         }
     }
     if (!$field['dontcombinecells']) {
         echo "<td class=\"vtable\">";
     }
     echo "<select class='formselect' name='{$name}'>\n";
     foreach ($timezonelist as $tz) {
         if (strstr($tz, "GMT")) {
             continue;
         }
         $SELECTED = "";
         if ($value == $tz) {
             $SELECTED = " SELECTED";
         }
开发者ID:rdmenezes,项目名称:pfsense,代码行数:31,代码来源:wizard.php


示例2: foreach

         }
     }
     foreach ($schedules as $schedule) {
         if ($schedule == "none") {
             $schedlist[""] = $schedule;
         } else {
             $schedlist[$schedule] = $schedule;
         }
     }
     if ($grouping) {
         $group->add(new Form_Select($pkga['fieldname'], $pkga['fielddescr'], $value, $schedlist))->setHelp(fixup_string($pkga['description']));
     } else {
         if (isset($pkga['advancedfield']) && isset($advfield_count)) {
             $advanced->addInput(new Form_Select($pkga['fieldname'], $pkga['fielddescr'], $value, $schedlist))->setHelp(fixup_string($pkga['description']));
         } else {
             $section->addInput(new Form_Select($pkga['fieldname'], $pkga['fielddescr'], $value, $schedlist))->setHelp(fixup_string($pkga['description']));
         }
     }
     break;
 case "rowhelper":
     $rowhelpername = "row";
     $rowcounter = 0;
     $trc = 0;
     //Use assigned $a_pkg or create an empty array to enter loop
     if (isset($a_pkg[$id][$rowhelpername])) {
         $saved_rows = $a_pkg[$id][$rowhelpername];
     } else {
         $saved_rows[] = array();
     }
     $numrows = count($saved_rows) - 1;
     foreach ($saved_rows as $row) {
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:pkg_edit.php


示例3: foreach

                echo "rowname[{$fieldcounter}] = \"{$rowhelper['fieldname']}\";\n";
                echo "rowtype[{$fieldcounter}] = \"{$rowhelper['type']}\";\n";
                echo "rowsize[{$fieldcounter}] = \"{$rowhelper['size']}\";\n";
                $fieldcounter++;
            }
            ?>
				//]]>
				</script>
				<table id="maintable" summary="main table">
				<tr id='<?php 
            echo "tr_{$pkga['fieldname']}";
            ?>
'>
				<?php 
            foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
                echo "<td " . domTT_title($rowhelper['description']) . "><b>" . fixup_string($rowhelper['fielddescr']) . "</b></td>\n";
            }
            $rowcounter = 0;
            $trc = 0;
            //Use assigned $a_pkg or create an empty array to enter loop
            if (isset($a_pkg[$id][$rowhelpername])) {
                $saved_rows = $a_pkg[$id][$rowhelpername];
            } else {
                $saved_rows[] = array();
            }
            foreach ($saved_rows as $row) {
                echo "</tr>\n<tr class=\"sortable\" id=\"id_{$rowcounter}\">\n";
                foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
                    unset($value);
                    if ($rowhelper['value'] != "") {
                        $value = $rowhelper['value'];
开发者ID:jdillard,项目名称:pfsense,代码行数:31,代码来源:pkg_edit.php


示例4: fixup_string

             } else {
                 if (!$field['dontdisplayname']) {
                     $etitle = fixup_string($field['name']);
                 }
             }
             if (!$field['dontcombinecells']) {
                 //echo "<td class=\"vtable\">";
             }
             $section->addInput(new Form_Select($name, $etitle, $value, array_combine($timezonelist, $timezonelist)))->setHelp($field['description']);
             break;
         case "checkbox":
             if ($field['displayname']) {
                 $etitle = $field['displayname'];
             } else {
                 if (!$field['dontdisplayname']) {
                     $etitle = fixup_string($field['name']);
                 }
             }
             if (isset($field['enablefields']) or isset($field['checkenablefields'])) {
                 $onclick = "enablechange()";
             } else {
                 if (isset($field['disablefields']) or isset($field['checkdisablefields'])) {
                     $onclick = "disablechange()";
                 }
             }
             $section->addInput(new Form_Checkbox($name, $etitle, $field['typehint'], $value != "", 'on'))->setHelp($field['description'])->setOnclick($onclick);
             break;
     }
     // e-o-switch
 }
 // e-o-foreach(package)
开发者ID:echel0n,项目名称:pfsense,代码行数:31,代码来源:wizard.php


示例5: in_array

             $source_name = $pkga['source_name'] ? $opt[$pkga['source_name']] : $opt[$pkga['name']];
             $source_value = $pkga['source_value'] ? $opt[$pkga['source_value']] : $opt[$pkga['value']];
             $selected = in_array($source_value, $items) ? 'selected="selected"' : '';
             $input .= "\t<option value=\"{$source_value}\" {$selected}>{$source_name}</option>\n";
         }
         $input .= "</select>\n<br />\n" . fixup_string($description) . "\n";
         echo $input;
         break;
     case "checkbox":
         $checkboxchecked = $value == "on" ? " checked=\"checked\"" : "";
         $onchange = isset($pkga['onchange']) ? "onchange=\"{$pkga['onchange']}\"" : '';
         if (isset($pkga['enablefields']) || isset($pkga['checkenablefields'])) {
             $onclick = ' onclick="javascript:enablechange();"';
         }
         $input = "<input id='{$pkga['fieldname']}' type='checkbox' name='{$pkga['fieldname']}' {$checkboxchecked} {$onclick} {$onchange} />\n";
         $input .= "<br />" . fixup_string($description) . "\n";
         echo $input;
         break;
 }
 #check typehint value
 if (isset($pkga['typehint'])) {
     echo " " . $pkga['typehint'];
 }
 #check combinefields options
 if (isset($pkga['combinefields'])) {
     $input = "</td>";
     if ($pkga['combinefields'] == "end") {
         $input .= "</table></td></tr>";
     }
 } else {
     $input = "</td></tr>";
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:services_upnp.php


示例6: foreach

			<?php 
                                            $rowcounter = 0;
                                            $fieldcounter = 0;
                                            foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
                                                echo "rowname[" . $fieldcounter . "] = \"" . $rowhelper['fieldname'] . "\";\n";
                                                echo "rowtype[" . $fieldcounter . "] = \"" . $rowhelper['type'] . "\";\n";
                                                $fieldcounter++;
                                            }
                                            ?>
			-->
			</script>
			<table name="maintable" id="maintable">
			<tr>
			<?php 
                                            foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
                                                echo "<td><b>" . fixup_string($rowhelper['fielddescr']) . "</td>\n";
                                            }
                                            echo "</tr>";
                                            echo "<tr>";
                                            // XXX: traverse saved fields, add back needed rows.
                                            echo "</tr>";
                                            echo "<tr>\n";
                                            $rowcounter = 0;
                                            $trc = 0;
                                            if (isset($a_pkg[$id]['row'])) {
                                                foreach ($a_pkg[$id]['row'] as $row) {
                                                    /*
                                                     * loop through saved data for record if it exists, populating rowhelper
                                                     */
                                                    foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
                                                        unset($value);
开发者ID:nuclewall,项目名称:nuclewall,代码行数:31,代码来源:pkg_edit.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP flag_create_link函数代码示例发布时间:2022-05-15
下一篇:
PHP fixperms函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap