本文整理汇总了PHP中label函数的典型用法代码示例。如果您正苦于以下问题:PHP label函数的具体用法?PHP label怎么用?PHP label使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了label函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ips
/**
* widget function
* works for select menus and some input fields
* @param string $title
* @param string $function
* @param string $name
* @param string $value
* @param string $attr
* @param string $type
* @param string $subtitle
* @param string $req
* @param string $tag
* @param string $tag_attr
* @param string $extra
* @param string $afterwards
* @return string
* @author edited by Peng Wang <[email protected]>
*/
function ips($title, $function, $name, $value = '', $attr = '', $type = '', $subtitle = '', $req = '', $tag = '', $tag_attr = '', $extra = '', $afterwards = '')
{
$OBJ =& get_instance();
global $error_msg, $go;
// set a default
// we might want div later
if (!$tag) {
$tag = 'label';
}
$tag_attr ? $tag_attr = "{$tag_attr}" : ($tag_attr = '');
$OBJ->access->prefs['user_help'] == 1 ? $help = showHelp($title) : ($help = '');
$afterwards ? $afterwards = $afterwards : ($afterwards = '');
if (isset($error_msg[$name])) {
$msg = span($error_msg[$name], "class='error'");
} else {
$msg = null;
}
$subtitle ? $subtitle = span($subtitle, "class='small-txt'") : ($subtitle = '');
$title ? $title = label($title . ' ' . $subtitle . ' ' . $help . $msg) : ($title = '');
$req ? $req = showerror($msg) : ($req = '');
$extra ? $add = $extra : ($add = '');
$value = showvalue($name, $value);
if ($function === 'input') {
$function = input($name, $type, attr($attr), $value);
} else {
$function ? $function = $function($value, $name, attr($attr), $add) : ($function = null);
}
return $title . "\n" . $function;
}
开发者ID:WurdahMekanik,项目名称:hlf-ndxz,代码行数:47,代码来源:html.php
示例2: ctrl_input_field
function ctrl_input_field($errors, $inputType, $isRequired, $name, $labelText, $className, $originalValue = null)
{
$divClassName;
if ('REQUIRED' == $isRequired) {
$divClassName = 'requiredField';
} else {
$divClassName = 'optionalField';
}
echo "<div class = '{$divClassName}'>";
$value;
if (sent_value($name) != null) {
$value = sent_value($name);
} else {
$value = $originalValue;
}
if ('hidden' != $inputType) {
//checkboxes look better if the box is on the left
if ('checkbox' != $inputType) {
label($name, $labelText);
echo "<input type =\"{$inputType}\" id = \"{$name}\" name = \"{$name}\" value = \"{$value}\" class = \"{$className}\"/>";
} else {
echo "<input type =\"{$inputType}\" id = \"{$name}\" name = \"{$name}\" value = \"{$value}\" class = \"{$className}\"/>";
label($name, $labelText);
}
error_label($errors, $name);
} else {
//hidden fields don't have labels or error labels
echo "<input type =\"{$inputType}\" id = \"{$name}\" name = \"{$name}\" value = \"{$value}\" class = \"{$className}\"/>";
}
echo '</div>';
}
开发者ID:sagarb09,项目名称:Property-Management-Application,代码行数:31,代码来源:formControls.php
示例3: tablaDescarga
public function tablaDescarga()
{
if (isset($_POST['miHtml'])) {
$htmlEntrada = $_POST['miHtml'];
$titulo = $_POST['titulo'];
$str = $htmlEntrada;
$table = str_get_html($str);
$rowData = array();
foreach ($table->find('tr') as $row) {
// initialize array to store the cell data from each row
$flight = array();
foreach ($row->find('td') as $cell) {
// push the cell's text to the array
$flight[] = trim($cell->plaintext);
}
$rowData[] = $flight;
}
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
// date_default_timezone_set('Europe/London');
if (PHP_SAPI == 'cli') {
die('This example should only be run from a Web Browser');
}
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator(label('nombreSistema'))->setLastModifiedBy(label('nombreSistema'));
// ->setSubject("Prueba de descarga de tabla de personas")
// ->setDescription("Documento de prueba de descarga de tabla de excel desde PHP")
// ->setKeywords("office 2007 openxml php")
// ->setCategory("Documento de prueba");
$hoja = $objPHPExcel->getSheet(0);
$hoja->setTitle($titulo);
$hoja->fromArray($rowData, '', 'A1');
$cantidadColumnas = count(array_shift($rowData));
$abcd = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's');
$ultimaColumna = $abcd[$cantidadColumnas - 1];
$header = 'a1:' . $ultimaColumna . '1';
$hoja->getStyle($header)->getFill()->setFillType(\PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB('FFFFFF00');
$style = array('font' => array('bold' => true), 'alignment' => array('horizontal' => \PHPExcel_Style_Alignment::HORIZONTAL_CENTER));
$hoja->getStyle($header)->applyFromArray($style);
for ($col = ord('a'); $col <= ord('z'); $col++) {
$hoja->getColumnDimension(chr($col))->setAutoSize(true);
}
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $titulo . '.xls"');
header('Cache-Control: max-age=0');
header('Cache-Control: max-age=1');
// header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
// always modified
header('Cache-Control: cache, must-revalidate');
// HTTP/1.1
header('Pragma: public');
// HTTP/1.0
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
}
}
开发者ID:brayanNunez,项目名称:touch,代码行数:59,代码来源:ManejadorExcel.php
示例4: uriboot
function uriboot($label, $uri, $args)
{
label($label);
echo " kernel " . $uri . "\n";
if ($args) {
echo " append " . $args . "\n";
}
}
开发者ID:xtha,项目名称:salt,代码行数:8,代码来源:boot.php
示例5: render_meta_box
function render_meta_box($post)
{
$templates = Template::getTodosArray();
$select = input_select_simples('id_template', "Template de Evento", $templates);
echo label("template", "Template de Evento", $select);
$input = input_texto_simples('post_title', 'Título do Evento', 30);
echo label("titulo", "Título do Evento", $input);
}
开发者ID:TiagoGouvea,项目名称:event-manager-plugin-wordpress,代码行数:8,代码来源:AdminEvento_NovoEvento.php
示例6: message
/**
* Created by PhpStorm.
* User: Shunichiro AKI
* Date: 2015/09/18
* Time: 23:19
*/
function message($id, $transParameters = [], $rawParameters = [])
{
$mergeParameters = [];
foreach ($transParameters as $key => $value) {
$mergeParameters[$key] = label($value);
}
$mergeParameters += $rawParameters;
return trans('messages.' . $id, $mergeParameters);
}
开发者ID:nana4rider,项目名称:mdiary,代码行数:15,代码来源:helper.php
示例7: add_field
function add_field($f, $id, $label = "", $req = false, $class = "", $type = "text")
{
$in = make_tag("input", $class);
$in["attribs"]["type"] = $type;
$in["attribs"]["id"] = $id;
$in["attribs"]["name"] = $id;
$in["attribs"]["placeholder"] = $label;
!$req || ($in["attribs"]["required"] = "");
$f["children"][] = label($id, $label);
$f["children"][] = $in;
return $f;
}
开发者ID:AdeelH,项目名称:reddit-clone,代码行数:12,代码来源:html_funcs.php
示例8: compile
private function compile(array $tokens)
{
$cg = (object) ['ts' => TokenStream::fromSlice($tokens), 'parsers' => []];
traverse(rtoken('/^(T_\\w+)·(\\w+)$/')->onCommit(function (Ast $result) use($cg) {
$token = $result->token();
$id = $this->lookupCapture($token);
$type = $this->lookupTokenType($token);
$cg->parsers[] = token($type)->as($id);
}), ($parser = chain(rtoken('/^·\\w+$/')->as('type'), token('('), optional(ls(either(future($parser)->as('parser'), chain(token(T_FUNCTION), parentheses()->as('args'), braces()->as('body'))->as('function'), string()->as('string'), rtoken('/^T_\\w+·\\w+$/')->as('token'), rtoken('/^T_\\w+$/')->as('constant'), rtoken('/^·this$/')->as('this'), label()->as('label'))->as('parser'), token(',')))->as('args'), commit(token(')')), optional(rtoken('/^·\\w+$/')->as('label'), null)))->onCommit(function (Ast $result) use($cg) {
$cg->parsers[] = $this->compileParser($result->type, $result->args, $result->label);
}), $this->layer('{', '}', braces(), $cg), $this->layer('[', ']', brackets(), $cg), $this->layer('(', ')', parentheses(), $cg), rtoken('/^···(\\w+)$/')->onCommit(function (Ast $result) use($cg) {
$id = $this->lookupCapture($result->token());
$cg->parsers[] = layer()->as($id);
}), token(T_STRING, '·')->onCommit(function (Ast $result) use($cg) {
$offset = \count($cg->parsers);
if (0 !== $this->dominance || 0 === $offset) {
$this->fail(self::E_BAD_DOMINANCE, $offset, $result->token()->line());
}
$this->dominance = $offset;
}), rtoken('/·/')->onCommit(function (Ast $result) {
$token = $result->token();
$this->fail(self::E_BAD_CAPTURE, $token, $token->line());
}), any()->onCommit(function (Ast $result) use($cg) {
$cg->parsers[] = token($result->token());
}))->parse($cg->ts);
// check if macro dominance '·' is last token
if ($this->dominance === \count($cg->parsers)) {
$this->fail(self::E_BAD_DOMINANCE, $this->dominance, $cg->ts->last()->line());
}
$this->specificity = \count($cg->parsers);
if ($this->specificity > 1) {
if (0 === $this->dominance) {
$pattern = chain(...$cg->parsers);
} else {
/*
dominat macros are partially wrapped in commit()s and dominance
is the offset used as the 'event horizon' point... once the entry
point is matched, there is no way back and a parser error arises
*/
$prefix = array_slice($cg->parsers, 0, $this->dominance);
$suffix = array_slice($cg->parsers, $this->dominance);
$pattern = chain(...array_merge($prefix, array_map(commit::class, $suffix)));
}
} else {
/*
micro optimization to save one function call for every token on the subject
token stream whenever the macro pattern consists of a single parser
*/
$pattern = $cg->parsers[0];
}
return $pattern;
}
开发者ID:lastguest,项目名称:yay,代码行数:52,代码来源:Pattern.php
示例9: echolabel
function echolabel($blockarr, $theblcokvalue)
{
if (!empty($blockarr) && is_array($blockarr)) {
foreach ($blockarr as $bkey => $bvalue) {
if (!isset($bvalue['alang'])) {
$bvalue['alang'] = '';
}
if (!isset($bvalue['options'])) {
$bvalue['options'] = array();
}
if (!isset($bvalue['other'])) {
$bvalue['other'] = '';
}
if (!isset($bvalue['text'])) {
$bvalue['text'] = '';
}
if (!isset($bvalue['check'])) {
$bvalue['check'] = '';
}
if (!isset($bvalue['radio'])) {
$bvalue['radio'] = '';
}
if (!isset($bvalue['size'])) {
$bvalue['size'] = '';
}
if (!isset($theblcokvalue[$bkey])) {
$theblcokvalue[$bkey] = '';
}
if (!isset($bvalue['width'])) {
$bvalue['width'] = '';
}
$labelarr = array('type' => $bvalue['type'], 'alang' => $bvalue['alang'], 'name' => $bkey, 'size' => $bvalue['size'], 'text' => $bvalue['text'], 'check' => $bvalue['check'], 'radio' => $bvalue['radio'], 'options' => $bvalue['options'], 'other' => $bvalue['other'], 'width' => $bvalue['width'], 'value' => $theblcokvalue[$bkey]);
if ($bkey == 'order') {
if (!isset($theblcokvalue['order'])) {
$theblcokvalue['order'] = '';
}
if (!isset($theblcokvalue['sc'])) {
$theblcokvalue['sc'] = '';
}
$labelarr['order'] = $theblcokvalue['order'];
$labelarr['sc'] = $theblcokvalue['sc'];
}
echo label($labelarr);
}
}
}
开发者ID:cwcw,项目名称:cms,代码行数:46,代码来源:admin.func.php
示例10: typeAsLabel
public function typeAsLabel()
{
// Grab the type
$type = $this->type();
switch ($type) {
case 'info':
$content = "Info";
break;
case 'warning':
$content = "Warning";
break;
case 'danger':
$content = "Critical";
break;
}
return label($type, $content);
}
开发者ID:anodyne,项目名称:xtras,代码行数:17,代码来源:ItemMessagePresenter.php
示例11: getValidatorInstance
/**
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function getValidatorInstance()
{
$validator = parent::getValidatorInstance();
// 写真のバリデーション
$validator->each('picture', 'image');
$pictureKeys = $this->getPictureKeys();
$attributeNames = [];
foreach ($pictureKeys as $key) {
$attributeNames['picture.' . $key] = label('picture');
}
$validator->setAttributeNames($attributeNames);
$validator->after(function ($validator) use(&$pictureKeys) {
$messages = $validator->messages();
foreach ($pictureKeys as $key) {
if ($messages->has('picture.' . $key)) {
// BootFormで表示できるよう、pictureにメッセージをコピー
$validator->errors()->add('picture', $messages->first('picture.' . $key));
return;
}
}
});
return $validator;
}
开发者ID:nana4rider,项目名称:mdiary,代码行数:26,代码来源:TextDiaryUpsertRequest.php
示例12: label
<h2>Envio de SMS</h2>
<form method="post">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<div class="postbox-container">
<div class="postbox">
<h3 class="hndle"><span><?php
echo $titulo;
?>
</span></h3>
<div class="inside">
<form method="post" action="">
<?php
echo label('mensagem', 'Mensagem', input_textarea_simples('mensagem', 2, ''), "Variáveis disponíveis para utilização:<br>" . getVariaveis($event));
?>
</div>
<div id="major-publishing-actions">
<div id="publishing-action">
<span class="spinner"></span>
<input type="submit" name="publish" id="publish" class="button button-primary button-large" value="Enviar" accesskey="p"></div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>
开发者ID:TiagoGouvea,项目名称:event-manager-plugin-wordpress,代码行数:31,代码来源:form_sms.php
示例13: label
</p>
</div>
<div id="botonEliminar" class="modal-footer black-text">
<a href="" class="waves-effect waves-red btn-flat modal-action modal-close"><?php
echo label('aceptar');
?>
</a>
</div>
</div>
<div id="eliminarFase" class="modal">
<div class="modal-header">
<p><?php
echo label('nombreSistema');
?>
</p>
<a class="modal-action modal-close cerrar-modal"><i class="mdi-content-clear"></i></a>
</div>
<div class="modal-content">
<p><?php
echo label('confirmarEliminarFase');
?>
</p>
</div>
<div id="botonEliminar" class="modal-footer black-text">
<a href="" class="waves-effect waves-red btn-flat modal-action modal-close"><?php
echo label('aceptar');
?>
</a>
</div>
</div>
<!-- Fin lista modals -->
开发者ID:brayanNunez,项目名称:touch,代码行数:31,代码来源:servicios_editar.php
示例14: strtoupper
<?php
$string = "<!-- Main content -->\n <section class='content'>\n <div class='row'>\n <div class='col-xs-12'>\n <div class='box'>\n <div class='box-header'>\n \n <h3 class='box-title'>" . strtoupper($table_name) . "</h3>\n <div class='box box-primary'>";
$string .= "\n <form action=\"<?php echo \$action; ?>\" method=\"post\">";
$string .= "<table class='table table-bordered'>";
foreach ($non_pk as $row) {
if ($row["data_type"] == 'text') {
$string .= "\n\t <tr><td>" . label($row["column_name"]) . " <?php echo form_error('" . $row["column_name"] . "') ?></td>\n <td><textarea class=\"form-control\" rows=\"3\" name=\"" . $row["column_name"] . "\" id=\"" . $row["column_name"] . "\" placeholder=\"" . label($row["column_name"]) . "\"><?php echo \$" . $row["column_name"] . "; ?></textarea>\n </td></tr>";
} else {
$string .= "\n\t <tr><td>" . label($row["column_name"]) . " <?php echo form_error('" . $row["column_name"] . "') ?></td>\n <td><input type=\"text\" class=\"form-control\" name=\"" . $row["column_name"] . "\" id=\"" . $row["column_name"] . "\" placeholder=\"" . label($row["column_name"]) . "\" value=\"<?php echo \$" . $row["column_name"] . "; ?>\" />\n </td>";
}
}
$string .= "\n\t <input type=\"hidden\" name=\"" . $pk . "\" value=\"<?php echo \$" . $pk . "; ?>\" /> ";
$string .= "\n\t <tr><td colspan='2'><button type=\"submit\" class=\"btn btn-primary\"><?php echo \$button ?></button> ";
$string .= "\n\t <a href=\"<?php echo site_url('" . $c_url . "') ?>\" class=\"btn btn-default\">Cancel</a></td></tr>";
$string .= "\n\t\n </table></form>\n </div><!-- /.box-body -->\n </div><!-- /.box -->\n </div><!-- /.col -->\n </div><!-- /.row -->\n </section><!-- /.content -->";
$hasil_view_form = createFile($string, $target . "views/" . $v_form_file);
开发者ID:nurisakbar,项目名称:racode,代码行数:17,代码来源:create_view_form.php
示例15: label
</li>
<li class="li-hover">
<div class="divider"></div>
</li>
<?php
if ($rolCotizador) {
?>
<li class="li-hover"><p class="ultra-small margin more-text"><?php
echo label('masOpciones');
?>
</p></li>
<li>
<a href="<?php
echo base_url();
?>
cotizacion/cotizar">
<i class="mdi-action-swap-vert-circle"></i><?php
echo label('agregarCotizacion');
?>
</a>
</li>
<?php
}
?>
</ul>
<a href="#" class="sidebar-collapse btn-floating btn-medium waves-effect waves-light hide-on-large-only darken-2"
data-activates="slide-out">
<i class="mdi-navigation-menu"></i>
</a>
</aside>
<!-- END LEFT SIDEBAR NAV-->
开发者ID:brayanNunez,项目名称:touch,代码行数:31,代码来源:left-sidebar.php
示例16: alert
case '0'://Error en la transacción
alert('<?php
echo label('login_errorTransaccion');
?>
');
break;
case '1'://no existe
$('#mensajeValidacion').text('<?php
echo label('login_usuarioNoExiste');
?>
');
// alert(response);
break;
case '2'://si existe pero contrasena mala
$('#mensajeValidacion').text('<?php
echo label('login_contrasenaIncorrecta');
?>
');
// alert(response);
break;
case '3'://correcto
// $('#mensajeValidacion').text('correcto');
// alert('login en prueba');
<?php
if (isset($urlInicial)) {
?>
window.location.href = "<?php
echo $urlInicial;
?>
";
<?php
开发者ID:brayanNunez,项目名称:touch,代码行数:31,代码来源:footer_2.php
示例17: text2text
return $text ? 'true' : 'false';
}
function text2text($text)
{
return $text ? $text : 'false';
}
function js2bool2text($function)
{
return '<script type="text/javascript">
document.write(' . $function . '() ? "true" : "false");
</script>';
}
function js2text($function)
{
return '<script type="text/javascript">
var t;
if(t = ' . $function . '())
document.write(t);
else
document.write("false");
</script>';
}
echo HTML_Decorator::html_start()->render();
echo Site_Decorator::head()->set_title('MWF About')->render();
echo HTML_Decorator::body_start()->render();
echo Site_Decorator::header()->set_title('MWF Device')->render();
echo Site_Decorator::content_full()->set_padded()->add_header('The Framework')->add_subheader('Server Info')->add_section(label('User Agent') . $_SERVER['HTTP_USER_AGENT'])->add_section(label('IP Address') . $_SERVER['REMOTE_ADDR'])->add_subheader('JS Classification')->add_section(label('mwf.classification.isMobile()') . js2bool2text('mwf.classification.isMobile'))->add_section(label('mwf.classification.isBasic()') . js2bool2text('mwf.classification.isBasic'))->add_section(label('mwf.classification.isStandard()') . js2bool2text('mwf.classification.isStandard'))->add_section(label('mwf.classification.isFull()') . js2bool2text('mwf.classification.isFull'))->add_section(label('mwf.classification.isOverride()') . js2bool2text('mwf.classification.isOverride'))->add_section(label('mwf.classification.isPreview()') . js2bool2text('mwf.classification.isPreview'))->add_subheader('PHP Classification')->add_section(label('Classification::is_mobile()') . bool2text(Classification::is_mobile()))->add_section(label('Classification::is_basic()') . bool2text(Classification::is_basic()))->add_section(label('Classification::is_standard()') . bool2text(Classification::is_standard()))->add_section(label('Classification::is_full()') . bool2text(Classification::is_full()))->add_section(label('Classification::is_override()') . bool2text(Classification::is_override()))->add_section(label('Classification::is_preview()') . bool2text(Classification::is_preview()))->add_subheader('JS User Agent')->add_section(label('mwf.userAgent.getOS()') . js2text('mwf.userAgent.getOS'))->add_section(label('mwf.userAgent.getOSVersion()') . js2text('mwf.userAgent.getOSVersion'))->add_section(label('mwf.userAgent.getBrowser()') . js2text('mwf.userAgent.getBrowser'))->add_section(label('mwf.userAgent.getBrowserEngine()') . js2text('mwf.userAgent.getBrowserEngine'))->add_section(label('mwf.userAgent.getBrowserEngineVersion()') . js2text('mwf.userAgent.getBrowserEngineVersion'))->add_subheader('PHP User Agent')->add_section(label('User_Agent::get_os()') . text2text(User_Agent::get_os()))->add_section(label('User_Agent::get_os_version()') . text2text(User_Agent::get_os_version()))->add_section(label('User_Agent::get_browser()') . text2text(User_Agent::get_browser()))->add_section(label('User_Agent::get_browser_engine()') . text2text(User_Agent::get_browser_engine()))->add_section(label('User_Agent::get_browser_engine_version()') . text2text(User_Agent::get_browser_engine_version()))->add_subheader('JS Screen')->add_section(label('mwf.screen.getHeight()') . js2text('mwf.screen.getHeight'))->add_section(label('mwf.screen.getWidth()') . js2text('mwf.screen.getWidth'))->add_section(label('mwf.screen.getPixelRatio()') . js2text('mwf.screen.getPixelRatio'))->add_subheader('PHP Screen')->add_section(label('Screen::get_height()') . text2text(Screen::get_height()))->add_section(label('Screen::get_width()') . text2text(Screen::get_width()))->add_section(label('Screen::get_pixel_ratio()') . text2text(Screen::get_pixel_ratio()))->render();
echo Site_Decorator::button_full()->set_padded()->add_option(Config::get('global', 'back_to_home_text'), Config::get('global', 'site_url'))->render();
echo Site_Decorator::default_footer()->render();
echo HTML_Decorator::body_end()->render();
echo HTML_Decorator::html_end()->render();
开发者ID:nateemerson,项目名称:mwf,代码行数:31,代码来源:device.php
示例18: label
</label>
</div>
<div class="input-field col s12">
<input id="impuesto_valor" name="impuesto_valor" type="number">
<label for="impuesto_valor"><?php
echo label('formImpuesto_valor');
?>
</label>
<span class="icono-porcentaje-descuento">%</span>
</div>
</div>
<div class="row">
<!--<a style="font-size: larger;float: left;text-decoration: underline;"
class="modal-action modal-close"><?php
echo label('cancelar');
?>
</a>-->
<a onclick="$(this).closest('form').submit()" class="waves-effect btn modal-action" style="margin: 0 20px;">
<?php
echo label('impuesto_guardarCambios');
?>
</a>
</div>
</div>
</form>
</div>
<!-- Fin lista modals -->
开发者ID:brayanNunez,项目名称:touch,代码行数:31,代码来源:impuesto_lista.php
示例19: alert
var name = file.name;
var size = file.size;
var type = file.type;
var t = type.split('/');
var ext = t.slice(1, 2);
if(size > 2097150) { //2097152
alert("<?php
echo label('usuarioErrorTamanoArchivo');
?>
");
document.getElementById('userfile').value = '';
}
var valid_ext = ['image/png','image/jpg','image/jpeg'];
if(valid_ext.indexOf(type)==-1) {
alert("<?php
echo label('usuarioErrorTipoArchivo');
?>
");
document.getElementById('userfile').value = '';
}
if(document.getElementById('userfile').value == ''){
$('#imagen_seleccionada').attr('src', '<?php
echo base_url();
?>
files/default-user-image.png');
} else {
$('#usuario_fotografia').attr('value', ext);
readURL(this);
}
});
</script>
开发者ID:brayanNunez,项目名称:touch,代码行数:31,代码来源:proveedores_editar.php
示例20: rawurlencode
}
if ($value['formtype'] == 'file') {
$fileurl = S_URL . '/batch.modeldownload.php?hash=' . rawurlencode(authcode($nameid . ',' . $item[$value['fieldname']], 'ENCODE'));
} else {
$fileurl = A_URL . '/' . $item[$value['fieldname']];
}
if (preg_match("/^(img|flash|file)\$/i", $value['formtype'])) {
$value['formtype'] = 'file';
}
if ($op == "add") {
$valued = $value['fielddefault'];
} else {
$valued = $item[$value['fieldname']];
}
if ($value['formtype'] != 'timestamp') {
$htmlarr[$value['id']]['input'] = label(array('type' => $value['formtype'], 'alang' => $value['fieldcomment'], 'name' => $value['fieldname'], 'options' => $temparr2, 'rows' => 10, 'width' => '30%', 'size' => '60', 'value' => $valued, 'other' => $other, 'fileurl' => $fileurl), 0);
} else {
$item[$value['fieldname']] = sgmdate($item[$value['fieldname']]);
$htmlarr[$value['id']]['input'] = <<<EOF
\t\t\t<input type="text" name="{$value['fieldname']}" id="{$value['fieldname']}" readonly="readonly" value="{$item[$value['fieldname']]}" /><img src="{$siteurl}/admin/images/time.gif" onClick="getDatePicker('{$value['fieldname']}', event, 21)" />
EOF;
}
}
} elseif ($op == 'view') {
if (empty($_SGLOBAL['supe_uid'])) {
showmessage('no_permission');
}
$item['subject'] = shtmlspecialchars($item['subject']);
if (!empty($item['subjectimage'])) {
$fileext = fileext($item['subjectimage']);
$item['subjectimage'] = $item['subjectthumb'] = A_URL . '/' . $item['subjectimage'];
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:cp_ebook.php
注:本文中的label函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论