Example #1
0
 public function file($get)
 {
     if (Router::isPost()) {
         $file = $_FILES['file'];
         if (empty($file['name'])) {
             return new Result('请选择文件', false);
         }
         $url_prefix = Config::get('upload/url');
         $uploader = new Uploader(array('upload_dir' => Config::get('upload/path'), 'file_name_converter' => Config::get('upload/file_name_converter'), 'max_size' => Config::get('upload/max_size'), 'file_type' => Config::get('upload/file_type')));
         $result = $uploader->upload($errors);
         if ($errors) {
             return new Result(array_first($errors));
         }
         return new Result('上传成功', true, array('url' => $url_prefix . $result['file'], 'name' => $result['file'], 'value' => $result['file']));
     }
     return new Result('请选择上传文件');
 }
Example #2
0
echo $this->getUrl('BusinessOrderNote/update', array('business_order_id' => $order->id));
?>
" rel="popup" data-width="730">添加</a>
		</h3>
		<table class="data-tbl" data-empty-fill="1">
			<thead>
				<?php 
if ($note_list) {
    ?>
				<tr>
					<?php 
    $this->walkDisplayProperties(function ($alias, $value, $field) {
        if ($field != 'business_order_id') {
            echo "<th>{$alias}</th>";
        }
    }, array_first($note_list));
    ?>
					<th style="width:60px">操作</th>
				</tr>
				<?php 
}
?>
			</thead>
			<tbody>
				<?php 
foreach ($note_list as $item) {
    ?>
				<tr>
					<?php 
    $this->walkDisplayProperties(function ($alias, $value, $field) {
        if ($field != 'business_order_id') {
Example #3
0
}
?>
                    </select>
                </div>
            </div>
			<div class="step-col">
				<label>
					数据库表:
				</label>
				<div class="c">
					<select name="" size="10" multiple="multiple">
                        <?php 
foreach ($table_list as $t) {
    ?>
						<option value=""><?php 
    echo array_first($t);
    ?>
</option>
                        <?php 
}
?>
					</select>
				</div>
			</div>
			<div class="step-col">
				<label>TableModel:</label>
				<div class="c">
					<input type="text" name="">
				</div>
				<div class="c">
					<label>
Example #4
0
echo $this->getUrl('Sample/searchSingleSample', array('id' => $sample->id));
?>
" rel="popup-refresh">新增</a></h3>
		<table class="data-tbl" data-empty-fill="1">
			<thead>
			<?php 
if ($sample_list) {
    ?>
				<tr>
					<th>图片</th>
					<?php 
    $this->walkDisplayProperties(function ($alias, $value, $field) {
        if ($field != 'sample_id') {
            echo "<th>{$alias}</th>";
        }
    }, array_first($sample_list));
    ?>
					<th style="width:60px">操作</th>
				</tr>
			<?php 
}
?>
			</thead>
			<tbody>
			<?php 
/** @var SampleMould $sample */
foreach ($sample_list as $item) {
    ?>
				<tr>
					<td><?php 
    echo $this->displayField('first_image_src', $item);
Example #5
0
echo $this->getUrl('SampleMould/update', array('sample_id' => $sample->id));
?>
" rel="popup">新增</a></h3>
		<table class="data-tbl" data-empty-fill="1">
			<thead>
			<?php 
/** @var SampleMould $mould */
if ($mould_list) {
    ?>
				<tr>
					<?php 
    $this->walkDisplayProperties(function ($alias, $value, $field) {
        if ($field != 'sample_id') {
            echo "<th>{$alias}</th>";
        }
    }, array_first($mould_list));
    ?>
					<th style="width:60px">操作</th>
				</tr>
			<?php 
}
?>
			</thead>
			<tbody>
			<?php 
/** @var SampleMould $mould */
foreach ($mould_list as $mould) {
    ?>
				<tr>
					<?php 
    $this->walkDisplayProperties(function ($alias, $value, $field) {