/**
 * This function adds a "Check Spelling" link to the "Compose" row
 * during message composition (internal function).
 * @since 1.5.1 (sqspell 0.5)
 * @return void
 */
function squirrelspell_setup_function()
{
    /**
     * Check if this browser is capable of displaying SquirrelSpell
     * correctly.
     */
    if (checkForJavascript()) {
        global $oTemplate, $base_uri, $nbsp;
        $output = addButton(_("Check Spelling"), 'check_spelling', array('onclick' => 'window.open(\'' . $base_uri . 'plugins/squirrelspell/sqspell_interface.php\', \'sqspell\', \'status=yes,width=550,height=370,resizable=yes\')')) . $nbsp;
        return array('compose_button_row' => $output);
    }
}
Beispiel #2
0
 function vList()
 {
     //$mo_vlist=($_REQUEST['vlist']) ? explode(',',$_REQUEST['vlist']) : array();
     $vlist = $this->getListVars();
     //need database,table,varname,tableinfo for variable =
     // browse=varname;ctrl=whatever;titl=something;whatever other options
     $postStrng = "method=useQonFly" . '&db=' . $this->dbName . '&tabl=' . $this->tabl . '&index=' . $this->indx;
     if ($vlist) {
         $postStrng .= "&cmnd=qlist";
         $chStrng = "document.getElementById('updBrowse').style.visibility='visible';";
         $chStrng .= "jtAjaxLibSelect('{$postStrng}','varinfo','jtSpecs','1');";
         echo "<p><strong>Filter by</strong>\n<select id=\"varinfo\" name=\"varinfo\"";
         echo " />\n";
         echo "<option value=\"0\"> -- </option>\n";
         foreach ($vlist as $item) {
             $a = $this->xQueryInfo["{$item}"];
             $code = "{$item};ctrl=" . $a->getSize() . ';titl=' . $a->getLabel() . ';' . $this->implodeAllOpts($a);
             echo "<option value=\"{$code}\">", $a->getLabel(), "</option>\n";
         }
         echo "</select>\n";
         addButton('myChoice', 'Choose', $chStrng);
         //echo "</p>\n";
     }
     //vlist not empty
 }
Beispiel #3
0
################################################################
## LOGIN FORM
################################################################
if ($loggedin) {
    $focusName = 1;
    if ($flag != 'edit' && $flag != 'add') {
        $topButton2 = addButton('Add Project', 'addRecord()');
        $focusName = 0;
    }
    $username = $_SESSION['user'];
    $mybutton = addButton('Logout', 'logOut()');
    $loginForm = <<<EOF
<div style="float: left">You are logged in as <strong>{$username}</strong>.</div>{$mybutton}
EOF;
} else {
    $mybutton = addButton('Login', 'logIn()');
    $loginForm = <<<EOF
<div style="float: left">
<form method="POST" action="login.php" name="loginform" id="loginform">
<p>
  <label for="username">Username:</label> <input type="text" name="username" id="username" size="5" maxlength=\\"10\\" />
  <label for="password">Password:</label> <input type="password" name="password" id="password" size="5" maxlength=\\"10\\" />
</p>
</form>
</div>
{$mybutton}
EOF;
}
################################################################
## HTML
################################################################
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div class="col-sm-12 col-mid-12 col-lg-12">
                    <form class="form-horizontal" role="form" style="padding:none;">
                   <fieldset>
                        <?php 
// put your code here
include 'GUI.php';
addInputTxt('uname', 'col-sm-2', 'Username');
addInputTxt('pswd', 'col-sm-2', 'Password');
addInputTxt('fName', 'col-sm-2', 'Firstname');
addInputTxt('lName', 'col-sm-2', 'Lastname');
addInputTxt('emai', 'col-sm-2', 'E-mail');
addButton('btn btn-success', 'Submit', 'col-sm-offset-2 col-sm-4', 'Sign Up');
?>
                    </fieldset>
        </form>  
                    <?php 
require_once 'Status.php';
require_once 'database.php';
$q = new Status($db);
$q->viewStatus('dvd', 'available', 'Return');
?>
                    <?php 
require_once "Query.php";
$crud_book = new Query(7, 'dvd', 'item_no,title,genre,description,price,rental_period,status');
$crud_book->mysqlConnect('localhost', 'root', '', 'video_rental');
$crud_book->create();
echo "<hr/>";
function addQtoInput($name, $tabl, $altName)
{
    echo "<span id=\"y_{$name}\">";
    if (!$altName) {
        $altName = $name;
    }
    addButton("x_{$name}", "Find similar", "findsimA('{$altName}','{$tabl}','{$name}')");
    echo "</span>\n";
    return 1;
}
Beispiel #6
0
function rowHTML($number, $entry, $forceEdit, $showButtons)
{
    global $flag;
    global $hiddenType;
    global $BL;
    $div = '';
    $id = $entry['id'];
    $name = $entry['name'];
    $notes = $entry['notes'];
    $enddate = $entry['enddate'];
    $person = $entry['person'];
    $button1 = addButton('Edit', "editRecord({$id})");
    $button2 = addButton('Delete', "deleteRecord({$id})");
    if ($forceEdit) {
        $number = "&nbsp";
        $name = addInput('name', $entry);
        $notes = '<textarea name="notes" id="notes">' . $notes . '</textarea>';
        $enddate = addInput('enddate', $entry);
        $person = addInput('person', $entry);
        $button1 = addButton('Save', "saveRecord({$id})");
        $button2 = addButton('Cancel', "cancelRecord({$id})");
    }
    if ($showButtons == 0) {
        $button1 = '&nbsp;';
        $button2 = '&nbsp;';
    }
    $div .= addDiv('tableDiv numberDiv', $BL['number']['width'], $number);
    $div .= addDiv('tableDiv', $BL['name']['width'], '', 0);
    $div .= '  ' . addDiv('clientDiv', $BL['client']['width'], 'Ford');
    $div .= '  ' . addDiv('jobDiv', $BL['jobnum']['width'], '1999/M');
    $div .= '  ' . addDiv('nameDiv', $BL['name']['width'], $name);
    #<p onClick=\"//editValue(this)\">$name</p></div>
    $div .= "    </div>\n";
    $div .= addDiv('tableDiv notesDiv', $BL['notes']['width'], $notes);
    $div .= addDiv('tableDiv enddateDiv', $BL['enddate']['width'], $enddate);
    $div .= addDiv('tableDiv personDiv', $BL['person']['width'], $person);
    $div .= addDiv('tableDiv buttonsDiv', $BL['buttons']['width'], $button1 . $button2);
    $div .= "    <div class=\"msgDiv\" id=\"msgDiv{$id}\"></div>\n";
    $div .= "\n    <div class=\"clearboth\"></div>\n\n";
    return $div;
}
Beispiel #7
0
function showComposeButtonRow()
{
    global $use_javascript_addr_book, $save_as_draft, $default_use_priority, $mailprio, $default_use_mdn, $request_mdn, $request_dr, $data_dir, $username;
    global $oTemplate, $buffer_hook;
    if ($default_use_priority) {
        $priorities = array('1' => _("High"), '3' => _("Normal"), '5' => _("Low"));
        $priority = isset($mailprio) ? $mailprio : 3;
    } else {
        $priorities = array();
        $priority = NULL;
    }
    $mdn_user_support = getPref($data_dir, $username, 'mdn_user_support', $default_use_mdn);
    $address_book_button_attribs = array();
    global $accesskey_compose_addresses;
    if ($accesskey_compose_addresses != 'NONE') {
        $address_book_button_attribs['accesskey'] = $accesskey_compose_addresses;
    }
    if ($use_javascript_addr_book && checkForJavascript()) {
        $addr_book = addButton(_("Addresses"), null, array_merge($address_book_button_attribs, array('onclick' => 'javascript:open_abook();')));
    } else {
        $addr_book = addSubmit(_("Addresses"), 'html_addr_search', $address_book_button_attribs);
    }
    $oTemplate->assign('allow_priority', $default_use_priority == 1);
    $oTemplate->assign('priority_list', $priorities);
    $oTemplate->assign('current_priority', $priority);
    $oTemplate->assign('notifications_enabled', $mdn_user_support == 1);
    $oTemplate->assign('read_receipt', $request_mdn == '1');
    $oTemplate->assign('delivery_receipt', $request_dr == '1');
    $oTemplate->assign('drafts_enabled', $save_as_draft);
    $oTemplate->assign('address_book_button', $addr_book);
    // access keys...
    //
    global $accesskey_compose_priority, $accesskey_compose_on_read, $accesskey_compose_on_delivery, $accesskey_compose_signature, $accesskey_compose_save_draft, $accesskey_compose_send;
    $oTemplate->assign('accesskey_compose_priority', $accesskey_compose_priority);
    $oTemplate->assign('accesskey_compose_on_read', $accesskey_compose_on_read);
    $oTemplate->assign('accesskey_compose_on_delivery', $accesskey_compose_on_delivery);
    $oTemplate->assign('accesskey_compose_signature', $accesskey_compose_signature);
    $oTemplate->assign('accesskey_compose_save_draft', $accesskey_compose_save_draft);
    $oTemplate->assign('accesskey_compose_send', $accesskey_compose_send);
    $oTemplate->display('compose_buttons.tpl');
}
Beispiel #8
0
    case 'm':
        //calendar pages - mobile device
        headerDtp();
        echo <<<TXT
<script async src="common/dtpicker.js"></script>
</head>

<body>
<header>{$uname}</header>

TXT;
        if ($privs > 0) {
            //view rights
            echo "<div class='navBar noPrint'>\n";
            echo "<div class='floatR'>\n";
            addButton();
            logButton();
            echo "</div>\n";
            urlButton();
            optButton();
            dateForm();
            echo "</div>\n";
            optPanel();
        } else {
            //display dummy navbar
            echo <<<TXT
<div class='navBar noPrint'>
&nbsp;<div class='floatR'>
<button type='button' onclick="login()">{$xx['hdr_button_log_in']}</button>
</div>
</div>
Beispiel #9
0
/**
 * Construct button that clears out any preview pane
 * contents and inserts JavaScript function used by 
 * message subject link onclick handler.  Also disallows 
 * the message list to be loaded into the bottom frame.
 */
function preview_pane_message_list_do()
{
    if (!checkForJavascript()) {
        return;
    }
    // globalize $pp_refresh_top, $pp_forceTopURL and $pp_noPageHeader to synch
    // with other plugins (sent_confirmation, for example)
    //
    global $plugins, $archive_mail_button_has_been_printed, $username, $data_dir, $PHP_SELF, $base_uri, $pp_refresh_top, $pp_forceTopURL, $pp_noPageHeader;
    sqgetGlobalVar('pp_refresh_top', $pp_refresh_top, SQ_GET);
    $output = '';
    $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
    // add refresh function called from code built in function
    // preview_pane_change_message_target_do()
    //
    if ($use_previewPane == 1) {
        //      sqgetGlobalVar('REQUEST_URI', $request_uri, SQ_SERVER);
        $request_uri = $PHP_SELF;
        $output .= "<script type=\"text/javascript\" language=\"JavaScript\">\n<!--\n function pp_refresh() { document.location = '{$request_uri}'; }\n// -->\n</script>\n";
    }
    if ($use_previewPane == 1) {
        // why isn't this already available?
        include_once SM_PATH . 'functions/forms.php';
        $output .= addButton(_("Clear Preview"), 'clear_preview', array('onclick' => 'parent.bottom.document.location=\'' . $base_uri . 'plugins/preview_pane/empty_frame.php\'; ')) . "\n<script language='JavaScript' type='text/javascript'>\n" . "<!--\n" . "\n" . "   if (self.name == 'bottom')\n" . "   {\n";
        // NOTE: we can also force the top frame to the URL that was being
        //       loaded in the bottom, but this is usually overkill...
        //       unless another plugin told us to do so (such as sent_confirmation)
        if ($pp_forceTopURL == 'yes') {
            //         $output .= "      parent.right.document.location = '" . $_SERVER['REQUEST_URI'] . "&pp=yes';\n";
            $output .= "      parent.right.document.location = '" . $PHP_SELF . "&pp=yes';\n";
        } else {
            if ($pp_refresh_top) {
                $output .= "      if (typeof(parent.right.pp_refresh) != 'undefined')\n" . "         parent.right.pp_refresh()\n\n";
            }
        }
        $output .= "      document.location = '" . $base_uri . "plugins/preview_pane/empty_frame.php'\n" . "   }\n" . "//-->\n" . "</script>\n";
    }
    return array('mailbox_index_after' => $output);
}
    $attribs[] = array('label' => Yii::t('admin', 'No daemons found'));
}
$attribs[] = array('label' => Yii::t('admin', 'Active Servers'), 'type' => 'raw', 'value' => beginForm($daemon_id) . '<table><tr><td>' . addButton(Yii::t('admin', 'Start'), 'active_start') . '</td>' . '<td>' . addButton(Yii::t('admin', 'Stop'), 'active_stop') . '</td></tr>' . '<tr><td>' . addButton(Yii::t('admin', 'Restart'), 'active_restart') . '</td>' . '<td>' . addButton(Yii::t('admin', 'Suspend'), 'active_suspend') . '</td></tr></table>');
$attribs[] = array('label' => Yii::t('admin', 'Suspended Servers'), 'type' => 'raw', 'value' => '<table><tr><td>' . addButton(Yii::t('admin', 'Resume'), 'suspended_resume') . '</td></tr></table>');
$attribs[] = array('label' => Yii::t('admin', 'Running Servers'), 'type' => 'raw', 'value' => '<table><tr><td>' . addButton(Yii::t('admin', 'Stop'), 'run_stop') . '</td></tr>' . '<tr><td>' . addButton(Yii::t('admin', 'Restart'), 'run_restart') . '</td></tr></table>' . CHtml::endForm());
$attribs[] = array('label' => Yii::t('admin', 'Chat'), 'type' => 'raw', 'value' => beginForm($daemon_id) . '<table><tr><td>' . Yii::t('admin', 'Sender') . '</td></tr>' . '<tr><td>' . CHtml::textField('from', @$_GET['from']) . '</td></tr>' . '<tr><td>' . Yii::t('admin', 'Message') . '</td></tr>' . '<tr><td>' . CHtml::textField('message', @$_GET['message'], array('style' => 'width: 294px')) . '</td></tr>' . '<tr><td>' . addButton(Yii::t('admin', 'Broadcast'), 'run_chat') . '</td></td></table>' . CHtml::endForm());
$attribs[] = array('label' => Yii::t('admin', 'Console'), 'type' => 'raw', 'value' => beginForm($daemon_id) . '<table><tr><td>' . CHtml::textField('command', @$_GET['command'], array('style' => 'width: 294px')) . '<div style="display:none"><input type="text" name="ieBugWorkaround"/></div>' . '</td></tr>' . '<tr><td>' . addButton(Yii::t('admin', 'Execute'), 'run_console') . '</td></tr></table>' . CHtml::endForm());
$this->widget('zii.widgets.CDetailView', array('data' => array(), 'attributes' => $attribs));
?>
<br/>

<?php 
$attribs = array();
$attribs[] = array('label' => Yii::t('admin', 'Global Operations'), 'value' => '', 'cssClass' => 'titlerow');
$attribs[] = array('label' => Yii::t('admin', 'Cleanup Players Table'), 'type' => 'raw', 'value' => beginForm($daemon_id) . addButton(Yii::t('admin', 'Cleanup'), 'global_clean_players', $playersCleanupMsg), 'hint' => Yii::t('admin', 'Deletes all players that have the same role as the Default Role of their server'));
$attribs[] = array('label' => Yii::t('admin', 'Clear Command Cache'), 'type' => 'raw', 'value' => addButton(Yii::t('admin', 'Clear'), 'global_clear_cmdcache', $cmdcacheCleanupMsg) . CHtml::endForm());
$this->widget('zii.widgets.CDetailView', array('data' => array(), 'attributes' => $attribs));
echo CHtml::script('
    $(document).ready(function() {
        $("#master_daemon_id").change(function() {
            $(".daemon_id").val($("#master_daemon_id option:selected").val());
        });
    });');
?>
<br/>

<?php 
if (Yii::app()->user->hasFlash('operations')) {
    ?>
<div class="flash-success">
    <?php