plugins/SpecialUserFuncs.php
changeset 1253 13f8d373da67
parent 1243 db42b7c50e57
child 1266 f3933b355229
equal deleted inserted replaced
1252:e34c23a35dc9 1253:13f8d373da67
  1242 										echo '<option value="'.$t['theme_id'].'"';
  1242 										echo '<option value="'.$t['theme_id'].'"';
  1243 										if ( $t['theme_id'] == $session->theme )
  1243 										if ( $t['theme_id'] == $session->theme )
  1244 										{
  1244 										{
  1245 											echo ' selected="selected"';
  1245 											echo ' selected="selected"';
  1246 										}
  1246 										}
  1247 										echo '>' . $t['theme_name'] . '</option>';
  1247 										echo '>' . htmlspecialchars($t['theme_name']) . '</option>';
  1248 									}
  1248 									}
  1249 								}
  1249 								}
  1250  							?>
  1250  							?>
  1251 							</select>
  1251 							</select>
  1252 						</p>
  1252 						</p>
  1253 						<p><input type="hidden" name="return_to" value="<?php echo $ret; ?>" />
  1253 						<p><input type="hidden" name="return_to" value="<?php echo htmlspecialchars($ret); ?>" />
  1254  							<input type="submit" name="themeselected" value="<?php echo $lang->get('userfuncs_changetheme_btn_continue'); ?>" /></p>
  1254  							<input type="submit" name="themeselected" value="<?php echo $lang->get('userfuncs_changetheme_btn_continue'); ?>" /></p>
  1255 					<?php } else { 
  1255 					<?php } else { 
  1256 						$theme = $_POST['theme'];
  1256 						$theme = $_POST['theme'];
  1257 						if ( !preg_match('/^([0-9A-z_-]+)$/i', $theme ) )
  1257 						if ( !preg_match('/^([0-9A-z_-]+)$/i', $theme ) )
  1258 							die('Hacking attempt');
  1258 							die('Hacking attempt');
  1274 											closedir($dh);
  1274 											closedir($dh);
  1275 										}
  1275 										}
  1276 									} else die($dir.' is not a dir');
  1276 									} else die($dir.' is not a dir');
  1277 									foreach ( $list as $l )
  1277 									foreach ( $list as $l )
  1278 									{
  1278 									{
  1279 										echo '<option value="'.$l.'">'.capitalize_first_letter($l).'</option>';
  1279 										echo '<option value="'.$l.'">'.ucfirst($l).'</option>';
  1280 									}
  1280 									}
  1281 								?>
  1281 								?>
  1282 							</select>
  1282 							</select>
  1283 						</p>
  1283 						</p>
  1284 						<p><input type="hidden" name="return_to" value="<?php echo $ret; ?>" />
  1284 						<p><input type="hidden" name="return_to" value="<?php echo htmlspecialchars($ret); ?>" />
  1285  							<input type="hidden" name="theme" value="<?php echo $theme; ?>" />
  1285  							<input type="hidden" name="theme" value="<?php echo htmlspecialchars($theme); ?>" />
  1286  							<input type="submit" name="allclear" value="<?php echo $lang->get('userfuncs_changetheme_btn_allclear'); ?>" /></p>
  1286  							<input type="submit" name="allclear" value="<?php echo $lang->get('userfuncs_changetheme_btn_allclear'); ?>" /></p>
  1287 					<?php } ?>
  1287 					<?php } ?>
  1288 				</form>
  1288 				</form>
  1289 			<?php
  1289 			<?php
  1290 		$template->footer();
  1290 		$template->footer();