當前位置: 首頁>>代碼示例>>PHP>>正文


PHP category::option方法代碼示例

本文整理匯總了PHP中category::option方法的典型用法代碼示例。如果您正苦於以下問題:PHP category::option方法的具體用法?PHP category::option怎麽用?PHP category::option使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在category的用法示例。


在下文中一共展示了category::option方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<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%">&nbsp;</td>
                        <td width="70%"><?php
	$archive=archive::getInstance();
	echo form::select('catid',get('catid'),category::option());
	?>
	&nbsp;&nbsp;
	<?php echo form::submit('更新');
	?>
    </td></tr></tbody>
</table>
</form>
</div>
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:19,代碼來源:make_list.php

示例2: get_form_field

 function get_form_field() {
     $arr=array(0=>'全站使用');
     return array(
             'catid'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(category::option(0,'tolast',$arr)),
                     'default'=>get('catid'),
                     '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',
             ),
             '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()),
                     'tips'=>" 默認:{?category::gettemplate(get('id'),'showtemplate')}",
             ),
             'introduce_len'=>array(
                     'default'=>config::get('archive_introducelen'),
             ),
             'attr1'=>array(
                     'selecttype'=>'checkbox',
             ),
     );
 }
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:41,代碼來源:front_class.php

示例3: modify

<span class="hotspot" onmouseover="tooltip.show('管理本欄目下內容');" onmouseout="tooltip.hide();"> <a href="<?php echo modify("/act/list/table/archive/catid/$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>

    <div class="blank10"></div>
    <input type="hidden" name="batch" value="">

    <input class="btn_d" type="button" value=" 排序 " name="order" onclick="this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='listorder'; this.form.submit();"/>
    <input class="btn_e" 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();}"/>
    <?php echo form::select('catid',0,category::option());?>
</form>


<div class="page"><?php echo pagination::html($record_count); ?></div>
<div class="blank10"></div>
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:29,代碼來源:list.php

示例4: lang

" onsubmit="search_check();" method="post">


<input type="text" name="keyword" value="<?php 
echo lang(pleaceinputtext);
?>
" onfocus="if(this.value=='<?php 
echo lang(pleaceinputtext);
?>
') {this.value=''}" onblur="if(this.value=='') this.value='<?php 
echo lang(pleaceinputtext);
?>
'" class="o_text" style="width:208px;" />
<div class="blank5"></div>
<?php 
echo form::select('catid', front::post('catid'), category::option(0, all, $op = array(0 => '' . $lang['all_columns'] . '')));
?>
<div class="blank5"></div>
<input name='submit' type="submit" value=" <?php 
echo lang('search');
?>
 " class="s_btn_a" align="middle" />


</form>

<div class="clear"></div>
</div>
<div class="l_box_bottom"></div>

開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:29,代碼來源:#search.php

示例5:

  $catimagechecked = '';
  }

  $tag_config['length'] = 20;
  $tag_config['limit'] = 10;
  $tag_config['thumb'] = 0;
 */
$tplarray=include(ROOT.'/template/'.config::get('template_dir').'/tpltag/tag.config.php');
$tplarray=$tplarray['category'];
$tag_config=$data['setting'];
?>


        <?php
        echo "<tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">欄目</td><td width="1%">&nbsp;</td><td width="70%">'.form::select('catid', $tag_config['catid'], category::option()).'<span class="hotspot" onmouseover="tooltip.show(\'默認所有欄目!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span>';
       echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">子欄目<td width="1%">&nbsp;</td><td width="70%">';
        echo '<input type="checkbox" name="subcat" id="subcat" class="radio" '.$subcatchecked.'  /><span class="hotspot" onmouseover="tooltip.show(\'默是否調用欄目下級子欄目!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span>';
        echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">欄目名稱<td width="1%">&nbsp;</td><td width="70%">';
        echo '<input type="checkbox" name="catname" class="radio" id="cat_name" '.$catnamechecked.'  /><span class="hotspot" onmouseover="tooltip.show(\'默是否調用欄目名稱!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span>';
        echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">封麵內容<td width="1%">&nbsp;</td><td width="70%">';
        echo '<input type="checkbox" class="radio" name="categorycontent" id="categorycontent" '.$categorycontentchecked.'  /><span class="hotspot" onmouseover="tooltip.show(\'是否調用欄目封麵內容!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span>';
        echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">欄目圖片<td width="1%">&nbsp;</td><td width="70%">';
        echo '<input type="checkbox" class="radio" name="catimage" id="catimage" '.$catimagechecked.'  /><span class="hotspot" onmouseover="tooltip.show(\'是否調用欄目說明圖片!\');" onmouseout="tooltip.hide();"><img src="images/remind.gif" alt="" width="14" height="20"  style="margin-left:10px; margin-right:5px;"></span>';
        echo "</td></tr><tr onmouseover=this.bgColor='#FFFFF0'; onmouseout=this.bgColor=''; bgcolor=''>";
        echo '<td width="19%" align="right">標簽模板<td width="1%">&nbsp;</td><td width="70%">';
        echo form::select('tagtemplate', $tag_config['tagtemplate'], $tplarray);
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:31,代碼來源:listtag_helper_edit_cat.php

示例6: get_form

 function get_form() {
     return array(
             'parentid'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(category::option(0,'isnotlast')),
                     'default'=>get('parentid'),
             ),
             'ishtml'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(0=>'繼承',1=>'生成',2=>'不生成')),
                     'default'=>0,
             ),
             'isshow'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'正常顯示',0=>'禁用')),
             ),
             'ispages'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'分頁',0=>'單頁')),
                     'default'=>1,
             ),
             'includecatarchives'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'包含',0=>'不包含')),
                     'default'=>1,
             ),
             'scategory'=>array(
                     'tips'=>"&nbsp;被調用的格式 categories(\$catid,'標記')",
             ),
             'image'=>array(
                     'filetype'=>'image_mui',
             ),
             'template'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/list')),
                     'default'=>"{?category::gettemplate(get('id'),'listtemplate',false)}",
                     //'tips'=>" 默認:{?category::gettemplate(get('id'))}",
             ),
             'listtemplate'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/list')),
                     'default'=>"{?category::gettemplate(get('id'),'listtemplate',false)}",
                     //'tips'=>" 默認:{?category::gettemplate(get('id'),'listtemplate')}",
             ),
             'showtemplate'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/show')),
                     'default'=>"{?category::gettemplate(get('id'),'showtemplate',false)}",
                     //'tips'=>" 默認:{?category::gettemplate(get('id'),'showtemplate')}",
             ),
     		'templatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/list')),
     				'default'=>"{?category::gettemplate(get('id'),'listtemplatewap',false)}",
     				//'tips'=>" 默認:{?category::gettemplate(get('id'))}",
     		),
     		'listtemplatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/list')),
     				'default'=>"{?category::gettemplate(get('id'),'listtemplatewap',false)}",
     				//'tips'=>" 默認:{?category::gettemplate(get('id'),'listtemplate')}",
     		),
     		'showtemplatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/show')),
     				'default'=>"{?category::gettemplate(get('id'),'showtemplatewap',false)}",
     				//'tips'=>" 默認:{?category::gettemplate(get('id'),'showtemplate')}",
     		),
             'showform'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(get_my_tables_list()),
                     'default'=>"0",
             ),
             'isnav'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'顯示',0=>'不顯示')),
             ),
     		'ismobilenav'=>array(
     				'selecttype'=>'radio',
     				'select'=>form::arraytoselect(array(1=>'顯示',0=>'不顯示')),
     		),
             'htmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('category')),
                     'default'=>'',
             ),
             'listhtmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('category')),
                     'default'=>'',
             ),
             'showhtmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('archive')),
                     'default'=>'',
             ),
     );
 }
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:98,代碼來源:category.php

示例7: uri

<div class="blank5"></div>

<div style="float:left;width:500px;">
<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=""/>

<input type="submit" value="搜索" name="submit" class="button"/>

<div class="blank10"></div>
地區
<?php echo form::select('search_province_id',get('search_province_id')?get('search_province_id'):0,area::province_option()); ?>
<?php echo form::select('search_city_id',get('search_city_id')?get('search_city_id'):0,area::city_option(get('search_city_id'))); ?>
<?php echo form::select('search_section_id',get('search_section_id')?get('search_section_id'):0,area::section_option(get('search_section_id'))); ?>

專題
<?php echo form::select('search_spid',get('search_spid')?get('search_spid'):0,special::option()); ?>
</form>
</div>

<div style="float:right;">
<a href="{special::url($special['spid'])}" target="_blank" class="btn_d">{$special[title]}</a>內容管理
</div>

<div class="blank5"></div>
<div id="tagscontent" class="right_box">
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:30,代碼來源:manage.php

示例8: array

  }
  }else{
  $tag_config['length'] = 20;
  $tag_config['limit'] = 10;
  $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%">&nbsp;</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%">&nbsp;</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%">&nbsp;</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%">&nbsp;</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%">&nbsp;</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%">&nbsp;</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=''>";
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:31,代碼來源:listtag_helper_edit.php


注:本文中的category::option方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。