text:
package org.wildfly.camel.test.braintree;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.braintree.BraintreeComponent;
import org.apache.camel.component.braintree.BraintreeConfiguration;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.util.IntrospectionSupport;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.camel.test.common.utils.EnvironmentUtils;
import org.wildfly.extension.camel.CamelAware;

import com.braintreegateway.Customer;
import com.braintreegateway.CustomerRequest;
import com.braintreegateway.Result;

/*
 * To run this test you need to set the following environment variables with
 * Braintree's keys:
 *
 *   CAMEL_BRAINTREE_ENVIRONMENT=SANDBOX
 *   CAMEL_BRAINTREE_MERCHANT_ID=...
 *   CAMEL_BRAINTREE_PUBLIC_KEY=...
 *   CAMEL_BRAINTREE_PRIVATE_KEY=...
 */
@CamelAware
@RunWith(Arquillian.class)
public class BraintreeIntegrationTest {

    // Enum values correspond to environment variable names
    private enum BraintreeOption {
        CAMEL_BRAINTREE_ENVIRONMENT("environment"),
        CAMEL_BRAINTREE_MERCHANT_ID("merchantId"),
        CAMEL_BRAINTREE_PUBLIC_KEY("publicKey"),
        CAMEL_BRAINTREE_PRIVATE_KEY("privateKey");

        private String configPropertyName;

        BraintreeOption(String configPropertyName) {
            this.configPropertyName = configPropertyName;
        }
    }

    @Deployment
    public static JavaArchive deployment() {
        return ShrinkWrap.create(JavaArchive.class, "camel-braintree-tests")
            .addClasses(EnvironmentUtils.class);
    }

    @Before
    public void setUp() {
        if (EnvironmentUtils.isIbmJDK()) {
            System.setProperty("https.protocols", "TLSv1.2");
        }
    }

    @After
    public void tearDown() {
        if (EnvironmentUtils.isIbmJDK()) {
            System.clearProperty("https.protocols");
        }
    }

    @Test
    public void testBraintreeClientTokenGateway() throws Exception {

        Map<String, Object> braintreeOptions = createBraintreeOptions();

        Assume.assumeTrue("[#1679] Enable Braintree testing in Jenkins",
                braintreeOptions.size() == BraintreeOption.values().length);

        final CountDownLatch latch = new CountDownLatch(1);
        final CamelContext camelctx = new DefaultCamelContext();
        final BraintreeConfiguration configuration = new BraintreeConfiguration();
        configuration.setHttpLogLevel(Level.WARNING);
        IntrospectionSupport.setProperties(configuration, braintreeOptions);

        // add BraintreeComponent to Camel context
        final BraintreeComponent component = new BraintreeComponent(camelctx);
        component.setConfiguration(configuration);
        camelctx.addComponent("braintree", component);

        camelctx.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("timer://braintree?repeatCount=1")
                    .to("braintree:clientToken/generate")
                    .process(new Processor() {
                        @Override
                        public void process(Exchange exchange) throws Exception {
                            latch.countDown();
                        }})
                    .to("mock:result");
            }
        });

        camelctx.start();
        try {
            Assert.assertTrue("Countdown reached zero", latch.await(5, TimeUnit.MINUTES));
        } finally {
            camelctx.stop();
        }
    }

    @Test
    public void testBraintreeCustomerGateway() throws Exception {

        Map<String, Object> braintreeOptions = createBraintreeOptions();

        // Do nothing if the required credentials are not present
        Assume.assumeTrue(braintreeOptions.size() == BraintreeOption.values().length);

        final CountDownLatch latch = new CountDownLatch(2);
        final CamelContext camelctx = new DefaultCamelContext();
        final BraintreeConfiguration configuration = new BraintreeConfiguration();
        IntrospectionSupport.setProperties(configuration, braintreeOptions);

        // add BraintreeComponent to Camel context
        final BraintreeComponent component = new BraintreeComponent(camelctx);
        component.setConfiguration(configuration);
        camelctx.addComponent("braintree", component);

        camelctx.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:create")
                    .to("braintree:customer/create?inBody=request")
                    .process(new Processor() {
                        @Override
                        public void process(Exchange exchange) throws Exception {
                            latch.countDown();
                        }});
                from("direct:delete")
                    .to("braintree:customer/delete?inBody=id")
                    .process(new Processor() {
                        @Override
                        public void process(Exchange exchange) throws Exception {
                            latch.countDown();
                        }});

            }
        });

        camelctx.start();

        // ****************************
        // Create a customer
        // ****************************

        @SuppressWarnings("unchecked")
        Result<Customer> createResult = camelctx.createProducerTemplate().requestBody(
            "direct:create",
            new CustomerRequest()
                .firstName("user")
                .lastName(UUID.randomUUID().toString())
                .company("Apache")
                .email("user@braintree.camel")
                .website("http://user.braintree.camel"),
            Result.class
        );

        Assert.assertNotNull(createResult);
        Assert.assertTrue(createResult.isSuccess());
        Assert.assertNotNull(createResult.getTarget());
        Assert.assertNotNull(createResult.getTarget().getId());

        // ****************************
        // Delete the customer
        // ****************************

        @SuppressWarnings("unchecked")
        Result<Customer> deleteResult = camelctx.createProducerTemplate().requestBody(
            "direct:delete",
            createResult.getTarget().getId(),
            Result.class);

        Assert.assertNotNull(deleteResult);
        Assert.assertTrue(deleteResult.isSuccess());
        Assert.assertNull(deleteResult.getTarget());

        try {
            Assert.assertTrue("Countdown reached zero", latch.await(5, TimeUnit.MINUTES));
        } finally {
            camelctx.stop();
        }
    }

    protected Map<String, Object> createBraintreeOptions() throws Exception {
        final Map<String, Object> options = new HashMap<>();

        for (BraintreeOption option : BraintreeOption.values()) {
            String envVar = System.getenv(option.name());
            if (envVar == null || envVar.length() == 0) {
                options.clear();
            } else {
                options.put(option.configPropertyName, envVar);
            }
        }

        return options;
    }
}

redpajama_set_name: RedPajamaGithub


Dear Mufti Sahib, Assalamu alaikum, I am 56 years old and planning, inshallah, to travel for Umrah this Ramzan along with my wife. My wife's cousin sister who age is 56 years, same age as mine, also wishes to travel with us. Please let me know whether it is jayiz for her to travel with me and my wife and I acting as her Mahram. I have intimated to her that to the best of my knowledge she should not accompany me because I am her non-mehram but she says because of her age it is OK. In spite of my objection she still insists to accompany us. Please let me know what is my position in this situation.


It's that moment you dread. Something went wrong and you have an angry customer on your hands. We know that even one unhappy customer can spell disaster. But it's also important to remember that in those tense and uncomfortable moments, there is also an opportunity.
When you handle an upset customer effectively, you can demonstrate the care, concern and pro-active approach that will not only resolve the current issue, but can also lead to a stronger long-term relationship with that customer.
I recently had a situation occur that led to an important customer feeling frustrated with my company. Luckily issues like this don't arise very frequently, but when they do, I rely on a set of skills I've acquired both working in customer service and being a customer myself. When I follow these guidelines, I am usually able to smooth over any situation and leave my customers with a positive impression.
It's easy to panic when something goes wrong. You can already start to imagine what the customer was going to say and sense the frustration and disappointment. The best way to counter this emotional response is to move to a logical approach to review and fix the situation. Before I walk into a tense or uncomfortable situation, I decide on a clear plan for how I will make it right. This removes some of the stress and gives me room to focus on options for the future instead of dwelling on what caused the problem in the first place.
We know how bad a situation will be by imagining what the customer felt and experienced when things went wrong. Instead of shying away from that feeling, it pays to dig into it a little to really think through what you would want to hear and see if it happened to you. Focusing on how the customer feels will help you communicate that you understand why they are frustrated, angry or disappointed. Using vivid and descriptive language to emphasize that will go a long way. In my particular situation, I stated that I understood how frustrated my customer was and the true impact of the mistake. Hearing that you are taking the incident seriously and handling it with the highest level of attention will automatically start to put the customer at ease, because they know that you are on their side. They can let down some of their defenses and open themselves to hearing your solution.
If the situation will take more than a single step or conversation to resolve, lay out the first steps and a timeline for taking them right away. Whether it's a phone call, email, refund, or some other action, do something as soon as possible to show the customer that the plan to resolve the issue it moving forward. Now is the most important time to go above and beyond to make things happen quickly and efficiently for the customer. Do everything you can to make the person feel especially cared for and important. With my customer, I personally oversaw the detailed administration of resolving his issue. The fact that I didn't hand it off to someone on my staff sent a message that this customer was important and worthy of that extra level of effort to ensure he was happy.
Finally, let the customer know you appreciate the fact that they brought the issue to your attention and were willing to stick with you as you resolved it. This small gesture says that you value the relationship and opportunity to serve your customer. It demonstrates a commitment to improvement and invites the customer to be part of making things better both now and in the future.
Remembering these steps has helped me stay positive and focused, even when things don't go exactly as planned. Every interaction with a customer is an opportunity to go beyond their expectations. So don't run from your upset customers, embrace them. They will make you and your business stronger.


Short range radio communications have some major advantages at times. First the radios used are often much more functional and rugged for general use than a cell phone and besides the initial purchase price and the cost of keeping up the batteries, they are less expensive than a cell phone. When cells won't work, your short range radios probably still will.
The MURS system allows civilian users to have a radio network that does not require any special certifications or licenses to get. There is little wonder to the fact that there are a lot of choices for radios.
Backdoor Survival has compiled this list of MURS radios in a variety of price ranges. and some things that are helpful when getting started in the world of radio communications.
There is no age limit to use the MURS system in any way. You are however limited to a transmitter power output of 2 watts. Anything above this is technically an FCC violation.
It is easy to put a radio away and forget about it until you really need it. Get out and use your radio a bit so that you are proficient in all its functions. This can be a lot of fun actually. Taking them on an overnight camping trip could make for a good practice adventure.


What is the news ticker feature?
The News Ticker allows for the integration of existing or new RSS feeds directly into a panel of the Standard Viewer. It is possible to setup and configure RSS feeds directly from the Publicator or grab existing RSS feeds from you website or other sources.
Note: This functionality is not available for the Verge Viewer at this time.
This allows you to easily push real-time corporate news, product updates or prices to your readers. In addition to news-like features, this module also allows you to integrate information from Social network sites like Facebook or information from microblog sites like Twitter.
In addition, all News feeds created in the Zmags Publicator can be used on other sites.
To create your own RSS feed, simply go to News Feed > Create News Feed. Give the feed a name, a URL link if necessary, and a description of the feed. Click Create.
- Feed: Select the feed you have created.
- Headline: What you write here will be displayed in the News Ticker.
- Link: You can link the Headline to an URL that will open when clicked upon.
- Text: What to display when the headline is moused over.
Repeat the Add Feed Entry process for each headline you would like to be displayed in the News Ticker. You can edit or delete headlines by clicking on the Feed Name, which will open the Feed Entries page. From there you can edit, move or delete headline entries.
- Feed Type allows you to choose between a custom RSS feed you have created using the Zmags Publicator, or an existing RSS feed.
- Feed URL is where you enter the URL of the RSS feed. It is important to click Validate Feed.
- Location determines where on your viewer the News ticker will appear.
- Headline transition allows you to set the transition effect of the headlines. Effects are: Scrolling, Curtain, Refocus, Fade in.
- Headline duration allows you to set how long each headline is shown. Please note that this only affects the Curtain, Refocus and Fade in transitions.
- Reload frequency determines how often the News ticker updates the RSS feed.
Click Done. The custom viewer now has the News Ticker feature.
Now you must assign the custom viewer to your publication. You do this via My Publications > Edit > Viewer. Select the custom viewer from the dropdown list, and click done. Your publication now has the viewer with the news ticker feature enabled.
The process is complete. When your publication is opened, the News Ticker will open automatically.
What RSS standards are supported?
Please note that the following RSS standards are supported.
All unsupported HTML tags will be removed from the News Feed. Images are not supported.


Compare prices for Seine river cruises in one easy search. Prices starting from $1,785 and book with agents who have been on river cruises.
The Seine River flows through France and into the English Channel between Le Havre and Honfleur. The second-longest river in France, a Seine River cruise will sail you through major cities including Paris, Troyes and Versailles. Along the way you'll see lush landscapes, vineyards, historic architecture, castles, orchards and medieval towns.
When the ship docks in port, you may be invited to venture out on an escorted tour to visit the home of Claude Monet in Giverny, and follow in the footsteps of Joan of Arc as you stroll along the streets of Rouen. Whether you're on an escorted tour or seeing the sites at your own pace, immerse yourself deep into the culture and history of beautiful Paris, where you'll find a wealth of traditional attractions mingled with undiscovered gems.
The typical duration of Seine River cruises ranges from seven to 14 days, although shorter and longer durations are available. For more information about Seine River cruising, call us toll free at 800-665-4981 and ask to speak with an agent who's sailed the Seine! Together you'll plan the ultimate European vacation aboard the luxurious river cruise ship.


I find myself on a path I wouldn't have chosen outright. I suffer from an incurable illness and as a result, I've had to find a different way of being in my body, and in the world. I live my life mostly in the extremes now, from one end to the other, with very little of it lived in that middle of the road place where life is ordinary. The hard things seem really hard, but the beauty and joy that come into my life, the love, that's exceptional too.
It's my hope that this blog will be a reflection of all I've lived and learned, and of everything I love.
Thank you Michelle. Love & Light.


Herbal supplements are an important aspect of healthcare throughout the whole world. In most countries herbal healthcare supplements are not regulated as extensively as conventional drug and treatment therapy. In most of the cases, herbal healthcare supplements are used in conjunction with other pharmaceutical drugs. Herbal healthcare products have been used as effective preventive as well as treatment for multiple health conditions. Herbal healthcare supplements have remained in practice pertinently both in the ancient and modern times as we can see. The potentiality of extracting chemical substances from herbal healthcare plants has been well used over the years.
Relevant medical expertise will be very helpful in determining whether you should take up the herbal healthcare supplements or not. Herbal healthcare supplements are in forms which suit everyone's needs all ranging from liquid nature, pill or even capsule form. The best thing about these herbal healthcare supplements is that they have a reduced rate of side effects. The natural nature of these herbal supplements fuel the close to zero resistance of intake of these products. Health conditions are diverse and some which are chronic have been effectively solved and completely eradicated by the use of herbal healthcare supplements.
The inexpensive and low cost nature of these products and supplements makes them affordable to every living and willing person. The expensive nature of pharmaceutical drugs and products make it uneasy and hard for you to procure them. Whether delivered to your doorstep or getting them direct from a physical store, the availability is unquestionable. It is important that for every conventional drugs that you obtain prescription from a licensed doctor or health specialist whereas for herbal healthcare supplements the need for prescription is not paramount.
Herbal healthcare supplements are by far much more productive and effective as in working in the body of the affected person. The feel that using these products leave you with is always an experience to reckon with.
It is true that you cannot know the advantage of herbal healthcare supplements if you have grown and been used to conventional methods of treatment, but what is also true is that you cannot dispute the fact that their importance and essentiality is immeasurable. Herbal healthcare products are favorably the best and need to be embraced by all of us as well as possibly passed on to our future generations.


text:
Jan Pješčak (ur. 10 lutego 1925 w Wielkim Lipniku, zm. 16 maja 2015 w Pradze) – czechosłowacki dziennikarz, wojskowy i polityk komunistyczny.

Życiorys
Urodził się w ukraińskiej rodzinie chłopskiej. W 1943 wstąpił do KPCz i związał się z ruchem oporu, za co w 1944 został aresztowany. Od 1945 pracował w rusińskich tygodnikach "Prjaševščyna" i "Nove žyttja" w Preszowie, w lutym 1948 został redaktorem ukraińskiej audycji radiowej w Bratysławie, 1949-1950 był osobistym sekretarzem rządowego pełnomocnika ds. przemysłu i handlu Słowacji. Od 1950 służył w czechosłowackiej armii, ukończył oficerski kurs prawa i od 1953 pracował w prokuraturze wojskowej, dosłużył się rangi głównego prokuratora wojskowego Pragi, w 1960 obronił pracę dyplomową i został asystentem katedry na Wydziale Prawa Uniwersytetu Karola w Pradze. W latach 1964–1966 był doradcą Wydziału Gospodarczo-Administracyjnego KC KPCz, potem dyrektorem Instytutu Kryminalistyki i kierownikiem katedry na Wydziale Prawa Uniwersytetu Karola w Pradze, otrzymał stopień adiunkta, pracował w Czechosłowackiej Akademii Nauk. Od 22 września 1969 do 28 stycznia 1971 był zastępcą federalnego ministra spraw wewnętrznych Czechosłowackiej Republiki Socjalistycznej ds. zarządzania organami administracyjnymi i służbowymi, a od 28 stycznia 1971 do 30 listopada 1982 zastępcą federalnego ministra spraw wewnętrznych Czechosłowackiej Republiki Socjalistycznej, jednocześnie 1974-1975 szefem Wyższej Szkoły KNB, później od 1 grudnia 1982 do maja 1986 ministrem sprawiedliwości, a od maja 1986 do 8 grudnia 1989 prokuratorem generalnym. W 1971 otrzymał stopień generała majora. Był odznaczony czechosłowackimi medalami i radzieckim Orderem Czerwonego Sztandaru.

Przypisy

Bibliografia
 http://shieldandsword.mozohin.ru/soyuznik/cz/personnel/pjescak_j.htm (ros.)

Czechosłowaccy komuniści
Czechosłowaccy ministrowie
Odznaczeni Orderem Czerwonego Sztandaru
Urodzeni w 1925
Zmarli w 2015
Ukraińcy pochodzenia rusińskiego

redpajama_set_name: RedPajamaWikipedia


Hard to believe, but Republicans once took the lead in environmental protection and conservation: Richard Nixon proposed the creation of the Environmental Protection Agency and signed the law establishing it in 1970. George Bush (#41) signed an important extension of the Clean Air Act in 1990 and made the U.S. a signatory to the international treaty that paved the way for the Kyoto Treaty on climate change. Theodore Roosevelt pioneered the creation of the country's national parks.
In an eye-opening essay in Environment magazine, two scholars examine the partisan divide on the leading environmental issue of the day, global warming. Sociologists Riley E. Dunlap of Oklahoma State University and Aaron M. McCright of Michigan State University trace this to the Reagan administration's calling environmental regulations a burden on the economy and to the anti-environmental bent of the Republicans who took control of Congress (led by Newt Gingrich) in 1994. But a partisan divide that was originally most apparent among "political elites, such as members of Congress, who tend to be more ideologically polarized than the general public," has now spread, the authors write. As recently as the mid-1990s Democratic voters supported increased spending on environmental protection at rates only 10 percent higher than self-identified Republicans, but that gap is now a chasm.
Does the press exaggerate the seriousness of global warming? 17% of Democrats say yes; 59% of Republicans do—a gap of 42 points.
Do most scientists who study climate change agree that it is empirically established? 75% of Dems say yes, compared to 54% of Republicans.
Is that warming natural or caused by human activities? 72% of Dems say it's the latter, but only 40% of Republicans do.
Will global warming pose a serious threat during our lifetime? 49% of Dems say yes, vs. 26% of Republicans.
Interestingly, John McCain has for years taken a position closer to the Democrats, sponsoring legislation (never passed) to control emissions of carbon dioxide. On this issue, write the authors, McCain's "positions are much closer to Obama's than they are to almost all of his Republican congressional colleagues. Both McCain and Obama support a mandatory cap on carbon emissions and a high percentage emissions reductions target by 2050 (though Obama's target is higher). . . . If McCain becomes the next U.S. president, his views on climate change may lead to a shift in the views of some Republicans, but probably not those who have bought into the staunch skepticism of current party elites." Unless, of course, he defers to his running mate's interesting views on climate (Sarah Palin does not believe the changes already underway are caused by human activities that add carbon dioxide to the atmosphere) and other scientific issues.


Welcome to our Community News for Te Anau and Manapouri. This page is updated frequently, and aims to give you relevant stories for residents and visitors, in the shortest amount of words, on issues pertinent to our communities and the conservation of this incredible place. We also facebook stories. Another great source of news is the free newspaper the Fiordland Advocate newspaper, available around town and printed on a Thursday. So pick it up and read it!
Te Anau Illumination is an event that is held every year to celebrate the date when lights first came on in 1958. People gather near the Ranch and all the lights in Te Anau will be turned off. After the count down the lights are turned back on. The celebration continues at The Distinction Te Anau hotel where there is food, live music and a Fire Show. Read all about it.
Fiordland Big 3 is a major hunting festival in Te Anau at the Rugby club. People from all around come to participate. There are three categories that people can win in such as heaviest fish, biggest deer and biggest possum. Read more about the Fiordland Big 3.
Freezing cold fundraiser for the year 6 camp to Dunedin. Read about the Polar Plunge.
Support the bid for ultra-fast broad band! Emails and letters of support must be sent before the end of June! Find out how to submit your support here.
Read this article out today on the news channel Stuff explaining the wonders of walking Fiordland's Hollyford Track. Then read about tramping in Fiordland.
Some aerial poisonings are not going ahead in 2014, others are underway and one is imminent. Read the latest in our story here.
The first section of a Te Anau to Manapouri cycle trail is expected to be constructed in 2015, reaching as far as Rainbow Reach. Read the story on Stuff, visit the Fiordland Trails facebook page and find out more about cycling around Te Anau.
A brilliant report explaining the enormous potential for cycling around Te Anau and Manapouri has been published. Go to the report by Venture Southland.
Once again, Te Anau is celebrating the winter by covering its town shops and restaurants in amazing sparkly lights, thanks to the efforts of hundreds of volunteer hours. It's a beautiful place to visit in the dark months, with often bright days - and definitely sparkly evenings.
A planned monorail through the heart of a world heritage forest near Te Anau, that would have destroyed thousands of trees, has been rejected at proposal stage by the Government's conservation minister after a campaign by Save Fiordland, a Te-Anau based organisation.
A Beethoven festival is happening in Te Anau next weekend! Don't miss it! For bookings and further information, contact Te Anau Lodge 03 249 7477.
A community shuttle bus is now available from Te Anau to Invercargill for medical appointments between 10am and 3pm, including hospital appointments, dentists and more. For more information, go to our medical page.
03/11/2013 Redcliff Cafe in top three restaurants in NZ!
The Redcliff Cafe is one of only three NZ restaurants to be rated by Trip Advisor in its Travellers' Awards. Find out more about this wonderful restaurant on our Fine Dining page.
A biplane regarded as a New Zealand 'national historic treasure' is now based in Te Anau for scenic flights over Fiordland. This historic plane is being offered for flights through Airscapade Affairs, which operates out of Te Anau Lodge. See our Planes page.
The University of Otago has been using special cameras to measure the bottle-nosed dolphins in Doubtful Sound and track their parenting techniques. The dolphins were found to be up to a whopping four metres in length. Read more from the Fiordland Marine Guardians.
Fiordland College kids have beaten off competition to reach the finals of the Get2Go competition, involving kayaking, biking and orienteering, and are heading to Great Barrier Island for the final stage. Read more in the Fiordland Advocate.
The New Zealand Symphony Orchester is coming to Te Anau for an evening of family favourites including Prokofiev's Peter and the Wolf. Find out more about the NZSO.
03/10/2013 Indian takeaways at long last!
After the closure a few years ago of an Indian restaurant in Te Anau, a new Indian takeaway, called SolGeo's is opening in the Mobil Petrol Station in the centre of Te Anau. Read more in the Fiordland Advocate.
Te Anau kids are to play in smoke free environments thanks to the Te Anau Community Board. Lions park playground and the skatepark will both have signs erected banning smoking. Read more in the Fiordland Advocate.


text:
The Weekend Millionaires: An Oral History documentary about the Thames Lightermen
Fri 1st Jan 2016
Wed 21 Sep - Wed 21 Sep 2016 (2016)
Watermen's Hall, 18 St Mary at Hill, London EC3R 8EF
The Thames was London's main transport hub and Watermen used to transfer passengers across London on the Thames and were as important to the capital as the underground is today. Lightermen transferred goods between ships and quays in the Port of London ensuring supplies reached the shore. To record their memories and stories, digital:works worked with children from St George The Martyr and Westminster Cathedral primary schools in London to make the film Tales from the Thames. The children went on a boat trip where they met the Thames Lightermen and Watermen to film and record the interviews.
This special film screening will take place at the historic Watermen's Hall followed by questions and answers with Thames Lightermen.
Presented by the Thames Estuary Partnership

redpajama_set_name: RedPajamaCommonCrawl


THOMAS DOUGLAS AITKEN worked in companies ARMORSTRUXX LIMITED, CAMLOCK ENGINEERING LIMITED, TACTRONICS GROUP EUROPE LIMITED, VELTIES LTD	as CONSULTANT, DIRECTOR, MANAGING DIRECTOR.
THOMAS DOUGLAS AITKEN was from 2010.03.09 to 2011.10.04 at ARMORSTRUXX LIMITED employed as Director (MANAGING DIRECTOR).
THOMAS DOUGLAS AITKEN was from 2010.05.14 to 2015.02.19 at CAMLOCK ENGINEERING LIMITED employed as Director.
THOMAS DOUGLAS AITKEN was from 2010.03.03 at TACTRONICS GROUP EUROPE LIMITED employed as Director (MANAGING DIRECTOR).
THOMAS DOUGLAS AITKEN was from 2014.02.27 to 2015.01.26 at VELTIES LTD employed as Director (CONSULTANT).
THOMAS DOUGLAS AITKEN Score for THOMAS DOUGLAS AITKEN is 4 stars.


text:
REID, John William
37th (1861–1863)
REID, John William, a Representative from Missouri; born near Lynchburg, Bedford County, Va., June 14, 1821; attended the common schools; moved to Missouri in 1840; taught school; studied law; was admitted to the bar and commenced practice in Jefferson City, Mo., in 1844; served as captain in the Mexican War; member of the State house of representatives 1854-1856; elected as a Democrat to the Thirty-seventh Congress (March 4, 1861-December 2, 1861); withdrew from the House of Representatives on August 3, 1861; expelled from the U.S. House of Representatives on December 2, 1861, for disloyalty to the Union; during the Civil War served in the Confederate army as volunteer aide to General Price; appointed a commissioner to adjust claims against the Confederate government; settled in Kansas City, Mo.; resumed the practice of his profession and engaged in banking; died at Lees Summit, Jackson County, Mo., November 22, 1881; interment in Elmwood Cemetery, Kansas City, Mo.
History, Art & Archives, U.S. House of Representatives, "REID, John William," https://history.house.gov/People/Listing/R/REID,-John-William-(R000149)/ (July 17, 2019)


New Smallville recap. It's the penultimate!
Bo'd To Tears -- Bo Duke returns from the grave, but the trip wasn't as far as it seems; it's just Professor SoFine in Bo drag, trying to get Clark to kill Papa Luthor. It's all building to a shocking conclusion that we've only seen coming since about 1980: Zod is coming! Hide your daughters!
It's a pretty busy week. Like David Blaine, I hope to come up for air before too long. Only I won't look like a defeated wet rat.
My newest (and probably last for a while) comic of "Pescados del Mar" has just been posted at actiongravy.com. Go check it out.
Also, Videogamey is doing a test-run thing with the E3 conference this week. Check out our temporary "Pligg" site to vote on and submit videogame-related stories this week.
"Space Monkeys" is coming back very, very soon. I'll keep you posted.


text:
package org.apache.dubbo.config.spring.samples;

import org.apache.dubbo.config.spring.api.DemoService;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Zookeeper Dubbo Spring Provider XML Bootstrap
 *
 * @since 2.7.8
 */
public class ZookeeperDubboSpringConsumerXmlBootstrap {

    public static void main(String[] args) throws Exception {
        String location = "classpath:/META-INF/service-introspection/zookeeper-dubbo-consumer.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(location);

        DemoService demoService = context.getBean("demoService", DemoService.class);

        for (int i = 0; i < 100; i++) {
            System.out.println(demoService.sayName("Hello"));
        }

        context.close();
    }
}


text:
Home Melange IIFL Home Finance Ltd. (IIFL HFL) in 2022 collaboration with Asian Development Bank (ADB)
IIFL Home Finance Ltd. (IIFL HFL) in 2022 collaboration with Asian Development Bank (ADB)
by PP News Team January 6, 2022
written by PP News Team January 6, 2022
IIFL launches 1st event from the flagship Kutumb series to promote green affordable housing in India
Mumbai: 6th January 2022: IIFL Home Finance Ltd. (IIFL HFL), in collaboration with Asian Development Bank (ADB), organised its flagship event Kutumb which is an initiative to promote Green Affordable Housing in India. The event took place at India Habitat Centre, New Delhi on December 14th, 2021 with the presence of Mr. S.K. Hota (MD, National Housing Bank) & Mr. Nirmal Jain (Founder & Chairman, IIFL Group) as chief guests. The event also had speakers from development finance institutions (DFIs) such as Asian Development Bank and Proparco (an arm of Agence Française de Développement Group (AFD Group).
Under the project 'Resilient & Green Affordable Housing for Economically Weaker Section (EWS) and Low-Income Group (LIG) categories in India', IIFLHFL, with the support of ADB, will be hosting series of it's flagship event 'Kutumb' at various locations across the country. The objective of Kutumb is to enable and support the green building ecosystem in the affordable housing sector in India. Kutumb, Delhi Chapter, titled 'Climate Resilient & Green Affordable Housing in India' focussed on affordable, low-carbon and resilient homes. The programme witnessed over 120 attendees, a mix of housing developers, financiers, subject matter experts and consultants.
Mr. Monu Ratra (ED and CEO, IIFLHFL) said, "The pandemic has brought in high consciousness towards green and sustainable construction amongst the developers, as well as the homebuyers. Also, considering buildings contribute around 35% of carbon emissions and with the vast majority of housing stock yet to be built in India, it is imperative to hold platforms such as Kutumb to build an ecosystem to foster green, sustainable and affordable housing in India."
Sharing her views, Ms. Susan Olsen, Senior Investment Specialist for South Asia, ADB said, "Building climate-resilient and sustainable communities begins by giving access to affordable and green homes, particularly for lower income groups that are highly vulnerable to climate change impacts. IIFL HFL is our partner in broadening the scope of green affordable housing in India."
The event witnessed discussions and deliberations between industry experts such as Priya Sunder (Senior Investment Officer, Asian Development Bank), Diane Jegam (Directrice Régionale PROPARCO Asie du Sud chez Proparco), nationally renowned architect Ashok B Lall (Principal Architect, Ashok B. Lall Architects), Mohua Mukherjee (Economist & Green Finance Professional, Independent Director, IIFL Home Finance Ltd.), Dr. Sejal Patel (Professor & Chair, Faculty of Planning, CEPT), Ravi Aggarwal (Co-founder & MD, Signature Global Group of Companies), and Saswat Bandyopadhyay (Project Director, CEPT). The event was conducted in a panel discussion format supported by presentations. The panels focused on subjects 'Sustainable Finance in Affordable Housing' and 'Importance of Climate Resilience in Affordable Housing' in India.
In the series of Kutumb, the next event is likely to be scheduled in Ahmedabad, in the first week of February, where IIFLHFL and ADB aim to bring together the affordable housing developers, planners, architects, consultants and potential homebuyers on one forum and address subjects relevant to green affordable housing in the area.
About IIFL Home Finance Limited:
Incorporated in 2006 and registered in 2009 with the National Housing Bank (NHB), IIFL Home Finance Limited is a wholly-owned subsidiary of IIFL Finance Limited. The Company is one of India's leading housing finance companies and is a preferred choice for affordable home loan requirements. Through our affordable home loans, IIFL Home Finance makes people's aspirations of owning a home a reality. As a technology-driven housing finance player, we endeavour to make our customer experience as seamless as possible. We have made the entire life cycle of our housing loans i.e., from origination to closure, completely digitized. We have managed this through our state-of-the-art IT infrastructure which has helped in reducing costs, enabled real-time analysis of customer data, and improved our control and underwriting functions, while increasing customer reach and distribution capability.
We operate a financially inclusive customer-centric lending business and strive to ensure that our business model contributes significantly to the upliftment of the EWS and LIG segments. As of March 31, 2021, 74.90% of our live accounts were from customers who belonged to the EWS and LIG segment. Through the provision of loans for the purchase of homes to a customer segment that is not serviced by the mainstream financial services sector and our employment of personnel in rural and semi-urban locations across India, we are fulfilling an important social objective of economic upliftment for these segments of the Indian economy.
We offer our customers a range of mortgage-related loan products, these include (i) housing loans, for purchase of ready built residential units, under-construction property by approved builders, self-construction, home improvement on pre-owned property, and purchase of land for construction of residential property; (ii) secured business loans, for primarily meeting working capital requirement, business use and purchase of commercial property; and (iii) affordable housing project loans, to meet construction expenses of affordable housing projects of reputed developers.
This article was shared to Prittle Prattle News as a Press Release.
PR Newswireprittle prattle newsPrittlePrattle
PP News Team
Covid-19 Update: Mumbai residents can contact ward-war rooms in their local locations for Covid-19 beds and ambulances; find hotline numbers here
Give Your Home a Makeover with TCL Smart TVs during Flipkart Republic Day Sale
AMO Electric Bikes plans to increase more than 200 channel partners to its network...
PHD Chamber appreciates the Hon'ble Prime Minister's aspirational Speech at World Economic Forum's in 2022
EV Conversion Kit major GoGoA1 expands footprint, adds 50+ franchises across India
Approaching the stock market from a beginner's lens


Bathroom : Kitchen Flooring Cheap Wall Tiles Kitchen Floor Tiles Big Bathroom Wall Tiles. Tile Bathroom Wall. Shower Tile Designs. Cheap Bathroom Tiles. Mosaic Bathroom Tiles.
By BiSmiLlahmyriadlit. Bathroom. At Wednesday, October 10th 2018, 02:33:53 AM.


text:
Zeno Group Acquires 3 Monkeys Communications
By Zeno Group
Mid-Sized Global Challenger Adds Significant Scale to Further Accelerate Growth and Capabilities
Zeno Group, the global integrated communications agency, today announced that it has acquired 3 Monkeys Communications, one of the UK's leading independent communications consultancies. The acquisition positions Zeno as a uniquely mid-sized global, independent agency, and enables 3 Monkeys to export its special brand of award-winning communications work around the world.
During the last 12 years, 3 Monkeys has developed a leading reputation in the UK and Europe for game-changing work across consumer, corporate and b2b communications for an impressive range of brands for a diverse range of sectors including healthcare, financial services, FMCG and technology. The agency has carried out award-winning-creative and commercially-astute campaigns for some of the world's largest companies including Anheuser-Busch, Castrol, Lenovo, Microsoft, Morrisons, Standard Life, Starbucks, TGI Fridays and United Biscuits.
Similarly, Zeno has experienced stellar growth over recent years. Part of Daniel J Edelman (DJE) Holdings, Zeno expanded globally in 2012 with the UK as its European hub. Zeno Asia, also launched in 2012, now numbers eight offices and has been recognized for its leading-edge digital and integrated communications work. Around the world, Zeno represents major brands and organizations including Anheuser-Busch, Bausch + Lomb, CA Technologies, Intel, Merck, Netflix, Quaker and TGI Fridays.
In the UK, the newly-combined entity will number around 75 people and will be known as 3 Monkeys | Zeno. 3 Monkeys founder Angie Moxham becomes Chief Monkey, Zeno Europe. Christine Jewell, Managing Director 3 Monkeys | Zeno, will run the day-to-day UK operations. Steve Earl will work with both as Managing Director, Zeno Europe.
"The acquisition of 3 Monkeys is a major step forward for Zeno as we continue to realize our global ambitions. We are scaling our unique Zeno brand and values so that we can serve clients where they need us, regionally and globally. We are big enough to take on the most challenging and complex assignments in the Americas, Asia and Europe, while still giving that personalized, senior-level attention and highly-collaborative approach that clients rely on," said Barby K. Siegel, CEO, Zeno Group.
"With 3 Monkeys | Zeno, we now have a more powerful platform from which to grow in Europe and beyond. Cultural fit was of paramount importance to Angie and to me. The similarities in our approach and business philosophy are uncanny. Together we will be a formidable and fearless communications force," Siegel added.
Angie Moxham, 3 Monkeys founder and Chief Monkey, Zeno Europe, said: "This is massive news for us. The board and I believe it's the best next chapter for the company, all us Monkeys and for our clients. We have been looking at how we globalize 3 Monkeys for a few years now, in response to client demand, including us going on the acquisition trail. No route, however, could come close to the capabilities and bandwidth we gain on day one by joining forces with Zeno. We can now support current and future clients with our special monkey magic around the world, with people who think and behave in the same way as us. Importantly, we also remain independent."
Richard Edelman, chairman, DJE Holdings commented: "We have grown Zeno from a small sister agency in the US to a global, highly respected mid-sized firm, approaching 400 people and nearly $60 million in annual revenues. Around a third of Zeno's revenue is now derived from outside the US. This combination with the additional brilliance of 3 Monkeys accelerates the global expansion of Zeno, which is already delivering game-changing, award-winning work for clients. Bottom line: these are two companies that were meant to be together. I join Barby in welcoming Angie and all the 3 Monkeys team to the Zeno family."
The acquisition is effective immediately. Zeno's UK team will move into the current 3 Monkeys premises in Soho, London, this week.
About Zeno Group
Zeno Group is a global, integrated communications agency, born from PR. The award-winning agency is committed to work that delivers true business value for clients across consumer, corporate, health and technology industries. Zeno is the unprecedented three-time PRWeek US Mid-Size Agency of the Year winner (2011 – 2013), winner of PRWeek Malaysia New Consultancy of the Year (2015), recipient of the SABRE Silver Anvil (2015) and most recently recognized at PR Cannes Lions (2015). Zeno Group is a DJE Holdings Company. Please visit us at https://zenogroup.com/, or find us on LinkedIn, Twitter or Facebook.
About 3 Monkeys Communications
3 Monkeys Communications specializes in end to end communications. We are brand and reputation guardians and fixers. We work with some of the world's best known brands – Microsoft, Coca-Cola Enterprises, AB inBev, Starbucks, Castrol and Standard Life – and much loved UK brands including Morrisons and BT. www.3-monkeys.co.uk


text:
<?php

require_once 'system/model/database.php';
require_once 'system/model/translate.php';
require_once 'system/model/whitelist.php';
require_once 'system/model/sendMail.php';
require_once 'system/model/excelWrite.php';
require_once 'system/controller/session.php';

class cModel
{
	private $database = null;
	private $translate = null;
	public $whitelist = null;
	private $errorhandle = null;
	//private $current_id = null;
	private $nwish = null;
	private $skills = null;
	private $admin = null;
	private $inSession = null;
	private $session = null;
	private $stage = 0;
	private $assistent;
	//private $current_name = null;
	//private $current_email = null;
	//private $connected = null;

	function __construct($errorhandle)
	{
		$this->errorhandle = $errorhandle;
		$this->database = new cDatabase();
		$this->translate = new cTranslate();
		$this->whitelist = new cWhiteList();
		$this->inSession = false;
		$this->current_id = -1;
		$this->nwish = 2;
		$this->admin = 0;
		$this->stage = 0;
		$this->assistent = 0;
		// TODO: $this->skills;
	}

	public function setConfig($nwish, $skills, $admin, $stage, $assistent)
	{
		$this->nwish = $nwish;
		$this->skills =  $skills;
		$this->admin = $admin;
		$this->stage = $stage;
		$this->assistent = $assistent;
	}

	function joinSession($session)
	{
		if(!$this->inSession)
		{
			if(!$session)
			{
				$this->session = new cSession();
				$this->session->start();
				$this->inSession = true;
			}
			else
			{
				$this->session = $session;
				$this->inSession = true;
			}
		}
	}

	public function getNWish()
	{
		return $this->nwish;
	}

	public function getRole()
	{
		return $this->session->getRole();
	}

	public function getTeacherId()
	{
		if($this->inSession)
		{
			if($this->session->getRole() >= 1)
			{
				return $this->session->getCurrentId();
			}
			return false;
		}
		return false;
	}

	public function getStudentId()
	{
		if($this->inSession)
		{
			if($this->session->getRole() == 0)
			{
				return $this->session->getCurrentId();
			}
			return false;
		}
		return false;
	}

	public function getTeacherProperties($email, $pw)
	{
		$email = $this->whitelist->validateEmail($email);
		// INFO Passwort gets hashed... No need to validate

		// TODO return specific error codes here
		if(!$email) return false;
		if(!$pw) return false;

		return $this->database->getTeacher($email, $pw, $this->admin);
	}

	public function startQuery($type,$id)
	{
		$this->database->startQuery($type,$id);
	}

	public function getRow()
	{
		return $this->database->getRow();
	}

	public function processAdminPost($post)
	{

		if(isset($post['update_voting_table']))
		{
			$table = isset($post['voting_table']) ? $post['voting_table'] : false;

			if (!$table) return false;

			if(isset($post['voting_finished']) && ($this->stage == 5 or $this->stage == 6))
			{
				$err = $this->updateVotingTable($table);

				if(!$err)
				{
					//create csv
					$this->saveVotingTable();
					// TODO send mail
					$mail = new cSendMail();
					$mail->sendToAssistent($this->assistent);

					// Next stage
					if($this->stage == 5)
					{
						$this->changeConfig("next_stage",1);
					}
				}
			}
			else
			{
				return $this->updateVotingTable($table);
			}

		}

		if(isset($post['next_stage']))
		{
			return $this->changeConfig("next_stage",0);
		}

		if(isset($post['to_voting_stage']))
		{
			return $this->changeConfig("next_stage",1);
		}

		if(isset($post['cancel_system']))
		{
			return $this->changeConfig("cancel_system",0);
		}

		if(isset($post['create_new_teacher']))
		{
			$name = isset($post['new_teacher_name']) ? $post['new_teacher_name'] : false;
			$mail = isset($post['new_teacher_mail']) ? $post['new_teacher_mail'] : false;
			$pw = isset($post['new_teacher_pw']) ? $post['new_teacher_pw'] : false;

			// TODO return specific error codes here
			if(!$name or !$mail or !$pw)
			{
				$this->errorhandle->errFormNewTeacher($name,$mail,$pw,false);
				return true;
			}

			return $this->createNewTeacher($name,$mail,$pw);
		}

		if(isset($post['edit_teacher']))
		{
			$id = isset($post['teacher_id']) ? $post['teacher_id'] : false;
			$name = isset($post['edit_teacher_name']) ? $post['edit_teacher_name'] : false;
			$mail = isset($post['edit_teacher_mail']) ? $post['edit_teacher_mail'] : false;

			if(!$id or !$name or !$mail)
			{
				$this->errorhandle->errFormEditTeacher($id,$name,$mail,false);

				if($id == $this->session->getCurrentId())
				{
					$this->errorhandle->resetPage("data",fale,false);
				}
				return true;
			}

			return $this->updateTeacher($id, $name, $mail);
		}

		if(isset($post['edit_teacher_pw']))
		{
			$id = isset($post['teacher_id']) ? $post['teacher_id'] : false;
			$pw1 = isset($post['edit_teacher_pw_1']) ? $post['edit_teacher_pw_1'] : false;
			$pw2 = isset($post['edit_teacher_pw_2']) ? $post['edit_teacher_pw_2'] : false;

			if(!$id or !$pw1 or !$pw2)
			{
				$this->errorhandle->errFormEditTeacherPw($id,false);
				if($id == $this->session->getCurrentId())
				{
					$this->errorhandle->resetPage("data",false,false);
				}
				return true;
			}

			return $this->updateTeacherPw($id, $pw1, $pw2);
		}

		if(isset($post['delete_teacher']) && $this->stage == 1)
		{
			$del = isset($post['teacher_to_delete']) ? $post['teacher_to_delete'] : false;

			if(!$del)
			{
				$this->errorhandle->errBadId("teacher");
				return true;
			}
			return $this->deleteTeacher($del);
		}

		if(isset($post['create_new_project']))
		{
			$titel = isset($post['project_titel']) ? $post['project_titel'] : false;
			$keywords = isset($post['project_keywords']) ? $post['project_keywords'] : false;
			$abstract = isset($post['project_abstract']) ? $post['project_abstract'] : false;
			$description = isset($post['project_description']) ? $post['project_description'] : false;
			$degree = isset($post['wanted_grade']) ? $post['wanted_grade'] : false;
			$skills = isset($post['wanted_skills']) ? $post['wanted_skills'] : false;
			$teacher_id = $this->inSession ? $this->session->getCurrentId() : false; //isset($_SESSION['current_id']) ? $_SESSION['current_id'] : false;

			// TODO emergency logout here!!
			if(!$teacher_id or !$titel or !$keywords or !$abstract or !$description or !$degree or !$skills)
			{
				$this->errorhandle->errFormNewProject($teacher_id,$titel,$keywords,$abstract,$description,$degree,$skills);
				return true;
			}

			return $this->createNewProject($titel, $keywords, $abstract, $description, $degree, $skills, $teacher_id);
		}

		if(isset($post['delete_project']) && $this->stage == 1)
		{
			$del = isset($post['project_to_delete']) ? $post['project_to_delete'] : false;

			if(!$del)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			return $this->deleteProject($del);
		}

		if(isset($post['edit_project']))
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$titel = isset($post['project_titel']) ? $post['project_titel'] : false;
			$keywords = isset($post['project_keywords']) ? $post['project_keywords'] : false;
			$abstract = isset($post['project_abstract']) ? $post['project_abstract'] : false;
			$description = isset($post['project_description']) ? $post['project_description'] : false;
			$degree = isset($post['wanted_grade']) ? $post['wanted_grade'] : false;
			$skills = isset($post['wanted_skills']) ? $post['wanted_skills'] : false;

			if(!$id or !$titel or !$keywords or !$abstract or !$description or !$degree or !$skills)
			{
				$this->errorhandle->errFormEditProject($id,$titel,$keywords,$abstract,$description,$degree,$skills);
				return true;
			}

			return $this->editProject($id, $titel, $keywords, $abstract, $description, $degree, $skills);
		}

		if(isset($post['project_remove_teacher']))
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$remove = isset($post['teacher_to_remove']) ? $post['teacher_to_remove'] : false;

			if(!$id or !$remove)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			return $this->projectRemoveTeacher($id, $remove);
		}

		if(isset($post['project_add_teacher']))
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$add = isset($post['teacher_to_add']) ? $post['teacher_to_add'] : false;

			if(!$id or !$add)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			return $this->projectAddTeacher($id, $add);
		}

		if(isset($post['add_new_student']))
		{
			$name = isset($post['new_student_name']) ? $post['new_student_name'] : false;
			$matr = isset($post['new_student_matr']) ? $post['new_student_matr'] : false;
			$email = isset($post['new_student_email']) ? $post['new_student_email'] : false;
			$field = isset($post['new_student_field']) ? $post['new_student_field'] : false;
			$grade = isset($post['new_student_grade']) ? $post['new_student_grade'] : false;
			$skills = isset($post['new_student_skills']) ? $post['new_student_skills'] : false;

			if(!$name or !$matr or !$email or !$field or !$grade or !$skills)
			{
				$this->errorhandle->errFormNewStudent($name,$matr,$email,$field,$grade,$skills,false);
				return true;
			}

			return $this->createNewStudent($name, $email, $field, $matr, $grade, $skills);
		}

		if(isset($post['edit_student']))
		{
			$student_id = isset($post['student_id']) ? $post['student_id'] : false;
			$name = isset($post['edit_student_name']) ? $post['edit_student_name'] : false;
			$matr = isset($post['edit_student_matr']) ? $post['edit_student_matr'] : false;
			$email = isset($post['edit_student_email']) ? $post['edit_student_email'] : false;
			$field = isset($post['edit_student_field']) ? $post['edit_student_field'] : false;
			$grade = isset($post['edit_student_grade']) ? $post['edit_student_grade'] : false;
			$skills = isset($post['edit_student_skills']) ? $post['edit_student_skills'] : false;

			if(!$student_id or !$name or !$matr or !$email or !$field or !$grade)
			{
				$this->errorhandle->errFormEditStudent($student_id,$name,$matr,$email,$field,$grade,$skills,false);
				return true;
			}

			return $this->updateStudent($student_id, $name, $email, $field, $matr, $grade, $skills);
		}

		if(isset($post['student_save_interests']))
		{
			$student_id = isset($post['student_id']) ? $post['student_id'] : false;
			$interest1 = isset($post['first_wish']) ? $post['first_wish'] : false;
			$interest2 = isset($post['second_wish']) ? $post['second_wish'] : false;
			$interest3 = isset($post['third_wish']) ? $post['third_wish'] : false;

			if(!$student_id)
			{
				$this->errorhandle->errBadId("student");
				return true;
			}

			// INFO there must be at least one change ->this is not an error just nothing todo
			if(!$interest1 and !$interest2  and !$interest3) return false;

			return $this->updateStudentInterests($student_id, $interest1, $interest2, $interest3);
		}

		if(isset($post['student_toggle_active']))
		{
			$student_id = isset($post['student_to_toggle']) ? $post['student_to_toggle'] : false;

			if(!$student_id)
			{
				$this->errorhandle->errBadId("student");
				return true;
			}

			return $this->studentToggleActive($student_id,2);
		}

		if(isset($post['delete_student']))
		{
			$student_id = isset($post['student_to_delete']) ? $post['student_to_delete'] : false;

			if(!$student_id)
			{
				$this->errorhandle->errBadId("student");
				return true;
			}

			return $this->deleteStudent($student_id);

		}

		if(isset($post['delete_all_deactive']))
		{
			return $this->database->deleteAllDeactive();
		}

		if(isset($post['change_assistent_email']) && $this->stage == 1)
		{
			$email = isset($post['assistent_email']) ? $post['assistent_email'] : false;

			if(!$email)
			{
				$this->errorhandle->errBadSetting("email");
				return true;
			}

			$email = $this->whitelist->validateEmail($email);

			if(!$email)
			{
				$this->errorhandle->errBadSetting("email");
				return true;
			}

			return $this->changeConfig("assistent",$email);
		}

		if(isset($post['set_new_deadline']) && $this->stage == 1)
		{
			$deadline = isset($post['deadline']) ? $post['deadline'] : false;

			if(!$deadline)
			{
				$this->errorhandle->errBadSetting("deadline");
				return true;
			}

			$deadline = $this->whitelist->validateDeadline($deadline);

			if(!$deadline)
			{
				$this->errorhandle->errBadSetting("deadline");
				return true;
			}

			return $this->changeConfig("deadline",$deadline);
		}

		if(isset($post['delete_skills']) && $this->stage == 1)
		{
			$skill_array = isset($post['skills_to_delete']) ? $post['skills_to_delete'] : false;

			if(!$skill_array)
			{
				$this->errorhandle->errBadSetting("skills");
				return true;
			}

			$skill_array = $this->whitelist->validateSkills($skill_array);

			if(!$skill_array)
			{
				$this->errorhandle->errBadSetting("skills");
				return true;
			}

			return $this->changeConfig("delete_skills",$skill_array);
		}

		if(isset($post['add_new_skill']) && $this->stage == 1)
		{
			$new_skill = isset($post['new_skill']) ? $post['new_skill'] : false;

			if(!$new_skill)
			{
				$this->errorhandle->errBadSetting("skills");
				return true;
			}

			$new_skill = $this->whitelist->validateText($new_skill, 100);

			if(!$new_skill)
			{
				$this->errorhandle->errBadSetting("skills");
				return true;
			}

			return $this->changeConfig("add_skills",$new_skill);
		}

		if(isset($post['set_num_wishes']) && $this->stage == 1)
		{
			$nwishes = isset($post['num_of_wishes']) ? $post['num_of_wishes'] : false;

			if(!$nwishes)
			{
				$this->errorhandle->errBadSetting("nwishes");
				return true;
			}

			$nwishes = $this->whitelist->validateNWishes($nwishes);

			if(!$nwishes)
			{
				$this->errorhandle->errBadSetting("nwishes");
				return true;
			}

			return $this->changeConfig("change_num_wishes",$nwishes);
		}

	}

	public function processTeacherPost($post)
	{
		if(isset($post['create_new_project']))
		{
			$titel = isset($post['project_titel']) ? $post['project_titel'] : false;
			$keywords = isset($post['project_keywords']) ? $post['project_keywords'] : false;
			$abstract = isset($post['project_abstract']) ? $post['project_abstract'] : false;
			$description = isset($post['project_description']) ? $post['project_description'] : false;
			$degree = isset($post['wanted_grade']) ? $post['wanted_grade'] : false;
			$skills = isset($post['wanted_skills']) ? $post['wanted_skills'] : false;
			$teacher_id = $this->inSession ? $this->session->getCurrentId() : false; //isset($_SESSION['current_id']) ? $_SESSION['current_id'] : false;

			// TODO emergency logout here!!
			if(!$teacher_id or !$titel or !$keywords or !$abstract or !$description or !$degree or !$skills)
			{
				$this->errorhandle->errFormNewProject($teacher_id,$titel,$keywords,$abstract,$description,$degree,$skills);
				return true;
			}

			return $this->createNewProject($titel, $keywords, $abstract, $description, $degree, $skills, $teacher_id);
		}

		if(isset($post['delete_project']) && $this->stage == 1)
		{
			$del = isset($post['project_to_delete']) ? $post['project_to_delete'] : false;

			if(!$del)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			// TODO authentification here!!
			return $this->deleteProject($del);
		}

		if(isset($post['edit_project']) && $this->stage == 1)
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$titel = isset($post['project_titel']) ? $post['project_titel'] : false;
			$keywords = isset($post['project_keywords']) ? $post['project_keywords'] : false;
			$abstract = isset($post['project_abstract']) ? $post['project_abstract'] : false;
			$description = isset($post['project_description']) ? $post['project_description'] : false;
			$degree = isset($post['wanted_grade']) ? $post['wanted_grade'] : false;
			$skills = isset($post['wanted_skills']) ? $post['wanted_skills'] : false;

			// TODO special skills and degree handle here
			if(!$id or !$titel or !$keywords or !$abstract or !$description or !$degree or !$skills)
			{
				$this->errorhandle->errFormEditProject($id,$titel,$keywords,$abstract,$description,$degree,$skills);
				return true;
			}

			return $this->editProject($id, $titel, $keywords, $abstract, $description, $degree, $skills);
		}

		if(isset($post['project_add_teacher']) && $this->stage == 1)
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$add = isset($post['teacher_to_add']) ? $post['teacher_to_add'] : false;

			if(!$id or !$add)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			return $this->projectAddTeacher($id, $add);
		}

		if(isset($post['project_remove_me']) && $this->stage == 1)
		{
			$id = isset($post['project_id']) ? $post['project_id'] : false;
			$remove = $this->inSession ? $this->session->getCurrentId() : false; //isset($_SESSION['current_id']) ? $_SESSION['current_id'] : false;

			// TODO emergency logout here!!
			if(!$id or !$remove)
			{
				$this->errorhandle->errBadId("project");
				return true;
			}

			return $this->projectRemoveTeacher($id, array($remove));
		}

		// TODO authentification here!!
		if(isset($post['edit_teacher']))
		{
			$id = isset($post['teacher_id']) ? $post['teacher_id'] : false;
			$name = isset($post['edit_teacher_name']) ? $post['edit_teacher_name'] : false;
			$mail = isset($post['edit_teacher_mail']) ? $post['edit_teacher_mail'] : false;

			if(!$id or !$name or !$mail)
			{
				$this->errorhandle->errFormEditTeacher($id,$name,$mail,false);
				return true;
			}

			return $this->updateTeacher($id, $name, $mail);
		}

		// TODO authentification here!!
		if(isset($post['edit_teacher_pw']))
		{
			$id = isset($post['teacher_id']) ? $post['teacher_id'] : false;
			$pw1 = isset($post['edit_teacher_pw_1']) ? $post['edit_teacher_pw_1'] : false;
			$pw2 = isset($post['edit_teacher_pw_2']) ? $post['edit_teacher_pw_2'] : false;

			if(!$id or !$pw1 or !$pw2)
			{
				$this->errorhandle->errFormEditTeacherPw($id,false);
				return true;
			}

			return $this->updateTeacherPw($id, $pw1, $pw2);
		}

	}

	public function processStudentPost($post)
	{
		if((isset($post['student_save_interests']) or isset($post['student_vote'])) && ($this->stage == 2 or $this->stage == 3 or $this->stage == 4))
		{
			$student_id = $this->inSession ? $this->session->getCurrentId() : false; //isset($_SESSION['student_id']) ? $_SESSION['student_id'] : false;
			$interest1 = isset($post['first_wish']) ? $post['first_wish'] : false;
			$interest2 = isset($post['second_wish']) ? $post['second_wish'] : false;
			$interest3 = isset($post['third_wish']) ? $post['third_wish'] : false;

			// TODO emergency logout here!
			if(!$student_id)
			{
				$this->errorhandle->errBadId("student");
				return true;
			}

			// INFO there must be at least one change ->this is not an error just nothing todo
			if(!$interest1 and !$interest2  and !$interest3) return false;

			return $this->updateStudentInterests($student_id, $interest1, $interest2, $interest3);
		}

		if(isset($post['student_delete_me']))
		{
			$student_id = $this->inSession ? $this->session->getCurrentId() : false; //isset($_SESSION['student_id']) ? $_SESSION['student_id'] : false;

			// TODO Emergency logout here
			if(!$student_id)
			{
				return true;
			}

			$this->deleteStudent($student_id);

			// TODO use secure function here!
			$this->session->destroy(); //session_destroy();
			header('Location: index.php?signout=1');

			return false;
		}

		return false;
	}

	public function createNewTeacher($name, $email, $pw)
	{
		$name = $this->whitelist->validateName($name);
		$email = $this->whitelist->validateEmail($email);
		$hash = $this->whitelist->validateAndHashPassword($pw);
		// TODO return specific error codes here
		if(!$name or !$email or !$hash)
		{
			$this->errorhandle->errFormNewTeacher($name,$email,0,false);
			return true;
		}

		$err = $this->database->createNewTeacher($name, $email, $hash);

		if($err)
		{
			$this->errorhandle->errFormNewTeacher($name,$email,0,true);
			return true;
		}
		return false;
	}

	public function deleteTeacher($teacher_id)
	{
		$teacher_id= $this->whitelist->validateId($teacher_id);

		// TODO return specific error codes here
		if(!$teacher_id)
		{
			$this->errorhandle->errBadId("teacher");
			return true;
		}

		return $this->database->deleteTeacher($teacher_id);
	}

	public function getTeacherById($teacher_id)
	{
		$teacher_id = $this->whitelist->validateId($teacher_id);

		// TODO return specific error codes here
		if(!$teacher_id) return false;

		return $this->database->getTeacherById($teacher_id);
	}

	public function updateTeacher($teacher_id, $name, $email)
	{
		$teacher_id = $this->whitelist->validateId($teacher_id);
		$name = $this->whitelist->validateName($name);
		$email = $this->whitelist->validateEmail($email);

		// TODO return specific error codes here
		if(!$teacher_id or !$name or !$email)
		{
			$this->errorhandle->errFormEditTeacher($teacher_id,$name,$email,false);
			if($teacher_id == $this->session->getCurrentId())
			{
				$this->errorhandle->resetPage("data",false,false);
			}
			return true;
		}

		$err = $this->database->updateTeacher($teacher_id, $name, $email);

		if($err)
		{
			$this->errorhandle->errFormEditTeacher($teacher_id,$name,$email,true);
			if($teacher_id == $this->session->getCurrentId())
			{
				$this->errorhandle->resetPage("data",false,false);
			}
			return true;
		}
		return false;
	}

	public function updateTeacherPw($teacher_id, $pw1, $pw2)
	{
		$teacher_id = $this->whitelist->validateId($teacher_id);

		if (strcmp($pw1,$pw2) !== 0)
		{
			$this->errorhandle->errFormEditTeacherPw($teacher_id,true);
			if($teacher_id == $this->session->getCurrentId())
			{
				$this->errorhandle->resetPage("data",false,false);
			}
			return true;
		}

		$hash =  $this->whitelist->validateAndHashPassword($pw1);

		if(!$hash)
		{
			$this->errorhandle->errFormEditTeacherPw($teacher_id,false);
			if($teacher_id == $this->session->getCurrentId())
			{
				$this->errorhandle->resetPage("data",false,false);
			}
			return true;
		}

		$err = $this->database->updateTeacherPw($teacher_id, $hash);

		if($err)
		{
			$this->errorhandle->errFormEditTeacherPw($teacher_id,false);
			if($teacher_id == $this->session->getCurrentId())
			{
				$this->errorhandle->resetPage("data",false,false);
			}
			return true;
		}
		return false;
	}

	public function getTeacherProjects($teacher_id)
	{
		$teacher_id = $this->whitelist->validateId($teacher_id);

		// TODO return specific error codes here
		if(!$teacher_id) return false;

		return $this->database->getTeacherProjects($teacher_id);
	}

	public function getTeacherByProject($project_id)
	{
		$project_id = $this->whitelist->validateId($project_id);

		// TODO return specific error codes here
		if(!$project_id) return false;

		return $this->database->getTeacherByProject($project_id);
	}

	public function getStudentsByProject($project_id,$wish)
	{
		if(!$project_id) return false;
		if(!$wish) return false;

		return $this->database->getStudentsByProject($project_id,$wish);
	}

	public function getStudentsAndMatrByProject($project_id)
	{
		if(!$project_id) return false;

		return $this->database->getStudentsAndMatrByProject($project_id);
	}

	public function deleteProject($project_id)
	{
		$project_id = $this->whitelist->validateId($project_id);

		if(!$project_id)
		{
			$this->errorhandle->errBadId("teacher");
			return true;
		}

		$err = $this->database->deleteProject($project_id);

		if($err)
		{
			$this->errorhandle->errBadId("teacher");
			return true;
		}
		return false;
	}

	public function updateVotingTable($table)
	{
		// TODO validate
		$array = json_decode($table);

		/*
		$length = sizeof($table);
		for ($i=0; $i < $length ; $i++)
		{
			$checked = $this->whitelist->validateId($table[i]);
			if(!$checked) return true;
		}

		$table = $this->translate->Array2Table($table);
		*/

		$this->database->updateVotingTable($array);
		if(!$table) return true;

		return false;

	}

	public function saveVotingTable()
	{
		$writer = new cExcelWrite();
		$writer->open("tmp/Assignment.xls");

		$this->startQuery('projects',0);
		while($row = $this->getRow())
		{
			$rTitle = $row["titel"];
			$students = $this->getStudentsAndMatrByProject($row["project_id"]);
			$teacher = $this->getTeacherByProject($row["order_id"]);

			$nStudents = sizeof($students[0]);
			$nTeacher = sizeof($teacher[0]);

			$max = max($nStudents,$nTeacher);
			for ($i=0; $i < $max; $i++)
			{
				$rTeacher = "";
				$rStudent = "";
				$rMatr = "";

				if($i < $nTeacher)
				{
					$rTeacher = $teacher[0][$i];
				}

				if($i < $nStudents)
				{
					$rStudent = $students[0][$i];
					$rMatr = $students[1][$i];
				}

				$writer->writeRow($rTitle, $rTeacher, $rStudent, $rMatr);

				$rTitle = "";
			}
			$writer->writeEmptyRow();
		}
		$writer->close();
		return false;
	}

	public function getDegreeById($id)
	{
		$id = $this->whitelist->validateId($id);

		// TODO return specific error codes here
		if(!$id) return false;

		return $this->translate->num2degree($id);
	}

	public function getSkillsById($id)
	{
		// TODO Error handling maybe in translate class
		return $this->translate->id2skillStr($id, $this->skills);
	}

	public function createNewStudent($name, $email, $field, $matr, $grade, $skills)
	{

		$grade = $this->translate->degree2num($grade);

		$name = $this->whitelist->validateName($name);
		$email = $this->whitelist->validateEmail($email);
		$field = $this->whitelist->validateStudyfield($field);
		$matr = $this->whitelist->validateMatrNr($matr);
		$grade = $this->whitelist->validateGrade($grade);
		$skills = $this->whitelist->validateSkills($skills);

		$skills = $this->translate->skills2str($skills);

		if(!$name or !$matr or !$email or !$field or !$grade or !$skills)
		{
			$this->errorhandle->errFormNewStudent($name,$matr,$email,$field,$grade,$skills,false);
			return true;
		}

		$crypt = $this->whitelist->getRandomId();

		$err = $this->database->insertNewStudent($name, $email, $field, $matr, $grade, $skills, $crypt);

		if($err)
		{
			$this->errorhandle->errFormNewStudent($name,$matr,$email,$field,$grade,$skills,true);
			return true;
		}

		$mail = new cSendMail;
		$mail->sendToStudent($email,$crypt);

		return false;
	}

	public function updateStudent($student_id, $name, $email, $field, $matr, $grade, $skills)
	{
		$grade = $this->translate->degree2num(array($grade));

		$student_id = $this->whitelist->validateId($student_id);
		$name = $this->whitelist->validateName($name);
		$email = $this->whitelist->validateEmail($email);
		$field = $this->whitelist->validateStudyfield($field);
		$matr = $this->whitelist->validateMatrNr($matr);
		$grade = $this->whitelist->validateGrade($grade);
		$skills = $this->whitelist->validateSkills($skills);

		$skills = $this->translate->skills2str($skills);

		if(!$student_id or !$name or !$matr or !$email or !$field or !$grade)
		{
			$this->errorhandle->errFormEditStudent($student_id,$name,$matr,$email,$field,$grade,$skills,false);
			return true;
		}

		$err = $this->database->updateStudent($student_id, $name, $email, $field, $matr, $grade, $skills);

		if($err)
		{
			$this->errorhandle->errFormEditStudent($student_id,$name,$matr,$email,$field,$grade,$skills,true);
			return true;
		}
		return false;
	}

	public function updateStudentInterests($student_id, $interest1, $interest2, $interest3)
	{

		$student_id = $this->whitelist->validateId($student_id);

		if(!$student_id)
		{
			$this->errorhandle->errBadId("project");
			return true;
		}

		if(!$interest1) $interest1 = 0;
		else $interest1 = $this->whitelist->validateId($interest1);

		if(!$interest2) $interest2= 0;
		else $interest2 = $this->whitelist->validateId($interest2);

		if(!$interest3) $interest3= 0;
		else $interest3 = $this->whitelist->validateId($interest3);

		// INFO compare explicit boolean type here! values can be 0!
		if($interest1 === false or $interest2 === false or $interest3 === false)
		{
			$this->errorhandle->errBadId("student");
			return true;
		}

		$err = $this->database->updateStudentInterests($student_id, $interest1, $interest2, $interest3);

		if($err)
		{
			$this->errorhandle->errBadId("student");
			return true;
		}
		return false;
	}

	public function studentToggleActive($student_id,$toggle)
	{
		$student_id = $this->whitelist->validateId($student_id);

		// TODO return specific error codes here
		if(!$student_id) return false;

		return $this->database->studentToggleActive($student_id,$toggle);

	}

	public function getStudentById($student_id)
	{
		$student_id = $this->whitelist->validateId($student_id);

		// TODO return specific error codes here
		if(!$student_id) return false;

		return $this->database->getStudentById($student_id);
	}

	public function getStudentInterests($student_id)
	{
		$student_id = $this->whitelist->validateId($student_id);

		// TODO return specific error codes here
		if(!$student_id) return false;

		return $this->database->getInterestsByStudent($student_id);
	}

	public function getStudentsWithoutRequest($nRequests)
	{
		return $this->database->getStudentsWithoutRequest($nRequests);
	}

	public function deleteStudent($student_id)
	{
			$student_id = $this->whitelist->validateId($student_id);

			// TODO return specific error codes here
			if(!$student_id) return false;

			return $this->database->removeStudent($student_id);
	}

	public function createNewProject($titel, $keywords, $abstract, $description, $grade, $skills, $teacher_id)
	{
		$grade = $this->translate->degree2num($grade);

		$titel = $this->whitelist->validateText($titel,400);
		$keywords = $this->whitelist->validateText($keywords,400);
		$abstract = $this->whitelist->validateText($abstract,600);
		$description = $this->whitelist->validateText($description,1500);
		$grade = $this->whitelist->validateGrade($grade);
		$skills = $this->whitelist->validateSkills($skills);
		$teacher_id = $this->whitelist->validateId($teacher_id);

		$skills = $this->translate->skills2str($skills);

		if(!$teacher_id or !$titel or !$keywords or !$abstract or !$description or !$grade or !$skills)
		{
			$this->errorhandle->errFormNewProject($teacher_id,$titel,$keywords,$abstract,$description,$grade,$skills);
			return true;
		}

		$err = $this->database->insertNewProject($titel, $keywords, $abstract, $description, $grade, $skills, $teacher_id);

		if($err)
		{
			$this->errorhandle->errFormNewProject($teacher_id,$titel,$keywords,$abstract,$description,$grade,$skills);
			return true;
		}
		return false;
	}

	public function editProject($project_id, $titel, $keywords, $abstract, $description, $grade, $skills)
	{
		$grade = $this->translate->degree2num($grade);

		$project_id = $this->whitelist->validateId($project_id);
		$titel = $this->whitelist->validateText($titel,400);
		$keywords = $this->whitelist->validateText($keywords,400);
		$abstract = $this->whitelist->validateText($abstract,600);
		$description = $this->whitelist->validateText($description,1500);
		$grade = $this->whitelist->validateGrade($grade);
		$skills = $this->whitelist->validateSkills($skills);

		$skills = $this->translate->skills2str($skills);

		if(!$project_id or !$titel or !$keywords or !$abstract or !$description or !$grade or !$skills)
		{
			$this->errorhandle->errFormEditProject($project_id,$titel,$keywords,$abstract,$description,$grade,$skills);
			return true;
		}

		$err = $this->database->updateProject($project_id, $titel, $keywords, $abstract, $description, $grade, $skills);

		if($err)
		{
			$this->errorhandle->errFormEditProject($project_id,$titel,$keywords,$abstract,$description,$grade,$skills);
			return true;
		}
		return false;

	}

	public function projectRemoveTeacher($project_id, $teacher_ids)
	{
		$project_id = $this->whitelist->validateId($project_id);

		if(!$project_id)
		{
			$this->errorhandle->errBadId("project");
			return true;
		}

		foreach($teacher_ids as $id)
		{
			if(!$this->whitelist->validateId($id))
			{
				$this->errorhandle->errBadId("project");
				return true;
			}
		}

		$err = $this->database->removeTeacher($project_id, $teacher_ids);

		// TODO This is not a bad is error
		if($err)
		{
			$this->errorhandle->errBadId("project");
			return true;
		}
		return false;
	}

	public function projectAddTeacher($project_id, $teacher_id)
	{
		$project_id = $this->whitelist->validateId($project_id);
		$teacher_id = $this->whitelist->validateId($teacher_id);

		if(!$project_id or !$teacher_id)
		{
			$this->errorhandle->errBadId("project");
			return true;
		}

		$err = $this->database->projectAddTeacher($project_id, $teacher_id);

		// TODO this is not a bad ID maybe already 5 teacher
		if($err)
		{
			$this->errorhandle->errBadId("project");
			return true;
		}

	}

	public function getProjectById($project_id)
	{
		$project_id = $this->whitelist->validateId($project_id);

		// TODO return specific error codes here
		if(!$project_id) return false;

		return $this->database->getProject($project_id,true);
	}

	public function getProjectByAuth($project_id,$auth_id)
	{
		$project_id = $this->whitelist->validateId($project_id);
		$auth_id = $this->whitelist->validateId($auth_id);

		// TODO return specific error codes here
		if(!$project_id) return false;
		if(!$auth_id) return false;

		return $this->database->getProject($project_id,$auth_id);
	}

	/*public function addNewStudent($name, $matr, $email, $field, $grade, $skills)
	{
		$name = $this->whitelist->validateName($name);
		$matr = $this->whitelist->validateMatrNr($matr);
		$email = $this->whitelist->validateEmail($email);
		$field = $this->whitelist->validateStudyfield($field);
		$grade = $this->whitelist->validateGrade($grade);
		$skills = $this->whitelist->validateSkills($skills);

		if(!$name) return false;
		if(!$matr) return false;
		if(!$email) return false;
		if(!$field) return false;
		if(!$grade) return false;
		if(!$skills) return false;

		$grade = $this->translate->degree2num($grade);
		$skills = $this->translate->skills2str($skills);

		return $this->database->insertStudent($name, $matr, $email, $field, $grade, $skills)
	}*/

	public function getStudentByCrypt($rand_id)
	{
		$rand_id = $this->whitelist->validateRandomId($rand_id);

		// TODO return specific error codes here
		if(!$rand_id) return false;
		$toggle = 1;
		if($this->stage == 1) $toggle = 0;
		return $this->database->getStudent($rand_id, $toggle);
	}

	public function getSkills()
	{
		return $this->skills;
	}

	public function getAssistAndDeadline()
	{
		$xml = new DOMDocument();
		$xml->load("system/config/config.xml");
		if(!$xml) return false; // TODO return fatal error here

		$assistent = $xml->documentElement->getElementsByTagName("assistent")->item(0)->textContent;
		$deadline = $xml->documentElement->getElementsByTagName("deadline")->item(0)->textContent;

		return array($assistent, $deadline);
	}

	private function changeConfig($config, $arg)
	{
		// TODO validate inputs!!!!
		$xml = new DOMDocument();
		$xml->load("system/config/config.xml");
		if(!$xml)
		{
			return false; // TODO return fatal error here

		}

		switch($config)
		{
			case "next_stage":
				$cur_stage = $xml->documentElement->getElementsByTagName("stage")->item(0)->textContent;
				$next = $this->whitelist->validateStageTransition($cur_stage);
				$xml->documentElement->getElementsByTagName("stage")->item(0)->nodeValue = $next;
				if($arg == 1) $to_voting = 1;
				if($next == 1)
				{
					$this->database->deactivateAllStudents();
				}
				break;

			case "cancel_system":
				$xml->documentElement->getElementsByTagName("stage")->item(0)->nodeValue = 1;
				break;

			case "assistent":
				$xml->documentElement->getElementsByTagName("assistent")->item(0)->nodeValue = $arg;
				break;

			case "deadline":
				$xml->documentElement->getElementsByTagName("deadline")->item(0)->nodeValue = $arg;
				break;

			case "change_num_wishes":
				if($this->whitelist->validateNWishes($arg))
					$xml->documentElement->getElementsByTagName("nwish")->item(0)->nodeValue = $arg;
				break;

			case "delete_skills":
				// TODO search in projects and delete skills;
				$this->database->deleteSkillsBySign($arg, $this->translate);
				$skills = $xml->documentElement->getElementsByTagName("skill");
				foreach($arg as $sign_to_delete)
					foreach ($skills as $skill)
					{
							$sign = $skill->getElementsByTagName("sign")->item(0)->nodeValue;
							if($sign == $sign_to_delete)
								$skill->parentNode->removeChild($skill);
					}
				break;

			case "add_skills":
				if( $xml->documentElement->getElementsByTagName("skill")->length >= 10 )
					return false; // TODO return error code here: skill list full!

				// INFO find first free index
				$new_sign = 0;
				$skills = $xml->documentElement->getElementsByTagName("skill");
				$taken = false;
				for($ind = 1; $ind < 10; $ind++)
				{
					$taken = false;
					foreach ($skills as $skill)
					{
						if($skill->getElementsByTagName("sign")->item(0)->nodeValue == $ind)
						{
							$taken = true;
						}
					}
					if(!$taken)
					{
						$new_sign = $ind;
						break;
					}
				}

				if($new_sign == 0) return false; // TODO error code here

				$skill_node = $xml->createElement("skill");
				$sign_node = $xml->createElement("sign",$new_sign);
				$name_node = $xml->createElement("name",$arg);
				$skill_node = $xml->documentElement->appendChild($skill_node);
				$skill_node->appendChild($sign_node);
				$skill_node->appendChild($name_node);
				break;

			default:
				return false;
				break;
		}

		$xml->save("system/config/config.xml");
		// INFO ..done reload system now
		if(isset($to_voting))
			header("Location: redirect.php?page=voting");
		else
			header("Location: redirect.php?page=settings");
	}

}


text:
William Eggleston: 21st Century and Diane Arbus: In the Absence of Others at Cheim & Read
by Abbe Schriber
547 W. 25th Street, between 10th and 11th avenues
New York City, 212 242 7727
William Eggleston Untitled (Water on Dirt Road, Las Poza, Mexico) 2005. Pigment print, 22 x 28 inches, Edition of 7 © Eggleston Artistic Trust Courtesy Cheim & Read, New York
Concurrent shows at Cheim & Read of photographs by William Eggleston and Diane Arbus presented new and rarely-seen work, respectively, by two critical pioneers of the medium. Created roughly in the first decade of this millennium, Eggleston's photographs continue to invigorate the banal and the unseen by way of meticulous attention to detail, form, and vibrant surges of color. The selection of photographs by Arbus, on the other hand, retain the artist's fascination with the out-of-the-ordinary, the freakish, except here applied to vacant landscapes which are as quietly unsettling as her portraits.
William Eggleston's photography stems from the snapshot, the idea that what we see is transient and evershifting. Yet, as has always been the case with Eggleston, such an attitude is at odds with the artist's acute vision and observation evidenced in purposeful compositions that convey both intimacy and fragmentation. While he is largely known for his pictures of middle class families of the American rural South, this new body of work expands Eggleston's practice to an international context. Works such as Untitled (Water on Dirt Road, Las Pozas, Mexico) (2005) "document" the most mundane details of the world around us with few, if any, signifiers that place us in a particular locale. With their jolting, unique perspectives and brilliant color, however, they become small moments of revelation. Typically with Eggleston's oeuvre, something dark and macabre lurks behind his lush color saturation. Untitled (Lamplighter Kitchen, Memphis) (2000) frames a small, squalid kitchen crowded with white bread, mustard, and utensils, electrical wires and metal boxes circling the walls, the colors muted but garish in the washed-out light. The straightforward, controlled honesty with which Eggleston renders this and other pictures, stripping the subjects of every conceit, barely hides the threat of evil looming beneath the surface. We are left to our own conclusions about who or what these photographs indirectly portray, based on the implications of the details. These new works are even more fragmented and isolated than vintage Eggleston. Refreshingly, they are less concerned with representing the symbols of a cultural landscape, and slightly more focused on the beauty and possibilities of form.
Diane Arbus, Christ in a Lobby 1964. Silver gelatin print, 11 x 14 inches. © 1990 The Estate of Diane Arbus LLC. The work is currently on view at Fraenkel Gallery, San Francisco as part of the exhibition, "Diane Arbus: Christ in a lobby and Other Unknown or Almost Known Works" January 7 to March 6, 2010
Eggleston and Arbus were introduced to one another by John Szarkowski, legendary former director of the department of photography at the Museum of Modern Art, who showed both artists along with Garry Winogrand and Lee Friedlander in the 1967 exhibiton, New Document. The artists occupied a critical moment in photography, rebelling against the tradition and conventions of the gelatin silver print to embrace the "documentary style" of the new generation, as a way to further close the gap between art and life. They promoted the shared view that no subject is uninteresting when captured a compelling way.
According to Susan Sontag, "In the world colonized by Arbus, subjects are always revealing themselves. There is no decisive moment. Arbus's view that self-revelation is a continuous, evenly distributed process is another way of maintaining the Whitmanesque imperative: treat all moments as of equal consequence." (On Photography, 1977). Along these lines, the photographs shown at Cheim & Read slowly unravelled their subjects, begging a second look, and then a third. Arbus applied the same idiosyncratic interest she found in her human subjects, seeking out sites that project a disturbingly private kind of loneliness—even humor—through their eccentricities and kitsch. It's the Arbus freakshow as applied to landscape, an approach that, for the artist, has always bordered on exoticism.
Christ in a lobby, NYC (1966) shows a large close-up of Christ's face against a marble wall, and another, similar but smaller image just off to the left that seems to float, transparently. This juxtaposition, like many of the other locales in the show, is both surprising and off-putting, injecting a semblance of mysticism into an otherwise ordinary room. Other works, like An empty movie theater, NYC (1971) and Rocks on wheels, Disneyland, CA (1962) also convey an eerily ephemeral, surreal quality, yet still feel intimate despite the lack of people. Subsequently, much like Eggleston, a compelling poignancy come from their humanity—while there are no people portrayed, their presence can be felt, their traces are in fact visible.