本文整理汇总了PHP中Contact::next方法的典型用法代码示例。如果您正苦于以下问题:PHP Contact::next方法的具体用法?PHP Contact::next怎么用?PHP Contact::next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::next方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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";
//.........这里部分代码省略.........
示例2: eventExportContacts
function eventExportContacts(EventControler $evtcl)
{
$iduser = $_SESSION['do_User']->iduser;
$do_contact = new Contact();
$do_contact->getAllContactsForAUser();
$num_contacts = $do_contact->getNumRows();
$report_name = "ofuz_" . $iduser . "_report" . ".xls";
$fname = "xls_report/{$report_name}";
$workbook =& new writeexcel_workbook($fname);
$worksheet =& $workbook->addworksheet('Report');
$heading =& $workbook->addformat(array('align' => 'center', 'bold' => 1, 'fg_color' => 'yellow'));
$right =& $workbook->addformat(array('align' => 'right'));
$left =& $workbook->addformat(array('align' => 'left'));
# Create a border format
$border1 =& $workbook->addformat();
$border1->set_color('magenta');
$border1->set_bold();
$border1->set_size(15);
$border1->set_pattern(0x1);
$border1->set_fg_color('aqua');
$border1->set_border_color('yellow');
$border1->set_top(6);
$border1->set_bottom(6);
$border1->set_left(6);
$border1->set_align('center');
$border1->set_align('vcenter');
$border1->set_merge();
# This is the key feature
# Create another border format.
$border2 =& $workbook->addformat();
$border2->set_color('magenta');
$border2->set_bold();
$border2->set_size(15);
$border2->set_pattern(0x1);
$border2->set_fg_color('aqua');
$border2->set_border_color('yellow');
$border2->set_top(6);
$border2->set_bottom(6);
$border2->set_right(6);
$border2->set_align('center');
$border2->set_align('vcenter');
$border2->set_merge();
# This is the key feature
/*
# Set the row height for row 0 (heading current date)
$worksheet->set_row(0, 24);
$worksheet->write (0, 0, "Welcome", $border1);
$worksheet->write_blank(0, 1, $border2);
$worksheet->write_blank(0, 2, $border2);
*/
# Set the row height for row 0 (heading current date)
$worksheet->set_row(1, 24);
$current_date = _("As on ") . date('m/d/Y h:i:s') . ", ";
$heading_total_contacts = $current_date . _("Total Contacts : ") . $num_contacts;
$worksheet->write(1, 0, $heading_total_contacts, $border1);
$worksheet->write_blank(1, 1, $border2);
$worksheet->write_blank(1, 2, $border2);
$worksheet->write_blank(1, 3, $border2);
$worksheet->write_blank(1, 4, $border2);
$worksheet->write_blank(1, 5, $border2);
$report_heading = array('First Name', 'Last Name', 'Company', 'Position', 'Email', 'Phone', 'Tags');
$col = 0;
foreach ($report_heading as $colum) {
$worksheet->write(3, $col, $colum, $heading);
$col++;
}
$row = 4;
if ($num_contacts) {
while ($do_contact->next()) {
$col = 0;
$worksheet->write($row, $col, $do_contact->getData('firstname'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('lastname'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('company'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('position'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('email_address'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('phone_number'), $left);
$col++;
$worksheet->write($row, $col, $do_contact->getData('tags'), $left);
$row++;
}
} else {
}
$workbook->close();
//header("Location: {$fname}");
$evtcl->setDisplayNext(new Display($fname));
}
示例3: AutoResponder
* A cron job script for sending the autoresponders.
* Will get the autoresponders with the tags and will send the email to the contacts associated with the tag_name
* @see class/Autoresponder.class.php
*/
include_once 'config.php';
$AutoResponder = new AutoResponder();
$AutoResponder->getAutoresponders();
if ($AutoResponder->getNumRows()) {
while ($AutoResponder->next()) {
$User = new User();
$User->getId($AutoResponder->iduser);
$User->sessionPersistent('do_User', 'contacts.php', OFUZ_TTL);
$email_template = new EmailTemplate();
$email_template->bodyhtml = nl2br(stripslashes($AutoResponder->bodyhtml));
$email_template->subject = $AutoResponder->subject;
$email_template->senderemail = $User->email;
$email_template->sendername = $User->firstname . ' ' . $User->lastname;
$resp_name = $AutoResponder->resp_name;
$Contact = new Contact();
$Contact->getContactsForAutoResponder($AutoResponder->iduser, $AutoResponder->tag_name, $AutoResponder->num_days_to_send);
if ($Contact->getNumRows()) {
while ($Contact->next()) {
$values = array("idcontact" => $Contact->idcontact, "firstname" => $Contact->firstname, "lastname" => $Contact->lastname, "position" => $Contact->position, "company" => $Contact->company, "idtag" => $Contact->idtag, "resp_name" => $resp_name, "flag" => "unsubscribe_autoresponder");
$Contact->sendMessage($email_template, $values);
echo '<br /> Email Sent to :' . $Contact->email_address;
}
}
$Contact->free();
}
$AutoResponder->free();
}
示例4: 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";
}
//.........这里部分代码省略.........
示例5: eventAddFeed
/**
* Add the note to the workfeed
* Select all other Co-Worker on the project and push the note to them.
* Every Co-Worker in the project get the feed except the one posting the note.
* @param EventControler object
*/
function eventAddFeed(EventControler $evtcl)
{
$prefix_note = $evtcl->block_unblock_flag == "Block" ? "<b>Task Block </b>" : "<b>Task Unblock </b>";
$this->idproject_task = $evtcl->ofuz_idprojecttask;
$this->discuss = $prefix_note . $evtcl->block_unblock_reason;
$this->iduser = $_SESSION['do_User']->iduser;
$this->idproject_discuss = $evtcl->idproject_discuss;
$this->idproject = $_SESSION['do_project_task']->idproject;
$this->block_unblock_flag = $evtcl->block_unblock_flag;
$do_project = new Project();
$do_project->getId($this->idproject);
$this->project_name = $do_project->getProjectName();
$user = new User();
$user->getId($this->iduser);
$this->user_full_name = $user->getFullName();
$do_contact = new Contact();
$do_contact->getContactPictureDetails($this->iduser);
if ($do_contact->getNumRows()) {
while ($do_contact->next()) {
$this->user_picture = $do_contact->picture;
$this->contact_id = $do_contact->idcontact;
}
}
$do_proj_task_feed = new ProjectTask();
$do_proj_task_feed->getProjectTaskDetails($this->idproject_task);
$this->task_description = $do_proj_task_feed->task_description;
if (strlen($this->discuss) > 200) {
$this->discuss = substr($this->discuss, 0, 200);
$this->more = True;
} else {
$this->more = False;
}
$do_project_sharing = new ProjectSharing();
$project_users = $do_project_sharing->getCoWorkersAsArray($do_project);
$project_users[] = $do_project->getProjectOwner();
$users = array();
foreach ($project_users as $project_user) {
if ($_SESSION['do_User']->iduser != $project_user) {
$users[] = $project_user;
}
}
$this->addFeed($users);
}
示例6: AddProjectDiscussFeedFromDropBox
/**
* Add the note to the workfeed from drop box email
* Select all other Co-Worker on the project and push the note to them.
* Every Co-Worker in the project get the feed except the one posting the note.
* @param EventControler object
*/
function AddProjectDiscussFeedFromDropBox($idproject_task, $discuss, $iduser, $idproject_discuss, $idproject)
{
$this->idproject_task = $idproject_task;
$this->discuss = $discuss;
$this->iduser = $iduser;
$this->idproject_discuss = $idproject_discuss;
$this->idproject = $idproject;
$do_project = new Project();
$do_project->getId($this->idproject);
$this->project_name = $do_project->getProjectName();
$user = new User();
$user->getId($this->iduser);
$this->user_full_name = $user->getFullName();
$do_contact = new Contact();
$do_contact->getContactPictureDetails($this->iduser);
if ($do_contact->getNumRows()) {
while ($do_contact->next()) {
$co_workers[] = $do_->idcoworker;
$this->user_picture = $do_contact->picture;
$this->contact_id = $do_contact->idcontact;
}
}
$do_proj_task_feed = new ProjectTask();
$do_proj_task_feed->getProjectTaskDetails($this->idproject_task);
$this->task_description = $do_proj_task_feed->task_description;
if (strlen($this->discuss) > 200) {
$this->discuss = substr($this->discuss, 0, 200);
$this->more = True;
} else {
$this->more = False;
}
$do_project_sharing = new ProjectSharing();
$project_users = $do_project_sharing->getCoWorkersAsArray($do_project);
$project_users[] = $do_project->getProjectOwner();
$users = array();
foreach ($project_users as $project_user) {
if ($iduser != $project_user) {
$users[] = $project_user;
}
}
$this->addFeed($users);
}
示例7: User
echo '</div>';
$user_coworker = new User();
while ($_SESSION['do_coworker']->next()) {
$user_coworker->getId($_SESSION['do_coworker']->idcoworker);
echo '<div class="contact" id="cw' . $_SESSION['do_coworker']->idcoworker . '" onclick="fnHighlightCoworkers(\'' . $_SESSION['do_coworker']->idcoworker . '\')">';
echo '<input type="checkbox" class="ofuz_list_checkbox" name="cwid[]" id="cwid' . $_SESSION['do_coworker']->idcoworker . '" value="' . $_SESSION['do_coworker']->idcoworker . '" onclick="fnHighlightCoworkers(\'' . $_SESSION['do_coworker']->idcoworker . '\')"> ';
$no_cont_shared = $_SESSION['do_contact_sharing']->countSharedContacts($_SESSION['do_coworker']->idcoworker);
$no_cont_shared_by_co_worker = $_SESSION['do_contact_sharing']->countSharedContactsByCoWorker($_SESSION['do_coworker']->idcoworker);
/*echo '<div style="width:auto;">'
.$user_coworker->getFullName().
'</div>
';*/
$do_contact = new Contact();
$do_contact->getUserContacts($_SESSION['do_coworker']->idcoworker);
if ($do_contact->getNumRows()) {
while ($do_contact->next()) {
$co_workers[] = $do_->idcoworker;
$user_picture = $do_contact->picture;
$contact_id = $do_contact->idcontact;
}
}
if ($user_picture == '') {
$user_pic = "/images/empty_avatar.gif";
} else {
$user_pic = "/dbimage/" . $user_picture;
}
echo '<div class="feed_user_pic" style="overflow:hidden;">';
$user_first_name = $_SESSION['do_coworker']->firstname;
echo '<a href="/profile/' . $user_first_name[0] . '"> <img height="100%" alt="" src=' . $user_pic . ' > </a>';
echo '</div>';
echo '<div style="width:auto;"><a style="color:#C52EAD;" href="#" onclick="showSharedDetail(\'' . $_SESSION['do_coworker']->idcoworker . '\');" >' . $_SESSION['do_coworker']->firstname . ' ' . $_SESSION['do_coworker']->lastname . '</a></div>
示例8: _
</div>
<div class="left_menu_footer"></div>
<br /><br />
<div class="left_menu_header">
<div class="left_menu_header_content"><?php
echo _('People in this Company');
?>
</div>
</div>
<div class="left_menu">
<div class="left_menu_content">
<?php
$do_comp_cont = new Contact();
$do_comp_cont->getCompanyRelatedContacts($idcompany);
if ($do_comp_cont->getNumRows()) {
while ($do_comp_cont->next()) {
$currentpage = $_SERVER['PHP_SELF'];
//$e_detail = new Event("mydb.gotoPage");
//$e_detail->addParam("goto", "contact.php");
//$e_detail->addParam("idcontact",$do_comp_cont->idcontact);
//$e_detail->addParam("tablename", "contact");
//$e_detail->requestSave("eDetail_contact", $currentpage);
$id_shared_owner = $do_comp_cont->isContactRelatedToUser($do_comp_cont->idcontact);
?>
<span class="contact_name">
<?php
if ($id_shared_owner) {
?>
<a href="/Contact/<?php
echo $do_comp_cont->idcontact;
示例9: rebuildContactUserTable
public function rebuildContactUserTable($iduser = 0)
{
if (empty($iduser)) {
$iduser = $this->iduser;
}
$this->setUser($iduser);
//$this->sql_view_name = "userid".$iduser."_contact";
$this->query("DROP VIEW IF EXISTS " . $this->sql_view_name);
$this->query("DROP TABLE IF EXISTS " . $this->sql_view_name);
$this->query("CREATE TABLE `" . $this->sql_view_name . "` (\n\t\t\t`idcontact` int(10) NOT NULL default '0',\n\t\t\t`firstname` varchar(50) NOT NULL,\n\t\t\t`lastname` varchar(60) NOT NULL,\n\t\t\t`company` varchar(70) NOT NULL,\n\t\t\t`idcompany` int(10) NOT NULL,\n\t\t\t`position` varchar(60) NOT NULL,\n\t\t\t`picture` varchar(200) NOT NULL,\n\t\t\t`email_address` varchar(180),\n\t\t\t`phone_number` varchar(30),\n\t\t\t`tags` varchar(250) NOT NULL,\n\t\t\t`last_activity` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP,\n\t\t\t`last_update` timestamp NOT NULL default '0000-00-00 00:00:00',\n\t\t\t`first_created` timestamp NOT NULL default '0000-00-00 00:00:00',\n\t\t\tKEY `firstname` (`firstname`),\n\t\t\tKEY `lastname` (`lastname`),\n\t\t\tKEY `company` (`company`), \n\t\t\tKEY `tags` (`tags`), \n\t\t\tKEY `last_activity` (`last_activity`)) ENGINE=MyISAM DEFAULT CHARSET=utf8");
//echo $this->getSqlQuery();
// exit;
$contacts = new Contact();
$contacts->getUserContacts($this->iduser);
$this->setLog("\n importing Contacts:" . $contacts->getNumRows());
while ($contacts->next()) {
$this->setLog("\n name:" . $contacts->firstname);
$this->rebuildAddContact($contacts);
}
/**
$contacts->query("SELECT contact.idcontact as idcontact,
contact.firstname as firstname,
contact.lastname as lastname,
contact.company as company,
contact.idcompany as idcompany,
contact.position as position,
contact.picture as picture
FROM contact,
contact_sharing
WHERE `contact_sharing`.`idcoworker` = ".$this->iduser."
AND contact.idcontact = contact_sharing.idcontact");
while($contacts->next) {
$this->rebuildAddContact($contacts);
}
**/
/**
$this->query("SELECT contact.idcontact as idcontact,
contact.firstname as firstname,
contact.lastname as lastname,
contact.company as company,
contact.idcompany as idcompany,
contact.position as position,
contact.picture as picture,
contact_email.email_address as email_address,
contact_phone.phone_number,
GROUP_CONCAT(DISTINCT tag.tag_name ORDER BY tag.tag_name SEPARATOR ',') as tags,
activity.when,
created_date_log.created_date,
updated_date_log.updatedate
FROM contact LEFT JOIN contact_email ON contact.idcontact = contact_email.idcontact
LEFT JOIN contact_phone ON contact.idcontact = contact_phone.idcontact
LEFT JOIN tag ON (contact.idcontact = tag.idreference AND reference_type='contact' AND tag.iduser=".$iduser.")
LEFT JOIN activity ON (contact.idcontact = activity.idcontact)
LEFT JOIN created_date_log ON (created_date_log.id = contact.idcontact AND created_date_log.table_name='contact')
LEFT JOIN updated_date_log ON (updated_date_log.primarykeyvalue = contact.idcontact AND updated_date_log.tablename='contact')
WHERE contact.iduser = ".$iduser."
GROUP BY contact.idcontact
UNION
SELECT contact.idcontact as idcontact,
contact.firstname as firstname,
contact.lastname as lastname,
contact.company as company,
contact.idcompany as idcompany,
contact.position as position,
contact.picture as picture,
contact_email.email_address as email_address,
contact_phone.phone_number,
GROUP_CONCAT(DISTINCT tag.tag_name ORDER BY tag.tag_name SEPARATOR ',') as tags,
activity.when,
created_date_log.created_date,
updated_date_log.updatedate
FROM contact LEFT JOIN tag ON (contact.idcontact = tag.idreference AND reference_type='contact' AND tag.iduser=".$iduser."),
contact_sharing LEFT JOIN contact_email ON contact_sharing.idcontact = contact_email.idcontact
LEFT JOIN contact_phone ON contact_sharing.idcontact = contact_phone.idcontact
LEFT JOIN activity ON (contact_sharing.idcontact = activity.idcontact)
LEFT JOIN created_date_log ON (created_date_log.id = contact_sharing.idcontact AND created_date_log.table_name='contact')
LEFT JOIN updated_date_log ON (updated_date_log.primarykeyvalue = contact_sharing.idcontact AND updated_date_log.tablename='contact')
WHERE `contact_sharing`.`idcoworker` = ".$iduser."
AND contact.idcontact = contact_sharing.idcontact
GROUP BY contact.idcontact
");
$this->setLog("\n---------\n Users contact: ".$this->getSqlQuery()."\n----------\n");
$q_insert = new sqlQuery($this->getDbCon());
while($this->next()) {
$q_insert->query("INSERT INTO ".$this->sql_view_name."
VALUES (".$this->idcontact.",
'".addslashes($this->firstname)."',
'".addslashes($this->lastname)."',
'".addslashes($this->company)."',
".$this->idcompany.",
'".addslashes($this->position)."',
'".$this->picture."',
'".$this->email_address."',
'".$this->phone_number."',
'".addslashes($this->tags)."',
'".$this->when."',
'".$this->created_date."',
'".$this->updatedate."')");
//.........这里部分代码省略.........