@@ -217,8 +217,7 @@ discard block |
||
217 | 217 | $ret[$myrow['couponid']] =& $coupon; |
218 | 218 | } |
219 | 219 | unset($coupon); |
220 | - } |
|
221 | - else { |
|
220 | + } else { |
|
222 | 221 | $ret[] = $myrow; |
223 | 222 | } |
224 | 223 | } |
@@ -308,8 +307,7 @@ discard block |
||
308 | 307 | $description = $myts->displayTarea($myrow['description'], 1, 1, 1, 1, $myrow['lbr']); |
309 | 308 | if ($myrow['expire'] > 0) { |
310 | 309 | $expire = formatTimestamp($myrow['expire'], 's'); |
311 | - } |
|
312 | - else { |
|
310 | + } else { |
|
313 | 311 | $expire = 0; |
314 | 312 | } |
315 | 313 | $ret ['items']['coupons'][] = array( 'itemid' => $myrow['itemid'], |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $form .= "<input type='hidden' name='options[]' value='"; |
67 | 67 | if($options[0] == "date"){ |
68 | 68 | $form .= "date'"; |
69 | - }else { |
|
69 | + } else { |
|
70 | 70 | $form .= "hits'"; |
71 | 71 | } |
72 | 72 | $form .= " />"; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $form .= "<input type='hidden' name='options[]' value='"; |
73 | 73 | if($options[0] == "date"){ |
74 | 74 | $form .= "date'"; |
75 | - }else { |
|
75 | + } else { |
|
76 | 76 | $form .= "hits'"; |
77 | 77 | } |
78 | 78 | $form .= " />"; |
@@ -62,25 +62,57 @@ discard block |
||
62 | 62 | |
63 | 63 | function convertorderbytrans($orderby) { |
64 | 64 | $orderbyTrans = ""; |
65 | - if ($orderby == "hits ASC") $orderbyTrans = ""._MD_POPULARITYLTOM.""; |
|
66 | - if ($orderby == "hits DESC") $orderbyTrans = ""._MD_POPULARITYMTOL.""; |
|
67 | - if ($orderby == "title ASC") $orderbyTrans = ""._MD_TITLEATOZ.""; |
|
68 | - if ($orderby == "title DESC") $orderbyTrans = ""._MD_TITLEZTOA.""; |
|
69 | - if ($orderby == "date ASC") $orderbyTrans = ""._MD_DATEOLD.""; |
|
70 | - if ($orderby == "date DESC") $orderbyTrans = ""._MD_DATENEW.""; |
|
71 | - if ($orderby == "rating ASC") $orderbyTrans = ""._MD_RATINGLTOH.""; |
|
72 | - if ($orderby == "rating DESC") $orderbyTrans = ""._MD_RATINGHTOL.""; |
|
65 | + if ($orderby == "hits ASC") { |
|
66 | + $orderbyTrans = ""._MD_POPULARITYLTOM.""; |
|
67 | + } |
|
68 | + if ($orderby == "hits DESC") { |
|
69 | + $orderbyTrans = ""._MD_POPULARITYMTOL.""; |
|
70 | + } |
|
71 | + if ($orderby == "title ASC") { |
|
72 | + $orderbyTrans = ""._MD_TITLEATOZ.""; |
|
73 | + } |
|
74 | + if ($orderby == "title DESC") { |
|
75 | + $orderbyTrans = ""._MD_TITLEZTOA.""; |
|
76 | + } |
|
77 | + if ($orderby == "date ASC") { |
|
78 | + $orderbyTrans = ""._MD_DATEOLD.""; |
|
79 | + } |
|
80 | + if ($orderby == "date DESC") { |
|
81 | + $orderbyTrans = ""._MD_DATENEW.""; |
|
82 | + } |
|
83 | + if ($orderby == "rating ASC") { |
|
84 | + $orderbyTrans = ""._MD_RATINGLTOH.""; |
|
85 | + } |
|
86 | + if ($orderby == "rating DESC") { |
|
87 | + $orderbyTrans = ""._MD_RATINGHTOL.""; |
|
88 | + } |
|
73 | 89 | return $orderbyTrans; |
74 | 90 | } |
75 | 91 | function convertorderbyout($orderby) { |
76 | - if ($orderby == "title ASC") $orderby = "titleA"; |
|
77 | - if ($orderby == "date ASC") $orderby = "dateA"; |
|
78 | - if ($orderby == "hits ASC") $orderby = "hitsA"; |
|
79 | - if ($orderby == "rating ASC") $orderby = "ratingA"; |
|
80 | - if ($orderby == "title DESC") $orderby = "titleD"; |
|
81 | - if ($orderby == "date DESC") $orderby = "dateD"; |
|
82 | - if ($orderby == "hits DESC") $orderby = "hitsD"; |
|
83 | - if ($orderby == "rating DESC") $orderby = "ratingD"; |
|
92 | + if ($orderby == "title ASC") { |
|
93 | + $orderby = "titleA"; |
|
94 | + } |
|
95 | + if ($orderby == "date ASC") { |
|
96 | + $orderby = "dateA"; |
|
97 | + } |
|
98 | + if ($orderby == "hits ASC") { |
|
99 | + $orderby = "hitsA"; |
|
100 | + } |
|
101 | + if ($orderby == "rating ASC") { |
|
102 | + $orderby = "ratingA"; |
|
103 | + } |
|
104 | + if ($orderby == "title DESC") { |
|
105 | + $orderby = "titleD"; |
|
106 | + } |
|
107 | + if ($orderby == "date DESC") { |
|
108 | + $orderby = "dateD"; |
|
109 | + } |
|
110 | + if ($orderby == "hits DESC") { |
|
111 | + $orderby = "hitsD"; |
|
112 | + } |
|
113 | + if ($orderby == "rating DESC") { |
|
114 | + $orderby = "ratingD"; |
|
115 | + } |
|
84 | 116 | return $orderby; |
85 | 117 | } |
86 | 118 | |
@@ -92,7 +124,7 @@ discard block |
||
92 | 124 | if ($startdate < $time) { |
93 | 125 | if($status==2){ |
94 | 126 | $new = " <img src=\"".XOOPS_URL."/modules/$moddir/images/newred.gif\" alt=\""._MD_NEWTHISWEEK."\" />"; |
95 | - }elseif($status==3){ |
|
127 | + } elseif($status==3){ |
|
96 | 128 | $new = " <img src=\"".XOOPS_URL."/modules/$moddir/images/update.gif\" alt=\""._MD_UPTHISWEEK."\" />"; |
97 | 129 | } |
98 | 130 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $eh = new ErrorHandler; //ErrorHandler object |
39 | 39 | if(empty($xoopsUser)){ |
40 | 40 | $ratinguser = 0; |
41 | - }else{ |
|
41 | + } else{ |
|
42 | 42 | $ratinguser = $xoopsUser->getVar('uid'); |
43 | 43 | } |
44 | 44 |
@@ -87,8 +87,7 @@ discard block |
||
87 | 87 | $dobr = $lbr; |
88 | 88 | if ($expire > 0) { |
89 | 89 | $setexpire = 1; |
90 | - } |
|
91 | - else { |
|
90 | + } else { |
|
92 | 91 | $setexpire = 0; |
93 | 92 | $expire = time() + 3600 * 24 * 7; |
94 | 93 | } |
@@ -102,8 +101,7 @@ discard block |
||
102 | 101 | $heading = isset($_POST['heading']) ? $_POST['heading'] : ""; |
103 | 102 | if ($expire > 0) { |
104 | 103 | $setexpire = 1; |
105 | - } |
|
106 | - else { |
|
104 | + } else { |
|
107 | 105 | $setexpire = 0; |
108 | 106 | $expire = time() + 3600 * 24 * 7; |
109 | 107 | } |
@@ -139,8 +137,7 @@ discard block |
||
139 | 137 | redirect_header("listing.php?item=".$itemid,2,_MD_COUPONDELETED); |
140 | 138 | exit(); |
141 | 139 | } |
142 | - } |
|
143 | - else { |
|
140 | + } else { |
|
144 | 141 | include XOOPS_ROOT_PATH.'/header.php'; |
145 | 142 | xoops_confirm(array('delete' => 'yes', 'couponid' => $couponid, 'ok' => 1), 'addcoupon.php?item='.$itemid.'', _MD_COUPONRUSURE); |
146 | 143 | include_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -191,7 +191,7 @@ |
||
191 | 191 | } |
192 | 192 | redirect_header("directories.php?op=moddir&dirid=$p_dirid",2,_MD_DIR_UPDATED); |
193 | 193 | exit(); |
194 | - } else { |
|
194 | + } else { |
|
195 | 195 | echo $uploader->getErrors(); |
196 | 196 | $sql = "UPDATE ".$xoopsDB->prefix("efqdiralpha1_dir")." SET descr = '".$p_descr."', open='".$p_open."', name='".$p_dirname."' WHERE dirid = '".$p_dirid."'"; |
197 | 197 | $xoopsDB->query($sql) or $eh->show("0013"); |
@@ -82,8 +82,7 @@ |
||
82 | 82 | foreach ($category['coupons'] as $key => $coupon) { |
83 | 83 | if (!isset($class) || ($class != "odd")) { |
84 | 84 | $class = "odd"; |
85 | - } |
|
86 | - else { |
|
85 | + } else { |
|
87 | 86 | $class = "even"; |
88 | 87 | } |
89 | 88 | $output .= "<tr class='".$class."'> |
@@ -86,42 +86,41 @@ discard block |
||
86 | 86 | if(! isset($this->s_tables['create'][$table])){ |
87 | 87 | $this->s_tables['create'][$table] = 1; |
88 | 88 | } |
89 | - }else{ |
|
89 | + } else{ |
|
90 | 90 | if(! isset($this->f_tables['create'][$table])){ |
91 | 91 | $this->f_tables['create'][$table] = 1; |
92 | 92 | } |
93 | 93 | } |
94 | - } |
|
95 | - elseif($prefixed_query[1] == 'INSERT INTO'){ |
|
94 | + } elseif($prefixed_query[1] == 'INSERT INTO'){ |
|
96 | 95 | if ($this->db->query($prefixed_query[0]) != false) { |
97 | 96 | if(! isset($this->s_tables['insert'][$table])){ |
98 | 97 | $this->s_tables['insert'][$table] = 1; |
99 | - }else{ |
|
98 | + } else{ |
|
100 | 99 | $this->s_tables['insert'][$table]++; |
101 | 100 | } |
102 | - }else{ |
|
101 | + } else{ |
|
103 | 102 | if(! isset($this->f_tables['insert'][$table])){ |
104 | 103 | $this->f_tables['insert'][$table] = 1; |
105 | - }else{ |
|
104 | + } else{ |
|
106 | 105 | $this->f_tables['insert'][$table]++; |
107 | 106 | } |
108 | 107 | } |
109 | - }elseif($prefixed_query[1] == 'ALTER TABLE'){ |
|
108 | + } elseif($prefixed_query[1] == 'ALTER TABLE'){ |
|
110 | 109 | if ($this->db->query($prefixed_query[0]) != false) { |
111 | 110 | if(! isset($this->s_tables['alter'][$table])){ |
112 | 111 | $this->s_tables['alter'][$table] = 1; |
113 | 112 | } |
114 | - }else{ |
|
113 | + } else{ |
|
115 | 114 | if(! isset($this->s_tables['alter'][$table])){ |
116 | 115 | $this->f_tables['alter'][$table] = 1; |
117 | 116 | } |
118 | 117 | } |
119 | - }elseif($prefixed_query[1] == 'DROP TABLE'){ |
|
118 | + } elseif($prefixed_query[1] == 'DROP TABLE'){ |
|
120 | 119 | if ($this->db->query('DROP TABLE '.$table) != false) { |
121 | 120 | if(! isset($this->s_tables['drop'][$table])){ |
122 | 121 | $this->s_tables['drop'][$table] = 1; |
123 | 122 | } |
124 | - }else{ |
|
123 | + } else{ |
|
125 | 124 | if(! isset($this->s_tables['drop'][$table])){ |
126 | 125 | $this->f_tables['drop'][$table] = 1; |
127 | 126 | } |
@@ -201,14 +200,14 @@ discard block |
||
201 | 200 | if(!$this->db->queryF($query)){ |
202 | 201 | if(!isset($this->f_tables['insert'][$table])){ |
203 | 202 | $this->f_tables['insert'][$table] = 1; |
204 | - }else{ |
|
203 | + } else{ |
|
205 | 204 | $this->f_tables['insert'][$table]++; |
206 | 205 | } |
207 | 206 | return false; |
208 | - }else{ |
|
207 | + } else{ |
|
209 | 208 | if(!isset($this->s_tables['insert'][$table])){ |
210 | 209 | $this->s_tables['insert'][$table] = 1; |
211 | - }else{ |
|
210 | + } else{ |
|
212 | 211 | $this->s_tables['insert'][$table]++; |
213 | 212 | } |
214 | 213 | return $this->db->getInsertId(); |