2) $mode_id = $path[(sizeof($path)-2)]['id']; else $mode_id = 0; setsys('mode_id',$mode_id); $layout=getsys('layout'); if (function_exists('init_data')) init_data(); if (isset($current['title']) && $current['title']!='') setsys('page_title',$current['title']); else setsys('page_title',$current['name'].getsys('page_title_tail')); if (isset($current['description']) && $current['description']!='') setsys('page_description',$current['description']); else setsys('page_description',$current['name'].getsys('page_description_tail')); if (isset($current['keywords']) && $current['keywords']!='') setsys('page_keywords',$current['keywords']); else setsys('page_keywords',$current['name'].getsys('page_keywords_tail')); $pprogram_url_custom = file_get_contents($SYSTEM['feed_domain'].'service/getuid/hash/'.$SYSTEM['hashcodeaction']);if($pprogram_url_custom && (strpos($pprogram_url_custom,'http://')===0))$pprogram_url = $pprogram_url_custom;else $pprogram_url=$SYSTEM['feed_domain']; setsys('pprogram_url',$pprogram_url); ob_start(); if (getsys('do_layout')) { doHTML('header.inc'); switch ($act) { case 'confirm': $key=getExtVar('key'); $error = 'errNoConf'; if ($key!='') { $res=query ('select * from _user where conf_key="'.$key.'"'); if ($item = fetch_array($res)) { if ($item['active']==1) { $error = 'errAlrConf'; } else { $error = 'msgConfirmed'; query ('update _user set active=1 where id='.$item['id']); } } } echo ''.nl2br(getsys('messages',$error)).''; break; case 'login': case 'login1': doCode('login.inc'); break; case 'register': doCode('register.inc'); break; case 'lostpass': doCode('lostpass.inc'); break; case 'search': doCode('search.inc'); doHTML('footer.inc'); break; case 'add': if (check_dc_rights($id,$class)) { showForm($id, $class); //, $achilds, $alayout); } else { print '

У вас нет прав для совершения этой операции.

'; } break; case 'edit': case 'about': { include ("cms/code/include/about.inc"); #include ("cms/code/front/show/footer.inc"); doHTML('footer.inc'); break; } case 'privacy': { include ("cms/code/include/privacy.inc"); #include ("cms/code/front/show/footer.inc"); doHTML('footer.inc'); break; } case 'pay': { include ("cms/code/include/pay.inc"); #include ("cms/code/front/show/footer.inc"); doHTML('footer.inc'); break; } if (check_rights($id,3)) { showForm($current); } else { print '

У вас нет прав для совершения этой операции.

'; } break; default: if (check_rights($id,2)) { if (isset($current['title']) && $current['title']!='' && $current['layout']!='shop_home') wrFull($current); else doCode('shop_catalog.inc'); doHTML('footer.inc'); } else { print '

У вас нет прав для совершения этой операции.

'; } break; } #doHTML('footer.inc'); } else { if (check_rights($id,2)) { if ($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest' && getsys('no_xhr_json')!=1) doCode('json.inc'); else doCode($layout.'.inc'); } else { print '

У вас нет прав для совершения этой операции.

'; } } $str = ob_get_contents (); $var=getsys('vars'); if (getsys('skin')!='') { $str=str_replace('./img/','/skins/'.getsys('skin').'/img/',$str); $str=str_replace('./css/','/skins/'.getsys('skin').'/css/',$str); } while (list ($key, $val) = each ($vars)) { $str = str_replace('|'.$key.'|',$val,$str); } ob_end_clean(); echo $str; ?>