Changeset 1558 in ExiteCMS
- Timestamp:
- 07/30/08 16:04:17 (4 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 12 edited
-
administration/settings_security.php (modified) (2 diffs)
-
administration/tools/language_pack_English.php (modified) (6 diffs)
-
administration/tools/language_pack_Nederlands.php (modified) (5 diffs)
-
administration/upgrade/rev01557.php (added)
-
edit_profile.php (modified) (3 diffs)
-
files/locales/en.main.global.php (modified) (2 diffs)
-
images/openid_small_logo.png (added)
-
includes/class.openid.php (added)
-
includes/core_functions.php (modified) (1 diff)
-
includes/templates/admin.settings_security.tpl (modified) (1 diff)
-
includes/templates/main.edit_profile.tpl (modified) (4 diffs)
-
includes/user_functions.php (modified) (4 diffs)
-
modules/user_info_panel/templates/modules.user_info_panel.tpl (modified) (2 diffs)
-
modules/user_info_panel/user_info_panel.php (modified) (1 diff)
-
setuser.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/settings_security.php
r1342 r1558 40 40 } 41 41 if ($variables['errormessage'] == "") { 42 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['enable_registration']) ? $_POST['enable_registration'] : "1")."' WHERE cfg_name = 'enable_registration'"); 43 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['email_verification']) ? $_POST['email_verification'] : "1")."' WHERE cfg_name = 'email_verification'"); 44 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['admin_activation']) ? $_POST['admin_activation'] : "0")."' WHERE cfg_name = 'admin_activation'"); 45 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['display_validation']) ? $_POST['display_validation'] : "1")."' WHERE cfg_name = 'display_validation'"); 46 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".stripinput($_POST['validation_method'])."' WHERE cfg_name = 'validation_method'"); 47 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$session_timeout' WHERE cfg_name = 'session_gc_maxlifetime'"); 48 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$login_expire' WHERE cfg_name = 'login_expire'"); 49 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$login_extended_expire' WHERE cfg_name = 'login_extended_expire'"); 42 // authentication method check 43 $auth_method = $_POST['auth_method']{0}; 44 $auth_local = $_POST['auth_method']{1} == "+" ? "1" : "0"; 45 switch ($auth_method) { 46 case "1": // LDAP 47 if ($auth_local) { 48 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'ldap,local' WHERE cfg_name = 'auth_type'"); 49 } else { 50 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'ldap' WHERE cfg_name = 'auth_type'"); 51 } 52 break; 53 case "2": // AD 54 if ($auth_local) { 55 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'ad,local' WHERE cfg_name = 'auth_type'"); 56 } else { 57 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'ad' WHERE cfg_name = 'auth_type'"); 58 } 59 break; 60 case "3": // OpenID 61 if ($auth_local) { 62 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'openid,local' WHERE cfg_name = 'auth_type'"); 63 } else { 64 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = 'openid' WHERE cfg_name = 'auth_type'"); 65 } 66 break; 67 default: 68 $variables['errormessage'] = "Invalid authentication method. This may never happen!"; 69 } 70 if ($variables['errormessage'] == "") { 71 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['enable_registration']) ? $_POST['enable_registration'] : "1")."' WHERE cfg_name = 'enable_registration'"); 72 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['email_verification']) ? $_POST['email_verification'] : "1")."' WHERE cfg_name = 'email_verification'"); 73 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['admin_activation']) ? $_POST['admin_activation'] : "0")."' WHERE cfg_name = 'admin_activation'"); 74 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".(isNum($_POST['display_validation']) ? $_POST['display_validation'] : "1")."' WHERE cfg_name = 'display_validation'"); 75 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".stripinput($_POST['validation_method'])."' WHERE cfg_name = 'validation_method'"); 76 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$session_timeout' WHERE cfg_name = 'session_gc_maxlifetime'"); 77 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$login_expire' WHERE cfg_name = 'login_expire'"); 78 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '$login_extended_expire' WHERE cfg_name = 'login_extended_expire'"); 79 } 50 80 } 51 81 } … … 75 105 } 76 106 107 // determine the auth_method defined 108 $auth_methods = explode(",",$settings2['auth_type'].","); 109 switch($auth_methods[0]) { 110 case "ldap": 111 $auth_method = 1; 112 break; 113 case "ad": 114 $auth_method = 2; 115 break; 116 case "openid": 117 $auth_method = 3; 118 case "local": 119 break; 120 default: 121 $auth_method = 0; 122 } 123 $variables['auth_method'] = $auth_method; 124 125 // check if a local fallback is defined 126 if ($auth_method && $auth_methods[1] == "local") { 127 $variables['auth_method'] .= "+"; 128 } 129 77 130 // define the admin body panel 78 131 $template_panels[] = array('type' => 'body', 'name' => 'admin.settings_security', 'template' => 'admin.settings_security.tpl', 'locale' => "admin.settings"); -
trunk/administration/tools/language_pack_English.php
r1533 r1558 705 705 $localestrings['543'] = "News Item"; 706 706 $localestrings['544'] = "Update"; 707 $localestrings['545'] = "On this page you define the sequence in which the news articles are displayed on the news homepage. \n First, all headlines you selected are displayed. After that, the latest news items. Both in the order\n in which they are selected.<br />If the checkbox below is not checked, all other news items that are not\n expired will be shown next.";707 $localestrings['545'] = "On this page you define the sequence in which the news articles are displayed on the news homepage. \n First, all headlines you selected are displayed. After that, the latest news items. Both in the order\n in which they are selected.<br />If the checkbox below is not checked, all other news items that are not\nexpired will be shown next."; 708 708 $localestrings['546'] = "Hide all non-selected news items from the Latest News page"; 709 709 $localestrings['550'] = "Please specify a subject"; … … 988 988 $localestrings['535'] = "Hour"; 989 989 $localestrings['536'] = "Hours"; 990 $localestrings['537'] = "Authentication Method:"; 991 $localestrings['538'] = "Local database"; 992 $localestrings['539'] = "LDAP Server"; 993 $localestrings['540'] = "Active Directory Server"; 994 $localestrings['541'] = ", then "; 995 $localestrings['542'] = ", with OpenID"; 990 996 $localestrings['550'] = "Security"; 991 997 $localestrings['551'] = "Enable registration system?"; … … 1420 1426 $localestrings['pl'] = "Poland"; 1421 1427 $localestrings['pm'] = "Saint Pierre And Miquelon"; 1422 $localestrings['pr'] = "Palestinian Territories"; 1428 $localestrings['pr'] = "Puerto Rico"; 1429 $localestrings['ps'] = "Palestinian Territories"; 1423 1430 $localestrings['pt'] = "Portugal"; 1424 1431 $localestrings['pw'] = "Palau"; … … 1486 1493 1487 1494 $localestrings = array(); 1488 $localestrings[' Abu Dhabi'] = "ae";1489 $localestrings[' Afghanistan'] = "af";1490 $localestrings[' Albania'] = "al";1491 $localestrings[' Algeria'] = "dz";1492 $localestrings[' American Samoa'] = "as";1493 $localestrings[' Andorra'] = "ad";1494 $localestrings[' Angola'] = "ao";1495 $localestrings[' Anguilla'] = "ai";1496 $localestrings[' Antigua And Barbuda'] = "ag";1497 $localestrings[' Argentina'] = "ar";1498 $localestrings[' Armenia'] = "am";1499 $localestrings[' Aruba'] = "aw";1500 $localestrings[' Australia'] = "au";1501 $localestrings[' Austria'] = "at";1495 $localestrings['abu dhabi'] = "ae"; 1496 $localestrings['afghanistan'] = "af"; 1497 $localestrings['albania'] = "al"; 1498 $localestrings['algeria'] = "dz"; 1499 $localestrings['american samoa'] = "as"; 1500 $localestrings['andorra'] = "ad"; 1501 $localestrings['angola'] = "ao"; 1502 $localestrings['anguilla'] = "ai"; 1503 $localestrings['antigua and barbuda'] = "ag"; 1504 $localestrings['argentina'] = "ar"; 1505 $localestrings['armenia'] = "am"; 1506 $localestrings['aruba'] = "aw"; 1507 $localestrings['australia'] = "au"; 1508 $localestrings['austria'] = "at"; 1502 1509 $localestrings['azerbaidjan'] = "az"; 1503 $localestrings['Azerbaijan'] = "az"; 1504 $localestrings['Bahamas'] = "bs"; 1505 $localestrings['Bahrain'] = "bh"; 1506 $localestrings['Bangladesh'] = "bd"; 1507 $localestrings['Barbados'] = "bb"; 1508 $localestrings['Belarus'] = "by"; 1509 $localestrings['Belgium'] = "be"; 1510 $localestrings['Belize'] = "bz"; 1511 $localestrings['Benin'] = "bj"; 1512 $localestrings['Bermuda'] = "bm"; 1513 $localestrings['Bhutan'] = "bt"; 1514 $localestrings['Bolivia'] = "bo"; 1515 $localestrings['Bosnia And Herzegovina'] = "ba"; 1516 $localestrings['Bosnia Herzegovina'] = "ba"; 1517 $localestrings['Botswana'] = "bw"; 1518 $localestrings['Bouvet Island'] = "bv"; 1519 $localestrings['Brazil'] = "br"; 1520 $localestrings['British Indian Ocean Terr'] = "io"; 1521 $localestrings['British Virgin Islands'] = "vg"; 1522 $localestrings['Brunei Darussalam'] = "bn"; 1523 $localestrings['Bulgaria'] = "bg"; 1524 $localestrings['Burkina Faso'] = "bf"; 1525 $localestrings['Burundi'] = "bi"; 1526 $localestrings['Cambodia'] = "kh"; 1527 $localestrings['Cameroon'] = "cm"; 1528 $localestrings['Canada'] = "ca"; 1529 $localestrings['Cape Verde'] = "cv"; 1530 $localestrings['Cayman Islands'] = "ky"; 1531 $localestrings['Central African Republic'] = "cf"; 1532 $localestrings['Chad'] = "td"; 1533 $localestrings['Chile'] = "cl"; 1534 $localestrings['China'] = "cn"; 1535 $localestrings['Christmas Island'] = "cx"; 1536 $localestrings['Cocos (Keeling) Islands'] = "cc"; 1537 $localestrings['Colombia'] = "co"; 1538 $localestrings['Comoros'] = "km"; 1539 $localestrings['Congo'] = "cg"; 1540 $localestrings['Cook Islands'] = "ck"; 1541 $localestrings['Costa Rica'] = "cr"; 1542 $localestrings['Cote D\'Ivoire'] = "ci"; 1543 $localestrings['Country unknown'] = "--"; 1544 $localestrings['Croatia'] = "hr"; 1545 $localestrings['Cuba'] = "cu"; 1546 $localestrings['Cyprus'] = "cy"; 1547 $localestrings['Czech Republic'] = "cz"; 1548 $localestrings['Democratic People\'s Repub'] = "kp"; 1549 $localestrings['Denmark'] = "dk"; 1550 $localestrings['Djibouti'] = "dj"; 1551 $localestrings['Dominica'] = "dm"; 1552 $localestrings['Dominican Republic'] = "do"; 1510 $localestrings['azerbaijan'] = "az"; 1511 $localestrings['bahamas'] = "bs"; 1512 $localestrings['bahrain'] = "bh"; 1513 $localestrings['bangladesh'] = "bd"; 1514 $localestrings['barbados'] = "bb"; 1515 $localestrings['belarus'] = "by"; 1516 $localestrings['belgium'] = "be"; 1517 $localestrings['belize'] = "bz"; 1518 $localestrings['benin'] = "bj"; 1519 $localestrings['bermuda'] = "bm"; 1520 $localestrings['bhutan'] = "bt"; 1521 $localestrings['bolivia'] = "bo"; 1522 $localestrings['bosnia and herzegovina'] = "ba"; 1523 $localestrings['bosnia herzegovina'] = "ba"; 1524 $localestrings['botswana'] = "bw"; 1525 $localestrings['bouvet island'] = "bv"; 1526 $localestrings['brazil'] = "br"; 1527 $localestrings['british indian ocean territories'] = "io"; 1528 $localestrings['british virgin islands'] = "vg"; 1529 $localestrings['brunei'] = "bn"; 1530 $localestrings['brunei darussalam'] = "bn"; 1531 $localestrings['bulgaria'] = "bg"; 1532 $localestrings['burkina faso'] = "bf"; 1533 $localestrings['burundi'] = "bi"; 1534 $localestrings['cambodia'] = "kh"; 1535 $localestrings['cameroon'] = "cm"; 1536 $localestrings['canada'] = "ca"; 1537 $localestrings['cape verde'] = "cv"; 1538 $localestrings['cayman islands'] = "ky"; 1539 $localestrings['central african republic'] = "cf"; 1540 $localestrings['chad'] = "td"; 1541 $localestrings['chile'] = "cl"; 1542 $localestrings['china'] = "cn"; 1543 $localestrings['christmas island'] = "cx"; 1544 $localestrings['cocos islands'] = "cc"; 1545 $localestrings['keeling islands'] = "cc"; 1546 $localestrings['cocos (keeling) islands'] = "cc"; 1547 $localestrings['colombia'] = "co"; 1548 $localestrings['comoros'] = "km"; 1549 $localestrings['congo'] = "cg"; 1550 $localestrings['cook islands'] = "ck"; 1551 $localestrings['costa rica'] = "cr"; 1552 $localestrings['cote d\'ivoire'] = "ci"; 1553 $localestrings['ivory coast'] = "ci"; 1554 $localestrings['country unknown'] = "--"; 1555 $localestrings['unknown'] = "--"; 1556 $localestrings['croatia'] = "hr"; 1557 $localestrings['cuba'] = "cu"; 1558 $localestrings['cyprus'] = "cy"; 1559 $localestrings['czech republic'] = "cz"; 1560 $localestrings['democratic people\'s republic of korea'] = "kp"; 1561 $localestrings['denmark'] = "dk"; 1562 $localestrings['djibouti'] = "dj"; 1563 $localestrings['dominica'] = "dm"; 1564 $localestrings['dominican republic'] = "do"; 1553 1565 $localestrings['dubai'] = "ae"; 1554 1566 $localestrings['dubai emirates'] = "ae"; 1555 $localestrings[' Ecuador'] = "ec";1556 $localestrings[' Egypt'] = "eg";1557 $localestrings[' El Salvador'] = "sv";1567 $localestrings['ecuador'] = "ec"; 1568 $localestrings['egypt'] = "eg"; 1569 $localestrings['el salvador'] = "sv"; 1558 1570 $localestrings['equator'] = "ec"; 1559 $localestrings['Equatorial Guinea'] = "gq"; 1560 $localestrings['Eritrea'] = "er"; 1561 $localestrings['Estonia'] = "ee"; 1562 $localestrings['Ethiopia'] = "et"; 1563 $localestrings['Falkland Islands (Malvina'] = "fk"; 1564 $localestrings['Faroe Islands'] = "fo"; 1565 $localestrings['Federated States Of Micro'] = "fm"; 1566 $localestrings['Fiji'] = "fj"; 1567 $localestrings['Finland'] = "fi"; 1568 $localestrings['France'] = "fr"; 1569 $localestrings['French Guiana'] = "gf"; 1570 $localestrings['French Polynesia'] = "pf"; 1571 $localestrings['French Southern Territori'] = "tf"; 1572 $localestrings['Gabon'] = "ga"; 1573 $localestrings['Gambia'] = "gm"; 1574 $localestrings['Georgia'] = "ge"; 1575 $localestrings['Germany'] = "de"; 1576 $localestrings['Ghana'] = "gh"; 1577 $localestrings['Gibraltar'] = "gi"; 1578 $localestrings['Greece'] = "gr"; 1579 $localestrings['Greenland'] = "gl"; 1580 $localestrings['Grenada'] = "gd"; 1581 $localestrings['Guadeloupe'] = "gp"; 1582 $localestrings['Guam'] = "gu"; 1583 $localestrings['Guatemala'] = "gt"; 1584 $localestrings['Guernsey'] = "gg"; 1585 $localestrings['Guinea'] = "gn"; 1586 $localestrings['Guinea-Bissau'] = "gw"; 1587 $localestrings['Guyana'] = "gy"; 1588 $localestrings['Haiti'] = "ht"; 1589 $localestrings['Heard Island And Mcdonald'] = "hm"; 1590 $localestrings['Holy See (Vatican City St'] = "va"; 1591 $localestrings['Honduras'] = "hn"; 1592 $localestrings['Hong Kong'] = "hk"; 1593 $localestrings['Hungary'] = "hu"; 1594 $localestrings['Iceland'] = "is"; 1571 $localestrings['equatorial guinea'] = "gq"; 1572 $localestrings['eritrea'] = "er"; 1573 $localestrings['estonia'] = "ee"; 1574 $localestrings['ethiopia'] = "et"; 1575 $localestrings['falkland islands'] = "fk"; 1576 $localestrings['malvinas'] = "fk"; 1577 $localestrings['faroe islands'] = "fo"; 1578 $localestrings['federated states of micronesia'] = "fm"; 1579 $localestrings['fiji'] = "fj"; 1580 $localestrings['finland'] = "fi"; 1581 $localestrings['france'] = "fr"; 1582 $localestrings['french guiana'] = "gf"; 1583 $localestrings['french Polynesia'] = "pf"; 1584 $localestrings['french southern territories'] = "tf"; 1585 $localestrings['gabon'] = "ga"; 1586 $localestrings['gambia'] = "gm"; 1587 $localestrings['georgia'] = "ge"; 1588 $localestrings['germany'] = "de"; 1589 $localestrings['ghana'] = "gh"; 1590 $localestrings['gibraltar'] = "gi"; 1591 $localestrings['greece'] = "gr"; 1592 $localestrings['greenland'] = "gl"; 1593 $localestrings['grenada'] = "gd"; 1594 $localestrings['guadeloupe'] = "gp"; 1595 $localestrings['guam'] = "gu"; 1596 $localestrings['guatemala'] = "gt"; 1597 $localestrings['guernsey'] = "gg"; 1598 $localestrings['guinea'] = "gn"; 1599 $localestrings['guinea-Bissau'] = "gw"; 1600 $localestrings['guyana'] = "gy"; 1601 $localestrings['haiti'] = "ht"; 1602 $localestrings['heard island and mcdonald islands'] = "hm"; 1603 $localestrings['holy see'] = "va"; 1604 $localestrings['vatican'] = "va"; 1605 $localestrings['vatican city'] = "va"; 1606 $localestrings['honduras'] = "hn"; 1607 $localestrings['hong kong'] = "hk"; 1608 $localestrings['hungary'] = "hu"; 1609 $localestrings['iceland'] = "is"; 1595 1610 $localestrings['India'] = "in"; 1596 1611 $localestrings['Indonesia'] = "id"; 1597 1612 $localestrings['iran'] = "ir"; 1598 $localestrings[' Iraq'] = "iq";1599 $localestrings[' Ireland'] = "ie";1600 $localestrings[' Islamic Republic Of Iran'] = "ir";1601 $localestrings[' Isle Of Man'] = "im";1602 $localestrings[' Israel'] = "il";1603 $localestrings[' Italy'] = "it";1604 $localestrings[' Jamaica'] = "jm";1605 $localestrings[' Japan'] = "jp";1606 $localestrings[' Jersey'] = "je";1607 $localestrings[' Jordan'] = "jo";1613 $localestrings['iraq'] = "iq"; 1614 $localestrings['ireland'] = "ie"; 1615 $localestrings['islamic republic of iran'] = "ir"; 1616 $localestrings['isle of man'] = "im"; 1617 $localestrings['israel'] = "il"; 1618 $localestrings['italy'] = "it"; 1619 $localestrings['jamaica'] = "jm"; 1620 $localestrings['japan'] = "jp"; 1621 $localestrings['jersey'] = "je"; 1622 $localestrings['jordan'] = "jo"; 1608 1623 $localestrings['jordania'] = "jo"; 1609 $localestrings[' Kazakhstan'] = "kz";1610 $localestrings[' Kenya'] = "ke";1611 $localestrings[' Kiribati'] = "ki";1612 $localestrings[' Kurdistan'] = "ku";1613 $localestrings[' Kuwait'] = "kw";1614 $localestrings[' Kyrgyzstan'] = "kg";1615 $localestrings[' Latvia'] = "lv";1616 $localestrings[' Lebanon'] = "lb";1617 $localestrings[' Lesotho'] = "ls";1618 $localestrings[' Liberia'] = "lr";1624 $localestrings['kazakhstan'] = "kz"; 1625 $localestrings['kenya'] = "ke"; 1626 $localestrings['kiribati'] = "ki"; 1627 $localestrings['kurdistan'] = "ku"; 1628 $localestrings['kuwait'] = "kw"; 1629 $localestrings['kyrgyzstan'] = "kg"; 1630 $localestrings['latvia'] = "lv"; 1631 $localestrings['lebanon'] = "lb"; 1632 $localestrings['lesotho'] = "ls"; 1633 $localestrings['liberia'] = "lr"; 1619 1634 $localestrings['libya'] = "ly"; 1620 $localestrings[' Libyan Arab Jamahiriya'] = "ly";1621 $localestrings[' Liechtenstein'] = "li";1622 $localestrings[' Lithuania'] = "lt";1623 $localestrings[' Luxembourg'] = "lu";1624 $localestrings[' Macedonia'] = "mk";1625 $localestrings[' Madagascar'] = "mg";1626 $localestrings[' Malawi'] = "mw";1627 $localestrings[' Malaysia'] = "my";1628 $localestrings[' Maldives'] = "mv";1629 $localestrings[' Mali'] = "ml";1630 $localestrings[' Malta'] = "mt";1631 $localestrings[' Marshall Islands'] = "mh";1632 $localestrings[' Martinique'] = "mq";1633 $localestrings[' Mauritania'] = "mr";1634 $localestrings[' Mauritius'] = "mu";1635 $localestrings[' Mayotte'] = "yt";1635 $localestrings['libyan arab jamahiriya'] = "ly"; 1636 $localestrings['liechtenstein'] = "li"; 1637 $localestrings['lithuania'] = "lt"; 1638 $localestrings['luxembourg'] = "lu"; 1639 $localestrings['macedonia'] = "mk"; 1640 $localestrings['madagascar'] = "mg"; 1641 $localestrings['malawi'] = "mw"; 1642 $localestrings['malaysia'] = "my"; 1643 $localestrings['maldives'] = "mv"; 1644 $localestrings['mali'] = "ml"; 1645 $localestrings['malta'] = "mt"; 1646 $localestrings['marshall islands'] = "mh"; 1647 $localestrings['martinique'] = "mq"; 1648 $localestrings['mauritania'] = "mr"; 1649 $localestrings['mauritius'] = "mu"; 1650 $localestrings['mayotte'] = "yt"; 1636 1651 $localestrings['mesopotamia'] = "ku"; 1637 $localestrings[' Mexico'] = "mx";1638 $localestrings[' Monaco'] = "mc";1639 $localestrings[' Mongolia'] = "mn";1652 $localestrings['mexico'] = "mx"; 1653 $localestrings['monaco'] = "mc"; 1654 $localestrings['mongolia'] = "mn"; 1640 1655 $localestrings['montenegro'] = "me"; 1641 $localestrings['Montserrat'] = "ms"; 1642 $localestrings['Morocco'] = "ma"; 1643 $localestrings['Mozambique'] = "mz"; 1644 $localestrings['Myanmar'] = "mm"; 1645 $localestrings['Namibia'] = "na"; 1646 $localestrings['Nauru'] = "nr"; 1647 $localestrings['Nepal'] = "np"; 1648 $localestrings['Netherlands Antilles'] = "an"; 1649 $localestrings['New Caledonia'] = "nc"; 1650 $localestrings['New Zealand'] = "nz"; 1651 $localestrings['Nicaragua'] = "ni"; 1652 $localestrings['Niger'] = "ne"; 1653 $localestrings['Nigeria'] = "ng"; 1654 $localestrings['Niue'] = "nu"; 1655 $localestrings['Norfolk Island'] = "nf"; 1656 $localestrings['Northern Mariana Islands'] = "mp"; 1657 $localestrings['Norway'] = "no"; 1658 $localestrings['Oman'] = "om"; 1659 $localestrings['Pakistan'] = "pk"; 1660 $localestrings['Palau'] = "pw"; 1661 $localestrings['Panama'] = "pa"; 1662 $localestrings['Papua New Guinea'] = "pg"; 1663 $localestrings['Paraguay'] = "py"; 1664 $localestrings['Peru'] = "pe"; 1665 $localestrings['Philippines'] = "ph"; 1666 $localestrings['Poland'] = "pl"; 1667 $localestrings['Portugal'] = "pt"; 1668 $localestrings['Puerto Rico'] = "pr"; 1669 $localestrings['Qatar'] = "qa"; 1670 $localestrings['Republic Of Korea'] = "kr"; 1671 $localestrings['Republic Of Moldova'] = "md"; 1672 $localestrings['Romania'] = "ro"; 1656 $localestrings['montserrat'] = "ms"; 1657 $localestrings['morocco'] = "ma"; 1658 $localestrings['mozambique'] = "mz"; 1659 $localestrings['myanmar'] = "mm"; 1660 $localestrings['namibia'] = "na"; 1661 $localestrings['nauru'] = "nr"; 1662 $localestrings['nepal'] = "np"; 1663 $localestrings['netherlands antilles'] = "an"; 1664 $localestrings['new caledonia'] = "nc"; 1665 $localestrings['new zealand'] = "nz"; 1666 $localestrings['nicaragua'] = "ni"; 1667 $localestrings['niger'] = "ne"; 1668 $localestrings['nigeria'] = "ng"; 1669 $localestrings['niue'] = "nu"; 1670 $localestrings['norfolk island'] = "nf"; 1671 $localestrings['northern mariana islands'] = "mp"; 1672 $localestrings['norway'] = "no"; 1673 $localestrings['oman'] = "om"; 1674 $localestrings['pakistan'] = "pk"; 1675 $localestrings['palau'] = "pw"; 1676 $localestrings['panama'] = "pa"; 1677 $localestrings['papua new guinea'] = "pg"; 1678 $localestrings['paraguay'] = "py"; 1679 $localestrings['peru'] = "pe"; 1680 $localestrings['philippines'] = "ph"; 1681 $localestrings['poland'] = "pl"; 1682 $localestrings['portugal'] = "pt"; 1683 $localestrings['puerto Rico'] = "pr"; 1684 $localestrings['palestinian Territories'] = "ps"; 1685 $localestrings['qatar'] = "qa"; 1686 $localestrings['republic Of korea'] = "kr"; 1687 $localestrings['republic Of moldova'] = "md"; 1688 $localestrings['romania'] = "ro"; 1673 1689 $localestrings['russia'] = "ru"; 1674 $localestrings[' Russian Federation'] = "ru";1675 $localestrings[' Rwanda'] = "rw";1676 $localestrings[' Saint Helena'] = "sh";1677 $localestrings[' Saint Kitts And Nevis'] = "kn";1678 $localestrings[' Saint Lucia'] = "lc";1679 $localestrings[' Saint Pierre And Miquelon'] = "pm";1680 $localestrings[' Saint Vincent And The Gre'] = "vc";1681 $localestrings[' Samoa'] = "ws";1682 $localestrings[' San Marino'] = "sm";1683 $localestrings[' Saudi Arabia'] = "sa";1684 $localestrings[' Senegal'] = "sn";1690 $localestrings['russian federation'] = "ru"; 1691 $localestrings['rwanda'] = "rw"; 1692 $localestrings['saint helena'] = "sh"; 1693 $localestrings['saint kitts and nevis'] = "kn"; 1694 $localestrings['saint lucia'] = "lc"; 1695 $localestrings['saint pierre and miquelon'] = "pm"; 1696 $localestrings['saint vincent and the grenadines'] = "vc"; 1697 $localestrings['samoa'] = "ws"; 1698 $localestrings['san marino'] = "sm"; 1699 $localestrings['saudi arabia'] = "sa"; 1700 $localestrings['senegal'] = "sn"; 1685 1701 $localestrings['serbia'] = "rs"; 1686 $localestrings[' Serbia And Montenegro'] = "cs";1687 $localestrings[' Seychelles'] = "sc";1702 $localestrings['serbia and montenegro'] = "cs"; 1703 $localestrings['seychelles'] = "sc"; 1688 1704 $localestrings['sharjah emirate'] = "ae"; 1689 $localestrings[' Sierra Leone'] = "sl";1690 $localestrings[' Singapore'] = "sg";1691 $localestrings[' Slovakia'] = "sk";1692 $localestrings[' Slovenia'] = "si";1693 $localestrings[' Solomon Islands'] = "sb";1694 $localestrings[' Somalia'] = "so";1695 $localestrings[' South Africa'] = "za";1705 $localestrings['sierra leone'] = "sl"; 1706 $localestrings['singapore'] = "sg"; 1707 $localestrings['slovakia'] = "sk"; 1708 $localestrings['slovenia'] = "si"; 1709 $localestrings['solomon islands'] = "sb"; 1710 $localestrings['somalia'] = "so"; 1711 $localestrings['south africa'] = "za"; 1696 1712 $localestrings['south korea'] = "kr"; 1697 $localestrings[' Spain'] = "es";1698 $localestrings[' Sri Lanka'] = "lk";1699 $localestrings[' Sudan'] = "sd";1700 $localestrings[' Suriname'] = "sr";1701 $localestrings[' Svalbard And Jan Mayen'] = "sj";1702 $localestrings[' Swaziland'] = "sz";1703 $localestrings[' Sweden'] = "se";1704 $localestrings[' Switzerland'] = "ch";1713 $localestrings['spain'] = "es"; 1714 $localestrings['sri lanka'] = "lk"; 1715 $localestrings['sudan'] = "sd"; 1716 $localestrings['suriname'] = "sr"; 1717 $localestrings['svalbard and jan mayen'] = "sj"; 1718 $localestrings['swaziland'] = "sz"; 1719 $localestrings['sweden'] = "se"; 1720 $localestrings['switzerland'] = "ch"; 1705 1721 $localestrings['syria'] = "sy"; 1706 $localestrings['Syrian Arab Republic'] = "sy"; 1707 $localestrings['Taiwan, Province Of China'] = "tw"; 1708 $localestrings['Tajikistan'] = "tj"; 1709 $localestrings['Thailand'] = "th"; 1710 $localestrings['The Democratic Republic O'] = "cd"; 1711 $localestrings['The Netherlands'] = "nl"; 1712 $localestrings['Timor-Leste'] = "tl"; 1713 $localestrings['Togo'] = "tg"; 1714 $localestrings['Tokelau'] = "tk"; 1715 $localestrings['Tonga'] = "to"; 1716 $localestrings['Trinidad And Tobago'] = "tt"; 1717 $localestrings['Tunisia'] = "tn"; 1718 $localestrings['Turkey'] = "tr"; 1719 $localestrings['Turkmenistan'] = "tm"; 1720 $localestrings['Turks And Caicos Islands'] = "tc"; 1721 $localestrings['Tuvalu'] = "tv"; 1722 $localestrings['U.S. Virgin Islands'] = "vi"; 1722 $localestrings['syrian arab republic'] = "sy"; 1723 $localestrings['taiwan'] = "tw"; 1724 $localestrings['taiwan, province of china'] = "tw"; 1725 $localestrings['tajikistan'] = "tj"; 1726 $localestrings['thailand'] = "th"; 1727 $localestrings['the democratic republic of the congo'] = "cd"; 1728 $localestrings['congo'] = "cd"; 1729 $localestrings['the netherlands'] = "nl"; 1730 $localestrings['netherlands'] = "nl"; 1731 $localestrings['holland'] = "nl"; 1732 $localestrings['timor-leste'] = "tl"; 1733 $localestrings['togo'] = "tg"; 1734 $localestrings['tokelau'] = "tk"; 1735 $localestrings['tonga'] = "to"; 1736 $localestrings['trinidad and tobago'] = "tt"; 1737 $localestrings['tunisia'] = "tn"; 1738 $localestrings['turkey'] = "tr"; 1739 $localestrings['turkmenistan'] = "tm"; 1740 $localestrings['turks and caicos islands'] = "tc"; 1741 $localestrings['tuvalu'] = "tv"; 1742 $localestrings['u.s. virgin islands'] = "vi"; 1723 1743 $localestrings['u.s.a.'] = "us"; 1724 $localestrings['Uganda'] = "ug"; 1725 $localestrings['Ukraine'] = "ua"; 1744 $localestrings['united states'] = "us"; 1745 $localestrings['america'] = "us"; 1746 $localestrings['uganda'] = "ug"; 1747 $localestrings['ukraine'] = "ua"; 1726 1748 $localestrings['undefined'] = "--"; 1727 $localestrings[' United Arab Emirates'] = "ae";1728 $localestrings[' United Kingdom'] = "gb";1729 $localestrings[' United States'] = "us";1730 $localestrings[' United States Minor Outly'] = "um";1731 $localestrings[' Unlisted country'] = "??";1732 $localestrings[' Uruguay'] = "uy";1733 $localestrings[' Uzbekistan'] = "uz";1734 $localestrings[' Vanuatu'] = "vu";1735 $localestrings[' Venezuela'] = "ve";1736 $localestrings[' Viet Nam'] = "vn";1749 $localestrings['united arab emirates'] = "ae"; 1750 $localestrings['united kingdom'] = "gb"; 1751 $localestrings['great britain'] = "gb"; 1752 $localestrings['united states minor outlying islands'] = "um"; 1753 $localestrings['unlisted country'] = "--"; 1754 $localestrings['uruguay'] = "uy"; 1755 $localestrings['uzbekistan'] = "uz"; 1756 $localestrings['vanuatu'] = "vu"; 1757 $localestrings['venezuela'] = "ve"; 1758 $localestrings['viet nam'] = "vn"; 1737 1759 $localestrings['vietnam'] = "vn"; 1738 $localestrings[' Wallis And Futuna'] = "wf";1739 $localestrings[' Western Sahara'] = "eh";1740 $localestrings[' Yemen'] = "ye";1741 $localestrings[' Zambia'] = "zm";1742 $localestrings[' Zimbabwe'] = "zw";1760 $localestrings['wallis and futuna'] = "wf"; 1761 $localestrings['western sahara'] = "eh"; 1762 $localestrings['yemen'] = "ye"; 1763 $localestrings['zambia'] = "zm"; 1764 $localestrings['zimbabwe'] = "zw"; 1743 1765 load_localestrings($localestrings, LP_LOCALE, "countryname", $step); 1744 1766 … … 2642 2664 $localestrings['065'] = "Not a member yet?<br /><a href='%sregister.php' class='side'>Click here</a> to register."; 2643 2665 $localestrings['066'] = "Forgotten your password?<br />Request a new one <a href='%slostpassword.php' class='side'>here</a>."; 2666 $localestrings['067'] = "OpenID URL"; 2667 $localestrings['068'] = "Get an OpenID"; 2668 $localestrings['069'] = "Info"; 2644 2669 $localestrings['070'] = "Online"; 2645 2670 $localestrings['071'] = "< 5 mins"; … … 3263 3288 $localestrings['u064'] = "Female"; 3264 3289 $localestrings['u065'] = "Undisclosed"; 3290 $localestrings['u066'] = "OpenID URL:"; 3265 3291 $localestrings['u901'] = "Full Name"; 3266 3292 load_localestrings($localestrings, LP_LOCALE, "main.user_fields", $step); -
trunk/administration/tools/language_pack_Nederlands.php
r1533 r1558 988 988 $localestrings['535'] = "Uur"; 989 989 $localestrings['536'] = "Uren"; 990 $localestrings['537'] = "Authenticatie methode:"; 991 $localestrings['538'] = "Lokale database"; 992 $localestrings['539'] = "LDAP Server"; 993 $localestrings['540'] = "Active Directory Server"; 994 $localestrings['541'] = ", daarna "; 995 $localestrings['542'] = ", met OpenID"; 990 996 $localestrings['550'] = "Beveiliging"; 991 997 $localestrings['551'] = "Activeer registratie systeem?"; … … 1421 1427 $localestrings['pm'] = "Sint Pierre en Miquelon"; 1422 1428 $localestrings['pr'] = "Puerto Rico"; 1429 $localestrings['ps'] = "Palestina"; 1423 1430 $localestrings['pt'] = "Portugal"; 1424 1431 $localestrings['pw'] = "Palau"; … … 1667 1674 $localestrings['Portugal'] = "pt"; 1668 1675 $localestrings['Puerto Rico'] = "pr"; 1676 $localestrings['Palestina'] = "ps"; 1669 1677 $localestrings['Qatar'] = "qa"; 1670 1678 $localestrings['Republic Of Korea'] = "kr"; … … 2642 2650 $localestrings['065'] = "Nog geen lid?<br /><a href='%sregister.php' class='side'>Klik hier</a> om te registeren."; 2643 2651 $localestrings['066'] = "Wachtwoord vergeten?<br />Vraag <a href='%slostpassword.php' class='side'>hier</a> een nieuwe aan."; 2652 $localestrings['067'] = "OpenID URL"; 2653 $localestrings['068'] = "OpenID aanmaken"; 2654 $localestrings['069'] = "Info"; 2644 2655 $localestrings['070'] = "Online"; 2645 2656 $localestrings['071'] = "< 5 mins"; … … 3263 3274 $localestrings['u064'] = "Vrouwlijk"; 3264 3275 $localestrings['u065'] = "Geen opgave"; 3276 $localestrings['u066'] = "OpenID URL:"; 3265 3277 $localestrings['u901'] = "Volledige naam"; 3266 3278 load_localestrings($localestrings, LP_LOCALE, "main.user_fields", $step); -
trunk/edit_profile.php
r1520 r1558 127 127 } 128 128 129 $user_fullname = $_POST['user_fullname']; 129 $user_fullname = stripinput($_POST['user_fullname']); 130 $user_openid_url = isURL(stripinput($_POST['user_openid_url'])) ? stripinput($_POST['user_openid_url']) : ""; 130 131 $user_hide_email = isNum($_POST['user_hide_email']) ? $_POST['user_hide_email'] : "1"; 131 132 $user_location = isset($_POST['user_location']) ? stripinput(trim($_POST['user_location'])) : ""; … … 187 188 } 188 189 if ($user_newpassword != "") { $newpass = " user_password=md5(md5('$user_newpassword')), "; } else { $newpass = " "; } 189 $result = dbquery("UPDATE ".$db_prefix."users SET user_name='$username', user_fullname='$user_fullname', ".$newpass."user_email='".$_POST['user_email']."', user_bad_email = '0', user_hide_email='$user_hide_email', user_location='$user_location', user_birthdate='$user_birthdate', user_gender='$user_gender', user_aim='$user_aim', user_icq='$user_icq', user_msn='$user_msn', user_yahoo='$user_yahoo', user_web='$user_web', user_forum_fullscreen='$user_forum_fullscreen', user_posts_unread='$user_posts_unread', user_newsletters='$user_newsletters', user_theme='$user_theme', user_offset='$user_offset', ".$set_avatar."user_sig='$user_sig', user_locale='".$_POST['user_locale']."' WHERE user_id='".$this_userdata['user_id']."'");190 $result = dbquery("UPDATE ".$db_prefix."users SET user_name='$username', user_fullname='$user_fullname', ".$newpass."user_email='".$_POST['user_email']."', user_bad_email = '0', user_hide_email='$user_hide_email', user_location='$user_location', user_birthdate='$user_birthdate', user_gender='$user_gender', user_aim='$user_aim', user_icq='$user_icq', user_msn='$user_msn', user_yahoo='$user_yahoo', user_web='$user_web', user_forum_fullscreen='$user_forum_fullscreen', user_posts_unread='$user_posts_unread', user_newsletters='$user_newsletters', user_theme='$user_theme', user_offset='$user_offset', ".$set_avatar."user_sig='$user_sig', user_locale='".$_POST['user_locale']."', user_openid_url='$user_openid_url' WHERE user_id='".$this_userdata['user_id']."'"); 190 191 if ($user_theme != $userdata['user_theme']) redirect(FUSION_SELF."?status=1"); 191 192 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$this_userdata['user_id']."'"); … … 251 252 } 252 253 254 // check which authentication to show 255 $auth_methods = explode(",",$settings['auth_type'].","); 256 switch($auth_methods[0]) { 257 case "local": 258 case "ldap": 259 case "ad": 260 $variables['auth_userpass'] = 1; 261 break; 262 default: 263 $variables['auth_userpass'] = 0; 264 } 265 switch($auth_methods[0]) { 266 case "openid": 267 $variables['auth_openid'] = 1; 268 break; 269 default: 270 $variables['auth_openid'] = 0; 271 } 272 switch($auth_methods[1]) { 273 case "local": 274 $variables['auth_userpass'] = 1; 275 break; 276 default: 277 break; 278 } 279 253 280 // define the search body panel variables 254 281 $template_panels[] = array('type' => 'body', 'name' => 'edit_profile', 'template' => 'main.edit_profile.tpl', 'locale' => array("main.members-profile", "main.user_fields")); -
trunk/files/locales/en.main.global.php
r1542 r1558 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Tue Jul 8 2008, 20:58:11CEST5 // generated on : Wed Jul 30 2008, 0:23:10 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- … … 66 66 $locale['065'] = "Not a member yet?<br /><a href='%sregister.php' class='side'>Click here</a> to register."; 67 67 $locale['066'] = "Forgotten your password?<br />Request a new one <a href='%slostpassword.php' class='side'>here</a>."; 68 $locale['067'] = "OpenID URL"; 69 $locale['068'] = "Get an OpenID"; 70 $locale['069'] = "Info"; 68 71 $locale['070'] = "Online"; 69 72 $locale['071'] = "< 5 mins"; -
trunk/includes/core_functions.php
r1550 r1558 265 265 if ($type == "header") { 266 266 header("Location: ".$location); 267 die();268 267 } else { 269 268 echo "<script type='text/javascript'>document.location.href='".$location."'</script>\n"; 270 269 echo sprintf($locale['182'], $location); 271 270 } 271 exit; 272 272 } 273 273 -
trunk/includes/templates/admin.settings_security.tpl
r1341 r1558 88 88 <tr> 89 89 <td width='50%' class='tbl'> 90 {$locale.537} 91 </td> 92 <td width='50%' class='tbl'> 93 <select name='auth_method' class='textbox'> 94 <option value='0'{if $auth_method == "0"} selected="selected"{/if}>{$locale.538}</option> 95 <option value='1'{if $auth_method == "1"} selected="selected"{/if}>{$locale.539}</option> 96 <option value='1+'{if $auth_method == "1+"} selected="selected"{/if}>{$locale.539}{$locale.541}{$locale.538}</option> 97 <option value='2'{if $auth_method == "2"} selected="selected"{/if}>{$locale.540}</option> 98 <option value='2+'{if $auth_method == "2+"} selected="selected"{/if}>{$locale.540}{$locale.541}{$locale.538}</option> 99 <option value='3+'{if $auth_method == "3+"} selected="selected"{/if}>{$locale.538}{$locale.542}</option> 100 </select> 101 </td> 102 </tr> 103 <tr> 104 <td align='center' colspan='2' class='tbl'> 105 <hr /> 106 </td> 107 </tr> 108 <tr> 109 <td width='50%' class='tbl'> 90 110 {$locale.528} 91 111 </td> -
trunk/includes/templates/main.edit_profile.tpl
r1520 r1558 37 37 {/if} 38 38 {/if} 39 {if $auth_userpass} 39 40 <tr> 40 41 <td class='tbl'> … … 45 46 </td> 46 47 </tr> 48 {/if} 47 49 <tr> 48 50 <td class='tbl'> … … 53 55 </td> 54 56 </tr> 57 {if $auth_userpass} 55 58 <tr> 56 59 <td class='tbl'> … … 68 71 </td> 69 72 </tr> 73 {/if} 74 {if $auth_openid} 75 <tr> 76 <td class='tbl'> 77 {$locale.u066}</td> 78 <td class='tbl'> 79 <input type='text' name='user_openid_url' value='{$this_userdata.user_openid_url}' maxlength='200' class='textbox' style='width:275px;background: url({$smarty.const.IMAGES}openid_small_logo.png) no-repeat; padding-left: 18px;' /> 80 </td> 81 </tr> 82 {/if} 70 83 <tr> 71 84 <td class='tbl'> -
trunk/includes/user_functions.php
r1552 r1558 15 15 if (eregi("user_functions.php", $_SERVER['PHP_SELF']) || !defined('INIT_CMS_OK')) die(); 16 16 17 // need t oGeoIP functions to determine the users country of origin17 // need the GeoIP functions to determine the users country of origin 18 18 require_once "geoip_include.php"; 19 19 … … 40 40 // Set the users site_visited cookie if this is the first visit, and update the unique visit counter 41 41 // save the random site_visited value, we need that later in session management! 42 if (!CMS_IS_BOT && !isset($_COOKIE['site_visited'])) { 43 $result=dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = cfg_value+1 WHERE cfg_name = 'counter'"); 44 $site_visited = md5(uniqid(rand(), true)); 45 setcookie("site_visited", $site_visited, time() + 31536000, "/", "", "0"); 46 } else { 47 // replace the pre v7.1 cookie if needed 48 if ($_COOKIE['site_visited'] == "yes") { 42 if (!CMS_IS_BOT) { 43 if (!isset($_COOKIE['site_visited'])) { 44 $result=dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = cfg_value+1 WHERE cfg_name = 'counter'"); 49 45 $site_visited = md5(uniqid(rand(), true)); 50 46 setcookie("site_visited", $site_visited, time() + 31536000, "/", "", "0"); 51 47 } else { 52 $site_visited = $_COOKIE['site_visited']; 53 } 54 } 55 56 // Login code 57 if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) { 58 $user_pass = md5(md5($_POST['user_pass'])); 59 $user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($_POST['user_name'])); 60 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND user_password='".$user_pass."'"); 61 if (dbrows($result) != 0) { 62 $data = dbarray($result); 63 // if the account is suspended, check for an expiry date 64 if ($data['user_status'] == 1 && $data['user_ban_expire'] > 0 && $data['user_ban_expire'] < time() ) { 65 // if this user's email address is marked as bad, reset the countdown counter 66 $data['user_bad_email'] = $data['user_bad_email'] == 0 ? 0 : time(); 67 // reset the user status and the expiry date 68 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0', user_bad_email = '".$data['user_bad_email']."' WHERE user_id='".$data['user_id']."'"); 69 $data['user_status'] = 0; 70 } 71 if ($data['user_status'] == 0) { 72 header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); 73 // set the 'remember me' status value 74 $_SESSION['remember_me'] = isset($_POST['remember_me']) ? "yes" : "no"; 75 $_SESSION['userinfo'] = $data['user_id'].".".$user_pass; 76 // login expiry defined? 77 if ($settings['login_expire']) { 78 if (isset($_POST['remember_me']) && $_POST['remember_me'] == "yes") { 79 $_SESSION['login_expire'] = time() + $settings['login_extended_expire']; 80 } else { 81 $_SESSION['login_expire'] = time() + $settings['login_expire']; 48 // replace the pre v7.1 cookie if needed 49 if ($_COOKIE['site_visited'] == "yes") { 50 $site_visited = md5(uniqid(rand(), true)); 51 setcookie("site_visited", $site_visited, time() + 31536000, "/", "", "0"); 52 } else { 53 $site_visited = $_COOKIE['site_visited']; 54 } 55 } 56 } 57 58 // Check if a user is logging in 59 if (isset($_POST['login'])) { 60 $auth_result = false; 61 $auth_methods = explode(",",$settings['auth_type'].","); 62 foreach($auth_methods as $auth_method) { 63 switch($auth_method) { 64 case "local": 65 // authentication against the local user database 66 if (!empty($_POST['user_name']) && !empty($_POST['user_pass'])) { 67 $auth_result = auth_local($_POST['user_name'], $_POST['user_pass']); 82 68 } 83 } else { 84 $_SESSION['login_expire'] = mktime(0,0,0,1,1,2038); // do not expire 85 } 86 redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script"); 87 exit; 88 } elseif ($data['user_status'] == 1) { 89 redirect(BASEDIR."setuser.php?user_id=".$data['user_id']."&error=1", "script"); 90 exit; 91 } elseif ($data['user_status'] == 2) { 92 redirect(BASEDIR."setuser.php?error=2", "script"); 93 exit; 94 } 95 } else { 96 redirect(BASEDIR."setuser.php?error=3", "script"); 97 exit; 69 break; 70 case "ldap": 71 break; 72 case "ad": 73 break; 74 case "openid": 75 // authentication against an openid provider 76 if (!empty($_POST['user_openid_url'])) { 77 $auth_result = auth_openid($_POST['user_openid_url']); 78 } 79 break; 80 case "default": 81 // empty or unknown entry, ignore 82 break; 83 } 84 } 85 // check the result of the authentication attempt, and process it 86 if (is_array($auth_result)) { 87 switch($auth_result[0]) { 88 case "redirect": 89 redirect($auth_result[1], $auth_result[2]); 90 exit; 91 default: 92 // unknown result code 93 _debug($auth_result); 94 terminate("unknown result code from an authentication module!"); 95 } 98 96 } 99 97 } … … 226 224 } 227 225 226 // update the last users online information for guests 227 if (iGUEST) { 228 $result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'"); 229 if (dbrows($result) != 0) { 230 $result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user='0' AND online_ip='".USER_IP."'"); 231 } else { 232 $result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('0', '".USER_IP."', '".time()."')"); 233 } 234 } 235 // update the last users online information for members 236 if (iMEMBER) { 237 $result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='".$userdata['user_id']."'"); 238 if (dbrows($result) != 0) { 239 $result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user='0' AND online_ip='".USER_IP."'"); 240 } else { 241 $result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('".$userdata['user_id']."', '".USER_IP."', '".time()."')"); 242 } 243 } 244 // users inactive for more than 180 seconds are not considered to be online 245 $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-180).""); 246 228 247 // update the threads_read table for the current user 229 248 if (iMEMBER) { … … 241 260 define("iAUTH", substr(md5($userdata['user_password']),16,32)); 242 261 $aidlink = "?aid=".iAUTH; 262 } 263 264 /*---------------------------------------------------+ 265 | User authentication functions | 266 +----------------------------------------------------*/ 267 268 // authentication against the local user database 269 function auth_local($userid, $password) { 270 global $db_prefix; 271 272 // check and validate the given userid and pasword 273 $user_pass = md5(md5($password)); 274 $user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($userid)); 275 276 // check if we have a user record for this userid and password 277 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND user_password='".$user_pass."'"); 278 if (dbrows($result) == 0) { 279 // not found, display an error message 280 return array("redirect", BASEDIR."setuser.php?error=3", "script"); 281 } else { 282 // found, get the record and do some more validation 283 $ret = auth_user_validate(dbarray($result)); 284 return $ret; 285 } 286 } 287 288 // authentication against an LDAP server 289 function auth_ldap($userid, $password) { 290 return array('auth_ldap not defined yet!'); 291 } 292 293 // authentication against an Active Directory server 294 function auth_ad($userid, $password) { 295 return array('auth_ad not defined yet!'); 296 } 297 298 // authentication using an OpenID 299 function auth_openid($openid_url) { 300 global $settings; 301 302 // check if the URL is valid 303 if (isURL($openid_url)) { 304 require_once(PATH_INCLUDES."class.openid.php"); 305 $openid = new SimpleOpenID; 306 $openid->SetIdentity($openid_url); 307 $openid->SetApprovedURL($settings['siteurl']."setuser.php"); 308 $openid->SetTrustRoot($settings['siteurl']); 309 $server_url = $openid->GetOpenIDServer(); 310 if ($server_url) { 311 return array("redirect", $openid->GetRedirectURL() , "script"); 312 } 313 } else { 314 // for now... 315 return false; 316 } 317 } 318 319 // further validation on the userid found 320 function auth_user_validate($userrecord) { 321 322 // if the account is suspended, check for an expiry date 323 if ($userrecord['user_status'] == 1 && $userrecord['user_ban_expire'] > 0 && $userrecord['user_ban_expire'] < time() ) { 324 // if this user's email address is marked as bad, reset the countdown counter 325 $userrecord['user_bad_email'] = $userrecord['user_bad_email'] == 0 ? 0 : time(); 326 // reset the user status and the expiry date 327 $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0', user_bad_email = '".$userrecord['user_bad_email']."' WHERE user_id='".$userrecord['user_id']."'"); 328 $userrecord['user_status'] = 0; 329 } 330 if ($userrecord['user_status'] == 0) { 331 header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); 332 // set the 'remember me' status value 333 $_SESSION['remember_me'] = isset($_POST['remember_me']) ? "yes" : "no"; 334 $_SESSION['userinfo'] = $userrecord['user_id'].".".$userrecord['user_password']; 335 // login expiry defined? 336 if ($settings['login_expire']) { 337 if (isset($_POST['remember_me']) && $_POST['remember_me'] == "yes") { 338 $_SESSION['login_expire'] = time() + $settings['login_extended_expire']; 339 } else { 340 $_SESSION['login_expire'] = time() + $settings['login_expire']; 341 } 342 } else { 343 $_SESSION['login_expire'] = mktime(0,0,0,1,1,2038); // do not expire 344 } 345 return array("redirect", BASEDIR."setuser.php?user=".$userrecord['user_name'], "script"); 346 } elseif ($userrecord['user_status'] == 1) { 347 return array("redirect", BASEDIR."setuser.php?user_id=".$userrecord['user_id']."&error=1", "script"); 348 } elseif ($userrecord['user_status'] == 2) { 349 return array("redirect", BASEDIR."setuser.php?error=2", "script"); 350 } 243 351 } 244 352 -
trunk/modules/user_info_panel/templates/modules.user_info_panel.tpl
r1402 r1558 60 60 {$loginerror|default:""} 61 61 <form name='loginform' method='post' action='{$smarty.const.FUSION_SELF}'> 62 {$locale.061}<br /><input type='text' name='user_name' class='textbox' style='width:100px' /><br /> 63 {$locale.062}<br /><input type='password' name='user_pass' class='textbox' style='width:100px' /><br /> 64 <br /><input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/> 65 <input type='submit' name='login' value='{$locale.064}' class='button' /><br /> 62 {if $auth_userpass} 63 {$locale.061}<br /><input type='text' name='user_name' class='textbox' style='width:125px' /><br /> 64 {$locale.062}<br /><input type='password' name='user_pass' class='textbox' style='width:125px' /><br /> 65 {/if} 66 {if $auth_openid} 67 {$locale.067}<br /><input type='text' name='user_openid_url' class='textbox' style='width:108px;background: url({$smarty.const.IMAGES}openid_small_logo.png) no-repeat; padding-left: 18px;' /><br /> 68 <span class='small' style='font-size:90%;'> <a href="http://openid.net/get/" target="_blank">{$locale.068}</a> · <a href="http://openid.net/what" target="_blank">{$locale.069}</a></span><br /> 69 {/if} 70 <br /> 71 <input type='submit' name='login' value='{$locale.064}' class='button' /> 72 <input type='checkbox' name='remember_me' value='yes' title='{$locale.063}' style='vertical-align:middle;'{if $remember_me|default:"no" == "yes"} checked="checked"{/if}/><br /> 66 73 <input type='hidden' name='javascript_check' value='n' /> 67 74 </form> 68 75 </div> 69 {literal}76 {literal} 70 77 <script type='text/javascript'> 71 78 /* <![CDATA[ */ … … 76 83 /* ]]> */ 77 84 </script> 78 {/literal} 79 <br /> 80 {if $settings.enable_registration}{$settings.siteurl|string_format:$locale.065}<br /><br />{/if} 81 {$settings.siteurl|string_format:$locale.066} 85 {/literal} 86 {if $show_reglink || $show_passlink} 87 <hr /> 88 {/if} 89 {if $show_reglink}{$settings.siteurl|string_format:$locale.065}<br /><br />{/if} 90 {if $show_passlink}{$settings.siteurl|string_format:$locale.066}{/if} 82 91 {/if} 83 92 {if $smarty.const.iMEMBER|default:false} -
trunk/modules/user_info_panel/user_info_panel.php
r1542 r1558 69 69 $variables['login_expiry'] = (iADMIN && isset($_SESSION['login_expire'])) ? time_system2local($_SESSION['login_expire']) : ""; 70 70 71 // check which authentication to show 72 $auth_methods = explode(",",$settings['auth_type'].","); 73 switch($auth_methods[0]) { 74 case "local": 75 case "ldap": 76 case "ad": 77 $variables['auth_userpass'] = 1; 78 break; 79 default: 80 $variables['auth_userpass'] = 0; 81 } 82 switch($auth_methods[0]) { 83 case "openid": 84 $variables['auth_openid'] = 1; 85 break; 86 default: 87 $variables['auth_openid'] = 0; 88 } 89 switch($auth_methods[1]) { 90 case "local": 91 $variables['auth_userpass'] = 1; 92 break; 93 default: 94 break; 95 } 96 97 // check if we need to display links 98 $variables['show_reglink'] = $settings['enable_registration']; 99 $variables['show_passlink'] = 1; 100 71 101 $template_variables['modules.user_info_panel'] = $variables; 72 102 ?> -
trunk/setuser.php
r1454 r1558 15 15 require_once dirname(__FILE__)."/includes/core_functions.php"; 16 16 require_once dirname(__FILE__)."/includes/theme_functions.php"; 17 18 17 // temp storage for template variables 19 18 $variables = array(); … … 57 56 $message['line2'] = "<b>".$locale['196']."</b>"; 58 57 } else { 58 if (isset($_GET['openid_mode'])) { 59 // handle openid login 60 require_once(PATH_INCLUDES."class.openid.php"); 61 $openid = new SimpleOpenID; 62 $openid->SetIdentity(urldecode($_GET['openid_identity'])); 63 if ($openid->ValidateWithServer()) { 64 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_openid_url='".strtolower($_GET['openid_identity'])."'"); 65 if (dbrows($result) != 0) { 66 // found, get the record and do some more validation 67 $res = auth_user_validate(dbarray($result)); 68 if (!is_array($res)) { 69 die('invalid res'); 70 } 71 } else { 72 die('user not found'); 73 } 74 } else { 75 _debug($openid->GetError(), true); 76 } 77 } 59 78 if (isset($_SESSION['userinfo'])) { 79 // handle local login 60 80 $userinfo_vars = explode(".", $_SESSION['userinfo']); 61 81 $user_pass = (preg_match("/^[0-9a-z]{32}$/", $userinfo_vars['1']) ? $userinfo_vars['1'] : ""); … … 67 87 } 68 88 $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'"); 69 $message['line2'] = "<b>".$locale['193'].$ user."</b>";89 $message['line2'] = "<b>".$locale['193'].$data['user_name']."</b>"; 70 90 } else { 71 91 $message['line2'] = "<b>".$locale['196']."</b>";
Note: See TracChangeset
for help on using the changeset viewer.
