Registrieren
*@link authorEmai: info@soft-evolution.com *@link http://www.soft-evolution.com * **/ // Dont allow direct linking defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); require_once( 'lottery.html.php' ); require_once( $mainframe->getPath( 'front_html' ) ); require_once( $mainframe->getPath( 'class' ) ); global $mosConfig_lang; // Get the right language if it exists if (file_exists($mosConfig_absolute_path.'/administrator/components/com_lottery/languages/'.$mosConfig_lang.'.php')) { include_once($mosConfig_absolute_path.'/administrator/components/com_lottery/languages/'.$mosConfig_lang.'.php'); } else { include_once($mosConfig_absolute_path.'/administrator/components/com_lottery/languages/english.php'); } //require_once( $mosConfig_absolute_path . "/administrator/components/com_lottery/lang/lang_ge.php" ); global $database; global $errormessage; global $params; global $mosConfig_sitename, $mosConfig_live_site; global $mosConfig_mailfrom, $mosConfig_fromname; //get data and output accordingly $menu = $mainframe->get( 'menu' ); $params = new mosParameters( $menu->params ); /* show header if option set to do so*/ lottery_html::header($params); /* more changes to come, this is the change to the previous version, of course there is only one lottery allowed at a time, but you can choose in the options related to the menu item the lottery is linked to, which lottery to show */ $lottery_id = $params->def( 'lottery_id', '*' ); $database->setQuery("SELECT * FROM #__softev_lottery_game WHERE published = '1' AND enddate >= CURDATE() AND id LIKE '$lottery_id'"); $rows = $database->loadObjectList(); if( count($rows) > 0) { if(isset($_POST['vote'])){ lottery_html::newVote($params, $mainframe, $rows[0], $_POST['btngroup'], $_POST['usertitle'], $_POST['userfirstname'],$_POST['userlastname'],$_POST['useradress'], $_POST['userzipcode'], $_POST['usertown'], $_POST['usercountry'], $_POST['usermail'],$_POST['newsletter']); } else { // only the first matching lottery allowed - ignore the others if more than one published lottery_html::showLotteries($params, $mainframe, $rows[0],$_POST['btngroup'], $_POST['usertitle'], $_POST['userfirstname'],$_POST['userlastname'],$_POST['useradress'], $_POST['userzipcode'], $_POST['usertown'], $_POST['usercountry'], $_POST['usermail'],$_POST['newsletter'],''); } } else { lottery_html::noActiveLotteries( MSG_NO_ACTIVE_LOTTERIES ); } ?>
Advertisement