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


PHP Adherent::fetch_thirdparty方法代码示例

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


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

示例1: GETPOST

 *  \brief      Page of members events
 */
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
$langs->load("companies");
$langs->load("members");
$id = GETPOST('id', 'int');
// Security check
$result = restrictedArea($user, 'adherent', $id);
$object = new Adherent($db);
$result = $object->fetch($id);
if ($result > 0) {
    $object->fetch_thirdparty();
    $adht = new AdherentType($db);
    $result = $adht->fetch($object->typeid);
}
/*
 *	Actions
 */
// None
/*
 *	View
 */
$contactstatic = new Contact($db);
$form = new Form($db);
/*
 * Fiche categorie de client et/ou fournisseur
 */
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:agenda.php

示例2: 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;
     include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
     $memberstatic = new Adherent($db);
     $this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedMembers", $max));
     if ($user->rights->adherent->lire) {
         $sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
         $sql .= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
         $sql .= " t.cotisation";
         $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a, " . MAIN_DB_PREFIX . "adherent_type as t";
         $sql .= " WHERE a.entity = " . $conf->entity;
         $sql .= " AND a.fk_adherent_type = t.rowid";
         $sql .= " ORDER BY a.tms DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $i = 0;
             while ($i < $num) {
                 $objp = $db->fetch_object($result);
                 $datec = $db->jdate($objp->datec);
                 $datem = $db->jdate($objp->tms);
                 $memberstatic->lastname = $objp->lastname;
                 $memberstatic->firstname = $objp->firstname;
                 if (!empty($objp->fk_soc)) {
                     $memberstatic->socid = $objp->fk_soc;
                     $memberstatic->fetch_thirdparty();
                     $memberstatic->name = $memberstatic->thirdparty->name;
                 } else {
                     $memberstatic->name = $objp->company;
                 }
                 $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT . "/adherents/fiche.php?rowid=" . $objp->rowid);
                 $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $memberstatic->getFullName($langs), 'url' => DOL_URL_ROOT . "/adherents/fiche.php?rowid=" . $objp->rowid);
                 $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day"));
                 $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', 'text' => $memberstatic->LibStatut($objp->status, $objp->cotisation, $db->jdate($objp->date_end_subscription), 3));
                 $i++;
             }
             if ($num == 0) {
                 $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedCustomers"));
             }
             $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:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:57,代码来源:box_members.php

示例3: while

 print '&nbsp; ';
 print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
 print '</td>';
 print "</tr>\n";
 print '</form>';
 $var = True;
 while ($i < $num && $i < $conf->liste_limit) {
     $objp = $db->fetch_object($resql);
     $datefin = $db->jdate($objp->datefin);
     $memberstatic->id = $objp->rowid;
     $memberstatic->ref = $objp->rowid;
     $memberstatic->lastname = $objp->lastname;
     $memberstatic->firstname = $objp->firstname;
     if (!empty($objp->fk_soc)) {
         $memberstatic->socid = $objp->fk_soc;
         $memberstatic->fetch_thirdparty();
         $companyname = $memberstatic->thirdparty->name;
     } else {
         $companyname = $objp->company;
     }
     $var = !$var;
     print "<tr " . $bc[$var] . ">";
     // Ref
     print "<td>";
     print $memberstatic->getNomUrl(1);
     print "</td>\n";
     // Lastname
     print "<td><a href=\"card.php?rowid={$objp->rowid}\">";
     print !empty($objp->lastname) || !empty($objp->firstname) ? dol_trunc($memberstatic->getFullName($langs)) : '';
     print (!empty($objp->lastname) || !empty($objp->firstname)) && !empty($companyname) ? ' / ' : '';
     print !empty($companyname) ? dol_trunc($companyname, 32) : '';
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:list.php

示例4: while

 print '<tr class="liste_titre">';
 print '<td colspan="4">' . $langs->trans("LastMembersModified", $max) . '</td></tr>';
 $num = $db->num_rows($resql);
 if ($num) {
     $i = 0;
     $var = True;
     while ($i < $num) {
         $var = !$var;
         $obj = $db->fetch_object($resql);
         print "<tr " . $bc[$var] . ">";
         $staticmember->id = $obj->rowid;
         $staticmember->lastname = $obj->lastname;
         $staticmember->firstname = $obj->firstname;
         if (!empty($obj->fk_soc)) {
             $staticmember->fk_soc = $obj->fk_soc;
             $staticmember->fetch_thirdparty();
             $staticmember->name = $staticmember->thirdparty->name;
         } else {
             $staticmember->name = $obj->company;
         }
         $staticmember->ref = $staticmember->getFullName($langs);
         $statictype->id = $obj->typeid;
         $statictype->libelle = $obj->libelle;
         print '<td>' . $staticmember->getNomUrl(1, 32) . '</td>';
         print '<td>' . $statictype->getNomUrl(1, 32) . '</td>';
         print '<td>' . dol_print_date($db->jdate($obj->datem), 'dayhour') . '</td>';
         print '<td align="right">' . $staticmember->LibStatut($obj->statut, $obj->cotisation == 'yes' ? 1 : 0, $db->jdate($obj->date_end_subscription), 5) . '</td>';
         print '</tr>';
         $i++;
     }
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:index.php


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