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


PHP pathang::Render方法代码示例

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


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

示例1: installation

 public function installation()
 {
     $request = pathang::getInstance('request');
     if ($request->get('username')) {
         pathang::GetModel('install')->main($request);
         pathang::getInstance('node')->set('terminal_ext', 'html');
         pathang::Render('install', 'success');
     } else {
         pathang::getInstance('node')->set('terminal_ext', 'html');
         pathang::Render('install', 'main');
     }
 }
开发者ID:gibranda,项目名称:Feedstack,代码行数:12,代码来源:root.php

示例2: page

    public function page($username)
    {
        $basket = pathang::GetInstance('basket');
        $allowedType = array("text", "photo", "video", "link");
        $feed_type = pathang::GetInstance('node')->get('n2');
        $basket->set('feed_type', $feed_type);
        $limit = pathang::getInstance('pathang')->FEEDSTACK->FEED_COUNT;
        //check if user is admin
        if (isset(pathang::getInstance('session')->get('liveuser')->id)) {
            $liveuser_id = pathang::getInstance('session')->get('liveuser')->id;
        } else {
            $liveuser_id = null;
        }
        $allowed_delete = pathang::getModel('userlog')->isAdmin($liveuser_id);
        $basket->set('allowed_delete', $allowed_delete);
        //get user information
        $result = pathang::GetModel('profile')->getUserProfile($username);
        if (!$result) {
            pathang::GetInstance('pathang')->SITE->PAGE = 'login';
            $basket->set('heading', 'OPPS !');
            $basket->set('message', 'The page your searching for doesnot exist.
							Please contact the site administrator for further queries.');
            pathang::render('general', 'errorpage');
            exit;
        }
        $user = new stdclass();
        foreach ($result as $key => $item) {
            $user->{$key} = $item;
        }
        $user->image = pathang::getHelper('userlog')->getUserImage($user);
        $following = pathang::GetModel('profile')->isFollowing($liveuser_id, $user->id);
        $basket->set('following', $following);
        $basket->set('user', $user);
        //check if user profile is public
        if (!$user->access && $liveuser_id == null) {
            pathang::GetInstance('pathang')->SITE->PAGE = 'login';
            $basket->set('heading', 'Private Page');
            $basket->set('message', 'Requested profile is private, can be accessed only by
				registered users. Please <a href="' . ROOT . 'user/login"><b>login</b></a> to the website to view the profile.
					');
            pathang::render('general', 'errorpage');
            exit;
        }
        //get user feeds
        if (!$feed_type) {
            $feedArray = pathang::getModel('feed')->getFeeds($user->id, null, null, $limit);
            if ($feedArray) {
                $feedObj = new stdclass();
                foreach ($feedArray as $a => $b) {
                    $feedTemp = new stdClass();
                    foreach ($b as $c => $d) {
                        $feedTemp->{$c} = $d;
                    }
                    $feedTemp->image = '';
                    $feedTemp->feed = htmlspecialchars_decode($feedTemp->feed);
                    $feedTemp->profile_link = ROOT . $feedTemp->username;
                    $feedTemp->image = pathang::getHelper('userlog')->getUserImage($feedTemp);
                    $feedTemp->time_stamp = pathang::getHelper('feedprocess')->ago($feedTemp->time_stamp);
                    $feedTemp->like_count = pathang::getModel('feed')->getLikeCount($feedTemp->id);
                    $feedTemp->liveuser_like = pathang::getModel('feed')->checkLiveuserLike($liveuser_id, $feedTemp->id);
                    $feedTemp->comment_count = pathang::getModel('feed')->getCommentCount($feedTemp->id);
                    $feedObj->{$a} = $feedTemp;
                }
                $basket->set('feeds', $feedObj);
            }
        } else {
            $feedArray = pathang::getModel('feed')->getFeeds($user->id, $feed_type, null, $limit);
            if ($feedArray) {
                $feedObj = new stdclass();
                foreach ($feedArray as $a => $b) {
                    $feedTemp = new stdClass();
                    foreach ($b as $c => $d) {
                        $feedTemp->{$c} = $d;
                    }
                    $feedTemp->image = '';
                    $feedTemp->feed = htmlspecialchars_decode($feedTemp->feed);
                    $feedTemp->profile_link = ROOT . $feedTemp->username;
                    $feedTemp->image = pathang::getHelper('userlog')->getUserImage($feedTemp);
                    $feedTemp->time_stamp = pathang::getHelper('feedprocess')->ago($feedTemp->time_stamp);
                    $feedTemp->like_count = pathang::getModel('feed')->getLikeCount($feedTemp->id);
                    $feedTemp->liveuser_like = pathang::getModel('feed')->checkLiveuserLike($liveuser_id, $feedTemp->id);
                    $feedTemp->comment_count = pathang::getModel('feed')->getCommentCount($feedTemp->id);
                    $feedObj->{$a} = $feedTemp;
                }
                $basket->set('feeds', $feedObj);
            }
        }
        //set limit counter
        $basket->set('limit_counter', $limit);
        pathang::GetInstance('pathang')->SITE->PAGE = 'profile';
        pathang::Render('profile', 'profile');
        if ($user->id == $liveuser_id) {
            pathang::GetModel('profile')->updateReadNotifications($user->id);
        }
    }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:95,代码来源:profile.php

示例3: forgot

    public function forgot()
    {
        $node = pathang::getInstance('node');
        $request = pathang::getInstance('request');
        $basket = pathang::getInstance('basket');
        $email = $request->filterHTMLSQL('email');
        $password = $request->filterHTMLSQL('password');
        $n3 = $node->get('n3');
        pathang::getInstance('pathang')->SITE->PAGE = 'login';
        if ($email) {
            $code = pathang::getModel('userlog')->setForgotCode($email);
            if ($code == 2) {
                $basket->set('heading', 'Error in Operation');
                $basket->set('message', 'There is an error in the operation performed.
						Please redo the process.');
            } elseif ($code == 3) {
                $basket->set('heading', 'Email Not Found');
                $basket->set('message', 'Email you have provided is not registered with our
					database.Please enter the correct email id and redo the process.');
            } else {
                $basket->set('heading', 'Reset Password Email');
                $basket->set('message', 'Password reset instructions has been sent to your email. Follow
					the instructions in the mail to create a new password. Please check your spam box
					if in case you dont recieve a mail.');
                //echo $code;
                pathang::getHelper('userlog')->sendForgotPasswordMail($code, $email);
            }
            pathang::Render('userlog', 'forgot_message');
        } elseif ($n3) {
            if ($password) {
                $update = pathang::getModel('userlog')->updateForgotPassword($n3, $password);
                if ($update == 1) {
                    $basket->set('heading', 'Successfully Updated Password');
                    $basket->set('message', 'Your password has been successfully updated.Please
						login to enter the site');
                } else {
                    $basket->set('heading', 'Error in Operation');
                    $basket->set('message', 'There is an error in the operation performed.
						Please redo the process.');
                }
                pathang::Render('userlog', 'forgot_message');
            } else {
                pathang::render('userlog', 'reset_password');
            }
        } else {
            pathang::getInstance('pathang')->SITE->PAGE = 'login';
            pathang::render('userlog', 'forgot');
        }
    }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:49,代码来源:userlog.php

示例4: load

 public function load()
 {
     $request = pathang::GetInstance('request');
     $lastid = $request->get('lastid');
     $type = $request->get('feed-type');
     $uid = $request->get('uid');
     $wall = $request->get('wall');
     //check if user is admin
     $liveuser_id = $request->get('liveuser-id');
     $allowed_delete = pathang::getModel('userlog')->isAdmin($liveuser_id);
     pathang::getInstance('basket')->set('allowed_delete', $allowed_delete);
     $limit = pathang::getInstance('pathang')->FEEDSTACK->FEED_COUNT;
     pathang::getInstance('basket')->set('limit_counter', $limit);
     pathang::getInstance('basket')->set('uid', $uid);
     pathang::getInstance('basket')->set('feed_type', $type);
     if (!$wall) {
         $feedArray = pathang::getModel('feed')->getFeeds($uid, $type, $lastid, $limit);
     } else {
         $feedArray = pathang::getModel('feed')->getFeedsFollowing($liveuser_id, $type, $lastid, $limit);
         pathang::getInstance('basket')->set('wall', 'wall');
     }
     if ($feedArray) {
         $feedObj = new stdclass();
         foreach ($feedArray as $a => $b) {
             $feedTemp = new stdClass();
             foreach ($b as $c => $d) {
                 $feedTemp->{$c} = $d;
             }
             $feedTemp->image = '';
             $feedTemp->profile_link = ROOT . $feedTemp->username;
             $feedTemp->feed = $feedTemp->feed;
             $feedTemp->image = pathang::getHelper('userlog')->getUserImage($feedTemp);
             $feedTemp->time_stamp = pathang::getHelper('feedprocess')->ago($feedTemp->time_stamp);
             $feedTemp->like_count = pathang::getModel('feed')->getLikeCount($feedTemp->id);
             $feedTemp->liveuser_like = pathang::getModel('feed')->checkLiveuserLike($liveuser_id, $feedTemp->id);
             $feedTemp->comment_count = pathang::getModel('feed')->getCommentCount($feedTemp->id);
             $feedObj->{$a} = $feedTemp;
         }
         pathang::GetInstance('pathang')->SITE->PAGE = 'index';
         pathang::getInstance('basket')->set('feeds', $feedObj);
         pathang::Render('feed', 'feed_loadmore');
     } else {
         $feedObj = null;
         pathang::GetInstance('pathang')->SITE->PAGE = 'index';
         pathang::getInstance('basket')->set('feeds', $feedObj);
         pathang::Render('feed', 'feed_loadmore');
     }
 }
开发者ID:adrixnac,项目名称:RedSocial,代码行数:48,代码来源:feed.php


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