Example #1
0
function setting( $name, $idx, $val, $attrs=null, $writeable=false, $xml=false )
{
	if ($xml === true)
		echo '  <ConfigurationItem><Parameter>', $name , ($idx>0? ' '.$idx :'') ,'</Parameter><Value>', htmlEnt(str_replace(array("\n", "\r"), array(' ', ' '), $val)) , '</Value></ConfigurationItem>', "\n";
	else
		echo ($writeable == false ? '!' : ''), $name , ($idx>0? ' '.$idx :'') ,': ', str_replace(array("\n", "\r"), array(' ', ' '), $val) ,"\n";
}
Example #2
0
File: dnd.php Project: rkania/GS3
function _err($msg = "")
{
    @ob_end_clean();
    ob_start();
    echo "<html>\n";
    echo "<head><title>" . __("Fehler") . "</title></head>\n";
    echo "<body><b>" . __("Fehler") . "</b>: " . htmlEnt($msg) . "</body>\n";
    echo "</html>\n";
    _ob_send();
}
function _grandstream_xml_esc($str)
{
    /*
    return str_replace(
    	array('&'    , '"'     , '\''    , '<'   , '>'   ),
    	array('&amp;', '&quot;', '&apos;', '&gt;', '&lt;'),
    	utf8_strip_invalid( $str ));
    */
    return htmlEnt($str);
}
Example #4
0
function _err($msg = '')
{
    @ob_end_clean();
    ob_start();
    echo '<html>', "\n";
    echo '<head><title>' . __('Fehler') . '</title></head>', "\n";
    echo '<body><b>' . __('Fehler') . '</b>: ' . htmlEnt($msg) . '</body>', "\n";
    echo '</html>', "\n";
    _ob_send();
}
Example #5
0
File: pb.php Project: rkania/GS3
function write_alert($message, $alert_type = 'ERROR')
{
    xml('<' . '?xml version="1.0" encoding="UTF-8" ?' . '>');
    xml('<IppDisplay>');
    xml('<IppScreen ID="1" HiddenCount="0" CommandCount="0">');
    xml('  <IppAlert Type="' . htmlEnt($alert_type) . '" Delay="5000">');
    xml('    <Title>' . htmlEnt(__('Fehler')) . '</Title>');
    xml('    <Text>' . htmlEnt($message) . '</Text>');
    xml('    <Image></Image>');
    xml('  </IppAlert>');
    xml('</IppScreen>');
    xml('</IppDisplay>');
    xml_output();
}
Example #6
0
 /**
  * Edit a selected content, or prepare to create new content if argument is missing.
  *
  * @param id integer the id of the content.
  */
 public function Edit($id = null)
 {
     $content = new ContentModel($id);
     $form = new FormContent($content);
     $status = $form->Check();
     if ($status === false) {
         $this->AddMessage('error', 'The form could not be processed.');
         $this->RedirectToController('edit', $id);
     } else {
         if ($status === true) {
             $this->RedirectToController('edit', $content['id']);
         }
     }
     $title = isset($id) ? 'Edit' : 'Create';
     $this->views->SetTitle("{$title} content: " . htmlEnt($content['title']))->AddInclude(HAL_INSTALL_PATH . '/view/contentedit.tpl.php', array('user' => $this->user, 'content' => $content, 'form' => $form));
 }
Example #7
0
 /**
 * Display a page.
 *
 * @param $id integer the id of the page.
 */
 public function View($id = null)
 {
     $content = new CMContent($id);
     if (!isset($this->user->profile['hasRoleAdmin'])) {
         if (isset($content->data['type'])) {
         } else {
             $this->RedirectTo('user', 'index');
         }
         if ($content->data['type'] == 'post') {
             $this->views->SetTitle('Page: ' . htmlEnt($content['title']))->AddInclude(__DIR__ . '/index.tpl.php', array('content' => $content));
         } else {
             $this->RedirectTo('user', 'index');
         }
     } else {
         if (isset($content->data['type'])) {
         } else {
             $this->RedirectTo('user', 'index');
         }
         $this->views->SetTitle('Page: ' . htmlEnt($content['title']))->AddInclude(__DIR__ . '/index.tpl.php', array('content' => $content));
     }
 }
Example #8
0
     }
     echo '</td>', "\n";
     echo '<td>';
     if ($phone['user_id'] > 0) {
         if ($phone['exten'] != '') {
             echo htmlEnt($phone['exten']);
         } else {
             echo '-';
         }
     } else {
         echo '?';
     }
     echo '</td>', "\n";
     echo '<td>';
     if ($phone['firmware_cur'] != '') {
         echo htmlEnt($phone['firmware_cur']);
     } else {
         echo '?';
     }
     echo '</td>', "\n";
     /*
     echo '<td>';
     echo '<select name="firmware_upgrade">' ,"\n";
     echo '<option value="">-</option>' ,"\n";
     //...
     echo '</select>' ,"\n";
     echo '</td>' ,"\n";
     */
     echo '</tr>', "\n";
     ++$i;
 }
Example #9
0
File: mon.php Project: rkania/GS3
            }
            $first_digit = $new_first_digit;
            //echo '<div class="first-digit">', $first_digit ,'</div>' ,"\n";
        }
        echo '<div class="e e_ukn" id="e', $ext, '">';
        echo '<span class="num">', $ext, '</span>';
        //echo '<span class="nam">', $ext_info['abbr'] ,'</span>';
        $ext_info['ln'] = $ext_info['ln'];
        $abbr = mb_strCut($ext_info['ln'], 0, 18 - strLen($ext) * 2.8);
        if (mb_strLen($abbr) < 9 && trim($ext_info['fn']) != '') {
            $abbr = mb_subStr($ext_info['fn'], 0, 1) . '. ' . $abbr;
        }
        if (mb_strLen($ext_info['ln']) > mb_strLen($abbr)) {
            $abbr = mb_strCut($abbr, 0, -1) . '.';
        }
        echo '<span class="nam">', htmlEnt($abbr), '</span>';
        echo '<span class="link" id="e', $ext, 'l"></span>';
        echo '</div>', "\n";
    }
    echo '<br class="nofloat" />', "\n";
    echo '</div>', "\n";
}
?>




<br />

<div style="float:left; width:40%; color:#ddd;"><small>Status: <span id="mon-status">---</span></small></div>
Example #10
0
    $user = trim(@$_REQUEST['u']);
    ob_start();
    echo $phonemenu_doctype . "\n";
    echo '<html>', "\n";
    echo "<head><title>" . htmlEnt(__("Konfigurationsmenü")) . "</title></head>\n";
    echo '<body><br />', "\n";
    echo '- <a href="' . $url_polycom_menu . '?m=' . $mac . '&amp;u=' . $user . '&amp;t=forward">' . htmlEnt(__("Rufumleitung")) . '</a><br />', "\n";
    echo '- <a href="' . $url_polycom_provdir . 'features.php?m=' . $mac . '&amp;u=' . $user . '&amp;t=forward">' . htmlEnt(__("Dienstmerkmale")) . '</a><br />', "\n";
    //	echo '- <a href="'. $url_polycom_provdir .'rt.php?m='. $mac .'&amp;u='. $user .'&amp;t=forward">'. __("Klingelt\xC3\xB6ne") .'</a><br />',"\n";
    echo '- <a href="Key:Setup">' . htmlEnt(__("Lokale Telefoneinstellungen")) . '</a><br />', "\n";
    echo '</body>', "\n";
    echo "</html>\n";
    _ob_send();
}
#################################### INITIAL SCREEN }
#################################### FORWARD SCREEN {
if ($type == 'forward') {
    $mac = preg_replace('/[^\\dA-Z]/', '', strtoupper(trim(@$_REQUEST['m'])));
    $user = trim(@$_REQUEST['u']);
    ob_start();
    echo $phonemenu_doctype . "\n";
    echo '<html>', "\n";
    echo '<head><title>' . htmlEnt(__("Rufumleitung")) . '</title></head>', "\n";
    echo '<body><br />', "\n";
    echo '- <a href="' . $url_polycom_provdir . 'callforward.php?m=' . $mac . '&amp;u=' . $user . '">' . htmlEnt(__("Rufumleitung")) . '</a><br />', "\n";
    echo '- <a href="' . $url_polycom_provdir . 'extnumbers.php?m=' . $mac . '&amp;u=' . $user . '">' . htmlEnt(__("Externe Nummern")) . '</a><br />', "\n";
    echo '</body>', "\n";
    echo '</html>', "\n";
    _ob_send();
}
#################################### FORWARD SCREEN }
Example #11
0
			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) ."\"><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=\"r\">". htmlEnt($r['id']) ."</td>\n";

			echo "<td>". htmlEnt($r['description']) ."</td>\n";

			echo "<td class=\"r\">". $r_length ."</td>\n";
			echo "<td class=\"r\">". $r_created ."</td>\n";

			echo "<td>\n";
			echo "<a href=\"". gs_url($SECTION, $MODULE, null, "playback=". $r['id'] ."&amp;page=". $page ."&amp;phonenum=". $_SESSION["real_user"]["info"]["ext"]) ."\" title=\"". __('abspielen') ."\"><img alt=\"". __('abspielen') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/app/kmix.png\" /></a> &nbsp; ";
			echo "<a href=\"". gs_url($SECTION, $MODULE, null, "edit=". $r['id'] ."&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=\"". __('l&ouml;schen') ."\"><img alt=\"". __('entfernen') ."\" src=\"". GS_URL_PATH ."crystal-svg/16/act/editdelete.png\" /></a>";
			echo "</td>\n";
		}

		echo "</tr>\n";
	}
}
Example #12
0
function tiptelXmlEsc($str)
{
    return htmlEnt($str);
}
Example #13
0
/**
 * Escape data to make it safe to write in the browser.
 *
 * @param $str string to escape.
 * @returns string the escaped string.
 */
function esc($str)
{
    return htmlEnt($str);
}
Example #14
0
                 $member['name'] .= htmlEnt($r['firstname']);
             }
             if ($queues[$r['queue']]['display_name'] == 3) {
                 $member['name'] .= htmlEnt($r['firstname']) . ' ' . htmlEnt($r['lastname']);
             }
             if ($queues[$r['queue']]['display_name'] == 4) {
                 $member['name'] .= htmlEnt($r['lastname']) . ', ' . htmlEnt($r['firstname']);
             }
             if ($queues[$r['queue']]['display_name'] == 5) {
                 $member['name'] .= htmlEnt($r['lastname']) . ', ' . htmlEnt(substr($r['firstname'], 0, 1)) . '.';
             }
             if ($queues[$r['queue']]['display_name'] == 6) {
                 $member['name'] .= htmlEnt(substr($r['firstname'], 0, 1)) . '. ' . htmlEnt($r['lastname']);
             }
             if ($queues[$r['queue']]['display_name'] == 7) {
                 $member['name'] .= htmlEnt(substr($r['firstname'], 0, 1)) . '.' . htmlEnt(substr($r['lastname'], 0, 1)) . '.';
             }
         }
         $member['ext'] = $r['ext'];
         if (!array_key_exists($r['queue'], $members)) {
             $members[$r['queue']] = array();
         }
         if ($queues[$r['queue']]['active']) {
             $members[$r['queue']][] = $member;
         }
     }
 }
 foreach ($members as $queue => $queue_members) {
     $queues[$queue]['members'] = $queue_members;
 }
 $queuemon_data['queues'] = array();
Example #15
0
 $num_pages = ceil($num_total / $per_page);
 if ($name_search) {
     $page_title = $name_search;
 } else {
     $page_title = $typeToTitle[$type];
 }
 if ($num_pages > 1) {
     $page_title .= ' ' . ($page + 1) . '/' . $num_pages;
 }
 if ($rs && $rs->numRows() !== 0) {
     $xml = '<AastraIPPhoneTextMenu destroyOnExit="yes" LockIn="no" style="none" cancelAction="' . $url_aastra_pb . '">' . "\n";
     $xml .= '<Title>' . $page_title . '</Title>' . "\n";
     while ($r = $rs->fetchRow()) {
         $name = $r['ln'] . (strLen($r['fn']) > 0 ? ', ' . $r['fn'] : '');
         $xml .= '<MenuItem>' . "\n";
         $xml .= '	<Prompt>' . htmlEnt($name) . ' - ' . $r['number'] . '</Prompt>' . "\n";
         $xml .= '	<Dial>' . $r['number'] . '</Dial>' . "\n";
         $xml .= '	<URI>' . $url_aastra_pb . '?t=prvs&amp;e=' . $r['id'] . '</URI>' . "\n";
         $xml .= '</MenuItem>' . "\n";
     }
     $xml .= '<SoftKey index="1">' . "\n";
     $xml .= '	<Label>' . __('OK') . '</Label>' . "\n";
     $xml .= '	<URI>SoftKey:Select</URI>' . "\n";
     $xml .= '</SoftKey>' . "\n";
     $xml .= '<SoftKey index="2">' . "\n";
     $xml .= '	<Label>' . __('Anrufen') . '</Label>' . "\n";
     $xml .= '	<URI>SoftKey:Dial2</URI>' . "\n";
     $xml .= '</SoftKey>' . "\n";
     $xml .= '<SoftKey index="4">' . "\n";
     $xml .= '	<Label>' . __('Abbrechen') . '</Label>' . "\n";
     $xml .= '	<URI>SoftKey:Exit</URI>' . "\n";
        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>';
}
Example #17
0
            case 'firmware':
                echo htmlEnt('Firmware');
                break;
            case 'settings':
                echo htmlEnt('Konfig.');
                break;
            default:
                echo htmlEnt($job['type']);
        }
        echo '</td>', "\n";
        echo '<td>', htmlEnt($job['data']), '</td>', "\n";
        echo '<td class="c">', htmlEnt($job['minute']), '</td>', "\n";
        echo '<td class="c">', htmlEnt($job['hour']), '</td>', "\n";
        echo '<td class="c">', htmlEnt($job['day']), '</td>', "\n";
        echo '<td class="c">', htmlEnt($job['month']), '</td>', "\n";
        echo '<td class="c">', htmlEnt($job['dow']), '</td>', "\n";
        echo '<td class="c">', "\n";
        echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=delete&amp;job=' . $job['id'] . '&amp;page=' . $page), '" title="', __('l&ouml;schen'), '"><img alt="', __('entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
        echo '</td>', "\n";
        echo '</tr>', "\n";
        ++$i;
    }
    ?>
</tbody>
</table>


<?php 
}
#####################################################################
#  view }
Example #18
0
</tr>
</thead>
<tbody>

<?php 
$sudo_url = @$_SESSION['sudo_user']['name'] == @$_SESSION['real_user']['name'] ? '' : '&amp;sudo=' . @$_SESSION['sudo_user']['name'];
if (@$rs) {
    $i = 0;
    while ($r = $rs->fetchRow()) {
        echo '<tr class="', ++$i % 2 == 0 ? 'even' : 'odd', '">';
        echo '<td>', htmlEnt($r['datum']), '</td>';
        echo '<td>', htmlEnt($r['src']), '</td>';
        if ($r['dcontext'] != "dial-gateway-do") {
            echo '<td>', htmlEnt($r['dst']), '</td>';
        } else {
            echo '<td>', htmlEnt($r['userfield']), '</td>';
        }
        echo '<td>', sec_to_hours($r['billsec']), '</td>';
        echo '<td>';
        switch ($r['disposition']) {
            case 'ANSWERED':
                echo '<img alt=" " src="', GS_URL_PATH, 'crystal-svg/16/act/greenled.png" /> ', __('angenommen');
                break;
            case 'NO ANSWER':
                echo '<img alt=" " src="', GS_URL_PATH, 'crystal-svg/16/act/free_icon.png" /> ', __('keine Antwort');
                break;
            case 'FAILED':
                echo '<img alt=" " src="', GS_URL_PATH, 'crystal-svg/16/act/redled.png" /> ', __('fehlgeschlagen');
                break;
            case 'BUSY':
                echo '<img alt=" " src="', GS_URL_PATH, 'crystal-svg/16/act/yellowled.png" /> ', __('besetzt');
Example #19
0
 public function dok()
 {
     $content = new CMContent(21);
     $this->views->SetTitle('' . htmlEnt($content['title']))->AddInclude(__DIR__ . '/page.tpl.php', array('content' => $content));
 }
Example #20
0
	<th></th>
</tr>
</thead>
<tbody>
<h2><?php 
echo __('Parallelruf');
?>
</h2>
<?php 
$rs = $DB->execute('SELECT * from `queue_cf_parallelcall` WHERE `_queue_id`=' . $queue_id);
$ncnt = 0;
while ($r = $rs->fetchRow()) {
    echo "<tr>\n";
    echo "<td>" . ++$ncnt . "</td>";
    echo "<td>";
    echo '<input type="text" name="number_' . $r['id'] . '" value="' . htmlEnt($r['number']) . '" size="61" maxlength="20"/>';
    echo "</td>";
    echo "<td>";
    echo '<a href="', gs_url($SECTION, $MODULE, null, 'delete=' . $r['id'] . '&amp;action=saveparcall&amp;queue=' . $queue_ext), '">', '<img alt="', __('Entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" />', '</a>', "\n";
    echo "</td>";
    echo "</tr>\n";
}
?>
<tr>
	<td><?php 
echo __('Neu');
?>
:</td>
	<td>
		<input type="text" name="number_new" value="" size="61" maxlength="20"/>
	</td>
    unset($dispatcher_errors_html);
    if (!@array_key_exists('boi_url', @$MODULES[$SECTION]['sub'][$MODULE])) {
        echo 'Error.';
    } else {
        echo '<iframe id="boi-content" src="';
        echo $reverse_proxy;
        unset($reverse_proxy);
        /*
        include_once( GS_DIR .'inc/boi-soap/boi-soap.php' );
        echo _gs_boi_ssl_is_possible($_SESSION['sudo_user']['boi_host']) ? 'https':'http';
        */
        echo 'http';
        echo '/', $_SESSION['sudo_user']['boi_host'];
        echo htmlEnt($MODULES[$SECTION]['sub'][$MODULE]['boi_url']);
        echo strPos($MODULES[$SECTION]['sub'][$MODULE]['boi_url'], '?') === false ? '?' : '&amp;';
        echo 'SESSID=', htmlEnt(@$_SESSION['sudo_user']['boi_session']);
        echo '"></iframe>', "\n";
    }
    echo '</div>', "\n";
    echo '<script type="text/javascript">try {gs_sandbox_iframe("boi-content");} catch(e){}</script>', "\n";
}
?>

</div>

<div class="nofloat"></div>
<div id="copyright"><a target="_blank" href="http://www.amooma.de/gemeinschaft/">www.amooma.de/gemeinschaft</a><br />
<a target="_blank" href="http://www.amooma.de/"><img alt="&copy; amooma" src="<?php 
echo GS_URL_PATH;
?>
img/amooma-c.gif" /></a></div>
Example #22
0
            echo '<input type="hidden" name="save" value="', $r['id'], '" />';
            echo '<input type="hidden" name="page" value="', $page, '" />';
            echo '<button type="submit" title="', __('Eintrag speichern'), '" class="plain">';
            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) {
Example #23
0
echo '</tr>', "\n";
echo '</thead>', "\n";
echo '<tbody>', "\n";
for ($idx = 0; $idx <= 137; ++$idx) {
    echo '<tr>', "\n";
    $key_name = 'f' . str_pad($idx, 3, '0', STR_PAD_LEFT);
    $keydefs = $GS_Softkeys->get_key($key_name);
    if (array_key_exists('slf', $keydefs)) {
        $key = $keydefs['slf'];
    } elseif (array_key_exists('inh', $keydefs)) {
        $key = $keydefs['inh'];
    }
    echo '<td>', htmlEnt($key['key']), '</td>', "\n";
    echo '<td>', htmlEnt($key['function']), '</td>', "\n";
    echo '<td>', htmlEnt($key['data']), '</td>', "\n";
    echo '<td>', htmlEnt($key['label']), '</td>', "\n";
    echo '<td>', $key['user_writeable'] ? __('nein') : __('ja'), '</td>', "\n";
    echo '<td>';
    switch ($key['_set_by']) {
        case 'g':
            echo __('Gruppe'), ' #', $key['_setter'];
            break;
        case 'u':
            echo __('Benutzer');
            break;
        case 'p':
            echo __('autom.');
            break;
        default:
            echo '?';
            break;
    } else {
        echo '<img alt="', __('weiter'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/next_notavail.png" />', "\n";
    }
    echo '</nobr>';
    ?>
	</th>
</tr>
</thead>
<tbody>

<?php 
    $i = 0;
    while ($r = $rs->fetchRow()) {
        echo '<tr class="', ++$i % 2 ? 'odd' : 'even', '">', "\n";
        echo '<td>', htmlEnt($r['name']), '</td>', "\n";
        echo '<td>', htmlEnt($r['_title']), '</td>', "\n";
        echo '<td class="r">', $r['maxlen'], '</td>', "\n";
        echo '<td>', $r['_host_id'], ' (', @$hosts[$r['_host_id']], ')</td>', "\n";
        echo '<td class="">', "\n";
        echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=edit&amp;qid=' . $r['_id'] . '&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, 'action=del&amp;qid=' . $r['_id'] . '&amp;qname=' . $r['name'] . '&amp;page=' . $page), '" 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";
    }
    echo '<tr class="', ++$i % 2 ? 'odd' : 'even', '">', "\n";
    echo '<td colspan="4" class="transp">&nbsp;</td>', "\n";
    echo '<td class="transp">', "\n";
    echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=edit&amp;qid=0&amp;page=' . $page), '" title="', __('neue Warteschlange anlegen'), '"><img alt="', __('hinzuf&uuml;gen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/edit.png" /></a> &nbsp; ';
    echo '</td>', "\n";
    echo '</tr>', "\n";
    ?>
Example #25
0
 /**
 * Edit a selected content, or prepare to create new content if argument is missing.
 *
 * @param id integer the id of the content.
 */
 public function Edit($id = null)
 {
     $content = new CMContent($id);
     $return = 'user';
     if (isset($id)) {
         if ($content->data['idUser'] == $this->user->profile['id'] || ($content->data['idUser'] == 1 || $this->user->profile['id'] == 2)) {
             if (!isset($this->user->profile['hasRoleAdmin'])) {
                 if (isset($content->data['type'])) {
                     if ($content->data['type'] == 'page') {
                         $this->RedirectTo($return);
                     }
                 }
             }
             if (!isset($this->user->profile['hasRoleAdmin'])) {
                 $form = new CFormBlog($content);
             } else {
                 $form = new CFormContent($content);
             }
             $status = $form->Check();
             if ($status === false) {
                 $this->AddMessage('notice', 'The form could not be processed.');
                 $this->RedirectToController('edit', $id);
             } else {
                 if ($status === true) {
                     $this->RedirectToController('edit', $content['id']);
                 }
             }
             $title = isset($id) ? 'Edit' : 'Create';
             $this->views->SetTitle("{$title} content: " . htmlEnt($content['title']))->AddInclude(__DIR__ . '/edit.tpl.php', array('user' => $this->user, 'content' => $content, 'form' => $form));
         } else {
             $this->RedirectTo('user', 'index');
         }
     } else {
         if (!isset($this->user->profile['hasRoleAdmin'])) {
             if (isset($content->data['type'])) {
                 if ($content->data['type'] == 'page') {
                     $this->RedirectTo($return);
                 }
             }
         }
         if (!isset($this->user->profile['hasRoleAdmin'])) {
             $form = new CFormBlog($content);
         } else {
             $form = new CFormContent($content);
         }
         $status = $form->Check();
         if ($status === false) {
             $this->AddMessage('notice', 'The form could not be processed.');
             $this->RedirectToController('edit', $id);
         } else {
             if ($status === true) {
                 $this->RedirectToController('edit', $content['id']);
             }
         }
         $title = isset($id) ? 'Edit' : 'Create';
         $this->views->SetTitle("{$title} content: " . htmlEnt($content['title']))->AddInclude(__DIR__ . '/edit.tpl.php', array('user' => $this->user, 'content' => $content, 'form' => $form));
     }
 }
Example #26
0
        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>

Example #27
0
?>
</select>

&nbsp;&nbsp;&nbsp;

<label for="ipt-queue_id"><?php 
echo __('Warteschlange');
?>
:</label>
<select name="queue_id" id="ipt-queue_id">
<?php 
$rs = $DB->execute('SELECT `_id`, `name`, `_title` FROM `ast_queues` WHERE `_id` IN (' . implode(',', $queue_groups) . ') ORDER BY `name`');
echo '<option value="0"> - </option>', "\n";
if ($rs) {
    while ($r = $rs->fetchrow()) {
        echo '<option value="', $r['_id'], '"', $r['_id'] == $queue_id ? ' selected="selected"' : '', '>', $r['name'], ' (', htmlEnt($r['_title']), ')', '</option>', "\n";
    }
}
?>
</select>

&nbsp;&nbsp;&nbsp;

<label for="ipt-month"><?php 
echo __('Woche');
?>
:</label>
<select name="day" id="ipt-month">
<?php 
$t = time();
$month_d = 0;
Example #28
0
    ?>
</th>
	<th style="width:20px;"></th>
</tr>
</thead>
<tbody>

<?php 
    $rs = $DB->execute('SELECT `cid_int`, `cid_ext` FROM `gate_cids` WHERE `grp_id`=' . $ggid);
    if (@$DB->numFoundRows() < 1) {
        //echo '<tr><td><i>- ', __('keine'), ' -</i></td><td></td><td></td></tr>';
    } else {
        while ($cid_map = $rs->fetchRow()) {
            echo '<tr>';
            echo '<td>', htmlEnt($cid_map['cid_int']), '</td>';
            echo '<td>', htmlEnt($cid_map['cid_ext']), '</td>';
            echo '<td>';
            echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=gdelcid&amp;gg-id=' . $ggid . '&amp;cid-int=' . urlEncode($cid_map['cid_int'])), '" title="', __('entfernen'), '"><img alt="', __('entfernen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
            echo '</td>';
            echo '</tr>', "\n";
        }
    }
    echo '<tr>';
    echo '<td>';
    echo '<input type="text" name="cid-int" value="" size="20" maxlength="30" />';
    echo '</td>';
    echo '<td>';
    echo '<input type="text" name="cid-ext" value="" size="20" maxlength="30" />';
    echo '</td>';
    echo '<td>';
    echo '<button type="submit" title="', __('Eintrag speichern'), '" class="plain"><img alt="', __('Speichern'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/filesave.png" /></button>';
     echo '<tr class="', $i % 2 === 0 ? 'odd' : 'even', '">', "\n";
     /*
     if (subStr($gw['name'],0,3)==='gw_')
     	$gw['name'] = subStr($gw['name'],3);
     echo '<td><tt>gw_</tt><input type="text" name="gw-',$gw['id'],'-name" value="', htmlEnt($gw['name']) ,'" size="20" maxlength="20" style="font-family:monospace;" /></td>',"\n";
     */
     echo '<td><b>', htmlEnt($gw['title']), '</b></td>', "\n";
     echo '<td>';
     if ($gw['gg_id'] > 0) {
         echo htmlEnt($gw['gg_title']);
     } else {
         echo '<i>-- ', __('nicht zugeordnet'), ' --</i>';
     }
     echo '</td>', "\n";
     //echo '<td><input type="checkbox" name="gw-',$gw['id'],'-allow_out" value="1" ', ($gw['allow_out'] ? 'checked="checked" ' : '') ,'/></td>',"\n";
     echo '<td>', htmlEnt($gw['host']), '</td>', "\n";
     /*
     echo '<td>';
     if (@$regs[$gw['name']])
     	echo '<img alt=" " src="', GS_URL_PATH ,'crystal-svg/16/act/greenled.png" />';
     else
     	echo '&nbsp;';
     echo '</td>',"\n";
     */
     echo '<td>', "\n";
     echo '<a href="', gs_url($SECTION, $MODULE, null, 'action=edit&amp;gw-id=' . $gw['id']), '" 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, 'action=del&amp;gw-id=' . $gw['id']), '" title="', __('l&ouml;schen'), '" onclick="return confirm_delete();"><img alt="', __('l&ouml;schen'), '" src="', GS_URL_PATH, 'crystal-svg/16/act/editdelete.png" /></a>';
     echo '</td>', "\n";
     echo '</tr>', "\n";
     ++$i;
 }
Example #30
0
</tr>
</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>