Subversion Repositories SmartDukaan

Rev

Rev 19621 | Rev 19835 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19621 Rev 19830
Line 1... Line 1...
1
 
1
 
2
<?php if((isset($id) && $id == 6) && ((isset($sort) && !empty($sort)) || (!isset($brands) && empty($brands)) || (!isset($subcategories) && empty($subcategories)))):?>
-
 
3
	<script type="text/javascript" src="<?php echo $base_url;?>js/iscroll.js"></script>
-
 
4
	<script type="text/javascript">
-
 
5
	function loaded () {
-
 
6
		myScroll = new IScroll('#wrapper', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
-
 
7
	}</script>
-
 
8
<?php endif;?>
-
 
9
 
-
 
10
<?php $links = $this->requestAction('users/getlinks/'.$logged_user['id']);?>
2
<?php $links = $this->requestAction('users/getlinks/'.$logged_user['id']);?>
11
<?php if(!empty($links) && (isset($id) && $id != 6)):?>
3
<?php if(!empty($links) && (isset($id) && $id != 6)){
-
 
4
	$getdet = $links[$id];
-
 
5
	$mylink = array();
-
 
6
	foreach ($getdet as $gkey => $gval){
12
<?php //$cur_url = $_SERVER['REQUEST_URI'];?>
7
		array_push($mylink,substr($gval,strpos($gval,'=',8)+1));}	
-
 
8
}?>
13
 
9
 
14
<ul class="list-inline" style='font-size:.9em'>
10
<?php if(isset($brands) && !empty($brands) && $id != 6):?>
15
<?php foreach ($links[$id] as $name => $link) :?>	
11
	<?php $selectedbrands = explode("^",$brands);?>	
-
 
12
	<div id="wrapperboss" style="position:relative;">
-
 
13
				<!-- crossfilter start -->
-
 
14
				
-
 
15
		    		<div id="wrapper1" style="background:white;">
-
 
16
						<div id="scroller1">
-
 
17
							<ul>
16
 
18
 
17
	<?php //if(substr($cur_url, strrpos($cur_url, '=') + 1) == substr($link,strpos($link,'=',8)+1)):?>
-
 
18
	<?php if(!empty($brands) && $brands == substr($link,strpos($link,'=',8)+1)):?>
19
								<?php foreach($selectedbrands as $akey => $avalue ):?>
19
	
-
 
20
	<li style='padding:2px;'><a class="selectbrand active" data-href="<?php echo $link;?>" data-id="<?php echo substr($link,strpos($link,'=',8)+1);?>"><?php echo $name;?></a></li>	
20
									<li class="upselect mtop brandcancel quickclick" data-catid= "<?php echo $id;?>" data-id="<?php echo $avalue;?>"><?php echo $brandlist[$avalue];?> <span class="cancelstyle"> X </span></li>
-
 
21
								<?php endforeach;?>						
-
 
22
								
21
	<?php else:?>
23
						    </ul>
22
	<li style='padding:2px;'><a class="selectbrand" data-href="<?php echo $link;?>" data-id="<?php echo substr($link,strpos($link,'=',8)+1);?>"><?php echo $name;?></a></li>	
-
 
23
	<?php endif;?>
24
						</div>
-
 
25
					</div>
-
 
26
				
24
<?php endforeach;?>
27
				<!-- crossfilter end -->
-
 
28
				
-
 
29
		    	
-
 
30
		    	</div>
25
 
31
 
26
	<?php if(isset($brandschosen) && !empty($brandschosen)):?>	
-
 
27
	<li><button  class="btn btn-xs clearfilters" style="width:25px !important;">All</button></li>
-
 
28
	<?php endif;?>
-
 
29
</ul>
-
 
30
<?php endif;?>
32
<?php endif;?>
-
 
33
 
31
<?php if((isset($id) && $id == 6) && ((isset($sort) && !empty($sort))||(!isset($brands) && empty($brands)) || (!isset($subcategories) && empty($subcategories)))):?>
34
<?php //if((isset($id) && $id == 6) && ((isset($sort) && !empty($sort))||(!isset($brands) && empty($brands)) || (!isset($subcategories) && empty($subcategories)))):?>
-
 
35
<?php if((isset($id)) && ((isset($sort) && !empty($sort))||(!isset($brands) && empty($brands)) || (!isset($subcategories) && empty($subcategories)))):?>
32
<div style="margin-top:4px;">
36
<div <?php if($id == 6 || (!isset($brands))):?> style="margin-top:4px;"<?php endif;?>>
33
<div id="wrapper" style="background:white; width:100%; padding:0px;">
37
	<div id="wrapper" style="background:white; width:100%; padding:0px;">
34
						<div id="scroller">
38
							<div id="scroller">
35
							<ul>
39
								<ul>
36
							<?php $colorcount = 0;?>
40
								<?php $colorcount = 0;?>
37
							<?php foreach($getdet as $arrkey => $arrvalue ):?>
41
								<?php foreach($getdet as $arrkey => $arrvalue ):?>
38
								
42
									
39
			
43
									<?php if ($id == 6):?>
40
								<?php $strarr = explode(" ", $arrvalue['subCategory']);?>
44
										<?php $strarr = explode(" ", $arrvalue['subCategory']);?>
41
									<a href="?filter=subcategory&subcategories=<?php echo $arrvalue['subCategoryId'];?>&whatfirst=subCategory">
45
											<a href="?filter=subcategory&subcategories=<?php echo $arrvalue['subCategoryId'];?>&whatfirst=subCategory">
42
										<li class= "quickclick" style="background:<?php echo $color[$colorcount];?>; <?php if(strlen($arrvalue['subCategory']) >9 && sizeof($strarr)>1):?> font-size: 10px;line-height: 12px;<?php elseif(strlen($arrvalue['subCategory']) <=9 && sizeof($strarr)>1):?>line-height: 12px;<?php else:?>line-height: 24px;<?php endif;?>">
46
												<li class= "quickclick" style="background:<?php echo $color[$colorcount];?>; <?php if(strlen($arrvalue['subCategory']) >9 && sizeof($strarr)>1):?> font-size: 10px;line-height: 12px;<?php elseif(strlen($arrvalue['subCategory']) <=9 && sizeof($strarr)>1):?>line-height: 12px;<?php else:?>line-height: 24px;<?php endif;?>">											
43
										
-
 
44
										<?php 
47
													<?php 
45
											echo $strarr[0]; 
48
														echo $strarr[0]; 
46
											if(sizeof($strarr) >1){
49
														if(sizeof($strarr) >1){
47
												echo "<br>";
50
															echo "<br>";
48
												for($abs = 1; $abs< sizeof($strarr);$abs++)
51
															for($abs = 1; $abs< sizeof($strarr);$abs++)
49
												{
52
															{
50
													echo $strarr[$abs]." ";
53
																echo $strarr[$abs]." ";
51
												}	
54
															}	
-
 
55
														}																				
52
											}									
56
													?>											
-
 
57
												</li>
53
											
58
											</a>
-
 
59
											<?php $colorcount = $colorcount+1;;?>
-
 
60
									<?php else:?>
-
 
61
											<?php if(!in_array(substr($arrvalue,strpos($arrvalue,'=',8)+1),$selectedbrands)):?>
54
											
62
												<li class="selectbrand" data-id="<?php echo substr($arrvalue,strpos($arrvalue,'=',8)+1);?>" data-catid="<?php echo $id;?>" style='padding:2px;height: 33px; line-height:30px; background:<?php echo $color[$colorcount];?>;' ><?php echo $arrkey;?></li>
-
 
63
												<?php $colorcount = $colorcount+1;?>
-
 
64
											<?php endif;?>
55
											
65
											
-
 
66
									<?php endif;?>
-
 
67
										<?php 
-
 
68
											if($colorcount == 6)
-
 
69
											{
-
 
70
												$colorcount = 0;
-
 
71
											}
56
										?>
72
										?>
57
										
73
								<?php endforeach;?>
58
									</li>
74
								<?php if($id !=6):?>							
59
									</a>
75
									<?php foreach ($brandlist as $blkey => $blvalue):?>
-
 
76
											<?php if(!in_array($blkey,$mylink) && !in_array($blkey,$selectedbrands)):?>
60
									<?php $colorcount = $colorcount+1;
77
												<?php $colorcount = $colorcount+1;
61
										if($colorcount == 6)
78
														if($colorcount == 6)
62
										{
79
														{
63
											$colorcount = 0;
80
															$colorcount = 0;
-
 
81
														}
64
										}
82
												
65
									?>
83
												?>
-
 
84
												<li class="selectbrand" data-id="<?php echo $blkey;?>" data-catid="<?php echo $id;?>" style='padding:2px;height: 33px; line-height:30px; background:<?php echo $color[$colorcount];?>;' ><?php echo $blvalue;?></li>								
-
 
85
												
-
 
86
											<?php endif;?>												
66
							<?php endforeach;?>
87
									<?php endforeach;?>							
-
 
88
								<?php endif;?>
67
						    </ul>
89
							    </ul>
68
						</div>
90
							</div>
69
</div>
91
	</div>
70
</div>
92
</div>
71
<?php endif;?>
93
<?php endif;?>
72
94