Subversion Repositories SmartDukaan

Rev

Rev 14408 | Rev 14428 | 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)):?>
18
		<h3>Enter message and choose users</h3>
19
		<?php echo $this->Form->create('User',array('action'=>'push')); ?>				
20
		<?php echo $this->Form->input('message');?>
21
		<button type="button" class="btn btn-success notifyusers">Send</button>
22
		<div class="row">
23
			<div class="col-lg-6">Email</div>
24
			<div class="col-lg-6"><input type="checkbox" class="pushtoalll" value="1"/> 
25
		</div>
26
		<?php foreach ($users as $key => $user) :?>
27
		<div class="row">
28
			<div class="col-lg-6"><?php echo $user['User']['email'];?></div>
29
			<div class="col-lg-6"><input type="checkbox" name="userIds[]" class="userIds" value="<?php echo $user['User']['id'];?>"/></div>
30
		</div>
31
		<?php endforeach;?>
32
		<?php echo $this->Form->end();?>
33
	<?php endif;?>
34
</div>