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

PHP option_selected函数代码示例

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

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



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

示例1: get_mobile_skin_select

function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
{
    global $config;
    $skins = array();
    if (defined('G5_THEME_PATH') && $config['cf_theme']) {
        $dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH . '/' . G5_SKIN_DIR);
        if (!empty($dirs)) {
            foreach ($dirs as $dir) {
                $skins[] = 'theme/' . $dir;
            }
        }
    }
    $skins = array_merge($skins, get_skin_dir($skin_gubun, G5_MOBILE_PATH . '/' . G5_SKIN_DIR));
    $str = "<select id=\"{$id}\" name=\"{$name}\" {$event}>\n";
    for ($i = 0; $i < count($skins); $i++) {
        if ($i == 0) {
            $str .= "<option value=\"\">선택</option>";
        }
        if (preg_match('#^theme/(.+)$#', $skins[$i], $match)) {
            $text = '(테마) ' . $match[1];
        } else {
            $text = $skins[$i];
        }
        $str .= option_selected($skins[$i], $selected, $text);
    }
    $str .= "</select>";
    return $str;
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:28,代码来源:admin.lib.php


示例2: get_mobile_skin_select

function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
{
    $skins = get_skin_dir($skin_gubun, G5_MOBILE_PATH . '/' . G5_SKIN_DIR);
    $str = "<select class=\"form-control\" id=\"{$id}\" name=\"{$name}\" {$event}>\n";
    for ($i = 0; $i < count($skins); $i++) {
        if ($i == 0) {
            $str .= "<option value=\"\">선택</option>";
        }
        $str .= option_selected($skins[$i], $selected);
    }
    $str .= "</select>";
    return $str;
}
开发者ID:kimyongyeon,项目名称:myproject,代码行数:13,代码来源:admin.lib.php


示例3: get_sms5_skin_select

function get_sms5_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
{
    $skins = get_skin_dir($skin_gubun, G5_SMS5_PATH);
    $str = "<select id=\"{$id}\" name=\"{$name}\" {$event}>\n";
    for ($i = 0; $i < count($skins); $i++) {
        if ($i == 0) {
            $str .= "<option value=\"\">선택</option>";
        }
        $str .= option_selected($skins[$i], $selected);
    }
    $str .= "</select>";
    return $str;
}
开发者ID:khk0613,项目名称:YHK,代码行数:13,代码来源:sms5.lib.php


示例4: option_selected

        </tr>
        <tr>
            <th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
            <td class="cf_cert_service">
                <select name="cf_cert_hp" id="cf_cert_hp">
                    <?php 
echo option_selected("", $config['cf_cert_hp'], "사용안함");
?>
                    <?php 
echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인");
?>
                    <?php 
echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인");
?>
                    <?php 
echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인");
?>
                </select>
            </td>
        </tr>
        <tr>
            <th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
            <td class="cf_cert_service">
                <?php 
echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.');
?>
                <input type="text" name="cf_cert_kcb_cd" value="<?php 
echo $config['cf_cert_kcb_cd'];
?>
" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
                <a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:31,代码来源:config_form.php


示例5: help

            </td>
        </tr>
        <tr>
            <th scope="row"><label for="bo_use_cert">본인확인 사용</label></th>
            <td>
                <?php 
echo help("본인확인 여부에 따라 게시물을 조회 할 수 있도록 합니다.");
?>
                <select id="bo_use_cert" name="bo_use_cert">
                    <?php 
echo option_selected("", $board['bo_use_cert'], "사용안함");
if ($config['cf_cert_use']) {
    echo option_selected("cert", $board['bo_use_cert'], "본인확인된 회원전체");
    echo option_selected("adult", $board['bo_use_cert'], "본인확인된 성인회원만");
    echo option_selected("hp-cert", $board['bo_use_cert'], "휴대폰 본인확인된 회원전체");
    echo option_selected("hp-adult", $board['bo_use_cert'], "휴대폰 본인확인된 성인회원만");
}
?>
                </select>
            </td>
            <td class="td_grpset">
                <input type="checkbox" name="chk_grp_use_cert" value="1" id="chk_grp_use_cert">
                <label for="chk_grp_use_cert">그룹적용</label>
                <input type="checkbox" name="chk_all_use_cert" value="1" id="chk_all_use_cert">
                <label for="chk_all_use_cert">전체적용</label>
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="bo_upload_count">파일 업로드 개수<strong class="sound_only">필수</strong></label></th>
            <td>
                <?php 
开发者ID:kimyongyeon,项目名称:myproject,代码行数:31,代码来源:board_form.php


示例6: option_selected

?>
                </select>
            </td>
        </tr>
        <tr>
            <th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
            <td class="cf_cert_service">
                <select name="cf_cert_hp" id="cf_cert_hp">
                    <?php 
echo option_selected("", $config['cf_cert_hp'], "사용안함");
?>
                    <?php 
echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인");
?>
                    <?php 
echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인");
?>
                </select>
            </td>
        </tr>
        <tr>
            <th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
            <td class="cf_cert_service">
                <?php 
echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.');
?>
                <input type="text" name="cf_cert_kcb_cd" value="<?php 
echo $config['cf_cert_kcb_cd'];
?>
" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.co.kr/main/provider/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
                <a href="http://sir.co.kr/main/provider/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
开发者ID:eeewq123,项目名称:aaa,代码行数:31,代码来源:config_form.php


示例7: get_group_select

function get_group_select($name, $selected = '', $event = '')
{
    global $g5, $is_admin, $member;
    $sql = " select gr_id, gr_subject from {$g5['group_table']} a ";
    if ($is_admin == "group") {
        $sql .= " left join {$g5['member_table']} b on (b.mb_id = a.gr_admin)\n                  where b.mb_id = '{$member['mb_id']}' ";
    }
    $sql .= " order by a.gr_id ";
    $result = sql_query($sql);
    $str = "<select id=\"{$name}\" name=\"{$name}\" {$event}>\n";
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        if ($i == 0) {
            $str .= "<option value=\"\">선택</option>";
        }
        $str .= option_selected($row['gr_id'], $selected, $row['gr_subject']);
    }
    $str .= "</select>";
    return $str;
}
开发者ID:sungkyuchun,项目名称:gnuboard5,代码行数:19,代码来源:common.lib.php


示例8: option_selected

     for ($i = 0; $i < count($category); $i++) {
         $category_option .= option_selected($category[$i], $write['qa_category']);
     }
 } else {
     alert('1:1문의 설정에서 분류를 설정해 주십시오');
 }
 //제품명 카테고리
 $catesql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_order, ca_id ";
 $cateresult = sql_query($catesql);
 $cate_option = '';
 for ($i = 0; $row = sql_fetch_array($cateresult); $i++) {
     $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '2' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_order, ca_id ";
     $result2 = sql_query($sql2);
     $count = mysql_num_rows($result2);
     for ($j = 0; $row2 = sql_fetch_array($result2); $j++) {
         $cate_option .= option_selected($row2['ca_id'], $write['qa_1'], $row2['ca_name']);
     }
 }
 $is_dhtml_editor = false;
 // 모바일에서는 DHTML 에디터 사용불가
 if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && !G5_IS_MOBILE) {
     $is_dhtml_editor = true;
 }
 // 추가질문에서는 제목을 공백으로
 if ($w == 'r') {
     $write['qa_subject'] = '';
 }
 $content = '';
 if ($w == '') {
     $content = $qaconfig['qa_insert_content'];
 } else {
开发者ID:najinsu,项目名称:nsle,代码行数:31,代码来源:qawrite.php


示例9: foreach

}
?>
                </div>
                <div id="boxTwo" class="innerBox">
                    <p class="sectionLabel center">Manage TA Status</p>
                    <div id="adminTAList">
                        <?php 
if (count($_SESSION['ta_applicant_list']) > 0) {
    foreach ($_SESSION['ta_applicant_list'] as $ta) {
        $name = $ta->get_full_name();
        $uid = $ta->get_uid();
        $recLevel = $ta->get_recommend();
        echo "\n                                <div class='inlineGroup'>\n                                    <p class='adminTA'>{$name}</p>\n                                    <p class='adminTASelect'>\n                                        <select id='taRec' name={$uid}>";
        for ($i = 0; $i < 5; $i++) {
            $recommend = get_recommendation($i);
            if (option_selected($i, $recLevel)) {
                echo "<option value={$i} selected>{$recommend}</option>";
            } else {
                echo "<option value={$i}>{$recommend}</option>";
            }
        }
        echo "\n                                        </select>\n                                    </p>\n                                </div>\n\n                            ";
    }
} else {
    echo "<p class='center'>No TAs available</p>";
}
?>
                    </div>
                </div>
                <div id="updateTextBox">
                    <p class="center">
开发者ID:bsmcgillis,项目名称:original-ta-application,代码行数:31,代码来源:courseUpdate.php


示例10: help

?>
" id="qa_admin_email" class="frm_input"  size="50">
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="qa_use_editor">DHTML 에디터 사용</label></th>
            <td>
                <?php 
echo help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.');
?>
                <select name="qa_use_editor" id="qa_use_editor">
                    <?php 
echo option_selected(0, $qaconfig['qa_use_editor'], '사용안함');
?>
                    <?php 
echo option_selected(1, $qaconfig['qa_use_editor'], '사용함');
?>
                </select>
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="qa_subject_len">제목 길이<strong class="sound_only"> 필수</strong></label></th>
            <td>
                <?php 
echo help('목록에서의 제목 글자수');
?>
                <input type="text" name="qa_subject_len" value="<?php 
echo $qaconfig['qa_subject_len'];
?>
" id="qa_subject_len" required class="required numeric frm_input"  size="4">
            </td>
开发者ID:khk0613,项目名称:YHK,代码行数:31,代码来源:qa_config.php


示例11: alert

         if (!$is_admin) {
             if ($write['qa_type'] == 0 && $write['qa_status'] == 1) {
                 alert('답변이 등록된 문의글은 수정할 수 없습니다.');
             }
             if ($write['mb_id'] != $member['mb_id']) {
                 alert('게시글을 수정할 권한이 없습니다.\\n\\n올바른 방법으로 이용해 주십시오.', G5_URL);
             }
         }
     }
 }
 // 분류
 $category_option = '';
 if (trim($qaconfig['qa_category'])) {
     $category = explode('|', $qaconfig['qa_category']);
     for ($i = 0; $i < count($category); $i++) {
         $category_option .= option_selected($category[$i], $write['qa_category']);
     }
 } else {
     alert('1:1문의 설정에서 분류를 설정해 주십시오');
 }
 $is_dhtml_editor = false;
 if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && (!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)) {
     $is_dhtml_editor = true;
 }
 // 추가질문에서는 제목을 공백으로
 if ($w == 'r') {
     $write['qa_subject'] = '';
 }
 $content = '';
 if ($w == '') {
     $content = $qaconfig['qa_insert_content'];
开发者ID:davis00,项目名称:test,代码行数:31,代码来源:qawrite.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP option_tag函数代码示例发布时间:2022-05-15
下一篇:
PHP option_category函数代码示例发布时间: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