Fix bad value for ref of old contracts

This commit is contained in:
Laurent Destailleur 2017-07-03 02:09:14 +02:00
parent 8a96260892
commit 9e26e6b0a3
10 changed files with 132 additions and 53 deletions

View File

@ -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.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.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/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/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.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("errors");
$langs->load("admin"); $langs->load("admin");
@ -35,7 +37,6 @@ $langs->load("website");
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha'); $confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$rowid=GETPOST('rowid','alpha'); $rowid=GETPOST('rowid','alpha');
$id=1; $id=1;
@ -185,7 +186,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($result) // Add is ok if ($result) // Add is ok
{ {
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); 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 else
{ {
@ -204,6 +205,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; } else { $rowidcol="rowid"; }
$website=new Website($db);
$rowid=GETPOST('rowid','int');
$website->fetch($rowid);
// Modify entry // Modify entry
$sql = "UPDATE ".$tabname[$id]." SET "; $sql = "UPDATE ".$tabname[$id]." SET ";
// Modifie valeur des champs // Modifie valeur des champs
@ -229,7 +234,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
dol_syslog("actionmodify", LOG_DEBUG); dol_syslog("actionmodify", LOG_DEBUG);
//print $sql; //print $sql;
$resql = $db->query($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'); setEventMessages($db->error(), null, 'errors');
} }
@ -321,7 +336,7 @@ print "<br>\n";
// Confirmation de la suppression de la ligne // Confirmation de la suppression de la ligne
if ($action == 'delete') 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); //var_dump($elementList);
@ -355,7 +370,7 @@ if ($id)
$fieldlist=explode(',',$tabfield[$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 '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -388,9 +403,7 @@ if ($id)
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1; if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
} }
if ($id == 4) print '<td></td>';
print '<td colspan="4">'; print '<td colspan="4">';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -445,7 +458,7 @@ if ($id)
{ {
print '<br>'; 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="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">'; print '<input type="hidden" name="rowid" value="'.$rowid.'">';
@ -456,7 +469,7 @@ if ($id)
if ($num > $listlimit) if ($num > $listlimit)
{ {
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">'; 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>'; print '</td></tr>';
} }
@ -486,11 +499,11 @@ if ($id)
// Affiche nom du champ // Affiche nom du champ
if ($showfield) 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 getTitleFieldOfList(''); print getTitleFieldOfList('');
print '</tr>'; print '</tr>';
@ -539,7 +552,7 @@ if ($id)
// Can an entry be erased or disabled ? // Can an entry be erased or disabled ?
$iserasable=1;$isdisable=1; // true by default $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:'')).'&amp;code='.(! empty($obj->code)?urlencode($obj->code):'').'&amp;id='.$id.'&amp;'; $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&amp;code='.(! empty($obj->code)?urlencode($obj->code):'').'&amp;';
// Active // Active
print '<td align="center" class="nowrap">'; print '<td align="center" class="nowrap">';

View File

@ -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. // Make a change into HTML code to allow to include images from medias directory.
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&amp;entity=1&amp;file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" /> // <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&amp;entity=1&amp;file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
// become // 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); $newfreetext=preg_replace('/(<img.*src=")[^\"]*viewimage\.php[^\"]*modulepart=medias[^\"]*file=([^\"]*)("[^\/]*\/>)/', '\1'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext);
$line.=$outputlangs->convToOutputCharset($newfreetext); $line.=$outputlangs->convToOutputCharset($newfreetext);

View File

@ -31,17 +31,32 @@
function dolWebsiteOutput($content) function dolWebsiteOutput($content)
{ {
global $db, $langs, $conf, $user; global $db, $langs, $conf, $user;
global $dolibarr_main_url_root;
dol_syslog("dolWebsiteOutput start"); dol_syslog("dolWebsiteOutput start");
if (! defined('USEDOLIBARRSERVER')) 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&amp;entity=1&amp;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"); dol_syslog("dolWebsiteOutput end");

View File

@ -49,8 +49,8 @@ class modWebsites extends DolibarrModules
$this->module_position = 50; $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) // 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->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Enable the public website with CMS features"; $this->description = "Enable to build and serve public websites with CMS features";
$this->version = 'development'; // 'experimental' or 'dolibarr' or version $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) // 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); $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) // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)

View File

@ -346,6 +346,8 @@ ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_tx d
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL; ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL;
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL;
UPDATE TABLE llx_contrat set ref = rowid where ref is null or ref = '';
create table llx_payment_various create table llx_payment_various
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,

View File

@ -14,8 +14,9 @@ EditPageContent=Edit Content
Website=Web site Website=Web site
Webpage=Web page Webpage=Web page
AddPage=Add page AddPage=Add page
HomePage=Home Page
PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first add a 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 PageDeleted=Page '%s' of website %s deleted
PageAdded=Page '%s' added PageAdded=Page '%s' added
ViewSiteInNewTab=View site in new tab ViewSiteInNewTab=View site in new tab

View File

@ -18,7 +18,7 @@
<h2>Error</h2> <h2>Error</h2>
<br> <br>
You requested a page that does not exists. You requested a website or a page that does not exists.
<br> <br>
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?> <?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>

View File

@ -70,20 +70,48 @@ if (empty($pageid))
$object=new Website($db); $object=new Website($db);
$object->fetch(0, $website); $object->fetch(0, $website);
if (empty($object->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); $objectpage=new WebsitePage($db);
$array=$objectpage->fetchAll($object->id);
if (count($array) > 0) if ($object->fk_default_home > 0)
{ {
$firstrep=reset($array); $result=$objectpage->fetch($object->fk_default_home);
$pageid=$firstrep->id; 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)) if (empty($pageid))
{ {
// Return header 404
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
$langs->load("website"); $langs->load("website");
print $langs->trans("PreviewOfSiteNotYetAvailable"); print $langs->trans("PreviewOfSiteNotYetAvailable");
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
exit; exit;
} }
@ -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 // This test if file exists should be useless. We keep it to find bug more easily
if (! file_exists($original_file_osencoded)) if (! file_exists($original_file_osencoded))
{ {
// Return header 404
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
$langs->load("website"); $langs->load("website");
print $langs->trans("RequestedPageHasNoContentYet", $pageid); print $langs->trans("RequestedPageHasNoContentYet", $pageid);
//dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
exit; exit;
} }

View File

@ -1,5 +1,5 @@
<?php <?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 * 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 * it under the terms of the GNU General Public License as published by
@ -18,8 +18,7 @@
/** /**
* \file htdocs/public/websites/styles.css.php * \file htdocs/public/websites/styles.css.php
* \ingroup website * \ingroup website
* \brief Page to output style page * \brief Page to output style page. Called with <link rel="stylesheet" href="styles.css.php?websiteid=123" type="text/css" />
* \author Laurent Destailleur
*/ */
define('NOTOKENRENEWAL',1); // Disables token renewal define('NOTOKENRENEWAL',1); // Disables token renewal
@ -48,6 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0; $error=0;
$website=GETPOST('website', 'alpha'); $website=GETPOST('website', 'alpha');
$websiteid=GETPOST('websiteid', 'int');
$pageid=GETPOST('page', 'alpha')?GETPOST('page', 'alpha'):GETPOST('pageid', 'alpha'); $pageid=GETPOST('page', 'alpha')?GETPOST('page', 'alpha'):GETPOST('pageid', 'alpha');
$accessallowed = 1; $accessallowed = 1;
@ -69,8 +69,15 @@ if (empty($pageid))
require_once DOL_DOCUMENT_ROOT.'/websites/class/websitepage.class.php'; require_once DOL_DOCUMENT_ROOT.'/websites/class/websitepage.class.php';
$object=new Website($db); $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); $objectpage=new WebsitePage($db);
$array=$objectpage->fetchAll($object->id); $array=$objectpage->fetchAll($object->id);

View File

@ -414,7 +414,7 @@ if ($action == 'updatemeta')
$tplcontent.= '<meta name="title" content="'.dol_escape_htmltag($objectpage->title).'" />'."\n"; $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="description" content="'.dol_escape_htmltag($objectpage->description).'" />'."\n";
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.'" />'."\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.= '<title>'.dol_escape_htmltag($objectpage->title).'</title>'."\n";
$tplcontent.= '</header>'."\n"; $tplcontent.= '</header>'."\n";
@ -452,6 +452,15 @@ if ($action == 'updatecontent' || GETPOST('refreshsite') || GETPOST('refreshpage
{ {
$object->fetch(0, $website); $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')) /*if (GETPOST('savevirtualhost') && $object->virtualhost != GETPOST('previewsite'))
{ {
$object->virtualhost = GETPOST('previewsite', 'alpha'); $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="title" content="'.dol_escape_htmltag($objectpage->title).'" />'."\n";
$tplcontent.= '<meta name="description" content="'.dol_escape_htmltag($objectpage->description).'" />'."\n"; $tplcontent.= '<meta name="description" content="'.dol_escape_htmltag($objectpage->description).'" />'."\n";
$tplcontent.= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.'" />'."\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.= '<title>'.dol_escape_htmltag($objectpage->title).'</title>'."\n";
$tplcontent.= '</header>'."\n"; $tplcontent.= '</header>'."\n";