Work on websiteaccounts
This commit is contained in:
parent
ce3e586bd0
commit
fa1fbe7db7
62
dev/setup/apache/virtualhost
Normal file
62
dev/setup/apache/virtualhost
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
#php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
|
||||||
|
#php_admin_value mail.force_extra_parameters "-f postmaster@mydomain.com"
|
||||||
|
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f postmaster@mydomain.com"
|
||||||
|
php_admin_value open_basedir /tmp/:/home/../htdocs
|
||||||
|
|
||||||
|
ServerName myvirtualalias
|
||||||
|
ServerAlias myvirtualalias
|
||||||
|
|
||||||
|
UseCanonicalName On
|
||||||
|
|
||||||
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
|
DocumentRoot "/home/.../htdocs"
|
||||||
|
|
||||||
|
<Directory /home/.../htdocs/>
|
||||||
|
AllowOverride None
|
||||||
|
Options -Indexes -MultiViews +FollowSymLinks -ExecCGI
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory "/home/../htdocs/cache">
|
||||||
|
Deny from all
|
||||||
|
RemoveHandler .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
|
||||||
|
AddType application/x-httpd-php-source .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/myvirtualalias_error_log
|
||||||
|
TransferLog /var/log/apache2/myvirtualalias_access_log
|
||||||
|
|
||||||
|
# Compress returned resources of type php pages, text file export, css and javascript
|
||||||
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
|
||||||
|
|
||||||
|
AddType text/javascript .jgz
|
||||||
|
AddEncoding gzip .jgz
|
||||||
|
ExpiresActive On
|
||||||
|
ExpiresByType image/x-icon A2592000
|
||||||
|
ExpiresByType image/gif A2592000
|
||||||
|
ExpiresByType image/png A2592000
|
||||||
|
ExpiresByType image/jpeg A2592000
|
||||||
|
ExpiresByType text/css A2592000
|
||||||
|
ExpiresByType text/javascript A2592000
|
||||||
|
ExpiresByType application/x-javascript A2592000
|
||||||
|
ExpiresByType application/javascript A2592000
|
||||||
|
|
||||||
|
SSLEngine On
|
||||||
|
|
||||||
|
# A self-signed (snakeoil) certificate can be created by installing
|
||||||
|
# the ssl-cert package. See
|
||||||
|
# /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
|
||||||
|
# If both key and certificate are stored in the same file, only the
|
||||||
|
# SSLCertificateFile directive is needed.
|
||||||
|
SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem
|
||||||
|
SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem
|
||||||
|
SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem
|
||||||
|
|
||||||
|
#RewriteEngine on
|
||||||
|
#RewriteCond %{SERVER_PORT} ^80$
|
||||||
|
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
@ -389,7 +389,7 @@ function societe_admin_prepare_head()
|
|||||||
* Return country label, code or id from an id, code or label
|
* Return country label, code or id from an id, code or label
|
||||||
*
|
*
|
||||||
* @param int $searchkey Id or code of country to search
|
* @param int $searchkey Id or code of country to search
|
||||||
* @param int $withcode '0'=Return label,
|
* @param string $withcode '0'=Return label,
|
||||||
* '1'=Return code + label,
|
* '1'=Return code + label,
|
||||||
* '2'=Return code from id,
|
* '2'=Return code from id,
|
||||||
* '3'=Return id from code,
|
* '3'=Return id from code,
|
||||||
@ -400,7 +400,7 @@ function societe_admin_prepare_head()
|
|||||||
* @param int $searchlabel Label of country to search (warning: searching on label is not reliable)
|
* @param int $searchlabel Label of country to search (warning: searching on label is not reliable)
|
||||||
* @return mixed String with country code or translated country name or Array('id','code','label')
|
* @return mixed String with country code or translated country name or Array('id','code','label')
|
||||||
*/
|
*/
|
||||||
function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv=1,$searchlabel='')
|
function getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='')
|
||||||
{
|
{
|
||||||
global $db,$langs;
|
global $db,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -176,17 +176,18 @@ ALTER TABLE llx_menu MODIFY fk_leftmenu varchar(100);
|
|||||||
CREATE TABLE llx_websiteaccount(
|
CREATE TABLE llx_websiteaccount(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
login varchar(64) NOT NULL,
|
login varchar(64) NOT NULL,
|
||||||
|
pass_encoding varchar(24) NOT NULL,
|
||||||
pass_crypted varchar(128),
|
pass_crypted varchar(128),
|
||||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||||
fk_soc integer,
|
fk_soc integer,
|
||||||
fk_website integer,
|
fk_website integer NOT NULL,
|
||||||
date_last_login datetime,
|
date_last_login datetime,
|
||||||
date_previous_login datetime,
|
date_previous_login datetime,
|
||||||
date_creation datetime NOT NULL,
|
date_creation datetime NOT NULL,
|
||||||
tms timestamp NOT NULL,
|
tms timestamp NOT NULL,
|
||||||
fk_user_creat integer NOT NULL,
|
fk_user_creat integer NOT NULL,
|
||||||
fk_user_modif integer,
|
fk_user_modif integer,
|
||||||
import_key varchar(14),
|
import_key varchar(14),
|
||||||
status integer
|
status integer
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|
||||||
@ -197,6 +198,10 @@ ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_import_key (import_k
|
|||||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_status (status);
|
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_status (status);
|
||||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_fk_soc (fk_soc);
|
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_fk_soc (fk_soc);
|
||||||
|
|
||||||
|
ALTER TABLE llx_websiteaccount ADD UNIQUE INDEX uk_websiteaccount_login_website_soc(login, fk_website, fk_soc);
|
||||||
|
|
||||||
|
ALTER TABLE llx_websiteaccount ADD CONSTRAINT llx_websiteaccount_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||||
|
|
||||||
create table llx_websiteaccount_extrafields
|
create table llx_websiteaccount_extrafields
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
@ -206,7 +211,7 @@ create table llx_websiteaccount_extrafields
|
|||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
alter table llx_user add column pass_encoding varchar(24) NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ create table llx_user
|
|||||||
fk_user_creat integer,
|
fk_user_creat integer,
|
||||||
fk_user_modif integer,
|
fk_user_modif integer,
|
||||||
login varchar(50) NOT NULL,
|
login varchar(50) NOT NULL,
|
||||||
|
pass_encoding varchar(24);
|
||||||
pass varchar(128),
|
pass varchar(128),
|
||||||
pass_crypted varchar(128),
|
pass_crypted varchar(128),
|
||||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||||
|
|||||||
@ -24,5 +24,5 @@ ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_fk_soc (fk_soc);
|
|||||||
|
|
||||||
ALTER TABLE llx_websiteaccount ADD UNIQUE INDEX uk_websiteaccount_login_website_soc(login, fk_website, fk_soc);
|
ALTER TABLE llx_websiteaccount ADD UNIQUE INDEX uk_websiteaccount_login_website_soc(login, fk_website, fk_soc);
|
||||||
|
|
||||||
--ALTER TABLE llx_websiteaccount ADD CONSTRAINT llx_websiteaccount_field_id FOREIGN KEY (fk_field) REFERENCES llx_myotherobject(rowid);
|
ALTER TABLE llx_websiteaccount ADD CONSTRAINT llx_websiteaccount_fk_website FOREIGN KEY (fk_website) REFERENCES llx_website(rowid);
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,13 @@ CREATE TABLE llx_websiteaccount(
|
|||||||
-- BEGIN MODULEBUILDER FIELDS
|
-- BEGIN MODULEBUILDER FIELDS
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
login varchar(64) NOT NULL,
|
login varchar(64) NOT NULL,
|
||||||
|
pass_encoding varchar(24) NOT NULL,
|
||||||
pass_crypted varchar(128),
|
pass_crypted varchar(128),
|
||||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||||
fk_soc integer,
|
fk_soc integer,
|
||||||
fk_website integer,
|
fk_website integer NOT NULL,
|
||||||
date_last_login datetime,
|
note_private text,
|
||||||
|
date_last_login datetime,
|
||||||
date_previous_login datetime,
|
date_previous_login datetime,
|
||||||
date_creation datetime NOT NULL,
|
date_creation datetime NOT NULL,
|
||||||
tms timestamp NOT NULL,
|
tms timestamp NOT NULL,
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class WebsiteAccount extends CommonObject
|
|||||||
'date_last_login' => array('type'=>'datetime', 'label'=>'LastConnexion', 'visible'=>2, 'enabled'=>1, 'position'=>50, 'notnull'=>0,),
|
'date_last_login' => array('type'=>'datetime', 'label'=>'LastConnexion', 'visible'=>2, 'enabled'=>1, 'position'=>50, 'notnull'=>0,),
|
||||||
'date_previous_login' => array('type'=>'datetime', 'label'=>'PreviousConnexion', 'visible'=>2, 'enabled'=>1, 'position'=>51, 'notnull'=>0,),
|
'date_previous_login' => array('type'=>'datetime', 'label'=>'PreviousConnexion', 'visible'=>2, 'enabled'=>1, 'position'=>51, 'notnull'=>0,),
|
||||||
//'note_public' => array('type'=>'text', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>45, 'notnull'=>-1,),
|
//'note_public' => array('type'=>'text', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>45, 'notnull'=>-1,),
|
||||||
//'note_private' => array('type'=>'text', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>46, 'notnull'=>-1,),
|
'note_private' => array('type'=>'text', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>46, 'notnull'=>-1,),
|
||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
||||||
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-2, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
|
||||||
@ -97,6 +97,7 @@ class WebsiteAccount extends CommonObject
|
|||||||
public $pass_crypted;
|
public $pass_crypted;
|
||||||
public $date_last_login;
|
public $date_last_login;
|
||||||
public $date_previous_login;
|
public $date_previous_login;
|
||||||
|
public $note_private;
|
||||||
public $date_creation;
|
public $date_creation;
|
||||||
public $tms;
|
public $tms;
|
||||||
public $fk_user_creat;
|
public $fk_user_creat;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user