if ($page === '0kdi43c7') {
     if (check_activation($user_id) == 1) {
         include 'Pages/Common/load_profile.php';
     } else {
         include 'Pages/Common/logout.php';
     }
 } else {
     if ($page === '17yxc0pq') {
         if (check_activation($user_id) == 1) {
             include 'Pages/Common/update_email.php';
         } else {
             include 'Pages/Common/logout.php';
         }
     } else {
         if ($page === '69qrt3lw') {
             if (check_activation($user_id) == 1) {
                 include 'Pages/Common/update_mobile.php';
             } else {
                 include 'Pages/Common/logout.php';
             }
         } else {
             if ($page === '81fgc3tx') {
                 include 'Pages/Common/logout.php';
             } else {
                 if ($page === 'no90kl13') {
                     include 'Pages/StudentPanel/departments.php';
                 } else {
                     if ($page === 'i29wls18') {
                         include 'Pages/StudentPanel/employers.php';
                     } else {
                         include 'Pages/StudentPanel/home.php';
Exemplo n.º 2
0
        
        <?php 
if (isset($_POST['insert'])) {
    echo "Adding token";
    //if all data are valid and set
    if (!empty($_POST['date_started']) and !empty($_POST['weight']) and !empty($_POST['cat'])) {
        echo "token generated";
        //casting to local variables
        //$date_started=date("Y-m-d");
        if (!empty($_POST['date_started'])) {
            $date_started = $_POST['date_started'];
        }
        $weight = $_POST['weight'];
        $cat = $_POST['cat'];
        ///HERE WE BEGIN TRANSACTION
        $GOOD_ACT = constraint_activation(check_activation($id_c));
        if ($GOOD_ACT == 1) {
            //result, that no active category 2 or no category at all 3
            echo "One active category, must be deactivated first";
            echo "<form action='sub_cat_revise.php' method='POST'>";
            echo "<input type='hidden' name='id_cat' value='" . $id_c . "'>";
            echo "<input type='Submit' name='deactivate' value='Deactivate'>";
            echo "</form>";
            //get_trace() is defined in tablet system in second API it actually takes a numeric value of item type and returns it's token. What if many??
            //get_active_trace defined in second tablet API. It takes sub cat returns active idtrace. Does not have cheching of result consistency
        } else {
            if ($GOOD_ACT == 2) {
                echo "No active category for item type yet. Assiging new one";
                insert_token_trace($date_started, $weight, $cat, $id_c);
                //syntax with parameters means add collected item type as token trace and upgrade it as new active category
            } else {