comparison showajax.php @ 1120:b2bca5f6d0ff default tip

Cosmetic cleanup: remove trailing whitespace.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 13 Dec 2020 13:47:13 +0200
parents 0a2117349f46
children
comparison
equal deleted inserted replaced
1119:a4daa7ea7479 1120:b2bca5f6d0ff
9 9
10 10
11 function stPrintCompoEntry($entry, $class, $compo, $title = FALSE) 11 function stPrintCompoEntry($entry, $class, $compo, $title = FALSE)
12 { 12 {
13 echo 13 echo
14 " <div class=\"".$class."\">\n"; 14 " <div class=\"".$class."\">\n";
15 15
16 if ($title !== FALSE) 16 if ($title !== FALSE)
17 echo 17 echo
18 " <div class=\"entryTitle\">".$title."</div>\n"; 18 " <div class=\"entryTitle\">".$title."</div>\n";
19 19
20 echo 20 echo
44 " <div class=\"compoTitle\">".chentities($compo["name"])." competition</div>\n". 44 " <div class=\"compoTitle\">".chentities($compo["name"])." competition</div>\n".
45 " </div>\n"; 45 " </div>\n";
46 46
47 if ($entry === FALSE && $prev === FALSE) 47 if ($entry === FALSE && $prev === FALSE)
48 echo "<div class=\"compoStarting\">... Is about to start ...</div>"; 48 echo "<div class=\"compoStarting\">... Is about to start ...</div>";
49 49
50 if ($entry !== FALSE) 50 if ($entry !== FALSE)
51 stPrintCompoEntry($entry, "compoNext", $compo, FALSE); 51 stPrintCompoEntry($entry, "compoNext", $compo, FALSE);
52 52
53 if ($prev !== FALSE) 53 if ($prev !== FALSE)
54 stPrintCompoEntry($prev, "compoPrev", $compo, "Previous entry"); 54 stPrintCompoEntry($prev, "compoPrev", $compo, "Previous entry");
55 } 55 }
56 56
57 57
117 case SMODE_ROTATE: 117 case SMODE_ROTATE:
118 // 118 //
119 // Rotation / normal slide show mode 119 // Rotation / normal slide show mode
120 // 120 //
121 stSetDisplayVar("activeSlideMode", SMODE_ROTATE); 121 stSetDisplayVar("activeSlideMode", SMODE_ROTATE);
122 122
123 if (stGetDisplayVar("rotateList") == 0) 123 if (stGetDisplayVar("rotateList") == 0)
124 { 124 {
125 stSetDisplayVar("rotateList", 1); 125 stSetDisplayVar("rotateList", 1);
126 stSetDisplayVar("activeSlideExpire", 0); 126 stSetDisplayVar("activeSlideExpire", 0);
127 $updated = TRUE; 127 $updated = TRUE;
140 { 140 {
141 // Get slide at current index 141 // Get slide at current index
142 $slides = array(); 142 $slides = array();
143 foreach ($slideList as $slide) 143 foreach ($slideList as $slide)
144 $slides[] = $slide; 144 $slides[] = $slide;
145 145
146 $index = stGetDisplayVar("rotateListIndex"); 146 $index = stGetDisplayVar("rotateListIndex");
147 if (count($slides) > $index) 147 if (count($slides) > $index)
148 { 148 {
149 $slide_id = $slides[$index]["slide_id"]; 149 $slide_id = $slides[$index]["slide_id"];
150 if ($slide_id != stGetDisplayVar("activeSlide")) 150 if ($slide_id != stGetDisplayVar("activeSlide"))
156 } 156 }
157 157
158 // Rotate to next slide 158 // Rotate to next slide
159 if (++$index >= count($slides)) 159 if (++$index >= count($slides))
160 $index = 0; 160 $index = 0;
161 161
162 stSetDisplayVar("rotateListIndex", $index); 162 stSetDisplayVar("rotateListIndex", $index);
163 } 163 }
164 } 164 }
165 break; 165 break;
166 166
167 case SMODE_COMPO: 167 case SMODE_COMPO:
168 // 168 //
169 // Competition mode, is controlled from admin UI, so we donẗ 169 // Competition mode, is controlled from admin UI, so we donẗ
170 // actually do anything here. 170 // actually do anything here.
171 // 171 //
230 stPrintRotationSlide($slide["text"]); 230 stPrintRotationSlide($slide["text"]);
231 } 231 }
232 else 232 else
233 stGuruMeditation(); 233 stGuruMeditation();
234 break; 234 break;
235 235
236 case SMODE_COMPO: 236 case SMODE_COMPO:
237 // Competition mode, show entry data 237 // Competition mode, show entry data
238 $compo_id = stGetDisplayVar("compoID"); 238 $compo_id = stGetDisplayVar("compoID");
239 $compo = stFetchSQL(stPrepareSQL( 239 $compo = stFetchSQL(stPrepareSQL(
240 "SELECT * FROM compos WHERE id=%d", 240 "SELECT * FROM compos WHERE id=%d",
257 default: 257 default:
258 stGuruMeditation(); 258 stGuruMeditation();
259 break; 259 break;
260 } 260 }
261 break; 261 break;
262 262
263 default: 263 default:
264 stGuruMeditation(); 264 stGuruMeditation();
265 break; 265 break;
266 } 266 }
267 break; 267 break;