本文整理汇总了PHP中Constants::get_create_address方法的典型用法代码示例。如果您正苦于以下问题:PHP Constants::get_create_address方法的具体用法?PHP Constants::get_create_address怎么用?PHP Constants::get_create_address使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constants
的用法示例。
在下文中一共展示了Constants::get_create_address方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_index
/**
* @author Thuanth6589 <thuanth6589@seta-asia.com.vn>
* action create/update ss
*/
public function action_index()
{
$ss_id = Input::get('ss_id');
$filter_group = $this->filter_group;
$data_filter['field'] = $filter_group;
if (isset($ss_id)) {
$ss = \Model_Mss::find_by_pk($ss_id);
if (!isset($ss)) {
Session::set_flash('error', 'SSは存在しません');
return Response::redirect('/master/sslist');
}
$data['ss'] = $ss;
$data['json'] = $ss->edit_data != '' ? json_decode($ss->edit_data) : $ss;
$data_filter['datafilter'] = \Presenter_Group_Filter::edit($filter_group['step'], $filter_group['type'], $data['json']->partner_code);
$partner = \Model_Mpartner::find_by_pk($ss->partner_code);
$group = \Model_Mgroups::find_by_pk($partner->m_group_id);
$data['branch_name'] = $partner->branch_name;
$data['group_name'] = $group->name;
$data['is_view'] = $this->_compare_data_json($ss, $ss->edit_data);
}
$submit = Input::post('submit');
if (isset($submit)) {
$url = Session::get('sslist_url') ? Session::get('sslist_url') : Uri::base() . 'master/sslist';
$ss = new \Model_Mss();
$ss->set_data(Input::post());
if (isset($ss->fields['ss_id']) && !\Model_Mss::find_by_pk($ss->fields['ss_id'])) {
Session::set_flash('error', 'SSは存在しません');
return Response::redirect($url);
}
if (!\Model_Mpartner::find_by_pk(Input::post('partner_code'))) {
Session::set_flash('error', '取引先(受注先)は存在しません');
} else {
if ($ss->save_data()) {
Session::set_flash('success', \Constants::$message_create_success);
return Response::redirect($url);
}
Session::set_flash('error', \Constants::$message_create_error);
}
}
$data['address1'] = \Constants::get_create_address();
$this->template->title = 'UOS求人システム';
$this->template->content = View::forge('ss', $data);
$this->template->content->filtergroup = \Presenter::forge('group/filter')->set('custom', $data_filter);
}
示例2: array
<label id="form_tel-error" class="error" for="form_tel"></label>
<div class="input-group">
<div class="input-group-addon">〒</div>
<?php
echo Form::input('zipcode_first', '', array('class' => 'form-control', 'size' => 3, 'maxlength' => '3'));
?>
</div>
-
<?php
echo Form::input('zipcode_last', '', array('class' => 'form-control', 'size' => 3, 'maxlength' => '4'));
?>
<label id="zipcode-error" class="error" for="zipcode"></label>
<div class="input-group">
<div class="input-group-addon">都道府県</div>
<?php
echo Form::select('add1', '', Constants::get_create_address(), array('class' => 'form-control'));
?>
</div>
<p></p>
<?php
echo Form::input('add2', '', array('class' => 'form-control', 'size' => 20, 'maxlength' => '20', 'placeholder' => '市区町村'));
?>
<?php
echo Form::input('add3', '', array('class' => 'form-control', 'size' => 50, 'maxlength' => '50', 'placeholder' => '以降の住所'));
?>
<p></p>
<div class="text-center">
<button type="submit" class="btn btn-primary btn-sm" name="save-btn">
<i class="glyphicon glyphicon-pencil icon-white"></i>
示例3: isset
echo isset($is_view['zipcode']) ? $is_view['zipcode'] : '';
?>
edit-inline">
<?php
echo isset($edit_partner) ? substr($edit_partner->zipcode, 3, 4) : '';
?>
</div>
</div>
</td>
</tr>
<tr>
<th class="text-right">都道府県</th>
<td>
<?php
//Get array address
$address = \Constants::get_create_address();
echo Fuel\Core\Form::select('addr1', isset($partner->addr1) ? $partner->addr1 : '', $address, array('class' => 'form-control'));
?>
<div class="input-group">
<div class="input-group-addon">市区町村</div>
<?php
echo Fuel\Core\Form::input('addr2', isset($partner->addr2) ? $partner->addr2 : '', array('class' => 'form-control', 'size' => '20'));
?>
</div>
<span class="text-info">※必須</span>
<label id="addr-error" class="error" for="addr"></label>
<!--Edit data-->
<div class="edit-before <?php
echo isset($is_view['addr2']) ? $is_view['addr2'] : '';
?>
<?php
示例4: isset
<div class="input-group">
<div class="input-group-addon">市区町村</div>
<?php
echo Form::input('addr2', Input::post('addr2', isset($post) ? $post->addr2 : $edit_person['addr2']), array('class' => 'form-control', 'size' => 20));
?>
</div>
<div class="edit-before <?php
echo isset($is_view['addr1']) ? $is_view['addr1'] : '';
?>
<?php
echo isset($is_view['addr2']) ? $is_view['addr2'] : '';
?>
">
<?php
echo Form::select('addr1', Input::post('addr1', isset($post) ? $post->addr1 : $person_info['addr1']), \Constants::get_create_address(), array('class' => 'form-control', 'disabled'));
?>
<div class="input-group">
<div class="input-group-addon">市区町村</div>
<?php
echo Form::input('addr2', Input::post('addr2', isset($post) ? $post->addr2 : $person_info['addr2']), array('class' => 'form-control', 'size' => 20, 'disabled'));
?>
</div>
</div>
</td>
</tr>
<tr>
<th class="text-right">以降の住所</th>
<td>
<?php