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


PHP Adherent类代码示例

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


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

示例1: save

 public function save(Adherent $data)
 {
     if ($data->isValid()) {
         $this->add($data);
     } else {
         throw new RunTimeException('an adherent must be valid to be registerd, please check data and pull request again.');
     }
 }
开发者ID:sdmg15,项目名称:cmpj,代码行数:8,代码来源:AdherentManagerPDO.php

示例2: getObject

 /**
  *  Get object
  *
  *  @param	int		$id		Object id
  *  @return	object			Object loaded
  */
 function getObject($id)
 {
     $ret = $this->getInstanceDao();
     if (is_object($this->object) && method_exists($this->object, 'fetch')) {
         if (!empty($id)) {
             $this->object->fetch($id);
         }
     } else {
         $object = new Adherent($this->db);
         if (!empty($id)) {
             $object->fetch($id);
         }
         $this->object = $object;
     }
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:21,代码来源:actions_adherentcard_common.class.php

示例3: 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->societe->lire) {
         $sql = "SELECT a.rowid, a.nom as lastname, a.prenom as firstname, 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;
                 $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"));
             }
         } 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:nrjacker4,项目名称:crm-php,代码行数:48,代码来源:box_members.php

示例4: include

            else {
                print $langs->trans("NoParentCompany");
            }
            print '</td></tr>';
        }

        // Sales representative
        include(DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php');

        // Module Adherent
        if ($conf->adherent->enabled)
        {
            $langs->load("members");
            print '<tr><td width="25%" valign="top">'.$langs->trans("LinkedToDolibarrMember").'</td>';
            print '<td colspan="3">';
            $adh=new Adherent($db);
            $result=$adh->fetch('','',$object->id);
            if ($result > 0)
            {
                $adh->ref=$adh->getFullName($langs);
                print $adh->getNomUrl(1);
            }
            else
            {
                print $langs->trans("UserNotLinkedToMember");
            }
            print '</td>';
            print "</tr>\n";
        }

        print '</table>';
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:soc.php

示例5: AccountLine

    }
}
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier) {
    $accline = new AccountLine($db);
    $result = $accline->fetch(GETPOST("rowid"));
    $result = $accline->delete();
}
/*
 * View
 */
llxHeader('', $langs->trans("FinancialAccount") . '-' . $langs->trans("Transactions"));
$societestatic = new Societe($db);
$userstatic = new User($db);
$chargestatic = new ChargeSociales($db);
$loanstatic = new Loan($db);
$memberstatic = new Adherent($db);
$paymentstatic = new Paiement($db);
$paymentsupplierstatic = new PaiementFourn($db);
$paymentvatstatic = new TVA($db);
$paymentsalstatic = new PaymentSalary($db);
$donstatic = new Don($db);
$expensereportstatic = new ExpenseReport($db);
$bankstatic = new Account($db);
$banklinestatic = new AccountLine($db);
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
    if ($vline) {
        $viewline = $vline;
    } else {
        $viewline = empty($conf->global->MAIN_SIZE_LISTE_LIMIT) ? 20 : $conf->global->MAIN_SIZE_LISTE_LIMIT;
    }
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:31,代码来源:account.php

示例6: GETPOST

$mode = GETPOST('mode') ? GETPOST('mode') : '';
// Security check
if ($user->societe_id > 0) {
    $action = '';
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'adherent', '', '', 'cotisation');
$year = strftime("%Y", time());
$startyear = $year - 2;
$endyear = $year;
$langs->load("members");
$langs->load("companies");
/*
 * View
 */
$memberstatic = new Adherent($db);
llxHeader('', '', '', '', 0, 0, array('http://www.google.com/jsapi'));
$title = $langs->trans("MembersStatisticsByProperties");
print load_fiche_titre($title, $mesg);
dol_mkdir($dir);
$tab = 'byproperties';
$data = array();
$sql .= "SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, d.morphy as code";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent as d";
$sql .= " WHERE d.entity IN (" . getEntity() . ")";
$sql .= " AND d.statut = 1";
$sql .= " GROUP BY d.morphy";
$foundphy = $foundmor = 0;
// Define $data array
dol_syslog("Count member", LOG_DEBUG);
$resql = $db->query($sql);
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:byproperties.php

示例7: dol_now

$langs->load("members");
$langs->load("errors");
// Choix de l'annee d'impression ou annee courante.
$now = dol_now();
$year = dol_print_date($now, '%Y');
$month = dol_print_date($now, '%m');
$day = dol_print_date($now, '%d');
$foruserid = GETPOST('foruserid');
$foruserlogin = GETPOST('foruserlogin');
$mode = GETPOST('mode');
$model = GETPOST("model");
// Doc template to use for business cards
$modellabel = GETPOST("modellabel");
// Doc template to use for address sheet
$mesg = '';
$adherentstatic = new Adherent($db);
/*
 * Actions
 */
if ($mode == 'cardlogin' && empty($foruserlogin)) {
    $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"));
}
if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
    $arrayofmembers = array();
    // requete en prenant que les adherents a jour de cotisation
    $sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,";
    $sql .= " d.address, d.zip, d.town, d.country, d.birth, d.email, d.photo,";
    $sql .= " t.libelle as type,";
    $sql .= " c.code as country_code, c.label as country";
    $sql .= " FROM " . MAIN_DB_PREFIX . "adherent_type as t, " . MAIN_DB_PREFIX . "adherent as d";
    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as c ON d.country = c.rowid";
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:carte.php

示例8: Adherent

	print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
	print '&nbsp; ';
	print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" 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);

		$adh=new Adherent($db);

		// Nom
		$var=!$var;
		print "<tr $bc[$var]>";
		if ($objp->societe != '')
		{
			print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom,12)." / ".dol_trunc($objp->societe,12)."</a></td>\n";
		}
		else
		{
			print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom." ".dol_trunc($objp->nom)."</a></td>\n";
		}

		// Login
		print "<td>".$objp->login."</td>\n";
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:liste.php

示例9: GETPOST

/**
 *  \file       htdocs/adherents/agenda.php
 *  \ingroup    member
 *  \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);
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:agenda.php

示例10: show_ldap_test_button

print '</form>';
/*
 * Test de la connexion
 */
if (!empty($conf->global->LDAP_MEMBER_ACTIVE)) {
    $butlabel = $langs->trans("LDAPTestSynchroMember");
    $testlabel = 'testmember';
    $key = $conf->global->LDAP_KEY_MEMBERS;
    $dn = $conf->global->LDAP_MEMBER_DN;
    $objectclass = $conf->global->LDAP_MEMBER_OBJECT_CLASS;
    show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
}
if (function_exists("ldap_connect")) {
    if ($_GET["action"] == 'testmember') {
        // Creation objet
        $object = new Adherent($db);
        $object->initAsSpecimen();
        // Test synchro
        $ldap = new Ldap();
        $result = $ldap->connect_bind();
        if ($result > 0) {
            $info = $object->_load_ldap_info();
            $dn = $object->_load_ldap_dn($info);
            $result1 = $ldap->delete($dn);
            // To be sure to delete existing records
            $result2 = $ldap->add($dn, $info, $user);
            // Now the test
            $result3 = $ldap->delete($dn);
            // Clean what we did
            if ($result2 > 0) {
                print img_picto('', 'info') . ' ';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:ldap_members.php

示例11: HTTPRequest

include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPRequest.php";
include_once "C:\\wamp\\www\\CMPJ\\Controleurs\\HTTPResponse.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\AdherentManagerPDO.php";
include_once "C:\\wamp\\www\\CMPJ\\Model\\PDOFactory.php";
$request = new HTTPRequest();
$manager = new AdherentManagerPDO(PDOFactory::getPdoInstance());
if (isset($_GET['modifier'])) {
    if (!$manager->Exists((int) $_GET['modifier'])) {
        $message = 'NOT FOUND.';
    } else {
        $adherent = $manager->getUnique((int) $_GET['modifier']);
    }
}
if ($request->postExists('nom')) {
    //on hydrate les  données
    $adherent = new Adherent(['nom' => $request->postData('nom'), 'prenom' => $request->postData('prenom'), 'dateNaissance' => $request->postData('date'), 'lieu' => $request->postData('lieuNaissance'), 'sexe' => $request->postData('sexe'), 'region' => $request->postData('region'), 'departement' => $request->postData('departement'), 'ethnie' => $request->postData('ethnie'), 'nationalite' => $request->postData('nationalite'), 'profession_mere_parrain' => $request->postData('profession'), 'situationMatrimoniale' => $request->postData('situation'), 'lieuResidence' => $request->postData('lieuResidence'), 'adresse' => $request->postData('addr'), 'telPerso' => $request->postData('telPerso'), 'sosTel' => $request->postData('sosTel'), 'sosName' => $request->postData('sosName'), 'diplomeEleve' => $request->postData('diplome'), 'dateObtentionPlace' => $request->postData('dateObtention'), 'speakLanguage' => $request->postData('speakLanguage'), 'filiere' => $request->postData('option')]);
    $adherent->setId((int) $_GET['modifier']);
    if ($adherent->isvalid()) {
        $manager->update($adherent);
        $message = 'Informations bien modifiées ';
    } else {
        $erreurs = $adherent->getErreurs();
    }
}
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Formulaire d'inscription CMPJ MAYO-LOUTI</title>
		<meta charset="utf-8" content="text/html">
		<link rel="stylesheet" href="css/Envision.css" >
开发者ID:sdmg15,项目名称:cmpj,代码行数:31,代码来源:modifier.php

示例12: Adherent

                    print $langs->trans("ThisUserIsNot");
                }
                print ' ('.$langs->trans("UseTypeFieldToChange").')';
                print '</td>';
                print "</tr>\n";
            }

            // Module Adherent
            if (! empty($conf->adherent->enabled))
            {
                $langs->load("members");
                print '<tr><td width="25%">'.$langs->trans("LinkedToDolibarrMember").'</td>';
                print '<td>';
                if ($object->fk_member)
                {
                    $adh=new Adherent($db);
                    $adh->fetch($object->fk_member);
                    $adh->ref=$adh->login;	// Force to show login instead of id
                    print $adh->getNomUrl(1);
                }
                else
                {
                    print $langs->trans("UserNotLinkedToMember");
                }
                print '</td>';
                print "</tr>\n";
            }

            // Multicompany
            // TODO check if user not linked with the current entity before change entity (thirdparty, invoice, etc.) !!
            if (! empty($conf->multicompany->enabled) && is_object($mc))
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:31,代码来源:card.php

示例13: Ldap

	print $langs->trans("LDAPSynchronizationNotSetupInDolibarr");
	exit(-1);
}
*/
$sql = "SELECT rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent";
$resql = $db->query($sql);
if ($resql) {
    $num = $db->num_rows($resql);
    $i = 0;
    $ldap = new Ldap();
    $ldap->connect_bind();
    while ($i < $num) {
        $ldap->error = "";
        $obj = $db->fetch_object($resql);
        $member = new Adherent($db);
        $result = $member->fetch($obj->rowid);
        if ($result < 0) {
            dol_print_error($db, $member->error);
            exit(-1);
        }
        $result = $member->fetch_subscriptions();
        if ($result < 0) {
            dol_print_error($db, $member->error);
            exit(-1);
        }
        print $langs->transnoentities("UpdateMember") . " rowid=" . $member->id . " " . $member->getFullName($langs);
        $oldobject = $member;
        $oldinfo = $oldobject->_load_ldap_info();
        $olddn = $oldobject->_load_ldap_dn($oldinfo);
        $info = $member->_load_ldap_info();
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:sync_members_dolibarr2ldap.php

示例14: GETPOST

require_once DOL_DOCUMENT_ROOT . '/core/lib/ldap.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
$langs->load("companies");
$langs->load("members");
$langs->load("ldap");
$langs->load("admin");
$rowid = GETPOST('id', 'int');
$action = GETPOST('action');
// Protection
$socid = 0;
if ($user->societe_id > 0) {
    $socid = $user->societe_id;
}
$adh = new Adherent($db);
$adh->id = $rowid;
$result = $adh->fetch($rowid);
if (!$result) {
    dol_print_error($db, "Failed to get adherent: " . $adh->error);
    exit;
}
/*
 * Actions
 */
if ($action == 'dolibarr2ldap') {
    $db->begin();
    $ldap = new Ldap();
    $result = $ldap->connect_bind();
    $info = $adh->_load_ldap_info();
    $dn = $adh->_load_ldap_dn($info);
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:ldap.php

示例15: GETPOST

            $_POST['action'] = '';
            $action = '';
        }
    }
}
if ($action == 'setsocid') {
    $error = 0;
    if (!$error) {
        if (GETPOST('socid', 'int') != $object->fk_soc) {
            $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "adherent";
            $sql .= " WHERE fk_soc = '" . GETPOST('socid', 'int') . "'";
            $resql = $db->query($sql);
            if ($resql) {
                $obj = $db->fetch_object($resql);
                if ($obj && $obj->rowid > 0) {
                    $othermember = new Adherent($db);
                    $othermember->fetch($obj->rowid);
                    $thirdparty = new Societe($db);
                    $thirdparty->fetch(GETPOST('socid', 'int'));
                    $error++;
                    setEventMessages($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty", $othermember->getFullName($langs), $othermember->login, $thirdparty->name), null, 'errors');
                }
            }
            if (!$error) {
                $result = $object->setThirdPartyId(GETPOST('socid', 'int'));
                if ($result < 0) {
                    dol_print_error('', $object->error);
                }
                $_POST['action'] = '';
                $action = '';
            }
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card_subscriptions.php


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