Exemple #1
0
 public function run()
 {
     $opts = array('bind' => array('mkdir' => 'dirCreated', 'mkfile' => 'mkfileDone', 'rm' => 'rmDone', 'rename' => 'renameDone', 'upload' => 'uploadFileDone'), 'debug' => true, 'roots' => array(array('driver' => 'LocalFileSystem', 'path' => base64_decode(getRParam('elfinder_path')), 'URL' => base64_decode(getRParam('elfinder_url')), 'accessControl' => 'access')));
     // run elFinder
     $connector = new elFinderConnector(new elFinder($opts));
     $connector->run();
 }
 /**
  * User manager index
  */
 public function actionIndex()
 {
     $model = new AdminLog('search');
     $model->unsetAttributes();
     if (isset($_GET['AdminLog'])) {
         $model->attributes = $_GET['AdminLog'];
     }
     $this->title[] = at('Admin Logs');
     $user = null;
     if (getRParam('user')) {
         $user = User::model()->findByPk(getRParam('user'));
         if ($user) {
             $this->title[] = at('Viewing logs for {name}', array('{name}' => $user->name));
         }
     }
     $this->render('index', array('model' => $model, 'user' => $user));
 }
	<h2><span class="<?php 
echo $this->icon_class;
?>
"></span><?php 
echo at('Admin Login History');
?>
</h2>
</div>
<!-- END PAGE TITLE -->

<div class="row">
    <div class="col-md-12">

		<!-- START DEFAULT DATATABLE -->
		<div class="panel panel-default">
			<div class="panel-heading">                                
				<ul class="panel-controls">
					<li><a href="#" class="panel-refresh"><span class="fa fa-refresh"></span></a></li>
				</ul>
			</div>
			<div class="panel-body">
				<?php 
$this->widget('CGridView', array('id' => 'admin-login-histories', 'itemsCssClass' => 'table datatable', 'dataProvider' => $model->search(getRParam('user')), 'columns' => array(array('name' => 'created_at', 'filter' => false, 'htmlOptions' => array('style' => 'width: 100px'), 'header' => 'Created Date', 'value' => 'timeSince($data->created_at)'), array('name' => 'username', 'header' => 'Username', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->username'), array('name' => 'password', 'header' => 'Password', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->password'), array('name' => 'ip_address', 'header' => 'IP', 'htmlOptions' => array('style' => 'width: 80px')), array('name' => 'browser', 'header' => 'Browser', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->browser ? ucfirst($data->browser) : "N/A"'), array('name' => 'platform', 'header' => 'Platform', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->platform ? ucfirst($data->platform) : "N/A"'), array('name' => 'is_ok', 'header' => 'Logged In?', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->is_ok ? "Yes" : "No"'))));
?>
			</div>
		</div>
		<!-- END DEFAULT DATATABLE -->
	</div>
</div>

<div class="clear"></div>
Exemple #4
0
    echo at('Viewing logs for {name}', array('{name}' => $user->name));
    ?>
		<?php 
}
?>
	
	</h2>
</div>
<!-- END PAGE TITLE -->

<div class="row">
    <div class="col-md-12">

		<!-- START DEFAULT DATATABLE -->
		<div class="panel panel-default">
			<div class="panel-heading">                                
				<ul class="panel-controls">
					<li><a href="#" class="panel-refresh"><span class="fa fa-refresh"></span></a></li>
				</ul>
			</div>
			<div class="panel-body">
				<?php 
$this->widget('CGridView', array('id' => 'admin-logs', 'itemsCssClass' => 'table datatable', 'dataProvider' => $model->search(getRParam('user')), 'columns' => array(array('name' => 'id', 'header' => '#', 'htmlOptions' => array('style' => 'width: 30px')), array('name' => 'created_at', 'filter' => false, 'htmlOptions' => array('style' => 'width: 120px'), 'header' => 'Created Date', 'value' => 'dateTime( $data->created_at)'), array('name' => 'note', 'header' => 'Note'), array('name' => 'user_id', 'header' => 'User', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->getUserLink()'), array('name' => 'ip_address', 'header' => 'IP', 'htmlOptions' => array('style' => 'width: 80px')), array('name' => 'controller', 'header' => 'Controller', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->controller ? ucfirst($data->controller) : "N/A"'), array('name' => 'action', 'header' => 'Action', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->action ? ucfirst($data->action) : "N/A"'))));
?>
			</div>
		</div>
		<!-- END DEFAULT DATATABLE -->
	</div>
</div>

<div class="clear"></div>
 /**
  * Revert a string to it's original form
  */
 public function actionRevert()
 {
     // Check Access
     checkAccessThrowException('op_language_translate');
     $id = getRParam('id', 0);
     $string = getRParam('string', 0);
     // Check if it exists
     $model = Language::model()->findByPk($id);
     if (!$model) {
         ferror(at('That language was not found.'));
         $this->redirect(array('index'));
     }
     // Grab the string and source
     $source = SourceMessage::model()->findByPk($string);
     $stringdata = Message::model()->find('language_id=:lang AND id=:id', array(':id' => $string, ':lang' => $id));
     if (!$source || !$stringdata) {
         ferror(at('That language string was not found.'));
         $this->redirect(array('index'));
     }
     // Update the stringdata based on the soruce
     Message::model()->updateAll(array('translation' => $source->message), 'language_id=:lang AND id=:id', array(':id' => $string, ':lang' => $id));
     fok(at('String Reverted.'));
     $this->redirect(array('language/view', 'id' => $id));
 }
Exemple #6
0
	<div class="box">
		<div class="title">
			<?php 
echo at('Admin Logs');
?>
			<?php 
if ($user) {
    ?>
				- <?php 
    echo at('Viewing logs for {name}', array('{name}' => $user->name));
    ?>
			<?php 
}
?>
	
		</div>

		<div class="inside">
			<div class="in">
				<div class="grid_12">
					<?php 
$this->widget('bootstrap.widgets.BootGridView', array('type' => 'striped bordered condensed', 'dataProvider' => $model->search(getRParam('user')), 'filter' => $model, 'columns' => array(array('name' => 'id', 'header' => '#', 'htmlOptions' => array('style' => 'width: 30px')), array('name' => 'created_at', 'filter' => false, 'htmlOptions' => array('style' => 'width: 100px'), 'header' => 'Created Date', 'value' => 'dateTime( $data->created_at)'), array('name' => 'note', 'header' => 'Note'), array('name' => 'user_id', 'header' => 'User', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->getUserLink()'), array('name' => 'ip_address', 'header' => 'IP', 'htmlOptions' => array('style' => 'width: 80px')), array('name' => 'controller', 'header' => 'Controller', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->controller ? ucfirst($data->controller) : "N/A"'), array('name' => 'action', 'header' => 'Action', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->action ? ucfirst($data->action) : "N/A"'))));
?>
				</div>
				<div class="clear"></div>
			</div>
		</div>

	</div>
</section>
<div class="clear"></div>
Exemple #7
0
			<div class="in">
				
				<?php 
if (strtolower($this->action->id) != 'translateneeded') {
    ?>
					<div class="grid-3-12">
					<?php 
    $this->widget('bootstrap.widgets.BootButton', array('label' => 'View Only Requiring Translation', 'url' => array('TranslateNeeded', 'id' => $id), 'type' => 'primary'));
    ?>
					</div>
					<div class="grid-9-12">
						<?php 
    echo CHtml::beginForm(array('language/view', 'id' => $id), 'get', array('class' => 'formee'));
    ?>
							<?php 
    echo CHtml::textField('term', getRParam('term'), array('placeholder' => at('Search Messages'), 'size' => 40, 'style' => 'width: 50%;'));
    ?>
							<?php 
    echo CHtml::submitButton(at('Search'));
    ?>
						<?php 
    echo CHtml::endForm();
    ?>
					</div>
				<?php 
} else {
    ?>
					<div class="grid-5-12">
					<?php 
    $this->widget('bootstrap.widgets.BootButton', array('label' => 'View All', 'url' => array('View', 'id' => $id), 'type' => 'primary'));
    ?>
Exemple #8
0
						<?php 
echo CHtml::submitButton(at('Search'));
?>
					<?php 
echo CHtml::endForm();
?>
				</div>
					
				<div class="clear"></div>	
				
				<div class="grid_12">	
					<?php 
bp('PM Index');
?>
					<?php 
$this->widget('bootstrap.widgets.BootGridView', array('type' => 'striped bordered condensed', 'dataProvider' => $model->search(getRParam('term')), 'columns' => array(array('name' => 'id', 'header' => '#'), array('name' => 'title', 'header' => 'Title', 'type' => 'raw', 'value' => '$data->getTopicTitle()'), array('name' => 'type', 'header' => 'Type', 'value' => '$data->getType()'), array('name' => 'repliesCount', 'header' => 'Replies', 'value' => '$data->repliesCount'), array('name' => 'participantsCount', 'header' => 'Participants', 'value' => '$data->participantsCount'), array('name' => 'created_at', 'header' => 'Created Date', 'value' => 'timeSince($data->created_at)'), array('name' => 'author_id', 'header' => 'Author', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->getAuthorLink()'), array('name' => 'last_reply_created_at', 'header' => 'Last Reply Date', 'value' => 'timeSince($data->last_reply_created_at)'), array('name' => 'last_reply_author_id', 'header' => 'Last Reply Author', 'type' => 'raw', 'htmlOptions' => array('style' => 'width: 100px'), 'value' => '$data->lastReplyAuthor->getUserLink()'), array('template' => '{remove}', 'class' => 'bootstrap.widgets.BootButtonColumn', 'htmlOptions' => array('style' => 'width: 50px'), 'buttons' => array('remove' => array('label' => '<i class="icon-trash"></i>', 'options' => array('title' => at('Delete Topic'), 'class' => 'delete'), 'url' => 'Yii::app()->createUrl("/admin/personalmessages/delete", array("id"=>$data->id))', 'visible' => 'Yii::app()->user->id == $data->author_id || checkAccess("op_personalmessages_manage_topics")'))))));
?>
					<?php 
ep('PM Index');
?>
					<?php 
$this->widget('bootstrap.widgets.BootButton', array('label' => 'Create New Message', 'url' => array('create'), 'type' => 'primary'));
?>
				</div>
				<div class="clear"></div>
			</div>
		</div>

	</div>
</section>
<div class="clear"></div>