예제 #1
0
	{
		if ($statut == '-1,1') { $titre=$langs->trans("MembersListQualified"); }
		if ($statut == '-1')   { $titre=$langs->trans("MembersListToValid"); }
		if ($statut == '1' && ! $filter)    		{ $titre=$langs->trans("MembersListValid"); }
		if ($statut == '1' && $filter=='uptodate')  { $titre=$langs->trans("MembersListUpToDate"); }
		if ($statut == '1' && $filter=='outofdate')	{ $titre=$langs->trans("MembersListNotUpToDate"); }
		if ($statut == '0')    { $titre=$langs->trans("MembersListResiliated"); }
	}
	elseif ($_POST["action"] == 'search')
	{
		$titre=$langs->trans("MembersListQualified");
	}

	if ($_REQUEST["type"] > 0)
	{
		$membertype=new AdherentType($db);
		$result=$membertype->fetch($_REQUEST["type"]);
		$titre.=" (".$membertype->libelle.")";
	}

	$param="";
	if (isset($_GET["statut"]))       $param.="&statut=".$_GET["statut"];
	if (isset($_GET["search_nom"]))   $param.="&search_nom=".$_GET["search_nom"];
	if (isset($_GET["search_login"])) $param.="&search_login="******"search_login"];
	if (isset($_GET["search_email"])) $param.="&search_email=".$_GET["search_email"];
	if (isset($_GET["filter"]))       $param.="&filter=".$_GET["filter"];
	print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);

	if ($sall)
	{
		print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
예제 #2
0
if ($action == 'added') {
    llxHeaderVierge($langs->trans("NewMemberForm"));
    // Si on a pas ete redirige
    print '<br>';
    print '<center>';
    print $langs->trans("NewMemberbyWeb");
    print '</center>';
    llxFooterVierge();
    exit;
}
/*
 * View
 */
$form = new Form($db);
$formcompany = new FormCompany($db);
$adht = new AdherentType($db);
$extrafields->fetch_name_optionals_label('adherent');
// fetch optionals attributes and labels
llxHeaderVierge($langs->trans("NewSubscription"));
print_titre($langs->trans("NewSubscription"));
if (!empty($conf->global->MEMBER_NEWFORM_TEXT)) {
    print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT) . "<br>\n";
} else {
    print $langs->trans("NewSubscriptionDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL) . "<br>\n";
}
dol_htmloutput_errors($errmsg);
print '<div align="center">';
print '<br>' . $langs->trans("FieldsWithAreMandatory", '*') . '<br>';
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
print '<script type="text/javascript">
jQuery(document).ready(function () {
예제 #3
0
                     if ($status == '1' && $filter == 'outofdate') {
                         $titre = $langs->trans("MembersListNotUpToDate");
                     } else {
                         if ($status == '0') {
                             $titre = $langs->trans("MembersListResiliated");
                         }
                     }
                 }
             }
         }
     }
 } elseif ($action == 'search') {
     $titre = $langs->trans("MembersListQualified");
 }
 if ($type > 0) {
     $membertype = new AdherentType($db);
     $result = $membertype->fetch($type);
     $titre .= " (" . $membertype->libelle . ")";
 }
 $param = "&rowid=" . $rowid;
 if (!empty($status)) {
     $param .= "&status=" . $status;
 }
 if (!empty($search_lastname)) {
     $param .= "&search_lastname=" . $search_lastname;
 }
 if (!empty($search_firstname)) {
     $param .= "&search_firstname=" . $search_firstname;
 }
 if (!empty($search_login)) {
     $param .= "&search_login=" . $search_login;
예제 #4
0
 */
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
 */
if ($object->id > 0) {
예제 #5
0
 }
 print '</table></form>';
 print '<br>';
 // Contacts lines (modules that overwrite templates must declare this into descriptor)
 $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
 foreach ($dirtpls as $reldir) {
     $res = @(include dol_buildpath($reldir . '/contacts.tpl.php'));
     if ($res) {
         break;
     }
 }
 // additionnal list with adherents of company
 if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire) {
     require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
     require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
     $membertypestatic = new AdherentType($db);
     $memberstatic = new Adherent($db);
     $langs->load("members");
     $sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
     $sql .= " d.datefin,";
     $sql .= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
     $sql .= " t.libelle as type, t.cotisation";
     $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as d";
     $sql .= ", " . MAIN_DB_PREFIX . "adherent_type as t";
     $sql .= " WHERE d.fk_soc=" . $id;
     dol_syslog("get list sql=" . $sql);
     $resql = $db->query($sql);
     if ($resql) {
         $num = $db->num_rows($resql);
         if ($num > 0) {
             $titre = $langs->trans("MembersListOfTiers");
예제 #6
0
         print ' <em>(' . $langs->trans("ChequeMaker") . ')</em>';
         print '</td>';
         print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="' . (!GETPOST('chqemetteur') ? '' : GETPOST('chqemetteur')) . '"></td></tr>';
         print '<tr class="bankswitchclass2"><td>' . $langs->trans('Bank');
         print ' <em>(' . $langs->trans("ChequeBank") . ')</em>';
         print '</td>';
         print '<td><input id="chqbank" name="chqbank" size="32" type="text" value="' . (!GETPOST('chqbank') ? '' : GETPOST('chqbank')) . '"></td></tr>';
     }
 }
 print '<tr><td colspan="2">&nbsp;</td>';
 print '<tr><td width="30%">' . $langs->trans("SendAcknowledgementByMail") . '</td>';
 print '<td>';
 if (!$object->email) {
     print $langs->trans("NoEMail");
 } else {
     $adht = new AdherentType($db);
     $adht->fetch($object->typeid);
     $subjecttosend = $object->makeSubstitution($conf->global->ADHERENT_MAIL_COTIS_SUBJECT);
     $texttosend = $object->makeSubstitution($adht->getMailOnSubscription());
     $tmp = '<input name="sendmail" type="checkbox"' . (GETPOST('sendmail') ? GETPOST('sendmail') : (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? ' checked' : '')) . '>';
     $helpcontent = '';
     $helpcontent .= '<b>' . $langs->trans("MailFrom") . '</b>: ' . $conf->global->ADHERENT_MAIL_FROM . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("MailRecipient") . '</b>: ' . $object->email . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("MailTopic") . '</b>:<br>' . "\n";
     $helpcontent .= $subjecttosend . "\n";
     $helpcontent .= "<br>";
     $helpcontent .= '<b>' . $langs->trans("MailText") . '</b>:<br>';
     $helpcontent .= dol_htmlentitiesbr($texttosend) . "\n";
     print $form->textwithpicto($tmp, $helpcontent, 1, 'help');
 }
 print '</td></tr>';
if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) {
    $sortorder = "ASC";
}
if (!$sortfield) {
    $sortfield = "name";
}
$upload_dir = $conf->adherent->dir_output . "/" . get_exdir($id, 2, 0, 1) . '/' . $id;
$form = new Form($db);
$object = new Adherent($db);
$membert = new AdherentType($db);
$result = $object->fetch($id);
if ($result < 0) {
    dol_print_error($db);
    exit;
}
/*
 * Actions
 */
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
/*
 * View
 */
llxHeader();
if ($id > 0) {
    $result = $membert->fetch($object->typeid);
예제 #8
0
파일: list.php 프로젝트: ADDAdev/Dolibarr
         $titre = $langs->trans("MembersListValid");
     }
     if ($statut == '1' && $filter == 'uptodate') {
         $titre = $langs->trans("MembersListUpToDate");
     }
     if ($statut == '1' && $filter == 'outofdate') {
         $titre = $langs->trans("MembersListNotUpToDate");
     }
     if ($statut == '0') {
         $titre = $langs->trans("MembersListResiliated");
     }
 } elseif ($action == 'search') {
     $titre = $langs->trans("MembersListQualified");
 }
 if ($type > 0) {
     $membertype = new AdherentType($db);
     $result = $membertype->fetch(GETPOST("type"));
     $titre .= " (" . $membertype->libelle . ")";
 }
 $param = "";
 if ($statut != "") {
     $param .= "&statut=" . $statut;
 }
 if ($search_nom) {
     $param .= "&search_nom=" . $search_nom;
 }
 if ($search_login) {
     $param .= "&search_login="******"&search_email=" . $search_email;
예제 #9
0
파일: type.php 프로젝트: ADDAdev/Dolibarr
                 print '<a href="card.php?rowid=' . $objp->rowid . '&action=resign&return=list.php">' . img_picto($langs->trans("Resiliate"), 'disable.png') . '</a>';
             }
             print "</td>";
             print "</tr>\n";
             $i++;
         }
         print "</table>\n";
         if ($num > $conf->liste_limit) {
             print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
         }
     } else {
         dol_print_error($db);
     }
 }
 if ($action == 'edit') {
     $adht = new AdherentType($db);
     $adht->id = $rowid;
     $adht->fetch($rowid);
     $adht->fetch_optionals($rowid, $extralabels);
     $h = 0;
     $head[$h][0] = $_SERVER["PHP_SELF"] . '?rowid=' . $adht->id;
     $head[$h][1] = $langs->trans("Card");
     $head[$h][2] = 'card';
     $h++;
     dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');
     print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '?rowid=' . $rowid . '">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="rowid" value="' . $rowid . '">';
     print '<input type="hidden" name="action" value="update">';
     print '<table class="border" width="100%">';
     print '<tr><td width="15%">' . $langs->trans("Ref") . '</td><td>' . $adht->id . '</td></tr>';
예제 #10
0
파일: index.php 프로젝트: Albertopf/prueba
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
$sql .= " d.statut, count(d.rowid) as somme";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent_type as t";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "adherent as d";
$sql .= " ON t.rowid = d.fk_adherent_type";
$sql .= " AND d.entity IN (" . getEntity() . ")";
$sql .= " WHERE t.entity IN (" . getEntity() . ")";
$sql .= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
dol_syslog("index.php::select nb of members by type", LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
    $num = $db->num_rows($result);
    $i = 0;
    while ($i < $num) {
        $objp = $db->fetch_object($result);
        $adhtype = new AdherentType($db);
        $adhtype->id = $objp->rowid;
        $adhtype->cotisation = $objp->cotisation;
        $adhtype->libelle = $objp->libelle;
        $AdherentType[$objp->rowid] = $adhtype;
        if ($objp->statut == -1) {
            $MemberToValidate[$objp->rowid] = $objp->somme;
        }
        if ($objp->statut == 1) {
            $MembersValidated[$objp->rowid] = $objp->somme;
        }
        if ($objp->statut == 0) {
            $MembersResiliated[$objp->rowid] = $objp->somme;
        }
        $i++;
    }
예제 #11
0
파일: card.php 프로젝트: Samara94/dolibarr
     if (!empty($conf->mailman->enabled) && !empty($conf->global->ADHERENT_USE_MAILMAN)) {
         $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value' => '');
     }
     if (!empty($conf->mailman->enabled) && !empty($conf->global->ADHERENT_USE_SPIP)) {
         $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value' => '');
     }
     print $form->formconfirm("card.php?rowid=" . $rowid, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 1, 1);
 }
 // Confirm send card by mail
 if ($action == 'sendinfo') {
     print $form->formconfirm("card.php?rowid=" . $rowid, $langs->trans("SendCardByMail"), $langs->trans("ConfirmSendCardByMail", $object->email), "confirm_sendinfo", '', 0, 1);
 }
 // Confirm terminate
 if ($action == 'resign') {
     $langs->load("mails");
     $adht = new AdherentType($db);
     $adht->fetch($object->typeid);
     $subjecttosend = $object->makeSubstitution($conf->global->ADHERENT_MAIL_RESIL_SUBJECT);
     $texttosend = $object->makeSubstitution($adht->getMailOnResiliate());
     $tmp = $langs->trans("SendAnEMailToMember");
     $tmp .= '<br>(' . $langs->trans("MailFrom") . ': <b>' . $conf->global->ADHERENT_MAIL_FROM . '</b>, ';
     $tmp .= $langs->trans("MailRecipient") . ': <b>' . $object->email . '</b>)';
     $helpcontent = '';
     $helpcontent .= '<b>' . $langs->trans("MailFrom") . '</b>: ' . $conf->global->ADHERENT_MAIL_FROM . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("MailRecipient") . '</b>: ' . $object->email . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("Subject") . '</b>:<br>' . "\n";
     $helpcontent .= $subjecttosend . "\n";
     $helpcontent .= "<br>";
     $helpcontent .= '<b>' . $langs->trans("Content") . '</b>:<br>';
     $helpcontent .= dol_htmlentitiesbr($texttosend) . "\n";
     $label = $form->textwithpicto($tmp, $helpcontent, 1, 'help');
예제 #12
0
파일: fiche.php 프로젝트: nrjacker4/crm-php
         $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value' => '');
     }
     if ($conf->global->ADHERENT_USE_SPIP) {
         $langs->load("mailmanspip");
         $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value' => '');
     }
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $rowid, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 1);
 }
 // Confirm send card by mail
 if ($action == 'sendinfo') {
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $rowid, $langs->trans("SendCardByMail"), $langs->trans("ConfirmSendCardByMail", $object->email), "confirm_sendinfo", '', 0, 1);
 }
 // Confirm resiliate
 if ($action == 'resign') {
     $langs->load("mails");
     $adht = new AdherentType($db);
     $adht->fetch($object->typeid);
     $subjecttosend = $object->makeSubstitution($conf->global->ADHERENT_MAIL_RESIL_SUBJECT);
     $texttosend = $object->makeSubstitution($adht->getMailOnResiliate());
     $tmp = $langs->trans("SendAnEMailToMember");
     $tmp .= ' (' . $langs->trans("MailFrom") . ': <b>' . $conf->global->ADHERENT_MAIL_FROM . '</b>, ';
     $tmp .= $langs->trans("MailRecipient") . ': <b>' . $object->email . '</b>)';
     $helpcontent = '';
     $helpcontent .= '<b>' . $langs->trans("MailFrom") . '</b>: ' . $conf->global->ADHERENT_MAIL_FROM . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("MailRecipient") . '</b>: ' . $object->email . '<br>' . "\n";
     $helpcontent .= '<b>' . $langs->trans("Subject") . '</b>:<br>' . "\n";
     $helpcontent .= $subjecttosend . "\n";
     $helpcontent .= "<br>";
     $helpcontent .= '<b>' . $langs->trans("Content") . '</b>:<br>';
     $helpcontent .= dol_htmlentitiesbr($texttosend) . "\n";
     $label = $form->textwithpicto($tmp, $helpcontent, 1, 'help');
예제 #13
0
$sql.= " d.statut, count(d.rowid) as somme";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON t.rowid = d.fk_adherent_type";
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";

dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{
	$num = $db->num_rows($result);
	$i = 0;
	while ($i < $num)
	{
		$objp = $db->fetch_object($result);

		$adhtype=new AdherentType($db);
		$adhtype->id=$objp->rowid;
		$adhtype->cotisation=$objp->cotisation;
		$adhtype->libelle=$objp->libelle;
		$AdherentType[$objp->rowid]=$adhtype;

		if ($objp->statut == -1) { $MemberToValidate[$objp->rowid]=$objp->somme; }
		if ($objp->statut == 1)  { $MembersValidated[$objp->rowid]=$objp->somme; }
		if ($objp->statut == 0)  { $MembersResiliated[$objp->rowid]=$objp->somme; }

		$i++;
	}
	$db->free($result);
}

예제 #14
0
			{
			    print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'');
			}
		}
		else
		{
		    dol_print_error($db);
		}

	}

	if ($_GET["action"] == 'edit')
	{
		$htmls = new Form($db);

		$adht = new AdherentType($db);
		$adht->id = $rowid;
		$adht->fetch($rowid);


		$h=0;

		$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
		$head[$h][1] = $langs->trans("Card");
		$head[$h][2] = 'card';
		$h++;

		dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');


		print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'">';
예제 #15
0
 /**
  * testAdherentTypeDelete
  *
  * @param   Adherent    $localobject    Member instance
  * @return void
  *
  * @depends	testAdherentDelete
  * The depends says test is run only if previous is ok
  */
 public function testAdherentTypeDelete($localobject)
 {
     global $conf, $user, $langs, $db;
     $conf = $this->savconf;
     $user = $this->savuser;
     $langs = $this->savlangs;
     $db = $this->savdb;
     $localobjectat = new AdherentType($this->savdb);
     $result = $localobjectat->fetch($localobject->typeid);
     $result = $localobjectat->delete();
     print __METHOD__ . " result=" . $result . "\n";
     $this->assertLessThan($result, 0);
     return $localobject->id;
 }