<?php

namespace Cadoles\PortalBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;

class SyncenvoleController extends Controller
{
    public function delegationAction()
    {
        $url="/posh-profil";
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/admin-delegation.php?color=#color#"
        ]);        
    }

    public function baladoAction()
    {
        $url=$this->getParameter("widbalado_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=balado&color=#color#"
        ]);        
    }

    public function cdtAction()
    {
        $url=$this->getParameter("widcdt_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=cdt&color=#color#"
        ]);        
    }

    public function gepiannuAction()
    {
        $url=$this->getParameter("widgepi_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=gepiannu&color=#color#"
        ]);        
    }

    public function gepisiecleAction()
    {
        $url=$this->getParameter("widgepi_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=gepisconet&color=#color#"
        ]);        
    }

    public function limesurveyAction()
    {
        $url=$this->getParameter("widlimesurvey_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=limesurvey&color=#color#"
        ]);        
    }

    public function moodleAction()
    {
        $url=$this->getParameter("widmoodle_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=moodle&color=#color#"
        ]);        
    }

    public function nextcloudAction()
    {
        $url=$this->getParameter("widnextcloud_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=nextcloud&color=#color#"
        ]);        
    }

    public function piwikAction()
    {
        $url=$this->getParameter("widpiwik_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=piwik&color=#color#"
        ]);        
    }

    public function sacocheAction()
    {
        $url=$this->getParameter("widsacoche_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=sacochesconet&color=#color#"
        ]);        
    }

    public function wordpressAction()
    {
        $url=$this->getParameter("widwordpress_syncenvole");
        $color=$this->get('session')->get('colormain');
        $themename=$this->get('session')->get("theme");

        return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
            'useheader'         => true,
            'usemenu'           => false,
            'usesidebar'        => true,              
            'url'               => $url."/synchro.php?app=wordpress&color=#color#"
        ]);        
    }
}

