Exemple #1
0
    });
    # 字典管理
    Route::group(array('prefix' => 'dicts'), function () {
        $controller = 'AdminDictController@';
        Route::get('/', array('as' => 'dicts.index', 'uses' => $controller . 'index'));
        Route::get('/tables', array('as' => 'dicts.dataTables', 'uses' => $controller . 'dataTables'));
        Route::post('/store', array('as' => 'dicts.store', 'uses' => $controller . 'store'));
    });
});
/*
|--------------------------------------------------------------------------
| Common
|--------------------------------------------------------------------------
*/
Route::any('/captcha', function () {
    if (Request::getMethod() == 'POST') {
        $rules = array('captcha' => array('required', 'captcha'));
        $validator = Validator::make(Input::all(), $rules);
        if ($validator->fails()) {
            echo '<p style="color: #ff0000;">Incorrect!</p>';
        } else {
            echo '<p style="color: #00ff30;">Matched :)</p>';
        }
    }
    $content = Form::open(array(URL::to(Request::segment(1))));
    $content .= '<p>' . HTML::image(Captcha::img(), 'Captcha image') . '</p>';
    $content .= '<p>' . Form::text('captcha') . '</p>';
    $content .= '<p>' . Form::submit('Check') . '</p>';
    $content .= '<p>' . Form::close() . '</p>';
    return $content;
});
 /**
  * create new captcha image and display it alone
  *
  * @return Illuminate\Http\Response
  */
 public function newCaptcha()
 {
     $response = Response::make(HTML::image(Captcha::img(), 'Captcha image'));
     $response->header('Content-Type', 'image/png');
     return $response;
 }
                            <?php 
echo $errors->first('email');
?>
                        </p>
                        <div class="form-group">
                            <span class="icons-sprite icons-account"></span>
                            <input name="email" type="text" placeholder="请输入注册邮箱">
                        </div>
                        <div class="form-group">
                            <span class="icons-sprite icons-password"></span>
                            <input autocomplete="off" name="captcha" type="text" placeholder="请输入验证码">
                        </div>
                        <div class="form-group box-form-tools">
                            <div>
                                <?php 
echo HTML::image(Captcha::img(), '验证码', array('id' => 'captcha'));
?>
                            </div>
                            <a href="#" ms-click="changeCaptcha">看不清,换一张!</a>
                        </div>
                        <div class="form-group box-form-buttons">
                            <button type="submit">提交</button>
                            <a href="/">返回网站</a>
                        </div>
                    </div>
                </form>
            </td>
        </tr>
    </table>
    <script>
        var vm = avalon.define({
Exemple #4
0
		<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d492.3484785570445!2d35.51444356651267!3d33.88675468437674!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMzPCsDUzJzEyLjEiTiAzNcKwMzAnNTMuMCJF!5e0!3m2!1sen!2s!4v1446459647170" class="hidden-xs hidden-sm" width="600" height="450" style="border:0" allowfullscreen></iframe>
		<div class="row">
			<h2>When can we visit you ?</h2>
            <div class="form-group contact-form">
                <div class='input-group date' id='datetimepicker'>
                    <input type='text' class="form-control" name="date_client" style="margin-bottom:0;"/>
                    <span class="input-group-addon" style="float:none; background-color: transparent; border-color:#eee">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
		</div>
		<div class="row">
			<h2>One last step to make sure you're human !</h2>
			<div class="form-group contact-form" style="width: 240px;">
		        <img src="<?php 
echo Captcha::img();
?>
" alt='Captcha image'>
			    <input type='text' class="form-control" placeholder="Type the above code" name="captcha"/>
			</div>		
		</div><br><br><br>
		<div class="row contact-form">
			<button name="submit_form" type="submit" class="green-btn btn btn-primary">Submit Request</button>
		</div>
	</div>
  {{ Form:: close() }}

</div>

@stop