/**************************************************************
* Date: 2006-02-04 (V 1.0)
* Author 1: Nicola Pasquini
* Author 2: Francisc Ungureanu
* License: DO NOT Remove this text block!!!
* If block is removed, some parts of this site
* will no longer work properly, after few days.
* The authors will not be responsable for damnages
* to your website.
* Copyright© by Eurosito Comm. Srl - Italy
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
**************************************************************/
# Include session file (loads core)
require_once ("_includes/session_set.php");
# Include language file (must be after parameter load to use them)
require_once ( $_CCFG['_PKG_PATH_LANG'].'lang_contatti.php');
/**************************************************************
* Module Functions
**************************************************************/
function display($adata){
global $_LANG,$_CCFG,$_PACKAGE,$_GPV;
# Get security vars
$_SEC = get_security_flags();
$err_flag=0;
if($adata[stage]>1){
if(!$adata[department_id] || $adata[department_id]<0)$err_flag=1;
if(!trim($adata[name]))$err_flag=2;
if(do_validate_email($adata[email]))$err_flag=3;
if(!trim($adata[richiesta]))$err_flag=4;
}
if($adata[stage]==1 || !isset($adata[stage]) || $err_flag){
if($_SEC['_sadmin_flg']){
$info=get_admin_info($_SEC['_sadmin_id']);
$name=$info[nomecogn];
$email=$info[email];
}elseif($_SEC['_suser_flg']){
$info=get_user_info($_SEC['_suser_id']);
$name=$info[nomecogn];
$email=$info[email];
}
$title="Contatti";
$descr="";
$code='
';
if($err_flag && $adata[stage]>1)$code.='ATENZIONE: '.$_LANG['_CONTACT']['err'.$err_flag].''.$_nl;
$code.='