當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。