コード例 #1
0
ファイル: user_ui.php プロジェクト: a4501150/FDUGroup
        <div class="footer-links col-lg-7">
            <ul>
                <li><?php 
echo RHtml::linkAction('site', 'About us', 'about');
?>
</li>
                <li><?php 
echo RHtml::linkAction('site', 'Contact', 'contact');
?>
</li>
                <li><?php 
echo RHtml::linkAction('site', 'Help', 'help');
?>
</li>
            </ul>
        </div>
    </div>
    <div class="site-background">
        <?php 
echo RHtml::image('/public/images/background-' . rand(1, 4) . '.jpg', '', ['style' => 'width: 100%; height: auto; top: -312.5px;']);
?>
    </div>
</div><!--/.container-->

<!-- Placed at the end of the document so the pages load faster -->
<?php 
// link custom script files
echo RHtml::linkScriptArray(Rays::app()->client()->script);
?>
</body>
</html>
コード例 #2
0
ファイル: _comment_list.php プロジェクト: a4501150/FDUGroup
        <div id="comment-item-<?php 
    echo $commentItem['root']->id;
    ?>
" class="row comment-item">

            <!-- user picture -->
            <div class="col-lg-2 user-picture">
                <?php 
    $picture = $commentItem['root']->user->picture;
    if (!isset($picture) || $picture == '') {
        $picture = User::$defaults['picture'];
    }
    $src = RImage::styleSrc($picture, User::getPicOptions());
    ?>
                <?php 
    echo RHtml::image($src, $commentItem['root']->user->name, array('width' => '64px;'));
    ?>
            </div>

            <!-- comment content -->
            <div class="col-lg-10 comment-content">

                <div class="comment-meta">
                    <?php 
    echo RHtml::linkAction('user', $commentItem['root']->user->name, 'view', $commentItem['root']->user->id);
    ?>
                    &nbsp;&nbsp;
                    <?php 
    echo $commentItem['root']->createdTime;
    ?>
                </div>
コード例 #3
0
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 
//        Rays::app()->getController()->module('ckeditor',
//            array('editorId'=>'post-content',
//                'name'=>'content',
//                'data'=>"",
コード例 #4
0
ファイル: invite.php プロジェクト: a4501150/FDUGroup
    <div class="panel-body">
        <?php 
echo RForm::openForm('group/invite/' . $group->id, array('id' => 'invite-group-form', 'class' => 'form-signin build-group-form'));
?>
        <div><br/><b>Select friends to invite:</b></div>
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="checkbox friends-list">
                    <?php 
foreach ($friends as $friend) {
    echo '<div class="col-lg-2 friend-item" style="height: 90px;">';
    if (!isset($friend->user->picture) || $friend->user->picture == '') {
        $friend->user->picture = User::$defaults['picture'];
    }
    $picture = RImage::styleSrc($friend->user->picture, User::getPicOptions());
    echo RHtml::image($picture, $friend->user->name, array('width' => '64px'));
    echo '<br/>';
    echo RForm::input(array('type' => 'checkbox', 'name' => 'select_friends[]', 'value' => $friend->user->id, 'class' => 'btn btn-default'));
    echo RHtml::linkAction('user', $friend->user->name, 'view', $friend->user->id);
    echo '</div>';
}
?>
                </div>
            </div>
        </div>

        <hr>

        <div><b>Write something as an invitation (optional)</b></div>

        <?php 
コード例 #5
0
ファイル: Group.php プロジェクト: a4501150/FDUGroup
 /**
  * Recommend all selected groups to every selected users
  * @param $groups
  * @param $users
  */
 public static function recommendGroups($groups, $users, $words = '')
 {
     foreach ($users as $userId) {
         $html = '<div class="row recommend-groups">';
         $count = 0;
         if (!empty($groups)) {
             foreach ($groups as $groupId) {
                 if ($count % 4 == 0) {
                     if ($count > 0) {
                         $html .= '</div><div class="clearfix" style="margin-top: 15px;"></div>';
                     }
                     $html .= '<div class="row">';
                 }
                 $group = Group::get($groupId);
                 if (null != $group) {
                     $censor = new Censor();
                     $censor = $censor->joinGroupApplication($userId, $group->id);
                     $html .= '<div class="col-lg-3 recommend-group-item" style="padding: 5px;overflow: hidden;">';
                     $picture = isset($group->picture) && $group->picture != '' ? $group->picture : Group::$defaults['picture'];
                     $src = RImage::styleSrc($picture, Group::getPicOptions());
                     $html .= RHtml::image($src, $group->name);
                     $html .= '<br/>' . RHtml::linkAction('group', $group->name, 'detail', $group->id);
                     $html .= '<br/>' . RHtml::linkAction('group', 'Accept', 'accept', $censor->id, array('class' => 'btn btn-xs btn-success'));
                     $html .= '</div>';
                     $count++;
                 }
             }
             $html .= '</div>';
         }
         $html .= '</div>';
         $html .= '<div class="recommend-content">' . RHtml::encode($words) . '</div>';
         Message::sendMessage('system', 0, $userId, 'Groups recommendation', $html, date('Y-m-d H:i:s'));
     }
 }
コード例 #6
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>
コード例 #7
0
ファイル: help.php プロジェクト: a4501150/FDUGroup
echo RHtml::image("files/images/site/17.png", "", array('style' => "width: 100%;"));
?>
        单击右上角的edit(褐色标记部分),即可修改个人信息,上传照片等。你也可以申请成为VIP用户,成为VIP后,您将享受更多特权和优惠。

        </div>

        <div class="row" id="advertisement">
        <h2>Advertisement</h2>
        该条目将指引您在本网站上发布广告。
        注意!只有VIP用户才有资格申请发布广告。关于如何成为VIP用户,详见profile指引。
            <?php 
echo RHtml::image("files/images/site/18.png", "", array('style' => "width: 100%;"));
?>
        如上图所示,单击个人主页的“advertisement”条目,界面如上图所示。在这里,您可以发布诸如征友、销售、教育等广告信息,通过publish按钮提交,待管理员审核通过后,即可在屏幕右下方看到您的广告,如下图所示:
            <?php 
echo RHtml::image("files/images/site/19.png", "", array('style' => "width: 100%;"));
?>
        我们引入虚拟营收机制。用户发布的广告每被点击一次,用户获得1 Group Coin。用户账户中的Group Coins可以支付广告投放费用。广告的展示顺序与用户支付的Group Coin数量和投放时间有关,采用公式 支付金额 + 发布时间的Unix纪元/10000 计算。
        通过审核的广告将在所有用户的个人中心右下角展示。未通过审核的广告所支付费用不退回。请阅读本网站About Publish部分以便广告通过审核。

        </div>

        <div class="row" id="about-publish">
        <h2>About Publish</h2>
        依据相关法律规定,网站禁止传播以下内容:
        (一)反对宪法所确定的基本原则的;
        (二)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;
        (三)损害国家荣誉和利益的;
        (四)煽动民族仇恨、民族歧视,破坏民族团结的;
        (五)破坏国家宗教政策,宣扬邪教和封建迷信的;
        (六)散布谣言,扰乱社会秩序,破坏社会稳定的;
コード例 #8
0
ファイル: profile.php プロジェクト: a4501150/FDUGroup
            break;
        case "weibo":
            echo "Webo: " . RHtml::link($user->name, $user->weibo, $user->weibo) . "<br/>";
            break;
        case "homepage":
            echo "Homepage: " . RHtml::link($user->name, $user->homepage, $user->homepage) . "<br/>";
            break;
        default:
            echo ucfirst($objCol) . ": " . $user->{$objCol} . "<br/>";
            break;
    }
    echo '</li>';
}
$wallet = $user->getWallet();
echo '<li class="list-group-item">Wallet: ' . $wallet->money . ' ' . Wallet::COIN_NAME . '</li>';
?>
            </ul>
        </div>

        <div class="col-lg-4">
            <div style="margin-top: 30px;">
                <?php 
$pic = isset($user->picture) && $user->picture != '' ? $user->picture : "public/images/default_pic.png";
$thumbnail = RImage::styleSrc($user->picture, $user::getPicOptions());
echo RHtml::image($thumbnail, $user->name, array('class' => 'img-thumbnail', 'width' => '200px'));
?>
            </div>
        </div>
    </div>
</div>
コード例 #9
0
ファイル: main_nav.view.php プロジェクト: a4501150/FDUGroup
    echo "<li>" . RHtml::linkAction("user", "Login", "login", null) . "</li>";
    echo "<li>" . RHtml::linkAction("user", "Register", "register", null) . "</li>";
} else {
    $countMessages = Rays::user()->countUnreadMsgs();
    if ($isAdmin) {
        echo '<li>' . RHtml::linkAction('admin', 'Admin', null, null, array('style' => 'font-weight: bold;')) . "</li>";
    }
    ?>
                        <li class="dropdown">
                            <a href="#" id="account-dropdown" class="dropdown-toggle" data-toggle="dropdown" >
                                <?php 
    $pic = isset($user->picture) && $user->picture != '' ? $user->picture : "public/images/default_pic.png";
    $pic = RImage::styleSrc($pic, User::getPicOptions());
    ?>
                                <?php 
    echo RHtml::image($pic, $user->name, array('class' => 'img-thumbnails'));
    ?>
                                <span class="username"><?php 
    echo $user->name;
    ?>
</span>
                                <?php 
    if ($countMessages != 0) {
        ?>
                                <span class="badge"><?php 
        echo $countMessages;
        ?>
</span>
                                <?php 
    }
    ?>
コード例 #10
0
ファイル: detail.php プロジェクト: a4501150/FDUGroup
    echo RHtml::linkAction('group', 'Quit', 'exit', $group->id, array('class' => 'btn btn-xs btn-danger', 'onclick' => 'return confirm(\'Are you sure to quit the group? This operation cannot be undone!\')'));
}
?>
        </div>
        <h1 class="panel-title"><?php 
echo $group->name;
?>
</h1>
    </div>
    <div class="panel-body">
        <div class="row">
            <?php 
if (isset($group->picture) && $group->picture != '') {
    echo '<div class="col-xs-3 group-picture">';
    $picture = RImage::styleSrc($group->picture, Group::getPicOptions());
    echo RHtml::image($picture, $group->name, array('class' => 'img-thumbnail', 'style' => 'width:200px;'));
    echo '</div>';
}
?>

            <div class="group-content col-xs-9">
                <div class="group-meta">
                    <span
                        class="glyphicon glyphicon-tag"></span> <?php 
echo RHtml::linkAction('category', $group->category->name, 'groups', $group->category->id);
?>
                    &nbsp;
                    <span class="glyphicon glyphicon-user"></span> <?php 
echo $group->memberCount;
?>
                    &nbsp;
コード例 #11
0
ファイル: follow_us.view.php プロジェクト: a4501150/FDUGroup
<div class="panel panel-default">
    <div class="panel-heading">
        Follow us
    </div>
    <div class="panel-body" style="line-height: 300%;">
        <?php 
echo RHtml::image('public/images/favicon.ico', 'FDUGroup', array('width' => '29px', 'style' => 'border-radius: 20px;margin-left: 2px;margin-right:1px;'));
?>
        &nbsp;&nbsp;<b><?php 
echo RHtml::linkAction('site', 'About us', 'about');
?>
</b>
        <br />

        <?php 
echo RHtml::image('public/images/info.png', 'FDUGroup', array('width' => '32px'));
?>
        &nbsp;&nbsp;<b><?php 
echo RHtml::linkAction('site', 'Contact us', 'contact');
?>
</b>
        <br />

        <?php 
echo RHtml::image("public/images/github.png", "FDUGroup", array('width' => '32px'));
?>
        &nbsp;<b><a href="https://github.com/Raysmond/FDUGroup"> Follow us on Github</a></b>
        <br />

    </div>
</div>
コード例 #12
0
ファイル: user_panel.view.php プロジェクト: a4501150/FDUGroup
if ($user != null) {
    ?>
        <div class="row user-profile-tiny">
            <div class="user-picture col-lg-2">
                <?php 
    if (!isset($user->picture) || $user->picture == '') {
        $user->picture = User::$defaults['picture'];
    }
    $thumbnail = RImage::styleSrc($user->picture, $user::getPicOptions());
    ?>
                <a href="<?php 
    echo RHtml::siteUrl('user/view/' . $user->id);
    ?>
">
                    <?php 
    echo RHtml::image($thumbnail, $user->name, array('class' => 'img-thumbnail', 'width' => isset($viewUser) ? '80px' : '120px'));
    ?>
                </a>
            </div>

            <div class="user-profile col-lg-7">
                <h2>
                    <?php 
    echo RHtml::linkAction('user', $user->name, 'view', $user->id, ['style' => 'float:left;']);
    ?>
&nbsp;
                    <div class="badge-user-panel"><span class="badge badge-<?php 
    echo Role::getRoleNameById($user->roleId);
    ?>
"><?php 
    echo Role::getBadgeById($user->roleId);
コード例 #13
0
ファイル: myposts.php プロジェクト: a4501150/FDUGroup
if (!empty($posts)) {
    ?>
<div class="posts-list">
    <div id="latest-topics-list">
        <?php 
    $user = Rays::user();
    if ($user->picture == '') {
        $user->picture = User::$defaults['picture'];
    }
    foreach ($posts as $post) {
        ?>
            <div class="row topic-item">
                <div class="col-lg-2 topic-picture">
                    <?php 
        echo RHtml::image(RImage::styleSrc($user->picture, User::getPicOptions()), $user->name, array('width' => '64px'));
        ?>
                </div>
                <div class="col-lg-10 topic-content">
                    <span class="arrow"></span>
                    <div class="inner">
                        <div class="topic-title">
                            <?php 
        echo RHtml::linkAction('post', $post->title, 'view', $post->id);
        ?>
                        </div>
                        <div class="topic-meta">
                            <?php 
        echo RHtml::linkAction('view', $user->name, 'view', $user->id);
        ?>
                            <?php 
コード例 #14
0
ファイル: members.php プロジェクト: a4501150/FDUGroup
?>
            <b>Members (<?php 
echo count($members);
?>
)</b>
        </div>

        <div class="members-list panel-body">
            <?php 
foreach ($members as $member) {
    ?>
                <div class="members-item" style="float:left;padding: 5px; height: 100px; width: 100px;">
                    <?php 
    $picture = $member->picture ? $member->picture : User::$defaults['picture'];
    echo '<a href="' . RHtml::siteUrl('user/view/' . $member->id) . '">';
    echo RHtml::image(RImage::styleSrc($picture, User::getPicOptions()), $member->name, array('width' => '64px', 'height' => '64px'));
    echo '</a><br/>';
    if ($isManager && $member->id != $manager->id) {
        echo RForm::input(array('type' => 'checkbox', 'value' => $member->id, 'name' => 'selected_members[]'));
        echo '&nbsp;';
    }
    $name = $member->name;
    if (mb_strlen($name) > 7) {
        $name = mb_substr($name, 0, 8) . "..";
    }
    echo RHtml::linkAction('user', $name, 'view', $member->id, array('title' => $member->name));
    ?>
                </div>
            <?php 
}
?>
コード例 #15
0
ファイル: active.php プロジェクト: a4501150/FDUGroup
?>
    <br/><br/>
</div>
<div id="active-topics-list">
    <?php 
foreach ($topics as $topic) {
    ?>
        <div class="row topic-item">
            <div class="col-lg-1 topic-picture">
                <?php 
    if ($topic->user->picture == '') {
        $topic->user->picture = User::$defaults['user_picture'];
    }
    ?>
                <?php 
    echo RHtml::image($topic->user->picture, $topic->user->name, array('width' => '64px'));
    ?>

            </div>
            <div class="col-lg-11 topic-content">
                <div><?php 
    echo RHtml::linkAction('post', $topic->title, 'view', $topic->id);
    ?>
</div>
                <div class="topic-meta">
                    <?php 
    echo RHtml::linkAction('user', $topic->user->name, 'view', $topic->user->id);
    ?>
                    post in <?php 
    echo RHtml::linkAction('group', $topic->group->name, 'detail', $topic->group->id);
    ?>
コード例 #16
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 : "";
?>
コード例 #17
0
            <p>No groups</p>
        <?php 
}
?>
        <ul>
        <?php 
foreach ($groups as $group) {
    ?>
                <li>
                    <div class="popular-group-picture">
                        <a href="<?php 
    echo RHtml::siteUrl('group/detail/' . $group->id);
    ?>
">
                            <?php 
    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 
コード例 #18
0
ファイル: _groups_list.php プロジェクト: a4501150/FDUGroup
            <?php 
    echo RHtml::linkAction('group', $group->name, 'detail', $group->id);
    ?>
        </div>

        <!-- Group picture -->
        <?php 
    if ($group->picture) {
        ?>
            <div class="group-picture">
                <a href="<?php 
        echo RHtml::siteUrl('group/detail/' . $group->id);
        ?>
">
                    <?php 
        echo RHtml::image(RImage::styleSrc($group->picture, Group::getPicOptions()), $group->name);
        ?>
                </a>
            </div>
        <?php 
    }
    ?>

        <!-- Group intro -->
        <div class="item-body">
            <?php 
    $group->intro = strip_tags(RHtml::decode($group->intro));
    if (mb_strlen($group->intro) > 100) {
        echo '<p>' . preg_replace('/&.{0,5}\\.\\.\\.$/', '...', mb_substr($group->intro, 0, rand(60, 150), 'UTF-8') . '...') . '</p>';
    } else {
        echo '<p>' . $group->intro . '</p>';
コード例 #19
0
    ?>
">
                <?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 
echo RHtml::image('files/images/category/more.png', '', ['style' => 'width:24px;height:24px;']);
?>
&nbsp;
            更多...
        </a>
        <script>
            function packCategory() {
                $('#category-children-level-bar').slideToggle();
            }
        </script>
    </div>
    <div id="category-children-level-bar" style="display:none;">
        <?php 
foreach ($categories as $category) {
    $subCategory = $category->children();
    ?>
コード例 #20
0
ファイル: _posts_list.php プロジェクト: a4501150/FDUGroup
            <div class="col-lg-2 topic-picture">
                <?php 
        if ($topic->user->picture == '') {
            $topic->user->picture = User::$defaults['picture'];
        }
        $thumbnail = RImage::styleSrc($topic->user->picture, User::getPicOptions());
        ?>
                <a href="<?php 
        echo RHtml::siteUrl("user/view/" . $topic->user->id);
        ?>
" title="<?php 
        echo $topic->user->name;
        ?>
">
                    <?php 
        echo RHtml::image($thumbnail, $topic->user->name, array('width' => '64px'));
        ?>
                </a>

            </div>


            <div class="col-lg-10 topic-content">
                <span class="arrow"></span>
                <div class="inner">
                    <div class="topic-title"><?php 
        echo RHtml::linkAction('post', $topic->title, 'view', $topic->id);
        ?>
</div>

                    <!-- Topic meta info -->
コード例 #21
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>
コード例 #22
0
ファイル: admin.php プロジェクト: a4501150/FDUGroup
            <tbody>
            <?php 
// That's bad to load user names and category names for each group
// Need to be fixed. It's better to add "join" support in the database models
foreach ($groups as $group) {
    echo '<tr>';
    echo '<td><input name="checked_groups[]" type="checkbox" value="' . $group->id . '" /></td>';
    echo "<td>{$group->id}</td>";
    echo '<td>' . RHtml::linkAction('user', $group->groupCreator->name, 'view', $group->groupCreator->id) . '</td>';
    echo '<td>' . RHtml::linkAction('category', $group->category->name, 'groups', $group->category->id) . '</td>';
    echo '<td>' . RHtml::linkAction('group', $group->name, 'detail', $group->id) . '</td>';
    echo "<td>{$group->memberCount}</td>";
    echo "<td>{$group->createdTime}</td>";
    if (isset($group->picture) && $group->picture != '') {
        $picture = RImage::styleSrc($group->picture, Group::getPicOptions());
        echo '<td>' . RHtml::image($picture, $group->name, array("style" => 'width:64px;')) . '</td>';
    } else {
        echo '<td></td>';
    }
    echo $group->counter->totalCount != null ? "<td>" . $group->counter->totalCount . "</td>" : '<td>0</td>';
    echo $group->rating->value != null ? "<td>" . $group->rating->value . "</td>" : '<td>0</td>';
    echo '</tr>';
}
?>
            </tbody>
        </table>

        <?php 
echo isset($pager) ? $pager : '';
?>
    </div>
コード例 #23
0
ファイル: edit.php プロジェクト: a4501150/FDUGroup
        <?php 
echo RForm::label("Region", 'region');
echo RForm::input(array('id' => 'region', 'name' => 'region', 'class' => 'form-control', 'value' => $user->region, 'placeholder' => "region"));
echo RForm::label("Mobile", 'mobile');
echo RForm::input(array('id' => 'mobile', 'name' => 'mobile', 'class' => 'form-control', 'value' => $user->mobile, 'placeholder' => "Mobile"));
echo RForm::label("QQ", 'qq');
echo RForm::input(array('id' => 'qq', 'name' => 'qq', 'class' => 'form-control', 'value' => $user->qq, 'placeholder' => "QQ"));
echo RForm::label("Weibo", 'weibo');
echo RForm::input(array('id' => 'weibo', 'name' => 'weibo', 'class' => 'form-control', 'value' => $user->weibo, 'placeholder' => "Weibo"));
echo RForm::label("Homepage", 'homepage');
echo RForm::input(array('id' => 'homepage', 'name' => 'homepage', 'class' => 'form-control', 'value' => $user->homepage, 'placeholder' => "Homepage"));
echo RForm::label("Introduction", 'intro');
echo RForm::input(array('id' => 'intro', 'name' => 'intro', 'class' => 'form-control', 'value' => $user->intro, 'placeholder' => "your introduction"));
echo RForm::label("Picture");
echo '<br/>';
if ($user->picture) {
    $picture = RImage::styleSrc($user->picture, User::getPicOptions());
    echo RHtml::image($picture, $user->name, array("width" => '120px', 'class' => 'img-thumbnail'));
}
echo '<br/><br/>';
echo RForm::input(array('type' => 'file', 'name' => 'user_picture', 'accept' => 'image/gif, image/jpeg,image/png'));
echo "<br/>";
echo RForm::input(array('type' => 'submit', 'value' => 'Complete', 'class' => "btn btn-lg btn-primary"));
echo RForm::endForm();
?>
    </div>
</div>


コード例 #24
0
ファイル: edit.php プロジェクト: a4501150/FDUGroup
$cats = array();
$count = 0;
foreach ($categories as $cat) {
    if ($cat->id == $catId) {
        $index = $count;
    }
    $count++;
    array_push($cats, array('value' => $cat->id, 'text' => $cat->name));
}
echo RForm::select('category', $cats, array($cats[$index]['value']), array('class' => 'form-control'));
echo "<br/>";
echo RForm::label('Group Introduction', 'intro', array());
echo '<br/>';
//echo RForm::textarea(array('class'=>'ckeditor','name'=>'intro','cols'=>'100','rows'=>'15'),
//    isset($group)?RHtml::decode($group->intro):RHtml::decode($form));
$formIntro = isset($form['intro']) ? $form['intro'] : '';
$self->module('ckeditor', array('editorId' => 'intro', 'name' => 'intro', 'data' => isset($group) ? $group->intro : $formIntro));
echo '<br/>';
if (isset($group)) {
    $picture = $group->picture ? $group->picture : Group::$defaults['picture'];
    echo RHtml::image(RImage::styleSrc($picture, Group::getPicOptions()), $group->name, array('class' => 'img-thumbnail', 'width' => '120px'));
}
echo '<br/>';
echo RForm::label('New group picture', 'group_picture');
echo RForm::input(array('type' => 'file', 'name' => 'group_picture', 'accept' => 'image/gif, image/jpeg,image/png'));
echo '<br/>';
echo RForm::input(array('class' => 'btn btn-lg btn-primary', 'type' => 'submit', 'value' => 'Save'));
echo RForm::endForm();
?>
    </div>
</div>