Exemplo n.º 1
0
            $PAGE->title = $PAGE->title . " " . $version_content . " ";
            $PAGE->title = $PAGE->title . getTranslation("update package", $settings);
            $PAGE->title = $PAGE->title . "</h1>";
            $PAGE->generate_headers_footers();
            $PAGE->body = $PAGE->body . "<p>";
            $PAGE->body = $PAGE->body . getTranslation("Update package was downloaded, extracted, and installed successfully.", $settings);
            $PAGE->body = $PAGE->body . "</p>";
            echo $PAGE->content();
            exit;
        }
    }
    // END IF (ACTION)
}
if (isset($_GET['action'])) {
    if ($_GET['action'] == "reassign-job") {
        if (isset($_POST['id'])) {
            $REASSIGN_JOB = new job_id_user();
            $REASSIGN_JOB->get_from_hashrange($u->id_user, $_POST['id']);
            if ($REASSIGN_JOB->id != "undefined") {
                $was_reassigned = $REASSIGN_JOB->reassign_auto();
                if (!$was_reassigned) {
                    echo "<div align='center' style='background-color:red;color:white;'>";
                    echo "Job was not reassigned.";
                    echo "</div>";
                }
            }
        }
        // END IF (ID SET)
    }
    // END IF (ACTION IS DELETE-JOB)
}
Exemplo n.º 2
0
                     }
                 }
             }
             //usort($new_jobs,"jobmodifiedordersort");
             ////$new_jobs = array_reverse($new_jobs);
             //echo "NEW JOBS:";print_r($new_jobs);
             // HOW MANY OF THE WAITING JOBS CAN BE REASSIGNED
             $reassignable_jobs = array();
             if (count($new_jobs) > 0) {
                 $new_job = $new_jobs[rand(0, count($new_jobs) - 1)];
                 $job_assign_hf = $new_job['id_hf'];
                 $job_reassign_attempt = new job_id_user();
                 $job_reassign_attempt->get_from_hashrange($id_user, $job_assign_hf);
                 $was_reassigned = false;
                 if ($job_reassign_attempt->id != "undefined") {
                     $was_reassigned = $job_reassign_attempt->reassign_auto();
                 }
                 if ($was_reassigned) {
                     logger("\tJOB REASSIGNED\n");
                 }
             }
             // END IF (ANY NEW JOBS TO REASSIGN)
         }
         // IS THIS THE RE-ASSIGNER SERVER
         // SKIP EVERYTHING ELSE, GO BACK TO BEGINNING TO RE-CHECK FOR NEW JOBS ASSIGNED TO THIS SERVER
         continue;
     }
     // END IF (NO NEW JOBS AVAILABLE)
 }
 // END IF (BOOL_FIND_NEW_JOB IS TRUE)
 // PROCESS NEW JOB - MAKE SURE IT IS CURRENTLY MARKED AS "NEW"