/** * ============================================================ * OVERWRITE HTTP URL QUERY * ============================================================ * * -- CODE: --------------------------------------------------- * * echo HTTP::query('offset', 4); * * ------------------------------------------------------------ * */ public static function query($query = null, $value = 1) { if (is_null($query)) { return Config::get('url_query'); } if (func_num_args() === 2) { $query = array($query => $value); } $query = !empty($query) ? array_merge($_GET, $query) : $_GET; $results = array(); foreach ($query as $k => $v) { if ($v === false || is_array($v)) { // TODO: accept array value unset($_GET[$k]); continue; } $value = $v !== true ? '=' . Text::parse(Converter::str($v), '->encoded_url') : ""; $results[] = $k . $value; } return !empty($results) ? '?' . implode('&', $results) : ""; }
<label class="grid-group"> <span class="grid span-1 form-label"><?php echo $speak->value; ?> </span> <span class="grid span-5"> <?php echo Form::textarea('value', Converter::str(Request::get('value', Guardian::wayback('value', $page->value))), null, array('class' => 'textarea-block')); ?> </span> </label>
/** * ============================================================ * CAPTCHA IMAGE * ============================================================ * * -- CODE: --------------------------------------------------- * * echo Guardian::captcha(); * * ------------------------------------------------------------ * */ public static function captcha($bg = '333333', $color = 'FFFFAA', $width = 100, $height = 30, $padding = 0, $size = 16, $length = 7, $font = 'special-elite-regular.ttf') { $c = array('bg' => $bg !== '333333' ? Converter::str($bg) : false, 'color' => $color !== 'FFFFAA' ? (string) $color : false, 'width' => $width !== 100 ? (int) $width : false, 'height' => $height !== 30 ? (int) $height : false, 'padding' => $padding !== 0 ? (int) $padding : false, 'size' => $size !== 16 ? (int) $size : false, 'length' => $length !== 7 ? (int) $length : false, 'font' => $font !== 'special-elite-regular.ttf' ? (string) $font : false); $param = array(); foreach ($c as $k => $v) { if ($v !== false) { $param[] = $k . '=' . urlencode($v); } } $param = !empty($param) ? '?' . implode('&', $param) : ""; return '<img class="captcha" width="' . ($width + $padding * 2) . '" height="' . ($height + $padding * 2) . '" src="' . Config::get('url') . '/captcha.png' . $param . '" alt="captcha"' . ES; }
$html .= '</span>'; $html .= '</label>'; } else { if ($type === 'e') { $html .= '<label class="grid-group grid-group-editor">'; $html .= '<span class="grid span-2 form-label">' . $title . '</span>'; $html .= '<span class="grid span-4">'; $html .= Form::textarea('fields[' . $key . '][value]', Converter::str(isset($field[$key]) ? $field[$key] : $value['value']), Converter::toText(isset($value['placeholder']) ? $value['placeholder'] : $value['value']), array('class' => array('textarea-block', 'code'))); $html .= '</span>'; $html .= '</label>'; } else { // if($type === 's') { $html .= '<label class="grid-group grid-group-summary">'; $html .= '<span class="grid span-2 form-label">' . $title . '</span>'; $html .= '<span class="grid span-4">'; $html .= Form::textarea('fields[' . $key . '][value]', Converter::str(isset($field[$key]) ? $field[$key] : $value['value']), Converter::toText(isset($value['placeholder']) ? $value['placeholder'] : $value['value']), array('class' => 'textarea-block')); $html .= '</span>'; $html .= '</label>'; } } } } } } } } echo !empty($html) ? $html : Cell::p(Config::speak('notify_empty', strtolower($speak->fields))); } else { echo Cell::p(Config::speak('notify_empty', strtolower($speak->fields))); } Weapon::fire('unit_composer_3_after', array($segment, $fields));
?> </span> <span class="grid span-5"> <?php echo Form::text('placeholder', Converter::toText(Guardian::wayback('placeholder', $file->placeholder)), null, array('class' => 'input-block')); ?> </span> </label> <label class="grid-group"> <span class="grid span-1 form-label"><?php echo $speak->value; ?> </span> <span class="grid span-5"> <?php echo Form::textarea('value', Converter::str(Guardian::wayback('value', $file->value)), null, array('class' => array('textarea-block', 'MTE'))); ?> </span> </label> <label class="grid-group"> <span class="grid span-1 form-label"><?php echo $speak->description; ?> </span> <span class="grid span-5"> <?php echo Form::text('description', Converter::toText(Guardian::wayback('description', $file->description)), Config::speak('manager.placeholder_description_', strtolower($speak->field)), array('class' => 'input-block')); ?> </span> </label> <div class="grid-group">