|
@@ -3972,12 +3972,6 @@ class Lampcontrol extends Base_Controller {
|
|
|
$lampType = ['太阳能路灯'=>'Solar street lamp','景观灯'=>'Landscape lamp','庭院灯'=>'Garden light'];
|
|
|
$boardType = ['单晶板'=>'Single crystal plate','多晶板'=>'Polycrystalline plate','非晶板'=>'Amorphous plate'];
|
|
|
$batteryType = ['铅酸电池'=>'Lead acid battery','锂电池'=>'Lithium battery'];
|
|
|
- if (!preg_match('/^[A-Za-z\s*]+$/', $res['polematerial'])) {
|
|
|
- $res['polematerial'] = empty($polemaType[$res['polematerial']]) ? '' : $polemaType[$res['polematerial']];
|
|
|
- }
|
|
|
- if (!preg_match('/^[A-Za-z\s*]+$/', $res['lighttype'])) {
|
|
|
- $res['lighttype'] = empty($lightType[$res['lighttype']]) ? '' : $lightType[$res['lighttype']];
|
|
|
- }
|
|
|
if (!preg_match('/^[A-Za-z\s*]+$/', $res['lamptype'])) {
|
|
|
$res['lamptype'] = empty($lampType[$res['lamptype']]) ? '' : $lampType[$res['lamptype']];
|
|
|
}
|
|
@@ -3993,13 +3987,7 @@ class Lampcontrol extends Base_Controller {
|
|
|
$lampType = ['Solar street lamp'=>'太阳能路灯','Landscape lamp'=>'景观灯','Garden light'=>'庭院灯'];
|
|
|
$boardType = ['Single crystal plate'=>'单晶板','Polycrystalline plate'=>'多晶板','Amorphous plate'=>'非晶板'];
|
|
|
$batteryType = ['Lead acid battery'=>'铅酸电池','Lithium battery'=>'锂电池'];
|
|
|
- if (preg_match('/^[A-Za-z\s*]+$/', $res['polematerial'])) {
|
|
|
- $res['polematerial'] = empty($polemaType[$res['polematerial']]) ? '' : $polemaType[$res['polematerial']];
|
|
|
- }
|
|
|
|
|
|
- if (preg_match('/^[A-Za-z\s*]+$/', $res['lighttype'])) {
|
|
|
- $res['lighttype'] = empty($lightType[$res['lighttype']]) ? '' : $lightType[$res['lighttype']];
|
|
|
- }
|
|
|
if (preg_match('/^[A-Za-z\s*]+$/', $res['lamptype'])) {
|
|
|
$res['lamptype'] = empty($lampType[$res['lamptype']]) ? '' : $lampType[$res['lamptype']];
|
|
|
}
|