forked from Wavyzz/dolibarr
cvsimport
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/adherents/type.php
|
||||
* \ingroup member
|
||||
* \brief Page de configuration des types d'adherents
|
||||
* \version $Id$
|
||||
* \version $Id: type.php,v 1.69 2011/06/26 21:03:44 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -32,7 +32,17 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||
|
||||
$langs->load("members");
|
||||
|
||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
||||
$rowid=GETPOST("rowid");
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder="DESC"; }
|
||||
if (! $sortfield) { $sortfield="d.nom"; }
|
||||
|
||||
// Security check
|
||||
if (! $user->rights->adherent->lire) accessforbidden();
|
||||
@@ -414,13 +424,12 @@ if ($rowid > 0)
|
||||
$titre.=" (".$membertype->libelle.")";
|
||||
}
|
||||
|
||||
$param="";
|
||||
$param="&rowid=".$rowid;
|
||||
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=".$_GET["search_login"];
|
||||
if (isset($_GET["search_email"])) $param.="&search_email=".$_GET["search_email"];
|
||||
if (isset($_GET["filter"])) $param.="&filter=".$_GET["filter"];
|
||||
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
@@ -428,16 +437,17 @@ if ($rowid > 0)
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),"liste.php","d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),"liste.php","d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),"liste.php","d.morphy",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EMail"),"liste.php","d.email",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","d.statut,d.datefin",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EndSubscription"),"liste.php","d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Action"),"liste.php","",$param,"",'width="60" align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.statut,d.datefin",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EndSubscription"),$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
@@ -627,5 +637,5 @@ if ($rowid > 0)
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/06/26 21:03:44 $ - $Revision: 1.69 $');
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/core/class/html.formcompany.class.php
|
||||
* \ingroup core
|
||||
* \brief File of class to build HTML component for third parties management
|
||||
* \version $Id$
|
||||
* \version $Id: html.formcompany.class.php,v 1.33 2011/06/26 21:51:56 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -627,8 +627,9 @@ class FormCompany
|
||||
* @param htmlname
|
||||
* @param fields
|
||||
* @param fieldsize
|
||||
* @param disableautocomplete 1 To disable autocomplete features
|
||||
*/
|
||||
function select_ziptown($selected='',$htmlname='zipcode',$fields='',$fieldsize=0)
|
||||
function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -637,7 +638,7 @@ class FormCompany
|
||||
$size='';
|
||||
if (!empty($fieldsize)) $size='size="'.$fieldsize.'"';
|
||||
|
||||
if ($conf->use_javascript_ajax) $out.= ajax_multiautocompleter($htmlname,$fields,DOL_URL_ROOT.'/core/ajaxziptown.php')."\n";
|
||||
if ($conf->use_javascript_ajax && empty($disableautocomplete)) $out.= ajax_multiautocompleter($htmlname,$fields,DOL_URL_ROOT.'/core/ajaxziptown.php')."\n";
|
||||
$out.= '<input id="'.$htmlname.'" type="text" name="'.$htmlname.'" '.$size.' value="'.$selected.'">'."\n";
|
||||
|
||||
return $out;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/core/class/interfaces.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe de gestion des triggers
|
||||
* \version $Id$
|
||||
* \version $Id: interfaces.class.php,v 1.7 2011/06/27 10:41:31 hregis Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ class Interfaces
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$html = new Form($db);
|
||||
$html = new Form($this->db);
|
||||
|
||||
$files = array();
|
||||
$modules = array();
|
||||
@@ -212,7 +212,7 @@ class Interfaces
|
||||
{
|
||||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans("Error").' : '.$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/includes/triggers/").'</div>';
|
||||
$objMod = new $modName($db);
|
||||
$objMod = new $modName($this->db);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
$files[$i] = $file;
|
||||
@@ -222,7 +222,7 @@ class Interfaces
|
||||
else
|
||||
{
|
||||
include_once($dir.'/'.$file);
|
||||
$objMod = new $modName($db);
|
||||
$objMod = new $modName($this->db);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
$files[$i] = $file;
|
||||
@@ -246,7 +246,7 @@ class Interfaces
|
||||
$modName = $modules[$key];
|
||||
if ($modName)
|
||||
{
|
||||
$objMod = new $modName($db);
|
||||
$objMod = new $modName($this->db);
|
||||
// Bypass if workflow module is enabled and if the trigger is compatible
|
||||
if ($workflow && ! empty($objMod->disabled_if_workflow)) continue;
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ CoreErrorTitle=System error
|
||||
CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator.
|
||||
CreditCard=Credit card
|
||||
FieldsWithAreMandatory=Fields with <b>%s</b> are mandatory
|
||||
FieldsWithIsForPublic=Fields with <b>%s</b> are shown on public list of members. If you don't want this, check the "public" box.
|
||||
FieldsWithIsForPublic=Fields with <b>%s</b> are shown on public list of members. If you don't want this, check off the "public" box.
|
||||
AccordingToGeoIPDatabase=(according to GeoIP convertion)
|
||||
Line=Line
|
||||
NotSupported=Not supported
|
||||
|
||||
@@ -22,7 +22,17 @@
|
||||
* \file htdocs/public/members/new.php
|
||||
* \ingroup member
|
||||
* \brief Example of form to add a new member
|
||||
* \version $Id: new.php,v 1.26 2011/06/26 18:53:17 eldy Exp $
|
||||
* \version $Id: new.php,v 1.29 2011/06/26 21:51:34 eldy Exp $
|
||||
*
|
||||
* Note that you can add following constant to change behaviour of page
|
||||
* MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
|
||||
* MEMBER_NEWFORM_EDITAMOUNT Amount can be edited
|
||||
* MEMBER_NEWFORM_PAYONLINE Suggest paypemt with paypal of paybox
|
||||
* MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation)
|
||||
* MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted
|
||||
* MEMBER_NEWFORM_FORCETYPE Force type of member
|
||||
* MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy)
|
||||
* MEMBER_NEWFORM_FORCECOUNTRYCODE Force country
|
||||
*/
|
||||
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
@@ -134,6 +144,16 @@ if ($action == 'add')
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("EMail"))."<br>\n";
|
||||
}
|
||||
}
|
||||
if (GETPOST('type') <= 0)
|
||||
{
|
||||
$error+=1;
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"))."<br>\n";
|
||||
}
|
||||
if (! in_array(GETPOST('morphy'),array('mor','phy')))
|
||||
{
|
||||
$error+=1;
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("MorPhy"))."<br>\n";
|
||||
}
|
||||
if (!isset($_POST["nom"]) || !isset($_POST["prenom"]) || $_POST["prenom"]=='' || $_POST["nom"]=='')
|
||||
{
|
||||
$error+=1;
|
||||
@@ -243,7 +263,7 @@ if ($action == 'added')
|
||||
print $langs->trans("NewMemberbyWeb");
|
||||
print '</center>';
|
||||
|
||||
llxFooterVierge('$Date: 2011/06/26 18:53:17 $ - $Revision: 1.26 $');
|
||||
llxFooterVierge('$Date: 2011/06/26 21:51:34 $ - $Revision: 1.29 $');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -275,19 +295,24 @@ print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#morphy").click(function() {
|
||||
if (jQuery("#morphy").val()==\'phy\') {
|
||||
jQuery("#trcompany").hide();
|
||||
}
|
||||
if (jQuery("#morphy").val()==\'mor\') {
|
||||
jQuery("#trcompany").show();
|
||||
}
|
||||
function initmorphy()
|
||||
{
|
||||
if (jQuery("#morphy").val()==\'phy\') {
|
||||
jQuery("#trcompany").hide();
|
||||
}
|
||||
if (jQuery("#morphy").val()==\'mor\') {
|
||||
jQuery("#trcompany").show();
|
||||
}
|
||||
};
|
||||
initmorphy();
|
||||
jQuery("#morphy").click(function() {
|
||||
initmorphy();
|
||||
});
|
||||
jQuery("#selectpays_id").change(function() {
|
||||
document.newmember.action.value="create";
|
||||
document.newmember.submit();
|
||||
});
|
||||
});
|
||||
jQuery("#selectpays_id").change(function() {
|
||||
document.newmember.action.value="create";
|
||||
document.newmember.submit();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
@@ -339,9 +364,9 @@ print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
||||
print '<textarea name="address" id="address" wrap="soft" cols="40" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address')).'</textarea></td></tr>'."\n";
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>';
|
||||
print $formcompany->select_ziptown(GETPOST('zipcode'),'zipcode',array('town','selectpays_id','departement_id'),6);
|
||||
print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town','selectpays_id','departement_id'), 6, 1);
|
||||
print ' / ';
|
||||
print $formcompany->select_ziptown(GETPOST('town'),'town',array('zipcode','selectpays_id','departement_id'));
|
||||
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode','selectpays_id','departement_id'), 0, 1);
|
||||
print '</td></tr>';
|
||||
// Country
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
||||
@@ -390,7 +415,7 @@ print '<td valign="top"><textarea name="comment" wrap="soft" cols="60" rows="'.R
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Add specific fields used by Dolibarr foundation for example
|
||||
if (empty($conf->global->MEMBER_DOLIBARR))
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
||||
{
|
||||
$arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','400'=>'<= 1 500 000','750'=>'<= 3 000 000','1500'=>'<= 5 000 000','2000'=>'5 000 000+');
|
||||
print '<tr id="trbudget"><td>'.$langs->trans("TurnoverOrBudget").'</td><td>';
|
||||
@@ -404,7 +429,8 @@ if (empty($conf->global->MEMBER_DOLIBARR))
|
||||
initturnover();
|
||||
});
|
||||
jQuery("#budget").change(function() {
|
||||
jQuery("#amount").val(jQuery("#budget").val());
|
||||
if (jQuery("#budget").val() > 0) { jQuery("#amount").val(jQuery("#budget").val()); }
|
||||
else { jQuery("#budget").val(\'\'); }
|
||||
});
|
||||
function initturnover() {
|
||||
if (jQuery("#morphy").val()==\'phy\') {
|
||||
@@ -415,19 +441,40 @@ if (empty($conf->global->MEMBER_DOLIBARR))
|
||||
if (jQuery("#morphy").val()==\'mor\') {
|
||||
jQuery("#trbudget").show();
|
||||
jQuery("#trcompany").show();
|
||||
jQuery("#amount").val(0);
|
||||
if (jQuery("#budget").val() > 0) { jQuery("#amount").val(jQuery("#budget").val()); }
|
||||
else { jQuery("#budget").val(\'\'); }
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("AmountOfSubscriptions").'</td><td>';
|
||||
print '<input type="text" name="amount" id="amount" class="flat" size="6" value="'.GETPOST("amount").'">';
|
||||
print ' € or $';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT)
|
||||
|| ! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
|
||||
{
|
||||
// $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount
|
||||
$amount=0;
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
|
||||
{
|
||||
$amount=GETPOST('amount')?GETPOST('amount'):$conf->global->MEMBER_NEWFORM_AMOUNT;
|
||||
}
|
||||
// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal' or 'paybox'
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Subscription").'</td><td>';
|
||||
print '<input type="text" name="amount" id="amount" class="flat" size="6" value="'.$amount.'">';
|
||||
print ' € or $';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Subscription").'</td><td>';
|
||||
print $amount;
|
||||
print '<input type="hidden" name="amount" id="amount" class="flat" size="6" value="'.$amount.'">';
|
||||
print ' € or $';
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
// Save
|
||||
@@ -443,5 +490,5 @@ print "<br></form>\n";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterVierge('$Date: 2011/06/26 18:53:17 $ - $Revision: 1.26 $');
|
||||
llxFooterVierge('$Date: 2011/06/26 21:51:34 $ - $Revision: 1.29 $');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user