Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop
This commit is contained in:
commit
82f9344010
@ -101,7 +101,7 @@ else
|
||||
|
||||
$head = member_stats_prepare_head($adh);
|
||||
|
||||
dol_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), 0, 'user');
|
||||
dol_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), -1, 'user');
|
||||
|
||||
|
||||
// Print title
|
||||
|
||||
@ -198,7 +198,7 @@ if ($mode)
|
||||
|
||||
$head = member_stats_prepare_head($adh);
|
||||
|
||||
dol_fiche_head($head, $tab, $langs->trans("Statistics"), 0, 'user');
|
||||
dol_fiche_head($head, $tab, $langs->trans("Statistics"), -1, 'user');
|
||||
|
||||
|
||||
// Print title
|
||||
|
||||
@ -174,8 +174,8 @@ $message.='<br>';
|
||||
print $message;
|
||||
|
||||
$message=$langs->trans("AgendaUrlOptions1",$user->login,$user->login).'<br>';
|
||||
//$message.=$langs->trans("AgendaUrlOptions2",$user->login,$user->login).'<br>';
|
||||
$message.=$langs->trans("AgendaUrlOptions3",$user->login,$user->login).'<br>';
|
||||
$message.=$langs->trans("AgendaUrlOptionsNotAdmin",$user->login,$user->login).'<br>';
|
||||
$message.=$langs->trans("AgendaUrlOptions4",$user->login,$user->login).'<br>';
|
||||
$message.=$langs->trans("AgendaUrlOptionsProject",$user->login,$user->login);
|
||||
|
||||
|
||||
@ -25,8 +25,10 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/websites/class/website.class.php';
|
||||
|
||||
$langs->load("errors");
|
||||
$langs->load("admin");
|
||||
@ -35,7 +37,6 @@ $langs->load("website");
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
|
||||
$id=1;
|
||||
@ -135,7 +136,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd'))
|
||||
{
|
||||
@ -185,7 +186,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||
unset($_POST); // Clean $_POST array, we keep only
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -204,6 +205,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
|
||||
$website=new Website($db);
|
||||
$rowid=GETPOST('rowid','int');
|
||||
$website->fetch($rowid);
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$tabname[$id]." SET ";
|
||||
// Modifie valeur des champs
|
||||
@ -229,7 +234,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
dol_syslog("actionmodify", LOG_DEBUG);
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql)
|
||||
if ($resql)
|
||||
{
|
||||
$newname = dol_sanitizeFileName(GETPOST('ref','aZ09'));
|
||||
if ($newname != $website->ref)
|
||||
{
|
||||
$srcfile=DOL_DATA_ROOT.'/websites/'.$website->ref;
|
||||
$destfile=DOL_DATA_ROOT.'/websites/'.$newname;
|
||||
@rename($srcfile, $destfile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($db->error(), null, 'errors');
|
||||
}
|
||||
@ -249,7 +264,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||
|
||||
$sql = "DELETE from ".MAIN_DB_PREFIX."website_pages WHERE fk_website ='".$rowid."'";
|
||||
$result = $db->query($sql);
|
||||
|
||||
|
||||
$sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid ='".$rowid."'";
|
||||
$result = $db->query($sql);
|
||||
if (! $result)
|
||||
@ -321,7 +336,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
@ -355,7 +370,7 @@ if ($id)
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -388,9 +403,7 @@ if ($id)
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||
}
|
||||
|
||||
if ($id == 4) print '<td></td>';
|
||||
print '<td colspan="4">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -444,19 +457,19 @@ if ($id)
|
||||
if ($num)
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
{
|
||||
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
|
||||
print_fleche_navigation($page, $_SERVER["PHP_SELF"], '&id='.$id, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
|
||||
print_fleche_navigation($page, $_SERVER["PHP_SELF"], '', ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -486,11 +499,11 @@ if ($id)
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow,0,$_SERVER["PHP_SELF"],($sortable?$fieldlist[$field]:''),($page?'page='.$page.'&':'').'&id='.$id,"","align=".$align,$sortfield,$sortorder);
|
||||
print getTitleFieldOfList($valuetoshow,0,$_SERVER["PHP_SELF"],($sortable?$fieldlist[$field]:''),($page?'page='.$page.'&':''),"","align=".$align,$sortfield,$sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
print getTitleFieldOfList($langs->trans("Status"),0,$_SERVER["PHP_SELF"],"status",($page?'page='.$page.'&':'').'&id='.$id,"",'align="center"',$sortfield,$sortorder);
|
||||
print getTitleFieldOfList($langs->trans("Status"),0,$_SERVER["PHP_SELF"],"status",($page?'page='.$page.'&':''),"",'align="center"',$sortfield,$sortorder);
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print '</tr>';
|
||||
@ -539,7 +552,7 @@ if ($id)
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable=1;$isdisable=1; // true by default
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'').'&id='.$id.'&';
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'').'&';
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
@ -558,9 +571,9 @@ if ($id)
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ $action=GETPOST('action','aZ09');
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (preg_match('/set_(.*)/',$action,$reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
@ -82,7 +83,7 @@ print load_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup')
|
||||
|
||||
$head=categoriesadmin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'setup', $langs->trans("Categories"), 0, 'category');
|
||||
dol_fiche_head($head, 'setup', $langs->trans("Categories"), -1, 'category');
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -68,7 +68,7 @@ print load_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup')
|
||||
|
||||
$head = categoriesadmin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
|
||||
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), -1, 'category');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -447,9 +447,10 @@ class Categorie extends CommonObject
|
||||
* Delete a category from database
|
||||
*
|
||||
* @param User $user Object user that ask to delete
|
||||
* @return int <0 KO >0 OK
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 KO >0 OK
|
||||
*/
|
||||
function delete($user)
|
||||
function delete($user, $notrigger=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -462,6 +463,14 @@ class Categorie extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CATEGORY_DELETE',$user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
/* FIX #1317 : Check for child category and move up 1 level*/
|
||||
if (! $error)
|
||||
{
|
||||
@ -580,25 +589,16 @@ class Categorie extends CommonObject
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$result=$this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
// Removed extrafields
|
||||
if (! $error)
|
||||
{
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$result=$this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
dol_syslog(get_class($this)."::delete erreur ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CATEGORY_DELETE',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
$error++;
|
||||
dol_syslog(get_class($this)."::delete erreur ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0,
|
||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||
|
||||
print '<body id="mainbody">';
|
||||
|
||||
|
||||
// top menu and left menu area
|
||||
if (empty($conf->dol_hide_topmenu))
|
||||
{
|
||||
@ -108,7 +108,7 @@ if (empty($action)) $action='preview';
|
||||
*/
|
||||
|
||||
if (GETPOST('refreshsite')) $pageid=0; // If we change the site, we reset the pageid.
|
||||
if (GETPOST('refreshpage')) $action='preview';
|
||||
if (GETPOST('refreshpage')) $action='preview';
|
||||
|
||||
|
||||
// Add a collab page
|
||||
@ -146,7 +146,7 @@ if ($action == 'add')
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
|
||||
$action = 'preview';
|
||||
$id = $objectpage->id;
|
||||
}
|
||||
@ -173,7 +173,7 @@ if ($action == 'delete')
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("PageDeleted", $objectpage->pageurl, $website), null, 'mesgs');
|
||||
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"].'?website='.$website);
|
||||
exit;
|
||||
}
|
||||
@ -218,7 +218,7 @@ print '<div class="centpercent websitebar">';
|
||||
if (count($object->records) > 0)
|
||||
{
|
||||
// ***** Part for web sites
|
||||
|
||||
|
||||
print '<div class="websiteselection hideonsmartphoneimp">';
|
||||
print $langs->trans("Website").': ';
|
||||
print '</div>';
|
||||
@ -252,20 +252,20 @@ if (count($object->records) > 0)
|
||||
$dataroot=DOL_DATA_ROOT.'/websites/'.$website;
|
||||
if (! empty($object->virtualhost)) $virtualurl=$object->virtualhost;
|
||||
}
|
||||
|
||||
|
||||
if ($website && $action == 'preview')
|
||||
{
|
||||
$disabled='';
|
||||
if (empty($user->rights->websites->write)) $disabled=' disabled="disabled"';
|
||||
|
||||
|
||||
print ' ';
|
||||
|
||||
|
||||
//print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="editmedia">';
|
||||
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">';
|
||||
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">';
|
||||
print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("AddPage")).'" name="create">';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Button for websites
|
||||
@ -279,7 +279,7 @@ if (count($object->records) > 0)
|
||||
$htmltext=$langs->trans("SetHereVirtualHost", $dataroot);
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
print '</div>';
|
||||
|
||||
|
||||
$urlext=$virtualurl;
|
||||
$urlint=$urlwithroot.'/public/websites/index.php?website='.$website;
|
||||
//if (! empty($object->virtualhost))
|
||||
@ -288,7 +288,7 @@ if (count($object->records) > 0)
|
||||
print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:$langs->trans("VirtualHostUrlNotDefined")), 1, 'preview_ext');
|
||||
print '</a>';
|
||||
//}
|
||||
|
||||
|
||||
print '<a class="websitebuttonsitepreview" id="previewsite" href="'.$urlwithroot.'/public/websites/index.php?website='.$website.'" target="tab'.$website.'" alt="'.dol_escape_htmltag($langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $urlint)).'">';
|
||||
print $form->textwithpicto('', $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $urlint, $dataroot), 1, 'preview');
|
||||
print '</a>';
|
||||
@ -300,12 +300,12 @@ if (count($object->records) > 0)
|
||||
if (preg_match('/^create/',$action)) print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
if (preg_match('/^edit/',$action)) print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
// ***** Part for pages
|
||||
|
||||
|
||||
if ($website)
|
||||
{
|
||||
print '</div>';
|
||||
@ -313,13 +313,13 @@ if (count($object->records) > 0)
|
||||
$array=$objectpage->fetchAll($object->id);
|
||||
if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
|
||||
$atleastonepage=(is_array($array) && count($array) > 0);
|
||||
|
||||
|
||||
print '<div class="centpercent websitebar"'.($style?' style="'.$style.'"':'').'">';
|
||||
print '<div class="websiteselection hideonsmartphoneimp">';
|
||||
print $langs->trans("Page").': ';
|
||||
print '</div>';
|
||||
print '<div class="websiteselection">';
|
||||
|
||||
|
||||
if ($action != 'add')
|
||||
{
|
||||
$out='';
|
||||
@ -336,7 +336,7 @@ if (count($object->records) > 0)
|
||||
}
|
||||
$pageid=$homepageid?$homepageid:$firstpageid; // We choose home page and if not defined yet, we take first page
|
||||
}
|
||||
|
||||
|
||||
foreach($array as $key => $valpage)
|
||||
{
|
||||
$out.='<option value="'.$key.'"';
|
||||
@ -359,16 +359,16 @@ if (count($object->records) > 0)
|
||||
|
||||
print '<input type="submit" class="button" name="refreshpage" value="'.$langs->trans("Load").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
||||
//print $form->selectarray('page', $array);
|
||||
|
||||
|
||||
if ($action == 'preview')
|
||||
{
|
||||
$disabled='';
|
||||
if (empty($user->rights->websites->write)) $disabled=' disabled="disabled"';
|
||||
|
||||
|
||||
if ($pageid > 0)
|
||||
{
|
||||
print ' ';
|
||||
|
||||
|
||||
if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) print '<input type="submit" class="button" disabled="disabled" value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">';
|
||||
else print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">';
|
||||
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditPageMeta")).'" name="editmeta">';
|
||||
@ -378,7 +378,7 @@ if (count($object->records) > 0)
|
||||
print '<input type="submit" class="buttonDelete" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage?'':' disabled="disabled"').'>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
print '<div class="websiteselection">';
|
||||
print '</div>';
|
||||
@ -389,17 +389,17 @@ if (count($object->records) > 0)
|
||||
{
|
||||
$websitepage = new WebSitePage($db);
|
||||
$websitepage->fetch($pageid);
|
||||
|
||||
|
||||
$realpage=$urlwithroot.'/public/websites/index.php?website='.$website.'&page='.$pageid;
|
||||
$pagealias = $websitepage->pageurl;
|
||||
|
||||
|
||||
print '<div class="websiteinputurl">';
|
||||
print '<input type="text" id="previewpageurl" class="minwidth200imp" name="previewsite" value="'.$pagealias.'" disabled="disabled">';
|
||||
//print '<input type="submit" class="button" name="previewwebsite" target="tab'.$website.'" value="'.$langs->trans("ViewSiteInNewTab").'">';
|
||||
$htmltext=$langs->trans("WEBSITE_PAGENAME", $pagealias);
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
print '</div>';
|
||||
|
||||
|
||||
if (! empty($object->virtualhost))
|
||||
{
|
||||
$urlext=$virtualurl.'/'.$pagealias.'.php';
|
||||
@ -413,12 +413,12 @@ if (count($object->records) > 0)
|
||||
print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $dataroot, $urlext?$urlext:$langs->trans("VirtualHostUrlNotDefined")), 1, 'preview_ext');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
|
||||
print '<a class="websitebuttonsitepreview" id="previewpage" href="'.$realpage.'&nocache='.dol_now().'" class="button" target="tab'.$website.'" alt="'.dol_escape_htmltag($langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage)).'">';
|
||||
print $form->textwithpicto('', $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot), 1, 'preview');
|
||||
print $form->textwithpicto('', $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot), 1, 'preview');
|
||||
print '</a>'; // View page in new Tab
|
||||
//print '<input type="submit" class="button" name="previewpage" target="tab'.$website.'"value="'.$langs->trans("ViewPageInNewTab").'">';
|
||||
|
||||
|
||||
// TODO Add js to save alias like we save virtual host name and use dynamic virtual host for url of id=previewpageext
|
||||
}
|
||||
if (! in_array($action, array('editcss','editmenu','create')))
|
||||
@ -427,7 +427,7 @@ if (count($object->records) > 0)
|
||||
if (preg_match('/^create/',$action)) print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
if (preg_match('/^edit/',$action)) print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($action == 'preview')
|
||||
@ -454,7 +454,7 @@ if (count($object->records) > 0)
|
||||
},
|
||||
context: document.body
|
||||
});
|
||||
|
||||
|
||||
jQuery("#previewsiteext").attr("href",newurl);
|
||||
jQuery("#previewpageext").attr("href",newpage);
|
||||
});
|
||||
@ -483,15 +483,15 @@ if ($action == 'editcontent')
|
||||
/*
|
||||
* Editing global variables not related to a specific theme
|
||||
*/
|
||||
|
||||
|
||||
$csscontent = @file_get_contents($filecss);
|
||||
|
||||
|
||||
$contentforedit = '';
|
||||
/*$contentforedit.='<style scoped>'."\n"; // "scoped" means "apply to parent element only". Not yet supported by browsers
|
||||
$contentforedit.=$csscontent;
|
||||
$contentforedit.='</style>'."\n";*/
|
||||
$contentforedit .= $objectpage->content;
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('PAGE_CONTENT',$contentforedit,'',500,'Full','',true,true,true,ROWS_5,'90%');
|
||||
$doleditor->Create(0, '', false);
|
||||
|
||||
@ -38,7 +38,7 @@ class ActionComm extends CommonObject
|
||||
public $table_rowid = 'id';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='action';
|
||||
|
||||
|
||||
/**
|
||||
* Id of the event
|
||||
* @var int
|
||||
@ -168,7 +168,7 @@ class ActionComm extends CommonObject
|
||||
var $email_subject;
|
||||
var $errors_to;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -444,7 +444,7 @@ class ActionComm extends CommonObject
|
||||
$u->fetch($fuser);
|
||||
$fuser = $u;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$fuser = $user;
|
||||
}
|
||||
@ -657,11 +657,11 @@ class ActionComm extends CommonObject
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
if (! $error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
||||
$sql.= " WHERE fk_actioncomm=".$this->id;
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res=$this->db->query($sql);
|
||||
if ($res < 0) {
|
||||
@ -669,7 +669,7 @@ class ActionComm extends CommonObject
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error) {
|
||||
$result=$this->deleteExtraFields();
|
||||
@ -1091,7 +1091,7 @@ class ActionComm extends CommonObject
|
||||
else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
|
||||
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||
}
|
||||
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -1112,20 +1112,20 @@ class ActionComm extends CommonObject
|
||||
global $conf, $langs, $user, $hookmanager;
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||
|
||||
|
||||
$label = $this->label;
|
||||
if (empty($label)) $label=$this->libelle; // For backward compatibility
|
||||
|
||||
$result='';
|
||||
|
||||
|
||||
// Set label of typ
|
||||
$labeltype = ($langs->transnoentities("Action".$this->type_code) != "Action".$this->type_code)?$langs->transnoentities("Action".$this->type_code):$this->type_label;
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>';
|
||||
if (! empty($this->ref))
|
||||
$tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
@ -1137,7 +1137,7 @@ class ActionComm extends CommonObject
|
||||
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
|
||||
|
||||
$linkclose='';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||
|
||||
if (empty($notooltip))
|
||||
@ -1149,7 +1149,7 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
$linkclose.=' title="'.dol_escape_htmltag($tooltip, 1).'"';
|
||||
$linkclose.=' class="'.$classname.' classfortooltip"';
|
||||
|
||||
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
@ -1161,17 +1161,17 @@ class ActionComm extends CommonObject
|
||||
$linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose);
|
||||
}
|
||||
else $linkclose.=' class="'.$classname.'"';
|
||||
|
||||
|
||||
$url='';
|
||||
if ($option=='birthday')
|
||||
if ($option=='birthday')
|
||||
$url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id;
|
||||
else
|
||||
else
|
||||
$url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
|
||||
|
||||
|
||||
$linkstart = '<a href="'.$url.'"';
|
||||
$linkstart.=$linkclose.'>';
|
||||
$linkend='</a>';
|
||||
|
||||
|
||||
//print 'rrr'.$this->libelle.'-'.$withpicto;
|
||||
|
||||
if ($withpicto == 2)
|
||||
@ -1279,7 +1279,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||
// We must filter on assignement table
|
||||
if ($filters['logint'] || $filters['login']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
|
||||
if ($filters['logint']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
|
||||
$sql.= " WHERE a.fk_action=c.id";
|
||||
$sql.= " AND a.entity IN (".getEntity('agenda').")";
|
||||
foreach ($filters as $key => $value)
|
||||
@ -1291,20 +1291,34 @@ class ActionComm extends CommonObject
|
||||
if ($key == 'idto') $sql.=" AND a.id <= ".(is_numeric($value)?$value:0);
|
||||
if ($key == 'project') $sql.=" AND a.fk_project=".(is_numeric($value)?$value:0);
|
||||
// We must filter on assignement table
|
||||
if ($key == 'logint' || $key == 'login') $sql.= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'";
|
||||
if ($key == 'logint') $sql.= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'";
|
||||
if ($key == 'logina')
|
||||
{
|
||||
$logina=$value;
|
||||
$condition='=';
|
||||
if (preg_match('/^!/',$logina))
|
||||
{
|
||||
$logina=preg_replace('/^!/','',$logina);
|
||||
$condition='<>';
|
||||
}
|
||||
$userforfilter=new User($this->db);
|
||||
$result=$userforfilter->fetch('',$value);
|
||||
$sql.= " AND a.fk_user_author = ".$userforfilter->id;
|
||||
$result=$userforfilter->fetch('',$logina);
|
||||
if ($result > 0) $sql.= " AND a.fk_user_author ".$condition." ".$userforfilter->id;
|
||||
elseif ($result < 0 || $condition == '=') $sql.= " AND a.fk_user_author = 0";
|
||||
}
|
||||
if ($key == 'logint' || $key == 'login')
|
||||
if ($key == 'logint')
|
||||
{
|
||||
$logint=$value;
|
||||
$condition='=';
|
||||
if (preg_match('/^!/',$logint))
|
||||
{
|
||||
$logint=preg_replace('/^!/','',$logint);
|
||||
$condition='<>';
|
||||
}
|
||||
$userforfilter=new User($this->db);
|
||||
$result=$userforfilter->fetch('',$value);
|
||||
$sql.= " AND ar.fk_element = ".$userforfilter->id;
|
||||
$result=$userforfilter->fetch('',$logint);
|
||||
if ($result > 0) $sql.= " AND ar.fk_element = ".$userforfilter->id;
|
||||
elseif ($result < 0 || $condition == '=') $sql.= " AND ar.fk_element = 0";
|
||||
}
|
||||
}
|
||||
$sql.= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import
|
||||
|
||||
@ -735,13 +735,13 @@ class DoliDBMysqli extends DoliDB
|
||||
{
|
||||
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
|
||||
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
|
||||
$sql= "ALTER TABLE ".$table." ADD `".$field_name."` ";
|
||||
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
|
||||
$sql.= $field_desc['type'];
|
||||
if(preg_match("/^[^\s]/i",$field_desc['value']))
|
||||
if (! in_array($field_desc['type'],array('date','datetime')))
|
||||
{
|
||||
$sql.= "(".$field_desc['value'].")";
|
||||
}
|
||||
if (! in_array($field_desc['type'],array('date','datetime')))
|
||||
{
|
||||
$sql.= "(".$field_desc['value'].")";
|
||||
}
|
||||
if(preg_match("/^[^\s]/i",$field_desc['attribute']))
|
||||
$sql.= " ".$field_desc['attribute'];
|
||||
if(preg_match("/^[^\s]/i",$field_desc['null']))
|
||||
|
||||
@ -1048,8 +1048,11 @@ class DoliDBPgsql extends DoliDB
|
||||
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
|
||||
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
|
||||
$sql .= $field_desc['type'];
|
||||
if ($field_desc['type'] != 'int' && preg_match("/^[^\s]/i",$field_desc['value']))
|
||||
$sql .= "(".$field_desc['value'].")";
|
||||
if(preg_match("/^[^\s]/i",$field_desc['value']))
|
||||
if (! in_array($field_desc['type'],array('int','date','datetime')))
|
||||
{
|
||||
$sql.= "(".$field_desc['value'].")";
|
||||
}
|
||||
if (preg_match("/^[^\s]/i",$field_desc['attribute']))
|
||||
$sql .= " ".$field_desc['attribute'];
|
||||
if (preg_match("/^[^\s]/i",$field_desc['null']))
|
||||
|
||||
@ -865,7 +865,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
// Make a change into HTML code to allow to include images from medias directory.
|
||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// become
|
||||
// <img alt="" src="'.DOL_DATA_ROOT.'/media/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// <img alt="" src="'.DOL_DATA_ROOT.'/medias/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
$newfreetext=preg_replace('/(<img.*src=")[^\"]*viewimage\.php[^\"]*modulepart=medias[^\"]*file=([^\"]*)("[^\/]*\/>)/', '\1'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext);
|
||||
|
||||
$line.=$outputlangs->convToOutputCharset($newfreetext);
|
||||
|
||||
@ -31,21 +31,36 @@
|
||||
function dolWebsiteOutput($content)
|
||||
{
|
||||
global $db, $langs, $conf, $user;
|
||||
global $dolibarr_main_url_root;
|
||||
|
||||
dol_syslog("dolWebsiteOutput start");
|
||||
|
||||
|
||||
if (! defined('USEDOLIBARRSERVER'))
|
||||
{
|
||||
// Replace link of Dolibarr medias with direct link for virtual server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
|
||||
$symlinktomediaexists=1;
|
||||
|
||||
// Make a change into HTML code to allow to include images from medias directory correct with direct link for virtual server
|
||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// become
|
||||
// <img alt="" src="'.$urlwithroot.'/medias/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
$nbrep=0;
|
||||
if (! $symlinktomediaexists)
|
||||
{
|
||||
$content=preg_replace('/(<img.*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^\/]*\/>)/', '\1'.$urlwithroot.'/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content=preg_replace('/(<img.*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^\/]*\/>)/', '\1medias/\4\5', $content, -1, $nbrep);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dol_syslog("dolWebsiteOutput end");
|
||||
|
||||
|
||||
print $content;
|
||||
}
|
||||
|
||||
|
||||
@ -42,15 +42,15 @@ class modWebsites extends DolibarrModules
|
||||
|
||||
$this->db = $db;
|
||||
$this->numero = 10000;
|
||||
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
|
||||
// It is used to group modules in module setup page
|
||||
$this->family = "portal";
|
||||
$this->module_position = 50;
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable the public website with CMS features";
|
||||
$this->version = 'development'; // 'experimental' or 'dolibarr' or version
|
||||
$this->description = "Enable to build and serve public websites with CMS features";
|
||||
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
|
||||
@ -80,9 +80,9 @@ AgendaModelModule=Document templates for event
|
||||
DateActionStart=Start date
|
||||
DateActionEnd=End date
|
||||
AgendaUrlOptions1=You can also add following parameters to filter output:
|
||||
AgendaUrlOptions2=<b>login=%s</b> to restrict output to actions created by or assigned to user <b>%s</b>.
|
||||
AgendaUrlOptions3=<b>logina=%s</b> to restrict output to actions owned by a user <b>%s</b>.
|
||||
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b>.
|
||||
AgendaUrlOptionsNotAdmin=<b>logina=!%s</b> to restrict output to actions not owned by user <b>%s</b>.
|
||||
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b> (owner and others).
|
||||
AgendaUrlOptionsProject=<b>project=PROJECT_ID</b> to restrict output to actions associated to project <b>PROJECT_ID</b>.
|
||||
AgendaShowBirthdayEvents=Show birthdays of contacts
|
||||
AgendaHideBirthdayEvents=Hide birthdays of contacts
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Dolibarr language file - Source file is en_US - loan
|
||||
ModuleBuilderDesc=This tools give you utilites to build or edit your own module (<a href="%s" target="_blank">More information here</a>).
|
||||
ModuleBuilderDesc=This tools must be used by experienced users or developers. It gives you utilities to build or edit your own module (Documentation for alternative <a href="%s" target="_blank">manual development is here</a>).
|
||||
EnterNameOfModuleDesc=Enter name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...)
|
||||
EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...)
|
||||
ModuleBuilderDesc2=Path were modules are generated/edited (first alternative directory defined into %s): <strong>%s</strong>
|
||||
ModuleBuilderDesc2=Path where modules are generated/edited (first alternative directory defined into %s): <strong>%s</strong>
|
||||
ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> (they are detected as editable when the file <strong>%s</strong> exists in root of module directory).
|
||||
NewModule=New module
|
||||
NewObject=New object
|
||||
@ -11,17 +11,19 @@ ObjectKey=Object key
|
||||
ModuleInitialized=Module initialized
|
||||
FilesForObjectInitialized=Files for new object initialized
|
||||
ModuleBuilderDescdescription=Enter here all general information that describe your module
|
||||
ModuleBuilderDescspecifications=You can enter here a long text to describe the specifications of your module that is not already structured into other tabs. So you have on hand the rules to develop. Also this text content will be included into the generated documentation (see last tab).
|
||||
ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A sql file, a page to list them, to create/edit/view a card and an API will be generated.
|
||||
ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module.
|
||||
ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module.
|
||||
ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file with your IDE.
|
||||
ModuleBuilderDeschooks=This tab is dedicated to hooks.
|
||||
ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets.
|
||||
ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module. Just click on button to build the module package file.
|
||||
EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All files of module will be definitly lost !
|
||||
ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module and a "ready to distribute" documentation file. Just click on button to build the package or documentation file.
|
||||
EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All files of module but also structured data and documentation will be definitly lost !
|
||||
EnterNameOfObjectToDeleteDesc=You can delete an object. WARNING: All files related to object will be definitly lost !
|
||||
DangerZone=Danger zone
|
||||
BuildPackage=Build package
|
||||
BuildPackage=Build package/documentation
|
||||
BuildDocumentation=Build documentation
|
||||
ModuleIsNotActive=This module was not activated yet (go into Home-Setup-Module to make it live)
|
||||
ModuleIsLive=This module has been activated. Any change on it may break a current active feature.
|
||||
DescriptionLong=Long description
|
||||
@ -33,5 +35,6 @@ ApiClassFile=File for PHP API class
|
||||
PageForList=PHP page for list of record
|
||||
PageForCreateEditView=PHP page to create/edit/view a record
|
||||
PathToModulePackage=Path to zip of module/application package
|
||||
PathToModuleDocumentation=Path to file of module/application documentation
|
||||
SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed.
|
||||
PackageFileNotYetGenerated=Package file not yet generated
|
||||
FileNotYetGenerated=File not yet generated
|
||||
|
||||
@ -247,12 +247,18 @@ ComposedProduct=Sub-product
|
||||
MinSupplierPrice=Minimum supplier price
|
||||
MinCustomerPrice=Minimum customer price
|
||||
DynamicPriceConfiguration=Dynamic price configuration
|
||||
DynamicPriceDesc=On product card, with this module enabled, you should be able to set mathematic functions to calculate Customer or Supplier prices. Such function can use all mathematic operators, some constants and variables. You can set here the variables you want to be able and if the variable need an automatic update, the external URL to use to ask Dolibarr to update automaticaly the value.
|
||||
DynamicPriceDesc=On product card, with this module enabled, you should be able to set mathematic functions to calculate Customer or Supplier prices. Such function can use all mathematic operators, some constants and variables. You can set here the variables you want to be able to use and if the variable need an automatic update, the external URL to use to ask Dolibarr to update automaticaly the value.
|
||||
AddVariable=Add Variable
|
||||
AddUpdater=Add Updater
|
||||
GlobalVariables=Global variables
|
||||
VariableToUpdate=Variable to update
|
||||
GlobalVariableUpdaters=Global variable updaters
|
||||
GlobalVariableUpdaterType0=JSON data
|
||||
GlobalVariableUpdaterHelp0=Parses JSON data from specified URL, VALUE specifies the location of relevant value,
|
||||
GlobalVariableUpdaterHelpFormat0=Format for request {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"}
|
||||
GlobalVariableUpdaterType1=WebService data
|
||||
GlobalVariableUpdaterHelp1=Parses WebService data from specified URL, NS specifies the namespace, VALUE specifies the location of relevant value, DATA should contain the data to send and METHOD is the calling WS method
|
||||
GlobalVariableUpdaterHelpFormat1=Format for request is {"URL": "http://example.com/urlofws", "VALUE": "array,targetvalue", "NS": "http://example.com/urlofns", "METHOD": "myWSMethod", "DATA": {"your": "data", "to": "send"}}
|
||||
UpdateInterval=Update interval (minutes)
|
||||
LastUpdated=Latest update
|
||||
CorrectlyUpdated=Correctly updated
|
||||
|
||||
@ -6,6 +6,7 @@ ConfirmDeleteWebsite=Are you sure you want to delete this web site. All its page
|
||||
WEBSITE_PAGENAME=Page name/alias
|
||||
WEBSITE_CSS_URL=URL of external CSS file
|
||||
WEBSITE_CSS_INLINE=CSS content
|
||||
PageNameAliasHelp=Name or alias of the page.<br>This alias is also used to forge a SEO URL when website is read from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "<strong>%s</strong>" to edit this alias.
|
||||
MediaFiles=Media library
|
||||
EditCss=Edit Style/CSS
|
||||
EditMenu=Edit menu
|
||||
@ -14,8 +15,9 @@ EditPageContent=Edit Content
|
||||
Website=Web site
|
||||
Webpage=Web page
|
||||
AddPage=Add page
|
||||
HomePage=Home Page
|
||||
PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first add a page.
|
||||
RequestedPageHasNoContentYet=Requested page with id %s has not content yet or cache file .tpl.php was removed. Edit content of page to solve this.
|
||||
RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this.
|
||||
PageDeleted=Page '%s' of website %s deleted
|
||||
PageAdded=Page '%s' added
|
||||
ViewSiteInNewTab=View site in new tab
|
||||
@ -23,7 +25,7 @@ ViewPageInNewTab=View page in new tab
|
||||
SetAsHomePage=Set as Home page
|
||||
RealURL=Real URL
|
||||
ViewWebsiteInProduction=View web site using home URLs
|
||||
SetHereVirtualHost=If you can set, on your web server, a dedicated virtual host with a root directory on <strong>%s</strong>, define here the virtual hostname so the preview can be done also using this direct web server access and not only using Dolibarr server.
|
||||
SetHereVirtualHost=If you can create, on your web server (Apache, Nginx, ...), a dedicated Virtual Host with PHP enabled and a Root directory on <strong>%s</strong><br>then enter here the virtual hostname you have created, so the preview can be done also using this direct web server access, and not only using Dolibarr server.
|
||||
PreviewSiteServedByWebServer=Preview %s in a new tab.<br><br>The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong>
|
||||
PreviewSiteServedByDolibarr=Preview %s in a new tab.<br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button.
|
||||
NoPageYet=No pages yet
|
||||
@ -579,6 +579,11 @@ elseif (! empty($module))
|
||||
$head2[$h][2] = 'description';
|
||||
$h++;
|
||||
|
||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=specifications&module='.$module;
|
||||
$head2[$h][1] = $langs->trans("Specifications");
|
||||
$head2[$h][2] = 'specifications';
|
||||
$h++;
|
||||
|
||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module;
|
||||
$head2[$h][1] = $langs->trans("Objects");
|
||||
$head2[$h][2] = 'objects';
|
||||
@ -692,6 +697,13 @@ elseif (! empty($module))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
if ($tab == 'specifications')
|
||||
{
|
||||
print $langs->trans("FeatureNotYetAvailable");
|
||||
|
||||
}
|
||||
|
||||
if ($tab == 'objects')
|
||||
{
|
||||
$head3 = array();
|
||||
@ -849,7 +861,6 @@ elseif (! empty($module))
|
||||
{
|
||||
print $langs->trans("FeatureNotYetAvailable");
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($tab == 'permissions')
|
||||
@ -900,7 +911,7 @@ elseif (! empty($module))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($tab == 'widget')
|
||||
if ($tab == 'widgets')
|
||||
{
|
||||
print $langs->trans("FeatureNotYetAvailable");
|
||||
|
||||
@ -947,17 +958,22 @@ elseif (! empty($module))
|
||||
{
|
||||
$FILENAMEZIP="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".zip";
|
||||
$outputfile = $conf->admin->dir_temp.'/'.$FILENAMEZIP;
|
||||
|
||||
$FILENAMEDOC="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".md";
|
||||
$outputfiledoc = $conf->admin->dir_temp.'/'.$FILENAMEDOC;
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<span class="fa fa-file"></span> '. $langs->trans("PathToModulePackage") . ' : ';
|
||||
if (! dol_is_file($outputfile)) print '<strong>'.$langs->trans("PackageFileNotYetGenerated").'</strong>';
|
||||
if (! dol_is_file($outputfile)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
|
||||
else {
|
||||
print '<strong>'.$outputfile.'</strong>';
|
||||
print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfile), 'dayhour').')';
|
||||
}
|
||||
print '</strong><br>';
|
||||
|
||||
print '<br><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<form name="generatepackage">';
|
||||
print '<input type="hidden" name="action" value="generatepackage">';
|
||||
@ -965,6 +981,25 @@ elseif (! empty($module))
|
||||
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("BuildPackage").'">';
|
||||
print '</form>';
|
||||
|
||||
print '<br><br><br>';
|
||||
|
||||
print '<span class="fa fa-file"></span> '. $langs->trans("PathToModuleDocumentation") . ' : ';
|
||||
if (! dol_is_file($outputfiledoc)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
|
||||
else {
|
||||
print '<strong>'.$outputfiledoc.'</strong>';
|
||||
print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledoc), 'dayhour').')';
|
||||
}
|
||||
print '</strong><br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<form name="generatepackage">';
|
||||
print '<input type="hidden" name="action" value="generatedoc">';
|
||||
print '<input type="hidden" name="tab" value="'.dol_escape_htmltag($tab).'">';
|
||||
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("BuildDocumentation").'">';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -172,7 +172,7 @@ while ($i < min($num,$limit))
|
||||
|
||||
$opensurvey_static->id=$obj->id_sondage;
|
||||
$opensurvey_static->status=$obj->status;
|
||||
|
||||
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?id='.$obj->id_sondage.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>';
|
||||
@ -198,19 +198,27 @@ while ($i < min($num,$limit))
|
||||
print '</td>';
|
||||
|
||||
print'<td align="right">'.$nbuser.'</td>'."\n";
|
||||
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day');
|
||||
if ($db->jdate($obj->date_fin) < time()) { print ' ('.$langs->trans("Expired").')'; }
|
||||
print '</td>';
|
||||
|
||||
print'<td align="center">'.$opensurvey_static->getLibStatut(5).'</td>'."\n";
|
||||
|
||||
|
||||
print'<td align="center"></td>'."\n";
|
||||
|
||||
print '</tr>'."\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
// If no record found
|
||||
if ($num == 0)
|
||||
{
|
||||
$colspan=8;
|
||||
//foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
|
||||
@ -54,9 +54,11 @@ if ($action == 'edit_updater') {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (!empty($action) && empty($cancel)) {
|
||||
//Global variable actions
|
||||
if ($action == 'create_variable' || $action == 'edit_variable') {
|
||||
|
||||
@ -464,24 +464,18 @@ class PriceGlobalVariableUpdater
|
||||
}
|
||||
$result = "";
|
||||
if ($this->type == 0) {
|
||||
//CURL client
|
||||
$handle = curl_init();
|
||||
curl_setopt_array($handle, array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 5,
|
||||
CURLOPT_POST => false,
|
||||
CURLOPT_HEADER => false,
|
||||
));
|
||||
// Call JSON request
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
$tmpresult=getURLContent($url);
|
||||
$code=$tmpresult['http_code'];
|
||||
$result=$tmpresult['content'];
|
||||
|
||||
$result = curl_exec($handle);
|
||||
$code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
|
||||
if (!isset($result)) {
|
||||
$this->error = $langs->trans("ErrorGlobalVariableUpdater0", "empty response");
|
||||
return -1;
|
||||
}
|
||||
if ($code !== 200) {
|
||||
$this->error = $langs->trans("ErrorGlobalVariableUpdater0", $code);
|
||||
$this->error = $langs->trans("ErrorGlobalVariableUpdater0", $code.' '.$tmpresult['curl_error_msg']);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -65,19 +65,18 @@ if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_A
|
||||
// Define format, type and filter
|
||||
$format='ical';
|
||||
$type='event';
|
||||
if (! empty($_GET["format"])) $format=$_GET["format"];
|
||||
if (! empty($_GET["type"])) $type=$_GET["type"];
|
||||
if (GETPOST("format",'alpha')) $format=GETPOST("format",'apha');
|
||||
if (GETPOST("type",'apha')) $type=GETPOST("type",'alpha');
|
||||
|
||||
$filters=array();
|
||||
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
||||
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
||||
if (! empty($_GET["idfrom"])) $filters['idfrom']=$_GET["idfrom"];
|
||||
if (! empty($_GET["idto"])) $filters['idto']=$_GET["idto"];
|
||||
if (! empty($_GET["project"])) $filters['project']=$_GET["project"];
|
||||
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
||||
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
||||
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
||||
if (GETPOST("notolderthan")) $filters['notolderthan']=GETPOST("notolderthan","int");
|
||||
if (GETPOST("year",'int')) $filters['year']=GETPOST("year",'int');
|
||||
if (GETPOST("id",'int')) $filters['id']=GETPOST("id",'int');
|
||||
if (GETPOST("idfrom",'int')) $filters['idfrom']=GETPOST("idfrom",'int');
|
||||
if (GETPOST("idto",'int')) $filters['idto']=GETPOST("idto",'int');
|
||||
if (GETPOST("project",'apha')) $filters['project']=GETPOST("project",'apha');
|
||||
if (GETPOST("logina",'apha')) $filters['logina']=GETPOST("logina",'apha');
|
||||
if (GETPOST("logint",'apha')) $filters['logint']=GETPOST("logint",'apha');
|
||||
if (GETPOST("notolderthan",'int')) $filters['notolderthan']=GETPOST("notolderthan","int");
|
||||
else $filters['notolderthan']=$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
|
||||
|
||||
// Check config
|
||||
@ -115,7 +114,6 @@ foreach ($filters as $key => $value)
|
||||
if ($key == 'idfrom') $filename.='-idfrom'.$value;
|
||||
if ($key == 'idto') $filename.='-idto'.$value;
|
||||
if ($key == 'project') $filename.='-project'.$value;
|
||||
if ($key == 'login') $filename.='-login'.$value;
|
||||
if ($key == 'logina') $filename.='-logina'.$value; // Author
|
||||
if ($key == 'logint') $filename.='-logint'.$value; // Assigned to
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<h2>Error</h2>
|
||||
|
||||
<br>
|
||||
You requested a page that does not exists.
|
||||
You requested a website or a page that does not exists.
|
||||
|
||||
<br>
|
||||
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
||||
|
||||
@ -67,23 +67,51 @@ if (empty($pageid))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/websites/class/website.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/websites/class/websitepage.class.php';
|
||||
|
||||
|
||||
$object=new Website($db);
|
||||
$object->fetch(0, $website);
|
||||
|
||||
$objectpage=new WebsitePage($db);
|
||||
$array=$objectpage->fetchAll($object->id);
|
||||
|
||||
if (count($array) > 0)
|
||||
if (empty($object->id))
|
||||
{
|
||||
$firstrep=reset($array);
|
||||
$pageid=$firstrep->id;
|
||||
if (empty($pageid))
|
||||
{
|
||||
// Return header 404
|
||||
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$objectpage=new WebsitePage($db);
|
||||
|
||||
if ($object->fk_default_home > 0)
|
||||
{
|
||||
$result=$objectpage->fetch($object->fk_default_home);
|
||||
if ($result > 0)
|
||||
{
|
||||
$pageid = $objectpage->id;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($pageid))
|
||||
{
|
||||
$array=$objectpage->fetchAll($object->id);
|
||||
if (is_array($array) && count($array) > 0)
|
||||
{
|
||||
$firstrep=reset($array);
|
||||
$pageid=$firstrep->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($pageid))
|
||||
{
|
||||
// Return header 404
|
||||
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
|
||||
|
||||
$langs->load("website");
|
||||
print $langs->trans("PreviewOfSiteNotYetAvailable");
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -95,7 +123,7 @@ if ($pageid == 'css') // No more used ?
|
||||
header('Content-type: text/css');
|
||||
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||
//if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||
//else
|
||||
//else
|
||||
header('Cache-Control: no-cache');
|
||||
$original_file=$dolibarr_main_data_root.'/websites/'.$website.'/styles.css.php';
|
||||
}
|
||||
@ -136,9 +164,13 @@ $original_file_osencoded=dol_osencode($original_file); // New file name encoded
|
||||
// This test if file exists should be useless. We keep it to find bug more easily
|
||||
if (! file_exists($original_file_osencoded))
|
||||
{
|
||||
// Return header 404
|
||||
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
|
||||
|
||||
$langs->load("website");
|
||||
print $langs->trans("RequestedPageHasNoContentYet", $pageid);
|
||||
//dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -18,8 +18,7 @@
|
||||
/**
|
||||
* \file htdocs/public/websites/styles.css.php
|
||||
* \ingroup website
|
||||
* \brief Page to output style page
|
||||
* \author Laurent Destailleur
|
||||
* \brief Page to output style page. Called with <link rel="stylesheet" href="styles.css.php?websiteid=123" type="text/css" />
|
||||
*/
|
||||
|
||||
define('NOTOKENRENEWAL',1); // Disables token renewal
|
||||
@ -48,6 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$error=0;
|
||||
$website=GETPOST('website', 'alpha');
|
||||
$websiteid=GETPOST('websiteid', 'int');
|
||||
$pageid=GETPOST('page', 'alpha')?GETPOST('page', 'alpha'):GETPOST('pageid', 'alpha');
|
||||
|
||||
$accessallowed = 1;
|
||||
@ -67,13 +67,20 @@ if (empty($pageid))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/websites/class/website.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/websites/class/websitepage.class.php';
|
||||
|
||||
|
||||
$object=new Website($db);
|
||||
$object->fetch(0, $website);
|
||||
|
||||
if ($websiteid)
|
||||
{
|
||||
$object->fetch($websiteid);
|
||||
$website=$object->ref;
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->fetch(0, $website);
|
||||
}
|
||||
$objectpage=new WebsitePage($db);
|
||||
$array=$objectpage->fetchAll($object->id);
|
||||
|
||||
|
||||
if (count($array) > 0)
|
||||
{
|
||||
$firstrep=reset($array);
|
||||
|
||||
@ -311,7 +311,9 @@ if ($ret)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td class="opacitymedium">'.$langs->trans('NoResourceInDatabase').'</td></tr>';
|
||||
$colspan=1;
|
||||
foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -414,7 +414,7 @@ if ($action == 'updatemeta')
|
||||
$tplcontent.= '<meta name="title" content="'.dol_escape_htmltag($objectpage->title).'" />'."\n";
|
||||
$tplcontent.= '<meta name="description" content="'.dol_escape_htmltag($objectpage->description).'" />'."\n";
|
||||
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.'" />'."\n";
|
||||
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?website='.$website.'" type="text/css" />'."\n";
|
||||
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?websiteid='.$object->id.'" type="text/css" />'."\n";
|
||||
$tplcontent.= '<title>'.dol_escape_htmltag($objectpage->title).'</title>'."\n";
|
||||
$tplcontent.= '</header>'."\n";
|
||||
|
||||
@ -452,6 +452,15 @@ if ($action == 'updatecontent' || GETPOST('refreshsite') || GETPOST('refreshpage
|
||||
{
|
||||
$object->fetch(0, $website);
|
||||
|
||||
// Check symlink to medias and restore it if ko
|
||||
$pathtomedias=DOL_DATA_ROOT.'/medias';
|
||||
$pathtomediasinwebsite=$pathofwebsite.'/medias';
|
||||
if (! is_link(dol_osencode($pathtomediasinwebsite)))
|
||||
{
|
||||
dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite);
|
||||
symlink($pathtomedias, $pathtomediasinwebsite);
|
||||
}
|
||||
|
||||
/*if (GETPOST('savevirtualhost') && $object->virtualhost != GETPOST('previewsite'))
|
||||
{
|
||||
$object->virtualhost = GETPOST('previewsite', 'alpha');
|
||||
@ -558,7 +567,7 @@ if ($action == 'updatecontent' || GETPOST('refreshsite') || GETPOST('refreshpage
|
||||
$tplcontent.= '<meta name="title" content="'.dol_escape_htmltag($objectpage->title).'" />'."\n";
|
||||
$tplcontent.= '<meta name="description" content="'.dol_escape_htmltag($objectpage->description).'" />'."\n";
|
||||
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.'" />'."\n";
|
||||
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?website='.$website.'" type="text/css" />'."\n";
|
||||
$tplcontent.= '<link rel="stylesheet" href="styles.css.php?websiteid='.$object->id.'" type="text/css" />'."\n";
|
||||
$tplcontent.= '<title>'.dol_escape_htmltag($objectpage->title).'</title>'."\n";
|
||||
$tplcontent.= '</header>'."\n";
|
||||
|
||||
@ -718,7 +727,7 @@ if (count($object->records) > 0)
|
||||
print '<input type="text" id="previewsiteurl" class="minwidth200imp" name="previewsite" placeholder="'.$langs->trans("http://myvirtualhost").'" value="'.$virtualurl.'">';
|
||||
//print '<input type="submit" class="button" name="previewwebsite" target="tab'.$website.'" value="'.$langs->trans("ViewSiteInNewTab").'">';
|
||||
$htmltext=$langs->trans("SetHereVirtualHost", $dataroot);
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helpvirtualhost');
|
||||
print '</div>';
|
||||
|
||||
$urlext=$virtualurl;
|
||||
@ -837,8 +846,8 @@ if (count($object->records) > 0)
|
||||
print '<div class="websiteinputurl">';
|
||||
print '<input type="text" id="previewpageurl" class="minwidth200imp" name="previewsite" value="'.$pagealias.'" disabled="disabled">';
|
||||
//print '<input type="submit" class="button" name="previewwebsite" target="tab'.$website.'" value="'.$langs->trans("ViewSiteInNewTab").'">';
|
||||
$htmltext=$langs->trans("WEBSITE_PAGENAME", $pagealias);
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
$htmltext=$langs->trans("PageNameAliasHelp", $langs->transnoentitiesnoconv("EditPageMeta"));
|
||||
print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helppagealias');
|
||||
print '</div>';
|
||||
|
||||
if (! empty($object->virtualhost))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user