function show_xls($_POST)
{
    $OUT = show_report($_POST);
    $OUT = clean_html($OUT);
    require_lib("xls");
    StreamXLS("Leave", $OUT);
}
Ejemplo n.º 2
0
function show_report_if_allowed($report_prefix, $report_name, $person_id, $permission_id = '')
{
    $CI =& get_instance();
    $permission_id = empty($permission_id) ? 'reports_' . $report_name : $permission_id;
    if ($CI->Employee->has_grant($permission_id, $person_id)) {
        show_report($report_prefix, $report_name, $permission_id);
    }
}
Ejemplo n.º 3
0
            $_retry = $_quit = true;
        } else {
            show_report(array('which' => 'index', 'category' => 'auth', 'realm' => $matches[1]));
        }
    }
} while ($_retry);
//
// OUTPUT RESPONSE IF NO PROXIFICATION IS NEEDED
//
if (!isset($_proxify[$_content_type])) {
    @set_time_limit(0);
    $_response_keys['content-disposition'] = 'Content-Disposition';
    $_response_headers['content-disposition'][0] = empty($_content_disp) ? ($_content_type == 'application/octet_stream' ? 'attachment' : 'inline') . '; filename="' . $_url_parts['file'] . '"' : $_content_disp;
    if ($_content_length !== false) {
        if ($_config['max_file_size'] != -1 && $_content_length > $_config['max_file_size']) {
            show_report(array('which' => 'index', 'category' => 'error', 'group' => 'resource', 'type' => 'file_size'));
        }
        $_response_keys['content-length'] = 'Content-Length';
        $_response_headers['content-length'][0] = $_content_length;
    }
    $_response_headers = array_filter($_response_headers);
    $_response_keys = array_filter($_response_keys);
    header(array_shift($_response_keys));
    array_shift($_response_headers);
    foreach ($_response_headers as $name => $array) {
        foreach ($array as $value) {
            header($_response_keys[$name] . ': ' . $value, false);
        }
    }
    do {
        $data = fread($_socket, 8192);
Ejemplo n.º 4
0
show_report_if_allowed('specific', 'discount', $person_id, 'reports_discounts');
show_report_if_allowed('specific', 'employee', $person_id, 'reports_employees');
?>
			 </div>
		</div>

		<?php 
if ($this->Employee->has_grant('reports_inventory', $this->session->userdata('person_id'))) {
    ?>
			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title"><span class="glyphicon glyphicon-book">&nbsp</span><?php 
    echo $this->lang->line('reports_inventory_reports');
    ?>
</h3>
				</div>
				<div class="list-group">
				<?php 
    show_report('', 'reports_inventory_low');
    show_report('', 'reports_inventory_summary');
    ?>
				</div>
			</div>
		<?php 
}
?>
	</div>
</div>

<?php 
$this->load->view("partial/footer");
<?php

require "../settings.php";
$OUTPUT = show_report();
require "../tmpl-print.php";
function show_report()
{
    global $_GET;
    if (!isset($_GET["id"]) or strlen($_GET["id"]) < 1) {
        return "<li class='err'>Invalid Use Of Module. Invalid Loan.</li>";
    }
    db_connect();
    $get_loan = "SELECT * FROM emp_loanarchive WHERE id = '{$_GET['id']}' LIMIT 1";
    $run_loan = db_exec($get_loan) or errDie("Unable to get loan information.");
    if (pg_numrows($run_loan) < 1) {
        return "<li class='err'>Could Not Get Loan Information.</li>";
    } else {
        $larr = pg_fetch_array($run_loan);
    }
    #get employee details ...
    $get_emp = "SELECT * FROM employees WHERE empnum = '{$larr['empnum']}' LIMIT 1";
    $run_emp = db_exec($get_emp) or errDie("Unable to get employee details.");
    if (pg_numrows($run_emp) < 1) {
        $showempname = "";
    } else {
        $earr = pg_fetch_array($run_emp);
        $showempname = "{$earr['fnames']} {$earr['sname']}";
    }
    #get loan type details ...
    $get_ltype = "SELECT * FROM loan_types WHERE id = '{$larr['loan_type']}' LIMIT 1";
    $run_ltype = db_exec($get_ltype) or errDie("Unable to get loan type details.");
Ejemplo n.º 6
0
for ($j = 0; $j < 10; $j++) {
    for ($i = 0, $n = sizeof($examples); $i < $n; $i++) {
        $parser1->parse($examples[$i]);
        $counter++;
    }
}
$t = microtime(true) - $t;
show_report('HStoreParser', $t, $counter, memory_get_peak_usage(), memory_get_usage());
//////////////////////////////////////////////////
$t = microtime(true);
$counter = 0;
for ($j = 0; $j < 10; $j++) {
    for ($i = 0, $n = sizeof($examples); $i < $n; $i++) {
        $parser2->parse($examples[$i]);
        $counter++;
    }
}
$t = microtime(true) - $t;
show_report('Zephir HStoreParser', $t, $counter, memory_get_peak_usage(), memory_get_usage());
//////////////////////////////////////////////////
$t = microtime(true);
$counter = 0;
for ($j = 0; $j < 10; $j++) {
    for ($i = 0, $n = sizeof($examples); $i < $n; $i++) {
        $parser3->parse($examples[$i]);
        $counter++;
    }
}
$t = microtime(true) - $t;
show_report('Cpp HStoreParser', $t, $counter, memory_get_peak_usage(), memory_get_usage());
//////////////////////////////////////////////////
Ejemplo n.º 7
0
    }
    // End Access Control
    $assign = get_assignment_details($as_id);
    $sub = get_assignment_submit_details($sub_id);
    if ($sub == null || $assign == null) {
        redirect_to_home_page('modules/work/index.php?course=' . $course_code);
    }
    $navigation[] = array("url" => "index.php?course={$course_code}", "name" => $langWorks);
    $navigation[] = array("url" => "index.php?course={$course_code}&amp;id={$as_id}", "name" => q($assign->title));
    if (count($sub) > 0) {
        if ($assign->auto_judge) {
            // auto_judge enable
            $auto_judge_scenarios = unserialize($assign->auto_judge_scenarios);
            $auto_judge_scenarios_output = unserialize($sub->auto_judge_scenarios_output);
            if (!isset($_GET['downloadpdf'])) {
                show_report($as_id, $sub_id, $assign, $sub, $auto_judge_scenarios, $auto_judge_scenarios_output);
                draw($tool_content, 2);
            } else {
                download_pdf_file($assign, $sub, $auto_judge_scenarios, $auto_judge_scenarios_output);
            }
        } else {
            Session::Messages($langAutoJudgeNotEnabledForReport, 'alert-danger');
            draw($tool_content, 2);
        }
    } else {
        Session::Messages($m['WorkNoSubmission'], 'alert-danger');
        redirect_to_home_page('modules/work/index.php?course=' . $course_code . '&id=' . $id);
    }
} else {
    redirect_to_home_page('modules/work/index.php?course=' . $course_code);
}
Ejemplo n.º 8
0
        exit(0);
    }
    // End Access Control
    $assign = get_assignment_details($as_id);
    $submissions = find_submissions_by_assigment($as_id);
    $i = 1;
    $i++;
    $nameTools = sprintf($langAutoJudgeRankReport, $assign->title);
    if ($assign == null) {
        redirect_to_home_page('modules/work/index.php?course=' . $course_code);
    }
    $navigation[] = array("url" => "index.php?course={$course_code}", "name" => $langWorks);
    $navigation[] = array("url" => "index.php?course={$course_code}&amp;id={$as_id}", "name" => q($assign->title));
    if (count($submissions) > 0) {
        if (!isset($_GET['downloadpdf'])) {
            show_report($assign, $submissions, $i);
            draw($tool_content, 2);
        } else {
            download_pdf_file($assign, $submissions);
        }
    } else {
        Session::Messages($m['WorkNoSubmission'], 'alert-danger');
        redirect_to_home_page('modules/work/index.php?course=' . $course_code . '&id=' . $id);
    }
} else {
    redirect_to_home_page('modules/work/index.php?course=' . $course_code);
}
// Returns an array of the details of assignment $id
function get_assignment_details($id)
{
    global $course_id;
 *
 */
include_once 'database/dbPersons.php';
include_once 'domain/Person.php';
include_once 'database/dbShifts.php';
include_once 'domain/Shift.php';
include_once 'database/dbProjects.php';
include_once 'domain/Project.php';
error_log("In reportsAjax.php");
if (isset($_GET['q'])) {
    //Was $_POST changing it to $_GET allows hints to display - GIOVI
    $names = getall_volunteer_names();
    show_hint($names);
}
if (isset($_POST['_form_submit']) && $_POST['_form_submit'] == 'report') {
    show_report();
}
function show_report()
{
    error_log("******START: show_report******");
    $shifthistories = get_all_peoples_histories_in_shifts();
    // This returns a key sorted list of everyone's names that are or were in shifts; - GIOVI
    //The key being the the person's id and the associated value being the id of every shift s/he is in separated by commas. - GIOVI
    $projecthistories = get_all_peoples_histories_in_proj();
    //This returns a key sorted list of everyone's names that are or were in projects - GIOVI
    $name = $_POST['volunteer-names'];
    $from = "";
    $to = "";
    if (isset($_POST['date']) && $_POST['date'] != "") {
        if ($_POST['date'] == "last-week") {
            $from = date("m/d/y", strtotime("6 weeks ago"));