Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 5
0
 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));
 }
Ejemplo n.º 6
0
    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);
    }
Ejemplo n.º 7
0
 function run()
 {
     $list = Autopark::getSelect();
     View::widget('select', array('list' => $list));
 }
Ejemplo n.º 8
0
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 
        }
        ?>
Ejemplo n.º 9
0
 function run()
 {
     View::widget('iuser');
 }
Ejemplo n.º 10
0
<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 
    }
    ?>
Ejemplo n.º 11
0
	</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 
Ejemplo n.º 12
0
<?php

echo View::widget('/outfields/gallery_one', $files[0]);
/*foreach($files as $item):?>
	<?=View::widget('/outfields/gallery_one',$item)?>
<?endforeach*/
Ejemplo n.º 13
0
 function hor()
 {
     $data['viewed'] = Catalog::getViewed();
     //$data['favorite']=Catalog::getFavorite();
     View::widget('panel/hor', $data);
 }
Ejemplo n.º 14
0
 function run($list)
 {
     View::widget('authorBooks', array('list' => $list));
 }
Ejemplo n.º 15
0
 function set($row)
 {
     View::widget('features/edit', $row);
 }
Ejemplo n.º 16
0
 public function ServiceMenu()
 {
     $data = array();
     $user = User::getInfo($_SESSION['user']['id']);
     foreach (OneSSA::$modulesStandart as $key => $item) {
         if (in_array($key, $user['access']['modules']) && in_array('top', $item['menu'])) {
             $data[$key] = $item['name'];
             $_SESSION['user']['access'][$key] = $item;
         }
     }
     View::widget('menu/service', array('list' => $data));
 }
Ejemplo n.º 17
0
 function run()
 {
     $id = Tree::getIdTreeByModule('news');
     $list = News::getList($id, 5);
     View::widget('news', array('list' => $list));
 }
Ejemplo n.º 18
0
<form class="section_filters" id="optionsForm">
	<?php 
foreach ($list as $key => $item) {
    ?>
		<?php 
    View::widget('options/' . $item['path'], $item);
    ?>
	<?php 
}
?>
	<br />
	<span id="optionsButton" class="show-but" path="" onclick="createOptionString();document.location.href=$(this).attr('path');"></span><br/><br/>
	<?php 
/*?>
	                        <!-- мощность охлаждения -->
                        <div class="filter cooling_capacity">
                        	Мощность охлаждения
                            <span class="icon ic_help open_help"></span>
                            <div class="help_block"><div class="padds">
	                            <span class="icon ic_close" title="Закрыть"></span>
                                <div class="help_head">Мощность охлаждения&nbsp;<span class="icon ic_help"></span></div>
                                Типовой расчет позволяет найти мощность кондиционера для небольшого помещения: отдельной комнаты в квартире или коттедже, офиса площадью до 50 – 70 кв. м и других помещений, расположенных в капитальных зданиях.<br />
                                <a href="#" class="is_white">Подробное описание</a>
                            </div></div>
                            <select>
                            	<option>от 2,6 до 3,5 кВт (~50 м2)</option>
                            </select>
                        </div>
                        <!-- /мощность охлаждения -->
	<div class="control">
		<input type="submit" value="" class="is_button select" />
Ejemplo n.º 19
0
 function run()
 {
     $items = PaginationWidget::getPage($_SESSION['user']['perpage'], PaginationWidget::$count);
     View::widget('pagination', array('pagination' => $items));
 }