@@ -6,7 +6,7 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
10 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
11 | 11 | |
12 | 12 | smart_loadCommonLanguageFile(); |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
4 | 4 | |
5 | -require_once XOOPS_ROOT_PATH . '/class/tree.php'; |
|
5 | +require_once XOOPS_ROOT_PATH.'/class/tree.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Class smartobjecttree |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
3 | 3 | |
4 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/basedurl.php'; |
|
4 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/basedurl.php'; |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Class SmartobjectUrlLink |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | 31 | |
32 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
32 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Class SmartobjectAdsense |
@@ -111,23 +111,23 @@ discard block |
||
111 | 111 | { |
112 | 112 | global $smartobjectAdsenseHandler; |
113 | 113 | if ($this->getVar('style', 'n') !== '') { |
114 | - $ret = '<div style="' . $this->getVar('style', 'n') . '">'; |
|
114 | + $ret = '<div style="'.$this->getVar('style', 'n').'">'; |
|
115 | 115 | } else { |
116 | 116 | $ret = '<div>'; |
117 | 117 | } |
118 | 118 | |
119 | 119 | $ret .= '<script type="text/javascript"><!-- |
120 | -google_ad_client = "' . $this->getVar('client_id', 'n') . '"; |
|
121 | -google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'] . '; |
|
122 | -google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'] . '; |
|
123 | -google_ad_format = "' . $this->getVar('format', 'n') . '"; |
|
120 | +google_ad_client = "' . $this->getVar('client_id', 'n').'"; |
|
121 | +google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'].'; |
|
122 | +google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'].'; |
|
123 | +google_ad_format = "' . $this->getVar('format', 'n').'"; |
|
124 | 124 | google_ad_type = "text"; |
125 | 125 | google_ad_channel =""; |
126 | -google_color_border = "' . $this->getVar('border_color', 'n') . '"; |
|
127 | -google_color_bg = "' . $this->getVar('background_color', 'n') . '"; |
|
128 | -google_color_link = "' . $this->getVar('link_color', 'n') . '"; |
|
129 | -google_color_url = "' . $this->getVar('url_color', 'n') . '"; |
|
130 | -google_color_text = "' . $this->getVar('text_color', 'n') . '"; |
|
126 | +google_color_border = "' . $this->getVar('border_color', 'n').'"; |
|
127 | +google_color_bg = "' . $this->getVar('background_color', 'n').'"; |
|
128 | +google_color_link = "' . $this->getVar('link_color', 'n').'"; |
|
129 | +google_color_url = "' . $this->getVar('url_color', 'n').'"; |
|
130 | +google_color_text = "' . $this->getVar('text_color', 'n').'"; |
|
131 | 131 | //--></script> |
132 | 132 | <script type="text/javascript" |
133 | 133 | src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function getXoopsCode() |
144 | 144 | { |
145 | - $ret = '[adsense]' . $this->getVar('tag', 'n') . '[/adsense]'; |
|
145 | + $ret = '[adsense]'.$this->getVar('tag', 'n').'[/adsense]'; |
|
146 | 146 | |
147 | 147 | return $ret; |
148 | 148 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | */ |
264 | 264 | public function getCloneLink() |
265 | 265 | { |
266 | - $ret = '<a href="' . SMARTOBJECT_URL . 'admin/adsense.php?op=clone&adsenseid=' . $this->getVar('adsenseid') . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'editcopy.png" alt="' . _CO_SOBJECT_ADSENSE_CLONE . '" title="' . _CO_SOBJECT_ADSENSE_CLONE . '"></a>'; |
|
266 | + $ret = '<a href="'.SMARTOBJECT_URL.'admin/adsense.php?op=clone&adsenseid='.$this->getVar('adsenseid').'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'editcopy.png" alt="'._CO_SOBJECT_ADSENSE_CLONE.'" title="'._CO_SOBJECT_ADSENSE_CLONE.'"></a>'; |
|
267 | 267 | |
268 | 268 | return $ret; |
269 | 269 | } |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * Including the XoopsFormLoader classes |
17 | 17 | */ |
18 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
19 | -require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php'; |
|
20 | -require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsectionclose.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
19 | +require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php'; |
|
20 | +require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsectionclose.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * SmartForm base class |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $cancel_js_action = false, |
61 | 61 | $captcha = false |
62 | 62 | ) { |
63 | - $this->targetObject =& $target; |
|
63 | + $this->targetObject = & $target; |
|
64 | 64 | $this->form_fields = $form_fields; |
65 | 65 | $this->_cancel_js_action = $cancel_js_action; |
66 | 66 | $this->_captcha = $captcha; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | public function addCaptcha() |
90 | 90 | { |
91 | - require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/formcaptcha.php'; |
|
91 | + require_once SMARTOBJECT_ROOT_PATH.'include/captcha/formcaptcha.php'; |
|
92 | 92 | $this->addElement(new XoopsFormCaptcha(), true); |
93 | 93 | } |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function addCustomButton($name, $caption, $onclick = false) |
101 | 101 | { |
102 | - $custom_button_array = array( |
|
102 | + $custom_button_array = array( |
|
103 | 103 | 'name' => $name, |
104 | 104 | 'caption' => $caption, |
105 | 105 | 'onclick' => $onclick |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | if ($key) { |
121 | 121 | if ($this->targetObject->vars[$key]['readonly']) { |
122 | 122 | $formElement->setExtra('disabled="disabled"'); |
123 | - $formElement->setName($key . '-readonly'); |
|
123 | + $formElement->setName($key.'-readonly'); |
|
124 | 124 | // Since this element is disable, we still want to pass it's value in the form |
125 | 125 | $hidden = new XoopsFormHidden($key, $this->targetObject->vars[$key]['value']); |
126 | 126 | $this->addElement($hidden); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->addElement($hidden); |
132 | 132 | $otherExtra = isset($var['form_extra']) ? $var['form_extra'] : ''; |
133 | 133 | $onchangedString = "this.form.elements.changedField.value='$key'; this.form.elements.op.value='changedField'; submit()"; |
134 | - $formElement->setExtra('onchange="' . $onchangedString . '"' . ' ' . $otherExtra); |
|
134 | + $formElement->setExtra('onchange="'.$onchangedString.'"'.' '.$otherExtra); |
|
135 | 135 | } else { |
136 | 136 | if (isset($var['form_extra'])) { |
137 | 137 | $formElement->setExtra($var['form_extra']); |
@@ -298,8 +298,8 @@ discard block |
||
298 | 298 | asort($group_list); |
299 | 299 | foreach ($permissions as $permission) { |
300 | 300 | if ($this->targetObject->isNew()) { |
301 | - if (isset($smartModuleConfig['def_perm_' . $permission['perm_name']])) { |
|
302 | - $groups_value = $smartModuleConfig['def_perm_' . $permission['perm_name']]; |
|
301 | + if (isset($smartModuleConfig['def_perm_'.$permission['perm_name']])) { |
|
302 | + $groups_value = $smartModuleConfig['def_perm_'.$permission['perm_name']]; |
|
303 | 303 | } |
304 | 304 | } else { |
305 | 305 | $groups_value = $this->targetObject->getGroupPerm($permission['perm_name']); |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | } else { |
332 | 332 | $butt_create = new XoopsFormButton('', 'modify_button', $submit_button_caption, 'submit'); |
333 | 333 | } |
334 | - $butt_create->setExtra('onclick="this.form.elements.op.value=\'' . $form_name . '\'"'); |
|
334 | + $butt_create->setExtra('onclick="this.form.elements.op.value=\''.$form_name.'\'"'); |
|
335 | 335 | $button_tray->addElement($butt_create); |
336 | 336 | |
337 | 337 | //creating custom buttons |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | foreach ($this->_custom_button as $custom_button) { |
340 | 340 | $butt_custom = new XoopsFormButton('', $custom_button['name'], $custom_button['caption'], 'submit'); |
341 | 341 | if ($custom_button['onclick']) { |
342 | - $butt_custom->setExtra('onclick="' . $custom_button['onclick'] . '"'); |
|
342 | + $butt_custom->setExtra('onclick="'.$custom_button['onclick'].'"'); |
|
343 | 343 | } |
344 | 344 | $button_tray->addElement($butt_custom); |
345 | 345 | unset($butt_custom); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | // creating the "cancel" button |
350 | 350 | $butt_cancel = new XoopsFormButton('', 'cancel_button', _CO_SOBJECT_CANCEL, 'button'); |
351 | 351 | if ($this->_cancel_js_action) { |
352 | - $butt_cancel->setExtra('onclick="' . $this->_cancel_js_action . '"'); |
|
352 | + $butt_cancel->setExtra('onclick="'.$this->_cancel_js_action.'"'); |
|
353 | 353 | } else { |
354 | 354 | $butt_cancel->setExtra('onclick="history.go(-1)"'); |
355 | 355 | } |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | { |
368 | 368 | switch ($controlName) { |
369 | 369 | case 'check': |
370 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php'; |
|
370 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformcheckelement.php'; |
|
371 | 371 | $control = $this->targetObject->getControl($key); |
372 | 372 | $controlObj = new SmartFormCheckElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key)); |
373 | 373 | $controlObj->addOptionArray($control['options']); |
@@ -434,38 +434,38 @@ discard block |
||
434 | 434 | break; |
435 | 435 | |
436 | 436 | case 'urllink': |
437 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformurllinkelement.php'; |
|
437 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformurllinkelement.php'; |
|
438 | 438 | |
439 | 439 | return new SmartFormUrlLinkElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getUrlLinkObj($key)); |
440 | 440 | break; |
441 | 441 | |
442 | 442 | case 'richfile': |
443 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformrichfileelement.php'; |
|
443 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformrichfileelement.php'; |
|
444 | 444 | |
445 | 445 | return new SmartFormRichFileElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getFileObj($key)); |
446 | 446 | break; |
447 | 447 | case 'section': |
448 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php'; |
|
448 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php'; |
|
449 | 449 | |
450 | 450 | return new SmartFormSection($key, $this->targetObject->vars[$key]['form_caption']); |
451 | 451 | break; |
452 | 452 | |
453 | 453 | default: |
454 | - $classname = 'SmartForm' . ucfirst($controlName) . 'Element'; |
|
454 | + $classname = 'SmartForm'.ucfirst($controlName).'Element'; |
|
455 | 455 | if (!class_exists($classname)) { |
456 | - if (file_exists(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php')) { |
|
457 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php'; |
|
456 | + if (file_exists(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php')) { |
|
457 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php'; |
|
458 | 458 | } else { |
459 | 459 | // perhaps this is a control created by the module |
460 | 460 | $moduleName = $this->targetObject->handler->_moduleName; |
461 | - $moduleFormElementsPath = $this->targetObject->handler->_modulePath . 'class/form/elements/'; |
|
462 | - $classname = ucfirst($moduleName) . ucfirst($controlName) . 'Element'; |
|
463 | - $classFileName = strtolower($classname) . '.php'; |
|
461 | + $moduleFormElementsPath = $this->targetObject->handler->_modulePath.'class/form/elements/'; |
|
462 | + $classname = ucfirst($moduleName).ucfirst($controlName).'Element'; |
|
463 | + $classFileName = strtolower($classname).'.php'; |
|
464 | 464 | |
465 | - if (file_exists($moduleFormElementsPath . $classFileName)) { |
|
466 | - require_once $moduleFormElementsPath . $classFileName; |
|
465 | + if (file_exists($moduleFormElementsPath.$classFileName)) { |
|
466 | + require_once $moduleFormElementsPath.$classFileName; |
|
467 | 467 | } else { |
468 | - trigger_error($classname . ' Not found', E_USER_WARNING); |
|
468 | + trigger_error($classname.' Not found', E_USER_WARNING); |
|
469 | 469 | |
470 | 470 | return new XoopsFormLabel(); //Empty object |
471 | 471 | } |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $editor_configs['height'] = '400px'; |
535 | 535 | |
536 | 536 | $dhtml = true; |
537 | - $xoopseditorclass = XOOPS_ROOT_PATH . '/class/xoopsform/formeditor.php'; |
|
537 | + $xoopseditorclass = XOOPS_ROOT_PATH.'/class/xoopsform/formeditor.php'; |
|
538 | 538 | |
539 | 539 | if (file_exists($xoopseditorclass)) { |
540 | 540 | require_once $xoopseditorclass; |
@@ -544,8 +544,8 @@ discard block |
||
544 | 544 | |
545 | 545 | case 'tiny': |
546 | 546 | if (!$xoops22) { |
547 | - if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php')) { |
|
548 | - require_once XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php'; |
|
547 | + if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php')) { |
|
548 | + require_once XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php'; |
|
549 | 549 | $editor = new XoopsFormTinyTextArea(array( |
550 | 550 | 'caption' => $caption, |
551 | 551 | 'name' => $name, |
@@ -575,8 +575,8 @@ discard block |
||
575 | 575 | |
576 | 576 | case 'fckeditor': |
577 | 577 | if (!$xoops22) { |
578 | - if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php')) { |
|
579 | - require_once XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php'; |
|
578 | + if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php')) { |
|
579 | + require_once XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php'; |
|
580 | 580 | $editor = new XoopsFormFckeditor(array( |
581 | 581 | 'caption' => $caption, |
582 | 582 | 'name' => $name, |
@@ -598,8 +598,8 @@ discard block |
||
598 | 598 | |
599 | 599 | case 'inbetween': |
600 | 600 | if (!$xoops22) { |
601 | - if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php')) { |
|
602 | - require_once XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php'; |
|
601 | + if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php')) { |
|
602 | + require_once XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php'; |
|
603 | 603 | $editor = new XoopsFormInbetweenTextArea(array( |
604 | 604 | 'caption' => $caption, |
605 | 605 | 'name' => $name, |
@@ -621,8 +621,8 @@ discard block |
||
621 | 621 | |
622 | 622 | case 'koivi': |
623 | 623 | if (!$xoops22) { |
624 | - if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) { |
|
625 | - require_once XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php'; |
|
624 | + if (is_readable(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php')) { |
|
625 | + require_once XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php'; |
|
626 | 626 | $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px'); |
627 | 627 | } else { |
628 | 628 | if ($dhtml) { |
@@ -638,8 +638,8 @@ discard block |
||
638 | 638 | |
639 | 639 | case 'spaw': |
640 | 640 | if (!$xoops22) { |
641 | - if (is_readable(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php')) { |
|
642 | - require_once XOOPS_ROOT_PATH . '/class/spaw/formspaw.php'; |
|
641 | + if (is_readable(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php')) { |
|
642 | + require_once XOOPS_ROOT_PATH.'/class/spaw/formspaw.php'; |
|
643 | 643 | $editor = new XoopsFormSpaw($caption, $name, $value); |
644 | 644 | } |
645 | 645 | } else { |
@@ -649,8 +649,8 @@ discard block |
||
649 | 649 | |
650 | 650 | case 'htmlarea': |
651 | 651 | if (!$xoops22) { |
652 | - if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) { |
|
653 | - require_once XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php'; |
|
652 | + if (is_readable(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')) { |
|
653 | + require_once XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php'; |
|
654 | 654 | $editor = new XoopsFormHtmlarea($caption, $name, $value); |
655 | 655 | } |
656 | 656 | } else { |
@@ -686,10 +686,10 @@ discard block |
||
686 | 686 | $size = $multiple ? 5 : 1; |
687 | 687 | $theme_select = new XoopsFormSelect($var['form_caption'], $key, $this->targetObject->getVar($key), $size, $multiple); |
688 | 688 | |
689 | - $handle = opendir(XOOPS_THEME_PATH . '/'); |
|
689 | + $handle = opendir(XOOPS_THEME_PATH.'/'); |
|
690 | 690 | $dirlist = array(); |
691 | 691 | while (false !== ($file = readdir($handle))) { |
692 | - if (is_dir(XOOPS_THEME_PATH . '/' . $file) && !preg_match("/^[.]{1,2}$/", $file) |
|
692 | + if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/", $file) |
|
693 | 693 | && strtolower($file) !== 'cvs') { |
694 | 694 | $dirlist[$file] = $file; |
695 | 695 | } |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | { |
712 | 712 | foreach ($this->_elements as $eleObj) { |
713 | 713 | if ($eleObj->getName() == $keyname) { |
714 | - $ret =& $eleObj; |
|
714 | + $ret = & $eleObj; |
|
715 | 715 | break; |
716 | 716 | } |
717 | 717 | } |
@@ -728,9 +728,9 @@ discard block |
||
728 | 728 | { |
729 | 729 | $required = $this->getRequired(); |
730 | 730 | $ret = " |
731 | - <form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "' onsubmit='return xoopsFormValidate_" . $this->getName() . "(this);'" . $this->getExtra() . "> |
|
731 | + <form name='" . $this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."' onsubmit='return xoopsFormValidate_".$this->getName()."(this);'".$this->getExtra()."> |
|
732 | 732 | <table width='100%' class='outer' cellspacing='1'> |
733 | - <tr><th colspan='2'>" . $this->getTitle() . '</th></tr> |
|
733 | + <tr><th colspan='2'>" . $this->getTitle().'</th></tr> |
|
734 | 734 | '; |
735 | 735 | $hidden = ''; |
736 | 736 | $class = 'even'; |
@@ -739,11 +739,11 @@ discard block |
||
739 | 739 | $ret .= $ele; |
740 | 740 | } elseif (!$ele->isHidden()) { |
741 | 741 | //$class = ( $class == 'even' ) ? 'odd': 'even'; |
742 | - $ret .= "<tr id='" . $ele->getName() . "' valign='top' align='left'><td class='head'>" . $ele->getCaption(); |
|
742 | + $ret .= "<tr id='".$ele->getName()."' valign='top' align='left'><td class='head'>".$ele->getCaption(); |
|
743 | 743 | if ($ele->getDescription() !== '') { |
744 | - $ret .= '<br><br><span style="font-weight: normal;">' . $ele->getDescription() . '</span>'; |
|
744 | + $ret .= '<br><br><span style="font-weight: normal;">'.$ele->getDescription().'</span>'; |
|
745 | 745 | } |
746 | - $ret .= "</td><td class='$class'>" . $ele->render() . "</td></tr>\n"; |
|
746 | + $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>\n"; |
|
747 | 747 | } else { |
748 | 748 | $hidden .= $ele->render(); |
749 | 749 | } |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | 'name' => $this->getName(), |
790 | 790 | 'action' => $this->getAction(), |
791 | 791 | 'method' => $this->getMethod(), |
792 | - 'extra' => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '(this);"' . $this->getExtra(), |
|
792 | + 'extra' => 'onsubmit="return xoopsFormValidate_'.$this->getName().'(this);"'.$this->getExtra(), |
|
793 | 793 | 'javascript' => $js, |
794 | 794 | 'elements' => $elements |
795 | 795 | )); |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | } |
808 | 808 | $myts = MyTextSanitizer::getInstance(); |
809 | 809 | $formname = $this->getName(); |
810 | - $js .= "function xoopsFormValidate_{$formname}(myform) {"; |
|
810 | + $js .= "function xoopsFormValidate_{$formname}(myform) {"; |
|
811 | 811 | // First, output code to check required elements |
812 | 812 | $elements = $this->getRequired(); |
813 | 813 | foreach ($elements as $elt) { |
@@ -858,15 +858,15 @@ discard block |
||
858 | 858 | window.alert(\"{$eltmsg}\"); myform['{$eltname}'][0].focus(); return false; }\n"; |
859 | 859 | } |
860 | 860 | } else { |
861 | - $js .= "if ( myform.{$eltname}.value == \"\" ) " . "{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n"; |
|
861 | + $js .= "if ( myform.{$eltname}.value == \"\" ) "."{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n"; |
|
862 | 862 | } |
863 | 863 | } |
864 | 864 | // Now, handle custom validation code |
865 | - $elements =& $this->getElements(true); |
|
865 | + $elements = & $this->getElements(true); |
|
866 | 866 | foreach ($elements as $elt) { |
867 | 867 | if (method_exists($elt, 'renderValidationJS') && strtolower(get_class($elt)) !== 'xoopsformcheckbox') { |
868 | 868 | if ($eltjs = $elt->renderValidationJS()) { |
869 | - $js .= $eltjs . "\n"; |
|
869 | + $js .= $eltjs."\n"; |
|
870 | 870 | } |
871 | 871 | } |
872 | 872 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformselectelement.php'; |
|
12 | +require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformselectelement.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormSelect_multiElement |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php'; |
|
12 | +require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormImageUploadElement |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $this->SmartFormFileElement($object, $key); |
27 | 27 | // Override name for upload purposes |
28 | - $this->setName('upload_' . $key); |
|
28 | + $this->setName('upload_'.$key); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function render() |
37 | 37 | { |
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "'> |
|
39 | - <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . "> |
|
40 | - <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName() . "'>"; |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."'> |
|
39 | + <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra()."> |
|
40 | + <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName()."'>"; |
|
41 | 41 | } |
42 | 42 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php'; |
|
12 | +require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormFileUploadElement |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $this->SmartFormFileElement($object, $key); |
27 | 27 | // Override name for upload purposes |
28 | - $this->setName('upload_' . $key); |
|
28 | + $this->setName('upload_'.$key); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function render() |
37 | 37 | { |
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "'> |
|
39 | - <input type='file' name='upload_" . $this->getName() . "' id='upload_" . $this->getName() . "'" . $this->getExtra() . "> |
|
40 | - <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "'>"; |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."'> |
|
39 | + <input type='file' name='upload_" . $this->getName()."' id='upload_".$this->getName()."'".$this->getExtra()."> |
|
40 | + <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."'>"; |
|
41 | 41 | } |
42 | 42 | } |
@@ -35,12 +35,12 @@ |
||
35 | 35 | */ |
36 | 36 | public function render() |
37 | 37 | { |
38 | - $ret = "<input type='text' name='" . $this->getName() . "' id='" . $this->getName() . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $this->getExtra() . '>'; |
|
38 | + $ret = "<input type='text' name='".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra().'>'; |
|
39 | 39 | |
40 | - $ret .= ' <div class="smartobject_autocomplete_hint" id="smartobject_autocomplete_hint' . $this->getName() . '"></div> |
|
40 | + $ret .= ' <div class="smartobject_autocomplete_hint" id="smartobject_autocomplete_hint'.$this->getName().'"></div> |
|
41 | 41 | |
42 | 42 | <script type="text/javascript"> |
43 | - new Ajax.Autocompleter("' . $this->getName() . '","smartobject_autocomplete_hint' . $this->getName() . '","' . $this->_include_file . '?key=' . $this->getName() . '"); |
|
43 | + new Ajax.Autocompleter("' . $this->getName().'","smartobject_autocomplete_hint'.$this->getName().'","'.$this->_include_file.'?key='.$this->getName().'"); |
|
44 | 44 | </script>'; |
45 | 45 | |
46 | 46 | return $ret; |