当前位置: 首页>>代码示例>>PHP>>正文


PHP UI::alert方法代码示例

本文整理汇总了PHP中UI::alert方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::alert方法的具体用法?PHP UI::alert怎么用?PHP UI::alert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI的用法示例。


在下文中一共展示了UI::alert方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: UI

<?php

$ui = new UI();
// This row will not be printed because of the noPrint() property
$topRow = $ui->row()->noPrint()->open();
$alertCol = $ui->col()->width(6)->open();
$ui->callout()->title("This is just a small example")->uiType("warning")->desc('This example shows only a handful of the UI options. ' . 'See the <a href="http://172.16.8.5/wiki/index.php/UI_Library">UI Library wiki</a> for a detailed list of options. ' . 'Help us build this page by adding more example codes.')->show();
$ui->alert()->title("Is this example working for you?")->uiType("info")->desc('If the example is not working for you, the error is probably because of php short tags (<code>&lt;?</code>). Instead of converting all short tags to <code>&lt;?php</code>, you can enable the <code>short_open_tag</code> property in the php.ini file. <a href="http://stackoverflow.com/q/2185320/1492578" target="_blank">Here\'s how!</a>')->show();
$alertCol->close();
$printCol = $ui->col()->width(6)->open();
$printBox = $ui->box()->icon($ui->icon("print"))->title("Print this page")->tooltip("Printing this page wouldn't print this row. How awesome is that!")->open();
?>
<p>Everything in the view will be printed by default. To ignore something that shouldn't be printed, use the <code>noPrint()</code> property on that <code>Element</code>.</p>
<pre>
$ui->someElem()
   ...
   ->noPrint()
</pre>
<p>To make a Print button, use <code>$ui->printButton()->show()</code>. All other properties of <code>Button</code>s are still valid on the print button. For instance, you can set its id, name, UI type or value.</p>

<?php 
$ui->printButton()->show();
$printBox->close();
$printCol->close();
$topRow->close();
?>
<h2 class="page-header">Different box types</h2><?php 
$boxTypesRow = $ui->row()->open();
$col = $ui->col()->width(4)->open();
$box = $ui->box()->title("Default Box")->open();
?>
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:example.php

示例2: array

//pay_options
$pay_options = array($ui->option()->value("")->text("Choose One")->disabled()->selected());
if ($pay_bands === FALSE) {
    array_push($pay_options, $ui->option()->value("")->text("No pay band found")->disabled());
} else {
    foreach ($pay_bands as $row) {
        array_push($pay_options, $ui->option()->value($row->pay_band)->text(strtoupper($row->pay_band) . ' (' . $row->pay_band_description . ')'));
    }
}
//states options
$state_options = array($ui->option()->value("")->text("Choose One")->disabled()->selected());
foreach ($states as $row) {
    array_push($state_options, $ui->option()->value($row->state_name)->text(ucwords($row->state_name)));
}
if ($error != "") {
    $ui->alert()->uiType('danger')->title('ERROR')->desc($error)->show();
}
$form = $ui->form()->id('basic_details')->multipart()->action('employee/add/insert_basic_details')->open();
echo '<h2 class="page-header" id="emp_id_display"></h2>';
$row = $ui->row()->open();
$col = $ui->col()->id('hide_emp')->width(4)->open();
$emp_sel_box = $ui->box()->uiType('primary')->title('Select Employee ID')->open();
$ui->input()->name('emp_id')->id('emp_id')->required()->addonRight($ui->button()->value('Go')->id('fetch_id_btn')->uiType('primary'))->label('Employee Id<span style= "color:red;"> *</span>')->show();
$emp_sel_box->close();
$col->close();
echo '<div class="hideit">';
$col = $ui->col()->width(12)->open();
echo '<i class="loading" id="empIdIcon" ></i>';
$basic_box = $ui->box()->uiType('primary')->solid()->title('Personal Details')->open();
echo 'Fields marked with <span style= "color:red;">*</span> are mandatory.<br><br> ';
$row3 = $ui->row()->open();
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:basic_details.php

示例3: UI

<?php

/* 
 * Author :- Nishant Raj
 */
$ui = new UI();
if ($notification == true) {
    $ui->alert()->uiType($type)->desc($string)->show();
}
$row = $ui->row()->open();
$alertRow = $ui->row()->open();
$marginCol = $ui->col()->width(3)->open();
$marginCol->close();
$alertRow->close();
$margin = $ui->col()->width(2)->open();
$margin->close();
$column = $ui->col()->width(8)->open();
$box = $ui->box()->title('Station Leave Details')->solid()->uiType('primary')->open();
$form = $ui->form()->action('leave/leave_station/applyStationLeave')->open();
$inputRow1 = $ui->row()->open();
$ui->datePicker()->required()->label('Proposed Date Of Leaving Station ')->name('leave_st_date')->id('leave_st_date')->placeholder("Enter the date")->dateFormat('dd-mm-yyyy')->value("")->width(6)->show();
$ui->datePicker()->required()->id('return_st_date')->label('Proposed Date Of Reurning Station')->name('return_st_date')->placeholder(" Select Returning Date")->dateFormat('dd-mm-yyyy')->width(6)->value("")->show();
$inputRow1->close();
$inputRow2 = $ui->row()->id('st_time')->open();
$ui->timePicker()->label('Leaving Time')->name('st_leaving_time')->addonLeft($ui->icon("clock-o"))->uiType('primary')->id('st_leaving_time')->showMeridian('false')->required()->showSeconds('true')->width(6)->show();
$ui->timePicker()->label('Arrival Time')->name('st_arrival_time')->addonLeft($ui->icon("clock-o"))->uiType('primary')->id('st_arrival_time')->showMeridian('false')->required()->showSeconds('true')->width(6)->show();
$inputRow2->close();
$inputRow3 = $ui->row()->open();
$ui->textarea()->required()->placeholder('Purpose Of Leaving station')->type('text')->value("")->label('Purpose Of Leaving station')->name('purpose')->width(6)->show();
$ui->textarea()->required()->placeholder(' Address During Absence From Station')->type('text')->value("")->label('Address During Absence From Station')->id('st_address')->name('address')->width(6)->show();
$inputRow3->close();
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:leave_station_view.php

示例4: UI

<?php

/**
 * Created by PhpStorm.
 * User: nishant
 * Date: 25/3/15
 * Time: 8:16 PM
 */
$ui = new UI();
if ($respond == true) {
    $ui->alert()->uiType('danger')->desc('<h3>This Leave Request was already Responded</h3>')->show();
    $alert_row = $ui->row()->open();
    $alert_col = $ui->col()->width(6)->open();
    ?>
    <center>
    <a href="<?php 
    echo site_url("leave/leave_station/pendingStationLeaveStatus");
    ?>
">
        <?php 
    $ui->button()->uiType('primary')->value('Leave Status Page')->show();
    ?>
    </a>
    </center>
    <?php 
    $alert_col->close();
    $alert_col1 = $ui->col()->width(6)->open();
    ?>
    <center>
        <a href="<?php 
    echo site_url();
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:leave_station_approval_view.php

示例5: UI

 * Created by PhpStorm.
 * User: nishant
 * Date: 25/3/15
 * Time: 3:23 PM
 */
$ui = new UI();
$test_row = $ui->row()->classes('modal fade')->id('cancel_dialog_fade')->open();
$test_col = $ui->col()->classes('modal-dialog')->id('cancel_dialog_dialog')->open();
$test_box = $ui->box()->classes('modal-content')->id('cancel_dialog_content')->open();
?>
<div class="modal-header">
    <h2>Station Leave Cancellation Conformation </h2>
</div>
<div class="modal-body">
    <?php 
$ui->alert()->title('<h2>Are You Sure You Want to Cancel Your Leave<h2>')->id('alert_tab_cancel')->uiType('danger')->show();
$ui->alert()->title('Cancellation Request Successfully Forwarded to corresponding Employee')->uiType('success')->id('cancellation_success')->show();
//    $row2 = $ui->row()->id('next_emp_id')->open();
//    $col_next_emp = $ui->col()->open();
//    $box3 = $ui->box()
//        ->title('Please Select Approving Employee')
//        ->solid()
//        ->id('approving_emp')
//        ->uiType('primary')
//        ->open();
//    $inputRow4 = $ui->row()->open();
//    $ui->select()
//        ->label('Department Type')
//        ->name('type')
//        ->id('type')
//        ->required()
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:cancel_station_leave_view.php

示例6: UI

<?php 
/*
 * Author : Nishant Raj
 */
$ui = new UI();
if (isset($is_error)) {
    if ($is_error == true) {
        $ui->alert()->uiType($error_type)->desc($error_msg)->show();
    }
}
$upper_row = $ui->row()->open();
$column_temp = $ui->col()->width(4)->open();
$column_temp->close();
$column = $ui->col()->width(4)->open();
$form = $ui->form()->action('leave/leave_deo')->open();
$box = $ui->box()->title('Employee Details')->uiType('primary')->solid()->open();
$row = $ui->row()->open();
$ui->input()->type('text')->placeholder($place_holder)->label('Employee id')->name('emp_id')->required()->width(12)->id('emp_id')->show();
$row->close();
?>
<center>
    <?php 
$row1 = $ui->row()->open();
$ui->button()->value('Submit')->submit(true)->name('submit')->uiType('primary')->show();
$row1->close();
?>
</center>
<?php 
$box->close();
$form->close();
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:30,代码来源:leave_deo_view.php

示例7: UI

<?php 
/**
 * Author: Rakesh
*/
$ui = new UI();
if (isset($is_notification_on)) {
    // if notifications are on
    if ($is_notification_on == TRUE) {
        // if leave application has some errors show them
        if (isset($errors)) {
            $error_str = "";
            foreach ($errors as $error) {
                $error_str = $error_str . $error . '<br>';
            }
            //                $this->notification->drawNotification('', $error_str, 'error');
            $ui->alert()->uiType('danger')->desc($error_str)->show();
        } else {
            if (isset($success_msg)) {
                //     $this->notification->drawNotification('', $success_msg, 'success');
                $ui->alert()->uiType('success')->desc($success_msg)->show();
            }
        }
    }
}
// self reference
$ref_self = $_SERVER['PHP_SELF'];
// $user_name = $this->session->userdata('name');
// $descp = "Welcome " . $user_name;
// $descp2 = "<h4 class='page-head' align='center'>$descp</align></h4>";
// echo $descp2;
// echo "<br>";
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:leave_application_view.php

示例8: UI

                    <h1>
                        <?php 
echo $title;
?>
                        <small><?php 
echo $subtitle;
?>
</small>
                    </h1>
                </section>

                <!-- Main content -->
                <section class="content">

                    <div class="flash-data">
                        <?php 
$ui = new UI();
if ($this->session->flashdata('flashSuccess')) {
    $ui->alert()->uiType("success")->desc($this->session->flashdata('flashSuccess'))->show();
}
if ($this->session->flashdata('flashError')) {
    $ui->alert()->uiType("error")->desc($this->session->flashdata('flashError'))->show();
}
if ($this->session->flashdata('flashInfo')) {
    $ui->alert()->uiType("info")->desc($this->session->flashdata('flashInfo'))->show();
}
if ($this->session->flashdata('flashWarning')) {
    $ui->alert()->uiType("warning")->desc($this->session->flashdata('flashWarning'))->show();
}
?>
                    </div>
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:header.php

示例9: UI

<?php

$ui = new UI();
if (isset($is_notification_on) && $is_notification_on == TRUE) {
    // if notifications are on
    if (isset($errors)) {
        $error_str = "";
        foreach ($errors as $str) {
            $error_str .= $str . '<br>';
        }
        $ui->alert()->uiType('danger')->desc($error_str)->show();
    }
}
$ref_self = $_SERVER['PHP_SELF'];
$row = $ui->row()->open();
$column1 = $ui->col()->width(3)->open();
$column1->close();
$column = $ui->col()->width(6)->open();
$box = $ui->box()->title('Select Leave Type')->solid()->uiType('primary')->open();
$ui->select()->id('leave_type_cancel')->label('Type Of Leave')->options(array($ui->option()->value('$')->text('Select'), $ui->option()->value('Casual Leave')->text('Casual Leave'), $ui->option()->value('Restricted Leave')->text('Restricted Leave')))->show();
$box->close();
$column->close();
$row->close();
$row1 = $ui->row()->id('leave_table_container')->open();
$column3 = $ui->col()->width(1)->open();
$column3->close();
$column4 = $ui->col()->width(10)->open();
$box = $ui->box()->title('Cancellable Leave')->solid()->uiType('primary')->open();
$form = $ui->form()->action('leave/leave_cancel')->open();
$table_cancel = $ui->table()->id('leave_to_cancel_table')->hover()->responsive()->sortable()->searchable()->paginated()->bordered()->open();
$table_cancel->close();
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:leave_cancel_view.php

示例10: foreach

        <td>
            <center>Purpose</center>
        </td>
        <td>
            <center>Address</center>
        </td>
        <td>
            <center>Action</center>
        </td>
    </tr>
    </thead>
<?php 
$i = 0;
if ($data == NULL) {
    $row5 = $ui->row()->open();
    $ui->alert()->uiType('danger')->title('Alert')->desc('No Leaves To display')->show();
    $row5->close();
} else {
    foreach ($data as $row) {
        $type = $data[$i]['type'];
        if ($type == Leave_constants::$WAITING_CANCELLATION) {
            $dsp_string = "Leave Cancellation Request";
            $ui_type = "info";
            $rqst_type = Leave_constants::$WAITING_CANCELLATION;
        } else {
            $dsp_string = "Approve/Cancel/Forward";
            $ui_type = "primary";
            $rqst_type = Leave_constants::$PENDING;
        }
        $number = $i + 1;
        $emp_id = $data[$i]['emp_id'];
开发者ID:pkdism,项目名称:ISM-MIS,代码行数:31,代码来源:pending_station_leave.php


注:本文中的UI::alert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。