当前位置: 首页>>代码示例>>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;未经允许,请勿转载。