54 if(!is_array($extra_keys) || count($extra_keys) < 1)
59 foreach($extra_keys as $val)
61 $obj =
new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid);
62 $this->keys[$val->idx] =
$obj;
212 return htmlspecialchars(
$value, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false);
219 elseif(strpos(
$value,
'|@|') !== FALSE)
221 $values = explode(
'|@|',
$value);
223 elseif(strpos(
$value,
',') !== FALSE)
225 $values = explode(
',',
$value);
228 $values = array_values($values);
229 for($i = 0, $c = count($values); $i < $c; $i++)
231 $values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
242 elseif(strpos(
$value,
'|@|') !== FALSE)
244 $values = explode(
'|@|',
$value);
246 elseif(strpos(
$value,
',') !== FALSE)
248 $values = explode(
',',
$value);
255 $values = array_values($values);
256 for($i = 0, $c = count($values); $i < $c; $i++)
258 $values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
267 elseif(strpos(
$value,
'|@|') !==
false)
269 $values = explode(
'|@|',
$value);
276 $values = array_values($values);
277 for($i = 0, $c = count($values); $i < $c; $i++)
279 $values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
288 return htmlspecialchars(
$value, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false);
316 case 'email_address' :
333 return implode(
',',
$value);
340 return implode(
' ',
$value);
357 static $id_num = 1000;
364 $tmp_id = $column_name .
'-' . $id_num++;
371 $buff[] =
'<input type="text" name="' . $column_name .
'" value="' .
$value .
'" class="homepage" />';
374 case 'email_address' :
375 $buff[] =
'<input type="text" name="' . $column_name .
'" value="' .
$value .
'" class="email_address" />';
379 $buff[] =
'<input type="text" name="' . $column_name .
'[]" value="' .
$value[0] .
'" size="4" maxlength="4" class="tel" />';
380 $buff[] =
'<input type="text" name="' . $column_name .
'[]" value="' .
$value[1] .
'" size="4" maxlength="4" class="tel" />';
381 $buff[] =
'<input type="text" name="' . $column_name .
'[]" value="' .
$value[2] .
'" size="4" maxlength="4" class="tel" />';
385 $buff[] =
'<textarea name="' . $column_name .
'" rows="8" cols="42">' .
$value .
'</textarea>';
395 $checked =
' checked="checked"';
399 $tmp_id = $column_name .
'-' . $id_num++;
401 $buff[] =
' <li><input type="checkbox" name="' . $column_name .
'[]" id="' . $tmp_id .
'" value="' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false) .
'" ' . $checked .
' /><label for="' . $tmp_id .
'">' . $v .
'</label></li>';
407 $buff[] =
'<select name="' . $column_name .
'" class="select">';
413 $selected =
' selected="selected"';
415 $buff[] =
' <option value="' . $v .
'" ' . $selected .
'>' . $v .
'</option>';
417 $buff[] =
'</select>';
427 $checked =
' checked="checked"';
431 $tmp_id = $column_name .
'-' . $id_num++;
433 $buff[] =
'<li><input type="radio" name="' . $column_name .
'" id="' . $tmp_id .
'" ' . $checked .
' value="' . $v .
'" class="radio" /><label for="' . $tmp_id .
'">' . $v .
'</label></li>';
442 $buff[] =
'<input type="hidden" name="' . $column_name .
'" value="' .
$value .
'" />';
443 $buff[] =
'<input type="text" id="date_' . $column_name .
'" value="' .
zdate(
$value,
'Y-m-d') .
'" class="date" />';
444 $buff[] =
'<input type="button" value="' .
Context::getLang(
'cmd_delete') .
'" class="btn" id="dateRemover_' . $column_name .
'" />';
445 $buff[] =
'<script type="text/javascript">';
446 $buff[] =
'//<![CDATA[';
447 $buff[] =
'(function($){';
448 $buff[] =
'$(function(){';
449 $buff[] =
' var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\'-100:+10\', onSelect:function(){';
450 $buff[] =
' $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}';
453 $buff[] = ' $(
"#date_' . $column_name . '").datepicker(option);
';
454 $buff[] = ' $(
"#date_' . $column_name . '").datepicker(
"option",
"dateFormat",
"yy-mm-dd");
';
455 $buff[] = ' $(
"#dateRemover_' . $column_name . '").click(
function(){
';
456 $buff[] = ' $(
this).siblings(
"input").val(
"");
';
457 $buff[] = ' return false;
';
460 $buff[] = '})(jQuery);
';
462 $buff[] =
'</script>';
466 if(($oKrzipModel =
getModel(
'krzip')) && method_exists($oKrzipModel ,
'getKrzipCodeSearchHtml' ))
468 $buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name,
$value);
473 $buff[] =
' <input type="text" name="' . $column_name .
'" value="' . (
$value ?
$value :
$default) .
'" class="text" />';
479 $buff[] =
'<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false) .
'</p>';
482 return join(PHP_EOL, $buff);
getController($module_name)
zdate($str, $format= 'Y-m-d H:i:s', $conversion=TRUE)
loadJavascriptPlugin($plugin_name)