예제 #1
0
 private function fail_login($msg)
 {
     if (function_exists('failed_login')) {
         $fail_ret_val = call_user_func('failed_login');
         if ($fail_ret_val) {
             $msg = $fail_ret_val;
         }
     }
     $page = new message($msg);
     $page->render();
     exit(0);
 }
예제 #2
0
파일: ajax.php 프로젝트: swk/bluebox
<?php

echo $js;
echo $css;
?>

<?php 
message::render();
?>

<?php 
$content = (string) $content;
if (empty($content)) {
    echo 'NO CONTENT';
} else {
    echo $content;
}
?>

<?php 
javascript::renderCodeBlocks();
예제 #3
0
파일: bluebox.php 프로젝트: Jaybee-/bluebox
 /**
  * This function will close a qtipAjaxForm with a message and action
  *
  * @param Doctrine_Record The newly created doctrine record
  * @param bool If true this it will force the reply even if no qtipAjaxForm is present
  */
 public function returnQtipAjaxForm($object = NULL, $force = FALSE)
 {
     if (!empty($_REQUEST['qtipAjaxForm']) || $force) {
         if (headers_sent()) {
             kohana::log('error', 'Unable to reply to modal because headers are already sent');
             die;
         }
         $this->template->content = new View('generic/blank');
         header("X-AjaxForm-Status: complete");
         if (method_exists($this, 'qtipAjaxReturn')) {
             $this->qtipAjaxReturn($object);
         }
         message::render(array(), array('growl' => TRUE, 'html' => FALSE));
         $this->_render();
         flush();
         die;
     }
 }
예제 #4
0
파일: layout.php 프로젝트: swk/bluebox
//));
?>
            </div>

            <h2><?php 
echo __($title);
?>
</h2>

            <div class="bluebox_desc">
            <?php 
echo __('Our free software. Your next voip system.');
?>
            </div>
            <?php 
message::render(NULL, array('growl' => FALSE, 'html' => TRUE));
?>
        </div>

        <div class="content">

            <div class="wrapper">

                <div class="main">

                    <?php 
echo form::open(NULL, array('id' => 'installWizard'), array('form_token' => $formToken));
?>

                    <?php 
echo $content;
예제 #5
0
파일: jgrid.php 프로젝트: swk/bluebox
 private function _renderRESTfulErrors()
 {
     kohana::$instance->template->content = new View('blank');
     kohana::$instance->template->content->context = 'test';
     message::render(array(), array('growl' => TRUE, 'html' => FALSE));
 }
예제 #6
0
파일: esl.php 프로젝트: swk/bluebox
 public function eslreponse()
 {
     $eslManager = new EslManager();
     $errors = message::render(NULL, array('html' => TRUE, 'htmlTemplate' => '{text}' . "\n", 'growl' => FALSE, 'inline' => FALSE));
     if (!empty($errors['html'])) {
         echo implode('', $errors['html']);
     }
     if (!$eslManager->isConnected()) {
         if (empty($errors['html'])) {
             echo __("Failed to load ESL. Check logs");
         }
         flush();
         die;
     }
     switch ($_POST['type']) {
         case 'status':
             $result = $eslManager->status();
             break;
         case 'version':
             $result = $eslManager->version();
             break;
         case 'reloadacl':
             $result = $eslManager->reloadacl();
             break;
         case 'reloadxml':
             $result = $eslManager->reloadxml();
             break;
         case 'channels':
             $result = $eslManager->channels();
             break;
         case 'calls':
             $result = $eslManager->calls();
             break;
         case 'show_codec':
             $result = $eslManager->show('codec');
             break;
         case 'show_modules':
             $result = $eslManager->show('modules');
             break;
         case 'show_files':
             $result = $eslManager->show('file');
             break;
         case 'nat_status':
             $result = $eslManager->nat('status');
             break;
         case 'nat_reinit':
             $result = $eslManager->nat('reinit');
             break;
         case 'nat_republish':
             $result = $eslManager->nat('republish');
             break;
         case 'reload_sofia':
             $result = $eslManager->reload('mod_sofia');
             break;
         case 'sofia_status':
             $result = $eslManager->sofia('status');
             break;
         case 'sofia_profile':
             $result = $eslManager->sofia('status', 'profile', $_POST['param']);
             break;
         case 'gateway_profile':
             $result = $eslManager->sofia('status', 'gateway', $_POST['param']);
             break;
         case 'recvEvent':
             if (empty($_POST['param'])) {
                 $result = '== HELP ==' . "\n";
                 $result .= __('Please use the text input to enable an event listener that you are interested in.') . "\n";
                 $result .= 'Example: events plain all' . "\n";
                 break;
             }
             $result = $eslManager->sendRecv($_POST['param']);
             $reply = $result->getHeader('Reply-Text');
             if (!strstr($reply, '+OK event listener enabled')) {
                 $result = '== HELP ==' . "\n";
                 $result .= __('The supplied command failed to start an event listener, please ensure you are using the events command.') . "\n";
                 break;
             }
             $result = $eslManager->recvEvent();
             break;
         case 'sendRecv':
             if (empty($_POST['param'])) {
                 $result = '== HELP ==' . "\n";
                 $result .= 'Please use the text input to provide a command to execute.' . "\n";
                 $result .= 'Example: api version' . "\n";
                 break;
             }
             $result = $eslManager->sendRecv($_POST['param']);
             break;
         default:
             $result = $_POST['type'] . __(' command not supported by Bluebox ESL plugin.');
             break;
     }
     $text = $eslManager->getResponse($result);
     echo htmlentities($text);
     flush();
     die;
 }
예제 #7
0
파일: layout.php 프로젝트: swk/bluebox
                echo '>';
                echo html::anchor($options['url'], '<span>' . $label . '</span>');
                echo '</li>';
            }
            echo '</ul>';
        }
        echo '</li>';
    }
}
?>
                    </ul>
                </div>

                <div class="main">
                    <?php 
message::render(array(), array('html' => FALSE, 'growl' => TRUE));
?>
                    <!-- MAIN CONTENT -->
                    <?php 
echo $content;
?>
                    <!-- END MAIN CONTENT -->
                </div>

            </div>
        </div>
        <div class="clear"></div>
        <!-- END OF CONTENT -->

        <div class="footer">