A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 72

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 89

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Input::$security is deprecated

Filename: core/Input.php

Line Number: 93

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Input::$uni is deprecated

Filename: core/Input.php

Line Number: 99

form_validation->set_message('required', 'Campul "%s" este obligatoriu'); $this->form_validation->set_message('numeric', 'Campul "%s" poate sa contina numai cifre'); $this->form_validation->set_message('valid_email', 'Adresa de email nu este valida'); $this->form_validation->set_rules('prenume', 'Prenume', 'trim|required'); $this->form_validation->set_rules('nume', 'Nume', 'trim|required'); $this->form_validation->set_rules('telefon', 'Telefon', 'trim|numeric|required'); $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); $this->form_validation->set_rules('suma', 'Suma', 'trim|numeric|callback_suma'); $this->form_validation->set_rules('alta-suma', 'Alta suma', 'trim|numeric'); if ( $this->form_validation->run()==FALSE ) // form validation did not go through { $this->load->view('home'); } else // form validation went through { $nume = $this->db->escape($_POST['nume']); $prenume = $this->db->escape($_POST['prenume']); $email = $this->db->escape($_POST['email']); $telefon = $this->db->escape($_POST['telefon']); $suma = ( isset($_POST['suma']) && $_POST['suma']!='' ) ? $this->db->escape($_POST['suma']) : $this->db->escape($_POST['alta-suma']); $serverdata = $this->db->escape(serialize($_SERVER)); $this->db->query("INSERT INTO form_doneaza (id, nume, prenume, email, telefon, suma, serverinfo, data) VALUES(NULL, ".$nume.", ".$prenume.", ".$email.", ".$telefon.", ".$suma.", ".$serverdata.", NOW())"); // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ $prenume = $this->input->post('prenume'); $nume = $this->input->post('nume'); $email = $this->input->post('email'); $telefon = $this->input->post('telefon'); $acum = time(); //$val = ($_POST['psuma'] == 'alta' ? intval($_POST['altasuma']) : ); if($_POST['alta-suma']) { $val = number_format(floatval($this->input->post('alta-suma')), 0); } else { $val = number_format(floatval($this->input->post('suma')), 0); } require_once("LiveUpdate.class.php"); $myKey = "J^86)(d3T3=t1W2T7^25"; $myLiveUpdate = new LiveUpdate($myKey); $myId = "SOSCOPI"; $myLiveUpdate->setMerchant($myId); $myOrderRef = "DON".$acum; $myLiveUpdate->setOrderRef($myOrderRef); $myOrderDate = date('Y-m-d H:i:s'); $myLiveUpdate->setOrderDate($myOrderDate); $PName = array('Donatie'); $myLiveUpdate->setOrderPName($PName); $PCode = array('DONSOS'); $myLiveUpdate->setOrderPCode($PCode); $PPrice = array($val); $myLiveUpdate->setOrderPrice($PPrice); $PQTY = array(1); $myLiveUpdate->setOrderQTY($PQTY); $PVAT = array(0); $myLiveUpdate->setOrderVAT($PVAT); //$myLiveUpdate->setTestMode(true); $Billing = array( 'billFName' => $prenume, 'billLName' => $nume, 'billEmail' => $email, 'billPhone' => $telefon, 'billCountryCode' => 'RO' ); $myLiveUpdate->setBilling($Billing); $Delivery = array( 'deliveryFName' => $prenume, 'deliveryLName' => $nume, 'deliveryPhone' => $telefon, 'deliveryCountryCode' => 'RO' ); $myLiveUpdate->setDelivery($Delivery); $myLiveUpdate->setPricesCurrency('RON'); $myLiveUpdate->setCurrency('RON'); $myLiveUpdate->setLanguage('ro'); $submit_url = $myLiveUpdate->liveUpdateURL; $form = $myLiveUpdate->getLiveUpdateHTML(); $back_ref = 'http://www.sos-satelecopiilor.ro/prima_zi_de_scoala/thank-you'; $this->db->query("INSERT INTO donatii SET nume = '".$nume."', prenume = '".$prenume."', email = '".$email."', telefon = '".$telefon."', data = '".date('Y-m-d H:i:s', $acum)."', refno = '".$myOrderRef."', suma = '".$val."', moneda = 'RON', recurent = '0', status = 'Neprocesat'"); $this->load->view('payu-form', array('submit_url' => $submit_url, 'form' => $form, 'back_ref' => $back_ref)); // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ // ------------------------ } } // pt verificare suma introdusa public function suma() { if ( empty($_POST['suma']) && empty($_POST['alta-suma']) ) { $this->form_validation->set_message('suma', 'Va rugam introduceti suma care vreti sa donati'); return false; } else { return true; } } } ?>