本文整理汇总了PHP中varlang函数的典型用法代码示例。如果您正苦于以下问题:PHP varlang函数的具体用法?PHP varlang怎么用?PHP varlang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了varlang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_complaint
public function create_complaint()
{
$validator = Validator::make(array(varlang('numele-prenume') => Input::get('name'), varlang('email') => Input::get('email'), varlang('subiect-1') => Input::get('subject'), varlang('cod-de-verificare') => \SimpleCapcha::valid('complaint', Input::get('capcha')) ? 1 : null), array(varlang('numele-prenume') => 'required', varlang('email') => 'email|required', varlang('subiect-1') => 'required', varlang('cod-de-verificare') => 'required'));
$return = array('message' => '', 'error' => 0);
if ($validator->fails()) {
$return['message'] = implode(' ', $validator->messages()->all('<p>:message</p>'));
$return['error'] = 1;
} else {
$complaint = new SComplaintsModel();
$complaint->post_id = Input::get('post_id');
$complaint->username = Input::get('name');
$complaint->email = Input::get('email');
$complaint->address = Input::get('address');
$complaint->title = Input::get('subject');
$complaint->text = Input::get('message');
$complaint->is_private = Input::get('private');
$complaint->save();
Template::viewModule($this->module_name, function () use($complaint) {
$sendToUsers = \User::withRole('user-getemails');
$data['complaint'] = $complaint;
foreach ($sendToUsers as $user) {
$data['user'] = $user;
\Mail::send('views.complaint_email', $data, function ($message) use($user) {
$message->from("noreply@{$_SERVER['SERVER_NAME']}", 'WebLPA');
$message->subject("New message");
$message->to($user->email);
});
}
});
}
return $return;
}
示例2: cv_form_submit
public function cv_form_submit()
{
$validator = Validator::make(array('post_id' => Input::get('post_id'), varlang('name-last-name') => Input::get('name'), varlang('cv') => Input::file('upload')), array('post_id' => 'required', varlang('name-last-name') => 'required', varlang('cv') => 'required'));
$return = array('message' => '', 'error' => 0);
if ($validator->fails()) {
$return['message'] = implode('<br>', $validator->messages()->all(':message'));
$return['error'] = 1;
} else {
$post_id = Input::get('post_id');
$name = Input::get('name');
$filename = 'cv_' . $post_id . '_' . date("Y-m-d") . '_' . uniqid() . '.pdf';
$filepath = "/upload/cv/";
$audience = new JobRequestModel();
$audience->post_id = $post_id;
$audience->name = $name;
$audience->save();
$attachFile = false;
if (Input::file('upload')->isValid()) {
$audience->cv_path = $filepath . $filename;
$audience->save();
$attachFile = $filepath . $filename;
Input::file('upload')->move($_SERVER['DOCUMENT_ROOT'] . $filepath, $filename);
} else {
$return['message'] = 'Invalid file';
$return['error'] = 1;
}
Template::viewModule($this->module_name, function () use($name, $attachFile) {
$data['name'] = $name;
\EmailModel::sendToAdmins("New job reqest", 'views.email-request', $data, $attachFile);
});
}
return $return;
}
示例3: contactTopSubmit
public static function contactTopSubmit()
{
$data = array(varlang('name-last-name') => Input::get('name'), varlang('email') => Input::get('email'), varlang('message') => Input::get('message'), varlang('cod-verificare') => SimpleCapcha::valid('contact_top', Input::get('capcha')) ? 1 : null);
$validator = Validator::make($data, array(varlang('name-last-name') => 'required', varlang('email') => 'email|required', varlang('message') => 'required', varlang('cod-verificare') => 'required'));
$return = array('message' => '', 'error' => 0);
if ($validator->fails()) {
$return['message'] = implode(' ', $validator->messages()->all('<p>:message</p>'));
$return['error'] = 1;
} else {
SimpleCapcha::destroy('contact_top');
EmailModel::sendToAdmins("Contact form", 'email.contact', $data);
$return['html'] = "Mesajul dvs a fost receptionat";
}
return $return;
}
示例4: subscribe
public function subscribe()
{
$validator = Validator::make(array(varlang('email') => Input::get('email')), array(varlang('email') => 'email|required'));
$return = array('message' => '', 'error' => 0);
if ($validator->fails()) {
$return['message'] = implode(', ', $validator->messages()->all(':message'));
$return['error'] = 1;
} else {
$newsletter = new NewsletterModel();
$newsletter->email = Input::get('email');
$newsletter->hash = sha1(Input::get('email') . time());
$newsletter->save();
}
return $return;
}
示例5: varlang
data-update=".files-<?php
echo $module_name;
?>
-<?php
echo $module_id;
?>
"><i
class="glyphicon glyphicon-trash"></i></a>
<?php
}
?>
</td>
</tr>
<?php
}
?>
<?php
} else {
?>
<tr>
<td colspan="7"><?php
echo varlang('no-files');
?>
</td>
</tr>
<?php
}
?>
</table>
示例6: varlang
<h2><?php
echo varlang('feeds-1');
?>
</h2>
<ul class="nav nav-tabs" role="tablist" id="form-tabs">
<li class="active"><a href="#posts" role="tab" data-toggle="tab"><?php
echo varlang('post-list');
?>
</a></li>
<li><a href="#feeds" role="tab" data-toggle="tab"><?php
echo varlang('list-1');
?>
</a></li>
<li><a href="#trash" role="tab" data-toggle="tab"><?php
echo varlang('trash-post');
?>
</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="posts">
<div class="c20"></div>
<?php
echo View::make('sections/feed/allposts');
?>
</div>
<div class="tab-pane" id="feeds">
<div class="c20"></div>
<?php
示例7: varlang
<?php
if ($page->show_files && count($page->files) > 0) {
?>
<div class="search_files">
<?php
if ($page->show_file_search) {
?>
<div class="search">
<input class="search_input" type="text" placeholder="<?php
echo varlang('modelul-formularul');
?>
">
<input class="search_start" type="button" value="<?php
echo varlang('search');
?>
">
<div class="clearfix"></div>
</div>
<?php
}
?>
<ul class="mda">
<?php
foreach ($page->files as $file) {
?>
<li class="<?php
echo $file->extension;
?>
">
<span><a href="<?php
示例8: varlang
<h2><?php
echo varlang('persons');
?>
</h2>
<ul class="nav nav-tabs" role="tablist" id="form-tabs">
<li class="active"><a href="#plist" role="tab" data-toggle="tab"><?php
echo varlang('persons-1');
?>
</a></li>
<li><a href="#pgroups" role="tab" data-toggle="tab"><?php
echo varlang('person-groups');
?>
</a></li>
<li><a href="#audience" role="tab" data-toggle="tab"><?php
echo varlang('audience');
?>
</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="plist">
<?php
echo Template::moduleView($module, 'views.tab-person-list');
?>
</div>
<div class="tab-pane" id="pgroups">
<?php
echo Template::moduleView($module, 'views.tab-group-list');
?>
示例9: varlang
<table class="table table-bordered table-hover">
<tr>
<th><?php
echo varlang('newsletter-2');
?>
: </th>
<td>
<button class="sendnewsletter btn btn-default"><?php
echo varlang('send-this-post');
?>
</button>
</td>
</tr>
</table>
<script>
jQuery(document).ready(function ($) {
$('body').on('click', '.sendnewsletter', function () {
$.post('<?php
echo url('newsletter/sendarticle');
?>
', {id:'<?php
echo $post->id;
?>
'}, function () {
alert('Email sended');
});
});
示例10: in_array
<li class="<?php
echo in_array(User::getZone('person'), User::$zones) ? 'active' : '';
?>
">
<a href="<?php
echo url('person/list');
?>
">
<i class="fa"></i>
<span class="link-title"><?php
echo varlang('persons');
?>
</span>
</a>
</li>
示例11: subscribe_to_audience
public function subscribe_to_audience()
{
$validator = Validator::make(array('person_id' => Input::get('person_id'), varlang('email') => Input::get('email'), varlang('name-last-name') => Input::get('name'), varlang('telefon') => Input::get('phone'), varlang('cod-verificare') => SimpleCapcha::valid('person_subscribe', Input::get('capcha')) ? 1 : null), array('person_id' => 'required', varlang('name-last-name') => 'required', varlang('email') => 'email|required', varlang('telefon') => 'required', varlang('cod-verificare') => 'required'));
$return = array('message' => '', 'error' => 0);
if ($validator->fails()) {
$return['message'] = implode(' ', $validator->messages()->all('<p>:message</p>'));
$return['error'] = 1;
} else {
SimpleCapcha::destroy('person_subscribe');
$audience = new PersonAudienceModel();
$audience->person_id = Input::get('person_id');
$audience->name = Input::get('name');
$audience->email = Input::get('email');
$audience->phone = Input::get('phone');
$audience->save();
}
return $return;
}
示例12: isset
echo isset($selected['gallery_id']) && $selected['gallery_id'] == $gallery->id ? 'selected' : '';
?>
><?php
echo $gallery->name;
?>
</option>
<?php
}
?>
</select>
<br>
<a href="<?php
echo url('gallery/list');
?>
" class="btn btn-info" target="_blank"><?php
echo varlang('create-new-gallery');
?>
</a>
<script>
jQuery(document).ready(function($) {
$('body').on('change', '#attach_gallery', function() {
$.post('<?php
echo url('gallery/save_post_attach');
?>
', {id: $(this).val(), post_id: $("#page_id").val()}, function(data) {
});
});
});
</script>
示例13: function
loadComplete: function() {
$("#pager-poll_we_left table").hide();
},
onSelectRow: function(id) {
if (id && id !== lastSel) {
jQuery('#list-poll_we').restoreRow(lastSel);
lastSel = id;
}
jQuery('#list-poll_we').editRow(id, true);
},
ondblClickRow: function (rowid) {
window.location.href = '<?php
echo url('poll/answer/edit');
?>
/' + rowid;
}
};
</script>
<div class="c20"></div>
<a class="btn btn-success" href="<?php
echo url('poll/anwser/create/' . $poll->id);
?>
"><?php
echo varlang('add-answer');
?>
</a>
<div class="c20"></div>
<?php
echo View::make('sections/jqgrid/form')->with('options', 'poll_' . (isset($poll->id) ? $poll->id : '') . '_options')->with('id', 'poll_we');
示例14: foreach
<?php
if (isset($posts)) {
?>
<?php
foreach ($posts as $item) {
?>
<div class="a_box g_g">
<p class="title"><a href="<?php
echo $page_url;
?>
?item=<?php
echo $item->uri;
?>
"><?php
echo $item->title ? $item->title : varlang('sedinta-din-data-de-') . date("d-m-Y", strtotime($item->created_at));
?>
</a></p>
<div class="hr_dbl"></div>
<p class="info"><?php
echo Str::words(strip_tags($item->text), 55);
?>
</p>
<a href="<?php
echo $page_url;
?>
?item=<?php
echo $item->uri;
?>
示例15: array
<?php
$months = array(1 => varlang('ianuarie'), 2 => varlang('februarie'), 3 => varlang('martie'), 4 => varlang('aprilie'), 5 => varlang('mai'), 6 => varlang('iunie'), 7 => varlang('iulie'), 8 => varlang('august'), 9 => varlang('septembrie'), 10 => varlang('octombrie'), 11 => varlang('noiembrie'), 12 => varlang('decembrie'));
?>
<section>
<div class="wrap">
<div class="left_block">
<?php
if (isset($years_list) && count($years_list)) {
?>
<p class='title'><?php
echo varlang('arhiva');
?>
</p>
<ul class="menu art">
<?php
foreach ($years_list as $year) {
?>
<li class='<?php
echo isset($current_year) && $current_year == $year->year ? 'active' : '';
?>
'>
<a href="<?php
echo isset($month_exists) ? 'javascript://' : '';
echo url($page_url . "?year=" . $year->year . "&month=1");
?>
"><?php
echo $year->year;
?>
</a>