本文整理匯總了PHP中type::option方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::option方法的具體用法?PHP type::option怎麽用?PHP type::option使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::option方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: modify
</tbody>
</table>
<div class="page"><?php
echo pagination::html($record_count);
?>
</div>
</div>
<div class="blank10"></div>
<input type="hidden" name="batch" value="">
<input class="btn_a" type="button" value=" 排序 " name="order" onclick="this.form.action='<?php
echo modify('act/batch', true);
?>
'; this.form.batch.value='order'; this.form.submit();"/>
移動分類:<?php
echo form::select('typeid', 0, type::option());
?>
<input class="btn_b" type="button" value=" 移動 " name="delete" onclick="if(getSelect(this.form) && confirm('確實要移動ID為('+getSelect(this.form)+')的類嗎?')){this.form.action='<?php
echo modify('act/batch', true);
?>
'; this.form.batch.value='move'; this.form.submit();}"/>
</form>
示例2: get_form
function get_form() {
return array(
'catid'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(category::option(0,'tolast')),
'default'=>intval(get('catid')),
'regex'=>'/\d+/',
'filter'=>'is_numeric',
),
'typeid'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(type::option(0,'tolast')),
'default'=>intval(get('typeid')),
'regex'=>'/\d+/',
'filter'=>'is_numeric',
),
'toppost'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(array(0=>'不置頂',2=>'欄目置頂',3=>'全站置頂')),
'default'=>0,
'regex'=>'/\d+/',
'filter'=>'is_numeric',
),
'ishtml'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(0=>'繼承',1=>'生成',2=>'不生成')),
),
'checked'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(form::yesornotoarray('審核')),
),
'image'=>array(
'filetype'=>'image',
),
'thumb'=>array(
'filetype'=>'thumb',
),
'displaypos'=>array(
'selecttype'=>'checkbox',
//'select'=>form::arraytoselect(array(1=>'首頁推薦',2=>'首頁焦點',3=>'首頁頭條',4=>'列表頁推薦',5=>'內容頁推薦')),
),
'htmlrule'=>array(
//'tips'=>" 默認:{?category::gethtmlrule(get('id'),'showhtmlrule')}",
),
'template'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/show')),
//'tips'=>" 默認:{?category::gettemplate(get('id'),'showtemplate')}",
),
'showform'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(get_my_tables_list()),
'default'=>"0",
),
'introduce_len'=>array(
'default'=>config::get('archive_introducelen')
),
'attr1'=>array(
'selecttype'=>'checkbox',
'select'=>form::arraytoselect($this->getattrs(1)),
),
'grade'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(0,1,2,3,4,5)),
),
'pics'=>array(
'filetype'=>'image2',
),
'author'=>array(
'tips'=>' ',
),
'attr3'=>array(
'tips'=>' ',
),
'htmlrule'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(getHtmlRule('archive')),
'default'=>'',
),
'tag_option'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(tag::getTags()),
),
);
}
示例3: uri
?>
<div class="blank20"></div>
<div style="float:left;width:560px;margin-left:10px;overflow:hidden;">
<form name="searchform" id="searchform" action="<?php
echo uri();
?>
" method="post">
欄目
<?php
echo form::select('search_catid', get('search_catid') ? get('search_catid') : 0, category::option());
?>
分類
<?php
echo form::select('search_typeid', get('search_typeid') ? get('search_typeid') : 0, type::option());
?>
標題
<input type="text" name="search_title" id="search_title" value="" style="width:140px;overflow:hidden;" />
<input type="submit" value="搜索" name="submit" onclick="this.form.action='<?php
echo url::modify('table/' . get('table') . '/type/search');
?>
'" class="btn_e" />
<div class="blank5"></div>
地區
<?php
echo form::select('search_province_id', get('search_province_id') ? get('search_province_id') : 0, area::province_option());
示例4: get_form
function get_form() {
return array(
'parentid'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(type::option(0,'isnotlast')),
'default'=>get('parentid'),
),
'thumb'=>array(
'filetype'=>'thumb',
),
'ishtml'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(0=>'繼承',1=>'生成',2=>'不生成')),
'default'=>0,
),
'isshow'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(1=>'正常顯示',0=>'禁用')),
'default'=>1,
),
'ispages'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(1=>'分頁',0=>'單頁')),
'default'=>1,
),
'includecatarchives'=>array(
'selecttype'=>'radio',
'select'=>form::arraytoselect(array(1=>'包含',0=>'不包含')),
'default'=>1,
),
'stype'=>array(
'tips'=>" 被調用的格式 type(\$typeid,'標記')",
),
'htmlrule'=>array(
'tips'=>" 默認:{?type::gethtmlrule(get('id'))}",
'selecttype'=>'select',
'select'=>form::arraytoselect(getTypeHtmlRule('type')),
'default'=>'',
),
'listhtmlrule'=>array(
'tips'=>" 默認:{?type::gethtmlrule(get('id'),'listhtmlrule')}",
'selecttype'=>'select',
'select'=>form::arraytoselect(getTypeHtmlRule('type')),
'default'=>'',
),
'showhtmlrule'=>array(
'tips'=>" 默認:{?type::gethtmlrule(get('id'),'showhtmlrule')}",
),
'image'=>array(
'filetype'=>'image1',
),
'template'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(front::$view->archive_tpl_list('type/list')),
'default'=>"{?type::gettemplate(get('id'),'listtemplate',false)}",
'tips'=>" 默認:{?type::gettemplate(get('id'))}",
),
'listtemplate'=>array(
'selecttype'=>'select',
'select'=>form::arraytoselect(front::$view->archive_tpl_list('type/list')),
'default'=>"{?type::gettemplate(get('id'),'listtemplate',false)}",
'tips'=>" 默認:{?type::gettemplate(get('id'),'listtemplate')}",
),
);
}
示例5: modify
<span class="hotspot" onmouseover="tooltip.show('管理本分類下內容');" onmouseout="tooltip.hide();"><a href="<?php echo modify("/act/list/table/archive/typeid/$d1[$primary_key]");?>" class="a_management"></a></span>
<span class="hotspot" onmouseover="tooltip.show('確定要刪除嗎?');" onmouseout="tooltip.hide();"><a onclick="javascript: return confirm('確實要刪除嗎?');" href="<?php echo modify("/act/delete/table/$table/id/$d1[$primary_key]");?>" class="a_del"></a></span>
</td>
</tr>
{/loop}
<?php } unset($d1);unset($data1);unset($data11);?>
{/loop}
</tbody>
</table>
<div class="page"><?php echo pagination::html($record_count); ?></div>
</div>
<div class="blank10"></div>
<input type="hidden" name="batch" value="">
<input class="btn_a" type="button" value=" 排序 " name="order" onclick="this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='order'; this.form.submit();"/>
移動分類:<?php echo form::select('typeid',0,type::option());?>
<input class="btn_b" type="button" value=" 移動 " name="delete" onclick="if(getSelect(this.form) && confirm('確實要移動ID為('+getSelect(this.form)+')的類嗎?')){this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='move'; this.form.submit();}"/>
</form>
示例6: uri
<div id="tagscontent" class="right_box">
<!--form name="searchform" id="searchform" action="<?php echo uri();?>" method="post">
<table border="0" cellspacing="2" cellpadding="4" class="list" name="table1" id="table1">
<thead>
<tr>
<th colspan="11">
內容管理<?php if(front::get('deletestate')) {?>(回收站)<?php } ?>
</th></tr>
</thead>
<tbody>
<tr>
<td colspan="10">
<table><tr><td>
類別:</td><td>
<?php echo form::select('_typeid',get('_typeid')?get('_typeid'):0,type::option()); ?>
</td><td>
標題:</td><td>
<input type="text" name="_title" id="_title" value="" /></td><td>
<input type="submit" value="搜索" name="submit" onclick="this.form.action='{url::modify('table/'.get('table'))}'" class="button"/>
</td></tr>
</tbody>
</table></td>
<td width="200">
<a href="index.php?case=table&act=add&table=archive&admin_dir={get('admin_dir')}" class="button">添加內容</a> <a href="{url::modify("table/".get('table')."/deletestate/1/page/1")}" class="button">回收站</a>
</td>
</tr>
</tbody>
</form-->
示例7: array
$tag_config['thumb'] = 0;
}
*/
$tplarray=include(ROOT.'/template/'.config::get('template_dir').'/tpltag/tag.config.php');
$tplarray=$tplarray['content'];
$tag_config=$data['setting'];
?>
<?php
echo "<tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">欄目<td width="1%"> </td><td width="70%">'.form::select('catid', $tag_config['catid'], category::option());
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">子欄目<td width="1%"> </td><td width="70%">'.form::select('son', $tag_config['son'], array("否","是"));
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">分類<td width="1%"> </td><td width="70%">'.form::select('typeid', $tag_config['typeid'], type::option());
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">專題<td width="1%"> </td><td width="70%">'.form::select('spid', $tag_config['spid'], special::option());
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">地區<td width="1%"> </td><td width="70%">';
echo form::select('province_id', $tag_config['province_id'], area::province_option());
echo form::select('city_id', $tag_config['city_id'], area::city_option());
echo form::select('section_id', $tag_config['section_id'], area::section_option());
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">標題截取字數<td width="1%"> </td><td width="70%">';
echo form::input('length', $tag_config['length'], 'class="input_c"');
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">簡介截取字數<td width="1%"> </td><td width="70%">';
echo form::input('introduce_length', $tag_config['introduce_length'], 'class="input_c"').'-1:不限製 0:不調用';
echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
echo '<td width="19%" align="right">排序方式<td width="1%"> </td><td width="70%">';
示例8: defined
<?php
defined('ROOT') or exit('Can\'t Access !');
?>
<div id="tagscontent" class="right_box">
<form name="typeform" method="post" action="<?php
echo front::$uri;
?>
">
<table border="0" cellspacing="0" cellpadding="0" name="table1" id="table1" width="100%">
<tbody>
<tr>
<td width="19%" align="right">分類</span></td>
<td width="1%"> </td>
<td width="70%"><?php
$archive = archive::getInstance();
echo form::select('typeid', get('typeid'), type::option());
?>
<?php
echo form::submit('更新');
?>
</td></tr></tbody>
</table>
</form>
</div>