Пример #1
0
 public function main()
 {
     $tmpl = pathang::getInstance('packet')->get('tmpl');
     if ($tmpl) {
         pathang::display($tmpl);
     }
 }
Пример #2
0
 public function main()
 {
     //openmenu based on page either 'feed','admin' or 'mainpage'
     $page = strtoupper(pathang::getInstance('node')->get('n1'));
     if ($page === 'FEED' || $page === 'ADMIN') {
         pathang::display(strtolower($page));
     } else {
         pathang::display();
     }
 }
Пример #3
0
 public function main()
 {
     //$username = pathang::getInstance('node')->get('n1');
     //$uid = pathang::getModel('userlog')->getUserId($username);
     pathang::GetInstance('request')->set('snippet', 1);
     $popular = pathang::getController('profile')->popular();
     $count = 0;
     pathang::GetInstance('packet')->Set('popular', $popular);
     pathang::GetInstance('packet')->Set('count', $count);
     pathang::display();
 }
Пример #4
0
 public function main()
 {
     $username = pathang::getInstance('node')->get('n1');
     $uid = pathang::getModel('userlog')->getUserId($username);
     pathang::GetInstance('request')->set('snippet', 1);
     $following = pathang::getController('profile')->following();
     $count = pathang::getModel('profile')->followingCount($uid);
     pathang::GetInstance('packet')->Set('following', $following);
     pathang::GetInstance('packet')->Set('count', $count);
     pathang::display();
 }
Пример #5
0
 public function main()
 {
     //display menu as user/guest or admin
     $n1 = pathang::getInstance('node')->get('n1');
     $session = pathang::getInstance('session');
     $liveuser = $session->get('liveuser');
     if ($liveuser) {
         $uid = $liveuser->id;
         $unread = pathang::GetModel('profile')->getUnreadNotificationCount($uid);
         pathang::getInstance('packet')->set('unread', $unread);
         if ($liveuser->type == 1) {
             pathang::display();
         } else {
             pathang::display('admin');
         }
     } else {
         pathang::display('guest');
     }
 }
Пример #6
0
 public function main()
 {
     // get request object
     $request = pathang::GetInstance('request');
     // set the snippet,limit and unread varaibles
     $request->Set('snippet', 'one');
     $request->set('limit', 3);
     $request->set('unread', true);
     // if user exists then only display
     if (isset(pathang::GetInstance('session')->get('liveuser')->username)) {
         $liveuser = pathang::GetInstance('session')->get('liveuser')->username;
         $user = pathang::GetInstance('node')->get('n1');
         //if the user is liveuser then display
         if ($user == $liveuser) {
             //get notification and counter
             $notify = pathang::getController('profile')->notifications()->messages;
             $count = pathang::getController('profile')->notifications()->unread;
             pathang::GetInstance('packet')->set('notify', $notify);
             pathang::GetInstance('packet')->set('count', $count);
             pathang::display();
         }
     }
 }
Пример #7
0
 public function main()
 {
     pathang::display();
 }