I added a new class in my config.php
- Code: Select all
include('libraries/controller.forms.php');
The contents of the file is as follows
- Code: Select all
<?php
Class FormController extends controller {
// Add New Project form
function AddProjectProceed($pgn){
$NextPgn = $pgn + 1;
if ($configuration['htaccess'] == true) {
$NextPg = $path.'control/add/project/'.$NextPgn;
} else {
$NextPg = $path.'control.php?action=add&type=project&id='.$NextPgn;
}
return $NextPg;
}
function TimeStamp($type) {
$date = date("j M Y");
$explode = explode(" ", $date);
$DD = $explode[0];
$MMM = $explode[1];
$YYYY = $explode[2];
if ($type == 'days'){
// The Days
for ($d = 1; $d <= 31; $d++) {
($d = $DD) ? ($selected = 'selected="selected" ') : ($selected = '');
return '<option ' . $selected .'>' . $d . '</option>';
}
}
if ($type == 'months'){
// The Months
$MMarray = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec');
foreach($MMarray as $Month) {
($Month = $MMM) ? ($selected = ' selected="selected" ') : ($selected = '');
return '<option'.$selected.'>' . $Month . '</option>';
}
}
if ($type == 'years'){
// The Years
return '<option>' . $YYY . '</option>';
$5YY = $YYYY + 5;
// Returning a dropdown with 5 years
for ($i = $YYYY; $i <= $5YY; $i++) {
return '<option>' . $i . '</option>';
}
}
}
}
?>
The problem is that It returns this error
- Code: Select all
$d"); } } if ($type == 'months'){ /* The Months */ $MMarray = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'); foreach($MMarray as $Month) { ($Month = $MMM) ? ($selected = ' selected="selected" ') : ($selected = ''); return '' . $Month . ''; } } if ($type == 'years'){ /* The Years */ return '' . $YYY . ''; /* $5YY = $YYYY + 5; // Returning a dropdown with 5 years for ($i = $YYYY; $i <= $5YY; $i++) { return '' . $i . ''; } */ } } } ?>戼㸯㰊㹢慆慴牥潲㱲戯㨾†慃汬琠湵敤楦敮畦据楴湯›愠摤牰橯捥灴潲散摥⤨椠戼䌾尺睷屷潤浴硡捜湯牴汯瀮灨⼼㹢漠楬敮㰠㹢㜱⼼㹢戼㸯
Some of it is in Chinese (even though my installation is in English)
It seems that the file is parsed as text.
Do you have any solutions?
Thanks in advance.