當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Utilities::print_warning_message方法代碼示例

本文整理匯總了PHP中Utilities::print_warning_message方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utilities::print_warning_message方法的具體用法?PHP Utilities::print_warning_message怎麽用?PHP Utilities::print_warning_message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Utilities的用法示例。


在下文中一共展示了Utilities::print_warning_message方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

        if (isset( $projects))
        {
            /**
             * get results
             */

            /**
             * display results
             */
            if (sizeof($projects) == 0)
            {
                if($pageNo==1){
                    Utilities::print_warning_message('No results found. Please try again.');
                }else{
                    Utilities::print_warning_message('No more results found.');
                }
            }
            else
            {
            ?>
                <div class="table-responsive">
                    <table class="table">

                        <tr>

                            <th>Name</th>
                            <th>Creation Time</th>
                            <th>Experiments</th>

                        </tr>
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:30,代碼來源:search.blade.php

示例2: create_project_select

/**
 * Create a select input and populate it with project options from the database
 */
public static function create_project_select($projectId = null, $editable = true)
{
    $editable? $disabled = '' : $disabled = 'disabled';
    $userProjects = Utilities::get_all_user_projects( Session::get("gateway_id"), Session::get('username') );

    echo '<select class="form-control" name="project" id="project" required ' . $disabled . '>';
    if (sizeof($userProjects) > 0)
    {
        foreach ($userProjects as $project)
        {
            if ($project->projectID == $projectId)
            {
                $selected = 'selected';
            }
            else
            {
                $selected = '';
            }

            echo '<option value="' . $project->projectID . '" ' . $selected . '>' . $project->name . '</option>';
        }
    }
    echo '</select>';
    if( sizeof($userProjects) == 0 )
    {
        Utilities::print_warning_message('<p>You must create a project before you can create an experiment.
                Click <a href="' . URL::to('/') . '/project/create">here</a> to create a project.</p>');
    }
}
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:32,代碼來源:Utilities.php

示例3: process_inputs


//.........這裏部分代碼省略.........
                for ($i = 0; $i < sizeof($experimentInputs); $i++)
                {
                    if ($experimentInputs[$i]->name == $applicationInput->name)
                    {
                        $index = $i;
                    }
                }

                if ($index >= 0)
                {
                    $experimentInput->value = $experimentInputs[$index]->value;
                    $experimentInput->type = $applicationInput->type;
                }
            }
        }
        elseif ($applicationInput->type == DataType::URI)
        {
            //var_dump($_FILES[$applicationInput->name]->name);
            if ($_FILES[$applicationInput->name]['name'])
            {
                $file = $_FILES[$applicationInput->name];


                //
                // move file to experiment data directory
                //
                $filePath = Utilities::$experimentPath . $file['name'];

                // check if file already exists
                if (is_file($filePath))
                {
                    unlink($filePath);

                    Utilities::print_warning_message('Uploaded file already exists! Overwriting...');
                }

                $moveFile = move_uploaded_file($file['tmp_name'], $filePath);

                if ($moveFile)
                {
                    Utilities::print_success_message('Upload: ' . $file['name'] . '<br>' .
                        'Type: ' . $file['type'] . '<br>' .
                        'Size: ' . ($file['size']/1024) . ' kB');//<br>' .
                        //'Stored in: ' . $experimentPath . $file['name']);
                }
                else
                {
                    Utilities::print_error_message('<p>Error moving uploaded file ' . $file['name'] . '!
                    Please try again later or report a bug using the link in the Help menu.</p>');
                    $experimentAssemblySuccessful = false;
                }

                $experimentInput->value = str_replace(base_path() . Constant::EXPERIMENT_DATA_ROOT, Utilities::$pathConstant , $filePath);
                $experimentInput->type = $applicationInput->type;
                
            }
            else
            {
                $index = -1;
                for ($i = 0; $i < sizeof($experimentInputs); $i++)
                {
                    if ($experimentInputs[$i]->name == $applicationInput->name)
                    {
                        $index = $i;
                    }
                }
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:67,代碼來源:ExpUtilities.php

示例4: echo

            </div>
            <input type="hidden" name="pageNo" value="<?php echo($pageNo) ?>"/>
            <div style="clear: both"></div>
        </form>

        <?php
            /**
             * get results
             */

            /**
             * display results
             */
            if (sizeof($projects) == 0)
            {
                Utilities::print_warning_message('No results found. Please try again.');
            }
            else
            {
            ?>
                <div class="table-responsive">
                    <table class="table">

                        <tr>

                            <th>Name</th>
                            <th>Creation Time</th>
                            <th>Experiments</th>

                        </tr>
            <?php
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:31,代碼來源:browse.blade.php


注:本文中的Utilities::print_warning_message方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。