Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
7d51779610
@ -17,27 +17,25 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/asterisk/cidlookup.php
|
* \file htdocs/asterisk/cidlookup.php
|
||||||
* \brief Script to search companies names based on incoming calls
|
* \brief Script to search companies names based on incoming calls, from caller phone number
|
||||||
* \remarks To use this script, your Asterisk must be compiled with CURL,
|
* \remarks To use this script, your Asterisk must be compiled with CURL,
|
||||||
* and your dialplan must be something like this:
|
* and your dialplan must be something like this:
|
||||||
*
|
*
|
||||||
* exten => s,1,Set(CALLERID(name)=${CURL(http://IP-DOLIBARR:80/asterisk/cidlookup.php?phone=${CALLERID(num)})})
|
* exten => s,1,Set(CALLERID(name)=${CURL(http://IP-DOLIBARR:80/asterisk/cidlookup.php?phone=${CALLERID(num)})})
|
||||||
*
|
|
||||||
* Change IP-DOLIBARR to the IP address of your dolibarr
|
|
||||||
* server
|
|
||||||
*
|
*
|
||||||
|
* Change IP-DOLIBARR to the IP address of your dolibarr server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
include '../master.inc.php';
|
include '../master.inc.php';
|
||||||
|
|
||||||
$phone = GETPOST('phone');
|
$phone = GETPOST('phone');
|
||||||
$notfound = "Not found";
|
$notfound = $langs->trans("Unknown");
|
||||||
$error = "Error"
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->clicktodial->enabled)) {
|
if (empty($conf->clicktodial->enabled))
|
||||||
print "Error: Module Click to dial not active\n";
|
{
|
||||||
|
print "Error: Module Click to dial is not enabled.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +71,7 @@ if ($resql)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db,'Error');
|
dol_print_error($db,'Error');
|
||||||
$found = $error;
|
$found = 'Error';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $found;
|
echo $found;
|
||||||
|
|||||||
@ -2826,7 +2826,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
{
|
{
|
||||||
if ($totalnboflines) // If we know total nb of lines
|
if ($totalnboflines) // If we know total nb of lines
|
||||||
{
|
{
|
||||||
$maxnbofpage=10; // nb before and after selected page
|
$maxnbofpage=(empty($conf->dol_optimize_smallscreen)?10:3); // nb before and after selected page
|
||||||
|
|
||||||
$nbpages=ceil($totalnboflines/$conf->liste_limit);
|
$nbpages=ceil($totalnboflines/$conf->liste_limit);
|
||||||
$cpt=($page-$maxnbofpage);
|
$cpt=($page-$maxnbofpage);
|
||||||
@ -2834,31 +2834,31 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
|
|
||||||
if ($cpt>=1)
|
if ($cpt>=1)
|
||||||
{
|
{
|
||||||
$pagelist.= '<li><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
$pagelist.= '<li class="pagination"><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
||||||
if ($cpt >= 2) $pagelist.='<li><span class="inactive">...</span></li>';
|
if ($cpt >= 2) $pagelist.='<li><span class="inactive">...</span></li>';
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ($cpt==$page)
|
if ($cpt==$page)
|
||||||
{
|
{
|
||||||
$pagelist.= '<li><span class="active">'.($page+1).'</span></li>';
|
$pagelist.= '<li class="pagination"><span class="active">'.($page+1).'</span></li>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pagelist.= '<li><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
$pagelist.= '<li class="pagination"><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
||||||
}
|
}
|
||||||
$cpt++;
|
$cpt++;
|
||||||
}
|
}
|
||||||
while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage);
|
while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage);
|
||||||
if ($cpt<$nbpages)
|
if ($cpt<$nbpages)
|
||||||
{
|
{
|
||||||
if ($cpt<$nbpages-1) $pagelist.= '<li><span class="inactive">...</span></li>';
|
if ($cpt<$nbpages-1) $pagelist.= '<li class="pagination"><span class="inactive">...</span></li>';
|
||||||
$pagelist.= '<li><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
$pagelist.= '<li class="pagination"><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pagelist.= '<li><span class="active">'.($page+1)."</li>";
|
$pagelist.= '<li class="pagination"><span class="active">'.($page+1)."</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist,$morehtml);
|
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist,$morehtml);
|
||||||
@ -2876,7 +2876,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
* @param string $options Other url paramaters to propagate ("" by default)
|
* @param string $options Other url paramaters to propagate ("" by default)
|
||||||
* @param integer $nextpage Do we show a next page button
|
* @param integer $nextpage Do we show a next page button
|
||||||
* @param string $betweenarrows HTML content to show between arrows. Must contains '<li> </li>' tags.
|
* @param string $betweenarrows HTML content to show between arrows. Must contains '<li> </li>' tags.
|
||||||
* @param string $afterarraws HTML content to show after arrows. Must NOT contains '<li> </li>' tags.
|
* @param string $afterarrows HTML content to show after arrows. Must NOT contains '<li> </li>' tags.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarrows='',$afterarrows='')
|
function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarrows='',$afterarrows='')
|
||||||
|
|||||||
@ -614,6 +614,8 @@ ALTER TABLE llx_user DROP INDEX idx_user_fk_societe;
|
|||||||
ALTER TABLE llx_user CHANGE COLUMN fk_societe fk_soc INTEGER;
|
ALTER TABLE llx_user CHANGE COLUMN fk_societe fk_soc INTEGER;
|
||||||
ALTER TABLE llx_user ADD INDEX idx_user_fk_societe (fk_soc);
|
ALTER TABLE llx_user ADD INDEX idx_user_fk_societe (fk_soc);
|
||||||
|
|
||||||
|
ALTER TABLE llx_user ADD gender VARCHAR(10);
|
||||||
|
|
||||||
-- API module
|
-- API module
|
||||||
ALTER TABLE llx_user ADD api_key VARCHAR(128) DEFAULT NULL AFTER pass_temp;
|
ALTER TABLE llx_user ADD api_key VARCHAR(128) DEFAULT NULL AFTER pass_temp;
|
||||||
ALTER TABLE llx_user ADD INDEX idx_user_api_key (api_key);
|
ALTER TABLE llx_user ADD INDEX idx_user_api_key (api_key);
|
||||||
|
|||||||
@ -34,7 +34,8 @@ create table llx_user
|
|||||||
pass varchar(32),
|
pass varchar(32),
|
||||||
pass_crypted varchar(128),
|
pass_crypted varchar(128),
|
||||||
pass_temp varchar(32), -- temporary password when asked for forget password
|
pass_temp varchar(32), -- temporary password when asked for forget password
|
||||||
api_key varchar(128),
|
api_key varchar(128), -- key to use REST API by this user
|
||||||
|
gender varchar(10),
|
||||||
civility varchar(6),
|
civility varchar(6),
|
||||||
lastname varchar(50),
|
lastname varchar(50),
|
||||||
firstname varchar(50),
|
firstname varchar(50),
|
||||||
|
|||||||
@ -1863,17 +1863,18 @@ div.pagination li {
|
|||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
div.pagination li.pagination a,
|
||||||
div.pagination li a,
|
div.pagination li.pagination span {
|
||||||
div.pagination li span {
|
|
||||||
/*position: relative;*/
|
|
||||||
/*float: left;*/
|
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
color: #000;
|
color: #000;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: #fff;
|
}
|
||||||
|
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||||
|
div.pagination li a,
|
||||||
|
div.pagination li span {
|
||||||
|
background-color: #fff;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
div.pagination li:first-child a,
|
div.pagination li:first-child a,
|
||||||
@ -1918,7 +1919,8 @@ div.pagination .disabled a:focus {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-color: #ddd;
|
border-color: #ddd;
|
||||||
}
|
}
|
||||||
div.pagination li .active {
|
<?php } ?>
|
||||||
|
div.pagination li.pagination .active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
div.pagination li.paginationafterarrows {
|
div.pagination li.paginationafterarrows {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user