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


PHP Contact::getNomUrl方法代码示例

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


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

示例1: Contact

 $sql .= " " . MAIN_DB_PREFIX . "socpeople as c";
 $sql .= " WHERE a.rowid = n.fk_action";
 $sql .= " AND c.rowid = n.fk_contact";
 $sql .= " AND c.fk_soc = " . $object->id;
 $resql = $db->query($sql);
 if ($resql) {
     $num = $db->num_rows($resql);
     $i = 0;
     $contactstatic = new Contact($db);
     while ($i < $num) {
         $var = !$var;
         $obj = $db->fetch_object($resql);
         $contactstatic->id = $obj->id;
         $contactstatic->lastname = $obj->lastname;
         $contactstatic->firstname = $obj->firstname;
         print '<tr ' . $bc[$var] . '><td>' . $contactstatic->getNomUrl(1);
         print $obj->email ? ' &lt;' . $obj->email . '&gt;' : $langs->trans("NoMail");
         print '</td>';
         print '<td>';
         $label = $langs->trans("Notify_" . $obj->code) != "Notify_" . $obj->code ? $langs->trans("Notify_" . $obj->code) : $obj->label;
         print $label;
         print '</td>';
         // TODO Add link to object here
         // print
         print '<td align="right">' . dol_print_date($db->jdate($obj->daten), 'dayhour') . '</td>';
         print '</tr>';
         $i++;
     }
     $db->free($resql);
 } else {
     dol_print_error($db);
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例2:

        ?>
		</div>
		<div class="tagtd">
			<?php 
        $statusofcontact = $tab[$i]['status'];
        if ($tab[$i]['source'] == 'internal') {
            $userstatic->id = $tab[$i]['id'];
            $userstatic->lastname = $tab[$i]['lastname'];
            $userstatic->firstname = $tab[$i]['firstname'];
            echo $userstatic->getNomUrl(1);
        }
        if ($tab[$i]['source'] == 'external') {
            $contactstatic->id = $tab[$i]['id'];
            $contactstatic->lastname = $tab[$i]['lastname'];
            $contactstatic->firstname = $tab[$i]['firstname'];
            echo $contactstatic->getNomUrl(1);
        }
        ?>
		</div>
		<div class="tagtd"><?php 
        echo $tab[$i]['libelle'];
        ?>
</div>
		<div class="tagtd" align="center">
			<?php 
        //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
        ?>
			<?php 
        if ($tab[$i]['source'] == 'internal') {
            $userstatic->id = $tab[$i]['id'];
            $userstatic->lastname = $tab[$i]['lastname'];
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:contacts.tpl.php

示例3:

				// Contact
				print '<td>';
				if ($tab[$i]['source']=='internal')
				{
                    $userstatic->id=$tab[$i]['id'];
                    $userstatic->nom=$tab[$i]['nom'];
                    $userstatic->prenom=$tab[$i]['firstname'];
                    print $userstatic->getNomUrl(1);
				}
				if ($tab[$i]['source']=='external')
				{
                    $contactstatic->id=$tab[$i]['id'];
                    $contactstatic->name=$tab[$i]['nom'];
                    $contactstatic->firstname=$tab[$i]['firstname'];
                    print $contactstatic->getNomUrl(1);
				}
				print '</td>';

				// Type de contact
				print '<td>'.$tab[$i]['libelle'].'</td>';

				// Statut
				print '<td align="center">';
				// Activation desativation du contact
				if ($project->statut >= 0 && $userAccess) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
				print $contactstatic->LibStatut($tab[$i]['status'],3);
				if ($project->statut >= 0 && $userAccess) print '</a>';
				print '</td>';

				// Icon update et delete
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:contact.php

示例4: Form

 /**
  *	Get the form to input an email
  *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
  *
  *	@param	string	$addfileaction		Name of action when posting file attachments
  *	@param	string	$removefileaction	Name of action when removing file attachments
  *	@return string						Form to show
  */
 function get_form($addfileaction = 'addfile', $removefileaction = 'removefile')
 {
     global $conf, $langs, $user, $hookmanager, $form;
     if (!is_object($form)) {
         $form = new Form($this->db);
     }
     $langs->load("other");
     $langs->load("mails");
     $hookmanager->initHooks(array('formmail'));
     $parameters = array('addfileaction' => $addfileaction, 'removefileaction' => $removefileaction);
     $reshook = $hookmanager->executeHooks('getFormMail', $parameters, $this);
     if (!empty($reshook)) {
         return $hookmanager->resPrint;
     } else {
         $out = '';
         // Define list of attached files
         $listofpaths = array();
         $listofnames = array();
         $listofmimes = array();
         if (!empty($_SESSION["listofpaths"])) {
             $listofpaths = explode(';', $_SESSION["listofpaths"]);
         }
         if (!empty($_SESSION["listofnames"])) {
             $listofnames = explode(';', $_SESSION["listofnames"]);
         }
         if (!empty($_SESSION["listofmimes"])) {
             $listofmimes = explode(';', $_SESSION["listofmimes"]);
         }
         $out .= "\n<!-- Debut form mail -->\n";
         if ($this->withform == 1) {
             $out .= '<form method="POST" name="mailform" enctype="multipart/form-data" action="' . $this->param["returnurl"] . '">' . "\n";
             $out .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
         }
         foreach ($this->param as $key => $value) {
             $out .= '<input type="hidden" id="' . $key . '" name="' . $key . '" value="' . $value . '" />' . "\n";
         }
         $out .= '<table class="border" width="100%">' . "\n";
         // Substitution array
         if (!empty($this->withsubstit)) {
             $out .= '<tr><td colspan="2">';
             $help = "";
             foreach ($this->substit as $key => $val) {
                 $help .= $key . ' -> ' . $langs->trans($val) . '<br>';
             }
             $out .= $form->textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help);
             $out .= "</td></tr>\n";
         }
         // From
         if (!empty($this->withfrom)) {
             if (!empty($this->withfromreadonly)) {
                 $out .= '<input type="hidden" id="fromname" name="fromname" value="' . $this->fromname . '" />';
                 $out .= '<input type="hidden" id="frommail" name="frommail" value="' . $this->frommail . '" />';
                 $out .= '<tr><td width="180">' . $langs->trans("MailFrom") . '</td><td>';
                 if ($this->fromtype == 'user' && $this->fromid > 0) {
                     $langs->load("users");
                     $fuser = new User($this->db);
                     $fuser->fetch($this->fromid);
                     $out .= $fuser->getNomUrl(1);
                 } else {
                     $out .= $this->fromname;
                 }
                 if ($this->frommail) {
                     $out .= " &lt;" . $this->frommail . "&gt;";
                 } else {
                     if ($this->fromtype) {
                         $langs->load("errors");
                         $out .= '<font class="warning"> &lt;' . $langs->trans("ErrorNoMailDefinedForThisUser") . '&gt; </font>';
                     }
                 }
                 $out .= "</td></tr>\n";
                 $out .= "</td></tr>\n";
             } else {
                 $out .= "<tr><td>" . $langs->trans("MailFrom") . "</td><td>";
                 $out .= $langs->trans("Name") . ':<input type="text" id="fromname" name="fromname" size="32" value="' . $this->fromname . '" />';
                 $out .= '&nbsp; &nbsp; ';
                 $out .= $langs->trans("EMail") . ':&lt;<input type="text" id="frommail" name="frommail" size="32" value="' . $this->frommail . '" />&gt;';
                 $out .= "</td></tr>\n";
             }
         }
         // Replyto
         if (!empty($this->withreplyto)) {
             if ($this->withreplytoreadonly) {
                 $out .= '<input type="hidden" id="replyname" name="replyname" value="' . $this->replytoname . '" />';
                 $out .= '<input type="hidden" id="replymail" name="replymail" value="' . $this->replytomail . '" />';
                 $out .= "<tr><td>" . $langs->trans("MailReply") . "</td><td>" . $this->replytoname . ($this->replytomail ? " &lt;" . $this->replytomail . "&gt;" : "");
                 $out .= "</td></tr>\n";
             }
         }
         // Errorsto
         if (!empty($this->witherrorsto)) {
             //if (! $this->errorstomail) $this->errorstomail=$this->frommail;
             $errorstomail = !empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail;
//.........这里部分代码省略.........
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:101,代码来源:html.formmail.class.php

示例5: loadBox

 /**
  *  Load data into info_box_contents array to show array later.
  *
  *  @param	int		$max        Maximum number of records to load
  *  @return	void
  */
 function loadBox($max = 5)
 {
     global $user, $langs, $db, $conf;
     $langs->load("boxes");
     $this->max = $max;
     $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedContacts", $max));
     if ($user->rights->societe->lire) {
         $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
         $sql .= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile";
         $sql .= ", s.nom as socname, s.name_alias";
         $sql .= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
         $sql .= " FROM " . MAIN_DB_PREFIX . "socpeople as sp";
         $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as s ON sp.fk_soc = s.rowid";
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
         }
         $sql .= " WHERE sp.entity IN (" . getEntity('societe', 1) . ")";
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " . $user->id;
         }
         if ($user->societe_id) {
             $sql .= " AND sp.fk_soc = " . $user->societe_id;
         }
         $sql .= " ORDER BY sp.tms DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $contactstatic = new Contact($db);
             $societestatic = new Societe($db);
             $line = 0;
             while ($line < $num) {
                 $objp = $db->fetch_object($result);
                 $datec = $db->jdate($objp->datec);
                 $datem = $db->jdate($objp->tms);
                 $contactstatic->id = $objp->id;
                 $contactstatic->lastname = $objp->lastname;
                 $contactstatic->firstname = $objp->firstname;
                 $contactstatic->civility_id = $objp->civility_id;
                 $contactstatic->statut = $objp->status;
                 $contactstatic->phone_pro = $objp->phone;
                 $contactstatic->phone_perso = $objp->phone_perso;
                 $contactstatic->phone_mobile = $objp->phone_mobile;
                 $contactstatic->address = $objp->address;
                 $contactstatic->zip = $objp->zip;
                 $contactstatic->town = $objp->town;
                 $societestatic->id = $objp->fk_soc;
                 $societestatic->name = $objp->socname;
                 $societestatic->name_alias = $objp->name_alias;
                 $societestatic->code_client = $objp->code_client;
                 $societestatic->code_fournisseur = $objp->code_fournisseur;
                 $societestatic->client = $objp->client;
                 $societestatic->fournisseur = $objp->fournisseur;
                 $this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $contactstatic->getNomUrl(1), 'asis' => 1);
                 $this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : '', 'asis' => 1);
                 $this->info_box_contents[$line][] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day"));
                 $this->info_box_contents[$line][] = array('td' => 'align="right" class="nowrap" width="18"', 'text' => $contactstatic->getLibStatut(3), 'asis' => 1);
                 $line++;
             }
             if ($num == 0) {
                 $this->info_box_contents[$line][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedContacts"));
             }
             $db->free($result);
         } else {
             $this->info_box_contents[0][0] = array('td' => 'align="left"', 'maxlength' => 500, 'text' => $db->error() . ' sql=' . $sql);
         }
     } else {
         $this->info_box_contents[0][0] = array('align' => 'left', 'text' => $langs->trans("ReadPermissionNotAllowed"));
     }
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:76,代码来源:box_contacts.php

示例6:

 if ($obj->socid) {
     $societestatic->id = $obj->socid;
     $societestatic->client = $obj->client;
     $societestatic->name = $obj->societe;
     print $societestatic->getNomUrl(1, '', 10);
 } else {
     print '&nbsp;';
 }
 print '</td>';
 // Contact
 print '<td>';
 if ($obj->fk_contact > 0) {
     $contactstatic->lastname = $obj->lastname;
     $contactstatic->firstname = $obj->firstname;
     $contactstatic->id = $obj->fk_contact;
     print $contactstatic->getNomUrl(1, '', 10);
 } else {
     print "&nbsp;";
 }
 print '</td>';
 // User to do
 print '<td align="left">';
 if ($obj->fk_user_action > 0) {
     $userstatic->fetch($obj->fk_user_action);
     print $userstatic->getLoginUrl(1);
 } else {
     print '&nbsp;';
 }
 print '</td>';
 // Status/Percent
 print '<td align="right" class="nowrap">' . $actionstatic->LibStatut($obj->percent, 6) . '</td>';
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:listactions.php

示例7: Form


//.........这里部分代码省略.........
            // Zone to select its email template
            if (count($modelmail_array) > 0) {
                $out .= '<div style="padding: 3px 0 3px 0">' . "\n";
                $out .= $langs->trans('SelectMailModel') . ': ' . $this->selectarray('modelmailselected', $modelmail_array, 0, 1);
                if ($user->admin) {
                    $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
                }
                $out .= ' &nbsp; ';
                $out .= '<input class="button" type="submit" value="' . $langs->trans('Valid') . '" name="modelselected" id="modelselected">';
                $out .= ' &nbsp; ';
                $out .= '</div>';
            }
            $out .= '<table class="border" width="100%">' . "\n";
            // Substitution array
            if (!empty($this->withsubstit)) {
                $out .= '<tr><td colspan="2">';
                $help = "";
                foreach ($this->substit as $key => $val) {
                    $help .= $key . ' -> ' . $langs->trans($val) . '<br>';
                }
                $out .= $form->textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help);
                $out .= "</td></tr>\n";
            }
            // From
            if (!empty($this->withfrom)) {
                if (!empty($this->withfromreadonly)) {
                    $out .= '<input type="hidden" id="fromname" name="fromname" value="' . $this->fromname . '" />';
                    $out .= '<input type="hidden" id="frommail" name="frommail" value="' . $this->frommail . '" />';
                    $out .= '<tr><td width="180">' . $langs->trans("MailFrom") . '</td><td>';
                    if ($this->fromtype == 'user' && $this->fromid > 0) {
                        $langs->load("users");
                        $fuser = new User($this->db);
                        $fuser->fetch($this->fromid);
                        $out .= $fuser->getNomUrl(1);
                    } else {
                        $out .= $this->fromname;
                    }
                    if ($this->frommail) {
                        $out .= " &lt;" . $this->frommail . "&gt;";
                    } else {
                        if ($this->fromtype) {
                            $langs->load("errors");
                            $out .= '<font class="warning"> &lt;' . $langs->trans("ErrorNoMailDefinedForThisUser") . '&gt; </font>';
                        }
                    }
                    $out .= "</td></tr>\n";
                    $out .= "</td></tr>\n";
                } else {
                    $out .= "<tr><td>" . $langs->trans("MailFrom") . "</td><td>";
                    $out .= $langs->trans("Name") . ':<input type="text" id="fromname" name="fromname" size="32" value="' . $this->fromname . '" />';
                    $out .= '&nbsp; &nbsp; ';
                    $out .= $langs->trans("EMail") . ':&lt;<input type="text" id="frommail" name="frommail" size="32" value="' . $this->frommail . '" />&gt;';
                    $out .= "</td></tr>\n";
                }
            }
            // Replyto
            if (!empty($this->withreplyto)) {
                if ($this->withreplytoreadonly) {
                    $out .= '<input type="hidden" id="replyname" name="replyname" value="' . $this->replytoname . '" />';
                    $out .= '<input type="hidden" id="replymail" name="replymail" value="' . $this->replytomail . '" />';
                    $out .= "<tr><td>" . $langs->trans("MailReply") . "</td><td>" . $this->replytoname . ($this->replytomail ? " &lt;" . $this->replytomail . "&gt;" : "");
                    $out .= "</td></tr>\n";
                }
            }
            // Errorsto
            if (!empty($this->witherrorsto)) {
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:67,代码来源:html.formmail.class.php

示例8: show_actions_done


//.........这里部分代码省略.........
        if ((!empty($object->id) || !empty($objcon->id)) && $permok) {
            $out .= '<a href="' . DOL_URL_ROOT . '/comm/action/fiche.php?action=create';
            if (get_class($object) == 'Societe') {
                $out .= '&amp;socid=' . $object->id;
            }
            $out .= (!empty($objcon->id) ? '&amp;contactid=' . $objcon->id : '') . '&amp;backtopage=1&amp;percentage=-1">';
            $out .= $langs->trans("AddAnAction") . ' ';
            $out .= img_picto($langs->trans("AddAnAction"), 'filenew');
            $out .= "</a>";
        }
        $out .= '</td>';
        $out .= '</tr>';
        foreach ($histo as $key => $value) {
            $var = !$var;
            $out .= "<tr " . $bc[$var] . ">";
            // Champ date
            $out .= '<td width="120" class="nowrap">';
            if ($histo[$key]['date']) {
                $out .= dol_print_date($histo[$key]['date'], 'dayhour');
            } else {
                if ($histo[$key]['datestart']) {
                    $out .= dol_print_date($histo[$key]['datestart'], 'dayhour');
                }
            }
            $out .= "</td>\n";
            // Picto
            $out .= '<td width="16">&nbsp;</td>';
            // Action
            $out .= '<td>';
            if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
                $actionstatic->type_code = $histo[$key]['acode'];
                $transcode = $langs->trans("Action" . $histo[$key]['acode']);
                $libelle = $transcode != "Action" . $histo[$key]['acode'] ? $transcode : $histo[$key]['libelle'];
                //$actionstatic->libelle=$libelle;
                $actionstatic->libelle = $histo[$key]['note'];
                $actionstatic->id = $histo[$key]['id'];
                $out .= $actionstatic->getNomUrl(1, 40);
            }
            if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
                $out .= '<a href="' . DOL_URL_ROOT . '/comm/mailing/fiche.php?id=' . $histo[$key]['id'] . '">' . img_object($langs->trans("ShowEMailing"), "email") . ' ';
                $transcode = $langs->trans("Action" . $histo[$key]['acode']);
                $libelle = $transcode != "Action" . $histo[$key]['acode'] ? $transcode : 'Send mass mailing';
                $out .= dol_trunc($libelle, 40);
            }
            $out .= '</td>';
            // Title of event
            //$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
            // Objet lie
            // TODO uniformize
            $out .= '<td>';
            if (isset($histo[$key]['elementtype'])) {
                if ($histo[$key]['elementtype'] == 'propal' && !empty($conf->propal->enabled)) {
                    $propalstatic->ref = $langs->trans("ProposalShort");
                    $propalstatic->id = $histo[$key]['fk_element'];
                    $out .= $propalstatic->getNomUrl(1);
                } elseif ($histo[$key]['elementtype'] == 'commande' && !empty($conf->commande->enabled)) {
                    $orderstatic->ref = $langs->trans("Order");
                    $orderstatic->id = $histo[$key]['fk_element'];
                    $out .= $orderstatic->getNomUrl(1);
                } elseif ($histo[$key]['elementtype'] == 'facture' && !empty($conf->facture->enabled)) {
                    $facturestatic->ref = $langs->trans("Invoice");
                    $facturestatic->id = $histo[$key]['fk_element'];
                    $facturestatic->type = $histo[$key]['ftype'];
                    $out .= $facturestatic->getNomUrl(1, 'compta');
                } else {
                    $out .= '&nbsp;';
                }
            } else {
                $out .= '&nbsp;';
            }
            $out .= '</td>';
            // Contact pour cette action
            if (!empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) {
                $contactstatic->lastname = $histo[$key]['lastname'];
                $contactstatic->firstname = $histo[$key]['firstname'];
                $contactstatic->id = $histo[$key]['contact_id'];
                $out .= '<td width="120">' . $contactstatic->getNomUrl(1, '', 10) . '</td>';
            } else {
                $out .= '<td>&nbsp;</td>';
            }
            // Auteur
            $out .= '<td class="nowrap" width="80">';
            $userstatic->id = $histo[$key]['userid'];
            $userstatic->login = $histo[$key]['login'];
            $out .= $userstatic->getLoginUrl(1);
            $out .= '</td>';
            // Statut
            $out .= '<td class="nowrap" width="20">' . $actionstatic->LibStatut($histo[$key]['percent'], 3) . '</td>';
            $out .= "</tr>\n";
            $i++;
        }
        $out .= "</table>\n";
        $out .= "<br>\n";
    }
    if ($noprint) {
        return $out;
    } else {
        print $out;
    }
}
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:101,代码来源:company.lib.php

示例9: array

while ($aRow = $db->fetch_object($resultCate)) {
    $categoriesDeChaqueContact[$aRow->fk_contact] = $categoriesDeChaqueContact[$aRow->fk_contact] . $aRow->label . ', ';
}
/*
 * Output
 */
$output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iTotal, "aaData" => array());
if ($col != null) {
    foreach ($col as $aRow) {
        $row = array();
        for ($i = 0; $i < count($aColumns); $i++) {
            if ($aColumns[$i] == "name") {
                $contactstatic->name = $aRow->name;
                $contactstatic->firstname = '';
                $contactstatic->id = $aRow->cidp;
                $row[] = $contactstatic->getNomUrl(1, '', 20);
            } else {
                if ($aColumns[$i] == "tms") {
                    $row[] = dol_print_date($db->jdate($aRow->tms), "day");
                } else {
                    if ($aColumns[$i] == "categorie") {
                        $row[] = $categoriesDeChaqueContact[$aRow->cidp];
                    } else {
                        if ($aColumns[$i] == "email") {
                            $row[] = dol_print_email($aRow->email, $aRow->cidp, $aRow->socid, 'AC_EMAIL', 18);
                        } else {
                            if ($aColumns[$i] == "priv") {
                                $row[] = $contactstatic->LibPubPriv($aRow->priv);
                            } else {
                                if ($i == 0) {
                                    $row[] = '<img id="' . $aRow->cidp . '" class="plus" src="../theme/cameleo/img/details_open.png">';
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:serverprocess.php

示例10: testContactOther

    /**
     * testContactOther
     *
     * @param	Contact		$localobject		Contact
     * @return	void
     *
     * @depends	testContactUpdate
     * The depends says test is run only if previous is ok
     */
    public function testContactOther($localobject)
    {
    	global $conf,$user,$langs,$db;
		$conf=$this->savconf;
		$user=$this->savuser;
		$langs=$this->savlangs;
		$db=$this->savdb;

		//$localobject->fetch($localobject->id);

        $result=$localobject->getNomUrl(1);
        print __METHOD__." id=".$localobject->id." result=".$result."\n";
        $this->assertNotEquals($result, '');

        $result=$localobject->getFullAddress(1);
        print __METHOD__." id=".$localobject->id." result=".$result."\n";
        $this->assertContains("New address\nNew zip New town\nBelgium", $result);

        $localobject->info($localobject->id);
        print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
        $this->assertNotEquals($localobject->date_creation, '');

        return $localobject->id;
    }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:33,代码来源:ContactTest.php

示例11: _events


//.........这里部分代码省略.........
        $sql .= " AND (";
        if ($filtert > 0) {
            $sql .= "ar.fk_element = " . $filtert;
        }
        if ($usergroup > 0) {
            $sql .= ($filtert > 0 ? " OR " : "") . " ugu.fk_usergroup = " . $usergroup;
        }
        $sql .= ")";
    }
    // Sort on date
    $sql .= ' ORDER BY datep';
    $TEvent = array();
    if (isset($_REQUEST['DEBUG'])) {
        print $sql;
    }
    $res = $db->query($sql);
    //var_dump($db);
    $TSociete = array();
    $TContact = array();
    $TUser = array();
    $TProject = array();
    $TEventObject = array();
    while ($obj = $db->fetch_object($res)) {
        $event = new ActionComm($db);
        $event->fetch($obj->id);
        $event->fetch_userassigned();
        $event->color = $obj->color;
        $TEventObject[] = $event;
    }
    foreach ($TEventObject as &$event) {
        if ($event->socid > 0 && !isset($TSociete[$event->socid])) {
            $societe = new Societe($db);
            $societe->fetch($event->socid);
            $TSociete[$event->socid] = $societe->getNomUrl(1);
        }
        if ($event->contactid > 0 && !isset($TContact[$event->contactid])) {
            $contact = new Contact($db);
            $contact->fetch($event->contactid);
            $TContact[$event->contactid] = $contact->getNomUrl(1);
        }
        $TUserassigned = array();
        $TColor = array();
        if ($event->color && empty($conf->global->FULLCALENDAR_USE_ASSIGNED_COLOR)) {
            $TColor[] = '#' . $event->color;
        }
        if (!empty($conf->global->FULLCALENDAR_SHOW_AFFECTED_USER)) {
            $userownerid = (int) $event->userownerid;
            if ($userownerid > 0 && !isset($TUser[$userownerid])) {
                $u = new User($db);
                $u->fetch($userownerid);
                $TUser[$userownerid] = $u;
            }
            $TUserassigned[$userownerid] = $TUser[$userownerid]->getNomUrl(1);
        }
        if (!empty($conf->global->FULLCALENDAR_SHOW_PROJECT) && $event->fk_project > 0 && !isset($TProject[$event->fk_project])) {
            $p = new Project($db);
            $p->fetch($event->fk_project);
            $TProject[$event->fk_project] = $p->getNomUrl(1);
        }
        if (!empty($conf->global->FULLCALENDAR_SHOW_AFFECTED_USER) && !empty($event->userassigned)) {
            foreach ($event->userassigned as &$ua) {
                $userid = (int) $ua['id'];
                if (!isset($TUser[$userid])) {
                    $u = new User($db);
                    $u->fetch($userid);
                    $TUser[$userid] = $u;
开发者ID:ATM-Consulting,项目名称:dolibarr_module_fullcalendar,代码行数:67,代码来源:interface.php

示例12: User

        $o = new User($db);
        $o->fetch($obj->rowid);
        $Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'user');
    }
    $res = $db->query("SELECT rowid  FROM " . MAIN_DB_PREFIX . "societe WHERE code_client = '" . $db->escape($tag) . "'");
    while ($obj = $db->fetch_object($res)) {
        $o = new Societe($db);
        $o->fetch($obj->rowid);
        $Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'societe');
    }
    list($code, $nom) = explode('_', $tag);
    $res = $db->query("SELECT p.rowid \n\t\t\t\t\tFROM " . MAIN_DB_PREFIX . "socpeople p LEFT JOIN " . MAIN_DB_PREFIX . "societe s ON (p.fk_soc=s.rowid)\n\t\t\t\t\tWHERE (s.code_client = '" . $db->escape($code) . "' OR s.nom='" . $db->escape($code) . "' ) AND p.lastname='" . $db->escape($nom) . "'");
    while ($obj = $db->fetch_object($res)) {
        $o = new Contact($db);
        $o->fetch($obj->rowid);
        $Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'contact');
    }
} else {
    if ($type_tag == 'rel') {
        $res = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "twiiit WHERE comment LIKE '%:" . $db->escape($tag) . "%'");
        $PDOdb = new TPDOdb();
        while ($obj = $db->fetch_object($res)) {
            $twiiit = new TTwiiit();
            $twiiit->load($PDOdb, $obj->rowid);
            $Tab[] = array('link' => $twiiit->getNomUrl(), 'text' => $twiiit->getComment());
        }
    } else {
        if ($type_tag == 'hashtag') {
            $res = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "propal WHERE ref = '" . $db->escape($tag) . "'");
            while ($obj = $db->fetch_object($res)) {
                $o = new Propal($db);
开发者ID:atm-alexis,项目名称:dolibarr_module_twiiitor,代码行数:31,代码来源:hashtag.php

示例13: getTContact

function getTContact(&$task)
{
    global $db;
    $TInternalContact = $task->liste_contact(-1, 'internal');
    $TExternalContact = $task->liste_contact(-1, 'external');
    $task->internal_contacts = '';
    $task->external_contacts = '';
    if (!empty($TInternalContact)) {
        dol_include_once('/user/class/user.class.php');
        $user = new User($db);
        foreach ($TInternalContact as &$row) {
            $user->id = $row['id'];
            $user->lastname = $row['lastname'];
            $user->firstname = $row['firstname'];
            $task->internal_contacts .= $user->getNomUrl(1) . '&nbsp;';
        }
    }
    if (!empty($TExternalContact)) {
        dol_include_once('/contact/class/contact.class.php');
        $contact = new Contact($db);
        foreach ($TExternalContact as &$row) {
            $contact->id = $row['id'];
            $contact->lastname = $row['lastname'];
            $contact->firstname = $row['firstname'];
            $task->internal_contacts .= $contact->getNomUrl(1) . '&nbsp;';
        }
    }
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_scrumboard,代码行数:28,代码来源:interface.php


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