'.(Tools::getValue('fixed_'.(int) $i)? ' ': '').' ')); } if(isset($_FILES['img_'.(int) $i]) && $_FILES['img_'.(int) $i]['name'] != '') { if(!copy($_FILES['img_'.(int) $i]['tmp_name'], _PS_ROOT_DIR_.'/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg')) { echo '

'.$this->l('An error occured during the image upload.').'

'; continue; } // version logged if ($i == 1) { file_put_contents( _PS_ROOT_DIR_.'/themes/site/skinstatic_cache/columns_'.(int) $i.'_'.(int) $id_lang.'.html', str_replace( array('{left_link}', '{right_link}', '{version}'), array( Tools::getValue('left_link_'.(int) $i), Tools::getValue('right_link_'.(int) $i), Configuration::get('SKINSTATIC_VERSION'), ), ''.(Tools::getValue('fixed_'.(int) $i)? ' ': '').' ')); } else { //echo "
";var_dump(Tools::getValue('right_link_'.(int) $i),Tools::getValue('left_link_'.(int) $i));echo "
";die(); file_put_contents( _PS_ROOT_DIR_.'/themes/site/skinstatic_cache/columns_'.(int) $i.'_'.(int) $id_lang.'.html', str_replace( array('{left_link}', '{right_link}', '{version}'), array( Tools::getValue('left_link_'.(int) $i), Tools::getValue('right_link_'.(int) $i), Configuration::get('SKINSTATIC_VERSION'), ), ''.(Tools::getValue('fixed_'.(int) $i)? ' ': '').' ')); } } } $this->_html .= '

'.$this->l('Skin updated successfully.').'



'; } else { $this->_html .= '

'.$this->l('You have to choose a site version.').'



'; } } } public function display() { global $cookie; $languages = Language::getLanguages(FALSE); // $divLangName = 'left_link_0¤right_link_0¤new_window_0¤fixed_0¤img_0¤left_link_1¤right_link_1¤new_window_1¤fixed_1¤img_1¤left_link_2¤right_link_2¤new_window_2¤fixed_2¤img_2'; $divLangName = 'left_link_1¤right_link_1¤new_window_1¤fixed_1¤img_1'; $divLangName .= '¤left_link_0¤right_link_0¤new_window_0¤fixed_0¤img_0'; $defaultFormLanguage = (int) Configuration::get('PS_LANG_DEFAULT'); $this->_html .= '

Habillage graphique du site

'.$this->l('Skin version').'
'; foreach($languages as $language) { $this->_html .= ' '.$language['iso_code'].' '; } $this->_html .= '

'.$this->l('Choose the site version to update').'

'.$this->l('Links (logged in)').'

'.$this->l('Links (logged out)').'


'; echo $this->_html; } }