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

PHP getselectstr函数代码示例

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

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



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

示例1: getatypeselect

function getatypeselect($var = "", $value = "", $other = "")
{
    $Table = new TableClass("atype", "typeid");
    $arraydata = $Table->getdata('', '', 'typeid asc');
    foreach ($arraydata as $val) {
        $arrayoption[$val['typeid']] = $val['typename'];
    }
    return getselectstr($var, $arrayoption, $value, $other);
}
开发者ID:dalinhuang,项目名称:c2my,代码行数:9,代码来源:bankaccount_add.php


示例2: getareaselect

function getareaselect($var = "", $value = "", $other = "")
{
    $Table = new TableClass("area", "aid");
    $arraydata = $Table->getdata('', '', 'aid asc');
    foreach ($arraydata as $val) {
        $arrayoption[$val['aid']] = $val['name_cn'];
    }
    return getselectstr($var, $arrayoption, $value, $other);
}
开发者ID:dalinhuang,项目名称:c2my,代码行数:9,代码来源:delivery_add.php


示例3: pklabel


//.........这里部分代码省略.........
    }
    if (!isset($showarr['btnname'])) {
        $showarr['btnname'] = '';
    }
    if (!isset($showarr['title'])) {
        $showarr['title'] = '';
    }
    if (!isset($showarr['mode'])) {
        $showarr['mode'] = '0';
    }
    if (!isset($showarr['cols'])) {
        $showarr['cols'] = '';
    }
    if (!isset($showarr['fileurl'])) {
        $showarr['fileurl'] = '';
    }
    switch ($showarr['type']) {
        case 'input':
            showsetting($showarr['alang'], $showarr['name'], $showarr['value'], 'text', '', '', '', $showarr['other'], $showarr['required']);
            break;
        case 'file':
            showsetting($showarr['alang'], $showarr['name'], $showarr['value'], 'file', '', '', '', $showarr['other'], $showarr['required']);
            if (!empty($showarr['value'])) {
                echo "\n" . '<tr class="noborder"><td class="vtop rowform">
<a href="' . $showarr['fileurl'] . '" target="_blank">' . $showarr['value'] . '</a></td><td class="vtop tips2"><a href="javascript:;" title="Delete" onclick="document.getElementById(\'' . $showarr['name'] . '_value\').value=\'\'; this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);">' . lang('delete') . '</a></td></tr>';
            }
            break;
        case 'edit':
            if (pkperm('isadmin')) {
                $enablealbum = 1;
            } else {
                if ($_SGLOBAL['panelinfo']['enablealbum']) {
                    $enablealbum = 1;
                } else {
                    $enablealbum = 0;
                }
            }
            echo "<script type=\"text/javascript\">var enablealbum={$enablealbum};</script>";
            echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"static/js/editor/xheditor-zh-cn.js\"></script>\n\t\t\t\t<tr><td class=\"td27\" colspan=\"2\">" . lang($showarr['alang']) . "{$showarr[required]}</td></tr>\n\t\t\t\t<tr class=\"noborder\"><td class=\"vtop rowform\" colspan=\"2\">\n\t\t\t\t<textarea cols=\"100\" id=\"{$showarr[name]}\" name=\"{$showarr[name]}\" rows=\"20\" style=\"width:600px;\" class=\"xheditor {tools:'Bold,Italic,Underline,Strikethrough,FontSize,FontColor,BackColor,Separator,Align,List,Separator,Link,Img,About',skin:'default'}\">{$showarr[value]}</textarea>\n\t\t\t\t</td></tr>";
            break;
        case 'textarea':
            showsetting($showarr['alang'], $showarr['name'], $showarr['value'], 'textarea', '', '', '', $showarr['other'], $showarr['required']);
            break;
        case 'select':
            $optionarr = array();
            foreach ($showarr['options'] as $key => $value) {
                $optionarr[$key][0] = $key;
                $optionarr[$key][1] = $value['pre'] . $value['name'];
            }
            showsetting($showarr['alang'], array($showarr['name'], $optionarr), $showarr['value'], 'select', '', '', '', $showarr['other'], $showarr['required']);
            break;
        case 'radio':
            showsetting($showarr['alang'], $showarr['name'], $showarr['value'], 'radio', '', '', '', $showarr['other'], $showarr['required']);
            break;
        case 'radio_a':
            showsetting($showarr['alang'], $showarr['name'], $showarr['value'], 'radio_a', '', '', '', $showarr['other'], $showarr['required']);
            break;
        case 'checkbox':
            $thetext = '';
            $i = 0;
            $thetext = '<table class="freetable"><tr>';
            foreach ($showarr['options'] as $tmpkey => $tmpvalue) {
                $thetext .= '<td><input name="' . $showarr['name'] . '[]" type="checkbox" value="' . $tmpkey . '"' . $showarr['other'] . ' />' . $tmpvalue . '</td>';
                if ($i % 5 == 4) {
                    $thetext .= '</tr><tr>';
                }
                $i++;
            }
            $thetext .= '</tr></table>';
            if (!empty($showarr['value'])) {
                if (is_array($showarr['value'])) {
                    $showvaluearr = $showarr['value'];
                } else {
                    $showvaluearr = explode(',', $showarr['value']);
                }
                foreach ($showvaluearr as $showvalue) {
                    $showvalue = trim($showvalue);
                    $thetext = str_replace('value="' . $showvalue . '"', 'value="' . $showvalue . '" checked', $thetext);
                }
            }
            break;
        case 'date':
            $datearr = array('0' => $alang['space_date_null'], '86400' => $alang['space_date_day_1'], '172800' => $alang['space_date_day_2'], '604800' => $alang['space_date_week_1'], '1209600' => $alang['space_date_week_2'], '2592000' => $alang['space_date_month_1'], '7948800' => $alang['space_date_month_3'], '15897600' => $alang['space_date_month_6'], '31536000' => $alang['space_date_year_1']);
            $thetext = getselectstr($showarr['name'], $datearr, $showarr['value']);
            break;
        case 'time':
            $thetext = '<input name="' . $showarr['name'] . '" readonly type="text" id="' . $showarr['name'] . '" value="' . $showarr['value'] . '"/><img src="static/image/admin/time.gif" onClick="getDatePicker(\'' . $showarr['name'] . '\',event,21)"/>';
            break;
        case 'hidden':
            $htmltext = '<tr><td colspan="2" style="display:none"><input name="' . $showarr['name'] . '" type="hidden" value="' . $showarr['value'] . '"' . $showarr['other'] . ' /></td></tr>';
            break;
        default:
            $thetext = '';
            break;
    }
    if (!$isall) {
        return $thetext;
    }
    return $htmltext . "\n";
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:101,代码来源:brandpost.func.php


示例4: array

</table>
';
//LIST SHOW
if (is_array($listarr) && $listarr) {
    //FILTER
    $searcharr = array('tagname' => $alang['tag_search_tagname'], 'tagid' => $alang['tag_search_tagid'], 'username' => $alang['tag_search_username'], 'uid' => $alang['tag_search_uid']);
    $closearr = array('0' => $alang['tag_close_0'], '1' => $alang['tag_close_1']);
    $orderarr = array('' => $alang['space_order_default'], 'dateline' => $alang['tag_order_dateline'], 'uid' => $alang['tag_order_uid'], 'spacenewsnum' => $alang['tag_order_spacenewsnum']);
    $scarr = array('DESC' => $alang['space_sc_desc'], 'ASC' => $alang['space_sc_asc']);
    echo label(array('type' => 'form-start', 'name' => 'searchform', 'action' => $theurl));
    echo label(array('type' => 'help', 'text' => $alang['help_tag']));
    echo label(array('type' => 'table-start', 'class' => 'toptable'));
    echo '<tr><td>';
    echo ' ' . $alang['tag_search'] . ': ' . getselectstr('searchtype', $searcharr) . ' <input type="text" name="searchkey" size="20" value="" /> ';
    echo ' ' . $alang['tag_close'] . ': ' . getselectstr('close', $closearr);
    echo ' ' . $alang['tag_order'] . ': ' . getselectstr('order', $orderarr) . ' ' . getselectstr('sc', $scarr);
    echo ' <input type="submit" name="viewsubmit" value="' . $alang['tag_view_submit'] . '" />';
    echo '</td></tr>';
    echo label(array('type' => 'table-end'));
    echo label(array('type' => 'form-end'));
    $adminmenuarr = array('noop' => $alang['space_no_op'], 'close' => $alang['tag_op_close'], 'merge' => $alang['tag_op_merge'], 'delete' => $alang['poll_delete']);
    $adminmenu = $alang['space_batch_op'] . '</th><th>';
    $adminmenu .= '<input type="checkbox" name="chkall" onclick="checkall(this.form, \'item\')">' . $alang['space_select_all'];
    foreach ($adminmenuarr as $key => $value) {
        if ($key == 'noop') {
            $acheck = ' checked';
        } else {
            $acheck = '';
        }
        $adminmenu .= '<input type="radio" name="operation" value="' . $key . '" onClick="jsop(this.value)"' . $acheck . '> ' . $value;
    }
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_tags.php


示例5: label


//.........这里部分代码省略.........
                $thetext .= '</select>' . "\n";
                break;
            } else {
                $thetext = '<div id="div' . $showarr['name'] . '" style="background-color: #FFFFFF; border: 1px solid #7F9DB9; height: 120px;overflow:auto">' . "\n";
                foreach ($showarr['options'] as $tmpkey => $tmpvalue) {
                    $pre = $tmpvalue['pre'];
                    $pre .= '<input name="' . $showarr['name'] . '[]" type="checkbox" value="' . $tmpkey . '"' . $showarr['other'] . ' />';
                    $thetext .= '<div style="height:20px;">' . $pre . ' ' . $tmpvalue['name'] . '</div>' . "\n";
                }
                $thetext .= '</div>' . "\n";
                if (!empty($showarr['value'])) {
                    if (is_array($showarr['value'])) {
                        $showvaluearr = $showarr['value'];
                    } else {
                        $showvaluearr = explode(',', $showarr['value']);
                    }
                    foreach ($showvaluearr as $showvalue) {
                        $showvalue = trim($showvalue);
                        $thetext = str_replace('value="' . $showvalue . '"', 'value="' . $showvalue . '" checked', $thetext);
                    }
                }
            }
            break;
        case 'select-order':
            $scselarr = array('' => '----', 'ASC' => $alang['space_order_asc'], 'DESC' => $alang['space_order_desc']);
            $thetext = '<table class="freetable">';
            for ($i = 0; $i < 3; $i++) {
                if (!isset($showarr['order'][$i])) {
                    $showarr['order'][$i] = '';
                }
                if (!isset($showarr['sc'][$i])) {
                    $showarr['sc'][$i] = '';
                }
                $orderselstr = getselectstr('order[]', $showarr['options'], $showarr['order'][$i]);
                $scselstr = getselectstr('sc[]', $scselarr, $showarr['sc'][$i]);
                $thetext .= '<tr><td>' . $alang['space_order_' . $i] . '</td><td>' . $orderselstr . '</td><td>' . $scselstr . '</td></tr>';
            }
            $thetext .= '</table>';
            break;
        case 'select-div-preview':
            $thetext = '<div id="div' . $showarr['name'] . '" style="background-color: #F7F7F7; border: 1px solid #7F9DB9; height: 120px;overflow:auto">' . "\n";
            $thetext .= '<table><tr><td valign="top" style="background: #F7F7F7;border: 0;"><div id="div1' . $showarr['name'] . '" style="overflow:auto">';
            $divnote = '';
            $thejscode = '<script language="javascript">
			<!--
			function show' . $showarr['name'] . 'note(notekey) {
				var note=new Array();
			';
            foreach ($showarr['options'] as $tmpkey => $tmpvalue) {
                $thejscode .= 'note[' . $tmpkey . ']="' . str_replace('\\n', '<br>', jsstrip($tmpvalue['tplnote'])) . '";' . "\n";
                if (isset($showarr['id']) && $showarr['id']) {
                    $inputvalue = $tmpvalue['tplid'];
                } else {
                    $inputvalue = $tmpvalue['tplfilepath'];
                }
                if (strlen($showarr['value']) > 0 && $inputvalue == $showarr['value']) {
                    $tmpchecked = ' checked';
                    $divnote = nl2br($tmpvalue['tplnote']);
                } else {
                    $tmpchecked = '';
                }
                $thetext .= '<input name="' . $showarr['name'] . '" type="radio" value="' . $inputvalue . '"' . $tmpchecked . ' onclick="show' . $showarr['name'] . 'note(' . $tmpkey . ')" />' . $tmpvalue['tplname'] . "<br>\n";
            }
            $thetext .= '</div></td>';
            $thetext .= '<td valign="top" style="background: #F7F7F7;border: 0;"><div style="background-color: #FFFCCC; overflow:auto; padding: 0.3em;" id="div2' . $showarr['name'] . '">' . $divnote . '</div></td></tr></table>';
            $thetext .= '</div>';
开发者ID:hongz1125,项目名称:devil,代码行数:67,代码来源:html.func.php


示例6: array

				<tr>
					<td><a href="' . CPURL . '?action=modelmanages&mid=' . $_GET['mid'] . '" class="view">' . $alang['spaces_spacecp'] . '</a></td>
					<td><a href="' . CPURL . '?action=modelmanages&op=add&mid=' . $_GET['mid'] . '" class="add">' . $alang['release_information'] . '</a></td>
					<td ' . $folderarr[1] . '><a href="' . CPURL . '?action=modelfolders&mid=' . $_GET['mid'] . '">' . $alang['pending_box_management'] . '</a></td>
					<td ' . $folderarr[2] . '><a href="' . CPURL . '?action=modelfolders&mid=' . $_GET['mid'] . '&folder=2">' . $alang['waste_management_bins'] . '</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
';
//FILTER SHOW
$orderarr = array('' => $alang['space_order_default'], 'dateline' => $alang['days']);
$scarr = array('ASC' => $alang['space_sc_asc'], 'DESC' => $alang['space_sc_desc']);
$orderselectstr = getselectstr('order', $orderarr);
$scselectstr = getselectstr('sc', $scarr);
$htmlstr = label(array('type' => 'form-start', 'name' => 'listform', 'action' => $newurl));
$htmlstr .= label(array('type' => 'table-start', 'class' => 'toptable'));
$htmlstr .= '<tr><td>';
$htmlstr .= $lang['subject'] . ':</label> <input type="text" name="searchkey" id="searchkey" value="' . $_SGET['searchkey'] . '" size="10" /> ';
$htmlstr .= $alang['space_order_filter'] . ': ' . $orderselectstr . ' ' . $scselectstr . ' <input type="hidden" name="mid" value="' . $_GET['mid'] . '"><input type="hidden" name="folder" value="' . $_SGET['folder'] . '"><input type="submit" name="filtersubmit" value="GO">';
$htmlstr .= '</td></tr>';
$htmlstr .= label(array('type' => 'table-end'));
$htmlstr .= label(array('type' => 'form-end'));
echo $htmlstr;
//LIST SHOW
echo label(array('type' => 'form-start', 'name' => 'listform', 'action' => $newurl, 'other' => ' onSubmit="return listsubmitconfirm(this)"'));
echo label(array('type' => 'table-start', 'class' => 'listtable'));
echo '<tr>';
echo '<th width="40">' . $alang['space_select'] . '</th>';
echo '<th>' . $alang['spaceblog_subject'] . '</th>';
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_modelfolders.php


示例7: formhash

    }
    echo '<h2>' . $alang['ad_add_adtype'] . '</h2>
		<script language="javascript" src="' . S_URL . '/include/js/selectdate.js"></script>
		<form method="post" action="' . $theurl . '" enctype="multipart/form-data">
		<input type="hidden" name="formhash" value="' . formhash() . '">
		<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">' . $adtypehtml;
    if ($system == 1) {
        echo '<tr><th>' . $alang['ad_title_subject'] . '</th><td><input type="text" size="30" name="title" value="' . $thevalue['title'] . '"></td></tr>' . '<input type="hidden" size="10" name="outwidth" value="' . $parameters['outwidth'] . '">' . '<input type="hidden" size="10" name="outheight" value="' . $parameters['outheight'] . '">' . '
			<tr><th>' . $alang['ad_title_dateline'] . '</th><td>
			<input type="text" size="30" name="starttime" value="' . $parameters['starttime'] . '" id="starttime" readonly>
			<img src=' . S_URL . '/admin/images/time.gif onClick="getDatePicker(\'starttime\',event,21)"/></td></tr>
			<tr><th>' . $alang['ad_title_endtime'] . '</th><td>
			<input type="text" size="30" name="endtime" value="' . $parameters['endtime'] . '" id="endtime" readonly>
			<img src=' . S_URL . '/admin/images/time.gif onClick="getDatePicker(\'endtime\',event,21)"/></td></tr></table>';
    } else {
        echo '<th>' . $alang['ad_title_type'] . '</th><td>' . getselectstr('pagestyle', $searcharr, $thevalue['style'], ' onchange="changepagetype(this)"') . '</td></tr>
		<tr><th>' . $alang['ad_title_subject'] . '</th><td><input type="text" size="30" name="title" value="' . $thevalue['title'] . '"></td></tr><tr id="style_type" style="display:' . $style_type . '"><th>' . $alang['ad_type'] . '</th><td><select name="type[]" size="10"  multiple="multiple"><option value="all" ' . $checkall . '>' . $alang['ad_type_all'] . '</option><option value="indexad" ' . $checkindexad . '>&nbsp;&nbsp;>>' . $alang['ad_adtype_index_page'] . '</option><option value="space" ' . $checkspacead . '>&nbsp;&nbsp;>>' . $alang['ad_adtype_space'] . '</option>';
        foreach ($_SSCONFIG['channel'] as $key => $value) {
            $selected = empty(${$key}) ? '' : 'selected';
            if (empty($value['name'])) {
                echo "<option value='{$key}' {$selected}>&nbsp;&nbsp;>>" . $lang[$value['nameid']] . "</option>";
            } else {
                echo "<option value='{$key}' {$selected}>&nbsp;&nbsp;>>" . $value['name'] . "</option>";
            }
        }
        echo '</select></td></tr>
			<tr id="style_pagetype" style="display:' . $style_pagetype . '"><th>' . $alang['ad_page'] . '</th><td>
			<input id="id_view_1" type="checkbox" name="pagetype[]" value="1" ' . $typecheck1 . '>' . $alang['ad_adtype_page_one'] . '&nbsp;&nbsp;
			<input id="id_view_2" type="checkbox" name="pagetype[]" value="2" ' . $typecheck2 . '>' . $alang['ad_adtype_page_two'] . '&nbsp;&nbsp;
			<input id="id_view_3" type="checkbox" name="pagetype[]" value="3" ' . $typecheck3 . '>' . $alang['ad_adtype_page_view'] . '</td></tr>
			<tr><th>' . $alang['ad_title_dateline'] . '</th><td>
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_ad.php


示例8: array

//THE VALUE SHOW
if (is_array($thevalue) && $thevalue) {
    $tplfilepatharr = array('' => $alang['style_select_file']);
    $tpldir = S_ROOT . './styles';
    if (is_dir($tpldir)) {
        $filedir = dir($tpldir);
        while (false !== ($entry = $filedir->read())) {
            if (strpos($entry, '.html.php') === false) {
            } else {
                $entrykey = str_replace('.html.php', '', $entry);
                $tplfilepatharr[$entrykey] = $entry;
            }
        }
    }
    echo label(array('type' => 'form-start', 'name' => 'thevalueform', 'action' => $theurl));
    echo label(array('type' => 'div-start'));
    echo label(array('type' => 'table-start'));
    echo label(array('type' => 'select', 'alang' => 'style_tpltype', 'name' => 'tpltype', 'options' => $tplstylearr, 'width' => '30%', 'value' => $thevalue['tpltype']));
    echo label(array('type' => 'input', 'alang' => 'style_tplname', 'name' => 'tplname', 'size' => '30', 'value' => $thevalue['tplname']));
    echo label(array('type' => 'textarea', 'alang' => 'style_tplnote', 'name' => 'tplnote', 'cols' => '80', 'rows' => '5', 'value' => $thevalue['tplnote']));
    echo label(array('type' => 'text', 'alang' => 'style_tplfilepath', 'text' => $alang['style_dir'] . ': styles (<a href="' . S_URL . '/admincp.php?action=styletpl&op=add" target="_blank"><strong>' . $alang['online_documentation_new_modular_style'] . '</strong></a>)<br>' . $alang['style_file'] . ': ' . getselectstr('tplfilepath', $tplfilepatharr, $thevalue['tplfilepath'])));
    echo label(array('type' => 'table-end'));
    echo label(array('type' => 'div-end'));
    echo '<div class="buttons">';
    echo label(array('type' => 'button-submit', 'name' => 'thevaluesubmit', 'value' => $alang['common_submit']));
    echo label(array('type' => 'button-reset', 'name' => 'thevaluereset', 'value' => $alang['common_reset']));
    echo '</div>';
    echo '<input name="tplid" type="hidden" value="' . $thevalue['tplid'] . '" />';
    echo '<input name="valuesubmit" type="hidden" value="yes" />';
    echo label(array('type' => 'form-end'));
}
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:admin_styles.php


示例9: explode

                 $coarr = explode("\n", $cfoptionstr);
                 $coarr = sarray_unique($coarr);
                 foreach ($coarr as $covalue) {
                     $covalue = trim($covalue);
                     $cfoptionarr[$covalue] = $covalue;
                 }
             }
             switch ($cvalue['type']) {
                 case 'input':
                     $inputstr = '<input name="customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']" type="text" size="30" value="' . $thecfarr[$ckey] . '" />';
                     break;
                 case 'textarea':
                     $inputstr = '<textarea name="customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']" rows="5" cols="60">' . $thecfarr[$ckey] . '</textarea>';
                     break;
                 case 'select':
                     $inputstr = getselectstr('customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']', $cfoptionarr, $thecfarr[$ckey]);
                     break;
                 case 'checkbox':
                     $inputstr = getcheckboxstr('customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']', $cfoptionarr, $thecfarr[$ckey]);
                     break;
             }
             $cfhtml .= '<tr><th>' . $cvalue['name'] . '</th><td>' . $inputstr . '</td></tr>';
         }
         $cfhtml .= '</tbody>';
     }
 }
 //CATEGORIES
 $clistarr = getcategory($type);
 $categorylistarr = array('0' => array('pre' => '', 'name' => '------'));
 foreach ($clistarr as $key => $value) {
     $categorylistarr[$key] = $value;
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:news_edit.php


示例10: getselectstr

                        case 'select':
                            $inputstr = getselectstr('customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']', $cfoptionarr, $thecfarr[$ckey]);
                            break;
                        case 'checkbox':
                            $inputstr = getcheckboxstr('customfieldtext[' . $cfvalue['customfieldid'] . '][' . $ckey . ']', $cfoptionarr, $thecfarr[$ckey]);
                            break;
                    }
                    $cfhtml .= '<tr><th>' . $cvalue['name'] . '</th><td>' . $inputstr . '</td></tr>';
                }
                $cfhtml .= '</tbody>';
            }
        }
        //处理语言包
        $alang['space_title_customfield'] = str_replace('spacecp.php', 'admincp.php', $alang['space_title_customfield']);
        eval("\$alang['space_title_customfield'] = \"" . $alang['space_title_customfield'] . "\";");
        $cfhtml = '<tr><th>' . $alang['space_title_customfield'] . '</th><td>' . getselectstr('customfieldid', $cfhtmlselect, $thevalue['customfieldid'], 'onchange="showdivcustomfieldtext()"') . '</td></tr>' . "\n" . $cfhtml;
        $jscftext = '
		<script language="javascript">
		<!--
		function showdivcustomfieldtext() {
			var cfindex = document.getElementById("customfieldid").selectedIndex;
			showtbody(cfindex);
		}	
		function showtbody(id) {
			for(i=1;i<=' . $tbodynum . ';i++){
				obj=document.getElementById("cf_"+i);
				if(i == id) {
					obj.style.display="";
				} else {
					obj.style.display="none";
				}
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:admin_spacenews.php


示例11: label

    }
    echo label(array('type' => 'table-end'));
    echo '<div class="buttons">';
    echo label(array('type' => 'button-submit', 'name' => 'listsubmit', 'value' => $alang['common_submit']));
    echo label(array('type' => 'button-reset', 'name' => 'customfieldlistreset', 'value' => $alang['common_reset']));
    echo '</div>';
    echo label(array('type' => 'form-end'));
}
//one
if (is_array($thevalue) && $thevalue) {
    $cftypearr = array('input' => $alang['customfield_input'], 'textarea' => $alang['customfield_textarea'], 'select' => $alang['customfield_select'], 'checkbox' => $alang['customfield_check']);
    $isdefaultarr = array('0' => $alang['customfield_isdefault_0'], '1' => $alang['customfield_isdefault_1']);
    foreach ($channels['types'] as $value) {
        $typearr[$value['nameid']] = $value['name'];
    }
    $cftypestr = getselectstr('customfieldtype[]', $cftypearr);
    $jscustomfieldtext = '<table><tr valign="top">';
    $jscustomfieldtext .= '<td><input type="text" name="customfieldname[]" id="aaa" size="20" value="" /></td>';
    $jscustomfieldtext .= '<td>' . $cftypestr . '</td>';
    $jscustomfieldtext .= '<td><textarea name="customfieldoption[]" rows="5" cols="22"></textarea></td>';
    $jscustomfieldtext .= '</tr></table>';
    $customfield_text = '<div id="div_customfield"><table>';
    $customfield_text .= '<tr bgcolor="#DEE1E4" style="font-weight:bold" height="22">';
    $customfield_text .= '<td width="130">' . $alang['customfield_customfield_title1'] . '</td>';
    $customfield_text .= '<td width="75">' . $alang['customfield_customfield_title2'] . '</td>';
    $customfield_text .= '<td width="155">' . $alang['customfield_customfield_title3'] . '</td>';
    $customfield_text .= '</tr></table>';
    $cfarr = unserialize($thevalue['customfieldtext']);
    foreach ($cfarr as $cfkey => $cfvalue) {
        $thecftypestr = str_replace('value="' . $cfvalue['type'] . '"', 'value="' . $cfvalue['type'] . '" selected', $cftypestr);
        $customfield_text .= '<table><tr bgcolor="#FFFFFF" valign="top">';
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:admin_customfields.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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