<?php

define('SF_ROOT_DIR', realpath(dirname(__FILE__) . '/../..'));
define('SF_APP', 'fe');
define('SF_ENVIRONMENT', 'prod');
define('SF_DEBUG', true);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
sfContext::getInstance();
$ids = array(5, 5, 5, 5, 5, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 21, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 30, 30, 40, 40, 40, 40, 40, 40, 40, 45, 45, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 57, 57, 57, 57, 58, 69, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 103, 115, 116, 116, 116, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 134, 134, 136, 136, 139, 141, 141, 141, 141, 141, 143, 150, 151, 151, 151, 151, 151, 151, 151, 153, 153, 153, 153, 153, 173, 174, 197, 197, 197, 197, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 211, 211, 211, 211, 215, 222, 222, 222, 222, 235, 235, 235, 238, 238, 238, 238, 238, 238, 264, 264, 264, 264, 264, 264, 264, 271, 271, 272, 276, 276, 276, 276, 285, 285, 285, 285, 285, 285, 289, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 304, 313, 313, 313, 317, 317, 317, 321, 321, 321, 321, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 361, 361, 373, 376, 376, 383, 383, 383, 393, 393, 393, 395, 395, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 497, 497, 497, 497, 497, 504, 504, 504, 504, 504, 505, 505, 505, 507, 510, 510, 510, 512, 512, 512, 514, 516, 516, 516, 516, 516, 517, 517, 517, 517, 517, 518, 518, 521, 521, 521, 521, 521, 521, 523, 523, 523, 523, 523, 523, 523, 523, 523, 524, 525, 528, 530, 532, 532, 532, 537, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 550, 550, 550, 550, 554, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 562, 562, 562, 562, 562, 562, 563, 563, 563, 563, 563, 563, 565, 565, 565, 565, 565, 565, 567, 568, 576, 576, 577, 577, 577, 578, 578, 578, 580, 580, 580, 581, 581, 581, 583, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 588, 597, 597, 597, 597, 597, 601, 611, 611, 626, 626, 626, 626, 626, 626, 626, 626, 626, 640, 640, 640, 640, 640, 640, 644, 644, 646, 652, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 657, 657, 657, 657, 661, 661, 661, 661, 661, 661, 661, 661, 661, 663, 664, 669, 669, 669, 669, 669, 669, 670, 673, 673, 673, 673, 673, 673, 674, 674, 674, 674, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 704, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 710, 714, 716, 718, 718, 718, 718, 721, 721, 723, 723, 723, 723, 723, 723, 723, 724, 724, 724, 724, 724, 736, 736, 738, 738, 740, 748, 748, 748, 748, 748, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 758, 759, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 780, 780, 780, 782, 785, 785, 785, 785, 785, 785, 785, 786, 786, 792, 792, 792, 792, 793, 798, 802, 802, 802, 802, 813, 813, 813, 813, 813, 813, 813, 813, 813, 813, 813, 814, 814, 814, 817, 817, 817, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, 825, 825, 825, 826, 826, 826, 826, 826, 826, 826, 826, 832, 836, 836, 836, 836, 838, 838, 838, 838, 838, 838, 838, 838, 838, 840, 840, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 848, 850, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 854, 854, 854, 854, 854, 854, 854, 854, 854, 854, 857, 857, 857, 857, 860, 860, 873, 873, 873, 888, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 892, 896, 898, 898, 898, 898, 902, 902, 902, 902, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 904, 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, 919, 919, 919, 919, 919, 931, 931, 931, 938, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, 943, 946, 946, 952, 952, 952, 952, 952, 953, 953, 953, 960, 960, 962, 962, 966, 966, 966, 966, 966, 968, 968, 988, 988, 988, 988, 990, 990, 990, 1000, 1000, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1013, 1013, 1013, 1017, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1037, 1037, 1046, 1050, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1061, 1061, 1061, 1061, 1061, 1061, 1064, 1064, 1070, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1077, 1077, 1079, 1079, 1083, 1083, 1083, 1083, 1083, 1085, 1085, 1085, 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1090, 1090, 1092, 1093, 1093, 1099, 1100, 1101, 1101, 1101, 1101, 1101, 1103, 1103, 1103, 1103, 1103, 1107, 1107, 1110, 1111, 1111, 1112, 1112, 1112, 1112, 1112, 1113, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1122, 1123, 1123, 1123, 1128, 1128, 1128, 1128, 1128, 1128, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1143, 1143, 1144, 1156, 1156, 1158, 1158, 1158, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1162, 1162, 1162, 1162, 1162, 1162, 1170, 1170, 1173, 1173, 1173, 1181, 1181, 1181, 1181, 1190, 1190, 1190, 1190, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1194, 1194, 1210, 1213, 1218, 1218, 1224, 1234, 1234, 1234, 1234, 1234, 1234, 1234, 1237, 1237, 1237, 1237, 1246, 1257, 1257, 1257, 1257, 1257, 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1274, 1277, 1277, 1277, 1277, 1281, 1281, 1281, 1281, 1282, 1282, 1284, 1284, 1284, 1284, 1286, 1286, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1288, 1291, 1291, 1294, 1294, 1294, 1294, 1294, 1294, 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1302, 1302, 1302, 1302, 1302, 1302, 1304, 1304, 1304, 1304, 1304, 1304, 1307, 1311, 1314, 1314, 1314, 1314, 1314, 1319, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1334, 1334, 1334, 1334, 1334, 1334, 1334, 1335, 1338, 1338, 1338, 1338, 1338, 1350, 1355, 1355, 1355, 1355, 1355, 1360, 1360, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1392, 1394, 1394, 1394, 1394, 1394, 1407, 1407, 1407, 1407, 1409, 1411, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1423, 1423, 1424, 1425, 1425, 1425, 1425, 1425, 1425, 1439, 1439, 1439, 1439, 1439, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1499, 1499, 1499, 1499, 1499, 1499, 1499, 1499, 1507, 1507, 1517, 1517, 1517, 1517, 1517, 1517, 1517, 1517, 1518, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1524, 1533, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1541, 1541, 1541, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1546, 1552, 1552, 1552, 1552, 1552, 1553, 1557, 1557, 1557, 1557, 1558, 1558, 1558, 1560, 1561, 1561, 1562, 1564, 1566, 1574, 1577, 1577, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1578, 1581, 1581, 1581, 1584, 1584, 1584, 1584, 1584, 1603, 1610, 1610, 1610, 1610, 1610, 1610, 1610, 1610, 1611, 1611, 1611, 1613, 1615, 1618, 1618, 1618, 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1623, 1623, 1624, 1624, 1624, 1624, 1624, 1624, 1627, 1627, 1627, 1627, 1627, 1627, 1629, 1629, 1629, 1629, 1629, 1629, 1629, 1631, 1631, 1631, 1631, 1631, 1631, 1631, 1633, 1633, 1633, 1633, 1633, 1633, 1633, 1633, 1633, 1633, 1635, 1636, 1638, 1638, 1639, 1639, 1649, 1649, 1649, 1650, 1655, 1656, 1656, 1656, 1657, 1657, 1657, 1657, 1658, 1658, 1658, 1660, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1662, 1663, 1663, 1665, 1665, 1673, 1673, 1673, 1674, 1674, 1674, 1674, 1676, 1676, 1677, 1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685, 1685, 1686, 1704, 1707, 1707, 1707, 1707, 1707, 1711, 1713, 1713, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1749, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1760, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1773, 1775, 1775, 1775, 1775, 1783, 1783, 1783, 1786, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1799, 1803, 1804, 1804, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1822, 1822, 1822, 1822, 1822, 1822, 1822, 1829, 1829, 1829, 1829, 1829, 1829, 1830, 1830, 1830, 1830, 1830, 1830, 1830, 1833, 1833, 1833, 1839, 1839, 1839, 1839, 1839, 1850, 1850, 1850, 1850, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1851, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1855, 1856, 1861, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1868, 1868, 1868, 1868, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1882, 1883, 1884, 1884, 1884, 1884, 1887, 1887, 1887, 1895, 1899, 1899, 1899, 1899, 1899, 1906, 1906, 1906, 1907, 1908, 1908, 1911, 1911, 1911, 1912, 1912, 1912, 1917, 1918, 1918, 1919, 1922, 1923, 1923, 1924, 1924, 1925, 1925, 1926, 1926, 1927, 1927, 1928, 1928, 1930, 1930, 1931, 1931, 1932, 1934, 1935, 1937, 1937, 1938, 1938, 1942, 1942, 1945, 1946, 1946, 1949, 1949, 1950, 1950, 1951, 1951, 1952, 1952, 1956, 1956, 1958, 1959, 1959, 1961, 1961, 1965, 1965, 1967, 1969, 1969, 1970, 1970, 1971, 1971, 1972, 1972, 1973, 1973, 1974, 1974, 1977, 1977, 1982, 1982, 1983, 1983, 1985, 1985, 1988, 1988, 1990, 1990, 1993, 1993, 1996, 1996, 1997, 2000, 2000, 2001, 2001, 2003, 2003, 2004, 2004, 2005, 2005, 2006, 2006, 2008, 2008, 2013, 2016, 2016, 2018, 2019, 2021, 2021, 2023, 2024, 2024, 2025, 2025, 2026, 2029, 2029, 2032, 2032, 2035, 2035, 2036, 2036, 2037, 2037, 2038, 2039, 2040, 2040, 2042, 2043, 2044, 2045, 2045, 2046, 2048, 2048, 2049, 2050, 2050, 2052, 2055, 2056, 2057, 2058, 2061, 2061, 2062, 2062, 2062, 2066, 2067, 2068, 2069, 2069, 2070, 2070, 2071, 2072, 2073, 2073, 2073, 2073, 2075, 2075, 2076, 2076, 2076, 2077, 2077, 2077, 2077, 2077, 2078, 2078, 2080, 2080, 2082, 2082, 2083, 2085, 2085, 2086, 2086, 2089, 2090, 2090, 2092, 2092, 2093, 2094, 2094, 2095, 2095, 2096, 2100, 2103, 2104, 2105, 2105, 2107, 2108, 2110, 2113, 2115, 2117, 2118, 2121, 2123, 2123, 2125, 2126, 2127, 2128, 2130, 2133, 2135, 2135, 2136, 2137, 2138, 2139, 2140, 2145, 2145, 2147, 2147, 2149, 2150, 2152, 2156, 2171, 2190, 2195, 2206, 2207, 2250, 2250, 2250, 2250, 2253, 2259, 2260, 2261, 2261, 2261, 2261, 2261, 2261, 2261, 2261, 2271, 2271, 2271, 2271, 2273, 2273, 2273, 2275, 2275, 2275, 2278, 2278, 2300, 2300, 2300, 2300, 2300, 2300, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2314, 2325, 2328, 2336, 2346, 2346, 2362, 2368, 2368, 2368, 2370, 2371, 2389, 2400, 2401, 2403, 2406, 2407, 3254, 4242, 4242, 4247, 4248, 4250, 4251, 4255, 4257, 4258, 4259, 4264, 4264, 4264, 4264, 4264, 4264, 4278, 4280, 4280, 4280, 4280, 4280, 4280, 4280, 4282, 4288, 4288, 4305, 4305, 4305, 4305, 4306, 4307, 4314, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4319, 4321, 4328, 4331, 4331, 4331, 4331, 4349, 4354, 4354, 4354, 4354, 4354, 4354, 4354, 4354, 4354, 4354, 4354, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4357, 4368, 4375, 4376, 4376, 4377, 4377, 4379, 4384, 4388, 4388, 4388, 4388, 4388, 4388, 4388, 4388, 4413, 4434, 4434, 4434, 4434, 4438, 4448, 4448, 4448, 4448, 4448, 4448, 4448, 4448, 4458, 4458, 4474, 4474, 4474, 4474, 4474, 4474, 4474, 4474, 4484, 4484, 4484, 4484, 4484, 4503, 4503, 4503, 4503, 4503, 4509, 4510, 4518, 4523, 4528, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4536, 4542, 4542, 4542, 4542, 4542, 4547, 4560, 4563, 4567, 4567, 4567, 4571, 4588, 4588, 4591, 4591, 4591, 4618, 4618, 4618, 4618, 4618, 4653, 4653, 4653, 4653, 4657, 4657, 4657, 4668, 4674, 4674, 4674, 4690, 4690, 4690, 4690, 4690, 4690, 4690, 4690, 4690, 4690, 4690, 4702, 4702, 4702, 4703, 4703, 4703, 4703, 4710, 4718, 4729, 4729, 4729, 4729, 4729, 4730, 4732, 4740, 4740, 4740, 4740, 4740, 4762, 4763, 4763, 4763, 4763, 4763, 4763, 4768, 4777, 4791, 4791, 4792, 4793, 4801, 4805, 4817, 4818, 4825, 4832, 4843, 4846, 4847, 4871, 4871, 4871, 4871, 4900, 4900, 4908, 4913, 4913, 4913, 4922, 4928, 4931, 4932, 4932, 4932, 4932, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 4955, 4955, 4955, 4955, 4955, 4955, 4955, 4955, 4955, 4955, 4955, 4957, 4958, 4968, 4969, 4977, 4989, 4989, 4989, 4989, 4989, 4989, 4989, 4989, 4990, 5001, 5001, 5001, 5001, 5001, 5007, 5007, 5031, 5032, 5033, 5037, 5037, 5037, 5039, 5044, 5050, 5051, 5059, 5062, 5067, 5072, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5073, 5092, 5093, 5094, 5095, 5096, 5108, 5116, 5130, 5137, 5138, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5162, 5167, 5178, 5178, 5180, 5186, 5186, 5186, 5186, 5186, 5186, 5186, 5186, 5186, 5208, 5208, 5208, 5208, 5208, 5208, 5236, 5237, 5238, 5268, 5272, 5301, 5309, 5320, 5320, 5321, 5328, 5328, 5328, 5331, 5336, 5336, 5336, 5336, 5336, 5336, 5336, 5336, 5341, 5341, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5351, 5355, 5357, 5370, 5370, 5370, 5373, 5376, 5382, 5382, 5382, 5382, 5389, 5389, 5389, 5389, 5389, 5389, 5389, 5389, 5389, 5389, 5389, 5430, 5431, 5436, 5436, 5436, 5438, 5468, 5469, 5471, 5473, 5474, 5478, 5513, 5516, 5523, 5526, 5538, 5547, 5548, 5561, 5561, 5561, 5561, 5561, 5561, 5561, 5561, 5561, 5568, 5568, 5568, 5569, 5569, 5569, 5569, 5570, 5576, 5577, 5586, 5586, 5589, 5606, 5606, 5606, 5611, 5614, 5626, 5626, 5626, 5626, 5629, 5647, 5647, 5647, 5647, 5665, 5675, 5675, 5688, 5688, 5688, 5689, 5689, 5689, 5703, 5709, 5720, 5725, 5725, 5725, 5726, 5726, 5726, 5750, 5757, 5757, 5760, 5760, 5760, 5760, 5760, 5760, 5760, 5760, 5772, 5788, 5790, 5792, 5799, 5799, 5799, 5807, 5813, 5813, 5813, 5813, 5813, 5813, 5813, 5813, 5813, 5813, 5829, 5829, 5836, 5837, 5852, 5860, 5864, 5866, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5870, 5882, 5895, 5895, 5896, 5897, 5899, 5906, 5915, 5918, 5919, 5926, 5929, 5929, 5929, 5930, 5931, 5932, 5934, 5943, 5985, 5985, 5985, 5988, 6000, 6004, 6005, 6007, 6009, 6009, 6009, 6009, 6009, 6009, 6009, 6009, 6009, 6016, 6017, 6019, 6019, 6019, 6025, 6040, 6050, 6053, 6057, 6059, 6077, 6086, 6091, 6092, 6099, 6101, 6112, 6112, 6112, 6121, 6121, 6121, 6121, 6121, 6126, 6129, 6146, 6146, 6146, 6146, 6146, 6146, 6146, 6157, 6188, 6188, 6191, 6191, 6199, 6199, 6199, 6207, 6207, 6213, 6217, 6223, 6223, 6254, 6269, 6269, 6269, 6269, 6280, 6280, 6280, 6281, 6291, 6299, 6306, 6363, 6369, 6386, 6401, 6407, 6429, 6430, 6458, 6470, 6472, 6474, 6474, 6474, 6474, 6474, 6474, 6474, 6501, 6504, 6504, 6510, 6515, 6515, 6533, 6535, 6535, 6535, 6535, 6547, 6547, 6564, 6568, 6569, 6577, 6586, 6591, 6593, 6600, 6602, 6627, 6633, 6633, 6633, 6633, 6633, 6633, 6634, 6671, 6671, 6671, 6671, 6671, 6675, 6675, 6683, 6690, 6694, 6697, 6734, 6734, 6734, 6734, 6734, 6734, 6734, 6734, 6734, 6751, 6812, 6812, 6812, 6812, 6812, 6812, 6812, 6812, 6812, 6812, 6824, 6829, 6830, 6834, 6834, 6834, 6836, 6838, 6854, 6894, 6894, 6894, 6899, 6903, 6943, 6972, 6972, 6972, 6972, 7021, 7025, 7028, 7036, 7054, 7065, 7065, 7069, 7070, 7079, 7082, 7083, 7086, 7086, 7097, 7098, 7099, 7104, 7104, 7110, 7121, 7123, 7127, 7130, 7134, 7140, 7143, 7144, 7159, 7171, 7172, 7188, 7189, 7191, 7206, 7206, 7234, 7245, 7245, 7250, 7288, 7300, 7304, 7304, 7304, 7304, 7304, 7304, 7304, 7304, 7304, 7304, 7306, 7313, 7313, 7335, 7344, 7344, 7351, 7351, 7364, 7366, 7366, 7366, 7366, 7366, 7366, 7366, 7366, 7366, 7368, 7371, 7371, 7374, 7375, 7380, 7380, 7380, 7380, 7380, 7380, 7380, 7383, 7394, 7398, 7403, 7403, 7403, 7403, 7404, 7405, 7406, 7408, 7409, 7409, 7418, 7431, 7436, 7453, 7455, 7457, 7469, 7489, 7655, 7657, 7657, 7660, 7660, 7660, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7672, 7681, 7682, 7683, 7684, 7686, 7688, 7689, 7694, 7702, 7702, 7706, 7708, 7709, 7712, 7713, 7713, 7713, 7715, 7715, 7726, 7726, 7726, 7726, 7726, 7734, 7734, 7734, 7734, 7743, 7744, 7744, 7744, 7744, 7747, 7751, 7751, 7773, 7775, 7775, 7777, 7779, 7779, 7790, 7790, 7791, 7791, 7791, 7791, 7791, 7791, 7792, 7793, 7795, 7795, 7796, 7797, 7797, 7800, 7802, 7808, 7823, 7825, 7834, 7890, 7890, 7890, 7895, 7896, 7928, 7977, 7977, 7977, 7977, 7982, 7982, 7982, 8025, 8025, 8065, 8074, 8088, 8129, 8131, 8163, 8163, 8166, 8182, 8182, 8183, 8183, 8184, 8184, 8261, 8271, 8276, 8368, 8369, 11002, 11002, 11002, 11002, 11162, 11372, 11707, 11707, 11802, 11802, 15320, 15320, 15320, 15320, 15320, 15320, 15320, 15986, 16044, 16054, 16054, 16054, 16054, 16054, 17726, 20116, 41578, 41864, 43571, 44749, 45760, 45760, 45760, 46180, 46188, 54319, 55001, 55610, 55615, 55615, 56116, 56116, 57605, 57605, 58116, 61089, 61169, 67726, 68116, 69116, 69116, 71578, 71864, 71864, 79216, 79772, 146854, 146903, 146904, 153890, 153890, 186416, 411089);
foreach ($ids as $key => $id) {
    $res = TagPeer::retrieveByPk($id);
    if (!$res) {
        echo $id . "\n";
    }
}
<?php

/*
controlla le news che fanno riferimento a tag che non esistono e le cancella
*/
define('SF_ROOT_DIR', realpath(dirname(__FILE__) . '/../..'));
define('SF_APP', 'fe');
define('SF_ENVIRONMENT', 'prod');
define('SF_DEBUG', false);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
sfContext::getInstance();
$c = new Criteria();
$c->add(NewsPeer::RELATED_MONITORABLE_MODEL, 'Tag');
$news = NewsPeer::doSelect($c);
foreach ($news as $n) {
    $tag = TagPeer::retrieveByPk($n->getRelatedMonitorableId());
    if (!$tag) {
        echo "tag id=" . $n->getRelatedMonitorableId() . ", trovato nelle news id=" . $n->getId() . " non esiste. Cancello la news\n";
        $n->delete();
    }
}
<?php

foreach ($tags as $tag) {
    ?>
  <?php 
    echo TagPeer::retrieveByPk($tag[0])->getTripleValue() . " - " . $tag[1] . "<br/>";
}
?>
  
                    echo "Monitoraggio cambiato: " . $old . " con " . $tag_new[$k] . " per utente " . $rs->getUserId() . "\n";
                    $number_monitor_ok = $number_monitor_ok + 1;
                } else {
                    $rs->delete();
                    $number_monitor_no = $number_monitor_no + 1;
                    echo "!!!! DOPPIONE" . $old . " con " . $tag_new[$k] . " per utente " . $rs->getUserId() . "\n";
                }
            }
        }
    }
    //Cancella tutte le news legate ai vecchi tags
    foreach ($tag_old as $k => $old) {
        $news = NewsPeer::getNewsRelatedToMonitorableModelAndId('Tag', $old);
        foreach ($news as $new) {
            $new->delete();
            echo "cancello news \n";
        }
    }
    //Cancella i tag vecchi
    foreach ($tag_old as $k => $old) {
        $tag = TagPeer::retrieveByPk($old);
        if ($tag) {
            $tag->delete();
            echo "cancello tag \n";
        }
    }
} else {
    echo "!!!!! Gli array hanno un numero di elementi diversi!";
}
echo "\n============\n" . $number_tagging_ok . " - " . $number_tagging_no;
echo "\n============\n" . $number_monitor_ok . " - " . $number_monitor_no;
 $c->add(TaggingPeer::TAG_ID, $tag);
 if ($argv[1] == 1) {
     $c->add(TaggingPeer::TAGGABLE_MODEL, 'OppAtto');
 }
 $results = TaggingPeer::doSelect($c);
 $number = $number + count($results);
 foreach ($results as $rs) {
     for ($x = 0; $x <= 1; $x++) {
         if ($macrotags[$k][$x] != 0) {
             $c = new Criteria();
             $c->add(TaggingPeer::TAG_ID, $macrotags[$k][$x]);
             $c->add(TaggingPeer::TAGGABLE_ID, $rs->getTaggableId());
             $c->add(TaggingPeer::TAGGABLE_MODEL, $rs->getTaggableModel());
             $r = TaggingPeer::doSelectOne($c);
             if (!$r) {
                 $t = TagPeer::retrieveByPk($macrotags[$k][$x]);
                 if ($t) {
                     $insert = new Tagging();
                     $insert->setTagId($macrotags[$k][$x]);
                     $insert->setTaggableId($rs->getTaggableId());
                     $insert->setTaggableModel($rs->getTaggableModel());
                     $insert->save();
                     echo "++++++++++++++++++++++++++++++++++++++++++ aggiunto " . $macrotags[$k][$x] . " - " . $t->getTripleValue() . " in " . $rs->getTaggableId() . "\n";
                     $number_tagging_ok = $number_tagging_ok + 1;
                 } else {
                     echo "!!!! non esiste Macrotags con id=" . $macrotags[$k][$x] . "\n";
                 }
             } else {
                 echo "NON aggiungo, già esiste! \n";
                 $number_tagging_no = $number_tagging_no + 1;
             }