Редакция 267 | Редакция 279 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 267 | Редакция 278 | ||
---|---|---|---|
Строка 28... | Строка 28... | ||
28 | $uid = $secure->wrapInt($_GET["uid"]); |
28 | $uid = $secure->wrapInt($_GET["uid"]); |
29 | $err = $secure->wrapInt($_GET["error"]); |
29 | $err = $secure->wrapInt($_GET["error"]); |
30 | 30 | ||
31 | // Admin file/interface
|
31 | // Admin file/interface
|
32 | $admin = "./admin.php"; |
32 | $admin = "./admin.php"; |
33 | $imgdir = "./themes/icons/".$core->getSetting('icons',$db); |
33 | $imgdir = "./themes/icons/".$theme->getIconSetName($core,$db); |
34 | 34 | ||
35 | switch ($err) { |
35 | switch ($err) { |
36 | case '1': |
36 | case '1': |
37 | $error = _("Password error: the password is incorrect!"); |
37 | $error = _("Password error: the password is incorrect!"); |
38 | break; |
38 | break; |
Строка 896... | Строка 896... | ||
896 | $chtheme = $secure->wrapStr($_GET["chtheme"]); |
896 | $chtheme = $secure->wrapStr($_GET["chtheme"]); |
897 | $chicon = $secure->wrapStr($_GET["chicon"]); |
897 | $chicon = $secure->wrapStr($_GET["chicon"]); |
898 | $theme->SetTheme($chtheme,$db); |
898 | $theme->SetTheme($chtheme,$db); |
899 | $theme->setIcon($chicon,$db); |
899 | $theme->setIcon($chicon,$db); |
900 | $display.='<p style="color:red;">Тема измененна</p>'; |
900 | $display.='<p style="color:red;">Тема измененна</p>'; |
901 | - | ||
902 | }
|
901 | }
|
903 | $themename = $theme->getThemeName($core,$db); // TODO нарисавать интерфейс поюзабельнее |
902 | $themename = $theme->getThemeName($core,$db); |
904 | $display.= '<b>Текущая тема: '.$themename.'</b><br>'; |
903 | $iconsname = $theme->getIconSetName($core,$db); |
- | 904 | ||
905 | $display.= '<form action="admin.php" method="GET">'; |
905 | $display.= '<form action="admin.php" method="GET">'; |
906 | $display.= '<input type="hidden" name="mode" value="23">'; |
906 | $display.= '<input type="hidden" name="mode" value="23">'; |
907 | $display.= 'Тема:'; |
907 | $display.='<table>'; |
- | 908 | $display.='<tr><td>Текущий стиль:</td><td><b>'.$themename.'</b></td><td>'; |
|
908 | $display.= '<select id="cht" name="chtheme">'; |
909 | $display.= '<select id="cht" name="chtheme">'; |
909 | $dis=$theme->getThemesList('style'); |
910 | $dis=$theme->getThemesList('style'); |
910 | foreach ($dis as $thm){ |
911 | foreach ($dis as $thm){ |
- | 912 | if($themename==$thm){ |
|
- | 913 | $display.= '<option selected>'.$thm.'</option>'; |
|
- | 914 | }else{ |
|
911 | $display.= '<option>'.$thm.'</option>';//TODO add 'selected' to theme |
915 | $display.= '<option>'.$thm.'</option>'; |
- | 916 | }
|
|
912 | }
|
917 | }
|
913 | $display.= '</select><br>Набор иконок:'; |
918 | $display.= '</select></td></tr>'; |
- | 919 | $display.='<tr><td>Текущий набор иконок:</td><td><b>'.$iconsname.'</b></td><td>'; |
|
914 | $display.= '<select id="chi" name="chicon">'; |
920 | $display.= '<select id="chi" name="chicon">'; |
915 | $dis=$theme->getThemesList('icon'); |
921 | $dis=$theme->getThemesList('icon'); |
916 | foreach ($dis as $thm){ |
922 | foreach ($dis as $thm){ |
- | 923 | if($iconsname==$thm){ |
|
- | 924 | $display.= '<option selected>'.$thm.'</option>'; |
|
- | 925 | }else{ |
|
917 | $display.= '<option>'.$thm.'</option>';//TODO add 'selected' to theme |
926 | $display.= '<option>'.$thm.'</option>'; |
- | 927 | }
|
|
918 | }
|
928 | }
|
919 | $display.= '</select><br>'; |
929 | $display.= '</select></td></tr></table>'; |
920 | $display.= '<button type="submit">Сменить тему</button>'; |
930 | $display.= '<button type="submit">Сменить тему</button>'; |
921 | $display.= '</form>'; |
931 | $display.= '</form>'; |
922 | break; |
932 | break; |
923 | // }
|
- | |
924 | break; |
933 | break; |
925 | }
|
934 | }
|
926 | 935 | ||
927 | 936 | ||
928 | $display .= "</div></div>"; |
937 | $display .= "</div></div>"; |