Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.5.0.0
- * @ Author : DeZender
- * @ Release on : 22.06.2018
- * @ Official site : http://DeZender.Net
- *
- */
- define('TEXTFIELDS', 'TEXTFELD,TEXTAREA,DATEPICKER');
- define('TEXTFIELDS_CALCULATE', 'TEXTFELD,TEXTAREA');
- define('RPA_MULTISELECT_CHECKBOXES', false);
- define('DIR_RPA_COM', DIR_FS_CATALOG . 'includes/rpa-com/');
- require_once DIR_RPA_COM . 'rpa_module.php';
- require_once DIR_FS_INC . 'xtc_oe_get_options_values_name.inc.php';
- require_once DIR_FS_INC . 'xtc_oe_get_options_name.inc.php';
- class rpa_CustomInputs
- {
- public static $textfeld = '';
- public static $fileupload = '';
- public static $price_per_sign = false;
- public static $price_free_signs = 0;
- public static $price_per_word = false;
- public static $price_free_words = 0;
- public function __construct()
- {
- }
- public static function checkout_process_attributes_v106($sql_data_array, $i, $j)
- {
- global $order;
- if (!rpa_Module::module_check('textfeld')) {
- return $sql_data_array;
- }
- $value = $order->products[$i]['attributes'][$j]['value_id'];
- $options_values_name = xtc_oe_get_options_values_name($value, '');
- if (self::is_textfield($options_values_name, 'strpos') || $options_values_name == 'FILEUPLOAD') {
- $value = $order->products[$i]['attributes'][$j]['value_id'];
- $sql_data_array['products_options_values'] = trim(nl2br($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value]));
- $fileupload = $_SESSION['cart_fileupload'][$order->products[$i]['id']][$value];
- if ($fileupload != '' && is_file($fileupload)) {
- $tmp1 = $fileupload;
- $fileupload = str_replace('upload_tmp_', 'upload_', $fileupload);
- copy($tmp1, $fileupload);
- unlink($tmp1);
- $sql_data_array['products_options_fileupload'] = $fileupload;
- }
- if (isset($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value])) {
- unset($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value]);
- }
- if (isset($_SESSION['cart_fileupload'][$order->products[$i]['id']][$value])) {
- unset($_SESSION['cart_fileupload'][$order->products[$i]['id']][$value]);
- }
- }
- return $sql_data_array;
- }
- public static function checkout_process_attributes($sql_data_array, $i, $j)
- {
- global $order;
- if (!rpa_Module::module_check('textfeld')) {
- return $sql_data_array;
- }
- $value = $order->products[$i]['attributes'][$j]['value_id'];
- $options_values_name = xtc_oe_get_options_values_name($value, '');
- if (self::is_textfield($options_values_name, 'strpos') || $options_values_name == 'FILEUPLOAD') {
- $sql_data_array['products_options_values'] = trim(nl2br($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value]));
- $fileupload = $_SESSION['cart_fileupload'][$order->products[$i]['id']][$value];
- if ($fileupload != '' && is_file($fileupload) && strpos($fileupload, 'upload_tmp_') !== false) {
- $tmp1 = $fileupload;
- $fileupload = str_replace('upload_tmp_', 'upload_', $fileupload);
- copy($tmp1, $fileupload);
- unlink($tmp1);
- }
- if ($fileupload != '' && is_file($fileupload)) {
- $sql_data_array['products_options_fileupload'] = $fileupload;
- }
- if (isset($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value])) {
- unset($_SESSION['cart_textfeld'][$order->products[$i]['id']][$value]);
- }
- if (isset($_SESSION['cart_fileupload'][$order->products[$i]['id']][$value])) {
- unset($_SESSION['cart_fileupload'][$order->products[$i]['id']][$value]);
- }
- }
- return $sql_data_array;
- }
- public static function check_required_textfields()
- {
- $params = $_POST['id'];
- $error_msg = '';
- $fileupload_ok = '';
- if (is_array($params) && 0 < sizeof($params)) {
- reset($params);
- while (list($option, $value) = each($params)) {
- $text = '';
- $value_name = xtc_oe_get_options_values_name($value, '');
- if (self::is_textfield($value_name, 'strpos')) {
- $text = trim($_POST['txt_' . $value]);
- if (isset($_POST['req_' . $value]) && $text == '') {
- $error_msg .= xtc_oe_get_options_name($option, '') . TEXT_ERROR_MSG_FIELD;
- }
- $maxlength = self::get_input_maxlength($value_name);
- $text = preg_replace("'[\r\n]+'", ' ', $text);
- $textlength = self::string_length($text);
- if (0 < $maxlength && $maxlength < $textlength) {
- $error_msg .= xtc_oe_get_options_name($option, '') . sprintf(TEXT_ERROR_MAX_LENGTH, $maxlength, $textlength);
- }
- if (!isset($_POST['req_' . $value]) && $text == '') {
- unset($_POST['id'][$option]);
- }
- }
- if ($value_name == 'FILEUPLOAD') {
- include DIR_RPA_COM . 'rpa_upload.php';
- ...............................................................................
- ..................................................
- ..........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement