示例#1
0
 function Start()
 {
     //no cache for post
     if (strToUpper($_SERVER['REQUEST_METHOD']) == 'POST') {
         return;
     }
     //no cache for sessions
     if (count($_SESSION)) {
         return;
     } else {
         @session_destroy();
     }
     //construct cache name
     $this->name = $this->prefix . rawUrlEncode($_SERVER['SCRIPT_FILENAME']) . rawUrlEncode($_SERVER['QUERY_STRING']) . '.hTm';
     //check for cache
     if (!file_exists($this->dir . '/' . $this->name)) {
         ob_start();
     } else {
         $STAT = @stat($this->dir . '/' . $this->name);
         if ($STAT[9] + $this->expire > time() && $STAT[7] > 0) {
             echo "<!--start of cached version (", date('D, M-d-Y H:i:s', $STAT[9]), ")-->\n";
             readfile($this->dir . '/' . $this->name);
             die("\n<!--end of cached version-->");
         } else {
             $this->force = $this->dir . '/' . $this->name;
             echo "<!--detected expired cached version (" . date('D, M-d-Y H:i:s', $STAT[9]) . ")-->\n";
         }
     }
 }
示例#2
0
</thead>
<tbody>

<?php 
if (@$rs) {
    $i = 0;
    while ($r = $rs->fetchRow()) {
        echo '<tr class="', ++$i % 2 == 0 ? 'even' : 'odd', '">', "\n";
        echo '<td>', htmlEnt($r['ln']);
        if ($r['fn'] != '') {
            echo ', ', htmlEnt($r['fn']);
        }
        //if (@subStr($r['ext'],0,1)=='0') echo ' <small>(extern)</small>';
        echo '</td>', "\n";
        echo '<td>', htmlEnt($r['ext']), '</td>', "\n";
        echo '<td>';
        $sudo_url = @$_SESSION['sudo_user']['name'] == @$_SESSION['real_user']['name'] ? '' : '&amp;sudo=' . @$_SESSION['sudo_user']['name'];
        if ($r['ext'] != $_SESSION['sudo_user']['info']['ext']) {
            echo '<a href="', GS_URL_PATH, 'srv/pb-dial.php?n=', rawUrlEncode($r['ext']), $sudo_url, '" title="', __('w&auml;hlen'), '"><img alt="', __('w&auml;hlen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/yast_PhoneTTOffhook.png" /></a>';
        } else {
            echo '&nbsp;';
        }
        echo '</td>';
        echo '</tr>', "\n";
    }
}
?>

</tbody>
</table>
示例#3
0
echo 'SELECT SQL_CALC_FOUND_ROWS
DATE_FORMAT(calldate,\'%d.%m.%Y %H:%i:%s\') as datum,clid,src,dst,duration,billsec,disposition
FROM `ast_cdr` '. $query_string;
*/
$rs = $CDR_DB->execute('DELETE FROM `ast_cdr` WHERE `dst`=\'h\'');
$rs = $CDR_DB->execute('SELECT SQL_CALC_FOUND_ROWS
	DATE_FORMAT(`calldate`, \'%d.%m.%Y %H:%i:%s\') `datum`, `clid`, `src`, `dst`, `duration`, `billsec`, `disposition`, `userfield`, `dcontext`
FROM `ast_cdr` ' . $query_string . '
ORDER BY `calldate` DESC
LIMIT ' . $page * (int) $per_page . ',' . (int) $per_page);
$num_total = @$CDR_DB->numFoundRows();
$num_pages = ceil($num_total / $per_page);
$sum_talktime = (int) @$CDR_DB->executeGetOne('SELECT SUM(`billsec`) FROM `ast_cdr` ' . $query_string);
$sum_calltime = (int) @$CDR_DB->executeGetOne('SELECT SUM(`duration`) FROM `ast_cdr` ' . $query_string);
// $num_total_not_null = (int) $DB->executeGetOne( 'SELECT COUNT(*) FROM `ast_cdr` WHERE `billsec` > 0');
$mod_url = gs_url($SECTION, $MODULE, null, 'src=' . rawUrlEncode($src) . '&amp;dst=' . rawUrlEncode($dst) . '&amp;dur=' . rawUrlEncode($dur) . '&amp;stat=' . rawUrlEncode($stat) . '&amp;period=' . rawUrlEncode($period));
?>

<form method="get" action="<?php 
echo GS_URL_PATH;
?>
">
<?php 
echo gs_form_hidden($SECTION, $MODULE);
?>
<table cellspacing="1" class="phonebook">
<thead>
<tr>
	<th style="width:140px;"><?php 
echo __('Zeitraum');
?>
}
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php 
echo GS_URL_PATH;
?>
styles/original.css" />
<?php 
if ($GUI_ADDITIONAL_STYLESHEET = gs_get_conf('GS_GUI_ADDITIONAL_STYLESHEET')) {
    ?>
<link rel="stylesheet" type="text/css" href="<?php 
    echo GS_URL_PATH;
    ?>
styles/<?php 
    echo rawUrlEncode($GUI_ADDITIONAL_STYLESHEET);
    ?>
" />
<?php 
}
?>
<link rel="shortcut icon" type="image/x-icon" href="<?php 
echo GS_URL_PATH;
?>
favicon.ico" />
<?php 
if (array_key_exists('is_boi', $MODULES[$SECTION]) && $MODULES[$SECTION]['is_boi']) {
    echo '<script type="text/javascript" src="', GS_URL_PATH, 'js/anti-xss.js"></script>', "\n";
}
$reverse_proxy = gs_get_conf('GS_BOI_GUI_REVERSE_PROXY');
if (!preg_match('/^https?:\\/\\//', $reverse_proxy)) {
示例#5
0
文件: calls_in.php 项目: rkania/GS3
        echo '<tr class="' . (++$i % 2 == 0 ? 'even' : 'odd') . '">';
        echo '<td>', htmlEnt($r['number']), '</td>';
        if (!$r['r_uid']) {
            $name = $r['remote_name'];
        } else {
            $name = $r['r_ln'];
            if ($r['r_fn'] != '') {
                $name .= ', ' . $r['r_fn'];
            }
        }
        echo '<td>', htmlEnt($name), '</td>';
        echo '<td>', date_human($r['ts']), '</td>';
        $sudo_url = @$_SESSION['sudo_user']['name'] == @$_SESSION['real_user']['name'] ? '' : '&amp;sudo=' . @$_SESSION['sudo_user']['name'];
        echo '<td>';
        if ($r['number'] != $_SESSION['sudo_user']['info']['ext']) {
            echo '<a href="', GS_URL_PATH, 'srv/pb-dial.php?n=', htmlEnt($r['number']), $sudo_url, '" title="', __('w&auml;hlen'), '"><img alt="', __('w&auml;hlen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/yast_PhoneTTOffhook.png" /></a>';
        } else {
            echo '&nbsp;';
        }
        echo "\n";
        echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=del&amp;type=' . rawUrlEncode($type) . '&amp;number=' . rawUrlEncode($r['number']) . '&amp;page=' . $page), '" title="', __('l&ouml;schen'), '" style="margin-left:1.5em;">', '<img alt="', __('l&ouml;schenck'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" />', '</a>', "\n";
        echo '</td>';
        echo '</tr>', "\n";
    }
}
?>

</tbody>
</table>

示例#6
0
文件: sw-update.php 项目: rkania/GS3
function _generate_settings($model, $appl, $rtfs, $lnux)
{
    global $firmware_url, $firmware_path, $mac, $phone_type, $user;
    $file = '';
    if (!empty($appl)) {
        $file = $model . '-' . $appl . '.bin';
    } elseif (!empty($rtfs)) {
        $file = $model . '-' . $rtfs;
    } elseif (!empty($lnux)) {
        $file = $model . '-' . $lnux . '-l.bin';
    }
    if ($file != '') {
        if (subStr($firmware_path, -1) != '/') {
            $firmware_path .= '/';
        }
        $realfile = $firmware_path . $file;
        if (!file_exists($realfile) || !is_readable($realfile)) {
            # It's important to make sure we don't point the phone to a
            # non-existent file or else the phone needs manual interaction
            # (something like "File not found. Press any key to continue.")
            gs_log(GS_LOG_WARNING, "File \"{$realfile}\" not found");
        } else {
            $url = $firmware_url . rawUrlEncode($file);
            gs_log(GS_LOG_NOTICE, "Snom {$mac} ({$phone_type}, user {$user}): Update file: \"{$file}\"");
            //$ob = 'pnp_config$: off' ."\n";
            $ob = 'firmware: ' . $url . "\n";
            if (!headers_sent()) {
                header('Content-Length: ' . strLen($ob));
                # avoid chunked transfer-encoding
            }
            echo $ob;
        }
    }
    exit;
}
示例#7
0
);

$num_total = @$CDR_DB->numFoundRows();
$num_pages = ceil($num_total / $per_page);

$sum_talktime = (int)@$CDR_DB->executeGetOne( 'SELECT SUM(`billsec`) FROM `ast_cdr` '. $query_string);
$sum_calltime = (int)@$CDR_DB->executeGetOne( 'SELECT SUM(`duration`) FROM `ast_cdr` '. $query_string);
// $num_total_not_null = (int) $DB->executeGetOne( 'SELECT COUNT(*) FROM `ast_cdr` WHERE `billsec` > 0');


$mod_url = gs_url($SECTION, $MODULE, null,
	      'src='   . rawUrlEncode($src)
	.'&amp;dst='   . rawUrlEncode($dst)
	.'&amp;dur='   . rawUrlEncode($dur)
	.'&amp;stat='  . rawUrlEncode($stat)
	.'&amp;period='. rawUrlEncode($period)
	);


?>

<form method="get" action="<?php echo GS_URL_PATH; ?>">
<?php echo gs_form_hidden($SECTION, $MODULE); ?>
<table cellspacing="1" class="phonebook">
<thead>
<tr>
	<th style="width:140px;"><?php echo __('Zeitraum'); ?></th>
	<th style="width:140px;"><?php echo __('Anrufer'); ?></th>
	<th style="width:140px;"><?php echo __('Ziel'); ?></th>
	<th style="width:100px;"><?php echo __('Anrufdauer'); ?></th>
	<th style="width:140px;" class="r">
示例#8
0
            echo '<img alt="', __('speichern'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/filesave.png" />';
            echo '</button>';
            echo '<button type="reset" title="', __('r&uuml;ckg&auml;ngig'), '" class="plain">';
            echo '<img alt="', __('r&uuml;ckg&auml;ngig'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/reload.png" />';
            echo '</button>';
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'page=' . $page), '" title="', __('abbrechen'), '"><img alt="', __('abbrechen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/cancel.png" /></a>';
            echo '</td>';
        } else {
            echo '<td>', htmlEnt($r['name']);
            echo '</td>', "\n";
            echo '<td>', htmlEnt($r['comment']);
            echo '</td>', "\n";
            echo '<td>', htmlEnt($r['number']), '</td>', "\n";
            echo '<td>';
            $sudo_url = @$_SESSION['sudo_user']['name'] == @$_SESSION['real_user']['name'] ? '' : '&amp;sudo=' . @$_SESSION['sudo_user']['name'];
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'edit=' . $r['id'] . '&amp;name=' . rawUrlEncode($name) . '&amp;number=' . rawUrlEncode($number) . '&amp;page=' . $page), '" title="', __('bearbeiten'), '"><img alt="', __('bearbeiten'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/edit.png" /></a> &nbsp; ';
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'delete=' . $r['id'] . '&amp;page=' . $page), '" title="', __('entfernen'), '"><img alt="', __('entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
            echo '</td>';
        }
        echo '</tr>', "\n";
    }
}
?>


<tr>
<?php 
if ($edit_entry < 1) {
    ?>
	<td>
		<input type="text" name="sname" value="" size="20" maxlength="40" style="width:190px;" />
include "connect.php";
if ($_GET['loc_id']) {
    $loc_id = $_GET['loc_id'];
    $rest_id = $_GET['rest_id'];
} elseif ($_SESSION['rest_id']) {
    $loc_id = $_SESSION['loc_id'];
    $rest_id = $_SESSION['rest_id'];
}
if ($loc_id && $rest_id) {
    $query_get_restaurant = "\r\n        \tSELECT * FROM Restaurant \r\n        \tWHERE (loc_id='{$loc_id}' AND rest_id='{$rest_id}') \r\n        \tLIMIT 1\r\n        \t";
    $result_get_restaurant = mysqli_query($dbc, $query_get_restaurant);
    if (!$result_get_restaurant) {
        //If the QUery Failed
        $outputtext .= 'Query Failed ';
    }
    if (@mysqli_num_rows($result_get_restaurant) == 1) {
        // A match was made.
        $rest_row = mysqli_fetch_array($result_get_restaurant, MYSQLI_ASSOC);
        //Assign the result of this query to SESSION Global Variable
        $hours = unserialize($rest_row['hours']);
        $name = rawUrlEncode($rest_row['name']);
        $outputtext .= "\r\n\t\t\t\t<div id='top'>\r\n\t\t\t\t\t<center>\r\n\t\t\t\t\t\t<table id='topbartable'>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class='center' colspan='3'>\r\n\t\t\t\t\t\t\t\t\t<h3>" . $rest_row['name'] . "</h3>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class='center'><a href='javascript:hoursPopup(" . '"' . $name . '","' . $loc_id . '","' . $rest_id . '"' . ")'>hours</a></td>\r\n\t\t\t\t\t\t\t\t<td class='center'><a href='javascript:restaurantInfoPopup(" . '"' . $name . '","' . $loc_id . '","' . $rest_id . '"' . ")'>info</a></td>\r\n\t\t\t\t\t\t\t\t<td class='center'>\r\n\t\t\t\t\t\t\t\t\t <a href='" . 'javascript:setMobile("mobilerestaurantpage.php?loc_id=' . $loc_id . '&rest_id=' . $rest_row['rest_id'] . '")' . "'>menu</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</center>\r\n\t\t\t\t</div>\r\n\t\t\t\t";
    } else {
        $outputtext .= "\r\n            \t<div id='top'>\r\n\t\t\t\t\t<center>\r\n            \t\t\tNo Restaurant In Database\r\n            \t\t</center>\r\n            \t</div>";
    }
} else {
    $outputtext .= "\r\n\t\t\t<div id='top'>\r\n\t\t\t\t<center>\r\n\t\t\t\t\tNo Restaurant In Database\r\n\t\t\t\t</center>\r\n\t\t\t</div>";
}
/// var_dump($error);
mysqli_close($dbc);
示例#10
0
function _generate_settings($model, $appl, $rtfs, $lnux)
{
    global $firmware_url_snom, $firmware_url_snom_from6to7, $firmware_url, $firmware_path, $allow_beta, $mac, $phone_type, $user;
    $file = '';
    if (!empty($appl)) {
        $file = $model . '-' . $appl . '.bin';
    } elseif (!empty($rtfs)) {
        $file = $model . '-' . $rtfs;
    } elseif (!empty($lnux)) {
        $file = $model . '-' . $lnux . '-l.bin';
    }
    if ($file != '') {
        if (subStr($firmware_path, -1) != '/') {
            $firmware_path .= '/';
        }
        $realfile = $firmware_path . $file;
        if (!file_exists($realfile) || !is_readable($realfile)) {
            # It's important to make sure we don't point the phone to a
            # non-existent file or else the phone needs manual interaction
            # (something like "File not found. Press any key to continue.")
            # special directories for
            # ...-3.38-l.bin
            # ...-update6to7-7.1.6-bf.bin
            if (preg_match('/-3\\.38-l\\.bin$/i', $file) || preg_match('/-update6to7-7\\.1\\.6-bf\\.bin$/i', $file)) {
                $wget_url = $firmware_url_snom_from6to7 . $file;
            } else {
                $wget_url = $firmware_url_snom . $file;
            }
            gs_log(GS_LOG_WARNING, "Please  cd " . qsa($firmware_path) . " && wget " . qsa($wget_url));
        } else {
            $url = $firmware_url . rawUrlEncode($file);
            gs_log(GS_LOG_NOTICE, "Snom {$mac} ({$phone_type}, user {$user}): Update file: \"{$file}\"");
            //$ob = 'pnp_config$: off' ."\n";
            $ob = 'firmware: ' . $url . "\n";
            if (!headers_sent()) {
                header('Content-Length: ' . strLen($ob));
                # avoid chunked transfer-encoding
            }
            echo $ob;
        }
    }
    exit;
}
     $outputtext .= "\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td class='notes' colspan='6'>" . $cat_row['note'] . "</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t";
 }
 while ($subcat_row = mysqli_fetch_array($result_get_subcat, MYSQLI_ASSOC)) {
     $subcat_id = $subcat_row['subcat_id'];
     $subcategory = $subcat_row['name'];
     $query_get_item = "\r\n\t\t\t\t\t\t\t\tSELECT * FROM Menu_Item \r\n\t\t\t\t\t\t\t\tWHERE (rest_id='{$rest_id}' AND subcat_id='{$subcat_id}' AND updated='{$updated}') \r\n\t\t\t\t\t\t\t\tORDER BY item_order\r\n\t\t\t\t\t\t\t\t";
     $result_get_item = mysqli_query($dbc, $query_get_item);
     if (@mysqli_num_rows($result_get_item) > 0) {
         $outputtext .= "\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<th class='subcategory'>{$subcategory}</th>\r\n\t\t\t\t\t\t\t\t\t\t<th>&nbsp;</th>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t";
         if ($subcat_row['note']) {
             $outputtext .= "\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td class='notes' colspan='6'>" . $subcat_row['note'] . "</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t";
         }
         while ($item_row = mysqli_fetch_array($result_get_item, MYSQLI_ASSOC)) {
             $item_id = $item_row['item_id'];
             $name = $item_row['name'];
             $encodedname = rawUrlEncode($name);
             $price_array = array();
             for ($i = 1; $i <= 5; $i++) {
                 $price_text = "price_" . $i;
                 if ($item_row[$price_text] != 0.0) {
                     $price_array[] = $item_row[$price_text];
                 }
             }
             if ($price_array) {
                 $minimum_price = min($price_array);
                 $maximum_price = max($price_array);
                 if ($minimum_price == $maximum_price) {
                     $outputtext .= "\r\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='firstcol'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='javascript:popupItem(" . '"' . $loc_id . '","' . $rest_id . '","' . $item_id . '","' . $encodedname . '"' . ")'>{$name}</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\$" . $minimum_price . "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t";
                 } else {
                     $outputtext .= "\r\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='firstcol'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='javascript:popupItem(" . '"' . $loc_id . '","' . $rest_id . '","' . $item_id . '","' . $encodedname . '"' . ")'>{$name}</a>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\$" . $minimum_price . "-\$" . $maximum_price . "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t";
                 }
示例#12
0
    echo '<th>', __('Warteschlange'), '</th>';
    echo '<th>', __('Skill'), '</th>';
    echo '<th></th>';
    echo '</thead><tbody>';
    $uhid = $DB->executeGetOne('SELECT `host_id` FROM `users` WHERE `id`=' . $uid);
    $rs = $DB->execute('SELECT `_id`, `name`, `_title` FROM `ast_queues` WHERE `_host_id`=' . $uhid . ' AND `_id` NOT IN (SELECT `_queue_id` FROM `penalties` WHERE `_user_id`=' . $uid . ')');
    echo '<tr><td>';
    echo '<select name="queue_id" size="5">';
    while ($queue_map = $rs->fetchRow()) {
        echo '<option value="', (int) $queue_map['_id'], '"', 'title="', htmlEnt($queue_map['_title']), '"';
        echo '>', $queue_map['name'], ' ', $queue_map['_title'], '</option>', "\n";
    }
    echo '</select>';
    echo '</td>';
    echo '<td>';
    echo '<select name="penalty">';
    foreach ($pen_avail as $pen) {
        echo '<option value="', $pen, '">', $pen, ' </option>';
    }
    echo '</select>';
    echo '</td>';
    echo '<td>';
    echo '<button type="submit" title="', __('Speichern'), '" class="plain">';
    echo '<img alt="', __('Hinzuf&uuml;gen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/filesave.png" /></button>', "\n";
    echo '<input type="hidden" name="action" value="setpenalty" />', "\n";
    echo '<input type="hidden" name="edit" value="', rawUrlEncode($edit_user), '">', "\n";
    echo '</td>';
    echo '</tr>';
    echo '</form>';
    echo '</tbody></table>';
}
示例#13
0
                }
                echo '</td>', "\n";
                $dur = abs((int) @$msg['dur']);
                $dur_m = floor($dur / 60);
                $dur_s = (int) ($dur - $dur_m * 60);
                echo '<td class="r">', $dur_m, ':', str_pad($dur_s, 2, '0', STR_PAD_LEFT), '</td>', "\n";
                echo '<td class="r">';
                //echo ' <a href="', gs_url($SECTION, $MODULE, null, 'action=play&amp;fld='. rawUrlEncode(@$msg['fld']) .'&amp;file='. rawUrlEncode(@$msg['file'])), '" title="', __('abspielen'), '"><img alt="', __('abspielen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/kmix.png" /></a>';
                echo ' <button class="submit plain" name="play" value="', rawUrlEncode(@$msg['fld'] . '--' . @$msg['file']), '" title="', __('abspielen'), '"><img alt="', __('abspielen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/kmix.png" /></button>';
                if (@$msg['cidnum'] != '') {
                    $sudo_url = @$_SESSION['sudo_user']['name'] == @$_SESSION['real_user']['name'] ? '' : '&amp;sudo=' . @$_SESSION['sudo_user']['name'];
                    echo ' &nbsp; <a href="', GS_URL_PATH, 'srv/pb-dial.php?n=', htmlEnt(@$msg['cidnum']), $sudo_url, '" title="', __('w&auml;hlen'), '"><img alt="', __('w&auml;hlen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/yast_PhoneTTOffhook.png" /></a>';
                } else {
                    echo ' &nbsp; <img alt="', __('w&auml;hlen'), '" src="', GS_URL_PATH, 'crystal-svg/16/app/yast_PhoneTTOffhook-cust-dis.png" />';
                }
                echo ' &nbsp;&nbsp; <a href="', gs_url($SECTION, $MODULE, null, 'action=del&amp;fld=' . rawUrlEncode(@$msg['fld']) . '&amp;file=' . rawUrlEncode(@$msg['file'])), '" title="', __('l&ouml;schen'), '"><img alt="l&ouml;schen" src="', GS_URL_PATH, 'img/trash.gif" /></a>';
                echo '</td>', "\n";
                echo '</tr>', "\n";
            }
        }
        ?>
<tr>
	<td colspan="5" class="transp" style="height:0.8em;"></td>
</tr>
<?php 
    }
}
?>
</tbody>
</table>
</form>
示例#14
0
文件: pb-dial.php 项目: rkania/GS3
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
\*******************************************************************/
@header('HTTP/1.0 204 No Content', true, 204);
@header('Status: 204 No Content', true, 204);
@header('Vary: *');
define('GS_VALID', true);
/// this is a parent file
require_once dirName(__FILE__) . '/../../../inc/conf.php';
require_once GS_DIR . 'inc/log.php';
require_once GS_DIR . 'htdocs/gui/inc/session.php';
$number = @$_REQUEST['n'];
$user = @$_SESSION['sudo_user']['name'];
gs_log(GS_LOG_DEBUG, "Dialling from web phonebook from user \"{$user}\" to \"{$number}\" ...");
$url = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT ? ':' . GS_PROV_PORT : '') . GS_PROV_PATH . 'call-init.php?user='******'&to=' . rawUrlEncode($number) . '&' . @session_name() . '=' . @session_id();
ini_set('default_socket_timeout', 4);
/*$out =*/
@file_get_contents($url);
 $outputtext .= "\r\n\t\t<div id='main'>\r\n\t\t";
 while ($order_row = mysqli_fetch_array($result_get_order, MYSQLI_ASSOC)) {
     if ($order_row['delivery'] == 'delivery') {
         $outputtext .= "\r\n\t\t\t\t<a href='javascript:popupEditOrder()' class='orderinfo'>\r\n\t\t\t\t\tDelivery Order\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t" . $order_row['first_name'] . " " . $order_row['last_name'] . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t" . $order_row['phone'] . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t" . $order_row['email'] . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t";
         if ($order_row['del_on_beach'] == 'checked') {
             $outputtext .= "On The Beach At ";
         }
         $outputtext .= $order_row['del_address'] . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t" . $order_row['del_city'] . ", " . $order_row['del_state'] . " " . $order_row['del_zip'] . "\r\n\t\t\t\t</a>\r\n\t\t\t\t";
     } elseif ($order_row['delivery'] == 'pickup') {
         $outputtext .= "\r\n\t\t\t\t<a href='javascript:popupEditOrder()' class='orderinfo'>Pickup Order</a>\r\n\t\t\t\t<br>\r\n\t\t\t\t" . $order_row['first_name'] . " " . $order_row['last_name'] . "\r\n\t\t\t\t<br>\r\n\t\t\t\t" . $order_row['phone'] . "\r\n\t\t\t\t<br>\r\n\t\t\t\t" . $order_row['email'];
     }
     $outputtext .= "\r\n\t\t\t<br>\r\n\t\t\t<br>\r\n\t\t\t<a href='" . 'javascript:setMain("restaurantpage.php?loc_id=' . $loc_id . '&rest_id=' . $rest_id . '");showSide()' . "' class='orderinfo'>Back To Menu</a>\r\n\t\t\t<br>\r\n\t\t\t<br>\r\n\t\t\t<table id='fullorder'>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='5%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='5%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='15%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='20%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='20%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='28%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<colgroup>\r\n\t\t\t\t\t<col width='7%'>\r\n\t\t\t\t</colgroup>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\t&nbsp;\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tQty\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tSize\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tItem\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tOptions\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tNotes\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tPrice\r\n\t\t\t\t\t</th>\r\n\t\t\t\t</tr>\r\n\t\t\t";
     $query_get_item = "\r\n\t\t\tSELECT * FROM Customer_Order_Item \r\n\t\t\tWHERE order_id='{$order_id}' \r\n\t\t\tORDER BY order_item_id\r\n\t\t\t";
     $result_get_item = mysqli_query($dbc, $query_get_item);
     while ($item_row = mysqli_fetch_array($result_get_item, MYSQLI_ASSOC)) {
         $encodedname = rawUrlEncode($item_row['item_name']);
         $order_item_id = $item_row['order_item_id'];
         $query_get_option = "\r\n\t\t\t\tSELECT * FROM Customer_Order_Item_Option \r\n\t\t\t\tWHERE order_id='{$order_id}' AND order_item_id='{$order_item_id}' \r\n\t\t\t\tORDER BY option_order\r\n\t\t\t\t";
         $result_get_option = mysqli_query($dbc, $query_get_option);
         $options = '';
         while ($option_row = mysqli_fetch_array($result_get_option, MYSQLI_ASSOC)) {
             if ($option_row['checked'] == 'checked') {
                 if ($options == '') {
                     $options = $option_row['option_name'];
                 } else {
                     $options .= ',<br>' . $option_row['option_name'];
                 }
             }
         }
         $outputtext .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<i onClick='editOrderItemViewFullOrderPopup(" . $item_row['order_item_id'] . ',"' . $encodedname . '"' . ")' class='icon-pencil'></i>\r\n\t\t\t\t\t\t\t<i onClick='deleteItemViewFullOrderPopup(" . $item_row['order_item_id'] . ")' class='icon-cancel'></i>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $item_row['quantity'] . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $item_row['size_name'] . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $item_row['item_name'] . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $options . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t" . $item_row['notes'] . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class='money'>\r\n\t\t\t\t\t\t\t\$" . $item_row['total_item_cost'] . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
     }
示例#16
0
文件: fax_rec.php 项目: rkania/GS3
<?php 
for ($i = $page * $per_page; $i < $per_page * $page + $per_page; $i++) {
    if ($i < $jobs_rec_count) {
        echo '<tr class="', $i % 2 == 0 ? 'odd' : 'even', '">', "\n";
        echo "<td>", date('d.m.y H:i:s', $jobs_rec[$i][18]), "</td>\n";
        if (@$jobs_rec[$i][15]) {
            echo "<td>", $jobs_rec[$i][15], " </td>\n";
        } else {
            echo "<td>", $jobs_rec[$i][7], "</td>\n";
        }
        echo "<td>", $jobs_rec[$i][5], "</td>\n";
        echo "<td>", round($jobs_rec[$i][10] / 1024), " kB</td>\n";
        echo "<td>", $jobs_rec[$i][12], "</td>\n";
        echo "<td>", $jobs_rec[$i][14], " lpi</td>\n";
        //echo '<td><a href="srv/faxdown.php?file=',$jobs_rec[$i][4],'">', $jobs_rec[$i][4] ,"</a></td>\n";
        echo "<td>", $jobs_rec[$i][1], "</td>\n";
        echo "<td>\n";
        echo '<a href="', $mod_url, '&amp;delete=', $jobs_rec[$i][4], '&amp;page=', $page, '" title="', __('l&ouml;schen'), '"><img alt="', __('l&ouml;schen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
        echo ' &nbsp; <a href="', GS_URL_PATH, 'srv/faxdown.php?file=' . rawUrlEncode($jobs_rec[$i][4]) . '&amp;sudo=' . rawUrlEncode(@$_SESSION['sudo_user']['name']) . '"><img alt="PDF" src="', GS_URL_PATH, 'crystal-svg/16/mime/pdf.png" /></a>' . "\n";
        echo ' &nbsp; <a href="', GS_URL_PATH, 'srv/faxdown.php?raw=' . rawUrlEncode($jobs_rec[$i][4]) . '&amp;sudo=' . rawUrlEncode(@$_SESSION['sudo_user']['name']) . '"><img alt="TIFF" src="', GS_URL_PATH, 'crystal-svg/16/mime/image.png" /></a>' . "\n";
        echo "</td>\n";
        echo "</tr>\n";
    }
}
?>

</tbody>
</table>

     echo '<td class="r" colspan="2">', "\n";
     echo '<button type="submit" name="id" value="' . $group['id'] . '" title="', __('Gruppe Einf&uuml;gen'), '" class="plain"><img alt="', __('Einf&uuml;gen'), '" src="', GS_URL_PATH, 'img/plus.gif" /></button>';
     echo '</td>', "\n";
     echo '</tr>', "\n";
     echo '</form>', "\n";
 }
 foreach ($groups_my_info as $group) {
     echo '<tr class="', $i % 2 === 0 ? 'odd' : 'even', '">', "\n";
     echo '<td class="l nobr">';
     echo $group['name'], '</td>', "\n";
     echo '<td>', $group['title'], '</td>', "\n";
     echo '<td>', $group['type'], '</td>', "\n";
     echo '<td class="r">', count(gs_group_members_get(array($group['id']))), '</td>', "\n";
     echo '<td class="r">', "\n";
     if (!gs_group_connections_get($group['id'])) {
         echo '<a href="', gs_url($SECTION, $MODULE, null, '&amp;qid=' . rawUrlEncode($queue_id) . '&amp;page=' . $page . '&amp;action=remove-group&amp;group=' . $group['id']), '"><img alt="', __('Entfernen'), '" title="', __('Entfernen'), '" src="', GS_URL_PATH, 'img/minus.gif" /></a>';
     }
     echo '</td>', "\n";
     echo '</tr>', "\n";
     $i++;
 }
 echo '</tbody>', "\n";
 echo '</table>', "\n";
 echo '<br />', "\n";
 echo '<h3>', __('Statische'), ' ', __('Agenten'), '</h3><p>';
 echo __('Statische'), ' ', __('Agenten'), ' ', __('sind immer an der Warteschlange angemeldet.');
 echo '<table>';
 echo '<tr>';
 echo '<th>', __('Verf&uuml;gbare'), ' ', __('Agenten'), '</th>';
 echo '<th>', __('Angemeldete'), ' ', __('Agenten'), '</th>';
 echo '</tr><tr><td>';
示例#18
0
#####################################################################
?>



<?php 
#####################################################################
#    avg call duration {
#####################################################################
$w = 580;
$h = 180;
$src = GS_URL_PATH . 'srv/graph.php?';
$args = array('width' => $w, 'height' => $h, 'dataset' => 'avgdur', 'fy' => $fr_y, 'fm' => $fr_m, 'fd' => $fr_d, 'ty' => $to_y, 'tm' => $to_m, 'td' => $to_d, 'ystep' => 0, '_msie' => '.svg');
$i = 0;
foreach ($args as $k => $v) {
    $src .= ($i === 0 ? '' : '&amp;') . rawUrlEncode($k) . '=' . rawUrlEncode($v);
    ++$i;
}
?>

<object
	type="image/svg+xml"
	width="<?php 
echo $w;
?>
"
	height="<?php 
echo $h;
?>
"
	data="<?php 
        echo '<tr><td>', $pen_map['name'], ' ', $pen_map['_title'], '</td>';
        echo '<td>';
        echo '<select name="penalty">';
        foreach ($pen_avail as $pen) {
            if ($pen_map['penalty'] == $pen) {
                echo '<option value="', $pen, '" selected="selected">';
                echo $pen, '</option>';
            } else {
                echo '<option value="', $pen, '">', $pen, ' </option>';
            }
        }
        echo '</select>';
        echo '</td>';
        echo '<td class="l">';
        echo '<button type="submit" title="', __('Speichern'), '" class="plain">';
        echo '<img alt="', __('Speichern'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/filesave.png" /></button>', "\n";
        echo '<input type="hidden" name="action" value="setpenalty" />', "\n";
        echo '<input type="hidden" name="queue_id" value="', $pen_map['_queue_id'], '" />', "\n";
        echo '<input type="hidden" name="edit" value="', rawUrlEncode($edit_user), '">', "\n";
        echo '<input type="hidden" name="name" value="', htmlEnt($name), '" />', "\n";
        echo '<input type="hidden" name="number" value="', htmlEnt($number), '" />', "\n";
        echo '<input type="hidden" name="page" value="', (int) $page, '" />', "\n";
        echo '<input type="hidden" name="sort" value="', $sort, '" />', "\n";
        echo '<input type="hidden" name="sortorder" value="', $sortorder, '" />', "\n";
        echo '</form>';
        echo '<a href="', gs_url($SECTION, $MODULE, null, 'queue_id=' . $pen_map['_queue_id'] . '&amp;edit=' . rawUrlEncode($edit_user) . '&amp;action=delpenalty' . '&amp;name=' . rawUrlEncode($name)), '" title="', __('entfernen'), '"><img alt="', __('entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
        echo '</td>';
        echo '</tr>';
    }
    echo '</tbody></table>';
}
示例#20
0
            echo '</td>', "\n";
            echo '<td>', "\n";
            echo '<button type="submit" title="', __('Speichern'), '" class="plain">';
            echo '<img alt="', __('Speichern'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/filesave.png" />';
            echo '</button>', "\n";
            echo '&nbsp;', "\n";
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'edit=' . $edit_agent), '"><button type="button" title="', __('Abbrechen'), '" class="plain">';
            echo '<img alt="', __('Abbrechen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/cancel.png" />';
            echo '</button></a>', "\n";
            echo '</td>', "\n";
        } else {
            echo '<td class="l">', htmlEnt($queue_name), '</td>', "\n";
            echo '<td class="c">', htmlEnt($penalty), '</td>', "\n";
            echo '<td>', "\n";
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'qedit=' . rawUrlEncode($queue_id) . '&amp;edit=' . rawUrlEncode($edit_agent)), '" title="', __('bearbeiten'), '"><img alt="', __('bearbeiten'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/edit.png" /></a> &nbsp; ';
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'qdelete=' . rawUrlEncode($queue_id) . '&amp;edit=' . rawUrlEncode($edit_agent)), '" title="', __('l&ouml;schen'), '" onclick="return confirm_delete();"><img alt="', __('entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
            echo '</td>', "\n";
        }
        echo '</tr>', "\n";
    }
    ?>
		
		</td>
	</tr>
</thead>
<?php 
    if (!$edit_agent_queue && count($pqueues) > 0) {
        echo '<tbody>', "\n";
        echo '<tr>', "\n";
        echo '<td><select name="queue_add">', "\n";
        if (count($pqueues) > 0) {