What are the syntax errors?
PHP belongs to the C-style and imperative programming languages. It has rigid grammar rules, which it cannot recover from when encountering misplaced symbols or identifiers. It can’t guess your coding intentions.
Most important tips
There are a few basic precautions you can always take:
-
Use proper code indentation, or adopt any lofty coding style.
Readability prevents irregularities. -
Use an IDE or editor for PHP with syntax highlighting.
Which also help with parentheses/bracket balancing. -
Read the language reference and examples in the manual.
Twice, to become somewhat proficient.
How to interpret parser errors
A typical syntax error message reads:
Parse error: syntax error, unexpected T_STRING, expecting ‘
;
‘ in file.php on line 217
Which lists the possible location of a syntax mistake. See the mentioned file name and line number.
A moniker such as T_STRING
explains which symbol the parser/tokenizer couldn’t process finally. This isn’t necessarily the cause of the syntax mistake, however.
It’s important to look into previous code lines as well. Often syntax errors are just mishaps that happened earlier. The error line number is just where the parser conclusively gave up to process it all.
Solving syntax errors
There are many approaches to narrow down and fix syntax hiccups.
-
Open the mentioned source file. Look at the mentioned code line.
-
For runaway strings and misplaced operators, this is usually where you find the culprit.
-
Read the line left to right and imagine what each symbol does.
-
-
More regularly you need to look at preceding lines as well.
-
In particular, missing
;
semicolons are missing at the previous line ends/statement. (At least from the stylistic viewpoint. ) -
If
{
code blocks}
are incorrectly closed or nested, you may need to investigate even further up the source code. Use proper code indentation to simplify that.
-
-
Look at the syntax colorization!
-
Strings and variables and constants should all have different colors.
-
Operators
+-*/.
should be tinted distinct as well. Else they might be in the wrong context. -
If you see string colorization extend too far or too short, then you have found an unescaped or missing closing
"
or'
string marker. -
Having two same-colored punctuation characters next to each other can also mean trouble. Usually, operators are lone if it’s not
++
,--
, or parentheses following an operator. Two strings/identifiers directly following each other are incorrect in most contexts.
-
-
Whitespace is your friend.
Follow any coding style. -
Break up long lines temporarily.
-
You can freely add newlines between operators or constants and strings. The parser will then concretize the line number for parsing errors. Instead of looking at the very lengthy code, you can isolate the missing or misplaced syntax symbol.
-
Split up complex
if
statements into distinct or nestedif
conditions. -
Instead of lengthy math formulas or logic chains, use temporary variables to simplify the code. (More readable = fewer errors.)
-
Add newlines between:
- The code you can easily identify as correct,
- The parts you’re unsure about,
- And the lines which the parser complains about.
Partitioning up long code blocks really helps to locate the origin of syntax errors.
-
-
Comment out offending code.
-
If you can’t isolate the problem source, start to comment out (and thus temporarily remove) blocks of code.
-
As soon as you got rid of the parsing error, you have found the problem source. Look more closely there.
-
Sometimes you want to temporarily remove complete function/method blocks. (In case of unmatched curly braces and wrongly indented code.)
-
When you can’t resolve the syntax issue, try to rewrite the commented out sections from scratch.
-
-
As a newcomer, avoid some of the confusing syntax constructs.
-
The ternary
? :
condition operator can compact code and is useful indeed. But it doesn’t aid readability in all cases. Prefer plainif
statements while unversed. -
PHP’s alternative syntax (
if:
/elseif:
/endif;
) is common for templates, but arguably less easy to follow than normal{
code}
blocks.
-
-
The most prevalent newcomer mistakes are:
-
Missing semicolons
;
for terminating statements/lines. -
Mismatched string quotes for
"
or'
and unescaped quotes within. -
Forgotten operators, in particular for the string
.
concatenation. -
Unbalanced
(
parentheses)
. Count them in the reported line. Are there an equal number of them?
-
-
Don’t forget that solving one syntax problem can uncover the next.
-
If you make one issue go away, but other crops up in some code below, you’re mostly on the right path.
-
If after editing a new syntax error crops up in the same line, then your attempted change was possibly a failure. (Not always though.)
-
-
Restore a backup of previously working code, if you can’t fix it.
- Adopt a source code versioning system. You can always view a
diff
of the broken and last working version. Which might be enlightening as to what the syntax problem is.
- Adopt a source code versioning system. You can always view a
-
Invisible stray Unicode characters: In some cases, you need to use a hexeditor or different editor/viewer on your source. Some problems cannot be found just from looking at your code.
-
Try
grep --color -P -n "[x80-xFF]" file.php
as the first measure to find non-ASCII symbols. -
In particular BOMs, zero-width spaces, or non-breaking spaces, and smart quotes regularly can find their way into the source code.
-
-
Take care of which type of linebreaks are saved in files.
-
PHP just honors n newlines, not r carriage returns.
-
Which is occasionally an issue for MacOS users (even on OS X for misconfigured editors).
-
It often only surfaces as an issue when single-line
//
or#
comments are used. Multiline/*...*/
comments do seldom disturb the parser when linebreaks get ignored.
-
-
If your syntax error does not transmit over the web:
It happens that you have a syntax error on your machine. But posting the very same file online does not exhibit it anymore. Which can only mean one of two things:-
You are looking at the wrong file!
-
Or your code contained invisible stray Unicode (see above).
You can easily find out: Just copy your code back from the web form into your text editor.
-
-
Check your PHP version. Not all syntax constructs are available on every server.
-
php -v
for the command line interpreter -
<?php phpinfo();
for the one invoked through the webserver.
Those aren’t necessarily the same. In particular when working with frameworks, you will them to match up.
-
-
Don’t use PHP’s reserved keywords as identifiers for functions/methods, classes or constants.
-
Trial-and-error is your last resort.
If all else fails, you can always google your error message. Syntax symbols aren’t as easy to search for (Stack Overflow itself is indexed by SymbolHound though). Therefore it may take looking through a few more pages before you find something relevant.
Further guides:
- PHP Debugging Basics by David Sklar
- Fixing PHP Errors by Jason McCreary
- PHP Errors – 10 Common Mistakes by Mario Lurig
- Common PHP Errors and Solutions
- How to Troubleshoot and Fix your WordPress Website
- A Guide To PHP Error Messages For Designers — Smashing Magazine
White screen of death
If your website is just blank, then typically a syntax error is the cause.
Enable their display with:
error_reporting = E_ALL
display_errors = 1
In your php.ini
generally, or via .htaccess
for mod_php,
or even .user.ini
with FastCGI setups.
Enabling it within the broken script is too late because PHP can’t even interpret/run the first line. A quick workaround is crafting a wrapper script, say test.php
:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("./broken-script.php");
Then invoke the failing code by accessing this wrapper script.
It also helps to enable PHP’s error_log
and look into your webserver’s error.log
when a script crashes with HTTP 500 responses.
Различные части языка PHP внутренне представлены токенами.
Фрагмент кода, содержащий недопустимую последовательность токенов, может привести к таким ошибкам, как Parse error: syntax error, unexpected token "==", expecting "(" in script.php on line 10."
,
где токен ==
внутренне представлен как T_IS_EQUAL
.
В следующей таблице перечислены все токены. Они также доступны как константы PHP.
Замечание:
Использование T_* константЗначения T_* констант автоматически генерируются на основе базовой инфраструктуры синтаксического анализатора PHP.
Это означает, что конкретное значение метки может изменяться
между двумя версиями PHP.
Это означает, что ваш код никогда не должен напрямую полагаться
на исходные значения T_*, взятые из версии PHP X.Y.Z,
чтобы обеспечить некоторую совместимость между несколькими версиями PHP.Чтобы использовать T_* константы в нескольких версиях PHP, неопределённые константы
могут быть определены пользователем (с использованием больших чисел, таких как10000
)
с соответствующей стратегией, которая будет работать как с версиями PHP, так и со значениями T_*.
<?php
// До PHP 7.4.0 значение T_FN не определено.
defined('T_FN') || define('T_FN', 10001);
Метка | Синтаксис | Ссылка |
---|---|---|
T_ABSTRACT |
abstract | Абстрактные классы |
T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG |
& | Объявление типов (доступно, начиная с PHP 8.1.0) |
T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG |
& | Объявление типов (доступно, начиная с PHP 8.1.0) |
T_AND_EQUAL |
&= | операторы присваивания |
T_ARRAY |
array() | array(), синтаксис массива |
T_ARRAY_CAST |
(array) | приведение типа |
T_AS |
as | foreach |
T_ATTRIBUTE |
#[ | attributes (доступно с PHP 8.0.0) |
T_BAD_CHARACTER |
все, что ниже ASCII 32 исключая t (0x09), n (0x0a) и r (0x0d) (доступно с PHP 7.4.0) |
|
T_BOOLEAN_AND |
&& | логические операторы |
T_BOOLEAN_OR |
|| | логические операторы |
T_BOOL_CAST |
(bool) или (boolean) | приведение типа |
T_BREAK |
break | break |
T_CALLABLE |
callable | callable |
T_CASE |
case | switch |
T_CATCH |
catch | Исключения |
T_CLASS |
class | классы и объекты |
T_CLASS_C |
__CLASS__ | магические константы |
T_CLONE |
clone | классы и объекты |
T_CLOSE_TAG |
?> или %> | PHP-код внутри HTML |
T_COALESCE |
?? | операторы сравнения |
T_COALESCE_EQUAL |
??= |
операторы присваивания (доступно с PHP 7.4.0) |
T_COMMENT |
// или #, и /* */ | комментарии |
T_CONCAT_EQUAL |
.= | операторы присваивания |
T_CONST |
const | константы класса |
T_CONSTANT_ENCAPSED_STRING |
«foo» или ‘bar’ | строковой синтаксис |
T_CONTINUE |
continue | continue |
T_CURLY_OPEN |
{$ | переменные внутри строки |
T_DEC |
— | операторы инкрементадекремента |
T_DECLARE |
declare | declare |
T_DEFAULT |
default | switch |
T_DIR |
__DIR__ | магические константы |
T_DIV_EQUAL |
/= | операторы присваивания |
T_DNUMBER |
0.12 и т.д. | числа с плавающей точкой |
T_DO |
do | do..while |
T_DOC_COMMENT |
/** */ | PHPDoc-комментарии |
T_DOLLAR_OPEN_CURLY_BRACES |
${ | переменная внутри строки |
T_DOUBLE_ARROW |
=> | синтаксис массивов |
T_DOUBLE_CAST |
(real), (double) или (float) | приведение типов |
T_DOUBLE_COLON |
:: | смотрите ниже T_PAAMAYIM_NEKUDOTAYIM |
T_ECHO |
echo | echo |
T_ELLIPSIS |
… | аргументы функции |
T_ELSE |
else | else |
T_ELSEIF |
elseif | elseif |
T_EMPTY |
empty | empty() |
T_ENCAPSED_AND_WHITESPACE |
» $a» | константная часть строки с переменными |
T_ENDDECLARE |
enddeclare | declare, альтернативный синтаксис |
T_ENDFOR |
endfor | for, альтернативный синтаксис |
T_ENDFOREACH |
endforeach | foreach, альтернативный синтаксис |
T_ENDIF |
endif | if, альтернативный синтаксис |
T_ENDSWITCH |
endswitch | switch, альтернативный синтаксис |
T_ENDWHILE |
endwhile | while, альтернативный синтаксис |
T_ENUM |
enum | Перечисления (доступно, начиная с PHP 8.1.0) |
T_END_HEREDOC |
синтаксис heredoc | |
T_EVAL |
eval() | eval() |
T_EXIT |
exit или die | exit(), die() |
T_EXTENDS |
extends | extends, классы и объекты |
T_FILE |
__FILE__ | магические константы |
T_FINAL |
final | Ключевое слово final |
T_FINALLY |
finally | Исключения |
T_FN |
fn |
стрелочные функции (доступно с PHP 7.4.0) |
T_FOR |
for | for |
T_FOREACH |
foreach | foreach |
T_FUNCTION |
function | функции |
T_FUNC_C |
__FUNCTION__ | магические константы |
T_GLOBAL |
global | область видимости переменной |
T_GOTO |
goto | goto |
T_HALT_COMPILER |
__halt_compiler() | __halt_compiler |
T_IF |
if | if |
T_IMPLEMENTS |
implements | Интерфейсы объектов |
T_INC |
++ | операторы инкрементадекремента |
T_INCLUDE |
include() | include |
T_INCLUDE_ONCE |
include_once() | include_once |
T_INLINE_HTML |
текст вне PHP | |
T_INSTANCEOF |
instanceof | операторы типа |
T_INSTEADOF |
insteadof | Трейты |
T_INTERFACE |
interface | Интерфейсы объектов |
T_INT_CAST |
(int) или (integer) | приведение типов |
T_ISSET |
isset() | isset() |
T_IS_EQUAL |
== | операторы сравнения |
T_IS_GREATER_OR_EQUAL |
>= | операторы сравнения |
T_IS_IDENTICAL |
=== | операторы сравнения |
T_IS_NOT_EQUAL |
!= или <> | операторы сравнения |
T_IS_NOT_IDENTICAL |
!== | операторы сравнения |
T_IS_SMALLER_OR_EQUAL |
<= | операторы сравнения |
T_LINE |
__LINE__ | магические константы |
T_LIST |
list() | list() |
T_LNUMBER |
123, 012, 0x1ac и т.д. | целые числа |
T_LOGICAL_AND |
and | логические операторы |
T_LOGICAL_OR |
or | логические операторы |
T_LOGICAL_XOR |
xor | логические операторы |
T_MATCH |
match | match (доступно с PHP 8.0.0) |
T_METHOD_C |
__METHOD__ | магические константы |
T_MINUS_EQUAL |
-= | операторы присваивания |
T_MOD_EQUAL |
%= | операторы присваивания |
T_MUL_EQUAL |
*= | операторы присваивания |
T_NAMESPACE |
namespace | пространства имён |
T_NAME_FULLY_QUALIFIED |
AppNamespace | пространства имён (доступно, начиная с PHP 8.0.0) |
T_NAME_QUALIFIED |
AppNamespace | пространства имён (доступно, начиная с PHP 8.0.0) |
T_NAME_RELATIVE |
namespaceNamespace | пространства имён (доступно, начиная с PHP 8.0.0) |
T_NEW |
new | классы и объекты |
T_NS_C |
__NAMESPACE__ | пространства имён |
T_NS_SEPARATOR |
пространства имён | |
T_NUM_STRING |
«$a[0]» | цифровой индекс массива внутри строки |
T_OBJECT_CAST |
(object) | приведение типов |
T_OBJECT_OPERATOR |
-> | классы и объекты |
T_NULLSAFE_OBJECT_OPERATOR |
?-> | классы и объекты |
T_OPEN_TAG |
<?php, <? или <% | PHP-код внутри HTML |
T_OPEN_TAG_WITH_ECHO |
<?= или <%= | PHP-код внутри HTML |
T_OR_EQUAL |
|= | операторы присваивания |
T_PAAMAYIM_NEKUDOTAYIM |
:: | ::. Также определяется какT_DOUBLE_COLON . |
T_PLUS_EQUAL |
+= | операторы присваивания |
T_POW |
** | арифметические операторы |
T_POW_EQUAL |
**= | операторы присваивания |
T_PRINT |
print() | |
T_PRIVATE |
private | классы и объекты |
T_PROTECTED |
protected | классы и объекты |
T_PUBLIC |
public | классы и объекты |
T_READONLY |
readonly | классы и объекты (доступно, начиная с PHP 8.1.0) |
T_REQUIRE |
require() | require |
T_REQUIRE_ONCE |
require_once() | require_once |
T_RETURN |
return | возвращаемые значения |
T_SL |
<< | побитовые операторы |
T_SL_EQUAL |
<<= | операторы присваивания |
T_SPACESHIP |
<=> | Операторы сравнения |
T_SR |
>> | побитовые операторы |
T_SR_EQUAL |
>>= | операторы присваивания |
T_START_HEREDOC |
<<< | синтаксис heredoc |
T_STATIC |
static | область видимости переменной |
T_STRING |
parent, self и т.п.. |
идентификаторы, например, ключевые слова вроде parent и self ,сюда подходят также имена функций, классов и некоторые другие. Смотрите также T_CONSTANT_ENCAPSED_STRING
|
T_STRING_CAST |
(string) | приведение типов |
T_STRING_VARNAME |
«${a | переменные внутри строки |
T_SWITCH |
switch | switch |
T_THROW |
throw | Исключения |
T_TRAIT |
trait | Трейты |
T_TRAIT_C |
__TRAIT__ | __TRAIT__ |
T_TRY |
try | Исключения |
T_UNSET |
unset() | unset() |
T_UNSET_CAST |
(unset) | приведение типов |
T_USE |
use | пространства имён |
T_VAR |
var | классы и объекты |
T_VARIABLE |
$foo | переменные |
T_WHILE |
while | while, do..while |
T_WHITESPACE |
t rn | |
T_XOR_EQUAL |
^= | операторы присваивания |
T_YIELD |
yield | генераторы |
T_YIELD_FROM |
yield from | generators |
Смотрите также token_name().
nathan at unfinitydesign dot com ¶
14 years ago
T_ENCAPSED_AND_WHITESPACE is whitespace which intersects a group of tokens. For example, an "unexpected T_ENCAPSED_AND_WHITESPACE" error is produced by the following code:
<?php
$main_output_world = 'snakes!';
echo('There are' 10 $main_output_world);
?>
Note the missing concatenation operator between the two strings leads to the whitespace error that is so named above. The concatenation operator instructs PHP to ignore the whitespace between the two code tokens (the so named "encapsed" data"), rather than parse it as a token itself.
The correct code would be:
<?php
$main_output_world = 'snakes!';
echo('There are' . 10 . $main_output_world);
?>
Note the addition of the concatenation operator between each token.
fgm at osinet dot fr ¶
14 years ago
T_ENCAPSED_AND_WHITESPACED is returned when parsing strings with evaluated content, like "some $value" or this example from the Strings reference page:
<?php
echo <<<EOT
My name is "$name". I am printing some $foo->foo.
Now, I am printing some {$foo->bar[1]}.
This should print a capital 'A': x41
EOT;
?>
This last example is tokenized as:
T_ECHO
echo
T_WHITESPACE
%20 (a space character)
T_START_HEREDOC
<<
T_ENCAPSED_AND_WHITESPACE
My name is "
T_VARIABLE
$name
T_ENCAPSED_AND_WHITESPACE
". I am printing some
T_VARIABLE
$foo
T_OBJECT_OPERATOR
->
T_STRING
foo
T_ENCAPSED_AND_WHITESPACE
. Now, I am printing some
T_CURLY_OPEN
{
T_VARIABLE
$foo
T_OBJECT_OPERATOR
->
T_STRING
bar
(terminal)
[
T_LNUMBER
1
(terminal)
]
(terminal)
}
T_ENCAPSED_AND_WHITESPACE
. This should print a capital 'A': x41
T_END_HEREDOC
EOT
(terminal)
;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
<?PHP /* ===================================================== DataLife Engine - by SoftNews Media Group ----------------------------------------------------- http://dle-news.ru/ ----------------------------------------------------- Copyright (c) 2004,2012 SoftNews Media Group ===================================================== Данный код защищен авторскими правами ===================================================== Файл: options.php ----------------------------------------------------- Назначение: опции ===================================================== */ if( !defined( 'DATALIFEENGINE' ) OR !defined( 'LOGGED_IN' ) ) { die( "Hacking attempt!" ); } if( isset( $_REQUEST['subaction'] ) ) $subaction = $_REQUEST['subaction']; else $subaction = ""; if( $action == "options" or $action == '' ) { echoheader( "options", $lang['opt_head'] ); //---------------------------------- // Список разделов //---------------------------------- $options = array (); $options['config'] = array ( array ( 'name' => $lang['opt_all'], 'url' => "$PHP_SELF?mod=options&action=syscon", 'descr' => $lang['opt_allc'], 'image' => "tools.png", 'access' => "admin" ), array ( 'name' => $lang['opt_cat'], 'url' => "$PHP_SELF?mod=categories", 'descr' => $lang['opt_catc'], 'image' => "cats.png", 'access' => $user_group[$member_id['user_group']]['admin_categories'] ), array ( 'name' => $lang['opt_db'], 'url' => "$PHP_SELF?mod=dboption", 'descr' => $lang['opt_dbc'], 'image' => "dbset.png", 'access' => "admin" ), array ( 'name' => $lang['opt_vconf'], 'url' => "$PHP_SELF?mod=videoconfig", 'descr' => $lang['opt_vconfc'], 'image' => "video.png", 'access' => "admin" ), array ( 'name' => $lang['opt_xfil'], 'url' => "$PHP_SELF?mod=xfields&xfieldsaction=configure", 'descr' => $lang['opt_xfilc'], 'image' => "xfset.png", 'access' => $user_group[$member_id['user_group']]['admin_xfields'] ), array ( 'name' => $lang['opt_question'], 'url' => "$PHP_SELF?mod=question", 'descr' => $lang['opt_questionc'], 'image' => "question.png", 'access' => "admin" ) ); $options['user'] = array ( array ( 'name' => $lang['opt_priv'], 'url' => "$PHP_SELF?mod=options&action=personal", 'descr' => $lang['opt_privc'], 'image' => "pset.png", 'access' => "all" ), array ( 'name' => $lang['opt_user'], 'url' => "$PHP_SELF?mod=editusers&action=list", 'descr' => $lang['opt_userc'], 'image' => "uset.png", 'access' => $user_group[$member_id['user_group']]['admin_editusers'] ), array ( 'name' => $lang['opt_xprof'], 'url' => "$PHP_SELF?mod=userfields&xfieldsaction=configure", 'descr' => $lang['opt_xprofd'], 'image' => "xprof.png", 'access' => $user_group[$member_id['user_group']]['admin_userfields'] ), array ( 'name' => $lang['opt_group'], 'url' => "$PHP_SELF?mod=usergroup", 'descr' => $lang['opt_groupc'], 'image' => "usersgroup.png", 'access' => "admin" ) ); $options['templates'] = array ( array ( 'name' => $lang['opt_t'], 'url' => "$PHP_SELF?mod=templates&user_hash=" . $dle_login_hash, 'descr' => $lang['opt_tc'], 'image' => "tmpl.png", 'access' => "admin" ), array ( 'name' => $lang['opt_email'], 'url' => "$PHP_SELF?mod=email", 'descr' => $lang['opt_emailc'], 'image' => "mset.png", 'access' => "admin" ) ); $options['filter'] = array ( array ( 'name' => $lang['opt_fil'], 'url' => "$PHP_SELF?mod=wordfilter", 'descr' => $lang['opt_filc'], 'image' => "fset.png", 'access' => $user_group[$member_id['user_group']]['admin_wordfilter'] ), array ( 'name' => $lang['opt_ipban'], 'url' => "$PHP_SELF?mod=blockip", 'descr' => $lang['opt_ipbanc'], 'image' => "blockip.png", 'access' => $user_group[$member_id['user_group']]['admin_blockip'] ), array ( 'name' => $lang['opt_iptools'], 'url' => "$PHP_SELF?mod=iptools", 'descr' => $lang['opt_iptoolsc'], 'image' => "iptools.png", 'access' => $user_group[$member_id['user_group']]['admin_iptools'] ), array ( 'name' => $lang['opt_sfind'], 'url' => "$PHP_SELF?mod=search", 'descr' => $lang['opt_sfindc'], 'image' => "find_base.png", 'access' => "admin" ), array ( 'name' => $lang['opt_srebuild'], 'url' => "$PHP_SELF?mod=rebuild", 'descr' => $lang['opt_srebuildc'], 'image' => "refresh.png", 'access' => "admin" ), array ( 'name' => $lang['opt_complaint'], 'url' => "$PHP_SELF?mod=complaint", 'descr' => $lang['opt_complaintc'], 'image' => "complaint.png", 'access' => $user_group[$member_id['user_group']]['admin_complaint'] ), array ( 'name' => $lang['opt_check'], 'url' => "$PHP_SELF?mod=check", 'descr' => $lang['opt_checkc'], 'image' => "check.png", 'access' => "admin" ) ); $options['others'] = array ( array ( 'name' => $lang['opt_rules'], 'url' => "$PHP_SELF?mod=static&action=doedit&page=rules", 'descr' => $lang['opt_rulesc'], 'image' => "rules.png", 'access' => $user_group[$member_id['user_group']]['admin_static'] ), array ( 'name' => $lang['opt_static'], 'url' => "$PHP_SELF?mod=static", 'descr' => $lang['opt_staticd'], 'image' => "spset.png", 'access' => $user_group[$member_id['user_group']]['admin_static'] ), array ( 'name' => $lang['opt_clean'], 'url' => "$PHP_SELF?mod=clean", 'descr' => $lang['opt_cleanc'], 'image' => "clean.png", 'access' => "admin" ), array ( 'name' => $lang['main_newsl'], 'url' => "$PHP_SELF?mod=newsletter", 'descr' => $lang['main_newslc'], 'image' => "nset.png", 'access' => $user_group[$member_id['user_group']]['admin_newsletter'] ), array ( 'name' => $lang['opt_vote'], 'url' => "$PHP_SELF?mod=editvote", 'descr' => $lang['opt_votec'], 'image' => "votes.png", 'access' => $user_group[$member_id['user_group']]['admin_editvote'] ), array ( 'name' => $lang['opt_img'], 'url' => "$PHP_SELF?mod=files", 'descr' => $lang['opt_imgc'], 'image' => "iset.png", 'access' => "admin" ), array ( 'name' => $lang['opt_banner'], 'url' => "$PHP_SELF?mod=banners&action=list", 'descr' => $lang['opt_bannerc'], 'image' => "ads.png", 'access' => $user_group[$member_id['user_group']]['admin_banners'] ), array ( 'name' => $lang['opt_google'], 'url' => "$PHP_SELF?mod=googlemap", 'descr' => $lang['opt_googlec'], 'image' => "googlemap.png", 'access' => $user_group[$member_id['user_group']]['admin_googlemap'] ), array ( 'name' => $lang['opt_rss'], 'url' => "$PHP_SELF?mod=rss", 'descr' => $lang['opt_rssc'], 'image' => "rss_import.png", 'access' => $user_group[$member_id['user_group']]['admin_rss'] ), array ( 'name' => $lang['opt_rssinform'], 'url' => "$PHP_SELF?mod=rssinform", 'descr' => $lang['opt_rssinformc'], 'image' => "rss_inform.png", 'access' => $user_group[$member_id['user_group']]['admin_rssinform'] ), array ( 'name' => $lang['opt_tagscloud'], 'url' => "$PHP_SELF?mod=tagscloud", 'descr' => $lang['opt_tagscloudc'], 'image' => "admin_tagscloud.png", 'access' => $user_group[$member_id['user_group']]['admin_tagscloud'] ), array ( 'name' => $lang['opt_logs'], 'url' => "$PHP_SELF?mod=logs", 'descr' => $lang['opt_logsc'], 'image' => "admin_logs.png", 'access' => "admin" ), ); //------------------------------------------------ // Cut the options for wich we don't have access //------------------------------------------------ foreach ( $options as $sub_options => $value ) { $count_options = count( $value ); for($i = 0; $i < $count_options; $i ++) { if ($member_id['user_group'] == 1 ) continue; if ($member_id['user_group'] != 1 AND $value[$i]['access'] == "admin") unset( $options[$sub_options][$i] ); if ( !$value[$i]['access'] ) unset( $options[$sub_options][$i] ); } } $subs = 0; foreach ( $options as $sub_options ) { if( $subs == 1 ) $lang['opt_hopt'] = $lang['opt_s_acc']; if( $subs == 2 ) $lang['opt_hopt'] = $lang['opt_s_tem']; if( $subs == 3 ) $lang['opt_hopt'] = $lang['opt_s_fil']; if( $subs == 4 ) $lang['opt_hopt'] = $lang['opt_s_oth']; $subs ++; if( ! count( $sub_options ) ) continue; echo <<<HTML <div style="padding-top:5px;padding-bottom:2px;"> <table width="100%"> <tr> <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td> <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td> <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td> </tr> <tr> <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td> <td style="padding:5px;" bgcolor="#FFFFFF"> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_hopt']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"><tr> HTML; $i = 0; foreach ( $sub_options as $option ) { if( $i > 1 ) { echo "</tr><tr>"; $i = 0; } $i ++; echo <<<HTML <td width="50%"> <table width="100%"> <tr> <td width="70" height="70" valign="middle" align="center" style="padding-top:5px;padding-bottom:5px;"><img src="engine/skins/images/{$option['image']}" border="0"></td> <td valign="middle"><div class="quick"><a href="{$option['url']}"><h3>{$option['name']}</h3>{$option['descr']}</a></div></td> </tr> </table> </td> HTML; } echo <<<HTML </tr></table> </td> <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td> </tr> <tr> <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td> <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td> <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td> </tr> </table> </div> HTML; } $db->query( "SELECT * FROM " . PREFIX . "_admin_sections" ); $i = 0; $sections = ""; while ( $row = $db->get_array() ) { if ($row['allow_groups'] != "all") { $groups = explode(",", $row['allow_groups']); if ( !in_array($member_id['user_group'], $groups) AND $member_id['user_group'] !=1 ) continue; } if( $i > 1 ) { $sections .= "</tr><tr>"; $i = 0; } $i ++; $row['name'] = totranslit($row['name'], true, false); $row['icon'] = totranslit($row['icon'], false, true); if ( !$row['icon'] OR !@file_exists( ENGINE_DIR . "/skins/images/{$row['icon']}")) $row['icon'] = "default_icon.png"; $row['title'] = strip_tags(stripslashes($row['title'])); $row['descr'] = strip_tags(stripslashes($row['descr'])); if ($member_id['user_group'] == 1) $del_link = " <a href="#" onclick="del_mod('{$row['id']}'); return false;"><img style="vertical-align: middle;border:none;" src="engine/skins/images/delete.png"></a>"; else $del_link = ""; $sections .= " <td width="50%"> <table width="100%"> <tr> <td width="70" height="70" valign="middle" align="center" style="padding-top:5px;padding-bottom:5px;"><img src="engine/skins/images/{$row['icon']}" border="0"></td> <td valign="middle"><div class="quick"><a href="$PHP_SELF?mod={$row['name']}"><h3>{$row['title']}</h3>{$row['descr']}</a>{$del_link}</div></td> </tr> </table> </td>"; } if ( $sections ) { echo <<<HTML <div style="padding-top:5px;padding-bottom:2px;"> <table width="100%"> <tr> <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td> <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td> <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td> </tr> <tr> <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td> <td style="padding:5px;" bgcolor="#FFFFFF"> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['admin_other_section']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"><tr> {$sections} </tr></table> </td> <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td> </tr> <tr> <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td> <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td> <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td> </tr> </table> </div> HTML; if ($member_id['user_group'] ==1) { echo <<<HTML <script type="text/javascript"> <!-- function del_mod ( id ){ DLEconfirm( '{$lang['confirm_del_mod']}', '{$lang['p_confirm']}', function () { $.get("engine/ajax/adminfunction.php?action=deletemodules", { id: id }, function( data ){ if (data == 'ok') { document.location.reload(false); } }); } ); return false; } //--> </script> HTML; } } echofooter(); } // ******************************************************************************** // Редактирование персональной информации // ******************************************************************************** elseif( $action == "personal" ) { echoheader( "user", $lang['opt_priv'] ); $registrationdate = langdate( "l, j F Y - H:i", $member_id['reg_date'] ); //registration date if( $member_id['allow_mail'] == 0 ) $ifchecked = "checked"; else $ifchecked = ""; //if user wants to hide his e-mail foreach ( $member_id as $key => $value ) { $member_id[$key] = stripslashes( preg_replace( array ( "'"'", "'''" ), array ( """, "'" ), $member_id[$key] ) ); } echo <<<HTML <form method="post" action="" name="personal"> <div style="padding-top:5px;padding-bottom:2px;"> <table width="100%"> <tr> <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td> <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td> <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td> </tr> <tr> <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td> <td style="padding:5px;" bgcolor="#FFFFFF"> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_hprv']}</div></td> </tr> </table> <div class="unterline"></div> <table width="100%"> <tr> <td width="150" style="padding:2px;">{$lang['user_name']}</td> <td>{$member_id['name']}</td> </tr> <tr> <td style="padding:2px;">{$lang['user_acc']}</td> <td >{$user_group[$member_id['user_group']]['group_name']}</td> </tr> <tr> <td style="padding:2px;">{$lang['user_news']}</td> <td>{$member_id['news_num']}</td> </tr> <tr> <td style="padding:2px;">{$lang['user_reg']}</td> <td>{$registrationdate}</td> </tr> <tr> <tr> <td colspan="2"><div class="hr_line"></div></td> </tr> <td style="padding:2px;">{$lang['user_mail']}</td> <td style="padding:2px;"><input class="edit bk" type="text" name="editmail" value="{$member_id['email']}"> <input type="checkbox" name="edithidemail" {$ifchecked} id="edithidemail" value="1" /> <label for="edithidemail">{$lang['opt_hmail']}</label></td> </tr> <tr> <td style="padding:2px;">{$lang['opt_fullname']}</td> <td style="padding:2px;"><input class="edit bk" name="editfullname" value="{$member_id['fullname']}" ></td> </tr> <tr> <td style="padding:2px;">{$lang['opt_land']}</td> <td style="padding:2px;"><input class="edit bk" name="editland" value="{$member_id['land']}"></td> </tr> <tr> <td style="padding:2px;">{$lang['opt_icq']}</td> <td style="padding:2px;"><input class="edit bk" name="editicq" value="{$member_id['icq']}"></td> </tr> <tr> <td colspan="2"><div class="hr_line"></div></td> </tr> <tr> <td style="padding:2px;">{$lang['opt_altpassw']}</td> <td style="padding:2px;"><input class="edit bk" name="altpass" type="password"><a href="#" class="hintanchor" onMouseover="showhint('{$lang[hint_pass]}', this, event, '250px')">[?]</a></td> </tr> <tr> <td style="padding:2px;">{$lang['user_newpass']}</td> <td style="padding:2px;"><input class="edit bk" name="editpassword"></td> </tr> <tr> <td colspan="2"><div class="hr_line"></div></td> </tr> <tr> <td colspan="2" style="padding-left:5px;"><input type="submit" class="buttons" value=" {$lang['user_save']} "> <input type="hidden" name="mod" value="options"> <input type="hidden" name="user_hash" value="$dle_login_hash" /> <input type="hidden" name="action" value="dosavepersonal"></td> </tr> </table> </td> <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td> </tr> <tr> <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td> <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td> <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td> </tr> </table> </div></form> HTML; echofooter(); } // ******************************************************************************** // Запись персональной информации // ******************************************************************************** elseif( $action == "dosavepersonal" ) { if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { die( "Hacking attempt! User not found" ); } $editpassword = $_POST['editpassword']; $not_allow_symbol = array ("x22", "x60", "t", 'n', 'r', "n", "r", '\', ",", "/", "¬", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "$", "<", ">", "?", "!", '"', "'" ); $editmail = $db->safesql(trim( str_replace( $not_allow_symbol, '', strip_tags( stripslashes( $_POST['editmail'] ) ) ) ) ); if( empty( $editmail ) OR strlen( $editmail ) > 50 OR @count(explode("@", $editmail)) != 2 ) { msg( "error", "Error !!!", "E-mail not correct", "$PHP_SELF?mod=options&action=personal" ); } $editfullname = $db->safesql( $_POST['editfullname'] ); if ( preg_match( "/[||'|<|>|"|!|]|?|$|@|/|\|&~*+]/", $editfullname ) ) { $editfullname = ""; } $editland = $db->safesql( $_POST['editland'] ); if ( preg_match( "/[||'|<|>|"|!|]|?|$|@|/|\|&~*+]/", $editland ) ) { $editland = ""; } $editicq = intval( $_POST['editicq'] ); if ( !$editicq ) $editicq = ""; $altpass = md5( $_POST['altpass'] ); if( $_POST['edithidemail'] ) { $edithidemail = 0; } else { $edithidemail = 1; } if( $editpassword != "" ) { if( $altpass == $cmd5_password ) { $editpassword = md5( md5( $editpassword ) ); $sql_update = "UPDATE " . USERPREFIX . "_users SET email='$editmail', fullname='$editfullname', land='$editland', icq='$editicq', allow_mail='$edithidemail', password='$editpassword' where user_id='{$member_id['user_id']}'"; } else msg( "error", "Error !!!", $lang['opt_errpass'], "$PHP_SELF?mod=options&action=personal" ); } else { $sql_update = "UPDATE " . USERPREFIX . "_users set email='$editmail', fullname='$editfullname', land='$editland', icq='$editicq', allow_mail='$edithidemail' where user_id='{$member_id['user_id']}'"; } $db->query( $sql_update ); $personal_success = TRUE; if( $personal_success ) { msg( "info", $lang['user_editok'], $lang['opt_peok'], "$PHP_SELF?mod=options&action=personal" ); } else { msg( "error", "Error !!!", $lang['user_nouser'], "$PHP_SELF?mod=options&action=personal" ); } } // ******************************************************************************** // Настройки скрипта // ******************************************************************************** elseif( $action == "syscon" ) { if( $member_id['user_group'] != 1 ) { msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); } include_once ENGINE_DIR . '/classes/parse.class.php'; $parse = new ParseFilter( Array (), Array (), 1, 1 ); $config['offline_reason'] = str_replace( '"', '"', $config['offline_reason'] ); $config['offline_reason'] = $parse->decodeBBCodes( $config['offline_reason'], false ); if( $auto_detect_config ) $config['http_home_url'] = ""; echoheader( "options", $lang['opt_all'] ); function showRow($title = "", $description = "", $field = "") { echo "<tr> <td style="padding:4px" class="option"> <b>$title</b><br /><span class=small>$description</span> <td width=394 align=middle > $field </tr><tr><td background="engine/skins/images/mline.gif" height=1 colspan=2></td></tr>"; $bg = ""; $i ++; } function makeDropDown($options, $name, $selected) { $output = "<select name="$name">rn"; foreach ( $options as $value => $description ) { $output .= "<option value="$value""; if( $selected == $value ) { $output .= " selected "; } $output .= ">$description</option>n"; } $output .= "</select>"; return $output; } if( ! $handle = opendir( "./templates" ) ) { die( "Невозможно открыть директорию ./templates" ); } while ( false !== ($file = readdir( $handle )) ) { if( is_dir( ROOT_DIR . "/templates/$file" ) and ($file != "." and $file != "..") ) { $sys_con_skins_arr[$file] = $file; } } closedir( $handle ); if( ! $handle = opendir( "./language" ) ) { die( "Невозможно открыть директорию ./data/language/" ); } while ( false !== ($file = readdir( $handle )) ) { if( is_dir( ROOT_DIR . "/language/$file" ) and ($file != "." and $file != "..") ) { $sys_con_langs_arr[$file] = $file; } } closedir( $handle ); foreach ( $user_group as $group ) $sys_group_arr[$group['id']] = $group['group_name']; echo <<<HTML <script language='JavaScript' type="text/javascript"> function ChangeOption(selectedOption) { document.getElementById('general').style.display = "none"; document.getElementById('security').style.display = "none"; document.getElementById('news').style.display = "none"; document.getElementById('comments').style.display = "none"; document.getElementById('optimisation').style.display = "none"; document.getElementById('files').style.display = "none"; document.getElementById('mail').style.display = "none"; document.getElementById('users').style.display = "none"; document.getElementById('imagesconf').style.display = "none"; document.getElementById('rss').style.display = "none"; document.getElementById('smartphone').style.display = "none"; document.getElementById('slider').style.display = "none"; document.getElementById(selectedOption).style.display = ""; } </script> <div style="padding-top:5px;padding-bottom:2px;"> <table width="100%"> <tr> <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td> <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td> <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td> </tr> <tr> <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td> <td style="padding:5px;" bgcolor="#FFFFFF"> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_general_sys']}</div></td> </tr> </table> <div class="unterline"></div> <table width="100%"> <tr> <td style="padding:2px;"> <table style="text-align:center;" width="100%" height="35px"> <tr style="vertical-align:middle;" > <td class=tableborder><a href="javascript:ChangeOption('general');"><img title="$lang[opt_allsys]" src="engine/skins/images/general.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('security');"><img title="$lang[opt_secrsys]" src="engine/skins/images/sred.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('news');"><img title="$lang[opt_newssys]" src="engine/skins/images/news.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('comments');"><img title="$lang[opt_commsys]" src="engine/skins/images/comments.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('optimisation');"><img title="$lang[opt_dbsys]" src="engine/skins/images/db_opt.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('files');"><img title="$lang[opt_filesys]" src="engine/skins/images/folder.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('mail');"><img title="$lang[opt_sys_mail]" src="engine/skins/images/email.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('users');"><img title="$lang[opt_usersys]" src="engine/skins/images/users.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('imagesconf');"><img title="$lang[opt_imagesys]" src="engine/skins/images/conf_images.png" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('smartphone');"><img title="$lang[opt_smartphone]" src="engine/skins/images/smartphone.jpg" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('rss');"><img title="$lang[opt_rsssys]" src="engine/skins/images/rss.gif" border="0"></a> <td class=tableborder><a href="javascript:ChangeOption('slider');"><img title="$lang[opt_slidersys]" src="engine/skins/images/slider.gif" border="0"></a> </tr> </table> </td> </tr> </table> </td> <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td> </tr> <tr> <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td> <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td> <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td> </tr> </table> </div> HTML; echo <<<HTML <form action="" method="post"> <div style="padding-top:5px;padding-bottom:2px;"> <table width="100%"> <tr> <td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td> <td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td> <td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td> </tr> <tr> <td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td> <td style="padding:5px;" bgcolor="#FFFFFF"> <table width="100%"> HTML; echo <<<HTML <tr style='' id="general"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_all']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_ht'], $lang['opt_sys_htd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[home_title]" value="{$config['home_title']}" size=40>" ); showRow( $lang['opt_sys_hu'], $lang['opt_sys_hud'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[http_home_url]" value="{$config['http_home_url']}" size=40>" ); showRow( $lang['opt_sys_chars'], $lang['opt_sys_charsd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[charset]" value="{$config['charset']}" size=30>" ); showRow( $lang['opt_sys_descr'], $lang['opt_sys_descrd'], "<input class="edit bk" type=text name="save_con[description]" value="{$config['description']}" size=40>" ); showRow( $lang['opt_sys_key'], $lang['opt_sys_keyd'], "<textarea class="edit bk" style="width:250px;height:50px;" name="save_con[keywords]">{$config['keywords']}</textarea>" ); showRow( $lang['opt_sys_short_name'], $lang['opt_sys_short_named'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[short_title]" value="{$config['short_title']}" size=40>" ); showRow( $lang['opt_sys_at'], $lang['opt_sys_atd']." ".date ( "d.m.Y, H:i", time () + ($config['date_adjust'] * 60) ), "<input class="edit bk" type=text style="text-align: center;" name="save_con[date_adjust]" value="{$config['date_adjust']}" size=10>" ); showRow( $lang['opt_sys_dc'], $lang['opt_sys_dcd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_alt_url]", "{$config['allow_alt_url']}" ) ); showRow( $lang['opt_sys_seotype'], $lang['opt_sys_seotyped'], makeDropDown( array ("1" => $lang['opt_sys_seo_1'], "2" => $lang['opt_sys_seo_2'], "0" => $lang['opt_sys_seo_3'] ), "save_con[seo_type]", "{$config['seo_type']}" ) ); showRow( $lang['opt_sys_seoc'], $lang['opt_sys_seocd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[seo_control]", "{$config['seo_control']}" ) ); showRow( $lang['opt_sys_al'], $lang['opt_sys_ald'], makeDropDown( $sys_con_langs_arr, "save_con[langs]", "{$config['langs']}" ) ); showRow( $lang['opt_sys_as'], $lang['opt_sys_asd'], makeDropDown( $sys_con_skins_arr, "save_con[skin]", "{$config['skin']}" ) ); showRow( $lang['opt_sys_wda'], $lang['opt_sys_wdad'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_admin_wysiwyg]", "{$config['allow_admin_wysiwyg']}" ) ); showRow( $lang['opt_sys_wdst'], $lang['opt_sys_wdad'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_static_wysiwyg]", "{$config['allow_static_wysiwyg']}" ) ); showRow( $lang['opt_sys_offline'], $lang['opt_sys_offlined'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[site_offline]", "{$config['site_offline']}" ) ); showRow( $lang['opt_sys_reason'], $lang['opt_sys_reasond'], "<textarea class="edit bk" style="width:350px;height:100px;" name="save_con[offline_reason]">{$config['offline_reason']}</textarea>" ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="security"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_secrsys']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_path'], $lang['opt_sys_pathd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[admin_path]" value="{$config['admin_path']}" size=20>" ); showRow( $lang['opt_sys_logextra'], $lang['opt_sys_logextrad'], makeDropDown( array ("0" => $lang['opt_sys_stdm'], "1" => $lang['opt_sys_extram'] ), "save_con[extra_login]", "{$config['extra_login']}" ) ); showRow( $lang['opt_sys_llog'], $lang['opt_sys_llogd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[login_log]" value="{$config['login_log']}" size=20>" ); showRow( $lang['opt_sys_ip'], $lang['opt_sys_ipd'], makeDropDown( array ("0" => $lang['opt_sys_ipn'], "1" => $lang['opt_sys_ipm'], "2" => $lang['opt_sys_iph'] ), "save_con[ip_control]", "{$config['ip_control']}" ) ); showRow( $lang['opt_sys_loghash'], $lang['opt_sys_loghashd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[log_hash]", "{$config['log_hash']}" ) ); showRow( $lang['opt_sys_sxfield'], $lang['opt_sys_sxfieldd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[safe_xfield]", "{$config['safe_xfield']}" ) ); showRow( $lang['opt_sys_addsec'], $lang['opt_sys_addsecd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[sec_addnews]", "{$config['sec_addnews']}" ) ); showRow( $lang['opt_sys_recapt'], $lang['opt_sys_recaptd'], makeDropDown( array ("0" => $lang['opt_sys_gd2'], "1" => $lang['opt_sys_recaptcha'] ), "save_con[allow_recaptcha]", "{$config['allow_recaptcha']}" ) ); showRow( $lang['opt_sys_recaptpub'], $lang['opt_sys_recaptpubd'], "<input class="edit bk" type=text name="save_con[recaptcha_public_key]" value="{$config['recaptcha_public_key']}" size=20>" ); showRow( $lang['opt_sys_recaptpriv'], $lang['opt_sys_recaptpubd'], "<input class="edit bk" type=text name="save_con[recaptcha_private_key]" value="{$config['recaptcha_private_key']}" size=20>" ); showRow( $lang['opt_sys_recapttheme'], $lang['opt_sys_recaptthemed'], makeDropDown( array ("clean" => "Clean", "red" => "Red", "white" => "White", "blackglass" => "Blackglass" ), "save_con[recaptcha_theme]", "{$config['recaptcha_theme']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="news"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_newssys']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_newc'], $lang['opt_sys_newd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[news_number]" value="{$config['news_number']}" size=10>" ); showRow( $lang['opt_sys_snumc'], $lang['opt_sys_snumd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[search_number]" value="{$config['search_number']}" size=10>" ); showRow( $lang['opt_sys_related_num'], $lang['opt_sys_related_numd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[related_number]" value="{$config['related_number']}" size=10>" ); showRow( $lang['opt_sys_max_mod'], $lang['opt_sys_max_modd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[max_moderation]" value="{$config['max_moderation']}" size=10>" ); showRow( $lang['group_n_restr'], $lang['group_n_restrd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[news_restricted]" value="{$config['news_restricted']}" size=10>" ); showRow( $lang['opt_sys_am'], $lang['opt_sys_amd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[smilies]" value="{$config['smilies']}" size=40>" ); showRow( $lang['opt_sys_an'], "<a onClick="javascript:Help('date'); return false;" class=main href="#">$lang[opt_sys_and]</a>", "<input class="edit bk" type=text style="text-align: center;" name="save_con[timestamp_active]" value="{$config['timestamp_active']}" size=40>" ); showRow( $lang['opt_sys_navi'], $lang['opt_sys_navid'], makeDropDown( array ("0" => $lang['opt_sys_navi_1'], "1" => $lang['opt_sys_navi_2'], "2" => $lang['opt_sys_navi_3'], "3" => $lang['opt_sys_navi_4'] ), "save_con[news_navigation]", "{$config['news_navigation']}" ) ); showRow( $lang['opt_sys_sort'], $lang['opt_sys_sortd'], makeDropDown( array ("date" => $lang['opt_sys_sdate'], "rating" => $lang['opt_sys_srate'], "news_read" => $lang['opt_sys_sview'], "title" => $lang['opt_sys_salph'] ), "save_con[news_sort]", "{$config['news_sort']}" ) ); showRow( $lang['opt_sys_msort'], $lang['opt_sys_msortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[news_msort]", "{$config['news_msort']}" ) ); showRow( $lang['opt_sys_catsort'], $lang['opt_sys_catsortd'], makeDropDown( array ("date" => $lang['opt_sys_sdate'], "rating" => $lang['opt_sys_srate'], "news_read" => $lang['opt_sys_sview'], "title" => $lang['opt_sys_salph'] ), "save_con[catalog_sort]", "{$config['catalog_sort']}" ) ); showRow( $lang['opt_sys_catmsort'], $lang['opt_sys_catmsortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[catalog_msort]", "{$config['catalog_msort']}" ) ); showRow( $lang['opt_sys_align'], $lang['opt_sys_alignd'], makeDropDown( array ("" => $lang['opt_sys_none'], "left" => $lang['opt_sys_left'], "center" => $lang['opt_sys_center'], "right" => $lang['opt_sys_right'] ), "save_con[image_align]", "{$config['image_align']}" ) ); showRow( $lang['opt_sys_nfut'], $lang['opt_sys_nfutd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[news_future]", "{$config['news_future']}" ) ); showRow( $lang['opt_sys_acat'], $lang['opt_sys_acatd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[create_catalog]", "{$config['create_catalog']}" ) ); showRow( $lang['opt_sys_plink'], $lang['opt_sys_plinkd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[parse_links]", "{$config['parse_links']}" ) ); showRow( $lang['opt_sys_nmail'], $lang['opt_sys_nmaild'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_news]", "{$config['mail_news']}" ) ); showRow( $lang['opt_sys_sub'], $lang['opt_sys_subd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[show_sub_cats]", "{$config['show_sub_cats']}" ) ); showRow( $lang['opt_sys_asrate'], $lang['opt_sys_asrated'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[short_rating]", "{$config['short_rating']}" ) ); showRow( $lang['opt_sys_ad'], $lang['opt_sys_add'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[hide_full_link]", "{$config['hide_full_link']}" ) ); showRow( $lang['opt_sys_asp'], $lang['opt_sys_aspd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_search_print]", "{$config['allow_search_print']}" ) ); showRow( $lang['opt_sys_adt'], $lang['opt_sys_adtd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_add_tags]", "{$config['allow_add_tags']}" ) ); showRow( $lang['opt_sys_wds'], $lang['opt_sys_wdsd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_site_wysiwyg]", "{$config['allow_site_wysiwyg']}" ) ); showRow( $lang['opt_sys_wdq'], $lang['opt_sys_wdsd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_quick_wysiwyg]", "{$config['allow_quick_wysiwyg']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="comments"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_cch']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_alc'], $lang['opt_sys_alcd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_comments]", "{$config['allow_comments']}" ) ); showRow( $lang['group_c_restr'], $lang['group_c_restrd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[comments_restricted]" value="{$config['comments_restricted']}" size=10>" ); showRow( $lang['opt_sys_subs'], $lang['opt_sys_subsd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_subscribe]", "{$config['allow_subscribe']}" ) ); showRow( $lang['opt_sys_comb'], $lang['opt_sys_combd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_combine]", "{$config['allow_combine']}" ) ); showRow( $lang['opt_sys_mcommd'], $lang['opt_sys_mcommdd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_comments_days]' value="{$config['max_comments_days']}" size=10>" ); showRow( $lang['opt_sys_minc'], $lang['opt_sys_mincd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[comments_minlen]' value="{$config['comments_minlen']}" size=10>" ); showRow( $lang['opt_sys_maxc'], $lang['opt_sys_maxcd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[comments_maxlen]' value="{$config['comments_maxlen']}" size=10>" ); showRow( $lang['opt_sys_cpm'], $lang['opt_sys_cpmd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[comm_nummers]' value="{$config['comm_nummers']}" size=10>" ); showRow( $lang['opt_sys_csort'], $lang['opt_sys_csortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[comm_msort]", "{$config['comm_msort']}" ) ); showRow( $lang['opt_sys_af'], $lang['opt_sys_afd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[flood_time]' value="{$config['flood_time']}" size=10>" ); showRow( $lang['opt_sys_aw'], $lang['opt_sys_awd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[auto_wrap]' value="{$config['auto_wrap']}" size=10>" ); showRow( $lang['opt_sys_ct'], "<a onClick="javascript:Help('date')" class=main href="#">$lang[opt_sys_and]</a>", "<input class="edit bk" type=text style="text-align: center;" name='save_con[timestamp_comment]' value="{$config['timestamp_comment']}" size=40>" ); showRow( $lang['opt_sys_asc'], $lang['opt_sys_ascd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_search_link]", "{$config['allow_search_link']}" ) ); showRow( $lang['opt_sys_cmail'], $lang['opt_sys_cmaild'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_comments]", "{$config['mail_comments']}" ) ); showRow( $lang['opt_sys_wdcom'], $lang['opt_sys_wdscomd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_comments_wysiwyg]", "{$config['allow_comments_wysiwyg']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="optimisation"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_dch']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_cac'], $lang['opt_sys_cad'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_cache]", "{$config['allow_cache']}" ) ); showRow( $lang['opt_sys_ctype'], $lang['opt_sys_ctyped'], makeDropDown( array ("0" => $lang['opt_sys_filec'], "1" => "Memcache" ), "save_con[cache_type]", "{$config['cache_type']}" ) ); showRow( $lang['opt_sys_memserv'], $lang['opt_sys_memservd'], "<input class="edit bk" type=text style="text-align: center;" name="save_con[memcache_server]" value="{$config['memcache_server']}" size=40>" ); showRow( $lang['opt_sys_ag'], $lang['opt_sys_agd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_gzip]", "{$config['allow_gzip']}" ) ); showRow( $lang['opt_sys_ajsm'], $lang['opt_sys_ajsmd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[js_min]", "{$config['js_min']}" ) ); showRow( $lang['opt_sys_search'], $lang['opt_sys_searchd'], makeDropDown( array ("1" => $lang['opt_sys_advance'], "0" => $lang['opt_sys_simple'] ), "save_con[full_search]", "{$config['full_search']}" ) ); showRow( $lang['opt_sys_fastsearch'], $lang['opt_sys_fastsearchd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[fast_search]", "{$config['fast_search']}" ) ); showRow( $lang['opt_sys_ur'], $lang['opt_sys_urd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_registration]", "{$config['allow_registration']}" ) ); showRow( $lang['opt_sys_multiple'], $lang['opt_sys_multipled'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_multi_category]", "{$config['allow_multi_category']}" ) ); showRow( $lang['opt_sys_related'], $lang['opt_sys_relatedd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[related_news]", "{$config['related_news']}" ) ); showRow( $lang['opt_sys_nodate'], $lang['opt_sys_nodated'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[no_date]", "{$config['no_date']}" ) ); showRow( $lang['opt_sys_afix'], $lang['opt_sys_afixd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_fixed]", "{$config['allow_fixed']}" ) ); showRow( $lang['opt_sys_sbar'], $lang['opt_sys_sbard'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[speedbar]", "{$config['speedbar']}" ) ); showRow( $lang['opt_sys_ban'], $lang['opt_sys_band'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_banner]", "{$config['allow_banner']}" ) ); showRow( $lang['opt_sys_cmod'], $lang['opt_sys_cmodd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_cmod]", "{$config['allow_cmod']}" ) ); showRow( $lang['opt_sys_voc'], $lang['opt_sys_vocd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_votes]", "{$config['allow_votes']}" ) ); showRow( $lang['opt_sys_toc'], $lang['opt_sys_tocd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_topnews]", "{$config['allow_topnews']}" ) ); showRow( $lang['opt_sys_rn'], $lang['opt_sys_rnd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_read_count]", "{$config['allow_read_count']}" ) ); showRow( $lang['cache_c'], $lang['cache_cd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[cache_count]", "{$config['cache_count']}" ) ); showRow( $lang['opt_sys_dk'], $lang['opt_sys_dkd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_calendar]", "{$config['allow_calendar']}" ) ); showRow( $lang['opt_sys_da'], $lang['opt_sys_dad'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_archives]", "{$config['allow_archives']}" ) ); showRow( $lang['opt_sys_inform'], $lang['opt_sys_informd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[rss_informer]", "{$config['rss_informer']}" ) ); showRow( $lang['opt_sys_tags'], $lang['opt_sys_tagsd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_tags]", "{$config['allow_tags']}" ) ); showRow( $lang['opt_sys_change_s'], $lang['opt_sys_change_sd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_change_sort]", "{$config['allow_change_sort']}" ) ); showRow( $lang['opt_sys_cajax'], $lang['opt_sys_cajaxd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[comments_ajax]", "{$config['comments_ajax']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="files"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_filesys']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_file'], $lang['opt_sys_filed'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[files_allow]", "{$config['files_allow']}" ) ); showRow( $lang['opt_sys_file1'], $lang['opt_sys_file1d'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[files_type]' value="{$config['files_type']}" size=40>" ); showRow( $lang['opt_sys_maxfile'], $lang['opt_sys_maxfiled'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_file_size]' value="{$config['max_file_size']}" size=10>" ); showRow( $lang['opt_sys_maxfilec'], $lang['opt_sys_maxfilecd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_file_count]' value="{$config['max_file_count']}" size=10>" ); showRow( $lang['opt_sys_file4'], $lang['opt_sys_file4d'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[files_force]", "{$config['files_force']}" ) ); showRow( $lang['opt_sys_file5'], $lang['opt_sys_file5d'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[files_max_speed]' value="{$config['files_max_speed']}" size=10>" ); showRow( $lang['opt_sys_file3'], $lang['opt_sys_file3d'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[files_antileech]", "{$config['files_antileech']}" ) ); showRow( $lang['opt_sys_file2'], $lang['opt_sys_file2d'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[files_count]", "{$config['files_count']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="mail"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_mail']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_amail'], $lang['opt_sys_amaild'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[admin_mail]' value='{$config['admin_mail']}' size=30>" ); showRow( $lang['opt_sys_mm'], $lang['opt_sys_mmd'], makeDropDown( array ("php" => "PHP Mail()", "smtp" => "SMTP" ), "save_con[mail_metod]", "{$config['mail_metod']}" ) ); showRow( $lang['opt_sys_phpma'], $lang['opt_sys_phpmad'], "<input class="edit bk" type="text" style="text-align: center;" name='save_con[mail_additional]' value="{$config['mail_additional']}" size=50>" ); showRow( $lang['opt_sys_smtph'], $lang['opt_sys_smtphd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[smtp_host]' value="{$config['smtp_host']}" size=30>" ); showRow( $lang['opt_sys_smtpp'], $lang['opt_sys_smtppd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[smtp_port]' value="{$config['smtp_port']}" size=30>" ); showRow( $lang['opt_sys_smtup'], $lang['opt_sys_smtpud'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[smtp_user]' value="{$config['smtp_user']}" size=30>" ); showRow( $lang['opt_sys_smtupp'], $lang['opt_sys_smtpupd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[smtp_pass]' value="{$config['smtp_pass']}" size=30>" ); showRow( $lang['opt_sys_smtpm'], $lang['opt_sys_smtpmd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[smtp_mail]' value="{$config['smtp_mail']}" size=30>" ); showRow( $lang['opt_sys_mhelo'], $lang['opt_sys_mhelod'], makeDropDown( array ("HELO" => "HELO", "EHLO" => "EHLO" ), "save_con[smtp_helo]", "{$config['smtp_helo']}" ) ); showRow( $lang['opt_sys_mbcc'], $lang['opt_sys_mbccd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_bcc]", "{$config['mail_bcc']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="users"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_uch']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_mauth'], $lang['opt_sys_mauthd'], makeDropDown( array ("0" => $lang['opt_sys_login'], "1" => $lang['opt_sys_email'] ), "save_con[auth_metod]", $config['auth_metod'] ) ); showRow( $lang['opt_sys_reggroup'], $lang['opt_sys_reggroupd'], makeDropDown( $sys_group_arr, "save_con[reg_group]", $config['reg_group'] ) ); showRow( $lang['opt_sys_ut'], $lang['opt_sys_utd'], makeDropDown( array ("0" => $lang['opt_sys_reg'], "1" => $lang['opt_sys_reg_1'] ), "save_con[registration_type]", "{$config['registration_type']}" ) ); showRow( $lang['opt_sys_rules'], $lang['opt_sys_rulesd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[registration_rules]", "{$config['registration_rules']}" ) ); showRow( $lang['opt_sys_code'], $lang['opt_sys_coded'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_sec_code]", "{$config['allow_sec_code']}" ) ); showRow( $lang['opt_sys_question'], $lang['opt_sys_questiond'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[reg_question]", "{$config['reg_question']}" ) ); showRow( $lang['opt_sys_sc'], $lang['opt_sys_scd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_skin_change]", "{$config['allow_skin_change']}" ) ); showRow( $lang['opt_sys_pmail'], $lang['opt_sys_pmaild'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_pm]", "{$config['mail_pm']}" ) ); showRow( $lang['opt_sys_um'], $lang['opt_sys_umd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_users]' value="{$config['max_users']}" size=10>" ); showRow( $lang['opt_sys_ud'], $lang['opt_sys_udd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_users_day]' value="{$config['max_users_day']}" size=10>" ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="imagesconf"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_sys_ich']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_maxside'], $lang['opt_sys_maxsided'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_up_side]' value="{$config['max_up_side']}" size=10>" ); showRow( $lang['opt_sys_maxsize'], $lang['opt_sys_maxsized'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_up_size]' value="{$config['max_up_size']}" size=10>" ); showRow( $lang['opt_sys_dim'], $lang['opt_sys_dimd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_image_days]' value="{$config['max_image_days']}" size=10>" ); showRow( $lang['opt_sys_iw'], $lang['opt_sys_iwd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_watermark]", "{$config['allow_watermark']}" ) ); showRow( $lang['opt_sys_im'], $lang['opt_sys_imd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_watermark]' value="{$config['max_watermark']}" size=10>" ); showRow( $lang['opt_sys_ia'], $lang['opt_sys_iad'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[max_image]' value="{$config['max_image']}" size=10>" ); showRow( $lang['opt_sys_sdef'], $lang['opt_sys_sdefd'], makeDropDown( array ("0" => $lang['upload_t_seite_1'], "1" => $lang['upload_t_seite_2'], "2" => $lang['upload_t_seite_3'] ), "save_con[t_seite]", "{$config['t_seite']}" ) ); showRow( $lang['opt_sys_ij'], $lang['opt_sys_ijd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[jpeg_quality]' value="{$config['jpeg_quality']}" size=10>" ); showRow( $lang['opt_sys_imw'], $lang['opt_sys_imwd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[tag_img_width]' value="{$config['tag_img_width']}" size=10>" ); showRow( $lang['opt_sys_dimm'], $lang['opt_sys_dimmd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[thumb_dimming]", "{$config['thumb_dimming']}" ) ); showRow( $lang['opt_sys_gall'], $lang['opt_sys_galld'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[thumb_gallery]", "{$config['thumb_gallery']}" ) ); showRow( $lang['opt_sys_sim'], $lang['opt_sys_simd'], makeDropDown( array ("0" => $lang['outline_1'], "1" => $lang['outline_2'], "2" => $lang['outline_3'], "3" => $lang['outline_4'] ), "save_con[outlinetype]", "{$config['outlinetype']}" ) ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="smartphone"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_smartphone']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_smart'], $lang['opt_sys_smartd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smartphone]", "{$config['allow_smartphone']}" ) ); showRow( $lang['opt_sys_sm_im'], $lang['opt_sys_sm_imd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_images]", "{$config['allow_smart_images']}" ) ); showRow( $lang['opt_sys_sm_iv'], $lang['opt_sys_sm_ivd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_video]", "{$config['allow_smart_video']}" ) ); showRow( $lang['opt_sys_sm_fm'], $lang['opt_sys_sm_fmd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_format]", "{$config['allow_smart_format']}" ) ); showRow( $lang['opt_sys_sm_n'], $lang['opt_sys_sm_nd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[mobile_news]' value="{$config['mobile_news']}" size=10>" ); echo "</table></td></tr>"; echo <<<HTML <tr style='display:none' id="rss"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_rsssys']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; showRow( $lang['opt_sys_arss'], $lang['opt_sys_arssd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_rss]", "{$config['allow_rss']}" ) ); showRow( $lang['opt_sys_trss'], $lang['opt_sys_trssd'], makeDropDown( array ("0" => $lang['opt_sys_rss_type_0'], "1" => $lang['opt_sys_rss_type_1'] ), "save_con[rss_mtype]", "{$config['rss_mtype']}" ) ); showRow( $lang['opt_sys_nrss'], $lang['opt_sys_nrssd'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[rss_number]' value="{$config['rss_number']}" size=10>" ); showRow( $lang['opt_sys_frss'], $lang['opt_sys_frssd'], makeDropDown( array ("0" => $lang['opt_sys_rss_type_2'], "1" => $lang['opt_sys_rss_type_3'], "2" => $lang['opt_sys_rss_type_4'] ), "save_con[rss_format]", "{$config['rss_format']}" ) ); echo "</table></td></tr>"; #***************************************************************** # DLE NEWS SLIDER V.1.5 #***************************************************************** require_once("language/".$config['langs'].'/slider.lng'); echo <<<HTML <tr style='display:none' id="slider"><td> <table width="100%"> <tr> <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['opt_slidersys']}</div></td> </tr> </table> <div class="unterline"></div><table width="100%"> HTML; $categories = $db->query("SELECT id,name,posi,parentid FROM ".PREFIX."_category WHERE parentid = 0 ORDER BY posi ASC"); while($row = $db->get_row($categories) ) { if( $row['id'] == $config['newsslider_spcat']) $categories_list .= "<option value="{$row[id]}" selected>{$row[name]}</option>rn"; else $categories_list .= "<option value="{$row[id]}">{$row[name]}</option>rn"; } $category_selector = "<select name="save_con[newsslider_spcat]" class="edit" style="width: 200px;"> <option value="all">{$lang['edit_all']}</option> {$categories_list} </select>"; if( !$config['newsslider_number'] OR !is_numeric($config['newsslider_number'])) $config['newsslider_number'] = 5; if( !$config['newsslider_time'] OR !is_numeric($config['newsslider_time'])) $config['newsslider_time'] = 1; if( !$config['newsslider_words'] OR !is_numeric($config['newsslider_words'])) $config['newsslider_words'] = 15; if( !$config['newsslider_x_size'] OR !is_numeric($config['newsslider_x_size'])) $config['newsslider_x_size'] = 500; if( !$config['newsslider_y_size'] OR !is_numeric($config['newsslider_y_size'])) $config['newsslider_y_size'] = 300; if( !$config['newsslider_cache'] OR ( $config['newsslider_cache'] != 1 AND $config['newsslider_cache'] != 0 ) ) $config['newsslider_cache'] = 1; if( !$config['newsslider_fulltext'] OR !is_numeric($config['newsslider_fulltext'])) $config['newsslider_fulltext'] = 0; if( !$config['newsslider_fullimage'] OR !is_numeric($config['newsslider_fullimage'])) $config['newsslider_fullimage'] = 0; showRow( $sl_lang['opt_sys_ns_spcat'], $sl_lang['opt_sys_ns_dspcat'], $category_selector ); showRow( $sl_lang['opt_sys_ns_subs'], $sl_lang['opt_sys_ns_dsubs'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[newsslider_multicat]", "{$config['newsslider_multicat']}" ) ); showRow( $sl_lang['opt_sys_ns_number'], $sl_lang['opt_sys_ns_dnumber'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[newsslider_number]' value="{$config['newsslider_number']}" size=10>" ); showRow( $sl_lang['opt_sys_ns_item'], $sl_lang['opt_sys_ns_ditem'], makeDropDown( array ("1" => str_replace(":","",$lang['addnews_full']), "0" => str_replace(":","",$lang['addnews_short']) ), "save_con[newsslider_fulltext]", "{$config['newsslider_fulltext']}" ) ); showRow( $sl_lang['opt_sys_ns_image'], $sl_lang['opt_sys_ns_dimage'], makeDropDown( array ("1" => str_replace(":","",$lang['addnews_full']), "0" => str_replace(":","",$lang['addnews_short']) ), "save_con[newsslider_fullimage]", "{$config['newsslider_fullimage']}" ) ); showRow( $sl_lang['opt_sys_ns_time'], $sl_lang['opt_sys_ns_dtime'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[newsslider_time]' value="{$config['newsslider_time']}" size=10>" ); showRow( $sl_lang['opt_sys_ns_words'], $sl_lang['opt_sys_ns_dwords'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[newsslider_words]' value="{$config['newsslider_words']}" size=10>" ); showRow( $sl_lang['opt_sys_ns_xsz'], $sl_lang['opt_sys_ns_dxsz'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[newsslider_x_size]' value="{$config['newsslider_x_size']}" size=10>" ); showRow( $sl_lang['opt_sys_ns_ysz'], $sl_lang['opt_sys_ns_dysz'], "<input class="edit bk" type=text style="text-align: center;" name='save_con[newsslider_y_size]' value="{$config['newsslider_y_size']}" size=10>" ); showRow( $sl_lang['opt_sys_ns_cache'], $sl_lang['opt_sys_ns_dcache'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[newsslider_cache]", "{$config['newsslider_cache']}" ) ); echo "</table></td></tr>"; #***************************************************************** # DLE NEWS SLIDER V.1.5 #***************************************************************** if(!is_writable(ENGINE_DIR . '/data/config.php')) { $lang['stat_system'] = str_replace ("{file}", "engine/data/config.php", $lang['stat_system']); $fail = "<br /><br /><div class="ui-state-error ui-corner-all" style="padding:10px;">{$lang['stat_system']}</div>"; } else $fail = ""; echo <<<HTML <tr> <td style="padding-top:10px; padding-bottom:10px;padding-right:10px;"><input type=hidden name=mod value=options> <input type=hidden name=action value=dosavesyscon><input type="hidden" name="user_hash" value="$dle_login_hash" /><input type="submit" class="buttons" value=" {$lang['user_save']} ">{$fail}</td> </tr> </table> </td> <td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td> </tr> <tr> <td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td> <td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td> <td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td> </tr> </table> </div></form> HTML; echofooter(); } // ******************************************************************************** // Запись настроек // ******************************************************************************** elseif( $action == "dosavesyscon" ) { if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { die( "Hacking attempt! User not found" ); } if( $member_id['user_group'] != 1 ) { msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); } $db->query( "INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('".$db->safesql($member_id['name'])."', '{$_TIME}', '{$_IP}', '48', '')" ); $save_con = $_POST['save_con']; include_once ENGINE_DIR . '/classes/parse.class.php'; $parse = new ParseFilter(); $parse->safe_mode = true;; $save_con['offline_reason'] = $parse->process( stripslashes( trim( $save_con['offline_reason'] ) ) ); $save_con['offline_reason'] = str_replace( '"', '"', $parse->BB_Parse( $save_con['offline_reason'], false ) ); $find[] = "'r'"; $replace[] = ""; $find[] = "'n'"; $replace[] = ""; if( $auto_detect_config ) $config['http_home_url'] = ""; $save_con = $save_con + $config; $handler = fopen( ENGINE_DIR . '/data/config.php', "w" ); fwrite( $handler, "<?PHP nn//System Configurationsnn$config = array (nn" ); foreach ( $save_con as $name => $value ) { if( $name != "offline_reason" ) { $value = trim( strip_tags(stripslashes( $value )) ); $value = htmlspecialchars( $value, ENT_QUOTES); $value = preg_replace( $find, $replace, $value ); $name = trim( strip_tags(stripslashes( $name )) ); $name = htmlspecialchars( $name, ENT_QUOTES ); $name = preg_replace( $find, $replace, $name ); } $value = str_replace( "$", "$", $value ); $value = str_replace( "{", "{", $value ); $value = str_replace( "}", "}", $value ); $name = str_replace( "$", "$", $name ); $name = str_replace( "{", "{", $name ); $name = str_replace( "}", "}", $name ); fwrite( $handler, "'{$name}' => "{$value}",nn" ); } fwrite( $handler, ");nn?>" ); fclose( $handler ); clear_cache(); msg( "info", $lang['opt_sysok'], "$lang[opt_sysok_1]<br /><br /><a href=$PHP_SELF?mod=options&action=syscon>$lang[db_prev]</a>" ); } ?> |
За последние 24 часа нас посетили 8767 программистов и 536 роботов. Сейчас ищут 334 программиста …
-
- С нами с:
- 30 мар 2016
- Сообщения:
- 2
- Симпатии:
- 0
ПОДСКАЖИТЕ ПОЖАЛУЙСТА , ЧТО ТУТ НЕ ТАК Я НАПИСАЛ, ГДЕ ОШИБСЯ В КОДЕ, ВОТ ОШИБКА ЧТО ВЫДАЁТСЯ
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Z:homeodnokl.ruwwwsystemincgifts.php on line 124
ВОТ САМА СТРОКА В ФАЙЛЕ НА КОТОРУЮ ССЫЛАЕТСЯ-
echohtmlstart(‘Список подарков (‘.$numRows[‘cnt’].‘)’);
ДЛЯ БОЛЬШЕЙ НАГЛЯДНОСТИ ВОТ САМ ВЕСЬ ФАЙЛ
-
if(isset($_POST[‘save’])){
-
$price = intval($_POST[‘price’]);
-
$category = intval($_POST[‘category’]);
-
$allowed_files = array(‘jpg’, ‘png’);
-
//Получаем данные о фотографии ОРИГИНАЛ
-
$image_tmp = $_FILES[‘original’][‘tmp_name’];
-
$image_name = totranslit($_FILES[‘original’][‘name’]); // оригинальное название для оприделения формата
-
$image_size = $_FILES[‘original’][‘size’]; // размер файла
-
$type = end(explode(«.», $image_name)); // формат файла
-
//Получаем данные о фотографии КОПИЯ
-
$image_tmp_2 = $_FILES[‘thumbnail’][‘tmp_name’];
-
$image_name_2 = totranslit($_FILES[‘thumbnail’][‘name’]); // оригинальное название для оприделения формата
-
$image_size_2 = $_FILES[‘thumbnail’][‘size’]; // размер файла
-
$type_2 = end(explode(«.», $image_name_2)); // формат файла
-
//Проверям если, формат верный то пропускаем
-
if($image_size < 200000){
-
if($image_size_2 < 100000){
-
$rand_name = rand(0, 1000);
-
$db->query(«INSERT INTO `».PREFIX.«_gifts_list` SET img = ‘».$rand_name.«‘, price = ‘».$price.«‘, category = ‘».$category.«‘»);
-
msgbox(‘Информация’, ‘Подарок успешно добавлен’, ‘?mod=gifts’);
-
msgbox(‘Ошибка’, ‘Уменьшеная копия привышает допустимый размер 100 кб’, ‘javascript:history.go(-1)’);
-
msgbox(‘Ошибка’, ‘Оригинал привышает допустимый размер 200 кб’, ‘javascript:history.go(-1)’);
-
msgbox(‘Ошибка’, ‘Неправильный формат’, ‘javascript:history.go(-1)’);
-
msgbox(‘Ошибка’, ‘Укажите цену подарка’, ‘javascript:history.go(-1)’);
-
if($_GET[‘act’] == ‘del’){
-
$row = $db->super_query(«SELECT img FROM `».PREFIX.«_gifts_list` WHERE gid = ‘».$id.«‘»);
-
$db->query(«DELETE FROM `».PREFIX.«_gifts_list` WHERE gid = ‘».$id.«‘»);
-
@unlink(ROOT_DIR.«/uploads/gifts/».$row[‘img’].‘.jpg’);
-
@unlink(ROOT_DIR.«/uploads/gifts/».$row[‘img’].‘.png’);
-
header(‘Location: ?mod=gifts’);
-
if($_GET[‘act’] == ‘edit’){
-
$price = intval($_GET[‘price’]);
-
$category = intval($_GET[‘category’]);
-
if($price <= 0) $price = 1;
-
$db->query(«UPDATE`».PREFIX.«_gifts_list` SET price = ‘».$price.«‘, category = ‘».$category.«‘ WHERE gid = ‘».$id.«‘»);
-
header(‘Location: ?mod=gifts’);
-
$numRows = $db->super_query(«SELECT COUNT(*) AS cnt FROM `».PREFIX.«_gifts_list`»);
-
$sql_ = $db->super_query(«SELECT SQL_CALC_FOUND_ROWS * FROM `».PREFIX.«_gifts_list` ORDER by `gid` DESC», 1);
-
<div style=»float:left;width: 150px;height:150px;text-align:center;margin-bottom:45px;margin-top:5px»>
-
<center><img src=»/uploads/gifts/{$row[‘img’]}.png» style=»margin-bottom:15px» /></center>
-
<input type=»text» id=»price{$row[‘gid’]}» class=»inpu» value=»{$row[‘price’]}» />
-
<input type=»text» id=»category{$row[‘gid’]}» class=»inpu» value=»{$row[‘category’]}» />
-
[ [url=»?mod=gifts&act=del&id={$row[‘gid’]}»]удалить[/url] ]
-
echohtmlstart(‘Добавление подарка’);
-
<style type=»text/css» media=»all»>
-
textarea{width:450px;height:400px;}
-
<form action=»» enctype=»multipart/form-data» method=»POST»>
-
<input type=»hidden» name=»mod» value=»notes» />
-
<div class=»fllogall» style=»width:180px»>Цена:</div>
-
<input type=»text» name=»price» class=»inpu» />
-
<div class=»mgcler»></div>
-
<div class=»fllogall» style=»width:180px»>Категория:</div>
-
<input type=»text» name=»category» class=»inpu» />
-
<div class=»mgcler»></div>
-
<div class=»fllogall» style=»width:180px»>Оригинал .JPG, 256×256:</div>
-
<input type=»file» name=»original» class=»inpu» style=»width:300px» />
-
<div class=»mgcler»></div>
-
<div class=»fllogall» style=»width:180px»>Уменьшеная копия .PNG, 96×96:</div>
-
<input type=»file» name=»thumbnail» class=»inpu» style=»width:300px» />
-
<div class=»mgcler»></div>
-
<div class=»fllogall» style=»width:180px»> </div>
-
<input type=»submit» value=»Добавить» class=»inp» name=»save» style=»margin-top:0px» />
-
echohtmlstart(‘Список подарков (‘.$numRows[‘cnt’].‘)’);
ЗАРАНЕЕ БЛАГОДАРЕН.
-
Команда форума
Модератор- С нами с:
- 18 мар 2010
- Сообщения:
- 32.415
- Симпатии:
- 1.768
Re: ПОДСКАЖИТЕ ПОЖАЛУЙСТА , ЧТО ТУТ НЕ ТАК Я НАПИСАЛ
у тебя капс залип
Добавлено спустя 4 минуты 42 секунды:
у тебя есть пробел после HTML;
из-за этого всё пошло наперекосяк. Убери его и сразу всё станет норм. Во всех таких местах убери.
КузьминАлексей нравится это.
-
- С нами с:
- 30 мар 2016
- Сообщения:
- 2
- Симпатии:
- 0
Во блин точно. Спасибо огромное, за помощь. голова проморгал. Спасибо ещё раз,очень помогли.
-
Команда форума
Модератор- С нами с:
- 18 мар 2010
- Сообщения:
- 32.415
- Симпатии:
- 1.768
-
- С нами с:
- 22 мар 2018
- Сообщения:
- 2
- Симпатии:
- 0
МОЖЕТЕ ОБЪЯСНИТЬ А ГДЕ ТАМ ПРОБЕЛ ТО??)) У меня ровно такая же ошибка…
-
- С нами с:
- 22 мар 2018
- Сообщения:
- 2
- Симпатии:
- 0
Спасибо, понял)) решил по вашему ответу выше..