/**
	 *    Constructor de la classe
	 *
	 *    @param   DoliDb  $db     Database handler
	 */

	function __construct($db) {
		$this->db = $db;

		parent::__construct($db);

		$fk_extrafields = new ExtraFields($db);
		$this->fk_extrafields = $fk_extrafields->load("extrafields:" . get_class($this), true); // load and cache

		$this->couchAdmin = new couchAdmin($this->couchdb);

		return 0;
	}
 function __construct($db)
 {
     global $couch;
     parent::__construct($db);
     try {
         $this->global = $couch->getDoc("const");
     } catch (Exception $e) {
         dol_print_error('', "Error : no const document in database" . $e->getMessage());
     }
     $fk_extrafields = new ExtraFields($db);
     $this->fk_extrafields = $fk_extrafields->load("extrafields:DolibarrModules", true);
     // load and cache
 }
Exemple #3
0
	/**
	 *    Constructor
	 *
	 *    @param	Client		$db		Database handler
	 */

	public function __construct($db) {
		parent::__construct($db);

		try {
			$fk_extrafields = new ExtraFields($db);
			$this->fk_extrafields = $fk_extrafields->load("extrafields:" . get_class($this), true); // load and cache
			$this->fk_country = $this->couchdb->getDoc("dict:fk_country"); //load country table
		} catch (Exception $e) {
			$error = "Something weird happened: " . $e->getMessage() . " (errcode=" . $e->getCode() . ")\n";
			print $error;
			exit;
		}

		return 1;
	}
 /**
  * 	Constructor
  *
  * 	@param 		DoliDB		$db		Database handler
  */
 function __construct($db)
 {
     parent::__construct($db);
     try {
         $this->couchdb->useDatabase('adherent');
         $fk_extrafields = new ExtraFields($db);
         $fk_extrafields->useDatabase('adherent');
         $this->fk_extrafields = $fk_extrafields->load("extrafields:" . get_class($this), true);
         // load and cache
     } catch (Exception $e) {
         dol_print_error('', $e->getMessage());
         exit;
     }
     return 1;
 }
print_fiche_titre($langs->trans("CompanySetup"),$linkback,'setup');


$head = societe_admin_prepare_head(null);

dol_fiche_head($head, 'attributes', $langs->trans("ThirdParty"), 0, 'company');


print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>';
print '<br>';

dol_htmloutput_errors($mesg);

// Load attribute_label
try {
$extrafields->load("extrafields:".$elementtype);
}
catch (Exception $e) {
    $error="Something weird happened: ".$e->getMessage()." (errcode=".$e->getCode().")\n";
    dol_syslog("societe::load ".$error, LOG_ERR);
    print $error;
    exit;
}

/* ************************************************************************** */
/*                                                                            */
/* Creation d'un champ optionnel
 /*                                                                            */
/* ************************************************************************** */

if ($action == 'create')
Exemple #6
0
    /**
     *    Constructor de la classe
     *
     *    @param   DoliDb  $db     Database handler
     */

    function __construct($db) {
        $this->db = $db;

        parent::__construct($db);

        $fk_extrafields = new ExtraFields($db);
        try {
            $this->fk_extrafields = $fk_extrafields->load("extrafields:" . get_class($this), true); // load and cache
        } catch (Exception $e) {
            
        }

        $this->couchAdmin = new couchAdmin($this->couchdb);
        $this->useDatabase("_users");


        // Preference utilisateur
        $this->liste_limit = 0;
        $this->clicktodial_loaded = 0;

        $this->all_permissions_are_loaded = 0;
        $this->admin = 0;

        $this->conf = (object) array();
        $this->rights = (object) array();
        $this->rights->user = (object) array();
        $this->rights->user->user = (object) array();
        $this->rights->user->self = (object) array();
    }
Exemple #7
0
 /**
  * 	Constructor
  *
  * 	@param 		DoliDB		$db		Database handler
  */
 function __construct($db)
 {
     parent::__construct($db);
     try {
         $fk_extrafields = new ExtraFields($db);
         $this->fk_extrafields = $fk_extrafields->load("extrafields:" . get_class($this), true);
         // load and cache
     } catch (Exception $e) {
         dol_print_error('', $e->getMessage());
         exit;
     }
     $this->Status = 0;
     // l'adherent n'est pas public par defaut
     $this->public = 0;
     // les champs optionnels sont vides
     $this->array_options = array();
     return 1;
 }