echo 'Ads application'; } ?> </h1> </div> <?php $form = isset($applyForm) ? $applyForm : array(); if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } ?> <div class="panel-body"> <?php echo RForm::openForm('ads/' . (isset($edit) ? 'edit/' . $ad->id . '/' . $type : 'apply'), array('id' => 'applyAdsForm')); ?> <?php echo RForm::label('Ads title', 'ads-title'); ?> <?php echo RForm::input(array('id' => 'ads-title', 'name' => 'ads-title', 'class' => 'form-control', 'placeholder' => 'Ads title'), isset($form['ads-title']) ? $form : (isset($edit) ? $ad->title : $form)); ?> <br/> <?php echo RForm::label('Ads content', 'ads-content'); ?> <?php $self->module('ckeditor', array('editorId' => 'ads-content', 'name' => 'ads-content', 'data' => isset($form['ads-content']) ? $form['ads-content'] : (isset($edit) ? $ad->content : '')));
</div> <hr/> <div id="comments"> <h2 class="s-title">Comments</h2> <?php $self->renderPartial("_comment_list", array('commentTree' => $commentTree), false); ?> <hr/> <div id="reply"> <?php echo RForm::openForm("post/comment/{$topic->id}", array('id' => 'viewFrom')); ?> <?php echo RForm::textarea(array('name' => 'content', 'class' => 'form-control', 'rows' => '5', 'placeholder' => 'Comment content'), isset($parent) ? '@' . $parent->user->name . ' ' : ''); ?> <?php if (isset($parent)) { echo RForm::hidden('replyTo', (int) $parent->pid === 0 ? $parent->id : $parent->pid); echo RForm::hidden('exactReplyTo', $parent->id); } ?> <br/> <?php echo RForm::input(array('class' => 'btn btn-sm btn-primary', 'type' => 'submit', 'value' => 'Comment')); ?> <?php
<?php /** * Created by JetBrains PhpStorm. * User: Raysmond */ echo RForm::openForm('group/admin', array('id' => 'groupAdminForm')); ?> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="heading-actions"> <div class="input-group" style="margin-top: -6px;"> <?php echo RForm::input(array('name' => 'search', 'class' => 'form-control', 'style' => 'width:200px;', 'placeholder' => 'filter groups', 'value' => isset($filterStr) ? $filterStr : "")); ?> <div style="float: right; margin-left: -1px;"> <button class="btn btn-default" type="submit">Go!</button> <input type="submit" onclick="return confirm('Are you sure to delete selected groups?')" value="Delete" class="btn btn-xs btn-danger" /> </div> </div> </div> <h1 class="panel-title">Groups</h1> </div> <div class="panel-body"> <!-- Table --> <table id="admin-users" class="table"> <thead> <tr>
<br/> Topics: <?php echo $topicCount; ?> </div> <?php $isManager = false; if (Rays::isLogin() && Rays::user()->id == $manager->id) { $isManager = true; } ?> <?php if ($isManager) { echo RForm::openForm('group/members/' . $group->id, array('id' => 'removeMembersForm')); } ?> <div class="clearfix"></div> <hr> <div class="group-members panel panel-default"> <div class="panel-heading"> <?php if ($isManager) { echo '<div style="float: right;">'; echo RForm::input(array('type' => 'Submit', 'value' => 'Remove members', 'class' => 'btn btn-danger btn-xs', 'onclick' => 'return confirm(\'Are you sure to remove the selected members from the group? This operation cannot be undone!\')')); echo '</div>'; } ?> <b>Members (<?php
<?php /** * Created by JetBrains PhpStorm. * User: Raysmond * Date: 13-10-15 * Time: PM3:32 * To change this template use File | Settings | File Templates. */ if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($sendForm)) { $form = $sendForm; } echo RForm::openForm('message/send/' . $type . '/', array('id' => 'messageForm', 'class' => 'form-signin')); echo RForm::label('To user: '******'receiver', array()); echo ' '; $disabled = isset($toUser) ? "disabled" : "enabled"; echo RForm::input(array('id' => 'receiver', 'name' => 'receiver', 'class' => 'form-control', 'placeholder' => 'Receiver'), isset($toUser) ? $toUser->name : $form); echo '<br/>'; echo RForm::label('Title', 'title', array()); echo RForm::input(array('id' => 'title', 'name' => 'title', 'class' => 'form-control', 'placeholder' => 'Title'), $form); echo "<br/>"; echo RForm::label('Content', 'content', array()); echo "<br/>"; if (Rays::user()->roleId == Role::ADMINISTRATOR_ID) { $self->module('ckeditor', array('editorId' => 'msg-content', 'name' => 'msg-content', 'data' => isset($form['content']) ? $form['content'] : '')); } else { echo RForm::textarea(array('id' => 'msg-content', 'name' => 'msg-content', 'class' => 'form-control', 'cols' => 100, 'rows' => 6, 'placeholder' => 'Content'), $form); }
<div class="panel-heading"> <div class="heading-actions" style="float: right;"> <?php echo RHtml::linkAction('group', "Back to group", 'detail', $group->id, array('class' => 'btn btn-xs btn-info')); ?> </div> <h1 class="panel-title"><?php echo $group->name; ?> </h1> </div> <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'));
<?php /** * Created by JetBrains PhpStorm. * User: Raysmond * Date: 13-10-16 * Time: AM8:57 * To change this template use File | Settings | File Templates. */ if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($newForm)) { $form = $newForm; } echo RForm::openForm('category/new', array('id' => 'new-category-form', 'class' => 'new-category-form')); echo '<h2>Create new category</h2>'; echo RForm::label("Category name", 'name'); echo RForm::input(array('id' => 'name', 'name' => 'name', 'class' => 'form-control', 'placeholder' => 'Category name'), $form); echo '<br/>'; echo RForm::label("Category parent", 'parent'); echo RForm::input(array('id' => 'parent', 'name' => 'parent', 'class' => 'form-control', 'placeholder' => 'Category parent'), $form); echo '<br/>'; echo RForm::input(array('type' => 'hidden', 'name' => 'id'), $form); echo RForm::input(array('class' => 'btn btn-lg btn-primary btn-block', 'type' => 'submit', 'value' => 'Save')); echo RForm::endForm();
<?php /** * @author: Raysmond */ echo RForm::openForm('user/admin', array('id' => 'blockUserForm')); ?> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="heading-actions"> <div class="input-group"> <?php echo RForm::input(array('name' => 'search', 'class' => 'form-control', 'style' => 'width:200px;', 'placeholder' => 'filter users', 'value' => isset($filterStr) ? $filterStr : "")); ?> <button class="btn btn-default" type="submit">Go!</button> <a class='btn btn-xs btn-danger' href="javascript:block_submit()">Block</a> <a class='btn btn-xs btn-success' href="javascript:active_submit()">Activate</a> <?php echo RForm::hidden(array('id' => 'operation_type', 'name' => 'operation_type', 'value' => 'block')); ?> </div> </div> <h1 class="panel-title">Users</h1> </div>
<?php /** * Created by PhpStorm. * User: songrenchu */ ?> <div id="profile" class="panel panel-default"> <div class="panel-heading"><h1 class="panel-title">VIP application</h1></div> <div class="panel-body"> <?php if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($editForm)) { $form = $editForm; } echo RForm::openForm('user/applyVIP/', array('id' => 'vipApplyForm')); echo RForm::label('Statement of Purpose: ', 'content', array()); echo "<br/>"; echo RForm::textarea(array('id' => 'content', 'name' => 'content', 'cols' => 100, 'rows' => 6, 'class' => 'form-control', 'placeholder' => 'Explain your purpose and qualification of applying for VIP'), $form); echo "<br/>"; echo RForm::input(array('type' => 'submit', 'value' => 'Send', 'class' => 'btn btn-lg btn-primary')); echo RForm::endForm(); ?> </div> </div>
<div class="panel panel-default user-login-register-panel"> <div class="panel-heading"><b>Sign in</b></div> <div class="panel-body"> <?php if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($loginForm)) { $form = $loginForm; } echo RForm::openForm('user/login', array('id' => 'loginForm', 'class' => 'form-signin login-form')); //echo RForm::label("User name",'username'); echo RForm::hidden('returnURL', Rays::referrerUri() ?: ""); echo RForm::input(array('id' => 'username', 'name' => 'username', 'class' => 'form-control', 'placeholder' => 'User name'), $form); //echo RForm::label("Password",'password'); echo RForm::input(array('id' => 'password', 'name' => 'password', 'type' => 'password', 'class' => 'form-control', 'placeholder' => 'Password'), $form); echo RForm::input(array('class' => 'btn btn-primary', 'type' => 'submit', 'value' => 'Login')); echo RForm::endForm(); ?> </div> </div>
<div class="panel panel-default"> <div class="panel-heading"><h1 class="panel-title">Create a group</h1></div> <div class="panel-body"> <?php if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($buildForm)) { $form = $buildForm; } echo RForm::openForm('group/build', array('id' => 'build-group-form', 'enctype' => 'multipart/form-data', 'class' => 'build-group-form')); echo RForm::label('Group name', 'group-name', array()); echo RForm::input(array('id' => 'group-name', 'name' => 'group-name', 'class' => 'form-control', 'placeholder' => 'Group name'), $form); echo "<br/>"; //echo RForm::label("Category:",'category')." "; $cats = array(); foreach ($categories as $cat) { array_push($cats, array('value' => $cat->id, 'text' => $cat->name)); } ?> <div class="form-group"> <label class="col-sm-2 control-label" style="padding-left: 0;">Category</label> <div class="col-sm-10"> <select class="form-control" name="category"> <?php $count = 0; foreach ($categories as $item) { if ($item->pid == 0) { echo '<option value="' . $item->id . '" ' . ($count++ == 0 ? 'selected="selected"' : "") . '>' . $item->name . '</option>';
$newForm = $newPostForm; } if ($type == "new") { $url = "post/new/{$groupId}"; $title = RForm::setValue($newForm, 'title'); $content = RHtml::decode(RForm::setValue($newForm, 'content')); $submitText = "Post"; } else { $url = "post/edit/{$topic->id}"; $title = $topic->title; $content = RHtml::decode($topic->content); $submitText = "Edit"; } ?> <?php echo RForm::openForm($url, array('id' => 'viewFrom')); ?> <div class="form-group"> <label class="col-sm-2 control-label" style="padding-left: 0;">Group</label> <div class="col-sm-10"> <?php $values = array(); foreach ($groups as $item) { $values[] = ['value' => $item->id, 'text' => $item->name]; } $canCreate = true; if (!empty($values)) { $selected_value = $values[0]['value']; if (isset($newForm['group'])) { $selected_value = $newForm['group'];
<?php echo RForm::openForm('group/recommend', array('id' => 'recommendGroupForm')); ?> <div class="panel panel-default"> <div class="panel-heading"> <b>Group recommendation</b> <div style="float: right;"> <?php echo RForm::input(array('type' => 'submit', 'class' => 'btn btn-xs btn-info', 'value' => 'Recommend')); ?> </div> </div> <div class="panel-body"> <div class="row"> <div class="col-lg-6"> <div class="panel panel-default"> <div class="panel-heading"> <b>Groups</b> </div> <div class="panel-body"> <div class="row"> <div class="col-lg-10"> <?php echo RForm::input(array('id' => 'search_groups', 'name' => 'search_groups', 'class' => 'form-control', 'placeholder' => 'Search groups')); ?> </div> <div class="col-lg-2"> <a href="javascript:search_groups()" search_url="<?php echo RHtml::siteUrl('group/recommend'); ?>
<?php echo RForm::openForm('post/admin', array('id' => 'topicsAdminForm')); ?> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="heading-actions"> <input type="submit" onclick="return confirm('Are you sure to delete selected topics?')" value="Delete" class="btn btn-xs btn-danger" /> </div> <h1 class="panel-title">Topics</h1> </div> <div class="panel-body"> <table id="admin-topics" class="table"> <thead> <tr> <?php $order = Rays::getParam("order", "asc") == "asc" ? "desc" : "asc"; ?> <?php echo '<th><input type="checkbox" id="check-all" onclick="javascript:checkReverse(\'checked_topics[]\')" /></th>'; ?> <th>Author</th> <th>Title</th> <th>Group</th> <th><a class="highlight" href="<?php echo RHtml::siteUrl("post/admin?orderBy=createTime&&order=" . $order); ?> ">
<?php /** * @author: Raysmond */ ?> <div> <div id="latest-topics-list"> <?php $self->renderPartial('_posts_list', array('topics' => $topics), false); ?> </div> <div id="topics-list-footer" style="text-align: center;"> <?php if (count($topics) > 0) { echo RForm::openForm('user/home', array('id' => 'loadMorePostsForm')); echo RForm::hidden(array('id' => 'last-loaded-time', 'name' => 'last-loaded-time', 'value' => $topics[count($topics) - 1]->createdTime)); echo RHtml::link('Load more posts', 'Load more posts', "javascript:loadMorePosts()", array('class' => 'btn btn-lg btn-primary', 'id' => 'get_more_post_btn')); echo RForm::endForm(); } else { echo 'No posts yet. '; } ?> </div> </div> <script> var isLoading = false; var nomore = false; $(document).ready(function () {
<?php /** * Created by PhpStorm. * User: songrenchu */ echo RForm::openForm('ads/admin', array('id' => 'blockAdsForm')); ?> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="heading-actions"> <div class="input-group" style="margin-top: -6px;"> <?php echo RForm::input(array('name' => 'search', 'class' => 'form-control', 'style' => 'width:200px;', 'placeholder' => 'filter advertisements', 'value' => isset($filterStr) ? $filterStr : "")); ?> <div style="float:right; position: relative;"> <button class="btn btn-default" type="submit">Go!</button> <a class='btn btn-xs btn-danger' href="javascript:block_submit()">Block</a> <a class='btn btn-xs btn-success' href="javascript:active_submit()">Activate</a> <?php echo RForm::hidden(array('id' => 'operation_type', 'name' => 'operation_type', 'value' => 'block')); ?> </div> </div> </div> <h1 class="panel-title">Users</h1> </div>
<?php echo RForm::openForm('comment/admin', array('id' => 'commentAdminForm')); ?> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <div class="heading-actions"> <input type="submit" onclick="return confirm('Are you sure to delete selected comments?')" value="Delete" class="btn btn-xs btn-danger" /> </div> <h1 class="panel-title">Comments</h1> </div> <div class="panel-body"> <table id="admin-comments" class="table"> <thead> <tr> <?php echo '<th><input type="checkbox" id="check-all" onclick="javascript:checkReverse(\'checked_comments[]\')" /></th>'; ?> <th>Author</th> <th>Create Time</th> <th>Topic</th> <th>Content</th> <th>View</th> </tr> </thead> <tbody> <?php
if (isset($searchForm)) { $form = $searchForm; } $lastSearchStr = isset($searchstr) ? $searchstr : ""; if ($lastSearchStr != '') { $lastSearchStr = urlencode($lastSearchStr); } ?> <div class="panel panel-default find-user"> <div class="panel-heading"> <h1 class="panel-title">Find Users</h1> </div> <div class="panel-body"> <div class="navbar-right search-bar"> <?php echo RForm::openForm('user/find', array('class' => 'form-signin find-group-form')); ?> <div class="col-lg-6" style="float:right;padding-top:10px;"> <div class="input-group"> <input type="text" class="form-control" name="searchstr" value="<?php echo urldecode($lastSearchStr); ?> " placeholder="Search Users" /> <span class="input-group-btn"> <button class="btn btn-default" type="submit">Go!</button> </span> </div> </div> <?php
<?php Rays::css("/public/css/form.css"); ?> <div class="panel panel-default user-login-register-panel"> <div class="panel-heading"><b>Register</b></div> <div class="panel-body"> <?php if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($registerForm)) { $form = $registerForm; } echo RForm::openForm('user/register', array('id' => 'registerForm', 'class' => 'form-signin registerForm')); //echo RForm::label("User name",'username'); echo RForm::input(array('id' => 'username', 'name' => 'username', 'class' => 'form-control', 'placeholder' => 'User name'), $form); //echo RForm::label("Email",'email'); echo RForm::input(array('id' => 'email', 'name' => 'email', 'class' => 'form-control', 'placeholder' => '*****@*****.**'), $form); // echo RForm::label("Password",'password'); echo RForm::input(array('id' => 'password', 'name' => 'password', 'type' => 'password', 'class' => 'form-control', 'placeholder' => 'Password'), $form); // echo RForm::label("Password confirm",'password-confirm'); echo RForm::input(array('id' => 'password-confirm', 'name' => 'password-confirm', 'type' => 'password', 'class' => 'form-control', 'placeholder' => 'Password confirm'), $form); echo RForm::input(array('class' => 'btn btn-primary', 'type' => 'submit', 'value' => 'Register')); echo RForm::endForm(); ?> </div> </div>
</div> <?php echo RForm::endForm(); ?> <div class="panel panel-default"> <div class="panel-heading"><b>Add category</b></div> <div class="panel-body"> <?php $form = array(); if (isset($addForm)) { $form = $addForm; } ?> <?php echo RForm::openForm('category/admin', array()); ?> <?php echo RForm::label('Category parent'); ?> <?php echo RForm::input(array('type' => 'hidden', 'name' => 'parent-id', 'id' => 'parent-id')); ?> <?php echo RForm::input(array('id' => 'parent-name', 'name' => 'parent-name', 'readonly' => 'true', 'class' => 'form-control')); ?> <?php echo RForm::label('Name', 'cat-name'); ?> <?php echo RForm::input(array('name' => 'cat-name', 'class' => 'form-control'), $form);
?> <div class="panel panel-default"> <div class="panel-heading"><h1 class="panel-title">Edit profile: <?php echo $user->name; ?> </h1></div> <div class="panel-body"> <?php $form = array(); if (isset($editForm)) { $form = $editForm; } if (isset($validation_errors)) { echo RHtml::showValidationErrors($validation_errors); } echo RForm::openForm('user/edit/' . $user->id, array('id' => 'user-edit-form', 'enctype' => 'multipart/form-data')); echo RForm::label("User name", 'username'); echo RForm::input(array('id' => 'username', 'name' => 'username', 'class' => 'form-control', 'value' => $user->name, 'placeholder' => "Your username")); // email cannot be changed. echo RForm::label("Email", 'mail'); echo RForm::input(array('id' => 'mail', 'class' => 'form-control', 'value' => $user->mail, 'placeholder' => "*****@*****.**", 'readonly' => 'true')); echo RForm::label("New Password", 'password'); echo RForm::input(array('id' => 'password', 'name' => 'password', 'type' => 'password', 'class' => 'form-control', 'placeholder' => "New Password. Leave empty if you don't wanna change password.")); echo RForm::label("Password confirm", 'password-confirm'); echo RForm::input(array('id' => 'password-confirm', 'name' => 'password-confirm', 'type' => 'password', 'class' => 'form-control', 'placeholder' => "Password confirm")); echo RForm::label('Gender', 'gender'); ?> <select name="gender" class="form-control"> <option value="0" <?php echo $user->gender == 0 ? "selected" : "";
<div class="panel panel-default"> <div class="panel-body"> <?php if (isset($validation_errors)) { RHtml::showValidationErrors($validation_errors); } $form = array(); if (isset($editForm)) { $form = $editForm; } echo RForm::openForm('group/edit/' . $groupId, array('id' => 'edit-group-form', 'enctype' => 'multipart/form-data', 'class' => 'build-group-form')); echo RForm::label('Group name', 'group-name', array()); echo RForm::input(array('id' => 'group-name', 'name' => 'group-name', 'class' => 'form-control', 'placeholder' => 'Group name'), isset($group) ? $group->name : $form); echo "<br/>"; echo RForm::label("Category:", 'category') . " "; $catId = isset($group) ? $group->categoryId : $form['category']; $index = 0; $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/>';