Exemplo n.º 1
0
                $showhits = intval($_POST['showhits']);
                $showMarticles = intval($_POST['showMarticles']);
                $showMupdated = intval($_POST['showMupdated']);
				$anonpost = intval($_POST['anonpost']);
				$notifysubmit = intval($_POST['notifysubmit']);
				$shortart = intval($_POST['shortart']);
				$shortcat = intval($_POST['shortcat']);
				$novote = intval($_POST['novote']);
				$realname = intval($_POST['realname']);
				$noicons = intval($_POST['noicons']);
				$summary = intval($_POST['summary']);
				// -- Skalpack2 [start]
				$aidxpathtype = intval($_POST['aidxpathtype']);  
				$aidxorder = $_POST['aidxorder'];
				// -- Skalpack2 [end] added these to next line. 
				$selmimetype = saveAccess($_POST['selmimetype']);
				$wfsmode = $_POST['wfsmode'];
				$imgheight = $_POST['imgheight'];
				$imgwidth = $_POST['imgwidth'];
				$filesize = $_POST['filesize'];
				$picon = $_POST['picon'];

// easy to rename module and table
//				$xoopsDB->query("update ".$xoopsDB->prefix("wfs_config")." set articlesapage='$articlesapage', filesbasepath='$filesbasepath', graphicspath='$graphicspath', sgraphicspath='$sgraphicspath', smiliepath='$smiliepath', htmlpath='$htmlpath', toppagetype=$toppagetype, wysiwygeditor=$wysiwygeditor, showcatpic=$showcatpic, comments=$comments, blockscroll=$blockscroll, blockheight=$blockheight, blockamount=$blockamount, blockdelay=$blockdelay, submenus=$submenus, webmstonly=$webmstonly, lastart=$lastart,numuploads=$numuploads, timestamp='$timestamp', autoapprove='$autoapprove', showauthor='$showauthor',showcomments='$showcomments', showfile='$showfile', showrated='$showrated', showvotes='$showvotes',showupdated='$showupdated', showhits='$showhits', showMarticles = '$showMarticles', showMupdated = '$showMupdated', anonpost ='$anonpost', notifysubmit ='$notifysubmit', shortart ='$shortart', shortcat = '$shortcat', novote = '$novote', realname = '$realname', noicons='$noicons', summary='$summary', aidxpathtype='$aidxpathtype', aidxorder='$aidxorder', selmimetype='$selmimetype', wfsmode='$wfsmode', imgwidth='$imgwidth', imgheight='$imgheight', filesize='$filesize', picon='$picon'");

				$xoopsDB->query("update ".$xoopsDB->prefix($wfsTableConfig)." set articlesapage='$articlesapage', filesbasepath='$filesbasepath', graphicspath='$graphicspath', sgraphicspath='$sgraphicspath', smiliepath='$smiliepath', htmlpath='$htmlpath', toppagetype=$toppagetype, wysiwygeditor=$wysiwygeditor, showcatpic=$showcatpic, comments=$comments, blockscroll=$blockscroll, blockheight=$blockheight, blockamount=$blockamount, blockdelay=$blockdelay, submenus=$submenus, webmstonly=$webmstonly, lastart=$lastart,numuploads=$numuploads, timestamp='$timestamp', autoapprove='$autoapprove', showauthor='$showauthor',showcomments='$showcomments', showfile='$showfile', showrated='$showrated', showvotes='$showvotes',showupdated='$showupdated', showhits='$showhits', showMarticles = '$showMarticles', showMupdated = '$showMupdated', anonpost ='$anonpost', notifysubmit ='$notifysubmit', shortart ='$shortart', shortcat = '$shortcat', novote = '$novote', realname = '$realname', noicons='$noicons', summary='$summary', aidxpathtype='$aidxpathtype', aidxorder='$aidxorder', selmimetype='$selmimetype', wfsmode='$wfsmode', imgwidth='$imgwidth', imgheight='$imgheight', filesize='$filesize', picon='$picon'");

                redirect_header("config.php",1,_AM_DBUPDATED);
                exit();
       } 
        if ($_POST['defaults'] = 1) {
Exemplo n.º 2
0
 function loadPostVars()
 {
     global $HTTP_POST_VARS, $myts, $xoopsUser, $xoopsConfig;
     $this->groupid = saveAccess($HTTP_POST_VARS['groupid']);
     $this->setTitle($HTTP_POST_VARS['title']);
     $this->setMainText($HTTP_POST_VARS['maintext']);
     $this->setCategoryid($HTTP_POST_VARS['categoryid']);
     $htmlpage = $myts->stripSlashesGPC($HTTP_POST_VARS['htmlpage']);
     $this->setChangeuser($HTTP_POST_VARS['changeuser']);
     $this->setHtmlpage($HTTP_POST_VARS['htmlpage']);
     $this->setWeight($HTTP_POST_VARS['weight']);
     if (!empty($HTTP_POST_VARS['autodate'])) {
         $pubdate = mktime($HTTP_POST_VARS['autohour'], $HTTP_POST_VARS['automin'], 0, $HTTP_POST_VARS['automonth'], $HTTP_POST_VARS['autoday'], $HTTP_POST_VARS['autoyear']);
         $offset = $xoopsUser->timezone() - $xoopsConfig['server_TZ'];
         $pubdate = $pubdate - $offset * 3600;
         $this->setPublished($pubdate);
     }
     if (!empty($HTTP_POST_VARS['autoexpdate'])) {
         $expdate = mktime($HTTP_POST_VARS['autoexphour'], $HTTP_POST_VARS['autoexpmin'], 0, $HTTP_POST_VARS['autoexpmonth'], $HTTP_POST_VARS['autoexpday'], $HTTP_POST_VARS['autoexpyear']);
         $offset = $xoopsUser->timezone() - $xoopsConfig['server_TZ'];
         $expdate = $expdate - $offset * 3600;
         $this->setExpired($expdate);
     } else {
         $this->setExpired(0);
     }
     if (!empty($HTTP_POST_VARS['movetotop'])) {
         $this->setPublished(time());
     }
     $this->noshowart = isset($HTTP_POST_VARS['noshowart']) ? 1 : 0;
     $this->nohtml = isset($HTTP_POST_VARS['nohtml']) ? 1 : 0;
     $this->nosmiley = isset($HTTP_POST_VAR['nosmiley']) ? 1 : 0;
     $this->approved = isset($HTTP_POST_VARS['approved']) ? 1 : 0;
     $this->offline = isset($HTTP_POST_VARS['offline']) ? 1 : 0;
     $this->notifypub = isset($HTTP_POST_VARS['notifypub']) ? 1 : 0;
     $this->ishtml = isset($HTTP_POST_VARS['htmlpage']) && $HTTP_POST_VARS['htmlpage'] != ' ' ? 1 : 0;
     if ($HTTP_POST_VARS['justhtml'] == 2) {
         $this->ishtml = 2;
     }
     if (isset($HTTP_POST_VARS['summary'])) {
         $this->setSummary($HTTP_POST_VARS['summary']);
     }
     if (isset($HTTP_POST_VARS['url'])) {
         $this->setUrl($HTTP_POST_VARS['url']);
     }
     if (isset($HTTP_POST_VARS['urlname'])) {
         $this->setUrlname($HTTP_POST_VARS['urlname']);
     }
     if (isset($HTTP_POST_VARS['page'])) {
         $this->setPage($HTTP_POST_VARS['page']);
     }
 }
Exemplo n.º 3
0
     $showhits = intval($HTTP_POST_VARS['showhits']);
     $showMarticles = intval($HTTP_POST_VARS['showMarticles']);
     $showMupdated = intval($HTTP_POST_VARS['showMupdated']);
     $anonpost = intval($HTTP_POST_VARS['anonpost']);
     $notifysubmit = intval($HTTP_POST_VARS['notifysubmit']);
     $shortart = intval($HTTP_POST_VARS['shortart']);
     $shortcat = intval($HTTP_POST_VARS['shortcat']);
     $novote = intval($HTTP_POST_VARS['novote']);
     $realname = intval($HTTP_POST_VARS['realname']);
     $noicons = intval($HTTP_POST_VARS['noicons']);
     $summary = intval($HTTP_POST_VARS['summary']);
     // -- Skalpack2 [start]
     $aidxpathtype = intval($HTTP_POST_VARS['aidxpathtype']);
     $aidxorder = $HTTP_POST_VARS['aidxorder'];
     // -- Skalpack2 [end] added these to next line.
     $selmimetype = saveAccess($HTTP_POST_VARS['selmimetype']);
     $wfsmode = $HTTP_POST_VARS['wfsmode'];
     $imgheight = $HTTP_POST_VARS['imgheight'];
     $imgwidth = $HTTP_POST_VARS['imgwidth'];
     $filesize = $HTTP_POST_VARS['filesize'];
     $picon = $HTTP_POST_VARS['picon'];
     $xoopsDB->query("update " . $xoopsDB->prefix("wfs_config") . " set articlesapage='{$articlesapage}', filesbasepath='{$filesbasepath}', graphicspath='{$graphicspath}', sgraphicspath='{$sgraphicspath}', smiliepath='{$smiliepath}', htmlpath='{$htmlpath}', toppagetype={$toppagetype}, wysiwygeditor={$wysiwygeditor}, showcatpic={$showcatpic}, comments={$comments}, blockscroll={$blockscroll}, blockheight={$blockheight}, blockamount={$blockamount}, blockdelay={$blockdelay}, submenus={$submenus}, webmstonly={$webmstonly}, lastart={$lastart},numuploads={$numuploads}, timestamp='{$timestamp}', autoapprove='{$autoapprove}', showauthor='{$showauthor}',showcomments='{$showcomments}', showfile='{$showfile}', showrated='{$showrated}', showvotes='{$showvotes}',showupdated='{$showupdated}', showhits='{$showhits}', showMarticles = '{$showMarticles}', showMupdated = '{$showMupdated}', anonpost ='{$anonpost}', notifysubmit ='{$notifysubmit}', shortart ='{$shortart}', shortcat = '{$shortcat}', novote = '{$novote}', realname = '{$realname}', noicons='{$noicons}', summary='{$summary}', aidxpathtype='{$aidxpathtype}', aidxorder='{$aidxorder}', selmimetype='{$selmimetype}', wfsmode='{$wfsmode}', imgwidth='{$imgwidth}', imgheight='{$imgheight}', filesize='{$filesize}', picon='{$picon}'");
     redirect_header("config.php", 1, _AM_DBUPDATED);
     exit;
 }
 if ($HTTP_POST_VARS['defaults'] = 1) {
     $xoopsDB->query("update " . $xoopsDB->prefix("wfs_config") . " set \n\t\t\t\tarticlesapage   = '10', \n\t\t\t\ttoppagetype \t= '1', \n\t\t\t\twysiwygeditor \t= '1',\n  \t\t\t\tshowcatpic \t\t= '0',\n\t\t\t\tcomments \t\t= '0',\n  \t\t\t\tblockscroll \t= '0',\n\t\t\t\tblockheight\t\t= '50',\n\t\t\t  \tblockamount \t= '5',\n\t\t\t  \tblockdelay \t\t= '1',\n\t\t\t\tsubmenus  \t\t= '0',\n  \t\t\t\twebmstonly \t\t= '0',\n  \t\t\t\tlastart \t\t= '10',\n\t\t\t\tnumuploads \t\t= '5',\n\t\t\t\ttimestamp \t\t= 'Y-m-d',\n\t\t\t\tautoapprove \t= '0',\n\t\t\t\tshowauthor \t\t= '1',\n\t\t\t\tshowcomments \t= '1',\n\t\t\t\tshowfile \t\t= '1',\n\t\t\t\tshowrated \t\t= '1',\n\t\t\t\tshowvotes \t\t= '1',\n\t\t\t\tshowupdated \t= '1',\n\t\t\t\tshowhits \t\t= '1',\n\t\t\t\tshowMarticles \t= '1',\n\t\t\t\tshowMupdated \t= '1',\n\t\t\t\tanonpost \t\t= '0',\n\t\t\t\tnotifysubmit \t= '0',\n\t\t\t\tshortart \t\t= '0',\n\t\t\t\tshortcat \t\t= '0',\n\t\t\t\tnovote \t\t\t= '0',\n\t\t\t\trealname \t\t= '0',\n\t\t\t\tindexheading \t= 'WF-Sections',\n\t\t\t\tindexheader \t= '',\n\t\t\t\tindexfooter \t= '',\n\t\t\t\tgroupid \t\t= '1 2 3',\n\t\t\t\tindeximage \t\t= 'logo.gif',\n\t\t\t\tnoicons \t\t= '0',\n\t\t\t\tsummary \t\t= '1',\n\t\t\t\taidxpathtype \t= '1',\n\t\t\t\taidxorder \t\t= 'weight',\n\t\t\t\tfilesize \t\t= '2097152',\n\t\t\t\tselmimetype \t= 'doc lha lzh pdf gtar swf tar tex texinfo texi zip Zip au XM snd mid midi kar mpga mp2 mp3 aif aiff aifc m3u ram rm rpm ra wav wax bmp gif ief jpeg jpg jpe png tiff tif ico pbm ppm rgb xbm xpm css html htm asc txt rtx rtf mpeg mpg mpe qt mov mxu avi',\n\t\t\t\twfsmode \t\t= '666',\n\t\t\t\timgwidth \t\t= '100',\n\t\t\t\timgheight \t\t= '100',\n\t\t\t\tpicon \t\t\t= '1'\n\t\t\t\t");
     redirect_header("config.php", 1, _AM_REVERTED);
     exit;
 }
 break;
 case 'apply_functions':
 case 'save_functions':
     saveFunctions();
     break;
     ##-- ACCESS -----------------
 ##-- ACCESS -----------------
 case 'show_access':
     if ($mode == 'role_id') {
         showAccess(0, $cid[0]);
     } else {
         showAccess($cid[0], 0);
     }
     break;
 case 'apply_access':
 case 'save_access':
     saveAccess();
     break;
 case 'delete_users_access':
     if ($mode == 'role_id') {
         showUserAccessR(0, isset($pid) ? $pid : $cid[0]);
     } else {
         showUserAccessR(isset($pid) ? $pid : $cid[0], 0);
     }
     break;
 case 'delete_users_access_save':
     saveUserAccessR($cid);
     break;
 case 'add_users_access':
     if ($mode == 'role_id') {
         showUserAccessA(0, $cid[0]);
     } else {
Exemplo n.º 5
0
		function loadPostVars() {

                global $myts, $xoopsUser, $xoopsConfig;
				
                $this->groupid = saveAccess($_POST['groupid']);
				$this->setTitle($_POST['title']);
                $this->setMainText($_POST['maintext']);
                $this->setCategoryid($_POST['categoryid']);
				$htmlpage = $myts->stripSlashesGPC($_POST['htmlpage']);
				$this->setChangeuser($_POST['changeuser']);
                $this->setHtmlpage($_POST['htmlpage']);
				$this->setWeight($_POST['weight']);
							
				if ( !empty($_POST['autodate']) ) {
					$pubdate = mktime($_POST['autohour'],$_POST['automin'] , 0, $_POST['automonth'], $_POST['autoday'], $_POST['autoyear']);
					$offset = $xoopsUser->timezone() - $xoopsConfig['server_TZ'];
					$pubdate = $pubdate - ($offset * 3600);

// in preview, Published is recoverd by index.php
					$this->setPublished($pubdate);

// bug fix : NOWSETTIME is wrong
					$this->auto_published = $pubdate;

				}

				if ( !empty($_POST['autoexpdate']) ) {
					$expdate = mktime($_POST['autoexphour'], $_POST['autoexpmin'], 0, $_POST['autoexpmonth'], $_POST['autoexpday'], $_POST['autoexpyear']);
					$offset = $xoopsUser->timezone() - $xoopsConfig['server_TZ'];
					$expdate = $expdate - ($offset * 3600);
					$this->setExpired($expdate);
				} else {
				  $this->setExpired(0);
				}

				if ( !empty($_POST['movetotop']) ) {
					$this->setPublished(time());
				}
				
				$this->noshowart = ( isset($_POST['noshowart']))		? 1 : 0;
				$this->nohtml   = ( isset($_POST['nohtml']))		? 1 : 0;

// bug fix
				$this->nosmiley = ( isset($_POST['nosmiley']))		? 1 : 0;
				
				$this->approved = ( isset($_POST['approved']))		? 1 : 0;
				$this->offline = ( isset($_POST['offline']))		? 1 : 0;
				$this->notifypub = ( isset($_POST['notifypub']))		? 1 : 0;
				$this->ishtml = ( isset($_POST['htmlpage']) && $_POST['htmlpage'] != ' ' )  ? 1 : 0;

// add mobr, enaamp				
				$this->nobr   = ( isset($_POST['nobr']))	? 1 : 0;
				$this->enaamp = ( isset($_POST['enaamp']))	? 1 : 0;

// clean off notice message of justhtml
//				if ( $_POST['justhtml'] == 2 ) {
				if ( isset($_POST['justhtml']) && ($_POST['justhtml'] == 2 ) ) {
					$this->ishtml = 2;
				}
				if ( isset($_POST['summary']))
                        $this->setSummary($_POST['summary']);

				if ( isset($_POST['url']))
                        $this->setUrl($_POST['url']);

				if ( isset($_POST['urlname']))
                        $this->setUrlname($_POST['urlname']);

				if ( isset($_POST['page']))
                        $this->setPage($_POST['page']);

// bug fix : changeuser
           		if ($_POST['changeuser'] != '-1')
                        $this->setUid($_POST['changeuser']);

        }
Exemplo n.º 6
0
function db_store($maintext,$title,$time)
{
	global $xoopsUser, $wfsConfig;

	$cid       = $_POST['categoryid'];
	$flag_test = $_POST['test'];

	if ($flag_test) { return; }
	if (!$maintext) { return false; }
	if (!$title)    { return false; }
	if (!$time)     { return false; }
	if (!$cid)      { return false; }

	$article = new WfsArticle();

// bug 
// title occure error in DB processing, whiche have an escape character
//	$article->setTitle($title);

// bug
// double addslashes when magic_quotes_gpc is off 
//	$article->setTitle( addslashes($title) );
//	$article->setMainText( addslashes($maintext) );

	if (get_magic_quotes_gpc()) 
	{
		$title    = addslashes($title);
		$maintext = addslashes($maintext);
	}

	$article->setTitle( $title );
	$article->setMainText( $maintext );

	$article->setPublished($time);
	$article->setCategoryid($cid);
	$article->setUid( $xoopsUser->getvar('uid') );

	$article->settype("admin");
	$article->groupid = saveAccess('1 3 2'); // admin guest user
	$article->setChangeuser(-1);
	$article->setHtmlpage('');
	$article->setWeight(0);
	$article->setExpired(0);
	$article->noshowart = 0;
	$article->nohtml    = 0;
	$article->nosmiley  = 0;
	$article->approved  = 0;
	$article->offline   = 0;
	$article->notifypub = 0;
	$article->ishtml    = 0;
	$article->nobr      = 1;
	$article->enaamp    = 1;

	if ( $article->store() ) { return true; }
	else { return false; }
}
Exemplo n.º 7
0
	/**
      * @return array|false
      * @param JForm
      * @param array
      * @param string
     */   
	public function validate(& $form, &$data, $group) {
      $session = JFactory::getSession();
      saveAccess($session->get('userCsoport'),$data);
	  $aktEv = (int)date('Y');
	  $db = JFactory::getDBO();
	  $db->setQuery('select * from #__tny_extrafields order by field_id');
	  $extraFields = $db->loadObjectList();
	  
	  $mobilKorzetek = array(3620,3621,3630,3631,3670,);
	  $tiltottKorzetek = array(3640,3650,3651,3655,3660,3680,3690,3691);
	  
	  //DBG foreach ($data as $fn => $fv) echo 'validate data '.$fn.'='.$fv.'<br>';
	  $id = 0;
      $cid = JRequest::getVar('cid');
      if (is_array($cid)) $id = $cid[0];
      
	  foreach ($data as $fn => $fv) {
		  $data[$fn] = trim($fv);
	  }
      $errorMsg = '';      
      $this->errorFields = array();
      if ($data['nev1']=='') {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_NO_EMPTY').'<br />';
          $this->errorFields[] = 'nev1';
      }
      if ($data['terszerv_id']<=0) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_TERSZERV_NO_EMPTY').'<br />';
          $this->errorFields[] = 'nev1';
      }
      if ($data['kategoria_id']<=0) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KATEGORIA_NO_EMPTY').'<br />';
          $this->errorFields[] = 'nev1';
      }
	  
	  
	  if (!$this->chkMail($data['email'])) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_EMAIL_WRONG').'<br />';
          $this->errorFields[] = 'email';
	  }   
	  if (!$this->chkMail($data['email2'])) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_EMAIL_WRONG').' (email2)<br />';
          $this->errorFields[] = 'email2';
	  }   
	  if (!$this->chkMail($data['belsoemail'])) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_EMAIL_WRONG').' (belső email)<br />';
          $this->errorFields[] = 'belsoemail';
	  }   
	  if (!$this->chkNev($data['nev1'],1)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - vezetéknév<br />';
          $this->errorFields[] = 'nev1';
	  }
	  if (!$this->chkNev($data['nev2'],1)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - középső név<br />';
          $this->errorFields[] = 'nev2';
	  }
	  if (!$this->chkNev($data['nev3'],3)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - utónév<br />';
          $this->errorFields[] = 'nev3';
	  }
	  if (!$this->chkNev($data['telepules'],3)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - település<br />';
          $this->errorFields[] = 'telepules';
	  }
	  if (!$this->chkNev($data['ttelepules'],3)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - település<br />';
          $this->errorFields[] = 'ttelepules';
	  }
	  if (!$this->chkUtca($data['utca'],3)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - közterület neve<br />';
          $this->errorFields[] = 'utca';
	  }
	  if (!$this->chkUtca($data['tutca'],3)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_NAME_WRONG').' - közterület neve<br />';
          $this->errorFields[] = 'utca';
	  }
      if (($data['szev'] != '') & ($data['szev'] != 0) &
  	      (($data['szev'] < ($aktEv - 110)) | ($data['szev'] > ($aktEv - 15)))) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_SZEV_WRONG').'<br />';
          $this->errorFields[] = 'szev';
	  } 	
      if (($data['kapcsdatum'] != '') & (($data['kapcsdatum'] < '2000') | ($data['kapcsdatum'] > '2100'))) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KAPCSDATUM_WRONG').'<br />';
          $this->errorFields[] = 'szev';
	  } 
	  if (($data['telepules'] != 'Budapest') & ($data['kerulet'] != 0)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_NOBP').'<br />';
          $this->errorFields[] = 'kerulet';
	  }	
	  if (($data['ttelepules'] != 'Budapest') & ($data['tkerulet'] != 0)) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_NOBP').'<br />';
          $this->errorFields[] = 'tkerulet';
	  }	
	  if ((int)$data['kerulet'] > 22) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_BIG').'<br />';
          $this->errorFields[] = 'kerulet';
	  }	
	  if ((int)$data['tkerulet'] > 22) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_BIG').'<br />';
          $this->errorFields[] = 'kerulet';
	  }	
	  if (($data['irsz'] != '') & ($data['kerulet'] != 0) & 
	      (substr($data['irsz'],1,2) != $data['kerulet'])) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_WRONG').'<br />';
          $this->errorFields[] = 'kerulet';
	  } 
	  if (($data['tirsz'] != '') & ($data['tkerulet'] != 0) & 
	      (substr($data['tirsz'],1,2) != $data['tkerulet'])) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_WRONG').'<br />';
          $this->errorFields[] = 'tkerulet';
	  } 
	  if (($data['irsz']!='') & ($data['kerulet'] != 0) & (substr($data['irsz'],0,1)!='1')) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_WRONG').'<br />';
          $this->errorFields[] = 'tkerulet';
	  }
	  if (($data['tirsz']!='') & ($data['tkerulet'] != 0) & (substr($data['tirsz'],0,1)!='1')) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_KERULET_WRONG').'<br />';
          $this->errorFields[] = 'tkerulet';
	  }
	  
	  // dátum ellenörzés
	  $s = $data['kapcsdatum'];
	  $s = str_replace('.','-',$s);
	  $s = str_replace('/','-',$s);
	  $s = str_replace(' ','-',$s);
	  $data['kapcsdatum'] = $s;
	  if ($s != '') {
        $w = explode('-',$s);
		if (checkdate($w[1],$w[2],$w[0]) == false) {
          $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_WRONG_DATE').' '.$s.'<br />';
          $this->errorFields[] = 'kapcsdatum';
		  $data['kapcsdatum'] = '';
		}  
	  }
	  
	  if ($joDate == false) {
		  $data['kapcsdatum'] = '';
		  //DBG echo $s.' / '.$data['kapcsdatum']; 
	  }
	  
	  // telefonszám ellenörzés
	  if ($data['telefon'] != '') {
		  $data['telefon'] =stdTelefonszam($data['telefon']);
		  $w = explode(',', $data['telefon']);
		  foreach ($w as $tel) {
			if (!$this->telefonValidator($tel, $errorMsg, $mobilKorzetek, $tiltottKorzetek))
              $this->errorFields[] = 'telefon';
		  }
	  }
	  
	  // extrafields -ek ellenörzése
	  foreach ($extraFields as $extraField) {
		  if ($extraField->field_type == 'phone') {
		    $data[$extraField->field_name] =stdTelefonszam($data[$extraField->field_name]);
			if (!$this->telefonValidator($data[$extraField->field_name], $errorMsg, $mobilKorzetek, $tiltottKorzetek))
              $this->errorFields[] = $extraField->field_name;
		  }
		  if ($extraField->field_type == 'email') {
			  if (!$this->chkMail($data[$extraField->field_name])) {
				  $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_EMAIL_WRONG').'<br />';
				  $this->errorFields[] = $extraField->field_name;
			  }   
		  }
		  if ($extraField->field_type == 'integer') {
			  if (0 + $data[$extraField->field_name] != $data[$extraField->field_name]) {
				  $errorMsg .= JText::_('COM_TAGNYILVANTARTAS_INTEGER_WRONG').'<br />';
				  $this->errorFields[] = $extraField->field_name;
			  }
		  }
	  }
	  
      if ($errorMsg != '') {
          $session->set('errorFields',$this->errorFields);     
          // $this->setError($errorMsg);
          JFactory::getApplication()->enqueueMessage($errorMsg, 'error');		  
          return false;
      } else {
          $session->set('errorFields',array());     
      }
      return $data;  
    }