Beispiel #1
0
function refresh_tgs($talent_gateways, $see_response = false)
{
    $refresh_result = array();
    $refresh_result['skipped'] = array();
    foreach ($talent_gateways as $tg_table => $tg_data) {
        /* foreach passed TG */
        $pages = get_total_pages($tg_data['employee_id'], $tg_data['client_id'], $tg_data['site_id'], $tg_data['qids'], $see_response, $tg_data['soap_url']);
        if ($pages['max_pages'] != 0) {
            $current_page = 1;
            $truncate = false;
            while ($current_page <= $pages['max_pages']) {
                $truncate = $current_page == 1 ? true : false;
                $questions = array("job_brassring_req_code", "job_title", "job_city", "job_state", "unnamed_2", "unnamed_3", "job_category");
                $tg_result = refresh_cache($tg_data['employee_id'], $tg_data['client_id'], $tg_data['site_id'], $tg_data['tg_name'], $tg_table, $tg_data['custom_fields'], $tg_data['qids'], $truncate, $current_page, $see_response, $tg_data['soap_url']);
                $refresh_result[] = $tg_result;
                $current_page++;
            }
        } else {
            if ($pages['successful_api_call'] == false) {
                $refresh_result['skipped'][$tg_data['site_id']]['message'] = 'Failed in the API call. Site id: ' . $tg_data['site_id'];
                $refresh_result['skipped'][$tg_data['site_id']]['message_2'] = 'The table for that TG was not modified.';
            } elseif ($pages['successful_api_call'] == true && $pages['max_pages'] == 0) {
                $refresh_result['skipped'][$tg_data['site_id']]['message'] = 'The TG has no jobs. Site id: ' . $tg_data['site_id'];
                /* If TG has no jobs, truncate the table */
                if (truncate_one_table($tg_table)) {
                    $refresh_result['skipped'][$tg_data['site_id']]['message_2'] = 'The table for this TG has been truncated';
                } else {
                    $refresh_result['skipped'][$tg_data['site_id']]['message_2'] = 'An attempt to truncate the table for this TG failed.';
                }
            }
        }
    }
    return $refresh_result;
}
        if ($aha == "0") {
            ?>
            <div id="spinner" class="well well-large well-transparent lead">
                <center>
                    <?php 
            echo lang('MSG_no_records');
            ?>
                </center>
            </div>
        <?php 
        } else {
            if ($aha != "0") {
                ?>

            <input type="hidden" value="<?php 
                echo get_total_pages('arch', $user_id);
                ?>
" id="val_menu">
            <input type="hidden" value="<?php 
                echo $user_id;
                ?>
" id="user_id">
            <input type="hidden" value="" id="total_tickets">
            <input type="hidden" value="" id="last_total_tickets">

            <table class="table table-bordered table-hover" style=" font-size: 14px; ">
                <thead>
                <tr>
                    <th><center>#</center></th>
                    <th><center><?php 
                echo lang('t_LIST_subj');
Beispiel #3
0
            if ($aha == "0") {
                ?>
                <div id="spinner" class="well well-large well-transparent lead">
                    <center>
                        <?php 
                echo lang('MSG_no_records');
                ?>
                    </center>
                </div>
            <?php 
            }
            if ($aha != "0") {
                ?>

                <input type="hidden" value="<?php 
                echo get_total_pages('in', $user_id);
                ?>
" id="val_menu">
                <input type="hidden" value="<?php 
                echo $user_id;
                ?>
" id="user_id">
                <input type="hidden" value="" id="total_tickets">
                <input type="hidden" value="" id="last_total_tickets">






Beispiel #4
0
        <?php 
    } else {
        if ($nn != 0) {
            ?>


            <input type="hidden" id="page_type" value="<?php 
            echo $r;
            ?>
">
            <input type="hidden" id="curent_page" value="1">
            <input type="hidden" id="cur_page" value="1">


            <input type="hidden" id="total_pages" value="<?php 
            echo get_total_pages($_POST['menu'], $user_id);
            ?>
">
            <input type="hidden" id="last_ticket" value="<?php 
            echo get_last_ticket($_POST['menu'], $user_id);
            ?>
">

        <?php 
        }
    }
    ?>