Beispiel #1
0
     $array[0] = $data['favorites'][$selection];
 }
 $return = get_currency($array);
 # Return OK
 if ($return[0]) {
     # Create the object
     $object = new AastraIPPhoneFormattedTextScreen();
     # Display results
     if ($nb_softkeys == 6) {
         # Regular phone
         if ($action == 'display') {
             $object->addLine($data['last']['source'] . ' to ' . $data['last']['target'], NULL, 'center');
         } else {
             $object->addLine($data['favorites'][$selection]['source'] . ' to ' . $data['favorites'][$selection]['target'], NULL, 'center');
         }
         $object->setScrollStart(Aastra_size_formattedtextscreen() - 1);
         $nb_carac = Aastra_size_display_line();
         $object->addLine('');
         $object->addLine(format_line($nb_carac, Aastra_get_label('Last Trade', $language), $return[1][0][1]));
         $object->addLine(format_line($nb_carac, Aastra_get_label('Ask', $language), $return[1][0][4]));
         $object->addLine(format_line($nb_carac, Aastra_get_label('Bid', $language), $return[1][0][5]));
         $object->addLine(format_line($nb_carac, Aastra_get_label('Date', $language), $return[1][0][2]));
         $object->addLine(format_line($nb_carac, Aastra_get_label('Time', $language), $return[1][0][3]));
         $object->addLine(Aastra_get_label('Powered by Yahoo', $language), '', 'center');
         $object->setScrollEnd();
     } else {
         # 6739i
         if ($action == 'display') {
             $object->addLine($data['last']['source'] . ' to ' . $data['last']['target'], 'double', 'center');
         } else {
             $object->addLine($data['favorites'][$selection]['source'] . ' to ' . $data['favorites'][$selection]['target'], 'double', 'center');
     }
     $object->addSoftkey('2', Aastra_get_label('Emotional', $language), $XML_SERVER . '&bdate=' . $bdate . '&I=' . $I . '&E=' . $new . '&P=' . $P);
     if ($P == 1) {
         $new = 0;
     } else {
         $new = 1;
     }
     $object->addSoftkey('3', Aastra_get_label('Physical', $language), $XML_SERVER . '&bdate=' . $bdate . '&I=' . $I . '&E=' . $E . '&P=' . $new);
 } else {
     # Display results
     if (Aastra_is_formattedtextscreen_supported()) {
         # create object
         $object = new AastraIPPhoneFormattedTextScreen();
         if (Aastra_size_formattedtextscreen() > 3) {
             $object->addLine(Aastra_get_label('BIORHYTHMS', $language));
             if (Aastra_size_formattedtextscreen() > 4) {
                 $object->addLine('');
             }
             $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I']));
             $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E']));
             $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P']));
         } else {
             $object->setScrollStart('2');
             $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I']));
             $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E']));
             $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P']));
             $object->setScrollEnd();
         }
     } else {
         # create object
         $object = new AastraIPPhoneTextScreen();
Beispiel #3
0
 } else {
     # External call
     $line[] = array($number, 'double' . 'green');
     $line[] = array($callerid);
 }
 # Format the display
 if (Aastra_is_formattedtextscreen_color_supported()) {
     for ($i = 0; $i < 5; $i++) {
         $object->addLine('');
     }
     foreach ($line as $value) {
         $object->addLine($value[0], $value[1], NULL, $value[2]);
     }
 } else {
     $count = count($line);
     $size = Aastra_size_formattedtextscreen();
     if ($size >= $count) {
         $extra = ($size - $count) / 2;
         for ($i = 0; $i < $extra; $i++) {
             $object->addLine('');
         }
         foreach ($line as $value) {
             $object->addLine($value[0]);
         }
     } else {
         $index = 1;
         foreach ($line as $value) {
             if ($index == '2') {
                 $object->setScrollStart($size - 1);
             }
             $object->addLine($value[0]);