<?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>
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>
<?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();
<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 foreach ($comments as $comment) { echo '<tr>'; echo '<td>' . RForm::input(array('name' => 'checked_comments[]', 'type' => 'checkbox', 'value' => $comment->id)) . '</td>'; echo '<td>' . RHtml::linkAction('user', $comment->user->name, 'view', $comment->user->id) . '</td>'; echo '<td>' . $comment->createdTime . '</td>'; if (mb_strlen($comment->content) > 140) { $comment->content = mb_substr($comment->content, 0, 140, 'UTF-8') . '...'; } echo '<td>' . RHtml::linkAction('post', $comment->topic->title, 'view', $comment->topic->id) . '</td>'; echo '<td>' . $comment->content . '</td>'; echo '<td>' . RHtml::linkAction('post', 'View', 'view', $comment->topic->id . '#comment-item-' . $comment->id) . '</td>'; echo '</tr>'; } ?> </tbody> </table> <?php echo isset($pager) ? $pager : "";
<?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 echo RForm::textarea(array('class' => 'form-control', 'rows' => '3', 'name' => 'invitation', 'placeholder' => 'Say something!')); echo '<br/>'; echo RForm::input(array('class' => 'btn btn-lg btn-primary', 'type' => 'submit', 'value' => 'Invite Now')); echo RForm::endForm(); ?> </div> </div>
<?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>
<?php $self->module('ckeditor', array('editorId' => 'ads-content', 'name' => 'ads-content', 'data' => isset($form['ads-content']) ? $form['ads-content'] : (isset($edit) ? $ad->content : ''))); ?> <br/> <?php echo RForm::label('Paid price (' . Rays::user()->getWallet()->money . " " . Wallet::COIN_NAME . " in your wallet)", 'paid-price'); ?> <div class="input-group"> <?php echo RForm::input(array_merge(array('id' => 'paid-price', 'name' => 'paid-price', 'class' => 'form-control'), isset($edit) ? ['readonly' => true] : []), isset($form['paid-price']) ? $form : (isset($edit) ? $ad->paidPrice : $form)); ?> <span class="input-group-addon"><?php echo Wallet::COIN_NAME; ?> </span> </div> <br/> <?php echo RForm::input(array('type' => 'submit', 'class' => 'btn btn-sm btn-primary', 'value' => isset($edit) ? 'Save' : 'Send Ads application')); ?> <?php echo RForm::endForm(); ?> </div> </div>
*/ 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); } echo "<br/>"; echo RForm::input(array('type' => 'hidden', 'value' => $type, 'name' => 'type'), $type); echo RForm::input(array('type' => 'submit', 'value' => 'Send', 'class' => 'btn btn-lg btn-primary')); echo RForm::endForm(); ?> </div> </div>
?> <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 echo RForm::endForm(); ?> </div> </div> </div> </div>
<th>Title</th> <th style="width:50%;">Content</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($ads as $ad) { ?> <tr> <td> <?php if ($ad->status != Ads::REMOVED) { ?> <?php echo RForm::input(array('name' => 'checked_ads[]', 'type' => 'checkbox', 'value' => $ad->id)); ?> <?php } else { echo "<span class='glyphicon glyphicon-ban-circle' style='color:red;'></spam>"; } ?> </td> <td><?php echo RHtml::linkAction('user', $ad->publisher->name, 'view', $ad->publisher->id); ?> </td> <td><?php echo $ad->pubTime; ?> </td>
<?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); ?> <br/> <?php echo RForm::input(array('type' => 'submit', 'value' => '+ Add', 'class' => 'btn btn-sm btn-success')); ?> <?php echo RForm::endForm(); ?> </div> </div> <script> function markCategoryParent(pid){ $("#parent-id").val(pid); $("#parent-name").val($("#category-item-"+pid).text()); } </script>
foreach (User::$labels as $key => $label) { if (in_array($key, $skips)) { continue; } echo '<th>' . $label . '</th>'; } ?> </tr> </thead> <tbody> <?php foreach ($users as $user) { echo '<tr>'; ?> <td><?php echo RForm::input(array('name' => 'checked_users[]', 'type' => 'checkbox', 'value' => $user->id)); ?> </td><?php foreach (User::$mapping as $objCol => $dbcol) { if (in_array($objCol, $skips)) { continue; } echo '<td>'; switch ($objCol) { case "roleId": echo Role::getRoleNameById($user->{$objCol}); break; case "name": echo RHtml::linkAction('user', $user->{$objCol}, 'view', $user->id); break; case "homepage":
?> <br/> <?php /* echo RForm::textarea(array( 'id' => 'post-content', 'name' => 'post-content', 'class' => 'ckeditor form-control', 'rows' => 14, 'placeholder' => 'Content' ), $content); */ $self->module('ckeditor', array('editorId' => 'post-content', 'name' => 'content', 'data' => $content)); ?> <br/> <?php echo RForm::input(array('class' => 'btn btn-lg btn-primary', 'type' => 'submit', 'value' => $submitText)); ?> <?php } ?> <?php echo RForm::endForm(); ?> </div> </div>
<ul class="list-group" id="to-recommend-groups"> </ul> </div> <div id="recommend-groups" class="row" style="padding: 10px;"></div> </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>
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> <tbody> <?php foreach ($topics as $topic) { echo '<tr>'; echo '<td>' . RForm::input(array('type' => 'checkbox', 'name' => 'checked_topics[]', 'value' => $topic->id)) . '</td>'; echo '<td>' . RHtml::linkAction('user', $topic->user->name, 'view', $topic->user->id) . '</td>'; echo '<td>' . RHtml::linkAction('post', $topic->title, 'view', $topic->id) . '</td>'; echo '<td>' . RHtml::linkAction('group', $topic->group->name, 'detail', $topic->group->id) . '</td>'; echo '<td>' . $topic->createdTime . '</td>'; echo '<td>' . $topic->commentCount . '</td>'; echo '<td>' . ($topic->counter->totalCount != null ? $topic->counter->totalCount : "0") . '</td>'; echo '<td>' . ($topic->rating->value != null ? $topic->rating->value : "0") . '</td>'; echo '</tr>'; } ?> </tbody> </table> <?php echo isset($pager) ? $pager : "";
?> )</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 ' '; } $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 } ?> </div> </div> <?php