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


PHP task::fetch方法代码示例

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


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

示例1: task

$vivek = new task();
//echo $_SESSION['do_User']->iduser."<br /><br />";
//$users=$vivek->getAllTaskuser();
//print_r($users);
//echo "<br />";
$iduser = $_SESSION['do_User']->iduser;
//echo $user;
//$time = time();
//$key = "$iduser"."$time";
$e_set_api = new Event("do_User->eventGenerateAPIKey");
$e_set_api->addParam("goto", $_SERVER['PHP_SELF']);
if ($_SESSION['do_User']->api_key != '') {
    $apikey = $_SESSION['do_User']->api_key;
    $c->setConfig(array("directory" => "Calevents", "filename" => "{$iduser}.ics"));
    $vivek->getAllTaskByuser($iduser);
    while ($vivek->fetch()) {
        $stdt = explode('-', $vivek->getData("due_date_dateformat"));
        $startdate = "{$stdt['0']}" . "{$stdt['1']}" . "{$stdt['2']}";
        $enddate = $startdate;
        $e =& $c->newComponent('vevent');
        //$e->setProperty( 'dtstart', $startdate );
        //$e->setProperty( 'dtend', $enddate );
        $e->setProperty("dtstart", "{$startdate}", array("VALUE" => "DATE"));
        $e->setProperty('description', $vivek->getData("task_description"));
        $e->setProperty('summary', $vivek->getData("task_description"));
        $e->setProperty('class', 'PUBLIC');
    }
    $c->createCalendar();
    $str = $c->saveCalendar();
    $tt = $_SERVER["SERVER_NAME"];
    $path = "http://" . "{$tt}" . "/" . "Calevents/" . "{$iduser}.ics";
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:ical_test1.php

示例2: getUnassignedtask

function getUnassignedtask()
{
    include "task.php";
    $obj = new task();
    if (!$obj->getUnassignedTasks()) {
        echo '{"result":0,"message": "failed to display"}';
        return;
    }
    //at this point the search has been successful.
    //generate the JSON message to echo to the browser
    $row = $obj->fetch();
    echo '{"result":1,"tasks":[';
    //start of json object
    while ($row) {
        echo json_encode($row);
        //convert the result array to json object
        $row = $obj->fetch();
        if ($row) {
            echo ",";
            //if there are more rows, add comma
        }
    }
    echo "]}";
}
开发者ID:samsali,项目名称:SE-GROUP13,代码行数:24,代码来源:task_controller.php

示例3: getAllAdminSpecTasks

function getAllAdminSpecTasks()
{
    if (isset($_SESSION['admin_id'])) {
        $admin_id = $_SESSION['admin_id'];
        $task_status = $_REQUEST['task_status'];
        include '../models/model_task.php';
        $task = new task();
        $row = $task->getAllAdminSpecTasks($admin_id, $task_status);
        if (!$row) {
            echo '{"result":0,"message": "No tasks set by you."}';
            return;
        }
        echo '{"result":1,"tasks":[';
        while ($row) {
            echo json_encode($row);
            $row = $task->fetch();
            if ($row) {
                echo ",";
            }
        }
        echo "]}";
        return;
    }
    echo '{"result":2,"message": "You need to login first."}';
    return;
}
开发者ID:salmgazer,项目名称:Hewale,代码行数:26,代码来源:controller.php


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