GS Wave: Update layout.

This commit is contained in:
Nate
2020-02-03 10:40:33 -07:00
parent 033ea6c5a3
commit c2e8f7cfd1

View File

@@ -115,76 +115,48 @@
//debian
//apt install qrencode
//additional includes
//include the header
$document['title'] = $text['title-gswave'];
require_once "resources/header.php";
//show the content
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-gswave']."</b></td>\n";
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
//echo " <input type='button' class='btn' name='' alt='Grandstream Wave' onclick=\"window.location='http://www.grandstream.com/products/ip-voice-telephony/softphone-app/product/grandstream-wave'\" value='Website'>";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";
echo " <br />".$text['title_description-gswave']."<br /><br />\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<form name='frm' method='get'>\n";
//show the content
echo "<form name='frm' id='frm' method='get' action=''>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-gswave']."</b></div>\n";
echo " <div class='actions'>\n";
echo " <a href='https://play.google.com/store/apps/details?id=com.grandstream.wave' target='_blank'><img src='/app/gswave/resources/images/google_play.png' style='width: auto; height: 30px;' /></a>";
echo " <a href='https://itunes.apple.com/us/app/grandstream-wave/id1029274043?ls=1&mt=8' target='_blank'><img src='/app/gswave/resources/images/apple_app_store.png' style='width: auto; height: 30px;' /></a>";
//echo button::create(['type'=>'button','label'=>'Website','icon'=>'globe','style='margin-left: 15px;','link'=>'http://www.grandstream.com/products/ip-voice-telephony/softphone-app/product/grandstream-wave']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
//echo "<tr>\n";
//echo "<td width='70%' colspan='2' align='left' valign='top'>\n";
//echo " <br />\n";
//echo "</td>\n";
//echo "</tr>\n";
echo $text['title_description-gswave']."\n";
echo "<br /><br />\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' onchange='this.form.submit();' name='id'>\n";
echo " <option value=''></option>\n";
echo "<div style='text-align: center; white-space: nowrap; margin: 10px 0 40px 0;'>";
echo $text['label-extension']."<br />\n";
echo "<select name='id' class='formfld' onchange='this.form.submit();'>\n";
echo " <option value='' >".$text['label-select']."...</option>\n";
if (is_array($extensions) && @sizeof($extensions) != 0) {
foreach($extensions as $row) {
foreach ($extensions as $row) {
$selected = $row['extension_uuid'] == $extension_uuid ? "selected='selected'" : null;
echo " <option value='".escape($row['extension_uuid'])."' ".$selected.">".escape($row['extension'])." ".escape($row['number_alias'])." ".escape($row['description'])."</option>\n";
echo " <option value='".escape($row['extension_uuid'])."' ".$selected.">".escape($row['extension'])." ".escape($row['number_alias'])." ".escape($row['description'])."</option>\n";
}
}
echo " </select>\n";
//echo "<br />\n";
//echo $text['description-extension']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</select>\n";
echo "<tr>\n";
//echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-message']."</b><br><br></td>\n";
echo "<td width='70%' colspan='2' align='left' valign='top'>\n";
echo " <br />\n";
echo " <a href=\"https://play.google.com/store/apps/details?id=com.grandstream.wave\" target=\"_blank\"><img src=\"/app/gswave/resources/images/google_play.png\" style=\"height:71px;\"/></a>";
echo " <a href=\"https://itunes.apple.com/us/app/grandstream-wave/id1029274043?ls=1&mt=8\" target=\"_blank\"><img src=\"/app/gswave/resources/images/apple_app_store.png\" style=\"height:71px;\" /></a>";
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "</form>";
echo "<br />";
echo "</form>\n";
echo "<br>\n";
//stream the file
if (is_uuid($extension_uuid)) {
$include_path = get_include_path();
$xml = html_entity_decode( $xml, ENT_QUOTES, 'UTF-8' );
set_include_path ($_SERVER["PROJECT_ROOT"].'/resources/qr_code');
require_once 'QRErrorCorrectLevel.php';
require_once 'QRCode.php';
require_once 'QRCodeImage.php';
require_once 'resources/qr_code/QRErrorCorrectLevel.php';
require_once 'resources/qr_code/QRCode.php';
require_once 'resources/qr_code/QRCodeImage.php';
try {
$code = new QRCode (- 1, QRErrorCorrectLevel::H);
@@ -195,12 +167,6 @@
$img->draw();
$image = $img->getImage();
$img->finish();
//if ($image) {
// header ( 'Content-Type: image/jpeg' );
// header ( 'Content-Length: ' . strlen ( $imgdata ) );
// echo $image;
//}
}
catch (Exception $error) {
echo $error;
@@ -209,11 +175,12 @@
//html image
if (is_uuid($extension_uuid)) {
echo "<img src=\"data:image/jpeg;base64,". base64_encode($image) ."\">\n";
echo "<img src=\"data:image/jpeg;base64,".base64_encode($image)."\" style='margin-top: 30px; max-width: 100%;'>\n";
}
echo "</div>\n";
//add the footer
set_include_path ($include_path);
require_once "resources/footer.php";
?>
?>