本文整理汇总了PHP中Task::next方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::next方法的具体用法?PHP Task::next怎么用?PHP Task::next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::next方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateTodaysTasksDisplay
/**
* A custom method within the Plugin to generate the content
* @return string: HTML output, when there is at least one task for today.
* @return void : if there is not task for today.
* @see class/Task.class.php
*/
function generateTodaysTasksDisplay()
{
$output = '';
$do_task = new Task();
$do_task->getAllTasksToday();
if ($do_task->getNumRows()) {
$output .= '<div class="task_today">';
while ($do_task->next()) {
$output .= "\n" . '<div id="t' . $do_task->idtask . '" class="task_item">';
$output .= "<table><tr><td>";
$output .= '<input type="checkbox" name="c' . $do_task->idtask . '" class="task_checkbox" onclick="fnTaskComplete(\'' . $do_task->idtask . '\')" /></td>';
$output .= '<td><span class="task_desc">' . $do_task->task_category . ' ' . $do_task->task_description . '.</span></td></tr></table></div>';
}
$output .= '</div>';
return $output;
} else {
$this->setIsActive(false);
}
}
示例2: while
<div class="mainheader">
<div class="pad20">
<span class="headline14">Welcome</span>
</div>
</div>
<div class="contentfull">
Welcome back <?php
// print_r($_SESSION['do_User']);
echo $_SESSION['do_User']->firstname;
$do_task->getAllTasksOverdue();
if ($do_task->getNumRows()) {
?>
<div class="task">
<div class="headline10" style="color: #ff0000;">Your Overdue taks</div>
<?php
while ($do_task->next()) {
$category = $do_task_category->getTaskCategoryName($do_task->category);
?>
<span id="t<?php
echo $do_task->idtask;
?>
" class="task_item">
<input type="checkbox" name="c<?php
echo $do_task->idtask;
?>
" class="task_checkbox" onclick="fnTaskComplete('<?php
echo $do_task->idtask;
?>
')" />
<?php
if ($category != '') {
示例3: while
<tr>
<td class="main_right">
<div class="content730">
<?php
$do_task->getDistinctCompletedTaskDates();
if ($do_task->getNumRows()) {
while ($do_task->next()) {
?>
<div class="task">
<div class="headline10"><?php
echo $do_task->formated_date;
?>
</div>
<?php
$do_task_completed->getAllCompletedTasks($do_task->formated_date);
while ($do_task_completed->next()) {
?>
<span id="t<?php
echo $do_task->idtask;
?>
" class="task_item">
<span class="task_category"><?php
echo $do_task_category->getTaskCategoryName($do_task_completed->category);
?>
</span>
<span class="task_desc"><a href="#"><?php
echo $do_task_completed->task_description;
?>
</a></span>
</span><br />
<?php
示例4: XMLExport
private function XMLExport($iduser)
{
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n";
$do_user = new User();
$do_user->getId($iduser);
$xml .= "<user>\n";
$xml .= " <iduser><![CDATA[" . $do_user->iduser . "]]></iduser>\n";
$xml .= " <firstname><![CDATA[" . $do_user->firstname . "]]></firstname>\n";
$xml .= " <middlename><![CDATA[" . $do_user->middlename . "]]></middlename>\n";
$xml .= " <lastname><![CDATA[" . $do_user->lastname . "]]></lastname>\n";
$xml .= " <email><![CDATA[" . $do_user->email . "]]></email>\n";
$xml .= " <phone><![CDATA[" . $do_user->phone . "]]></phone>\n";
$xml .= " <company><![CDATA[" . $do_user->company . "]]></company>\n";
$xml .= " <position><![CDATA[" . $do_user->position . "]]></position>\n";
$xml .= " <address1><![CDATA[" . $do_user->address1 . "]]></address1>\n";
$xml .= " <address2><![CDATA[" . $do_user->address2 . "]]></address2>\n";
$xml .= " <city><![CDATA[" . $do_user->city . "]]></city>\n";
$xml .= " <zip><![CDATA[" . $do_user->zip . "]]></zip>\n";
$xml .= " <state><![CDATA[" . $do_user->state . "]]></state>\n";
$xml .= " <country><![CDATA[" . $do_user->country . "]]></country>\n";
$xml .= " <username><![CDATA[" . $do_user->username . "]]></username>\n";
$xml .= " <password><![CDATA[" . $do_user->password . "]]></password>\n";
$xml .= " <isadmin><![CDATA[" . $do_user->isadmin . "]]></isadmin>\n";
$xml .= " <regdate><![CDATA[" . $do_user->regdate . "]]></regdate>\n";
$xml .= " <openid><![CDATA[" . $do_user->openid . "]]></openid>\n";
$xml .= " <last_login><![CDATA[" . $do_user->last_login . "]]></last_login>\n";
$xml .= " <drop_box_code><![CDATA[" . $do_user->drop_box_code . "]]></drop_box_code>\n";
$xml .= " <idcontact><![CDATA[" . $do_user->idcontact . "]]></idcontact>\n";
$xml .= " <fb_user_id><![CDATA[" . $do_user->fb_user_id . "]]></fb_user_id>\n";
$xml .= " <api_key><![CDATA[" . $do_user->api_key . "]]></api_key>\n";
$xml .= " <plan><![CDATA[" . $do_user->plan . "]]></plan>\n";
$xml .= " <status><![CDATA[" . $do_user->status . "]]></status>\n";
$xml .= " <google_openid_identity><![CDATA[" . $do_user->google_openid_identity . "]]></google_openid_identity>\n";
$xml .= "</user>\n";
if (!$this->appendToFile($xml)) {
return false;
}
$xml = ' ';
$i = 1;
$do_contact = new Contact();
$do_contact->getUserContacts($iduser);
$xml .= "<contacts>\n";
while ($do_contact->next()) {
set_time_limit(3600);
//1 hr
$xml .= " <contact>\n";
$xml .= " <idcontact><![CDATA[" . $do_contact->getData("idcontact") . "]]></idcontact>\n";
$xml .= " <firstname><![CDATA[" . $do_contact->getData("firstname") . "]]></firstname>\n";
$xml .= " <lastname><![CDATA[" . $do_contact->getData("lastname") . "]]></lastname>\n";
$xml .= " <position><![CDATA[" . $do_contact->getData("position") . "]]></position>\n";
$xml .= " <company><![CDATA[" . $do_contact->getData("company") . "]]></company>\n";
$xml .= " <idcompany><![CDATA[" . $do_contact->getData("idcompany") . "]]></idcompany>\n";
$xml .= " <iduser><![CDATA[" . $do_contact->getData("iduser") . "]]></iduser>\n";
$xml .= " <picture><![CDATA[" . $do_contact->getData("picture") . "]]></picture>\n";
$xml .= " <summary><![CDATA[" . $do_contact->getData("summary") . "]]></summary>\n";
$xml .= " <birthday><![CDATA[" . $do_contact->getData("birthday") . "]]></birthday>\n";
$xml .= " <portal_code><![CDATA[" . $do_contact->getData("portal_code") . "]]></portal_code>\n";
$xml .= " <fb_userid><![CDATA[" . $do_contact->getData("fb_userid") . "]]></fb_userid>\n";
$xml .= " <tw_user_id><![CDATA[" . $do_contact->getData("tw_user_id") . "]]></tw_user_id>\n";
$xml .= " <email_optout><![CDATA[" . $do_contact->getData("email_optout") . "]]></email_optout>\n\n";
$contact_address = $do_contact->getChildContactAddress();
while ($contact_address->next()) {
$xml .= " <contact_address>\n";
$xml .= " <idcontact_address><![CDATA[" . $contact_address->idcontact_address . "]]></idcontact_address>\n";
$xml .= " <city><![CDATA[" . $contact_address->city . "]]></city>\n";
$xml .= " <country><![CDATA[" . $contact_address->country . "]]></country>\n";
$xml .= " <state><![CDATA[" . $contact_address->state . "]]></state>\n";
$xml .= " <street><![CDATA[" . $contact_address->street . "]]></street>\n";
$xml .= " <zipcode><![CDATA[" . $contact_address->zipcode . "]]></zipcode>\n";
$xml .= " <idcontact><![CDATA[" . $contact_address->idcontact . "]]></idcontact>\n";
$xml .= " <address><![CDATA[" . $contact_address->address . "]]></address>\n";
$xml .= " <address_type><![CDATA[" . $contact_address->address_type . "]]></address_type>\n";
$xml .= " </contact_address>\n";
}
$contact_email = $do_contact->getChildContactEmail();
while ($contact_email->next()) {
$xml .= " <contact_email>\n";
$xml .= " <idcontact_email><![CDATA[" . $contact_email->idcontact_email . "]]></idcontact_email>\n";
$xml .= " <idcontact><![CDATA[" . $contact_email->idcontact . "]]></idcontact>\n";
$xml .= " <email_address><![CDATA[" . $contact_email->email_address . "]]></email_address>\n";
$xml .= " <email_type><![CDATA[" . $contact_email->email_type . "]]></email_type>\n";
$xml .= " <email_isdefault><![CDATA[" . $contact_email->email_isdefault . "]]></email_isdefault>\n";
$xml .= " </contact_email>\n";
}
$contact_phone = $do_contact->getChildContactPhone();
while ($contact_phone->next()) {
$xml .= " <contact_phone>\n";
$xml .= " <idcontact_phone><![CDATA[" . $contact_phone->idcontact_phone . "]]></idcontact_phone>\n";
$xml .= " <phone_number><![CDATA[" . $contact_phone->phone_number . "]]></phone_number>\n";
$xml .= " <phone_type><![CDATA[" . $contact_phone->phone_type . "]]></phone_type>\n";
$xml .= " <idcontact><![CDATA[" . $contact_phone->email_type . "]]></idcontact>\n";
$xml .= " </contact_phone>\n";
}
$contact_note = $do_contact->getChildContactNotes();
while ($contact_note->next()) {
$xml .= " <contact_note>\n";
$xml .= " <idcontact_note><![CDATA[" . $contact_note->idcontact_note . "]]></idcontact_note>\n";
$xml .= " <idcontact><![CDATA[" . $contact_note->idcontact . "]]></idcontact>\n";
$xml .= " <note><![CDATA[" . $contact_note->note . "]]></note>\n";
$xml .= " <date_added><![CDATA[" . $contact_note->date_added . "]]></date_added>\n";
//.........这里部分代码省略.........
示例5: exportUserAccountandDelete
/**
* Back up Inactive users data from all the fields and Delete Inactive User's account.
* This function is used to generate the xml back up file for the user information from the DB
* This function is differnt from exportUserAccount as we have added more table to the backup
* And we have function to delete the table once back up is done. And the function exportUserAccount
* was not disturbed as this was already in use.
* @param int : $iduser
* @return void
*/
public function exportUserAccountandDelete($iduser)
{
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n";
$do_user = new User();
$do_user->getId($iduser);
$xml .= "<document>\n";
$xml .= "<user>\n";
$xml .= " <iduser><![CDATA[" . $do_user->iduser . "]]></iduser>\n";
$xml .= " <firstname><![CDATA[" . $do_user->firstname . "]]></firstname>\n";
$xml .= " <middlename><![CDATA[" . $do_user->middlename . "]]></middlename>\n";
$xml .= " <lastname><![CDATA[" . $do_user->lastname . "]]></lastname>\n";
$xml .= " <email><![CDATA[" . $do_user->email . "]]></email>\n";
$xml .= " <phone><![CDATA[" . $do_user->phone . "]]></phone>\n";
$xml .= " <company><![CDATA[" . $do_user->company . "]]></company>\n";
$xml .= " <position><![CDATA[" . $do_user->position . "]]></position>\n";
$xml .= " <address1><![CDATA[" . $do_user->address1 . "]]></address1>\n";
$xml .= " <address2><![CDATA[" . $do_user->address2 . "]]></address2>\n";
$xml .= " <city><![CDATA[" . $do_user->city . "]]></city>\n";
$xml .= " <zip><![CDATA[" . $do_user->zip . "]]></zip>\n";
$xml .= " <state><![CDATA[" . $do_user->state . "]]></state>\n";
$xml .= " <country><![CDATA[" . $do_user->country . "]]></country>\n";
$xml .= " <username><![CDATA[" . $do_user->username . "]]></username>\n";
$xml .= " <password><![CDATA[" . $do_user->password . "]]></password>\n";
$xml .= " <isadmin><![CDATA[" . $do_user->isadmin . "]]></isadmin>\n";
$xml .= " <regdate><![CDATA[" . $do_user->regdate . "]]></regdate>\n";
$xml .= " <openid><![CDATA[" . $do_user->openid . "]]></openid>\n";
$xml .= " <last_login><![CDATA[" . $do_user->last_login . "]]></last_login>\n";
$xml .= " <drop_box_code><![CDATA[" . $do_user->drop_box_code . "]]></drop_box_code>\n";
$xml .= " <idcontact><![CDATA[" . $do_user->idcontact . "]]></idcontact>\n";
$xml .= " <fb_user_id><![CDATA[" . $do_user->fb_user_id . "]]></fb_user_id>\n";
$xml .= " <api_key><![CDATA[" . $do_user->api_key . "]]></api_key>\n";
$xml .= " <plan><![CDATA[" . $do_user->plan . "]]></plan>\n";
$xml .= " <status><![CDATA[" . $do_user->status . "]]></status>\n";
$xml .= " <google_openid_identity><![CDATA[" . $do_user->google_openid_identity . "]]></google_openid_identity>\n";
$xml .= "</user>\n";
$i = 1;
//$tbl_name = "userid".$iduser."_contact";
$do_contact = new Contact(NULL, NULL, $iduser);
$do_contact->getUserContacts($iduser);
$nums = $do_contact->GetNumRows();
if ($nums >= 1) {
$xml .= "<contacts>\n";
while ($do_contact->next()) {
$xml .= " <contact>\n";
$xml .= " <idcontact><![CDATA[" . $do_contact->getData("idcontact") . "]]></idcontact>\n";
$xml .= " <firstname><![CDATA[" . $do_contact->getData("firstname") . "]]></firstname>\n";
$xml .= " <lastname><![CDATA[" . $do_contact->getData("lastname") . "]]></lastname>\n";
$xml .= " <position><![CDATA[" . $do_contact->getData("position") . "]]></position>\n";
$xml .= " <company><![CDATA[" . $do_contact->getData("company") . "]]></company>\n";
$xml .= " <idcompany><![CDATA[" . $do_contact->getData("idcompany") . "]]></idcompany>\n";
$xml .= " <iduser><![CDATA[" . $do_contact->getData("iduser") . "]]></iduser>\n";
$xml .= " <picture><![CDATA[" . $do_contact->getData("picture") . "]]></picture>\n";
$xml .= " <summary><![CDATA[" . $do_contact->getData("summary") . "]]></summary>\n";
$xml .= " <birthday><![CDATA[" . $do_contact->getData("birthday") . "]]></birthday>\n";
$xml .= " <portal_code><![CDATA[" . $do_contact->getData("portal_code") . "]]></portal_code>\n";
$xml .= " <fb_userid><![CDATA[" . $do_contact->getData("fb_userid") . "]]></fb_userid>\n";
$xml .= " <tw_user_id><![CDATA[" . $do_contact->getData("tw_user_id") . "]]></tw_user_id>\n";
$xml .= " <email_optout><![CDATA[" . $do_contact->getData("email_optout") . "]]></email_optout>\n\n";
$contact_address = $do_contact->getChildContactAddress();
while ($contact_address->next()) {
$xml .= " <contact_address>\n";
$xml .= " <idcontact_address><![CDATA[" . $contact_address->idcontact_address . "]]></idcontact_address>\n";
$xml .= " <city><![CDATA[" . $contact_address->city . "]]></city>\n";
$xml .= " <country><![CDATA[" . $contact_address->country . "]]></country>\n";
$xml .= " <state><![CDATA[" . $contact_address->state . "]]></state>\n";
$xml .= " <street><![CDATA[" . $contact_address->street . "]]></street>\n";
$xml .= " <zipcode><![CDATA[" . $contact_address->zipcode . "]]></zipcode>\n";
$xml .= " <idcontact><![CDATA[" . $contact_address->idcontact . "]]></idcontact>\n";
$xml .= " <address><![CDATA[" . $contact_address->address . "]]></address>\n";
$xml .= " <address_type><![CDATA[" . $contact_address->address_type . "]]></address_type>\n";
$xml .= " </contact_address>\n";
}
$contact_email = $do_contact->getChildContactEmail();
while ($contact_email->next()) {
$xml .= " <contact_email>\n";
$xml .= " <idcontact_email><![CDATA[" . $contact_email->idcontact_email . "]]></idcontact_email>\n";
$xml .= " <idcontact><![CDATA[" . $contact_email->idcontact . "]]></idcontact>\n";
$xml .= " <email_address><![CDATA[" . $contact_email->email_address . "]]></email_address>\n";
$xml .= " <email_type><![CDATA[" . $contact_email->email_type . "]]></email_type>\n";
$xml .= " <email_isdefault><![CDATA[" . $contact_email->email_isdefault . "]]></email_isdefault>\n";
$xml .= " </contact_email>\n";
}
$contact_phone = $do_contact->getChildContactPhone();
while ($contact_phone->next()) {
$xml .= " <contact_phone>\n";
$xml .= " <idcontact_phone><![CDATA[" . $contact_phone->idcontact_phone . "]]></idcontact_phone>\n";
$xml .= " <phone_number><![CDATA[" . $contact_phone->phone_number . "]]></phone_number>\n";
$xml .= " <phone_type><![CDATA[" . $contact_phone->phone_type . "]]></phone_type>\n";
$xml .= " <idcontact><![CDATA[" . $contact_phone->email_type . "]]></idcontact>\n";
$xml .= " </contact_phone>\n";
}
//.........这里部分代码省略.........
示例6: Task
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
$pageTitle = 'Ofuz';
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
include_once 'includes/ofuz_check_access.script.inc.php';
include_once 'includes/header.inc.php';
// $do_notes = new ContactNotes($GLOBALS['conx']);
// $do_contact = new Contact($GLOBALS['conx']);
// $do_company = new Company($GLOBALS['conx']);
// $do_task = new Task($GLOBALS['conx']);
// $do_task_category = new TaskCategory($GLOBALS['conx']);
// $do_contact_task = new Contact();
// $do_notes->sessionPersistent("ContactNotesEditSave", "index.php", 3600);
$tmp_task = new Task();
$tmp_task_cat = new TaskCategory();
$tmp_task_update = new Task();
$tmp_task->getAll();
while ($tmp_task->next()) {
if ($tmp_task->category) {
$category = $tmp_task_cat->getTaskCategoryName($tmp_task->category);
$tmp_task_update->tmpUpdateTaskCat($tmp_task->idtask, $category);
}
}
?>
Hello
</body>
</html>