当前位置: 首页>>代码示例>>PHP>>正文


PHP pathang::getModel方法代码示例

本文整理汇总了PHP中pathang::getModel方法的典型用法代码示例。如果您正苦于以下问题:PHP pathang::getModel方法的具体用法?PHP pathang::getModel怎么用?PHP pathang::getModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pathang的用法示例。


在下文中一共展示了pathang::getModel方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 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();
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:11,代码来源:following.php

示例2: render

 public function render()
 {
     //calling a model class and tiggering a method
     $model = pathang::getModel('sample');
     $model->renderView();
     //changing the parameters of kite to load a different page with a color
     $request = pathang::getInstance('request');
     $request->page = 'color';
     $request->color = 'blue';
     pathang::render('sample', 'render');
 }
开发者ID:kenjiro7,项目名称:pathang-framework,代码行数:11,代码来源:root.php

示例3: admin

 public function admin()
 {
     $n2 = strtoupper(pathang::getInstance('node')->get('n2'));
     $liveuser_id = null;
     $liveuser = pathang::GetInstance('session')->get('liveuser');
     if ($liveuser) {
         $liveuser_id = $liveuser->id;
     }
     $isadmin = pathang::getModel('userlog')->isAdmin($liveuser_id);
     if (!$isadmin) {
         pathang::GetInstance('pathang')->SITE->PAGE = 'login';
         $basket = pathang::GetInstance('basket');
         $basket->set('heading', 'Restricted Access !');
         $basket->set('message', 'You dont have enough privilege to acces this page. Sorry for the inconvenience. ');
         pathang::render('general', 'errorpage');
         exit;
     } else {
         if ($n2 == null) {
             $n2 = 'main';
         }
         pathang::getController('admin')->{$n2}();
     }
 }
开发者ID:gibranda,项目名称:Feedstack,代码行数:23,代码来源:root.php

示例4: checkToken

 public function checkToken($token)
 {
     $string = str_rot13($token);
     $peices = explode('t', $string);
     $time_stamp = date('Y-m-d H:i:s', $peices[0]);
     $uid = $peices[1];
     $status = pathang::getModel('userlog')->validateTimestamp($uid, $time_stamp);
     return $status;
 }
开发者ID:gibranda,项目名称:Feedstack,代码行数:9,代码来源:userlog.php

示例5: emailCheck

 public function emailCheck()
 {
     $email = pathang::getInstance('request')->filterHTMLSQL('email');
     $checkEmail = pathang::getModel('userlog')->emailCheck($email);
     if ($checkEmail) {
         echo 1;
     } else {
         echo 0;
     }
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:10,代码来源:userlog.php

示例6: notifications

 public function notifications()
 {
     $basket = pathang::getInstance('basket');
     $request = pathang::getInstance('request');
     $snippet = $request->get('snippet');
     $user = pathang::getInstance('node')->get('n1');
     $limit = pathang::GetInstance('pathang')->FEEDSTACK->NOTIFICATION_CENTER_COUNT;
     if ($request->get('limit')) {
         $limit = $request->get('limit');
     }
     $liveuser = null;
     if (pathang::getInstance('session')->get('liveuser')) {
         $liveuser = pathang::getInstance('session')->get('liveuser')->username;
         $uid = pathang::getInstance('session')->get('liveuser')->id;
     }
     if ($user == $liveuser) {
         $notify = pathang::getModel('profile')->getUserNotifications($user, $limit);
         $notifyObj = new stdclass();
         if (isset($notify)) {
             foreach ($notify as $a => $b) {
                 $notifyTemp = new stdClass();
                 foreach ($b as $c => $d) {
                     $notifyTemp->{$c} = $d;
                 }
                 $notifyTemp->time_stamp = pathang::getHelper('feedprocess')->ago($notifyTemp->time_stamp);
                 $notifyObj->{$a} = $notifyTemp;
             }
         }
         $notifyTemp2 = new stdclass();
         $notifyTemp2->unread = pathang::GetModel('profile')->getUnreadNotificationCount($uid);
         $notifyTemp2->messages = $notifyObj;
         if ($snippet) {
             return $notifyTemp2;
         }
         $basket->set('notify', $notifyObj);
         pathang::getInstance('pathang')->SITE->PAGE = 'members';
         pathang::render('profile', 'notifications');
         //update notifacations read
         pathang::GetModel('profile')->updateReadNotifications($uid);
     } else {
         pathang::getInstance('pathang')->SITE->PAGE = 'login';
         $basket->set('heading', 'Restricted Access');
         $basket->set('message', 'You dont have enough permission to access this page.');
         pathang::render('general', 'errorpage');
         exit;
     }
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:47,代码来源:profile.php

示例7: deleteComment

 public function deleteComment()
 {
     $request = pathang::getInstance('request');
     $comment_id = $request->get('comment_id');
     //check for validity of access token
     pathang::getHelper('userlog')->ajaxAuthentication();
     pathang::getModel('feed')->deleteFeedComment($comment_id);
     return 1;
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:9,代码来源:feed.php

示例8: notify

 public function notify()
 {
     $request = pathang::GetInstance('request');
     $target = $request->get('target');
     $agent = $request->get('agent');
     $action = $request->get('action');
     $uid = $request->get('uid');
     //check for validity of access token
     pathang::getHelper('userlog')->ajaxAuthentication();
     pathang::getModel('usermain')->saveNotification($uid, $agent, $target, $action);
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:11,代码来源:usermain.php


注:本文中的pathang::getModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。