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


PHP Sql::set_project_description方法代码示例

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


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

示例1: set_include_path

<?php

/*
 * Copyright 2011 Martin Nordholts <martin@chromecode.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// FIXME: Use a host that better supports PHP include paths...
set_include_path(get_include_path() . PATH_SEPARATOR . '/customers/tasktaste.com/tasktaste.com/httpd.www/phpincludes');
require_once 'TaskTaste/tasktaste.php';
$project_id = Utils::get_id_from_post(PROJECT_ID);
$project_desc = Utils::get_name_from_post(PROJECT_DESCRIPTION);
$desc = Sql::set_project_description($project_id, $project_desc);
include 'TaskTasteHtml/ajax-header.php';
if ($desc) {
    echo "<submitted-text><![CDATA[{$desc}]]></submitted-text>";
}
include 'TaskTasteHtml/ajax-footer.php';
开发者ID:rafaelbeckel,项目名称:task-taste,代码行数:28,代码来源:set-project-description.php

示例2: set_include_path

 */
// FIXME: Use a host that better supports PHP include paths...
set_include_path(get_include_path() . PATH_SEPARATOR . '/customers/tasktaste.com/tasktaste.com/httpd.www/phpincludes');
require_once 'TaskTaste/tasktaste.php';
// Create the project
$unsafe_name = Utils::get_name_from_post(PROJECT_NAME);
$userid = Utils::get_id_from_post(USERID);
$username = Sql::get_user_name_from_id($userid);
if ($username) {
    // Create project
    $project = Sql::create_project($unsafe_name, $userid);
    if ($project) {
        $project_id = $project->get_id();
        // Setup default settings
        Sql::set_worked_per_week($project_id, 1.0);
        Sql::set_project_description($project_id, TASKTASTE_DEFAULT_PROJECT_DESCRIPTION);
        // Create default tasks
        // Task 1
        $task1 = Sql::create_task($project_id);
        if ($task1) {
            Sql::update_task_name($task1->get_id(), TASKTASTE_FIRST_TASK_NAME);
            Sql::update_task_size($task1->get_id(), TASKTASTE_FIRST_TASKS_SIZE);
        }
        // Task 2
        $task2 = Sql::create_task($project_id);
        if ($task2) {
            Sql::update_task_name($task2->get_id(), TASKTASTE_SECOND_TASK_NAME);
            Sql::update_task_size($task2->get_id(), TASKTASTE_FIRST_TASKS_SIZE);
        }
    }
}
开发者ID:rafaelbeckel,项目名称:task-taste,代码行数:31,代码来源:create-project.php


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