Subversion Repositories SmartDukaan

Rev

Rev 17349 | 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');?>
14781 anikendra 25
		<?php echo $this->Form->input('expiresat',array('type'=>'datetime'));?>
17349 manish.sha 26
		<?php echo $this->Form->input('sendsms',array('type'=>'checkbox'));?>
18175 manish.sha 27
		<?php echo $this->Form->input('messagetext', array('size'=>130,'maxlength'=>130,'placeholder'=>' Max Length 130 Character(s)'));?>
14408 anikendra 28
		<button type="button" class="btn btn-success notifyusers">Send</button>
29
		<div class="row">
30
			<div class="col-lg-6">Email</div>
31
			<div class="col-lg-6"><input type="checkbox" class="pushtoalll" value="1"/> 
32
		</div>
33
		<?php foreach ($users as $key => $user) :?>
34
		<div class="row">
35
			<div class="col-lg-6"><?php echo $user['User']['email'];?></div>
36
			<div class="col-lg-6"><input type="checkbox" name="userIds[]" class="userIds" value="<?php echo $user['User']['id'];?>"/></div>
37
		</div>
38
		<?php endforeach;?>
39
		<?php echo $this->Form->end();?>
40
	<?php endif;?>
41
</div>