* 02110-1301 USA. * * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley, * California 95067, USA. or at email address contact@x2engine.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * X2Engine" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by X2Engine". *****************************************************************************************/ $users = User::getUserIds(); $menuItems = array(array('label' => Yii::t('app', 'Main Menu'), 'url' => array('/mobile/site/home'))); $this->widget('MenuList', array('id' => 'main-menu', 'items' => $menuItems)); ?> <form id='feed-post-publisher'> <!--<input type='text' name='name' id='feed-post-editor' placeholder='<?php echo Yii::t('app', 'Enter text here...'); ?> ' value='' />--> <textarea type='text' name='name' id='feed-post-editor' placeholder='<?php echo Yii::t('app', 'Enter text here...'); ?> '></textarea> <fieldset data-role='controlgroup' data-type='horizontal'>
<?php echo $form->labelEx($admin, 'serviceDistribution'); echo $form->dropDownList($admin, 'serviceDistribution', array('' => Yii::t('admin', 'Free For All'), 'trueRoundRobin' => Yii::t('admin', 'Round Robin'), 'singleUser' => Yii::t('admin', 'Single User'), 'singleGroup' => Yii::t('admin', 'Single Group')), array('id' => "service-source-select")); ?> <div id="user-list" style="<?php echo !empty($admin->serviceDistribution) && $admin->serviceDistribution == "singleUser" ? "" : "display:none;"; ?> "> <label><?php echo Yii::t('admin', 'Selected User'); ?> </label> <?php echo $form->dropDownList($admin, 'srrId', User::getUserIds()); ?> </div> <div id="group-list" style="<?php echo !empty($admin->serviceDistribution) && $admin->serviceDistribution == "singleGroup" ? "" : "display:none;"; ?> "> <label><?php echo Yii::t('admin', 'Selected Group'); ?> </label> <?php echo $form->dropDownList($admin, 'sgrrId', Groups::getNames()); ?> </div>
public function getActivityFeedViewParams($id, $publicProfile) { Events::deleteOldEvents(); $isMyProfile = !$publicProfile && $id === Yii::app()->params->profile->id; $profile = $this->loadModel($id); if (!Yii::app()->request->isAjaxRequest || Yii::app()->params->isMobileApp) { $_SESSION['lastDate'] = 0; unset($_SESSION['lastEventId']); } unset($_SESSION['feed-condition']); unset($_SESSION['feed-condition-params']); if (!isset($_GET['filters'])) { unset($_SESSION['filters']); } if (isset(Yii::app()->params->profile->defaultFeedFilters)) { $_SESSION['filters'] = json_decode(Yii::app()->params->profile->defaultFeedFilters, true); } $filters = null; $filtersOn = false; if (isset($_GET['filters'])) { $filters = $_GET; if ($_GET['filters']) { $filtersOn = true; } } $retVal = Events::getFilteredEventsDataProvider($profile, $isMyProfile, $filters, $filtersOn); $dataProvider = $retVal['dataProvider']; $lastTimestamp = $retVal['lastTimestamp']; $lastId = $retVal['lastId']; $data = $dataProvider->getData(); if (isset($data[count($data) - 1])) { $firstId = $data[count($data) - 1]->id; } else { $firstId = 0; } if ($isMyProfile) { $users = User::getUserIds(); } else { $users = array($profile->id => $profile->fullName); } $_SESSION['firstFlag'] = true; $stickyDataProvider = new CActiveDataProvider('Events', array('criteria' => array('condition' => 'sticky=1', 'order' => 'timestamp DESC, id DESC'), 'pagination' => array('pageSize' => 20))); $_SESSION['stickyFlag'] = false; $userModels = User::model()->active()->findAll(); return array('model' => $profile, 'profileId' => $profile->id, 'isMyProfile' => $isMyProfile, 'dataProvider' => $dataProvider, 'users' => $users, 'lastEventId' => !empty($lastId) ? $lastId : 0, 'firstEventId' => !empty($firstId) ? $firstId : 0, 'lastTimestamp' => $lastTimestamp, 'stickyDataProvider' => $stickyDataProvider, 'userModels' => $userModels); }