当前位置: 首页>>代码示例>>PHP>>正文


PHP View::widget方法代码示例

本文整理汇总了PHP中View::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP View::widget方法的具体用法?PHP View::widget怎么用?PHP View::widget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在View的用法示例。


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

示例1: run

 function run()
 {
     foreach ($_SESSION['perpage'] as $key => $item) {
         if (in_array($key, Funcs::$uri)) {
             $path = $key;
         }
     }
     $items = PaginationWidget::getPage($_SESSION['perpage'][$path], PaginationWidget::$count);
     View::widget('pagination', array('pagination' => $items));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:10,代码来源:PaginationWidget.php

示例2: run

 function run($id = '')
 {
     $fullURI = Funcs::$uri;
     if ($id) {
         $fullURI = explode('/', Tree::getPathToTree($id));
         unset($fullURI[0]);
         unset($fullURI[count($fullURI)]);
     }
     $data = array();
     $parent = Funcs::$siteDB;
     $path = '';
     foreach ($fullURI as $uri) {
         $path = $path . '/' . $uri;
         if (is_numeric($uri)) {
             $sql = 'SELECT * FROM {{tree}} WHERE parent=' . $parent . ' AND id=' . $uri . '';
         } else {
             $sql = 'SELECT * FROM {{tree}} WHERE parent=' . $parent . ' AND path=\'' . $uri . '\'';
         }
         $row = DB::getRow($sql);
         $row['path'] = $path . '/';
         $parent = $row['id'];
         if ($parent == '') {
             $parent = 0;
         }
         $data[] = $row;
     }
     if ($fullURI[0] == 'catalog' && is_numeric($fullURI[count(Funcs::$uri) - 1])) {
         $uri = explode('/', $_SERVER['REQUEST_URI']);
         $num = count($data);
         $data[count($data)] = $data[count($data) - 1];
         $path = $data;
         unset($path[count($path) - 1]);
         unset($path[count($path) - 1]);
         $items = array();
         foreach ($path as $item) {
             $items[] = $item['path'];
         }
         Funcs::$reference['vendor'][$uri[$num]]['path'] = $items[count($items) - 1] . Funcs::$reference['vendor'][$uri[$num]]['path'] . '/';
         $data[count($data) - 2] = Funcs::$reference['vendor'][$uri[$num]];
     } elseif (isset($_GET['ve'])) {
         $path = $items[count($items)] . Funcs::$reference['vendor'][$uri[$num]]['path'] . '/';
         $data[] = array('name' => Funcs::$referenceId['vendor'][$_GET['ve']]['name'], 'path' => $path);
     }
     View::widget('crumbs', array('list' => $data));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:45,代码来源:CrumbsWidget.php

示例3: run

 function run($data)
 {
     $list = array();
     foreach (Funcs::$referenceId['options'] as $key => $item) {
         if (is_numeric($item['value'])) {
             $list[$item['path']] = $data[$item['path']];
             $list[$item['path']]['act'] = $item['value'];
             $list[$item['path']]['path'] = $item['path'];
         } else {
             $value = explode("\n", $item['value']);
             if (in_array(end(Funcs::$uri), explode(';', $value[2])) && $value[2] != '' || $value[2] == '') {
                 if ($item['path'] == 'select' || $item['path'] == 'checkbox' || $item['path'] == 'radio') {
                     $temp = OptionsWidget::getValuesSelect($item['name']);
                 } elseif ($item['path'] == 'number') {
                     $temp = OptionsWidget::getValuesNumber($item['name']);
                 } elseif ($item['path'] == 'link') {
                     $temp = OptionsWidget::getValuesLink($value);
                 }
                 if (count($temp) > 0) {
                     $list[$item['value']]['list'] = $temp;
                     $list[$item['value']]['name'] = trim($value[0]);
                     $list[$item['value']]['path'] = $item['path'];
                     $list[$item['value']]['title'] = trim($value[1]) == '' ? $item['name'] : $value[1];
                 }
             }
         }
     }
     $tree = Tree::getTreeByUrl();
     foreach (Fields::getFeaturesList($tree['id']) as $items) {
         foreach ($items['list'] as $item) {
             if ($item['filtertype'] == 'checkbox' || $item['filtertype'] == 'checkboxgroup' || $item['filtertype'] == 'select') {
                 $temp = OptionsWidget::getValuesSelect($item['path']);
             } elseif ($item['filtertype'] == 'number') {
                 $temp = OptionsWidget::getValuesNumber($item['path']);
             }
             $list[$item['path']]['list'] = $temp;
             $list[$item['path']]['name'] = $item['path'];
             $list[$item['path']]['path'] = $item['filtertype'];
             $list[$item['path']]['title'] = $item['name'];
             $list[$item['path']]['comment'] = $item['comment'];
         }
     }
     View::widget('options', array('list' => $list));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:44,代码来源:OptionsWidget.php

示例4: run

 function run()
 {
     $data = array();
     $path = '';
     $id = Funcs::$uri[2];
     if (Funcs::$uri[1] == 'tree' && is_numeric($id)) {
         $sql = 'SELECT parent FROM {{tree}} WHERE id=' . $id . '';
         $parent = DB::getOne($sql);
         while ($id != 0) {
             $sql = 'SELECT id, parent, name FROM {{tree}} WHERE id=' . $id . '';
             $row = DB::getRow($sql);
             $row['path'] = '/' . ONESSA_DIR . '/work/' . $row['id'] . '/';
             $id = $row['parent'];
             $data[] = $row;
         }
         $data = array_reverse($data);
     } elseif (Funcs::$uri[1] == 'settings' && is_numeric($id)) {
         $data[] = array('name' => 'Настройки', 'path' => '/' . ONESSA_DIR . '/settings/');
         $data[] = array();
     } elseif (Funcs::$uri[1] == 'infoblock' && is_numeric($id)) {
         $data[] = array('name' => 'Инфоблоки', 'path' => '/' . ONESSA_DIR . '/infoblock/');
         $data[] = array();
     } elseif (Funcs::$uri[1] == 'reference' && is_numeric($id)) {
         $sql = 'SELECT parent FROM {{reference}} WHERE id=' . $id . '';
         $parent = DB::getOne($sql);
         while ($id != 0) {
             $sql = 'SELECT id, parent, name FROM {{reference}} WHERE id=' . $id . '';
             $row = DB::getRow($sql);
             $row['path'] = '/' . ONESSA_DIR . '/reference/' . $row['id'] . '/';
             $id = $row['parent'];
             $data[] = $row;
         }
         $data[] = array('name' => 'Справочник', 'path' => '/' . ONESSA_DIR . '/reference/');
         $data = array_reverse($data);
     }
     View::widget('crumbs', array('list' => $data));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:37,代码来源:CrumbsWidget.php

示例5: OffersMenu

 public function OffersMenu()
 {
     $data = array();
     $sql = 'SELECT id FROM {{tree}} WHERE parent=1 AND path=\'offers\' AND visible=1 ORDER BY num';
     $parent = DB::getOne($sql);
     $sql = 'SELECT * FROM {{tree}} WHERE parent=' . $parent . ' AND visible=1 AND menu=1 ORDER BY num';
     $list = DB::getAll($sql);
     foreach ($list as $i => $item) {
         $data[$i % 4][] = array('name' => $item['name'], 'path' => Tree::getPathToTree($item['id']), 'id' => $item['id']);
     }
     View::widget('menu/offers', array('list' => $data));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:12,代码来源:MenuWidget.php

示例6: getForm

    function getForm($row)
    {
        $sql = '
			SELECT name FROM {{forms}}
			WHERE path=\'' . $row['type'] . '\'
		';
        $row['form'] = DB::getOne($sql);
        $row['value'] = $row['value_int'];
        View::widget('fields/form', $row);
    }
开发者ID:sov-20-07,项目名称:billing,代码行数:10,代码来源:FieldWidget.php

示例7: run

 function run()
 {
     $list = Autopark::getSelect();
     View::widget('select', array('list' => $list));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:5,代码来源:SelectWidget.php

示例8: foreach

if (count($list) > 0) {
    ?>
	<ul>
	<?php 
    foreach ($list as $key => $item) {
        ?>
		<?php 
        if ($item['selected']) {
            ?>
	 		<li>
	 			<b><?php 
            echo $item['name'];
            ?>
</b>
	 			<?php 
            View::widget('menu/leftbranch', $item);
            ?>
	 		</li>
	 	<?php 
        } else {
            ?>
			<li><a href="<?php 
            echo $item['path'];
            ?>
"><?php 
            echo $item['name'];
            ?>
</a></li>
		<?php 
        }
        ?>
开发者ID:sov-20-07,项目名称:billing,代码行数:31,代码来源:leftbranch.php

示例9: run

 function run()
 {
     View::widget('iuser');
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:4,代码来源:IuserWidget.php

示例10:

<li class="edit_form_section edit_form_section_other clearfix">
	<?php 
echo View::widget('fields/addtd');
?>
	<table class="edit_form_table">
		<tr>
			<td><?php 
echo $name;
?>
</td>
			<td>
				<ul class="edit_form_multiselect edit_form_multival">
				<?php 
foreach ($list as $key => $item) {
    ?>
					<li>
						<label onclick="if($(this).find('input').prop('checked')==false){$('.multival<?php 
    echo $key;
    ?>
').prop('disabled',false);}else{$('.multival<?php 
    echo $key;
    ?>
').prop('disabled',true);}" class="form_label jsPreviewToggle" <?php 
    if ($item['gal'][0]['path']) {
        ?>
data-src="/of/<?php 
        echo $item['gal'][0]['path'];
        ?>
?h=100&w=100&c=1"<?php 
    }
    ?>
开发者ID:sov-20-07,项目名称:billing,代码行数:31,代码来源:multival.php

示例11: foreach

	</header>
	<ul class="gallery_list jsMoveContainerLI_inner gallery <?php 
echo $path;
?>
" data-listidx="0" id="<?php 
echo $path;
?>
" datagal="<?php 
echo $id;
?>
">
		<?php 
foreach ($files as $item) {
    ?>
			<?php 
    echo View::widget('/fields/gallery_one', array('file' => $item, 'parent' => $id));
    ?>
		<?php 
}
?>
	</ul>
	<div class="gallery_addfiles">
		Добавить один или несколько файлов:
		<div class="gallery_addfiles_buttons">
			<iframe iframe src="/<?php 
echo ONESSA_DIR;
?>
/fields/fileframe/?id=<?php 
echo $tree;
?>
&path=<?php 
开发者ID:sov-20-07,项目名称:billing,代码行数:31,代码来源:gallery.php

示例12:

<?php

echo View::widget('/outfields/gallery_one', $files[0]);
/*foreach($files as $item):?>
	<?=View::widget('/outfields/gallery_one',$item)?>
<?endforeach*/
开发者ID:sov-20-07,项目名称:billing,代码行数:6,代码来源:gallery.php

示例13: hor

 function hor()
 {
     $data['viewed'] = Catalog::getViewed();
     //$data['favorite']=Catalog::getFavorite();
     View::widget('panel/hor', $data);
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:6,代码来源:PanelWidget.php

示例14: run

 function run($list)
 {
     View::widget('authorBooks', array('list' => $list));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:4,代码来源:AuthorBooksWidget.php

示例15: set

 function set($row)
 {
     View::widget('features/edit', $row);
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:4,代码来源:FeaturesWidget.php


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