Exemplo n.º 1
0
    function load()
    {
        global $db;
        if (isset($_GET['_tsk']) && !empty($_GET['_tsk'])) {
            $app_id = tv($_GET['_tsk']);
            if (!$db->Query("SELECT * FROM task where app='" . $app_id . "'")) {
                $db->Kill('Error1');
            }
            $array = $db->RowArray();
            $app_rep = $array['rep'];
            $app_file = $array['file'];
            //si l'application demandée n'a pas besoin de session retour à l'index
            //verif si application exist
            if ($app_rep != '') {
                define('ACTIV_APP', $array['dscrip']);
                if (!isset($_GET['tb'])) {
                    $tb = '<script type="text/javascript">
$(".checkbox-b,.rem_me,.radio-b,input[type=\'file\']").uniform();
</script>';
                } else {
                    $tb = '';
                }
                $this->application = (require_once CONTROLLER_REP . SLASH . $app_rep . SLASH . $app_file . '_c.php');
                echo $tb;
            } else {
                header('location:./');
            }
        }
        //end if
    }
Exemplo n.º 2
0
function tg($get)
{
    if (isset($_REQUEST[$get]) && !empty($_REQUEST[$get])) {
        return tv($_REQUEST[$get]);
    } else {
        return '0';
    }
}
Exemplo n.º 3
0
 public static function load($ifsses)
 {
     global $db;
     //Set default App if need Session or not
     // $_GET['_tsk'] est le parametre qui appel l'application demandée
     if ($ifsses == 1) {
         $default_applic_id = 'login';
     } else {
         $default_applic_id = 'tdb';
     }
     if (isset($_GET['_tsk']) && !empty($_GET['_tsk'])) {
         $app_id = tv($_GET['_tsk']);
         if (!$db->Query("SELECT * FROM tasks where app='" . $app_id . "'")) {
             $db->Kill('Error1');
         }
         $array = $db->RowArray();
         $app_rep = $array['rep'];
         $app_file = $array['file'];
         $app_active = $array['dscrip'];
         define('ACTIV_APP', $array['dscrip']);
         //si l'application demandée n'a pas besoin de session retour à l'index
         if ($array['session'] == 0 && $ifsses == 2) {
             header('location:./');
         }
         //verif si application exist
         if ($app_rep != '') {
             require_once CONTROLLER_REP . SLASH . $app_rep . SLASH . $app_file . '_c.php';
         } else {
             header('location:./');
         }
     } else {
         if (!$db->Query("SELECT * FROM tasks where app='" . $default_applic_id . "'")) {
             $db->Kill('Error1');
         }
         $array = $db->RowArray();
         $app_rep = $array['rep'];
         $app_file = $array['file'];
         $app_active = $array['dscrip'];
         define('ACTIV_APP', $array['dscrip']);
         require_once CONTROLLER_REP . SLASH . $app_rep . SLASH . $app_file . '_c.php';
     }
     //end else
 }