Esempio n. 1
0
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
\*******************************************************************/
defined('GS_VALID') or die('No direct access.');
include_once GS_DIR . 'inc/gs-fns/gs_keys_get.php';
echo '<h2>';
if (@$MODULES[$SECTION]['icon']) {
    echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> ';
}
if (count($MODULES[$SECTION]['sub']) > 1) {
    echo $MODULES[$SECTION]['title'], ' - ';
}
echo $MODULES[$SECTION]['sub'][$MODULE]['title'];
echo '</h2>', "\n";
$phone_type = 'snom-370';
$GS_Softkeys = gs_get_key_prov_obj($phone_type, $DB);
if (!$GS_Softkeys->set_user($_SESSION['sudo_user']['name'])) {
    echo __('Fehler beim Abfragen.');
    return;
}
if (!$GS_Softkeys->retrieve_keys($phone_type)) {
    echo __('Fehler beim Abfragen.');
    return;
}
//$keys = $GS_Softkeys->get_keys();
echo '<table cellspacing="1">', "\n";
echo '<thead>', "\n";
echo '<tr>', "\n";
echo '<th>', __('Taste'), '</th>', "\n";
echo '<th>', __('Funktion'), '</th>', "\n";
echo '<th>', __('Nummer/Daten'), '</th>', "\n";
Esempio n. 2
0
	`users` `u` JOIN
	`ast_sipfriends` `s` ON (`s`.`_user_id`=`u`.`id`)
WHERE `u`.`id`=' . $user_id);
$user = $rs->fetchRow();
$user_name = $user['user'];
# PDF erzeugen
$pdf = new PDF('P', 'mm', 'A4');
$pdf->AliasNbPages();
# PDF Variablen setzen
$pdf->firstname = $user['fn'];
$pdf->lastname = $user['ln'];
$pdf->ext = $user['ext'];
foreach ($phone_types as $phone_type_name => $phone_type_title) {
    if ($phone_type_name === $phone_type) {
        $softkeys = null;
        $GS_Softkeys = gs_get_key_prov_obj($phone_type_name);
        $GS_Softkeys->set_user($user_name);
        $GS_Softkeys->retrieve_keys($phone_type_name);
        $softkeys = $GS_Softkeys->get_keys();
        $pdf->AddPage();
        $pdf->SetFont('Arial', '', 8);
        //$pdf->SetFillColor(224, 235, 255);
        $pdf->SetFillColor(100, 149, 237);
        $pdf->SetTextColor(0, 0, 0);
        $key_levels = null;
        if (subStr($phone_type_name, 0, 4) === 'snom') {
            $phone_layout = 'snom';
            $key_levels = array(0 => array('from' => 0, 'to' => 11, 'title' => $phone_type_title, 'X' => 10, 'Y' => 30, 'width' => 19), 1 => array('from' => 12, 'to' => 32, 'title' => __('Erweiterungs-Modul') . ' 1', 'X' => 75, 'Y' => 30, 'width' => 19), 2 => array('from' => 33, 'to' => 53, 'title' => __('Erweiterungs-Modul') . ' 2', 'X' => 140, 'Y' => 30, 'width' => 19), 3 => array('from' => 54, 'to' => 74, 'title' => __('Erweiterungs-Modul') . ' 3', 'X' => 10, 'Y' => 30, 'width' => 19), 4 => array('from' => 75, 'to' => 95, 'title' => __('Erweiterungs-Modul') . ' 4', 'X' => 75, 'Y' => 30, 'width' => 19));
        } elseif (subStr($phone_type_name, 0, 11) === 'grandstream') {
            $phone_layout = 'grandstream';
            $key_levels = array(0 => array('from' => 0, 'to' => 6, 'title' => $phone_type_title, 'X' => 10, 'Y' => 30, 'width' => 30), 1 => array('from' => 0, 'to' => 13, 'title' => $phone_type_title . ' ' . __('Erweiterungs-Modul') . ' 1', 'X' => 10, 'Y' => 30, 'width' => 24), 2 => array('from' => 0, 'to' => 13, 'title' => $phone_type_title . ' ' . __('Erweiterungs-Modul') . ' 2', 'X' => 10, 'Y' => 30, 'width' => 24));