Ejemplo n.º 1
0
$user = trim(@$_REQUEST['user']);
$sidnum = trim(@$_REQUEST['cidnum']);
$local_file = trim(@$_REQUEST['file']);
if ($user != '') {
    $user_id = get_user_id($user);
}
# check if user is known to GS
#
if ($user_id < 1) {
    gs_log(GS_LOG_NOTICE, "User \"{$user}\" unknown");
    die_not_allowed('You are not allowed to send a fax.');
}
# get email address and PIN
#
$email = gs_user_email_address_get($user);
$pin = gs_user_pin_get($user);
# use default fax TSI if not provided in http request
#
if ($tsi == '') {
    $fax_tsis_global = explode(',', gs_get_conf('GS_FAX_TSI'));
    if (array_key_exists(0, $fax_tsis_global) && $fax_tsis_global[0] != '') {
        $tsi = $fax_tsis_global[0];
    } else {
        $tsi = '0';
    }
}
# if no local file is specified check if ist's provided in http request
#
if ($local_file == '' && is_array($_FILES) && array_key_exists('file', $_FILES) && $_FILES['file']['error'] == 0 && $_FILES['file']['size'] > 0) {
    $local_file = $_FILES['file']['tmp_name'];
}
Ejemplo n.º 2
0
echo '</h2>', "\n";
$per_page = (int) gs_get_conf('GS_GUI_NUM_RESULTS');
$page = (int) @$_REQUEST['page'];
$delete = trim(@$_REQUEST['delete']);
if ($delete) {
    fax_kill_job($delete);
}
echo '<script type="text/javascript" src="', GS_URL_PATH, 'js/arrnav.js"></script>', "\n";
?>

<table cellspacing="1">
<thead>
<tr>

<?php 
$jobs_send = fax_get_jobs_send($_SESSION['sudo_user']['name'], gs_user_pin_get($_SESSION['sudo_user']['name']));
$recdate = array();
$jobid = array();
if (is_array($jobs_send)) {
    $jobs_send_count = count($jobs_send);
    foreach ($jobs_send as $key => $row) {
        $recdate[$key] = $row[32];
        $jobid[$key] = $row[9];
    }
    @array_multisort($recdate, SORT_DESC, $jobid, SORT_ASC, $jobs_send);
    unset($recdate);
    unset($jobid);
} else {
    $jobs_send_count = 0;
}
$num_pages = ceil($jobs_send_count / $per_page);
Ejemplo n.º 3
0
}
$user_id = @$_SESSION['sudo_user']['id'];
$fax_job_id = 0;
$per_page = (int) gs_get_conf('GS_GUI_NUM_RESULTS');
$tsi = trim(@$_REQUEST['tsi']);
$faxnumber = trim(@$_REQUEST['faxnumber']);
$resolution = (int) trim(@$_REQUEST['res']);
$document = trim(@$_REQUEST['doc']);
if (is_array($_FILES) && @array_key_exists('file', @$_FILES) && @$_FILES['file']['error'] == 0 && @$_FILES['file']['size'] > 0) {
    $fax_job_id = fax_send($user_id, $_SESSION['sudo_user']['name'], $faxnumber, $tsi, $_FILES['file']['tmp_name'], email_by_username($_SESSION['sudo_user']['name']), $resolution, gs_user_pin_get($_SESSION['sudo_user']['name']));
    $file_ok = true;
} else {
    $file_ok = false;
}
if ($document && $resolution) {
    $fax_job_id = fax_send($user_id, $_SESSION['sudo_user']['name'], $faxnumber, $tsi, '/docq/' . $document, email_by_username($_SESSION['sudo_user']['name']), $resolution, gs_user_pin_get($_SESSION['sudo_user']['name']));
}
echo '<form enctype="multipart/form-data" method="post" action="', GS_URL_PATH, '">', "\n";
echo gs_form_hidden($SECTION, $MODULE);
?>

<table cellspacing="1">
<tbody>
<tr>
	<th style="width:150px;"></th>
	<th style="width:350px;"></th>
</tr>

<?php 
echo "<tr>\n";
echo '<th>', __('Senderkennung'), '</th>', "\n";
Ejemplo n.º 4
0
$per_page = (int) gs_get_conf('GS_GUI_NUM_RESULTS');
$page = (int) @$_REQUEST['page'];
$delete = trim(@$_REQUEST['delete']);
if ($delete) {
    fax_delete_file('/recvq/' . $delete);
}
echo '<script type="text/javascript" src="', GS_URL_PATH, 'js/arrnav.js"></script>', "\n";
?>


<table cellspacing="1">
<thead>
<tr>

<?php 
$jobs_rec = fax_get_jobs_rec($_SESSION['sudo_user']['name'], gs_user_pin_get($_SESSION['sudo_user']['name']));
$recdate = array();
$jobid = array();
if (is_array($jobs_rec)) {
    foreach ($jobs_rec as $key => $row) {
        /*
        if ($row[11] == $_SESSION['sudo_user']['name']) {
        */
        $recdate[$key] = $row[18];
        $jobid[$key] = $row[4];
        /*
        } else {
        	unset($jobs_rec[$key]);
        }
        */
    }
Ejemplo n.º 5
0
$per_page = (int) gs_get_conf('GS_GUI_NUM_RESULTS');
$page = (int) @$_REQUEST['page'];
$delete = trim(@$_REQUEST['delete']);
if ($delete) {
    fax_delete_job($delete);
}
echo '<script type="text/javascript" src="', GS_URL_PATH, 'js/arrnav.js"></script>', "\n";
?>


<table cellspacing="1">
<thead>
<tr>

<?php 
$jobs_done = fax_get_jobs_done($_SESSION['sudo_user']['name'], gs_user_pin_get($_SESSION['sudo_user']['name']));
$recdate = array();
$jobid = array();
if (is_array($jobs_done)) {
    foreach ($jobs_done as $key => $row) {
        $recdate[$key] = $row[32];
        $jobid[$key] = $row[9];
    }
    @array_multisort($recdate, SORT_DESC, $jobid, SORT_ASC, $jobs_done);
    unset($recdate);
    unset($jobid);
    $jobs_done_count = count($jobs_done);
} else {
    $jobs_done_count = 0;
}
$num_pages = ceil($jobs_done_count / $per_page);
Ejemplo n.º 6
0
require_once GS_DIR . 'htdocs/gui/inc/session.php';
require_once GS_DIR . 'inc/quote_shell_arg.php';
require_once GS_DIR . 'inc/cn_hylafax.php';
include_once GS_DIR . 'inc/gs-fns/gs_user_pin_get.php';
$file = trim(@$_REQUEST['file']);
$raw = trim(@$_REQUEST['raw']);
if (!$file) {
    $file = $raw;
}
if (!$file) {
    header('HTTP/1.0 403 Forbidden', true, 403);
    header('Status: 403 Forbidden', true, 403);
    header('Content-Type: text/plain');
    die('Unauthorized.');
}
if (!fax_download($file, $_SESSION['sudo_user']['name'], gs_user_pin_get($_SESSION['sudo_user']['name']))) {
    header('HTTP/1.0 500 Internal Server Error', true, 500);
    header('Status: 500 Internal Server Error', true, 500);
    header('Content-Type: text/plain');
    die('Error. Failed to retrieve fax from server.');
}
$raw_file = realPath('/tmp/' . $file);
if (empty($raw_file) || subStr($raw_file, 0, 5) !== '/tmp/') {
    header('HTTP/1.0 500 Internal Server Error', true, 500);
    header('Status: 500 Internal Server Error', true, 500);
    header('Content-Type: text/plain');
    die('Error. Bad filename.');
}
if ($raw) {
    # TIFF
    header('Content-Type: image/tiff');
Ejemplo n.º 7
0
echo __('PIN &auml;ndern');
?>
</th>
	</tr>
</thead>
<tbody>
	<tr class="odd">
		<td>
			<?php 
echo __('Alte PIN');
?>
:
		</td>
<?php 
if ($show_pin) {
    $oldpin = gs_user_pin_get($_SESSION['sudo_user']['name']);
    if (isGsError($oldpin) || !is_string($oldpin)) {
        $oldpin = '';
    }
    ?>
		<td>
			<input type="text" name="oldpin" value="<?php 
    echo htmlEnt($oldpin);
    ?>
" readonly="readonly" size="10" maxlength="10" />
		</td>
<?php 
} else {
    ?>
		<td>
			<input type="password" name="oldpin" value="" size="10" maxlength="10" />