|
|
Latest News |
Latest Threads |
|
 |
56.036 Posts & 4.945 Themen in 78 Foren |
|
|
|
 |
Forensuche |
|
Suchbegriff |
Benutzerauswahl |
Ergebnisse anzeigen |
 |
 |
Validierung des Copyrights 22 Beiträge in diesem Thema |
|
|
 |
|
 |
14.07.2012 - 18:58 Uhr |
|
|
|
Zitat Original geschrieben von fireball1982
Hoff ich mach hier nicht zuviele Themen auf ... |
Offtopic
Mach mal, das nimmt dir niemand übel 
|
|
|
|
|
|
|
 |
|
 |
15.07.2012 - 16:21 Uhr |
|
|
|
Herrlich,
unglaublich - egal bei welchem Problem, immer ne Lösung parat, klasse!!
Vielen Dank, jetzt hauts hin.
|
|
|
|
|
|
|
 |
|
 |
30.07.2012 - 22:00 Uhr |
|
|
|
Hi mal wieder ,
ich habe mal noch ne kleine Frage zur Validierung.
Wenn man z.b. auf linker Seite Navigationsboxen hat kann man diese im ACP ja schließen, sodass der Betrachter erst auf den Namen der Box klicken muss damit diese sich öffnet. Wenn man das macht ändert sich der Link in der Browserleiste von include.php?path=start.php z.b. zu include.php?path=start.php&nid=51
Und wegen dem & zickt der Validator rum, ich habe nun schon über das Template navigation/navigation_top_head_link den Link in | Quellcode include.php?$navpath&nid=$navcat[navigationcat_id] | | abgeändert, nur bringt das leider keinen Erfolg, muss ich dort noch woanders ran damit das valide wird ?
Gruß
edit: ok moment, es sind nicht die Links dort sondern an anderer Stelle macht das &nid Probleme, und zwar wenn die URL über
| Quellcode $config[site_url]/?$_SERVER[QUERY_STRING] | | ausgegeben wird dann steht im Quelltext die Adresse als
| Quellcode .....?path=start.php&nid=51....." | |
Nun weiß ich garnicht wo ich das finden kann -.-
Was mir auch aufgefallen ist, wenn ich Links anlege (Links verwalten im ACP) wird die Eingabe | Quellcode include.php?path=login/memberliste.php&id=1 | | nach dem Speichern als | Quellcode include.php?path=login/memberliste.php&id=1 | | angezeigt, weiß jemand wo ich das reparieren kann ?
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von fireball1982 - 30.07.2012 - 22:10 Uhr |
|
|
|
|
|
|
|
 |
|
 |
31.07.2012 - 18:45 Uhr |
|
|
|
|
|
|
 |
|
 |
31.07.2012 - 19:17 Uhr |
|
|
|
Admin > Link bearbeiten
Das ging schon, nur wurde es nicht in seinen 'Bestandsteilen' zerlegt, sondern direkt vom Server (oder Browser) in ordentliches Text umgewandelt. Das ist wie mit Umlauten. Die werden ja auch so angezeigt, wie wir es kennen.
Wie gesagt, es wurde ja, sofern man es so abspeichert, auch in der Datenbank so eingetragen und im Quelltext auch wiedergegeben.
Und in manchen Fällen muss man, wenn man es denn so haben möchte, den Server halt sagen: Mach so ;o
Status-Box auf / zu
Das ist jetzt abgehackt?oO
FaceBook-Link
Da bleibt nur eins:
Öffne die include.php und suche das:
| PHP-Quelltext pkPublicCalendarUpdate(); | |
Füge darunter das ein:
| PHP-Quelltext $currentLink=htmlentities($config['site_url'].'/?'.$_SERVER['QUERY_STRING']); | |
Dann setzt du im FaceBook-Link einfach statt dem hier:
| PHP-Quelltext $config[site_url]/?$_SERVER[QUERY_STRING] | |
einfach das ein:
| PHP-Quelltext $currentLink | |
|
|
|
|
|
|
|
 |
|
 |
|
 |
01.08.2012 - 14:34 Uhr |
|
|
|
Gut, nun geht der Link wieder durch die Änderung. Danke.
Glaub das ist hier ein Fass ohne Boden, wenn ich den Pagelink unter den News auf der Startseite benutze zeigt er mir direkt wieder ne Latte von Fehlern an einmal verbunden mit $current_path beim Login Formular und dann wieder mit den Links in der Navigation. Glaub langsam da ist bei mir generell was kaputt :/
Zitat general entity X not defined and no default entity
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Line 121, column 74: general entity "catid" not defined and no default entity
…e="hidden" name="remove_path" value="path=content/news.php&catid=&entries=0" />
Line 121, column 81: general entity "entries" not defined and no default entity
…e="hidden" name="remove_path" value="path=content/news.php&catid=&entries=0" />
|
Zitat reference to entity X for which no system identifier could be generated
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Line 121, column 79: reference to entity "catid" for which no system identifier could be generated
…e="hidden" name="remove_path" value="path=content/news.php&catid=&entries=0" />
Line 121, column 88: reference to entity "entries" for which no system identifier could be generated
…e="hidden" name="remove_path" value="path=content/news.php&catid=&entries=0" />
Line 286, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=51">GERMAN LEAGUE</a…
Line 286, column 85: reference to entity "entries" for which no system identifier could be generated
…p?path=content/news.php&catid=&entries=0&nid=51">GERMAN LEAGUE</a></h2></l…
Line 289, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=8">GERMAN CUP</a></h…
Line 289, column 85: reference to entity "entries" for which no system identifier could be generated
….php?path=content/news.php&catid=&entries=0&nid=8">GERMAN CUP</a></h2></li>
Line 292, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=52">EURO LEAGUE</a><…
Line 292, column 85: reference to entity "entries" for which no system identifier could be generated
…hp?path=content/news.php&catid=&entries=0&nid=52">EURO LEAGUE</a></h2></li>
Line 295, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=62">EURO CUP</a></h2…
Line 295, column 85: reference to entity "entries" for which no system identifier could be generated
…e.php?path=content/news.php&catid=&entries=0&nid=62">EURO CUP</a></h2></li>
Line 298, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=55">PLAYSTATION LEAG…
Line 298, column 85: reference to entity "entries" for which no system identifier could be generated
…p?path=content/news.php&catid=&entries=0&nid=55">PLAYSTATION LEAGUE</a></h…
Line 301, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=63">PLAYSTATION CUP<…
Line 301, column 85: reference to entity "entries" for which no system identifier could be generated
…p?path=content/news.php&catid=&entries=0&nid=63">PLAYSTATION CUP</a></h2><…
Line 304, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=64">CHAMPIONS CUP</a…
Line 304, column 85: reference to entity "entries" for which no system identifier could be generated
…p?path=content/news.php&catid=&entries=0&nid=64">CHAMPIONS CUP</a></h2></l…
Line 307, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=65">UEFA CUP</a></h2…
Line 307, column 85: reference to entity "entries" for which no system identifier could be generated
…e.php?path=content/news.php&catid=&entries=0&nid=65">UEFA CUP</a></h2></li>
Line 310, column 76: reference to entity "catid" for which no system identifier could be generated
…nclude.php?path=content/news.php&catid=&entries=0&nid=66">WORLD CUP</a></h…
Line 310, column 85: reference to entity "entries" for which no system identifier could be generated
….php?path=content/news.php&catid=&entries=0&nid=66">WORLD CUP</a></h2></li>
|
Gibts da keine Universallösung für ? 
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von fireball1982 - 01.08.2012 - 14:35 Uhr |
|
|
|
|
|
|
|
 |
|
 |
01.08.2012 - 16:48 Uhr |
|
|
|
//edit Vergiss den Part mit den Code ..
//edit 2 Öffne die inc/func/default.php und suche das:
| PHP-Quelltext $tplName = $config['templatename'] ? "\n\n<!--\n".$tpl.$ext."\n-->\n\n" : '';
if(filecheck($tplstr))
$template_cache[$tname]=$tplName.str_replace("\"","\\\"",implode("",file($tplstr))).$tplName; | |
Und mache das daraus:
| PHP-Quelltext $tplName = $config['templatename'] ? "\n\n<!--\n".$tpl.$ext."\n-->\n\n" : '';
$validArray
=
array(
'&' =>'&',
);
if(filecheck($tplstr))
$template_cache[$tname]=$tplName.str_replace("\"","\\\"",implode("", str_replace(array_keys($validArray), array_values($validArray), file($tplstr)))).$tplName; | |
Ach ja, gilt für die 1.6.1. Wenn du die 1.6.03 nutzt, sags ;o
---
Und was die Fehler bzgl. der ungenutzten URL-Parameter angeht, siehe das:
Zitat Line 121, column 74: general entity "catid" not defined and no default entity
…e="hidden" name="remove_path" value="path=content/news.php&catid=&entries=0" /> |
Vergiss es, das ist von Hause aus so von den Entwicklern programmiert. Die haben sich einen Teufel um korrekten Code gekümmert. In dem Templates steht irgendwas wie sowas: ... news.php&catid=$catid ...
Um das zu beheben, müsste man entweder wie im vorherigen Code eine Abfrage starten, um sowas Universal zu beheben.
Nachteil wäre die größere Rechenleistung, und durch schlechtesn Parsen auch ungewollte Fehler. Gut, man könnte eine Liste machen, die gesucht und geändert werden sollen .. Aber wie gesagt: Mehr Rechenleistung wird beansprucht und unter umständen längere Ladezeiten.
|
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von k!r!ka - 01.08.2012 - 17:20 Uhr |
|
|
|
|
|
|
|
 |
|
 |
01.08.2012 - 17:30 Uhr |
|
|
|
Hi,
na es ist ja auch schon ein altes CMS.
Die Änderung von dir hat irgendwie garnichts bewirkt 
Zeile 862-877 sieht bei mir jetzt so aus
Hier klicken zum aufklappen   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 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | | PHP-Quelltext <?php
##################################################################
# #
# #
# PHPKIT #
# -------------------------------------------- #
# Copyright (c) 2002-2003 Gersöne & Schott GbR #
# #
# #
# ############################################################## #
# #
# Diese Datei / die PHPKIT-Software ist keine Freeware! #
# Für weitere Information besuchen Sie bitte unsere Webseite #
# oder kontaktieren uns per E-Mail: #
# #
# This file / the PHPKIT-software is not freeware! #
# For further informations please vistit our website #
# or contact us via email: #
# #
# Website: http://www.phpkit.de #
# Email: info@phpkit.de #
# #
# ############################################################## #
# #
# File: /inc/func/default.php #
# Author: Pierre Gersöne #
# Created: Version 1.6.1 - 2004-05-09 #
# Last Modified: Version 1.6.1 - 2004-05-09 #
# Description: not available for this file #
# #
# ############################################################## #
# #
# SIE SIND NICHT BERECHTIGT, UNRECHTMÄSSIGE KOPIEN DIESER #
# DATEI ZU ERSTELLEN UND/ODER DIESE INFORMATIONEN ZU ENTFERNEN #
# #
# YOU ARE NOT AUTHORISED TO CREATE ILLEGAL COPIES OF THIS #
# FILE AND/OR TO REMOVE THIS INFORMATIONS #
# #
##################################################################
function pkGetConfig($key)
{
global $config;
return isset($config[$key]) ? $config[$key] : false;
}
# mixed pkGetConfigF( string key )
function pkGetConfigF($key) {
$config=pkGetConfig($key);
return pkEntities($config);
}
# int pkGetUserMessageCount( void )
function pkGetUserMessageCount() {
return imstatus();
}
# string pkGetUservalue( string key )
function pkGetUservalue($key) {
global $USER;
return isset($USER[$key]) ? $USER[$key] : NULL;
}
# string pkGetUservalueF( string key )
function pkGetUservalueF($key) {
return pkEntities(pkGetUservalue($key));
}
function pkLoadClass(&$var, $class)
{
require_once(pkDIRCLASS.$class.pkEXT);
$classname='pk'.$class;
$var=new $classname;
}
function pkLoadFunc($filename)
{
require_once(pkDIRFUNC.$filename.pkEXT);
}
# void pkLoadLang( string filename )
function pkLoadLang($filename='default') {
global $LANG;
$vars=include_once(pkDIRLANG.'de/'.$filename.pkEXT);
if(is_array($vars))
$LANG=array_merge($LANG,$vars);
}
# string pkGetLang( string key )
function pkGetLang($key) {
global $LANG;
return isset($LANG[$key]) ? $LANG[$key] : (pkDEV ? 'L_'.$key : NULL);
}
# bool pkUrlCheck( string url )
function pkUrlCheck($str) {
return preg_match("/^(http|https|ftp|ftps)?:\/\/([a-z0-9-]+\.)+([a-z]{2,4})/si",$str);
}
# string pkRand( void )
function pkRand() {
srand((double) microtime()*1000000);
return md5(uniqid(rand()));
}
# string pkGetSpecialLang()
function pkGetSpecialLang() {
$array=func_get_args();
if(!isset($array[0]))
return NULL;
switch($array[0]) {
case 'month' :
$i=isset($array[1]) ? $array[1] : 1;
return pkGetLang('month'.$i);
case 'private_message' :
$c=pkGetUserMessageCount();
return !$c ? pkGetLang('you_got_no_new_private_messages') : ($c.' '.pkGetLang($c==1 ? 'private_message' : 'private_messages'));
case 'categories' :
$c=isset($array[1]) ? $array[1] : 1;
return !$c ? pkGetLang('no_categories') : ($c.' '.pkGetLang($c==1 ? 'category' : 'categories'));
case 'comment' :
$c=isset($array[1]) ? $array[1] : 0;
return $c==0 ? pkGetLang('no_comments') : ($c.' '.pkGetLang($c==1 ? 'comment' : 'comments'));
case 'guests_online' :
$c=isset($array[1]) ? $array[1] : 0;
return $c==0 ? pkGetLang('no_guests_online') : ($c.' '.pkGetLang($c==1 ? 'guest' : 'guests'));
case 'match' :
$c=isset($array[1]) ? $array[1] : 0;
return $c==0 ? pkGetLang('match_no') : (sprintf(pkGetLang($c==1 ? 'match' : 'matches'),$c));
case 'matches_in_threads' :
$m=isset($array[1]) ? $array[1] : 0;
$t=isset($array[2]) ? $array[2] : 0;
if(!$m || !$t)
return pkGetLang('match_no');
$matches=sprintf(pkGetLang($m==1 ? 'match' : 'matches'),$m);
$threads=pkGetLang($t==1 ? 'thread' : 'threads');
return $matches.' '.pkGetLang('in').' '.$t.' '.$threads;
default :
$c=count($array);
if(!$c>1)
return NULL;
$str=pkGetLang($array[0]);
$args='';
for($i=1; $i<$c; $i++)
$args.=",'".$array[$i]."'";
eval("\$str=@sprintf(\$str".$args.");");
return $str;
}
}
# string pkPrivateLinkmaker( string amp ,string linkbase, string path, string mode, string add ) {
function pkPrivateLinkmaker($a,$base,$path,$mode,$add) {
return $base.'?'.
($path ? 'path='.$path : '').
($mode ? $a.'mode='.$mode : '').
($add ? $a.str_replace('&',$a,$add) : '');
}
# string pkLink( [string path [, string mode [, string add [, string htmlanchor]]]] )
function pkLink($path='',$mode='',$add='',$anchor='') {
return pkPrivateLinkmaker('&',pkWWWSELF,$path,$mode,$add).$anchor;
}
# string pkLinkFull( [string path [, string mode [, string add [, string htmlanchor]]]] )
function pkLinkFull($path='',$mode='',$add='',$anchor='') {
return pkPrivateLinkmaker('&',pkGetConfig('site_url').'/'.pkSCRIPTNAME,$path,$mode,$add).$anchor;
}
# void pkHeader( void )
function pkHeader() {
if(pkFRONTEND=='public' && !isset
($_GET['popup'])){global $site;(defined('pkC')?$site=str_replace('</body>',pkC.'</body>',$site) (filectime(pkDIRINC.'lang/'.pkGetConfig
('language').'/default'.pkEXT)+216000)<pkTIME && $USER['status']!='admin'?exit(strrev('>--devomer thgirypoc--!<')):NULL));}
if(!pkDEV && headers_sent())
return;
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Content-Type: text/html; charset=".pkGetLang('__charset__'));
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
}
# void pkHeaderLocation( [string path [, string mode [, string add [, string anchor ]]]] )
function pkHeaderLocation($path='',$mode='',$add='',$anchor='') {
header('Location: '.pkPrivateLinkmaker('&',pkWWWSELF,$path,$mode,$add).'&'.session_name().'='.session_id().($anchor ? '#'.$anchor : ''));
exit;
}
# string pkEntities( string string )
function pkEntities($str) {
return str_replace("'","'",str_replace("$","$",htmlentities($str) ) );
}
function pkParsertime($action='')
{
$mtime[0]=explode(" ",pkMICROTIME);
$mtime[1]=explode(" ",microtime());
return number_format(($mtime[1][1]+$mtime[1][0])-($mtime[0][1]+$mtime[0][0]),5,".",".");
}
# string pkTpl ( string tplname [, string tplextension ] )
function pkTpl($tpl,$ext='') {
return pkFRONTEND=='admin' ? templateinclude($tpl) : getTemplate($tpl,$ext);
}
# string pkTimeFormat( [ int time [, string type]])
function pkTimeFormat($time=-1,$type='%d.%m.%Y - %H:%M') {
return formattime($time,0,$type);
}
# mixed pkStripslashes( mixed var )
function pkStripslashes($var) {
if(!is_array($var))
return stripslashes($var);
foreach($var as $k=>$v)
$var[$k]=pkStripslashes($v);
return $var;
}
function getpost410vars()
{
global $HTTP_GET_VARS,
$HTTP_POST_VARS,
$HTTP_COOKIE_VARS,
$HTTP_ENV_VARS,
$HTTP_SERVER_VARS,
$HTTP_POST_FILES,
$_REQUEST,
$_GET,
$_POST,
$_COOKIE,
$_ENV,
$_SERVER,
$_FILES;
if(is_array($HTTP_GET_VARS))
{
foreach($HTTP_GET_VARS as $k=>$v)
$_REQUEST[$k]=$_GET[$k]=$v;
}
if(is_array($HTTP_POST_VARS))
{
foreach($HTTP_POST_VARS as $k=>$v)
$_REQUEST[$k]=$_POST[$k]=$v;
}
if(is_array($HTTP_COOKIE_VARS))
{
foreach($HTTP_COOKIE_VARS as $k=>$v)
$_REQUEST[$k]=$_COOKIE[$k]=$v;
}
if(is_array($HTTP_ENV_VARS))
{
foreach($HTTP_ENV_VARS as $k=>$v)
$_ENV[$k]=$v;
}
if(is_array($HTTP_SERVER_VARS))
{
foreach($HTTP_SERVER_VARS as $k=>$v)
$_SERVER[$k]=$v;
}
if(is_array($HTTP_POST_FILES))
{
foreach($HTTP_POST_FILES as $k=>$v)
$_FILES[$k]=$v;
}
} # end function getpost410vars
function stripslashes_array($array)
{
reset($array);
while(list($k,$v)=each($array)) {
if(is_string($v))
$array[$k]=stripslashes($v);
elseif(is_array($v))
$array[$k]=stripslashes_array($v);
}
return $array;
}
function getAge($d,$m,$y)
{
$strDate="".$d.".".$m.".".$y."";
if(!preg_match('/([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})/',$strDate,$arrParts))
return false;
$intAge=date('Y') - $arrParts[3];
if($arrParts[2]>date('m'))
$intAge--;
else
{
if($arrParts[2]==date('m'))
{
if($arrParts[1]>date('d'))
$intAge--;
}
}
return $intAge;
}
function contentcats()
{
global $db_tab, $DB, $contentcat_info_array;
if(!is_array($contentcat_info_array))
{
$getallcats=$DB->query("SELECT * FROM ".$db_tab['contentcat']." ORDER by contentcat_name ASC");
while($contentcat=$DB->fetch_array($getallcats))
$contentcat_cache[$contentcat['contentcat_id']]=$contentcat;
$contentcat_info_array[0]=$contentcat_cache;
}
return $contentcat_info_array;
}
function phpkitcookie($name, $value='', $expire=0)
{
global $config;
$expire = $expire ? $expire : pkTIME-86400;
$domain = $config['cookie_domain'];
$path = $config['cookie_path'];
$secure = $config['cookie_secure'];
setcookie($name, $value, $expire, $path, $domain, $secure);
}
function filecheck($file)
{
if(!($fp=@fopen($file,'r')))
return false;
fclose($fp);
return true;
}
function FileSizeExt($file='',$ext='Byte',$size=0)
{
$size_ext=array('','K','M','G','T');
if(!empty($file))
$size=@filesize($file);
if($size<=0)
return false;
$div=0;
while($size >= pow(1024,$div))
$div++;
return number_format(($size/pow(1024,$div-1)),1,",",".")." ".$size_ext[$div-1].$ext;
}
function formatfield($field)
{
if((string)(intval($field))!="$field")
$field=str_replace("\n","\\n",str_replace("\r","\\r",str_replace("\t","\\t",addslashes($field))));
return "'$field'";
}
function formattime($time=0,$offset=0,$type='%d.%m.%Y - %H:%M',$format='',$lang='german')
{
global $lang, $config;
$gmt=0;
if(!intval($time)>0) $time=pkTIME;
if(date("I")) $stime=3600;
if(!$offset) {
$offset=$config['time_gmtzone'];
$offset=$offset=$offset*3600;
}
$gmt=$stime+$offset;
$time=$time+$gmt;
$day=@gmdate("w",$time);
switch($type)
{
case 'stamp' :
return $time;
case 'istamp' :
return $time-$gmt-$gmt;
case 'date' :
return strftime("%d.%m.%Y",$time);
case 'time' :
return strftime("%H:%M",$time);
case 'time_full' :
return strftime("%H:%M:%S",$time);
case 'extend' :
return $lang['all_day'][$day][1].", ".date("j",$time).". ".$lang['all_month'][date("n",$time)][1]." ".date("Y",$time)." - ".date
("H",$time).":".date("i",$time);
default :
return strftime($type,$time);
}
}
function emailcheck($checkemail,$censor=0) {
global $config;
if(!preg_match("/^([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,}))$/si",$checkemail))
return false;
if($censor!=1 || empty($config['censor_email']))
return true;
$check="True";
$emails=explode("\n",$config['censor_email']);
foreach($emails as $e)
{
$e=trim($e);
if(!strstr($e,"*@"))
{
if($checkemail==$e)
return false;
}
else {
$ec=explode("@",$checkemail);
$ee=explode("@",$e);
if($ec[1]==$ee[1])
return false;
}
}
return true;
}
//icqcheck start
function icqcheck($checkicq) {
global $config;
if(!preg_match("/^[1-9]{1}[0-9]{5,8}$/",$checkicq)){
return false;
}
return true;
}
//icqcheck end
function mailsender($receiver='',$title,$message,$header='',$addheader='',$typ='txt')
{
global $config;
$smtp_server=stripslashes($config['smtp_server']);
if($smtp_server!="" && ini_get("SMTP")!=$smtp_server)
@ini_set("SMTP",$smtp_server);
if($receiver=='')
$receiver=$config['site_email'];
if($header=='')
$header='From: Webmaster '.$config['site_name'].' <'.$config['site_email'].'>';
if(($typ=="html" or $typ=="htm") && $config['site_mail_htm'])
$message.="<br /><br /><br />".stripslashes($config['site_mail_htm']);
elseif($config['site_mail_txt']!='')
$message.="\n\n\n".stripslashes($config['site_mail_txt']);
return mail($receiver,$title,$message,$header);
}
function parseregiexp($exp='')
{
for($i=0; $i<strlen($exp); $i++)
{
if($exp[$i]=='^' || $exp[$i]=='.' || $exp[$i]=='[' || $exp[$i]==']' || $exp[$i]=='$' || $exp[$i]=='(' || $exp[$i]==')' || $exp[$i]=='|' ||
$exp[$i]=='*' || $exp[$i]=='+' || $exp[$i]=='?' || $exp[$i]=='{' || $exp[$i]=='}' || $exp[$i]=='\\')
$newexp.='\\'.$exp[$i];
else
$newexp.=$exp[$i];
}
return $newexp;
}
function forencats()
{
global $db_tab, $DB, $forencat_info_array;
if(!is_array($forencat_info_array))
{
$getallcats=$DB->query("SELECT * FROM ".$db_tab['forumcat']." ORDER by forumcat_order ASC");
while($forumcat=$DB->fetch_array($getallcats))
{
if(getrights($forumcat['forumcat_rrights']) || userrights($forumcat['forumcat_mods'],$forumcat['forumcat_rrights']) || userrights
($forumcat['forumcat_user'],$forumcat['forumcat_rrights']))
{
$catcount++;
if($forumcat['forumcat_subcat']=='0')
{
$postcount += $forumcat['forumcat_postcount'];
$threadcount += $forumcat['forumcat_threadcount'];
}
}
$forumcat_cache[$forumcat['forumcat_id']]=$forumcat;
$forumcat_cache_byname[$forumcat['forumcat_name']]=$forumcat;
}
if(is_array($forumcat_cache_byname))
ksort($forumcat_cache_byname);
$forencat_info_array[0]=$forumcat_cache;
$forencat_info_array[1]=$forumcat_cache_byname;
$forencat_info_array[2]=$catcount;
$forencat_info_array[3]=$threadcount;
$forencat_info_array[4]=$postcount;
}
return $forencat_info_array;
}
function postcount($userposts, $postdelay, $rankonly)
{
global $config, $DB, $db_tab, $lang, $ranktitle;
$userposts=$userposts+$postdelay;
$p = $userposts==1 ? $lang['post'] : $lang['posts'];
if($ranktitle=="" && $config['forum_showrank']==1)
{
$getrank=$DB->query("SELECT forumrank_post, forumrank_title FROM ".$db_tab['forumrank']." ORDER by forumrank_post ASC");
while($rank=$DB->fetch_array($getrank))
$ranktitle[]=$rank;
}
if(is_array($ranktitle))
{
foreach($ranktitle as $r)
{
if($userposts < $r['forumrank_post'])
break;
$postrank=$r['forumrank_title'];
}
}
if($rankonly!=1)
{
if($postrank!="")
$post_status=" - ".$postrank;
$userrank=$userposts." ".$p." ".$post_status;
}
else
$userrank=$postrank;
return $userrank;
}
function imstatus()
{
global $DB, $db_tab, $USER, $imstatus_info;
if(intval($USER['id'])<=0)
return false;
if(isset($imstatus_info))
return $imstatus_info;
$im=$DB->fetch_array($DB->query("SELECT COUNT(im_id) as im FROM ".$db_tab['im']." WHERE im_to='".$USER['id']."' AND im_view=0 AND im_del=0"));
$imstatus_info=$im[0];
return $imstatus_info;
}
function ipcheck($userip)
{
global $config;
if(!$config['censor_ip'])
return true;
$ip_cache=explode("\n",preg_replace("/\s*\n\s*/","\n",strtolower(trim($config['censor_ip']))));
for($i=0; $i<count($ip_cache); $i++)
{
$ip_cache[$i]=trim($ip_cache[$i]);
if(!$ip_cache[$i])
continue;
if($userip==$ip_cache[$i])
return false;
if(strstr($ip_cache[$i], "*"))
{
$ip_cache[$i] = str_replace("*",".*",$ip_cache[$i]);
if(preg_match("/$ip_cache[$i]/i",$userip))
return false;
}
}
return true;
}
function getpassword()
{
srand((double)microtime()*1000000);
$password='';
$array=array
("b","c","d","f","g","h","j","k","l","m","n","p","r","s","t","v","w","x","y","z","a","e","i","o","u","0","1","2","3","4","5","6","7","8","9");
for($f=1; $f<=9; $f++)
$password.=$array[rand(0,35)];
return $password;
}
function pagelink($counter, $epp, $active ,$pagelink) {
global $lang;
$total_side=$lang['page'].": ";
$c=0;
$side=1;
while($counter>$c)
{
$link=$epp*$side;
$c=$c+$epp;
$total_side .= $side==$active ? ' <b><a href="'.$pagelink.'&page='.$link.'">'.$side.'</a></b>' : ' <a href="'.$pagelink.'&page='.$link.'">'.
$side.'</a>';
$side++;
}
return $total_side;
}
function sidelinksmall($counter, $epp, $pagelink)
{
global $lang;
$total_side=$lang['page'].": ";
$c=0;
$side=1;
while($counter>$c)
{
$link=$epp*$side-$epp;
$c=$c+$epp;
$total_side.=' <a href="'.$pagelink.'&entries='.$link.'">'.$side.'</a>';
$side++;
}
return $total_side;
}
function sidelink($counter, $epp, $entries, $pagelink)
{
global $config, $lang;
$c=0;
$s=0;
while($counter>$c)
{
$c=$c+$epp;
$s++;
}
eval("\$total_side= \"".getTemplate("sidelink","")."\";");
if($entries>0)
{
$total_side.="<a href=\"".$pagelink."&entries=0\"><<</a> ";
$p=$entries-$epp;
if($p<0)
$p=0;
}
$c=0;
$side=1;
$cside=(($entries+$epp)/$epp);
while($counter>$c)
{
$link=$epp*$side-$epp;
$c=$c+$epp;
if($side==$cside || ($cside<$side+$config['sidelinkfull_pages'] && $cside>$side-$config['sidelinkfull_pages']))
{
if($entries!=$link)
$total_side.="<a href=\"".$pagelink."&entries=".$link."\">".$side."</a> ";
else
$total_side.="<b>(".$side.")</b> ";
}
$side++;
}
$t=$counter-$epp;
if($t>$entries)
{
$n=$entries+$epp;
$total_side.="<a href=\"".$pagelink."&entries=".$link."\">>></a>";
}
return $total_side;
}
function sidelinkfull($counter, $epp, $entries, $pagelink, $class='')
{
global $config, $lang;
$c=0;
$s=0;
while($counter>$c)
{
$c=$c+$epp;
$s++;
}
if($entries>0)
{
$p=$entries-$epp;
if($p<0)
$p=0;
eval("\$total_side= \"".getTemplate("sidelink_prev","")."\";");
}
$c=0;
$side=1;
$cside=(($entries+$epp)/$epp);
while($counter>$c)
{
$link=$epp*$side-$epp;
$c=$c+$epp;
if($cside==$side)
eval("\$total_side.=\"".getTemplate("sidelink_page_match","")."\";");
elseif($cside<$side+$config['sidelinkfull_pages'] && $cside>$side-$config['sidelinkfull_pages'])
eval("\$total_side.=\"".getTemplate("sidelink_page_nomatch","")."\";");
$side++;
}
$t=$counter-$epp;
if($t>$entries)
{
$n=$entries+$epp;
eval("\$total_side.=\"".getTemplate("sidelink_next","")."\";");
}
eval("\$total_side=\"".getTemplate("sidelink","")."\";");
return $total_side;
}
function cutstring($str,$width)
{
$str=replacehtmlentities($str);
if($width<=0)
$width=15;
if(strlen($str)>$width)
$str=substr($str,0, $width)."..";
return htmlentities($str);
}
function replacehtmlentities($str)
{
return str_replace(">","<",
str_replace("<",">",
str_replace("ß","ß",
str_replace("ü","ü",
str_replace("Ü","Ü",
str_replace("ä","ä",
str_replace("Ä","Ä",
str_replace("ö","ö",
str_replace("Ö","Ö",
str_replace(""","\"",
str_replace("´","´",
str_replace("&","&",$str)))))))))))
);
}
if(!function_exists('getTemplate'))
{
function getTemplate($tpl,$ext='')
{
global $config, $template_cache;
$tname = $ext!='' ? $tpl.'.'.$ext : $tpl;
if(!isset($template_cache[$tname]))
{
$tplstr=$config['template_dir'].'/'.$tpl;
if($ext!='')
{
$tplstr.='.'.$ext;
$ext=".".$ext;
}
$tplstr.='.htm';
// ALT $tplName = $config['templatename'] ? "\n\n<!--\n".$tpl.$ext."\n-->\n\n" : '';
// ALT if(filecheck($tplstr))
// ALT $template_cache[$tname]=$tplName.str_replace("\"","\\\"",implode("",file($tplstr))).$tplName;
// NEU
$tplName = $config['templatename'] ? "\n\n<!--\n".$tpl.$ext."\n-->\n\n" : '';
$validArray
=
array(
'&' =>'&',
);
if(filecheck($tplstr))
$template_cache[$tname]=$tplName.str_replace("\"","\\\"",implode("", str_replace(array_keys($validArray), array_values($validArray), file
($tplstr)))).$tplName;
// NEU
else
echo '<b>WARNING:</b> Template file "<b>'.$tname.'</b>" not found in '.$config['template_dir'].'<br />';
}
if($tpl=='site_fuss')$template_cache
[$tname].=str_replace("\"","\\\"",pkC);
return $template_cache[$tname];
}
} # end function_exists()
function templateinclude($tpl) {
global $config, $templates;
if($templates[$tpl]=='')
$templates[$tpl]=str_replace("\"","\\\"",implode("",file('templates/'.$tpl.'.htm')));
return $templates[$tpl];
}
function checkusername($name,$opt='') {
global $config, $USER, $db_tab, $DB;
$check=true;
if(trim($name)=='')
$check=false;
elseif(strlen($name)<$config['user_namemin'] || strlen($name)>$config['user_namemax'])
$check=false;
elseif($config['censor_username']!='')
{
$ch=explode("\n",$config['censor_username']);
foreach($ch as $c)
{
if(trim($c)!='')
{
if(eregi("\{[^\}]*\}",$c))
{
$c=trim(str_replace("{","",str_replace("}","",$c)));
if(strtolower($c)==strtolower($name))
{
$check=false;
break;
}
}
elseif(strstr(strtolower($name),strtolower(parseregiexp($c))))
{
$check=false;
break;
}
}
}
}
else
$check=true;
if($check!=false && intval($USER['id'])==0 && $opt==1)
{
$count=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['user']." WHERE (user_nick='".$name."' OR user_name='".$name."') LIMIT
1"));
if($count[0]>0)
$check=false;
}
if(intval($USER['id'])>0 && $name==$USER['nick'])
$check=true;
return $check;
}
function phpkitstatus() {
global $phpkit_status, $DB, $db_tab, $config, $session_expire;
if(!is_array($phpkit_status))
{
$sqlcommand='';
$guests_hash=array();
$bd_d=date("d",pkTIME);
$bd_m=date("m",pkTIME);
$counter=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['user']." WHERE user_activate=1"));
$userinfo=$DB->fetch_array($DB->query("SELECT user_nick, user_id FROM ".$db_tab['user']." WHERE user_activate=1 ORDER by signin DESC LIMIT
1"));
$getisonline=$DB->query("SELECT * FROM ".$db_tab['session']);
while($isonline=$DB->fetch_array($getisonline))
{
if($isonline['session_userid']>0)
{
$userinfo_hash[$isonline['session_userid']]=$isonline;
if($sqlcommand)
$sqlcommand.=" OR user_id='".$isonline['session_userid']."'";
else
$sqlcommand="(user_id='".$isonline['session_userid']."'";
}
else {
$isonline['logtime']=$isonline['session_expire']-$session_expire;
$guests_hash[]=$isonline;
}
}
if($sqlcommand)
$sqlcommand.=") OR ";
$getstatus=$DB->query("SELECT user_nick, user_id, user_bd_day, user_bd_month, user_bd_year, user_ghost, user_status, logtime FROM ".$db_tab
['user']." WHERE ".$sqlcommand." (user_bd_day='".$bd_d."' AND user_bd_month='".$bd_m."') AND user_activate=1 ORDER by logtime DESC");
while($status=$DB->fetch_array($getstatus))
{
if($userinfo_hash[$status['user_id']]>0)
{
$status['user_nick']=cutstring($status['user_nick'],'');
$status['expire']=$userinfo_hash[$status['user_id']]['session_expire'];
$status['user_lasturl']=$userinfo_hash[$status['user_id']]['session_url'];
$status['user_ipaddr']=$userinfo_hash[$status['user_id']]['session_ip'];
$online_user[$status['user_id']]=$status;
}
if($status['user_bd_day']==$bd_d && $status['user_bd_month']==$bd_m)
{
$status['user_nick']=cutstring($status['user_nick'],'');
$bd_user[$status['user_nick']]=$status;
}
}
$getinfo=$DB->query("SELECT calender_counter FROM ".$db_tab['calender']." WHERE calender_id!=1 ORDER by calender_id DESC LIMIT 2");
while($info=$DB->fetch_array($getinfo))
{
if($counter_t=="")
{
$counter_t[0]=$info['calender_counter'];
if($counter_t[0]=="")
$counter_t[0]=0;
}
else
{
$counter_y[0]=$info['calender_counter'];
if($counter_y[0]=="")
$counter_y[0]=0;
}
}
$counter_tt=$DB->fetch_array($DB->query("SELECT calender_counter FROM ".$db_tab['calender']." WHERE calender_id=1"));
if($counter_tt[0]=="")
$counter_tt[0]=0;
$phpkit_status['user_counter']=$counter[0];
$phpkit_status['online_guests']=count($guests_hash);
$phpkit_status['guests_hash']=$guests_hash;
$phpkit_status['online_usercounter']=count($online_user);
$phpkit_status['online_user']=$online_user;
$phpkit_status['newest_user']=$userinfo;
$phpkit_status['bd_user']=$bd_user;
$phpkit_status['online_total']=$phpkit_status['online_usercounter']+$phpkit_status['online_guests'];
$phpkit_status['counter_today']=$counter_t[0];
$phpkit_status['counter_yesterday']=$counter_y[0];
$phpkit_status['counter_total']=$counter_tt[0];
if($phpkit_status['online_total']>$config['site_mv_count'])
{
$config['site_mv_count']=$phpkit_status['online_total'];
$config['site_mv_time']=pkTIME;
$DB->query("UPDATE ".$db_tab['config']." SET site_mv_time='".pkTIME."', site_mv_count='".$phpkit_status['online_total']."'");
}
}
return $phpkit_status;
}
function isonline($userid=0) {
global $config;
if(!intval($userid)>0)
return false;
$status=phpkitstatus();
if($status['online_user'][$userid]['expire']>0)
{
if($config['user_ghost']==1 && $status['online_user'][$userid]['user_ghost']==1)
return false;
return true;
}
return false;
}
function rowcolor($row)
{
switch($row)
{
case 'odd' :
return 'even';
case 'even' :
return 'odd2';
case 'odd2' :
return 'even2';
default :
return 'odd';
}
}
function rowcolor2($row) {
switch($row)
{
case 'odd' :
return 'even';
case 'even2' :
return 'odd2';
case 'even' :
return 'even2';
default :
return 'odd';
}
}
function notifymail($type,$title,$text)
{
global $config;
$str='notify_'.$type.'_m';
$mail_hash=$config[$str];
if(empty($mail_hash))
return;
$mails=explode("\n",$mail_hash);
if(is_array($mails))
{
foreach($mails as $m)
{
$m=trim($m);
if(emailcheck($m,0))
mailsender($m,$title,$text);
}
}
}
function notifyim($type,$title,$text) {
global $config,$DB,$db_tab;
$str='notify_'.$type.'_i';
$im_hash=$config[$str];
if(empty($im_hash))
return;
$ims=explode("\n",$im_hash);
if(is_array($ims))
{
foreach($ims as $id)
$DB->query("INSERT INTO ".$db_tab['im']." (im_to, im_title, im_text, im_time, im_delautor) VALUES ('".$id."','".$title."','".
$text."','".pkTIME."','1')");
}
}
function readTemplateDir($basedir='',$searchstring='',$option=0)
{
if($basedir=='')
$basedir='templates';
$templatedir['dir']='../'.$basedir;
$a=opendir($templatedir['dir']);
while($info=readdir($a))
{
if(is_dir($templatedir['dir'].'/'.$info) && $info!='.' && $info!='..')
$templatedir[$info]=$info;
}
if(is_array($templatedir))
{
foreach($templatedir as $dirinfo)
{
if($dirinfo=='')
continue;
if($dirinfo==$templatedir['dir'])
{
$dir=$templatedir['dir'];
$dirinfo='';
}
else
$dir=$templatedir['dir'].'/'.$dirinfo;
$a=opendir($dir);
while($info=readdir($a))
{
if(filecheck($dir."/".$info) && strstr($info,".htm"))
{
if($dirinfo!='')
$i=$dirinfo.'/'.str_replace(".htm","",$info);
else
$i=str_replace(".htm","",$info);
if($searchstring!='' && !strstr($i,$searchstring))
continue;
if($template_array[$i]=='')
{
if($option==1)
$template_array[$i]=implode("",file($dir."/".$info));
else
{
$template_array[$i]='<option value="'.$i.'"';
if($template_id==$i)
$template_array[$i].=' selected';
$template_array[$i].='>'.$i.'</option>';
}
}
}
}
}
}
if(is_array($template_array))
return $template_array;
return false;
}
function file_extension($file='')
{
$array=explode('.',$file);
return (($i=count($array))>1) ? $array[$i-1] : NULL;
}
class UPLOAD {
function images($file='',$dir='.',$filename='') {
$file['name']; //originaldateiname
$file['type']; //type der Datei
$file['tmp_name']; //tmp-pfad
$file['error']; //fehlermeldeung
$file['size']; //bytegroesse
if ($filename=='') $filename=$filereturn[1]=$dir.'/'.$file['name'];
else $filename=$filereturn[1]=$dir.'/'.$filename;
if (move_uploaded_file($file['tmp_name'],$filereturn[1])) $filereturn[0]=TRUE;
elseif (copy($file['tmp_name'],$filereturn[1])) $filereturn[0]=TRUE;
else $filereturn[0]=FALSE;
if ($filereturn[0] && !filecheck($filereturn[0])) $this->chmodfile($filereturn[1]);
return $filereturn;
}
function chmodfile($filename='') {
if ($filename!='' && @chmod($filename, 0644)) return TRUE;
else return FALSE;
}
}
class moderators {
function getMods($option, $catid) {
global $DB, $db_tab, $forumcat_cache, $global_mods, $mod_cache;
if ($mod_cache=='' && is_array($forumcat_cache)) {
foreach($forumcat_cache as $forumcat) $userids.=$forumcat['forumcat_mods'];
$userid=explode("-",$userids);
$sqlcommand="SELECT user_nick, user_id, user_status FROM ".$db_tab['user']." WHERE user_status='mod' OR user_status='admin'";
if (is_array($userid)) {
foreach ($userid as $id) {
if (intval($id)>0) $sqlcommand.=" OR user_id='".intval($id)."'";
}
}
$getuserinfo=$DB->query($sqlcommand);
while ($userinfo=$DB->fetch_array($getuserinfo)) {
$mod_cache[$userinfo['user_id']]=$userinfo;
if ($userinfo['user_status']=='admin' || $userinfo['user_status']=='mod') {
if ($global_mods!='') $global_mods.=', ';
eval ("\$global_mods.=\"".getTemplate("forum/moderator")."\";");
}
}
unset($userinfo); unset($userid);
}
$forumcat=$forumcat_cache[$catid];
if ($forumcat['forumcat_mods']!='' && $forumcat['forumcat_mods']!='-0-') {
$userid=explode("-",$forumcat['forumcat_mods']);
unset($cat_mod);
foreach($userid as $id) {
$userinfo=$mod_cache[$id];
if ($userinfo!='') {
if ($cat_mod) $cat_mod.=", ";
eval ("\$cat_mod.=\"".getTemplate("forum/moderator")."\";");
}
}
}
else $cat_mod=$global_mods;
return $cat_mod;
}
}
class smilies {
function getSmilieCache() {
global $DB,$db_tab,$smilie_cache;
if (!is_array($smilie_cache)) {
$getsmilies=$DB->query("SELECT * FROM ".$db_tab['smilies']);
while($smilies=$DB->fetch_array($getsmilies)) {$smilie_cache[]=$smilies;}
}
return $smilie_cache;
}
function getSmilies($option=0,$isadmindir=0) {
$smilie_cache=$this->getSmilieCache();
if (is_array($smilie_cache)) {
foreach ($smilie_cache as $smilies) {
if ($isadmindir==1) $smilies['smilie_path']='../'.$smilies['smilie_path'];
if ($option==$smilies['smilie_option'] or $option=="all") {
if (@filecheck($smilies['smilie_path'])) {
$smilie_size=@getimagesize($smilies[smilie_path]);
$smilie_size=$smilie_size[3];
}
else unset($smilie_size);
if ($option==1) eval ("\$smilies_row.=\"".getTemplate("format_smilies_row","")."\";");
elseif ($option=='all') {
$row=rowcolor($row);
eval ("\$format_smilies.=\"".getTemplate("format_allsmilies_row","")."\";");
}
else {
$row=rowcolor2($row);
if ($align=='left') $align='right';
else $align='left';
eval ("\$format_smilies.=\"".getTemplate("smiliewindow_".$align."","")."\";");
}
}
if ($option=="1" && $smilies['smilie_option']!=1) $count=1;
}
}
if ($option==1) {
if ($count==1) eval ("\$smilies_more=\"".getTemplate("format_smilies_morelink","")."\";");
eval ("\$format_smilies=\"".getTemplate("format_smilies","")."\";");
}
elseif ($option==0) {
if ($align=='left') {
if ($isadmindir==1) $smilies['smilie_path']='../images/blank.gif';
else $smilies['smilie_path']='images/blank.gif';
$smilies['smilie_code']=' ';
eval ("\$format_smilies.=\"".getTemplate("smiliewindow_right","")."\";");
}
}
return $format_smilies;
}
}
if(!function_exists("function_robots")) {
function function_robots($func_bots_ip='',$func_bots_browser='') {
if(preg_match("/^66\.249\.[0-9]{1,3}\.[0-9]{1,3}$/i", $func_bots_ip)) { // Googlebot
if((preg_match("/^Mediapartners-Google\/[0-9](\.[0-9])*/i", $func_bots_browser) AND preg_match("/\(\+http:\/\/www\.googlebot\.com\/bot\.html\)$/i",
$func_bots_browser)) OR (preg_match("/^Googlebot\/[0-9](\.[0-9])*/i", $func_bots_browser) AND preg_match("/\(\+http:\/\/www\.google\.com\/bot\.html\)$/i",
$func_bots_browser)) OR (preg_match("/Googlebot\/[0-9](\.[0-9])*/i", $func_bots_browser) AND preg_match("/http:\/\/www\.google\.com\/bot\.html/i",
$func_bots_browser))) {
$robot = "Googlebot"; // Googlebot
} elseif(preg_match("/^Mediapartners-Google\/[0-9](\.[0-9])*$/i", $func_bots_browser)) {
$robot = "Google AdSense"; // Google Adsense
} else {
$robot = "Google"; // Google
}
} elseif(preg_match("/Yahoo! Slurp/i", $func_bots_browser)) { // Yahoo! Slurp
$robot = "Yahoo! Slurp";
} elseif(preg_match("/^64\.71\.144\.[0-9]{1,3}$/i", $func_bots_ip)) { // JetBot
$robot = "JetBot";
} elseif(preg_match("/WebSpider/i", $func_bots_browser)) { // WebSpider
$robot = "WebSpider";
} elseif(preg_match("/^wwwster\/[0-9](\.[0-9])/i", $func_bots_browser)) { // wwwster
$robot = "wwwster";
} elseif(preg_match("/Turing Machine/i", $func_bots_browser)) { // Turing Machine
$robot = "Turing Machine";
} elseif(preg_match("/ZyBorg\/[0-9](\.[0-9])/i", $func_bots_browser)) { // Looksmart
$robot = "Looksmart";
} elseif(preg_match("/BecomeBot\/[0-9](\.[0-9]{1,2})/i", $func_bots_browser)) { // Become
$robot = "Become";
} elseif(preg_match("/TurnitinBot\/[0-9](\.[0-9]{1,2})/i", $func_bots_browser)) { // TurnitinBot
$robot = "TurnitinBot";
} elseif(preg_match("/ConveraCrawler\/[0-9](\.[0-9]{1,2})/i", $func_bots_browser)) { // ConveraCrawler
$robot = "ConveraCrawler";
} elseif(preg_match("/Gigabot\/[0-9](\.[0-9])/i", $func_bots_browser)) { // Gigabot
$robot = "Gigabot";
} elseif(preg_match("/msnbot\/[0-9](\.[0-9])/i", $func_bots_browser) OR preg_match("/msnbot-media\/[0-9](\.[0-9])/i", $func_bots_browser)) { // msnbot
$robot = "msnbot";
} elseif(preg_match("/arachmo/i", $func_bots_browser)) { // Arachmo
$robot = "Arachmo";
} elseif(preg_match("/Ask/i", $func_bots_browser)) { // Ask
$robot = "Ask";
} elseif(preg_match("/whatUseek_winona\/[0-9](\.[0-9])/i", $func_bots_browser)) { // whatUseek
$robot = "whatUseek";
} elseif(preg_match("/exabot\.com/i", $func_bots_browser) OR preg_match("/NG\/[0-9](\.[0-9])/i", $func_bots_browser)) { // exalead
$robot = "exalead";
} elseif(preg_match("/snap\.com/i", $func_bots_browser)) { // snap.com
$robot = "SNAP";
} elseif(preg_match("/MJ12bot/i", $func_bots_browser)) { // Majestic-12
$robot = "Majestic-12";
} elseif(preg_match("/e-SocietyRobot/i", $func_bots_browser)) { // e-SocietyRobot
$robot = "e-SocietyRobot";
} elseif(preg_match("/Accoona-AI-Agent/i", $func_bots_browser)) { // Accoona-AI-Agent
$robot = "Accoona-AI-Agent";
} elseif(preg_match("/webbot/i", $func_bots_browser)) { // WebBot
$robot = "WebBot";
} elseif(preg_match("/voyager\/[0-9](\.[0-9])/i", $func_bots_browser)) { // Kosmix
$robot = "Kosmix";
} elseif(preg_match("/envolk\/[0-9](\.[0-9])/i", $func_bots_browser)) { // Envolk
$robot = "Envolk";
} elseif(preg_match("/ichiro\/[0-9](\.[0-9])/i", $func_bots_browser)) { // ichiro
$robot = "ichiro";
} elseif(preg_match("/libwww-perl\/[0-9](\.[0-9]*)/i", $func_bots_browser)) { // Perl Script
$robot = "Perl Script";
} elseif(preg_match("/Microsoft URL Control/i", $func_bots_browser)) { // Microsoft URL Control
$robot = "Microsoft URL Control";
} else {
$robot = "";
}
return $robot;
}
}
if(!function_exists('function_robots_anzeigen')) {
function function_robots_anzeigen($guest_hash='') {
$navstat_bot = array();
$navstat_robot = array();
if(is_array($guest_hash)){
foreach($guest_hash as $navstats_guestinfo) {
if(function_robots($navstats_guestinfo['session_ip'],$navstats_guestinfo['session_browser']) != "") {
$navstat_bot[] = function_robots($navstats_guestinfo['session_ip'],$navstats_guestinfo['session_browser']);
}
}
if(is_array($navstat_bot)) {
sort($navstat_bot);
foreach($navstat_bot as $navstat_robots) {
$navstat_robot[$navstat_robots] = intval($navstat_robot[$navstat_robots])+1;
}
foreach($navstat_robot as $robot_key => $robot_value) {
if(isset($online_robots)) $online_robots .= ", ".$robot_key."(".$robot_value.")";
else $online_robots .= $robot_key."(".$robot_value.")";
}
}
}
return $online_robots;
}
}
?> | |  |
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von k!r!ka - 01.08.2012 - 17:55 Uhr |
|
|
|
|
|
|
|
 |
|
 |
01.08.2012 - 18:15 Uhr |
|
|
|
Zitat Original geschrieben von fireball1982
Hi,
na es ist ja auch schon ein altes CMS. |
Das wäre nur eine Ausrede, denn selbst zu dieser Zeit, wo die 1.6.1 raus kam, gab es bereits Anfänge.
Und unabhängig davon ist es immer falsch ein fehlerhaftes, schrottiges CMS zu veröffentlichen, das, wenn man mal alle Fehlermeldungen aktiviert, eigentlich gleich wieder aufhören möchte *übertreibt*
Aber davon mal abgesehen ist diese Art von Änderungen deinerseits doch eh .. Naja, übertrieben? 
Überhaupt diese ganze Validierungssache .. Allein schon alle Sonderzeichen mit einen &-Zeichen anfangen zu lassen (jede einfaches Pattern ist somit ja schwieriger) .. So nach den Motto: Passt eure Seiten nativ an, ist besser ~.~
Zitat Original geschrieben von fireball1982
Die Änderung von dir hat irgendwie garnichts bewirkt |
Die Änderung brachte bei mir, zumindest an einigen Stellen, eine Besserung bzgl. der &-Zeichen. Die Änderung betraff vorallem Templates, die &-Zeichen in sich tragen.
Naja, diese Änderung in der default.php kannste so erweitern:
| PHP-Quelltext $validArray
=
array(
'&' =>'&',
'&' =>'&',
); | |
Damit werden doppelte Einträge wieder korregiert.
Und dann öffne die include.php und suche das:
| PHP-Quelltext $current_url=preg_replace('/[&|?]'.session_name().'=[^&]*/',"",preg_replace('/[&|?]nid=[^&]*/',"",getenv('REQUEST_URI')));
$current_path=preg_replace('/[&|?]'.session_name().'=[^&]*/',"",preg_replace('/[&|?]nid=[^&]*/',"",getenv('QUERY_STRING'))); | |
Und füge darunter das ein:
| PHP-Quelltext $current_url=htmlentities($current_url);
$current_path=htmlentities($current_path); | |
Damit sollte ein Großteil abgesichert sein.
Zumindest bei mir ^^"
|
|
|
|
|
|
|
 |
|
 |
01.08.2012 - 21:33 Uhr |
|
|
|
hey k!r!ka,
halt dich fest, dass hat geklappt Die Fehler sind weg 
Bist Gold Wert
Ich find das CMS so eigentlich ganz toll weil man noch vieles selber machen kann (mit meinem Wissen in begrenztem Umfang) so wie damals beim wbb1 und wbb2
Klar sind einige Änderungen übertrieben aber man hat ja sonst nix zu tun
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von fireball1982 - 01.08.2012 - 21:35 Uhr |
|
|
|
|
|
|
|
 |
Ähnliche Themen |
|
Es wurden keine ähnlichen Themen gefunden.
|
|
|
|
|
|
|
|
|
|