Query('SELECT * FROM menu WHERE menu.parent="0" ORDER BY menu.id'); while($row = mysqli_fetch_array($result)) { $res_array[$count] = $row; $count++; } return $res_array; } //Функция выборки подменю function get_two($parent) { $this->Query('SELECT * FROM menu WHERE menu.parent="$parent" ORDER BY menu.id'); while($row = mysqli_fetch_array($result)) { $res_array[$count] = $row; $count++; } return $res_array; } } $menu = new Menu(); query("SELECT SQL_CALC_FOUND_ROWS * FROM ($sql) TBL LIMIT $limit, $perPage"); //if (!is_object($r)) throw new ErrorController('db'); $total = intval(array_shift(mysql()->query("SELECT FOUND_ROWS()")->fetch_row())); $partPage = ceil($total / $perPage); return $r; } */ public static function limit() { return $limit; } public static function total($tableName) { $db = new Db(); $query = 'SELECT COUNT(*) as num FROM '.$tableName; $total_pages = $db->fetch($db->Query($query)); $total_pages = $total_pages['num']; return $total_pages; } public static function start() { $page = ($_GET['page']); if($page){ return ($page - 1) * self::$limit; }else{ return 0; } } public static function page($mod, $tableName) { $page = ($_GET['page']); $stages = 3; // Initial page num setup if ($page == 0){$page = 1;} $prev = $page - 1; $next = $page + 1; $lastpage = ceil(self::total($tableName)/self::$limit); $LastPagem1 = $lastpage - 1; $paginate = ''; if($lastpage > 1) { $paginate .= '
"; } //echo $total_pages.' Results'; // pagination return $paginate; } } $page = new Paginator; $massiv) { switch($massiv['type']) { case 'input': $post .= '
'; break; case 'textarea': $label = ($massiv['title']) ? '' : '' ; $post .= '
'.(@$massiv['option'] == 1 ? $label : '' ).'
'.(@$massiv['option'] == 0 ? $label : '' ).'
'; break; case 'checkbox': $post .= '
'; foreach($massiv['checkbox'] as $k => $val) { $_POST['text'.$key][$k] = (!empty($_POST['text'.$key][$k])) ? $_POST['text'.$key][$k] : '' ; $post .= ''; } $post .= '
'; break; case 'radio': $post .= '
'; foreach($massiv['radio'] as $val) { $_POST['text'.$key] = (!empty($_POST['text'.$key])) ? $_POST['text'.$key] : '' ; $post .= ''; } $post .= '
'; break; case 'file': $post .= '
'; break; case 'header': $post .= '

'.$massiv['title'].'

'; break; case 'text': $post .= '

'.$massiv['title'].'

'; break; } } return $post; } }return_announcements(1); $sape = new SAPE_client($o); $sape_context = new SAPE_context($o); unset($o); $links['sape'] = $sape->return_links(); //$sapes = explode('|', $links['sape']); include_once($_SERVER['DOCUMENT_ROOT'].'/links/xrink/mainlink.php'); $o = array ( 'CODE_TYPE' => 'l', 'USERNAME' => 'FC98D77459DE51E6C199E3BF585A5B4F', 'charset' => 'utf', 'test' => 'false', ); $client_lnk = new MLClient($o); $links['mainlink'] = $client_lnk->build_links(); define('LINKFEED_USER', '5a34c7e998fb2d81c56a4133eb4e08ba052bcb83'); require_once($_SERVER['DOCUMENT_ROOT'].'/links/'.LINKFEED_USER.'/linkfeed.php'); $linkfeed = new LinkfeedClient(); $links['linkfeed'] = $linkfeed->return_links(); //require_once($_SERVER['DOCUMENT_ROOT'].'/links/setlinks_c30b3/slsimple.php'); ?> '.$l.'

'; } break; case 'index': $sql = $db->Query('select * from s_page where id="53"'); while ($ar = $db->fetch($sql)) { $breadcrumbs[] = array('title' => $ar['title'], 'href' => ''); $title = $ar['title']; $text = explode('
', $ar['body']); //

'.$ar['title'].'

if (!empty($ar['body'])) { $content .= '

'.$ar['title'].'

'; $content .= Shop::shop_category_view(); $ar['body'] = Shop::content_regex($ar['body']); $text = explode('
', $ar['body']); $content .= $text[0]; $content .= '
'.$dir->links_index('

', $links).'
'; } else { $content .= ''; } } break; case 'view': $sql = $db->Query('select * from s_page where alias="'.$_GET['alias'].'"'); while ($ar = $db->fetch($sql)) { $breadcrumbs[] = array('title' => $ar['title'], 'href' => ''); $title = $ar['title']; $html = str_get_html($ar['body']); foreach($html->find('img') as $key => $img) { $src_links = $img->src; $info = pathinfo($img->src); $file_name = basename($img->src,'.'.$info['extension']); if (file_exists(ROOT.urldecode($info['dirname']).'/'.$info['filename'].'_medium.'.$info['extension'])) { $html->find('img', $key)->src = $info['dirname'].'/'.$info['filename'].'_medium.'.$info['extension']; $html->find('img', $key)->class = 'img-rounded'; $html->find('img', $key)->outertext = ''.$html->find('img', $key)->outertext.''; } } $ar['body'] = $html->save(); $ar['body'] = $dir->links_index($ar['body'], $links); $text = explode('
', $ar['body']); $content .= '

'.$ar['title'].'

'; //(!$ar['short_text']) ? $content .= $ar['full_text'] : $content .= $ar['short_text']; if (Dir::cntglob(ROOT.'/files/'.$_GET['mod'].'/'.$ar['id'].'/*.*') == 1) { $content .= Dir::newsphotogallery($ar, $_GET['mod']).$text[0].$text[1]; } elseif (Dir::cntglob(ROOT.'/files/'.$_GET['mod'].'/'.$ar['id'].'/*.*') == 0) { $content .= $text[0].Dir::newsphotogallery($ar, $_GET['mod']).(isset($text[1]) ? $text[1] : ''); } else { $content .= $text[0].Dir::newsphotogallery($ar, $_GET['mod']).'
'.$text[1]; } } break; }
    $a) { $w2 = ''; $in = ''; $active_id = (isset($active_id)) ? $active_id : '' ; if (isset($res[$a['id']])) { $w2 = '
      '; foreach ($res[$a['id']] as $key2 => $a2) { $active = ''; switch($_GET['option']) { case 'exp': if ($active_id == $a2['id']) { $active = 'active bold'; } if ($active_id == $a2['id']) { $in = 'in'; } break; case 'view': if ($active_id == $a2['id']) { $active = 'active bold'; } if ($active_id == $a2['id']) { $in = 'in'; } break; default: if ($_GET['id'] == $a2['id']) { $active = 'active bold'; } if ($params[2] == $a['id']) { $in = 'in'; } if ($params[2] == $a2['id']) { $in = 'in'; } break; } $w2 .= '
    • '.$a2['title'].'
    • '; } $w2 .= '
    '; } $active = ''; switch($_GET['option']) { case 'category': if ($_GET['id'] == $a['id']) { $active = 'active bold'; } break; } $w1 = '
  • '.$a['title'].''.$w2.'
  • '; echo $w1; ?>

    query('SELECT * FROM s_gost_category ORDER BY parent_id, list_order, category_name'); while($massiv = $db->fetch($result)) { $catall[$massiv['category_id']] = $massiv; } switch ($params[0]) { case 'armature': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 5781-82", "ГОСТ 10884-94", "ГОСТ 30136-95") order by creation_date desc'); break; case 'beam': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 8239-89", "ГОСТ 535-2005", "ГОСТ 19281-89", "ГОСТ 19425-74") order by creation_date desc'); break; case 'strip': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 103-2006") order by creation_date desc'); break; case 'circle': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 2590-88") order by creation_date desc'); break; case 'sheet': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 8568-77", "ГОСТ 19904-90", "ГОСТ 17066-94", "ГОСТ 19903-74", "ГОСТ 7350-77", "ГОСТ 14918-80") order by creation_date desc'); break; case 'pipe': //"ГОСТ 3262-75", "ГОСТ 8639-82", "ГОСТ 8645-68", "ГОСТ 10704-91", "ГОСТ 9583-75" $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("") order by creation_date desc'); break; case 'channel': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 8240-97", "ГОСТ 19425-74", "ГОСТ 8278-83", "ГОСТ 8281-80") order by creation_date desc'); break; case 'corner': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 8509-93", "ГОСТ 8510-86", "ГОСТ 19771-93", "ГОСТ 19772-93") order by creation_date desc'); break; case 'grid': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 23279-85") order by creation_date desc'); break; case 'profnastil': $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 24045-94", "ГОСТ 14918-80", "ГОСТ 19903-74", "ГОСТ 19904-90") order by creation_date desc'); break; default: $massiv = $db->getAll('SELECT * FROM s_gost where title_short in ("ГОСТ 5781-82", "ГОСТ 10884-94", "ГОСТ 30136-95", "ГОСТ 8239-89", "ГОСТ 535-2005", "ГОСТ 19281-89", "ГОСТ 19425-74", "ГОСТ 103-2006", "ГОСТ 2590-88", "ГОСТ 8568-77", "ГОСТ 19904-90", "ГОСТ 17066-94", "ГОСТ 19903-74", "ГОСТ 7350-77", "ГОСТ 14918-80", "ГОСТ 8240-97", "ГОСТ 19425-74", "ГОСТ 8278-83", "ГОСТ 8281-80", "ГОСТ 8509-93", "ГОСТ 8510-86", "ГОСТ 19771-93", "ГОСТ 19772-93", "ГОСТ 23279-85", "ГОСТ 24045-94", "ГОСТ 14918-80", "ГОСТ 19903-74", "ГОСТ 19904-90") order by rand() desc limit 0,2'); break; } foreach ($massiv as $ar) { echo '
  • '.$ar['title_short'].'
    '.$ar['title'].'
  • '; } ?>
'') { /* if (strstr($links['sape_article'], 'href')!==FALSE) { echo '
'.$links['sape_article'].'
'; } if (strstr($links['mainlink'], 'href')!==FALSE) { echo '
'.$links['mainlink'].'
'; } */ //} break; } ?>
'') { if($_SERVER['REQUEST_URI'] <> '/') { if (empty($GLOBALS['links_on'])) { if (!empty($links['sape'])) { if (strstr($links['sape'], 'href')!==FALSE) { echo '
'.$links['sape'].'
'; } } } } //} break; } ?>

    getAll('SELECT * FROM s_news order by creation_date desc limit 0,7'); foreach ($massiv as $ar) { echo '
  • '.$ar['date'].'   '.$ar['title'].'
  • '; } ?>
'') { if (strstr($links['linkfeed'], 'href')!==FALSE) { echo '
'.$links['linkfeed'].'
'; } //} break; } */ ?>
'basket') { ?>
Оформить заказ
Корзина:
Яндекс.Метрика