function outDopNav() { global $aRequest; global $nLevel; global $Permissions; if (true) { // Права проверить! DopNav('/user/user_edit', $aRequest[$nLevel], $Permissions->getLoggedUserId()); } }
function outDopNav() { global $aRequest; global $nLevel; global $aItem; global $Permissions; global $_t; if ($aItem['off'] == $Permissions->getLoggedUserId()) { // Права проверить! DopNav('/group/group_edit', $aRequest[$nLevel], $aItem['id']); } else { $_t->assign('DopNav', ''); } }
return; } // --------------------------- if (isset($_POST['act'])) { switch ($_POST['act']) { case 'del_bookmarks': // Console::log($_POST['ids']); foreach ($_POST['ids'] as $v) { $Bookmarks->del($v); } break; } } stylesheet('communication.css'); // DopNav DopNav('/bookmarks', $aRequest[$nLevel]); // BreadCrumbsItem $BreadCrumbs->add('friends', '—обутыльники'); // BreadCrumbs $_t->assign('BreadCrumbs', $BreadCrumbs->get()); $tpl = new KTemplate(FLGR_TEMPLATES . '/bookmarks_friends.htm'); // Friends $aBookmarks = $Bookmarks->getItems_UserId('user', $Permissions->getLoggedUserId()); if (empty($aBookmarks)) { $tpl->assign('IfNotEmpty', ''); } else { $tplIfNotEmpty = $tpl->fetchBlock('IfNotEmpty'); foreach ($aBookmarks as $v) { // Console::log($v); $tplElt = $tplIfNotEmpty->fetchBlock('Elt'); $tplElt->assign($v);
break; case 'del_wall_message': // dbg($_POST); $Walls->del($_POST['id']); header('Location: ' . $_SERVER['REQUEST_URI']); break; default: break; } } // BreadCrumbs $_t->assign('BreadCrumbs', $BreadCrumbs->get()); stylesheet('profile.css'); // DopNav if ($aSubject['id'] == $Permissions->getLoggedUserId()) { DopNav('/' . $aItem['seg'], $aRequest[$nLevel + 1], $aItem['off']); } else { $_t->assign('DopNav', ''); } // OPEN if ('' == $sModuleTpl) { my_die('Error: Template not found'); } $tpl = new KTemplate(FLGR_TEMPLATES . '/' . $sModuleTpl . '.htm'); $aWalls = $Walls->getItems($seg, $off); $aArray = array('title' => ' Комменты <a href="#" onclick="ShowHide(\'write_wall\');" class="comment_new"> написать </a> ', 'info' => '
// header('Location: /albums/'.$Permissions->getLoggedUserId().'/'.$_POST['album_id']); break; break; case 'save_descr': // dbg($class); $Photos->update($_POST['id'], array('descr' => $_POST['descr'])); // header('Location: /albums/'.$Permissions->getLoggedUserId().'/'.$_POST['album_id']); break; break; default: // dbg($_POST); break; } } // DopNav DopNav('/album', $aRequest[$nLevel], $off); // OPEN if ('' == $sModuleTpl) { my_die('Error: Template not found'); } $tpl = new KTemplate(FLGR_TEMPLATES . '/' . $sModuleName . '.htm'); $album_id = $aItem['id']; $tpl->assign('album_id', $album_id); // Получаем фотографии альбома $tpl->assign('Photo', int_list(${$class}->getPhotos($album_id), '_descr.htm')); /* if (empty($aPhotos)) { $tpl->assign('Photo', 'Альбом пуст'); } foreach ($aPhotos as $v) { $tplPhoto = $tpl->fetchBlock('Photo');
switch ($_POST['act']) { case 'frm': Console::log($_POST); $EnvUser->save($_POST['values']); header('Location: ' . $sRequest); include_once FLGR_COMMON . '/exit.php'; break; default: Console::log($_POST); break; } } // CSS stylesheet('profile.css'); // OPEN if ($sModuleTpl != '') { $tpl = new KTemplate(FLGR_TEMPLATES . '/' . $sModuleTpl . '.htm'); } else { $tpl = $_t->fetchBlock('ContentBlock'); } // BreadCrumbs // DopNav DopNav('/user/user_edit', $aRequest[$nLevel + 1]); // OUT $tpl->assign('form', $view); //$bFlag404 $bFlag404 = false; // CLOSE $_t->assign('BreadCrumbs', $BreadCrumbs->get()); $_t->assign('ContentBlock', $tpl); $tpl->reset();
<?php /** * Inbox */ // ADD_BREADCRUMBS $BreadCrumbs->addBreadCrumbs($sKey, $sTitle); DopNav('/mail', $aRequest[$nLevel], $off); // --------------------------- if (!$bFlagLastModule) { return; } // --------------------------- // Получаем сообщения $aMails = $Mails->getInbox($Permissions->getLoggedUserId()); if (empty($aMails)) { $tpl->assign('MessageItem', '<tr><td>Пока нет входящих сообщений</td></tr>'); } else { foreach ($aMails as $k => $v) { $aFrom = $Users->getBaseData($v['from_id']); // dbg($aFrom); $v['act_online'] = $aFrom['act_online']; $v['correspondent_id'] = $aFrom['id']; $v['correspondent_name'] = $aFrom['family'] . '<br>' . $aFrom['name']; $v['correspondent_avatar_filename'] = $aFrom['avatar_filename']; $aMails[$k] = $v; } // dbg($aMails); $tpl->assign('MessageItem', int_list($aMails, '_mail.htm')); } // TPL
// --------------------------- if (!$bFlagLastModule) { return; } // --------------------------- if (isset($_POST['act'])) { switch ($_POST['act']) { default: break; } } // BreadCrumbs $_t->assign('BreadCrumbs', $BreadCrumbs->get()); // DopNav if ($aItem['off'] == $Permissions->getLoggedUserId()) { DopNav('/' . $seg, $aRequest[$nLevel + 1], $off); } else { $_t->assign('DopNav', ''); } // OPEN if ('' == $sModuleTpl) { my_die('Error: Template not found'); } $tpl = new KTemplate(FLGR_TEMPLATES . '/album.htm'); // OUT //dbg($$class->getPhotos($off)); $tpl->assign('Photo', int_list(${$class}->getPhotos($off), '/_img.htm')); // Сбрасываем $bFlag404 $bFlag404 = false; // CLOSE $_t->assign('ContentBlock', $tpl);