Skip to content

Commit

Permalink
each PHP7 + year + PHP7.3 .... argument de define
Browse files Browse the repository at this point in the history
  • Loading branch information
jipexu committed Dec 1, 2019
1 parent ae1aeb3 commit d181692
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions revolution_16/modules/sform/sform.php
Expand Up @@ -2,7 +2,7 @@
################################################################################################
// Simple Form generator SFORM / version 1.6 for DUNE
// Class to manage several Form in a single database(MySql) in XML Format
// P.Brunier 2001 - 2018
// P.Brunier 2001 - 2019
//
// 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
Expand All @@ -15,7 +15,8 @@
// dans un même FORMULAIRE des champs avec ET sans TinyMce / Rajout de l'anti_spambot
################################################################################################
// Constante
define('CRLF', "\n", TRUE);
// define('CRLF', "\n", TRUE);
define('CRLF', "\n");
if (!isset($sform_path))
$sform_path='';
################################################################################################
Expand Down Expand Up @@ -53,7 +54,8 @@ function interro_fields($ibid) {

function interro_array($ibid0,$ibid1) {
$number='no';
while(list($key,$val)=each($ibid0) ){
// while(list($key,$val)=each($ibid0) ){
foreach($ibid0 as $key => $val) {
if ($ibid1==$val['en']) {
$number=$key;
break;
Expand Down Expand Up @@ -448,7 +450,8 @@ function print_form($bg) {
if ($num_extender!='no')
$str.=' '.$this->form_fields[$num_extender]['javas'].' ';
$str.=($this->form_fields[$i]['size'] > 1)? " size=\"".$this->form_fields[$i]['size']."\">" : '>';
while(list($key,$val)=each($this->form_fields[$i]['value']) ){
foreach($this->form_fields[$i]['value'] as $key => $val) {
// while(list($key,$val)=each($this->form_fields[$i]['value']) ){
$str.='
<option value="'.$key.'"';
if(array_key_exists('selected', $val) and $val['selected'])
Expand All @@ -471,7 +474,8 @@ function print_form($bg) {
<div class="form-group row">
<label class="col-form-label col-sm-4" for="'.$this->form_fields[$i]['name'].'">'.$this->form_fields[$i]['en'].'</label>
<div class="col-sm-8">';
while(list($key,$val)=each($this->form_fields[$i]['value']) ){
foreach($this->form_fields[$i]['value'] as $key => $val) {
// while(list($key,$val)=each($this->form_fields[$i]['value']) ){
$str.='
<input class="" type="radio" ';
if ($first_radio) {
Expand Down Expand Up @@ -1045,14 +1049,15 @@ function sform_browse_mysql($pas,$mess_passwd,$mess_ok,$presentation='') {
function sform_read_mysql($clef) {
global $NPDS_Prefix;

if ($clef!="") {
if ($clef!='') {
$clef=urldecode($clef);
$result=sql_query("SELECT content FROM ".$NPDS_Prefix."sform WHERE id_form='".$this->form_title."' AND id_key='".$this->form_key."' AND key_value='".addslashes($clef)."' AND passwd='".$this->form_password_access."' ORDER BY key_value ASC");
$tmp = sql_fetch_assoc($result);
if ($tmp) {
$ibid=explode("\n",$tmp['content']);
settype($op,'string');
while (list($num,$line)=each($ibid)) {
// while (list($num,$line)=each($ibid)) {
foreach($ibid as $num => $line) {
$op=$this->read_load_sform_data(stripslashes($line),$op);
}
return(true);
Expand Down

0 comments on commit d181692

Please sign in to comment.