Subversion Repositories SmartDukaan

Rev

Rev 14430 | Rev 14781 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14408 anikendra 1
<div class="container">
2
	<div class="row">
3
		<div class="col-lg-12">
4
			<h3>Raw sql to fetch users</h3>
5
			<?php echo $this->Form->create('User'); ?>				
6
			<?php echo $this->Form->input('sql',array('type'=>'textarea'));?>
7
			<?php echo $this->Form->end(__('Submit')); ?>
8
		</div>
9
	</div>
10
	<div class="row well">		
14411 anikendra 11
		<div class="col-lg-10 updatesql">SELECT User.id,User.email,Brand.brand FROM users User LEFT JOIN brand_preferences Brand ON User.id = Brand.user_id WHERE (Brand.brand = 'Micromax' AND Brand.category_id = 3) OR Brand.brand IS NULL</div>
14408 anikendra 12
		<div class="col-lg-2">
13
			<button type="button" class="btn btn-primary sqlslecter">Use This</button>
14
		</div>
15
	</div>
16
	<hr/>
17
	<?php if(!empty($users)):?>
14776 anikendra 18
		<h3>Enter message and choose users</h3>		
14408 anikendra 19
		<?php echo $this->Form->create('User',array('action'=>'push')); ?>				
14776 anikendra 20
		<?php echo $this->Form->input('name',array('label'=>'Campaign Name','required'=>true));?>
14428 anikendra 21
		<?php echo $this->Form->input('title');?>
14408 anikendra 22
		<?php echo $this->Form->input('message');?>
14430 anikendra 23
		<?php echo $this->Form->input('type',array('type'=>'select','options' => array('url'=>'Url','native'=>'Native','update'=>'Update')));?>
14428 anikendra 24
		<?php echo $this->Form->input('url');?>
14408 anikendra 25
		<button type="button" class="btn btn-success notifyusers">Send</button>
26
		<div class="row">
27
			<div class="col-lg-6">Email</div>
28
			<div class="col-lg-6"><input type="checkbox" class="pushtoalll" value="1"/> 
29
		</div>
30
		<?php foreach ($users as $key => $user) :?>
31
		<div class="row">
32
			<div class="col-lg-6"><?php echo $user['User']['email'];?></div>
33
			<div class="col-lg-6"><input type="checkbox" name="userIds[]" class="userIds" value="<?php echo $user['User']['id'];?>"/></div>
34
		</div>
35
		<?php endforeach;?>
36
		<?php echo $this->Form->end();?>
37
	<?php endif;?>
38
</div>