Example #1
0
     $form_value = parse_ini_str($cnt_form["fields"][$key]['value'], false);
     if (isset($form_value['lang'])) {
         $form_value['lang'] = preg_replace('/[^a-zA-Z]/', '', $form_value['lang']);
     } else {
         $form_value['lang'] = $phpwcms['default_lang'];
     }
     if (isset($form_value['default'])) {
         $form_value['default'] = preg_replace('/[^a-zA-Z]/', '', $form_value['default']);
     } else {
         $form_value['default'] = '-';
     }
     $option_value = substr(empty($POST_val[$POST_name]) ? $form_value['default'] : $POST_val[$POST_name], 0, 2);
     if (!empty($form_value['first'])) {
         $form_field .= '<option value="">' . html_specialchars($form_value['first']) . '</option>' . LF;
     }
     $form_field .= list_country($option_value, $form_value['lang']);
     // build value/option select menu
 } else {
     $form_value = explode("\n", $cnt_form["fields"][$key]['value']);
     $form_value = array_map('trim', $form_value);
     $form_value = array_diff($form_value, array(''));
     if (count($form_value)) {
         $form_optgroup = false;
         foreach ($form_value as $option_value) {
             // search for OPTGROUP
             if (strpos(strtoupper($option_value), 'OPTGROUP') === 0) {
                 $option_value = explode(' ', $option_value, 2);
                 if (isset($option_value[1])) {
                     $option_value = trim($option_value[1]);
                     $form_field .= '<optgroup label="';
                     $form_field .= $option_value == '' ? 'Please select:' : html_specialchars($option_value);
         continue;
     } elseif ($item_key === 'INV_COUNTRY' && strpos($order_process, '[COUNTRY_OPTIONS') !== false) {
         // [COUNTRY_OPTIONS:DE]Land wählen[/COUNTRY_OPTIONS]
         $order_process = preg_replace_callback('/\\[COUNTRY_OPTIONS(:[A-Z]{2,2}){0,1}\\](.*?)\\[\\/COUNTRY_OPTIONS\\]/', function ($match) use($row) {
             if ($row) {
                 $selected = $row;
             } elseif ($match[1] && ($match[1] = substr($match[1], 1))) {
                 $selected = $match[1];
             } else {
                 $selected = '';
             }
             $options = '';
             if ($match[2]) {
                 $options .= '<option value="">' . $match[2] . '</option>';
             }
             $options .= list_country($selected);
             return $options;
         }, $order_process);
         continue;
     }
     $field_error = empty($ERROR['inv_address'][$item_key]) ? '' : $ERROR['inv_address'][$item_key];
     $row = html($row);
     $order_process = render_cnt_template($order_process, $item_key, $row);
     $order_process = render_cnt_template($order_process, 'ERROR_' . $item_key, $field_error);
 }
 $payment_options = get_payment_options();
 if (count($payment_options)) {
     $payment_fields = array();
     $payment_selected = isset($_SESSION[CART_KEY]['payby']) && isset($payment_options[$_SESSION[CART_KEY]['payby']]) ? $_SESSION[CART_KEY]['payby'] : '';
     foreach ($payment_options as $item_key => $row) {
         $payment_fields[$item_key] = '<div><label>';
Example #3
0
                 if ($count_cell < $cfield_max_height && $count_cell) {
                     for ($i = $count_cell; $count_cell < $cfield_max_height; $count_cell++) {
                         $CNT_TMP .= "<td colspan=\"2\">" . spacer(1, 1) . "</td>";
                     }
                     $CNT_TMP .= "</tr>\n";
                 }
                 $CNT_TMP .= "</table></td></tr>\n";
             }
             break;
             //COUNTRY MENU
         //COUNTRY MENU
         case "SC":
             $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>";
             $CNT_TMP .= "<select name=\"" . $cfield[1] . "\" id=\"" . $cfield[1] . "\" class=\"selectMenu\"";
             $CNT_TMP .= ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . ">\n";
             $CNT_TMP .= list_country($cfield[5]);
             $CNT_TMP .= "</select></td></tr>\n";
             break;
             // Captcha Image
         // Captcha Image
         case "CA":
             $CNT_TMP .= "<tr><td class=\"formLabel\" align=\"right\">" . must_filled($cfield[2]) . $cfield[3] . "</td><td>";
             $CNT_TMP .= '<table cellpadding="0" cellspacing="0" border="0"><tr><td>';
             $CNT_TMP .= "<input type=\"text\" name=\"" . $cfield[1] . "\" value=\"" . html_specialchars(trim($cfield[5])) . "\" size=\"" . $cfield_length . "\" ";
             $CNT_TMP .= $cfield_max_height ? "maxlength=\"" . $cfield_max_height . "\" " : "";
             $CNT_TMP .= "id=\"" . $cfield[1] . "\" class=\"inputText\"" . ($cfield[6] ? " style=\"width:" . $cfield[6] . "px\"" : "") . " />";
             $CNT_TMP .= "</td><td>&nbsp;&nbsp;</td><td>" . '<img src="img/captcha.php?regen=y&amp;' . time() . '" alt="Captcha" />' . "</tr></table></td></tr>\n";
             break;
     }
 }
 $CNT_TMP .= "<tr><td colspan=\"2\">" . spacer(1, 10) . "</td></tr>\n";
?>
:&nbsp;</td>
		<td colspan="2"><input name="form_zip" type="text" id="form_zip" class="v12 width100" value="<?php 
echo html($detail["detail_zip"]);
?>
" size="30" maxlength="50"></td>
	</tr>
	<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
	<tr>
		<td align="right"><?php 
echo $BL['be_profile_label_country'];
?>
:&nbsp;</td>
		<td colspan="2"><select name="form_country" id="form_country" class="v12 width250">
		<?php 
echo list_country($detail["detail_country"]);
?>
		</select></td>
	</tr>
	<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr>
	<tr>
		<td align="right"><?php 
echo $BL['be_profile_label_phone'];
?>
:&nbsp;</td>
		<td colspan="2"><input name="form_fon" type="text" id="form_fon" class="v12 width250" value="<?php 
echo html($detail["detail_fon"]);
?>
" size="30" maxlength="30"></td>
	</tr>
	<tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>