Browse Source

Various torrent form fixes

Disables autofill on request format, adds Censored option to Other
category, etc
spaghetti 9 years ago
parent
commit
10f01778d1
3 changed files with 69 additions and 40 deletions
  1. 25
    13
      classes/torrent_form.class.php
  2. 28
    11
      sections/requests/new_edit.php
  3. 16
    16
      sections/schedule/index.php

+ 25
- 13
classes/torrent_form.class.php View File

61
 		$this->ArchivesManga = $ArchivesManga;
61
 		$this->ArchivesManga = $ArchivesManga;
62
 
62
 
63
 		if ($this->Torrent && $this->Torrent['GroupID']) {
63
 		if ($this->Torrent && $this->Torrent['GroupID']) {
64
-			$this->Disabled = ' disabled="disabled"';
64
+			$this->Disabled = ' readonly="readonly"';
65
 			$this->DisabledFlag = true;
65
 			$this->DisabledFlag = true;
66
 		}
66
 		}
67
 	}
67
 	}
103
 			if ($this->Torrent && $this->Torrent['GroupID']) {
103
 			if ($this->Torrent && $this->Torrent['GroupID']) {
104
 ?>
104
 ?>
105
 			<input type="hidden" name="groupid" value="<?=display_str($this->Torrent['GroupID'])?>" />
105
 			<input type="hidden" name="groupid" value="<?=display_str($this->Torrent['GroupID'])?>" />
106
-			<input type="hidden" name="type" value="<?=array_search($this->UploadForm, $this->Categories)?>" />
106
+			<input type="hidden" name="type" value="<?=display_str($this->Torrent['CategoryID'])?>" />
107
 <?
107
 <?
108
 			}
108
 			}
109
 			if ($this->Torrent && $this->Torrent['RequestID']) {
109
 			if ($this->Torrent && $this->Torrent['RequestID']) {
123
 			<tr>
123
 			<tr>
124
 				<td class="label">Type:</td>
124
 				<td class="label">Type:</td>
125
 				<td>
125
 				<td>
126
-					<select id="categories" name="type" onchange="Categories()"<?=$this->Disabled?>>
126
+					<select id="categories" name="type" onchange="Categories()"<?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
127
 <?
127
 <?
128
 			foreach (Misc::display_array($this->Categories) as $Index => $Cat) {
128
 			foreach (Misc::display_array($this->Categories) as $Index => $Cat) {
129
 				echo "\t\t\t\t\t\t<option value=\"$Index\"";
129
 				echo "\t\t\t\t\t\t<option value=\"$Index\"";
203
 			<tr id="javdb_tr">
203
 			<tr id="javdb_tr">
204
 				<td class="label tooltip" title='Enter a JAV catalogue number, e.g., "CND-060"'>Catalogue Number:</td>
204
 				<td class="label tooltip" title='Enter a JAV catalogue number, e.g., "CND-060"'>Catalogue Number:</td>
205
 				<td>
205
 				<td>
206
-					<input type="text" id="catalogue" name="catalogue" size="10" value="<?=display_str($Torrent['CatalogueNumber']) ?>"/>
207
-					 <input type="button" onclick="JavAutofill()" value="Autofill" <?=$this->Disabled?>></input>
206
+					<input type="text" id="catalogue" name="catalogue" size="10" value="<?=display_str($Torrent['CatalogueNumber']) ?>" <?=$this->Disabled?>/>
207
+<? if (!$this->DisabledFlag) { ?>
208
+					<input type="button" onclick="JavAutofill()" value="Autofill"></input>
209
+<? } ?>
208
 				</td>
210
 				</td>
209
 			</tr>
211
 			</tr>
210
 			<tr id="title_tr">
212
 			<tr id="title_tr">
403
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
405
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
404
 	}
406
 	}
405
 ?>
407
 ?>
406
-					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
408
+					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
407
 						<option>---</option>
409
 						<option>---</option>
408
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
410
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
409
 						<option value="<?=$Genre?>"><?=$Genre?></option>
411
 						<option value="<?=$Genre?>"><?=$Genre?></option>
459
 			<tr id="anidb_tr">
461
 			<tr id="anidb_tr">
460
 				<td class="label">AniDB Autofill (optional):</td>
462
 				<td class="label">AniDB Autofill (optional):</td>
461
 				<td>
463
 				<td>
462
-					<input type="text" id="anidb" size="10" />
463
-					<input type="button" onclick="AnidbAutofill()" value="Autofill" <?=$this->Disabled?>/>
464
+					<input type="text" id="anidb" size="10" <?=$this->Disabled?>/>
465
+<? if (!$this->DisabledFlag) { ?>
466
+					<input type="button" onclick="AnidbAutofill()" value="Autofill"/>
467
+<? } ?>
464
 				</td>
468
 				</td>
465
 			</tr>
469
 			</tr>
466
 			<tr id="title_tr">
470
 			<tr id="title_tr">
655
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
659
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
656
 	}
660
 	}
657
 ?>
661
 ?>
658
-					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
662
+					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
659
 						<option>---</option>
663
 						<option>---</option>
660
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
664
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
661
 						<option value="<?=$Genre?>"><?=$Genre?></option>
665
 						<option value="<?=$Genre?>"><?=$Genre?></option>
707
 				<td class="label">nhentai URL (optional):</td>
711
 				<td class="label">nhentai URL (optional):</td>
708
         <td>
712
         <td>
709
           <input type="text" id="catalogue" size="50" <?=$this->Disabled?> />
713
           <input type="text" id="catalogue" size="50" <?=$this->Disabled?> />
710
-					<input type="button" onclick="DoujAutofill()" value="Autofill" <?=$this->Disabled?>/>
714
+<? if (!$this->DisabledFlag) { ?>
715
+					<input type="button" onclick="DoujAutofill()" value="Autofill"/>
716
+<? } ?>
711
         </td>
717
         </td>
712
 			</tr>
718
 			</tr>
713
 			<tr id="title_tr">
719
 			<tr id="title_tr">
832
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
838
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
833
 	}
839
 	}
834
 ?>
840
 ?>
835
-					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
841
+					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
836
 						<option>---</option>
842
 						<option>---</option>
837
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
843
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
838
 						<option value="<?=$Genre?>"><?=$Genre?></option>
844
 						<option value="<?=$Genre?>"><?=$Genre?></option>
888
 				<td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?>/></td>
894
 				<td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?>/></td>
889
 			</tr>
895
 			</tr>
890
 <? } ?>
896
 <? } ?>
897
+			<tr>
898
+				<td class="label">Censored?:</td>
899
+				<td>
900
+					<input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
901
+				</td>
902
+			</tr>
891
 			<tr>
903
 			<tr>
892
 				<td class="label tooltip" title="Comma seperated list of tags">Tags:</td>
904
 				<td class="label tooltip" title="Comma seperated list of tags">Tags:</td>
893
 				<td>
905
 				<td>
903
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
915
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
904
 	}
916
 	}
905
 ?>
917
 ?>
906
-					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
918
+					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
907
 						<option>---</option>
919
 						<option>---</option>
908
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
920
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
909
 						<option value="<?=$Genre?>"><?=$Genre?></option>
921
 						<option value="<?=$Genre?>"><?=$Genre?></option>
1081
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
1093
 		G::$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
1082
 	}
1094
 	}
1083
 ?>
1095
 ?>
1084
-					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
1096
+					<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" <?=($this->DisabledFlag) ? ' disabled="disabled"' : ''?>>
1085
 						<option>---</option>
1097
 						<option>---</option>
1086
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
1098
 <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
1087
 						<option value="<?=$Genre?>"><?=$Genre?></option>
1099
 						<option value="<?=$Genre?>"><?=$Genre?></option>

+ 28
- 11
sections/requests/new_edit.php View File

16
 	}
16
 	}
17
 }
17
 }
18
 
18
 
19
+$Disabled = "";
19
 
20
 
20
 if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
21
 if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
21
 	error('You do not have enough uploaded to make a request.');
22
 	error('You do not have enough uploaded to make a request.');
89
 		WHERE tg.ID = ".$_GET['groupid']);
90
 		WHERE tg.ID = ".$_GET['groupid']);
90
 	if (list($Title, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
91
 	if (list($Title, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
91
 		$GroupID = trim($_REQUEST['groupid']);
92
 		$GroupID = trim($_REQUEST['groupid']);
93
+		$CategoryName = $Categories[$CategoryID - 1];
94
+		$Disabled = 'readonly="readonly"';
92
 	}
95
 	}
93
 }
96
 }
94
 
97
 
119
 						Type
122
 						Type
120
 					</td>
123
 					</td>
121
 					<td>
124
 					<td>
125
+<? if (!empty($Disabled)) { ?>
126
+						<input type="hidden" name="type" value="<?=$CategoryName?>" />
127
+						<select id="categories" name="type" onchange="Categories();" disabled="disabled">
128
+<? } else { ?>
122
 						<select id="categories" name="type" onchange="Categories();">
129
 						<select id="categories" name="type" onchange="Categories();">
130
+<? } ?>
123
 <?		foreach (Misc::display_array($Categories) as $Cat) { ?>
131
 <?		foreach (Misc::display_array($Categories) as $Cat) { ?>
124
 							<option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option>
132
 							<option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option>
125
 <?		} ?>
133
 <?		} ?>
129
 				<tr id="cataloguenumber_tr">
137
 				<tr id="cataloguenumber_tr">
130
 					<td class="label">Catalogue Number</td>
138
 					<td class="label">Catalogue Number</td>
131
 					<td>
139
 					<td>
132
-						<input type="text" id="catalogue" name="cataloguenumber" size="15" value="<?=(isset($CatalogueNumber)?$CatalogueNumber:'') ?>" />
140
+						<input type="text" id="catalogue" name="cataloguenumber" size="15" value="<?=(isset($CatalogueNumber)?$CatalogueNumber:'') ?>" <?=$Disabled?>/>
141
+<? if (empty($Disabled)) { ?>
133
 						( <input type="button" onclick="JavAutofill()" value="Autofill" style="font-size:0.8em;"></input> )
142
 						( <input type="button" onclick="JavAutofill()" value="Autofill" style="font-size:0.8em;"></input> )
143
+<? } ?>
134
 					</td>
144
 					</td>
135
 				</tr>
145
 				</tr>
136
 				<tr id="artist_tr">
146
 				<tr id="artist_tr">
142
 			$First = true;
152
 			$First = true;
143
 			foreach ($ArtistForm as $Artist) {
153
 			foreach ($ArtistForm as $Artist) {
144
 ?>
154
 ?>
145
-						<input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" />
146
-						<? if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a><? } $First = false; ?>
155
+						<input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" <?=$Disabled?>/>
156
+						<? if (empty($Disabled)) { if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a><? } $First = false; } ?>
147
 						<br />
157
 						<br />
148
 <?
158
 <?
149
 			}
159
 			}
150
 		} else {
160
 		} else {
151
-?>						<input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" onblur="CheckVA();" />
161
+?>						<input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" onblur="CheckVA();" <?=$Disabled?>/>
162
+<? if (empty($Disabled)) { ?>
152
 						<a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a>
163
 						<a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a>
164
+<? } ?>
153
 <?
165
 <?
154
 		}
166
 		}
155
 ?>
167
 ?>
158
 				<tr>
170
 				<tr>
159
 					<td class="label">Title</td>
171
 					<td class="label">Title</td>
160
 					<td>
172
 					<td>
161
-						<input type="text" id="title" name="title" size="45" value="<?=(!empty($Title) ? $Title : '')?>" />
173
+						<input type="text" id="title" name="title" size="45" value="<?=(!empty($Title) ? $Title : '')?>" <?=$Disabled?>/>
162
 					</td>
174
 					</td>
163
 				</tr>
175
 				</tr>
164
 				<tr>
176
 				<tr>
165
 					<td class="label">Japanese Title</td>
177
 					<td class="label">Japanese Title</td>
166
 					<td>
178
 					<td>
167
-						<input type="text" id="title_jp" name="title_jp" size="45" value="<?=isset($TitleJP)?$TitleJP:''?>" />
179
+						<input type="text" id="title_jp" name="title_jp" size="45" value="<?=isset($TitleJP)?$TitleJP:''?>" <?=$Disabled?>/>
168
 					</td>
180
 					</td>
169
 				</tr>
181
 				</tr>
170
 				<tr id="dlsiteid_tr">
182
 				<tr id="dlsiteid_tr">
171
 					<td class="label">DLSite ID</td>
183
 					<td class="label">DLSite ID</td>
172
 					<td>
184
 					<td>
173
-						<input type="text" id="dlsiteid" name="dlsiteid" size="15" value="<?=isset($DLsiteID)?$DLsiteID:''?>" />
185
+						<input type="text" id="dlsiteid" name="dlsiteid" size="15" value="<?=isset($DLsiteID)?$DLsiteID:''?>" <?=$Disabled?>/>
174
 					</td>
186
 					</td>
175
 				</tr>
187
 				</tr>
176
 <?	} ?>
188
 <?	} ?>
178
 				<tr id="image_tr">
190
 				<tr id="image_tr">
179
 					<td class="label">Image</td>
191
 					<td class="label">Image</td>
180
 					<td>
192
 					<td>
181
-						<input type="text" id="image" name="image" size="45" value="<?=(!empty($Image) ? $Image : '')?>" />
193
+						<input type="text" id="image" name="image" size="45" value="<?=(!empty($Image) ? $Image : '')?>" <?=$Disabled?>/>
182
 					</td>
194
 					</td>
183
 				</tr>
195
 				</tr>
184
 <?	} ?>
196
 <?	} ?>
196
 		$GenreTags = $DB->collect('Name');
208
 		$GenreTags = $DB->collect('Name');
197
 		$Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
209
 		$Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
198
 	}
210
 	}
211
+
212
+	if (!empty($Disabled)) {
199
 ?>
213
 ?>
200
-						<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
214
+						<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" disabled="disabled">
215
+<? } else { ?>
216
+						<select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" >
217
+<? } ?>
201
 							<option>---</option>
218
 							<option>---</option>
202
 <?	foreach (Misc::display_array($GenreTags) as $Genre) { ?>
219
 <?	foreach (Misc::display_array($GenreTags) as $Genre) { ?>
203
 							<option value="<?=$Genre?>"><?=$Genre?></option>
220
 							<option value="<?=$Genre?>"><?=$Genre?></option>
204
 <?	} ?>
221
 <?	} ?>
205
 						</select>
222
 						</select>
206
-						<input type="text" id="tags" name="tags" size="45" value="<?=(!empty($Tags) ? display_str($Tags) : '')?>"<? Users::has_autocomplete_enabled('other'); ?> />
223
+						<input type="text" id="tags" name="tags" size="45" value="<?=(!empty($Tags) ? display_str($Tags) : '')?>"<? Users::has_autocomplete_enabled('other'); ?> <?=$Disabled?>/>
207
 						<br />
224
 						<br />
208
 						Tags should be comma-separated, and you should use a period (".") to separate words inside a tag&#8202;&mdash;&#8202;e.g. "<strong class="important_text_alt">big.breasts</strong>".
225
 						Tags should be comma-separated, and you should use a period (".") to separate words inside a tag&#8202;&mdash;&#8202;e.g. "<strong class="important_text_alt">big.breasts</strong>".
209
 						<br /><br />
226
 						<br /><br />
222
 				<tr>
239
 				<tr>
223
 					<td class="label">Torrent group</td>
240
 					<td class="label">Torrent group</td>
224
 					<td>
241
 					<td>
225
-						<?=site_url()?>torrents.php?id=<input type="text" name="groupid" value="<?=isset($GroupID)?$GroupID:''?>" size="15" /><br />
242
+						<?=site_url()?>torrents.php?id=<input type="text" name="groupid" value="<?=isset($GroupID)?$GroupID:''?>" size="15"/><br />
226
 						If this request matches a torrent group <span style="font-weight: bold;">already existing</span> on the site, please indicate that here.
243
 						If this request matches a torrent group <span style="font-weight: bold;">already existing</span> on the site, please indicate that here.
227
 					</td>
244
 					</td>
228
 				</tr>
245
 				</tr>

+ 16
- 16
sections/schedule/index.php View File

10
 
10
 
11
 $PCount = chop(shell_exec("/usr/bin/pgrep -cf schedule.php"));
11
 $PCount = chop(shell_exec("/usr/bin/pgrep -cf schedule.php"));
12
 if ($PCount > 3) {  // 3 because the cron job starts two processes and pgrep finds itself
12
 if ($PCount > 3) {  // 3 because the cron job starts two processes and pgrep finds itself
13
-	die("schedule.php is already running. Exiting ($PCount)\n");
13
+  die("schedule.php is already running. Exiting ($PCount)\n");
14
 }
14
 }
15
 
15
 
16
 $AS = check_perms('admin_schedule');
16
 $AS = check_perms('admin_schedule');
28
 }
28
 }
29
 
29
 
30
 if ((!isset($_REQUEST['key']) || $_REQUEST['key'] != SCHEDULE_KEY) && !$AS) {
30
 if ((!isset($_REQUEST['key']) || $_REQUEST['key'] != SCHEDULE_KEY) && !$AS) {
31
-	error(403);
31
+  error(403);
32
 }
32
 }
33
 
33
 
34
 if ($AS) {
34
 if ($AS) {
35
-	authorize();
36
-	View::show_header();
37
-	echo '<div class="box">';
35
+  authorize();
36
+  View::show_header();
37
+  echo '<div class="box">';
38
 }
38
 }
39
 
39
 
40
 $DB->query("
40
 $DB->query("
41
-	SELECT NextHour, NextDay, NextBiWeekly
42
-	FROM schedule");
41
+  SELECT NextHour, NextDay, NextBiWeekly
42
+  FROM schedule");
43
 list($Hour, $Day, $BiWeek) = $DB->next_record();
43
 list($Hour, $Day, $BiWeek) = $DB->next_record();
44
 
44
 
45
 $NextHour = date('H', time(date('H') + 1, 0, 0, date('m'), date('d'), date('Y')));
45
 $NextHour = date('H', time(date('H') + 1, 0, 0, date('m'), date('d'), date('Y')));
47
 $NextBiWeek = (date('d') < 22 && date('d') >= 8) ? 22 : 8;
47
 $NextBiWeek = (date('d') < 22 && date('d') >= 8) ? 22 : 8;
48
 
48
 
49
 $DB->query("
49
 $DB->query("
50
-	UPDATE schedule
51
-	SET NextHour = $NextHour, NextDay = $NextDay, NextBiWeekly = $NextBiWeek");
50
+  UPDATE schedule
51
+  SET NextHour = $NextHour, NextDay = $NextDay, NextBiWeekly = $NextBiWeek");
52
 
52
 
53
 $sqltime = sqltime();
53
 $sqltime = sqltime();
54
 
54
 
63
 //-------------- Run every hour ------------------------------------------//
63
 //-------------- Run every hour ------------------------------------------//
64
 if ($Hour != $NextHour || (isset($_GET['runhour']) && $_GET['runhour'])) {
64
 if ($Hour != $NextHour || (isset($_GET['runhour']) && $_GET['runhour'])) {
65
   run_all_in('hourly');
65
   run_all_in('hourly');
66
-	echo "Ran hourly functions".($AS?'<br>':"\n");
66
+  echo "Ran hourly functions".($AS?'<br>':"\n");
67
 }
67
 }
68
 
68
 
69
 //-------------- Run every day -------------------------------------------//
69
 //-------------- Run every day -------------------------------------------//
70
 if ($Day != $NextDay || (isset($_GET['runday']) && $_GET['runday'])) {
70
 if ($Day != $NextDay || (isset($_GET['runday']) && $_GET['runday'])) {
71
   run_all_in('daily');
71
   run_all_in('daily');
72
-	echo "Ran daily functions".($AS?'<br>':"\n");
72
+  echo "Ran daily functions".($AS?'<br>':"\n");
73
 }
73
 }
74
 
74
 
75
 //-------------- Run every week -------------------------------------------//
75
 //-------------- Run every week -------------------------------------------//
81
 //--------------- Run twice per month -------------------------------------//
81
 //--------------- Run twice per month -------------------------------------//
82
 if ($BiWeek != $NextBiWeek || (isset($_GET['runbiweek']) && $_GET['runbiweek'])) {
82
 if ($BiWeek != $NextBiWeek || (isset($_GET['runbiweek']) && $_GET['runbiweek'])) {
83
   run_all_in('biweekly');
83
   run_all_in('biweekly');
84
-	echo "Ran bi-weekly functions".($AS?'<br>':"\n");
84
+  echo "Ran bi-weekly functions".($AS?'<br>':"\n");
85
 }
85
 }
86
 
86
 
87
 //---------------- Run every month -----------------------------------------//
87
 //---------------- Run every month -----------------------------------------//
88
 if (($BiWeek != $NextBiWeek && $BiWeek == 8) || (isset($_GET['runmonth']) && $_GET['runmonth'])) {
88
 if (($BiWeek != $NextBiWeek && $BiWeek == 8) || (isset($_GET['runmonth']) && $_GET['runmonth'])) {
89
   run_all_in('monthly');
89
   run_all_in('monthly');
90
-	echo "Ran monthly functions".($AS?'<br>':"\n");
90
+  echo "Ran monthly functions".($AS?'<br>':"\n");
91
 }
91
 }
92
 
92
 
93
 //---------------- Run on request ------------------------------------------//
93
 //---------------- Run on request ------------------------------------------//
94
 if (isset($_GET['runmanual']) && $_GET['runmanual']) {
94
 if (isset($_GET['runmanual']) && $_GET['runmanual']) {
95
   run_all_in('manually');
95
   run_all_in('manually');
96
-	echo "Ran manual functions".($AS?'<br>':"\n");
96
+  echo "Ran manual functions".($AS?'<br>':"\n");
97
 }
97
 }
98
 
98
 
99
 if ($AS) {
99
 if ($AS) {
100
-	echo '</div>';
101
-	View::show_footer();
100
+  echo '</div>';
101
+  View::show_footer();
102
 } else {
102
 } else {
103
   echo "-------------------------\n\n";
103
   echo "-------------------------\n\n";
104
 }
104
 }

Loading…
Cancel
Save