コード例 #1
0
 public function actionAdmin()
 {
     // delete comment request
     if (Rays::isPost()) {
         if (isset($_POST['checked_comments'])) {
             $commentIds = $_POST['checked_comments'];
             foreach ($commentIds as $id) {
                 if (!is_numeric($id)) {
                     return;
                 } else {
                     $comment = new Comment();
                     $comment->id = $id;
                     $comment->delete();
                 }
             }
         }
     }
     $curPage = $this->getPage("page");
     $pageSize = $this->getPageSize('pagesize', 10);
     $count = Comment::find()->count();
     $comments = Comment::find()->join("user")->join("topic")->order_desc("id")->range(($curPage - 1) * $pageSize, $pageSize);
     $pager = new RPager('page', $count, $pageSize, RHtml::siteUrl('comment/admin'), $curPage);
     $this->layout = 'admin';
     $this->setHeaderTitle("Comments administration");
     $data = array('count' => $count, 'comments' => $comments, 'pager' => $pager->showPager());
     $this->render('admin', $data, false);
 }
コード例 #2
0
ファイル: AdminController.php プロジェクト: a4501150/FDUGroup
 /**
  * View system logs
  */
 public function actionLogs()
 {
     $curPage = $this->getPage("page");
     $pageSize = $this->getPageSize("pagesize", 10);
     $count = SystemLog::find()->count();
     $logs = SystemLog::find()->order_desc("id")->join('user')->range(($curPage - 1) * $pageSize, $pageSize);
     $pager = new RPager('page', $count, $pageSize, RHtml::siteUrl('admin/logs'), $curPage);
     $this->setHeaderTitle("System logs");
     $this->render('logs', ['logs' => $logs, 'pager' => $pager->showPager(), 'count' => $count], false);
 }
コード例 #3
0
ファイル: detail.php プロジェクト: a4501150/FDUGroup
            <div class="col-sm-3" style="float:right;text-align: right;padding-right:0;">
                <?php 
if ($hasJoined) {
    echo RHtml::linkAction('post', "Add new post", 'new', $group->id, array('class' => 'btn btn-xs btn-success', 'style' => 'margin: 10px 0;'));
}
?>
            </div>

            <div class="clearfix"></div>
            <div>
                <?php 
$self->renderPartial("_common._posts_table", array('posts' => $latestPosts, 'showAuthor' => true), false);
if (!empty($latestPosts)) {
    ?>
                    <ul class="pager">
                        <li class="next"><a href="<?php 
    echo RHtml::siteUrl('post/list/' . $group->id);
    ?>
">More topics &rarr;</a>
                        </li>
                    </ul>
                <?php 
}
?>

            </div>

        </div>
    </div>

</div>
コード例 #4
0
ファイル: ads.view.php プロジェクト: a4501150/FDUGroup
                setTimeout('ad_loop_display()',10000);
            }
        );

        //$('.Ad_List a').attr('target','_blank');

        $('.Ad_List a').click(
            function() {
                var element = $(this).parent();
                while ($(element).attr('class') != 'Ad_List') {
                    element = $(element).parent();
                }
                $.ajax({
                    type: 'POST',
                    url: '<?php 
echo RHtml::siteUrl('ads/hitAd');
?>
',
                    data: {'adId':$(element).attr('adid')}
                });
            }
        );

        function ad_loop_next(){
            ad_loop_show(current_ad + 1);
        }

        function ad_loop_prev(){
            ad_loop_show(current_ad - 1);
        }
コード例 #5
0
ファイル: view.php プロジェクト: a4501150/FDUGroup
                    </div>
                    <div>
                        <?php 
echo isset($pager) ? $pager : "";
?>
                    </div>
    </div>
</div>
<script>
    $(document).ready(function () {
        $(".message-list .message-item .message-body a").click(function () {
            var id = $(this).parents(".message-body").attr("messageId");
            if (id) {
                $.ajax({
                    url: "<?php 
echo RHtml::siteUrl("message/read");
?>
",
                    type: "post",
                    data: {messageId: id},
                    success: function (data) {
                        if (data == "success") {
                            // do some thing
                        }
                    }
                });
            }
            return true;
        });
    });
コード例 #6
0
ファイル: AdsController.php プロジェクト: a4501150/FDUGroup
 public function actionAdmin()
 {
     $this->setHeaderTitle('Advertisement');
     $this->layout = 'admin';
     if (Rays::isPost()) {
         if (isset($_POST['checked_ads'])) {
             $selected = $_POST['checked_ads'];
             if (is_array($selected)) {
                 $operation = $_POST['operation_type'];
                 foreach ($selected as $id) {
                     $ad = Ads::get($id);
                     if ($ad == null) {
                         break;
                     }
                     switch ($operation) {
                         case "block":
                             $ad->status = Ads::BLOCKED;
                             $ad->save();
                             break;
                         case "active":
                             $ad->status = Ads::APPROVED;
                             $ad->save();
                             break;
                     }
                 }
             }
         }
     }
     $curPage = $this->getPage('page');
     $pageSize = $this->getPageSize("pagesize", 10);
     $filterStr = Rays::getParam('search', null);
     $query = Ads::find()->join("publisher");
     if ($name = trim($filterStr)) {
         $names = preg_split("/[\\s]+/", $name);
         foreach ($names as $key) {
             $query = $query->like("name", $key);
         }
     }
     $count = $query->count();
     $ads = $query->order_desc("id")->range($pageSize * ($curPage - 1), $pageSize);
     $data = ['ads' => $ads, 'count' => $count];
     $url = RHtml::siteUrl('ads/admin');
     if ($filterStr != null) {
         $url .= '?search=' . urlencode(trim($filterStr));
     }
     $pager = new RPager('page', $count, $pageSize, $url, $curPage);
     $data['pager'] = $pager->showPager();
     $this->render('admin', $data, false);
 }
コード例 #7
0
<div class="panel panel-default">
    <div class="panel-heading">Friends</div>
    <div class="panel-body">
        <?php 
echo '<div class="user-list">';
if (empty($friends)) {
    echo '<div>&nbsp;&nbsp;You don\'t have any friends yet!</div>';
}
foreach ($friends as $friend) {
    echo '<div class="user-item col-lg-4" style="overflow: hidden;height: 80px;">';
    $picture = isset($friend->picture) && $friend->picture != '' ? $friend->picture : User::$defaults['picture'];
    $picture = RImage::styleSrc($picture, User::getPicOptions());
    echo '<a href="' . RHtml::siteUrl('user/view/' . $friend->id) . '">' . RHtml::image($picture, $friend->name, array('width' => '58px', 'height' => '58px')) . '</a>';
    $name = $friend->name;
    if (mb_strlen($name) > 7) {
        $name = mb_substr($name, 0, 7) . "..";
    }
    echo RHtml::linkAction('user', $name, 'view', $friend->id, array('title' => $friend->name)) . "  ";
    echo '</div>';
}
//        if ($friNumber) {
//            echo '<div class="clearfix"></div>'.RHtml::linkAction('friend', 'Show all my '.$friNumber.' friends >>', 'myFriend', null, ['id' => 'list-all-friends']);
//        }
echo '</div>';
?>
    </div>
</div>
コード例 #8
0
    echo RHtml::image(RImage::styleSrc($group->picture ?: Group::$defaults['picture'], Group::getPicOptions()), $group->name);
    ?>
                        </a>
                    </div>
                    <div class="popular-group-title">
                        <a href="<?php 
    echo RHtml::siteUrl('group/detail/' . $group->id);
    ?>
">
                            <?php 
    echo $group->name;
    ?>
                        </a>
                    </div>
                    <div class="popular-group-cat">
                        <a href="<?php 
    echo RHtml::siteUrl('category/groups/' . $group->categoryId);
    ?>
">
                            <?php 
    echo $group->category->name;
    ?>
                        </a>
                    </div>
                </li>
                <?php 
}
?>
        </ul>
    </div>
</div>
コード例 #9
0
 public function actionMyFriend()
 {
     $this->layout = 'user';
     $user = Rays::user();
     $friends = new Friend();
     $curPage = $this->getPage("page");
     $pageSize = $this->getPageSize("pagesize", 36);
     list($friends, $count) = $friends->getFriends($user->id, $pageSize, [], ($curPage - 1) * $pageSize);
     $data['count'] = $count;
     $pager = new RPager('page', $count, $pageSize, RHtml::siteUrl('friend/myFriend'), $curPage);
     $data['friends'] = $friends;
     if ($count > $pageSize) {
         $data['pager'] = $pager->showPager();
     }
     $data['friNumber'] = $count;
     return $this->render('my_friend', $data);
 }
コード例 #10
0
ファイル: GroupController.php プロジェクト: a4501150/FDUGroup
 /**
  * Recommend groups to users
  * @access: administrator
  */
 public function actionRecommend()
 {
     if (Rays::isAjax()) {
         $action = Rays::getParam('action', null);
         if ($action) {
             $name = Rays::getParam('name', null);
             $query = Group::find();
             $queryUser = User::find();
             $like = array();
             if (isset($name) && $name != '') {
                 $names = explode(' ', $name);
                 foreach ($names as $val) {
                     $query = $query->like("name", $val);
                     $queryUser = $queryUser->like("name", $val);
                 }
             }
             switch ($action) {
                 case "search_groups":
                     $groups = $query->range(0, 20);
                     $results = array();
                     foreach ($groups as $item) {
                         $result['id'] = $item->id;
                         $result['name'] = $item->name;
                         $result['link'] = RHtml::siteUrl('group/detail/' . $item->id);
                         $result['picture'] = $item->picture;
                         $results[] = $result;
                     }
                     echo json_encode($results);
                     exit;
                     break;
                 case "search_users":
                     $users = $queryUser->range(0, 20);
                     $results = array();
                     foreach ($users as $item) {
                         $result['id'] = $item->id;
                         $result['name'] = $item->name;
                         $result['link'] = RHtml::siteUrl('user/view/' . $item->id);
                         $result['picture'] = $item->picture;
                         $results[] = $result;
                     }
                     echo json_encode($results);
                     exit;
                     break;
                 default:
             }
         }
     }
     if (Rays::isPost()) {
         if (isset($_POST['selected_recommend_groups']) && isset($_POST['selected_recommend_users'])) {
             $groups = $_POST['selected_recommend_groups'];
             $users = $_POST['selected_recommend_users'];
             $words = $_POST['recommend-words'];
             Group::recommendGroups($groups, $users, $words);
             $this->flash('message', 'Send group recommendations successfully.');
         }
     }
     $this->layout = 'admin';
     $data = array();
     $this->setHeaderTitle("Groups recommendation");
     $this->render('recommend', $data, false);
 }
コード例 #11
0
ファイル: main_nav.view.php プロジェクト: a4501150/FDUGroup
        echo '<li><a href="' . RHtml::siteUrl('message/view') . '">';
        echo 'Messages&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="badge">' . $countMessages . '</span></a></li>';
    }
    ?>
                                <li role="presentation" class="divider"></li>
                                <li><?php 
    echo RHtml::linkAction("user", "Logout", "logout", null);
    ?>
</li>
                            </ul>
                        </li>
                    <?php 
}
?>
                </ul>

                <form class="navbar-form navbar-right" role="search" method="post" action="<?php 
echo RHtml::siteUrl("group/find");
?>
">
                     <input type="text" id="searchstr" name="searchstr" value="<?php 
echo isset($_POST['searchstr']) ? $_POST['searchstr'] : "";
?>
" class="form-control" placeholder="Search groups">
                </form>

            </div><!-- /.nav-collapse -->
        </div><!-- /.container -->
    </div><!-- /.navbar -->
</div>
コード例 #12
0
ファイル: about.php プロジェクト: a4501150/FDUGroup
// @author: Raysmond
/**
 * Contact view file.
 * @author: songrenchu
 */
?>
<div class="panel panel-default">
    <div  id="developer" class="panel-heading">
        <h1 class="panel-title">FDUGroup is the right website</h1>
    </div>

    <div class="panel-body site-hook">
        <h4 style="margin-bottom: 15px;">Where you can set up or join groups and share things as you like.</h4>
        <?php 
for ($i = 1; $i <= 21; ++$i) {
    ?>
                <img src="<?php 
    echo RHtml::siteUrl('public/images') . '/laugh/laugh' . $i . '.jpg';
    ?>
" style="max-height:100px;min-height:100px;" title="">
                <?php 
}
?>
     <hr>
        "Surround yourself with good people. People who are going to be honest with you and look out for your best interests."
        <br/>
        --- Derek Jeter
        </p>
    </div>
</div>
コード例 #13
0
ファイル: UserController.php プロジェクト: a4501150/FDUGroup
 public function actionFind()
 {
     $this->layout = 'user';
     $page = $this->getPage("page");
     $pageSize = $this->getPageSize("pagesize", 24);
     $searchStr = '';
     if (Rays::isPost()) {
         $searchStr = $_POST['searchstr'];
     } else {
         if (isset($_GET['search'])) {
             $searchStr = $_GET['search'];
         }
     }
     $query = User::find();
     if ($name = trim($searchStr)) {
         $names = preg_split("/[\\s]+/", $name);
         foreach ($names as $key) {
             $query = $query->like("name", $key);
         }
     }
     $count = $query->count();
     $users = $query->range(($page - 1) * $pageSize, $pageSize);
     $url = RHtml::siteUrl('user/find' . ($searchStr != '') ? '?search=' . urlencode($searchStr) : "");
     $pager = new RPager('page', $count, $pageSize, $url, $page);
     $this->setHeaderTitle("Find User");
     $this->render("find", ['users' => $users, 'searchstr' => $searchStr, 'pager' => $pager->showPager()], false);
 }
コード例 #14
0
ファイル: edit.php プロジェクト: a4501150/FDUGroup
<div class="panel panel-default">

    <div class="panel-heading">
        <div class="heading-actions">
            <?php 
if ($type == 'edit') {
    echo RHtml::linkAction('post', 'Delete', 'delete', $topic->id . '?returnUrl=' . RHtml::siteUrl('user/myposts'), array('class' => 'btn btn-xs btn-danger', 'onclick' => 'return confirm("Are you sure to delete this topic? This operation cannot be undo!!!")'));
}
?>
        </div>
        <h1 class="panel-title">
            <?php 
echo $type == 'edit' ? $topic->title : "New post";
?>
        </h1>
    </div>

    <div class="panel-body">

        <?php 
if (isset($validation_errors)) {
    RHtml::showValidationErrors($validation_errors);
}
$newForm = array();
if (isset($newPostForm)) {
    $newForm = $newPostForm;
}
if ($type == "new") {
    $url = "post/new/{$groupId}";
    $title = RForm::setValue($newForm, 'title');
    $content = RHtml::decode(RForm::setValue($newForm, 'content'));
コード例 #15
0
ファイル: recommend.php プロジェクト: a4501150/FDUGroup
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="panel panel-default">
                    <div class="panel-heading"><b>Users</b></div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-10">
                                <?php 
echo RForm::input(array('id' => 'search_users', 'name' => 'search_users', 'class' => 'form-control', 'placeholder' => 'Search users'));
?>
                            </div>
                            <div class="col-lg-2">
                                <a href="javascript:search_users()" search_url="<?php 
echo RHtml::siteUrl('group/recommend');
?>
" class="btn btn-sm btn-info">Search</a>
                            </div>
                        </div>
                        <div class="row" style="padding: 10px;">
                            <b>Selected users</b>
                            <ul class="list-group" id="to-recommend-users">

                            </ul>
                        </div>
                        <div id="recommend-users" class="row" style="padding: 10px;"></div>
                    </div>
                </div>
            </div>
        </div>
コード例 #16
0
ファイル: admin.php プロジェクト: a4501150/FDUGroup
?>
">
                        Views <?php 
if (Rays::getParam("orderBy", null) == "views") {
    if (Rays::getParam("order", "asc") == "asc") {
        echo '<span class="glyphicon glyphicon-chevron-up"></span>';
    } else {
        echo '<span class="glyphicon glyphicon-chevron-down"></span>';
    }
}
?>
                    </a>
                </th>

                <th><a class="highlight" href="<?php 
echo RHtml::siteUrl("group/admin?orderBy=likes&&order=" . $order);
?>
">
                        Likes <?php 
if (Rays::getParam("orderBy", null) == "likes") {
    if (Rays::getParam("order", "asc") == "asc") {
        echo '<span class="glyphicon glyphicon-chevron-up"></span>';
    } else {
        echo '<span class="glyphicon glyphicon-chevron-down"></span>';
    }
}
?>
                    </a>
                </th>
            </tr>
            </thead>
コード例 #17
0
            </div>

            <div class="home-actions-item">
                <a href="<?php 
echo RHtml::siteUrl('user/find');
?>
" class="">
                    <?php 
echo RHtml::image('public/images/friend.png', '', array('width' => '48px'));
?>
                     Find friends</a>
            </div>

            <div class="home-actions-item">
                <a href="<?php 
echo RHtml::siteUrl('message/send');
?>
" class="">
                    <?php 
echo RHtml::image('public/images/message.png', '', array('width' => '48px'));
?>
                    New message</a>
            </div>

        </div>


<!--        --><?php 
//=RForm::openForm('post/new',array('class'=>'quick-publish-form'))
?>
        <?php 
コード例 #18
0
ファイル: my_groups.php プロジェクト: a4501150/FDUGroup
                var height = $("#load-more-groups").position().top;
                var curHeight = $(window).scrollTop() + $(window).height();
                if(!isLoading&&curHeight>=height && !nomore){
                    loadMoreGroups();
                }
            });
        });


        function loadMoreGroups(){
            isLoading = true;
            $('#loading-groups').show(0);
            //$('#load-more-groups').hide(0);
            $.ajax({
                url: "<?php 
    echo RHtml::siteUrl('group/mygroups');
    ?>
",
                type: "post",
                data:{page: ++curPage},
                success: function(data){
                    $('#loading-groups').hide(0);
                    //$('#load-more-groups').show(0);
                    if (data == 'nomore') {
                        nomore = true;
                        $('#loading-groups').hide(0);
                        //$('#load-more-groups').hide(0);
                        return;
                    }
                    var $blocks = jQuery(data).filter('div.item');
                    $("#waterfall-groups").append($blocks);
コード例 #19
0
ファイル: home.php プロジェクト: a4501150/FDUGroup
            if (!nomore) {
                var height = $("#get_more_post_btn").position().top;
                console.log(height);
                var curHeight = $(window).scrollTop() + $(window).height();
                if (!isLoading && curHeight >= height+100) {
                    loadMorePosts();
                }
            }
        });
    });

    function loadMorePosts() {
        isLoading = true;
        $("#get_more_post_btn").addClass('disabled');
        $("#get_more_post_btn").html('<img style="width:20px;height:20px;" src="<?php 
echo RHtml::siteUrl('/public/images/loading.gif');
?>
" /> loading...');
        $.ajax({
            type: "POST",
            url: $('#loadMorePostsForm').attr('action'),
            data: { 'lastLoadedTime': $('#last-loaded-time').val() }
        })
            .done(function (data) {
                data = eval('('+data+')');
                if(data.content==''){
                    $('#topics-list-footer').append('<span id="no_more_post" style="color:red;">No more posts..</span>.<br/><br/>');
                    $('#get_more_post_btn').remove();
                    nomore = true;
                }
                else{
コード例 #20
0
ファイル: find.php プロジェクト: a4501150/FDUGroup
                </div>
            </div>
            <?php 
echo RForm::endForm();
?>
        </div>
        <div class="user-list">
            <?php 
if (empty($users)) {
    echo '<div>&nbsp;&nbsp;No users found!</div>';
}
foreach ($users as $user) {
    echo '<div class="user-item col-lg-2">';
    $user->picture = $user->picture != '' ? $user->picture : User::$defaults['picture'];
    $picture = RImage::styleSrc($user->picture, User::getPicOptions());
    echo '<a href="' . RHtml::siteUrl('user/view/' . $user->id) . '">' . RHtml::image($picture, $user->name, array("width" => "64px", "height" => "64px")) . '</a>';
    echo '<br/>';
    $name = $user->name;
    if (mb_strlen($name) > 7) {
        $name = mb_substr($name, 0, 7) . "..";
    }
    echo RHtml::linkAction('user', $name, 'view', $user->id, array('title' => $user->name)) . "  ";
    echo '</div>';
}
?>
        </div>
        <div class="clearfix"></div>
        <div>
            <?php 
echo isset($pager) ? $pager : "";
?>
コード例 #21
0
/**
 * Group categories module view
 * @author: songrenchu
 */
?>
<div id="category-bar">
    <div id="category-parent-level-bar">
        <?php 
foreach ($categories as $category) {
    ?>
            <a class="btn btn-sx parent-category
            <?php 
    echo in_array($category->id, $cid) ? 'active' : '';
    ?>
" href="<?php 
    echo RHtml::siteUrl('category/groups/' . $category->id);
    ?>
">
                <?php 
    echo RHtml::image('files/images/category/' . $category->id . '.png', '', ['style' => 'width:24px;height:24px;']);
    ?>
&nbsp;
                <?php 
    echo $category->name;
    ?>
            </a>
            <?php 
}
?>
        <a class="btn btn-sx parent-category" href="javascript:packCategory();">
            <?php 
コード例 #22
0
ファイル: _groups_list.php プロジェクト: a4501150/FDUGroup
                        <a href="javascript: joinGroup('<?php 
            echo $url;
            ?>
','<?php 
            echo $group->id;
            ?>
')" title="Join the group"><span class="glyphicon glyphicon-plus"></span></a>
                    </div>
                <?php 
        }
    }
    if (isset($exitGroup)) {
        ?>
                <div class="action action-right">
                    <a title="Exit this group" href="<?php 
        echo RHtml::siteUrl("group/exit/" . $group->id);
        ?>
"
                       onclick='javascript:return confirm("Do you really want to exit this group?")'><span
                            class="glyphicon glyphicon-remove"></span></a>
                </div>
            <?php 
    }
    ?>
        </div>
    </div>
<?php 
}
?>

<script>
コード例 #23
0
<div id="category-bar" class="row posts-category-wrapper">

    <ul class="posts-category">
        <?php 
foreach ($categories as $category) {
    ?>
            <li>
                <a class="btn btn-sx parent-category <?php 
    echo $category->id == $id ? "active" : "";
    ?>
" href="<?php 
    echo RHtml::siteUrl('post/find/' . $category->id);
    ?>
">
                    <?php 
    echo RHtml::image('files/images/category/' . $category->id . '.png', '', ['style' => 'width:24px;height:24px;']);
    ?>
                    &nbsp;
                    <?php 
    echo $category->name;
    ?>
                </a>
            </li>
        <?php 
}
?>
    </ul>

</div>
コード例 #24
0
ファイル: find.php プロジェクト: a4501150/FDUGroup
                        var height = $("#load-more-groups").position().top;
                        var curHeight = $(window).scrollTop() + $(window).height();
                        if (!isLoading && curHeight >= height && !nomore) {
                            loadMoreGroups();
                        }
                    });
                });


                function loadMoreGroups() {
                    isLoading = true;
                    $('#loading-groups').show(0);
                    //$('#load-more-groups').hide(0);
                    $.ajax({
                        url: "<?php 
    echo RHtml::siteUrl('group/find');
    ?>
",
                        type: "post",
                        data: {page: ++curPage, searchstr: $("#searchstr").val()},
                        success: function (data) {
                            $('#loading-groups').hide(0);
                            //$('#load-more-groups').show(0);
                            if (data == 'nomore') {
                                nomore = true;
                                $('#loading-groups').hide(0);
                                //$('#load-more-groups').hide(0);
                                return;
                            }
                            var $blocks = jQuery(data).filter('div.item');
                            $("#waterfall-groups").append($blocks);
コード例 #25
0
 /**
  * View messages
  * @access authenticated user
  * @param string $msgType
  */
 public function actionView($msgType = 'unread')
 {
     $this->setHeaderTitle("My Messages");
     $userId = Rays::user()->id;
     $curPage = $this->getPage('page');
     $pageSize = $this->getPageSize("pagesize", 5);
     /* TODO: Maybe move these model-related things into Message model directly */
     $query = Message::find("receiverId", $userId);
     switch ($msgType) {
         case "all":
             $query = $query->where("[status] != ? ", array(Message::STATUS_TRASH));
             break;
         case "read":
             $query = $query->find("status", Message::STATUS_READ);
             break;
         case "unread":
             $query = $query->find("status", Message::STATUS_UNREAD);
             break;
         case "trash":
             $query = $query->find("status", Message::STATUS_TRASH);
             break;
         default:
             $this->page404();
             return;
     }
     $count = $query->count();
     $messages = $query->join('type')->order_desc("id")->range(($curPage - 1) * $pageSize, $pageSize);
     $data = array('msgs' => $messages, 'type' => $msgType, 'count' => $count);
     if ($count > $pageSize) {
         $url = RHtml::siteUrl('message/view/' . $msgType);
         $pager = new RPager('page', $count, $pageSize, $url, $curPage);
         $data['pager'] = $pager->showPager();
     }
     $this->render('view', $data, false);
 }
コード例 #26
0
ファイル: contact.php プロジェクト: a4501150/FDUGroup
            <a title="admin" href="http://www.renren.com/284019636/profile" target="_blank">Junhao Wu</a>
        </div>
        <div class="user-item  col-lg-3"></div>


        <div class="clearfix"></div>
        <br/>
        <h4 id="follow">Mail us</h4>
        <p>
            School of Computer Science, Fudan University<br/>
            825 Zhangheng Road, Pudong District, Shanghai, China (201203)<br/>
        </p><br/>
        <h4>Follow us on Github </h4>
        <p>
            <?php 
echo RHtml::link("FDUGroup github page", $githubLink, $githubLink);
?>
        </p>
        <div class="user-item" style="overflow: hidden;text-align:left;">
            <a href="<?php 
echo $githubLink;
?>
" target="_blank">
                <img src="<?php 
echo RHtml::siteUrl('public/images') . '/QuickMark.png';
?>
" title="Scan This!" />
            </a>
        </div>
    </div>
</div>
コード例 #27
0
    ?>
            <a href="<?php 
    echo RHtml::siteUrl('message/view');
    ?>
"><span class="glyphicon glyphicon-envelope"></span> &nbsp; Messages</a>
            <?php 
    echo "</li>";
} else {
    echo '<li ' . ($isMessageUrl ? 'class="active"' : "") . '><a href="' . RHtml::siteUrl('message/view') . '">';
    echo '<span class="glyphicon glyphicon-envelope"></span> &nbsp; ';
    echo 'Messages <span class="badge">' . $count . '</span></a></li>';
}
if ($user->roleId == Role::VIP_ID) {
    ?>
            <li <?php 
    echo Rays::app()->request()->urlMatch(array('ads/view', 'ads/view/*'), $currentUrl) ? 'class="active"' : "";
    ?>
>
                <a href="<?php 
    echo RHtml::siteUrl('ads/view');
    ?>
">
                    <span class="glyphicon glyphicon-euro"></span> &nbsp;
                    Advertisement <span class="badge badge-vip">VIP</span>
                </a>
            </li>
        <?php 
}
?>
    </ul>
</div>
コード例 #28
0
ファイル: _posts_list.php プロジェクト: a4501150/FDUGroup
                    </div>
                </div>

                <div class="footer">
                    <?php 
        //                    $now = new DateTime();
        //                    $time = new DateTime($topic['top_created_time']);
        //                    $interval = $now->diff($time);
        ?>
                    <?php 
        echo $topic->createdTime;
        ?>

                    <div class="actions">
                        <a href="<?php 
        echo RHtml::siteUrl('post/view/' . $topic->id) . '#reply';
        ?>
">
                            <span class="glyphicon glyphicon-comment"></span> <?php 
        echo $topic->commentCount;
        ?>
                        </a>
                        <?php 
        if (isset($enabledDelete) && $enabledDelete) {
            if ($currentUserId !== 0 && $topic->user->id == $currentUserId) {
                echo '&nbsp;';
                echo RHtml::linkAction('post', 'Delete', 'delete', $topic->id, array('class' => 'btn btn-xs btn-danger'));
            }
        }
        echo '&nbsp;';
        $self->module("rating_plus", array('id' => 'rating_plus', 'entityType' => Topic::ENTITY_TYPE, 'entityId' => $topic->id, 'count' => $topic->rating->value));
コード例 #29
0
ファイル: view.php プロジェクト: a4501150/FDUGroup
                                        var height = $("#load-more-groups").position().top;
                                        var curHeight = $(window).scrollTop() + $(window).height();
                                        if(!isLoading&&curHeight>=height && !nomore){
                                            loadMoreGroups();
                                        }
                                    });
                                });


                                function loadMoreGroups(){
                                    isLoading = true;
                                    $('#loading-groups').show(0);
                                    //$('#load-more-groups').hide(0);
                                    $.ajax({
                                        url: "<?php 
                echo RHtml::siteUrl('user/view/' . $user->id);
                ?>
",
                                        type: "post",
                                        data:{page: ++curPage},
                                        success: function(data){
                                            $('#loading-groups').hide(0);
                                            //$('#load-more-groups').show(0);
                                            if (data == 'nomore') {
                                                nomore = true;
                                                $('#loading-groups').hide(0);
                                                //$('#load-more-groups').hide(0);
                                                return;
                                            }
                                            var $blocks = jQuery(data).filter('div.item');
                                            $("#waterfall-groups").append($blocks);
コード例 #30
0
ファイル: admin.php プロジェクト: a4501150/FDUGroup
?>
">
                            Views <?php 
if (Rays::getParam("orderBy", null) == "views") {
    if (Rays::getParam("order", "asc") == "asc") {
        echo '<span class="glyphicon glyphicon-chevron-up"></span>';
    } else {
        echo '<span class="glyphicon glyphicon-chevron-down"></span>';
    }
}
?>
                        </a>
                    </th>

                    <th><a class="highlight" href="<?php 
echo RHtml::siteUrl("post/admin?orderBy=likes&&order=" . $order);
?>
">
                            Likes <?php 
if (Rays::getParam("orderBy", null) == "likes") {
    if (Rays::getParam("order", "asc") == "asc") {
        echo '<span class="glyphicon glyphicon-chevron-up"></span>';
    } else {
        echo '<span class="glyphicon glyphicon-chevron-down"></span>';
    }
}
?>
                        </a>
                    </th>
                </tr>
                </thead>