plugins/SpecialUserFuncs.php
branch1.1.7-maintenance
changeset 1257 7365c9bf2106
parent 1158 e733f984c990
equal deleted inserted replaced
1190:fa306d7af9ce 1257:7365c9bf2106
  1234                     echo '<option value="'.$t['theme_id'].'"';
  1234                     echo '<option value="'.$t['theme_id'].'"';
  1235                     if ( $t['theme_id'] == $session->theme )
  1235                     if ( $t['theme_id'] == $session->theme )
  1236                     {
  1236                     {
  1237                       echo ' selected="selected"';
  1237                       echo ' selected="selected"';
  1238                     }
  1238                     }
  1239                     echo '>' . $t['theme_name'] . '</option>';
  1239                     echo '>' . htmlspecialchars($t['theme_name']) . '</option>';
  1240                   }
  1240                   }
  1241                 }
  1241                 }
  1242                ?>
  1242                ?>
  1243               </select>
  1243               </select>
  1244             </p>
  1244             </p>
  1245             <p><input type="hidden" name="return_to" value="<?php echo $ret; ?>" />
  1245             <p><input type="hidden" name="return_to" value="<?php echo htmlspecialchars($ret); ?>" />
  1246                <input type="submit" name="themeselected" value="<?php echo $lang->get('userfuncs_changetheme_btn_continue'); ?>" /></p>
  1246                <input type="submit" name="themeselected" value="<?php echo $lang->get('userfuncs_changetheme_btn_continue'); ?>" /></p>
  1247           <?php } else { 
  1247           <?php } else { 
  1248             $theme = $_POST['theme'];
  1248             $theme = $_POST['theme'];
  1249             if ( !preg_match('/^([0-9A-z_-]+)$/i', $theme ) )
  1249             if ( !preg_match('/^([0-9A-z_-]+)$/i', $theme ) )
  1250               die('Hacking attempt');
  1250               die('Hacking attempt');
  1266                       closedir($dh);
  1266                       closedir($dh);
  1267                     }
  1267                     }
  1268                   } else die($dir.' is not a dir');
  1268                   } else die($dir.' is not a dir');
  1269                   foreach ( $list as $l )
  1269                   foreach ( $list as $l )
  1270                   {
  1270                   {
  1271                     echo '<option value="'.$l.'">'.capitalize_first_letter($l).'</option>';
  1271                     echo '<option value="'.$l.'">'.ucfirst($l).'</option>';
  1272                   }
  1272                   }
  1273                 ?>
  1273                 ?>
  1274               </select>
  1274               </select>
  1275             </p>
  1275             </p>
  1276             <p><input type="hidden" name="return_to" value="<?php echo $ret; ?>" />
  1276             <p><input type="hidden" name="return_to" value="<?php echo htmlspecialchars($ret); ?>" />
  1277                <input type="hidden" name="theme" value="<?php echo $theme; ?>" />
  1277                <input type="hidden" name="theme" value="<?php echo htmlspecialchars($theme); ?>" />
  1278                <input type="submit" name="allclear" value="<?php echo $lang->get('userfuncs_changetheme_btn_allclear'); ?>" /></p>
  1278                <input type="submit" name="allclear" value="<?php echo $lang->get('userfuncs_changetheme_btn_allclear'); ?>" /></p>
  1279           <?php } ?>
  1279           <?php } ?>
  1280         </form>
  1280         </form>
  1281       <?php
  1281       <?php
  1282     $template->footer();
  1282     $template->footer();