コード例 #1
0
 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
0
ファイル: jobrequest.php プロジェクト: vcorobceanu/WebAPL
 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
0
ファイル: PostResources.php プロジェクト: vcorobceanu/WebAPL
 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
0
ファイル: newsletter.php プロジェクト: vcorobceanu/WebAPL
 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
0
ファイル: file_list.php プロジェクト: vcorobceanu/WebAPL
                           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
0
ファイル: list.php プロジェクト: vcorobceanu/WebAPL
<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
0
ファイル: files.php プロジェクト: vcorobceanu/WebAPL
<?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
0
ファイル: list.php プロジェクト: vcorobceanu/WebAPL
<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
0
ファイル: send_email.php プロジェクト: vcorobceanu/WebAPL
<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
0
<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
0
ファイル: person.php プロジェクト: vcorobceanu/WebAPL
 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
0
ファイル: attachment.php プロジェクト: vcorobceanu/WebAPL
    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
0
ファイル: tab-answers.php プロジェクト: vcorobceanu/WebAPL
        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
0
ファイル: meetingPasts.php プロジェクト: vcorobceanu/WebAPL
<?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
0
ファイル: article.php プロジェクト: vcorobceanu/WebAPL
<?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>
コード例 #16
0
ファイル: subscribe.php プロジェクト: vcorobceanu/WebAPL
                    form.html("<font color='white'>Multumesc pentru abonare!</font>");
                } else {
                    alert(data.message);
                }
            });
            return false;
        });

    });
</script>

<form class="newsletter_subscribe_form" action="<?php 
echo url('newsletter/subscribe');
?>
">
    <label><?php 
echo varlang('aboneazatate-la-buletin');
?>
</label>
    <input name="email" type="text" placeholder="<?php 
echo varlang('email-dvs');
?>
">
    <input type="submit" value="<?php 
echo varlang('submit-1');
?>
">
</form>


コード例 #17
0
ファイル: post-form.php プロジェクト: vcorobceanu/WebAPL
    <div class="tab-pane" id="media">
        <div class="c20"></div>
        <?php 
echo Files::widget('post_cover', $general['post']->id, 1);
?>
    </div>
</div>

<?php 
if ($general['post']->is_trash) {
    ?>
    <form method="post" action="<?php 
    echo url('feed/delete');
    ?>
">
        <input type="hidden" name="id" value="<?php 
    echo $general['post']->id;
    ?>
" />

        <input type="submit" class="btn btn-danger pull-right" onclick="return confirm('<?php 
    echo varlang('delete-this-post');
    ?>
');" value="<?php 
    echo varlang('delete-this-post-1');
    ?>
" />
    </form>
    <div class='c10'></div>
<?php 
}
コード例 #18
0
ファイル: filemanager.php プロジェクト: vcorobceanu/WebAPL
<h2><?php 
echo varlang('filemanager');
?>
</h2>

<iframe src="<?php 
echo res('assets/lib/fileman/index.html');
?>
" style="width: 100%;height: 700px;border:0;"></iframe>
コード例 #19
0
<tr>
    <th><?php 
echo varlang('person-groups');
?>
:</th>
    <td>
        <form id="attach_page_group">
            <input type="hidden" name="page_id" value="<?php 
echo $post['id'];
?>
" />
            <select id="attach_pgroup" name="groups[]" class="form-control chzn-select-deselect" style="width: 200px;" multiple>
                <option value="0">---</option>
                <?php 
foreach ($person_groups as $pgroup) {
    ?>
                <option value="<?php 
    echo $pgroup['id'];
    ?>
" <?php 
    echo in_array($pgroup['id'], $selected_groups) ? 'selected' : '';
    ?>
><?php 
    echo $pgroup['name'];
    ?>
</option>
                <?php 
}
?>
            </select>
        </form>
コード例 #20
0
ファイル: footer.php プロジェクト: vcorobceanu/WebAPL
    </div>   
    <div class="right">
        <div id="map-canvas3" style="width:100%; height:500px;"></div>
        <div class="content">
            <p class="y_info"><?php 
echo varlang('address');
?>
</p>
            <p class="w_info">
                <span><?php 
echo varlang('street');
?>
</span>
                <span><?php 
echo varlang('city');
?>
</span>
            </p>
        </div>
    </div>
    <div class="clearfix"> </div>
</footer>

<?php 
Event::fire('bottom_contructor');
echo SettingsModel::one('stats_code');
?>

<script src="<?php 
echo res('assets/js/plugins.js');
コード例 #21
0
ファイル: chat-form.php プロジェクト: vcorobceanu/WebAPL
    echo url('firechat/audience');
    ?>
' method="post" class='ajax-auto-submit'>
        <input type='hidden' name='id' value='<?php 
    echo isset($person->id) ? $person->id : '';
    ?>
' />
        <?php 
    echo varlang('accesible');
    ?>
 
        <input type="checkbox" class="make-switch" name="for_audience" <?php 
    echo isset($person->for_audience) && $person->for_audience ? 'checked' : '';
    ?>
 />
    </form>
    <div>

    </div>

    <iframe src="<?php 
    echo url('firechat/display');
    ?>
" style="border: 0;width: 100%;height: 600px;"></iframe>

<?php 
} else {
    ?>
    <?php 
    echo varlang('numele-de-utilizator-nu-a-fost-atribuit-unei-persoane');
}
コード例 #22
0
ファイル: PageView.php プロジェクト: vcorobceanu/WebAPL
 public static function meetingFuture($data)
 {
     if ($data['page']->feed_id) {
         Post::$taxonomy = 2;
         $wdata['post'] = Post::postsFeed($data['page']->feed_id, false, true)->where(Post::getField('created_at'), '>=', DB::raw('CURRENT_TIMESTAMP'))->first();
         if ($wdata['post']) {
             Post::oneView($wdata['post']['id']);
             $wdata['post'] = Post::withDinamicFields($wdata['post']);
             $data["page"]->text = View::make("sections.pages.modview.meetingFuture")->with($wdata);
         } else {
             $data["page"]->text = varlang('articole-null');
         }
     }
     return static::defaultView($data);
 }
コード例 #23
0
ファイル: pagination.php プロジェクト: vcorobceanu/WebAPL
<?php

return array('previous' => varlang('previous'), 'next' => varlang('next'));
コード例 #24
0
<li class="<?php 
echo in_array(User::getZone('calendar'), User::$zones) ? 'active' : '';
?>
">
    <a href="<?php 
echo url('calendar/list');
?>
">
        <i class="fa"></i>
        <span class="link-title"><?php 
echo varlang('calendar-1');
?>
</span>
    </a>
</li>
コード例 #25
0
ファイル: actelist.php プロジェクト: vcorobceanu/WebAPL
                                <td><?php 
            echo date("d.m.Y", strtotime($doc->date_upload));
            ?>
</td>
                            </tr>
                        <?php 
        }
        ?>
                    <?php 
    }
    ?>
                    </tbody>
                </table>
                <div class="jspages pag">
                    <span class="w_p"><?php 
    echo varlang('acte-search');
    ?>
</span>
                    <ul></ul>
                </div>
                <div class="clearfix10"></div>
            </div>
        <?php 
}
?>
    </div>
    <div class="clearfix"></div>
</div>

<script>
    var start_month = <?php 
コード例 #26
0
    ?>
</span>
            </div>
        <?php 
}
?>
    </div>

    <div class="clearfix"></div>

    <?php 
if ($post->docs) {
    ?>
        <ul class="dcr">
            <li><a href='javascript:;'><?php 
    echo varlang('documente');
    ?>
</a>
                <div class='dcr_box'>
                    <ul class="mda n_t">
                        <?php 
    foreach ($post->docs as $file) {
        ?>
                            <li class="<?php 
        echo $file->extension;
        ?>
"><a href="<?php 
        echo url($file->path);
        ?>
"><?php 
        echo $file->name;
コード例 #27
0
ファイル: tab-post-lang.php プロジェクト: vcorobceanu/WebAPL
echo varlang('enabled-1');
?>
: </th>
            <td>
                <input type="checkbox" name="postlang[<?php 
echo $post_lang->id;
?>
][enabled]" class='make-switch' <?php 
echo isset($post_lang->enabled) && $post_lang->enabled ? 'checked' : '';
?>
 />
            </td>
        </tr>
        <tr>
            <th><?php 
echo varlang('text');
?>
: </th>
            <td>
                <textarea name="postlang[<?php 
echo $post_lang->id;
?>
][text]" class='ckeditor-run'><?php 
echo isset($post_lang->text) ? $post_lang->text : '';
?>
</textarea>
            </td>
        </tr>
        <?php 
foreach ($post_lang['fields'] as $field) {
    ?>
コード例 #28
0
ファイル: form.php プロジェクト: vcorobceanu/WebAPL
<div class="tab-content">
    <div class="tab-pane active" id="general">

        <form class="ajax-auto-submit" action='<?php 
echo url('gallery/save');
?>
' method='post'>
            <input type='hidden' name='id' value='<?php 
echo isset($gallery->id) ? $gallery->id : 0;
?>
' />

            <table class="table table-bordered table-hover">
                <tr>
                    <th><?php 
echo varlang('name--3');
?>
</th>
                    <td>
                        <input type="text" name="gallery[name]" class='form-control' value='<?php 
echo isset($gallery->name) ? $gallery->name : '';
?>
' />
                    </td>
                </tr>
            </table>
        </form>

    </div>
    <div class="tab-pane" id="gfiles">
        <div class="c10"></div>
コード例 #29
0
                    <tr><td><?php 
        echo varlang('data-nasterii');
        ?>
:</td><td><?php 
        echo $person->date_birth;
        ?>
</td></tr>
                    <tr><td><?php 
        echo varlang('studii');
        ?>
:</td><td><?php 
        echo $person->studies;
        ?>
</td></tr>
                    <tr><td><?php 
        echo varlang('contact');
        ?>
:  </td><td>
                            <p><?php 
        echo $person->phone;
        ?>
</p>
                            <p><?php 
        echo $person->email;
        ?>
</p>
                        </td>
                    </tr>
                    <?php 
        $fields = @unserialize($person->dynamic_fields);
        if (is_array($fields)) {
コード例 #30
0
ファイル: tab-general.php プロジェクト: vcorobceanu/WebAPL
                            <td>
                                <button type="button" class="btn btn-info btnWcom" data-com="<?php 
    echo $view_key;
    ?>
"><i class="glyphicon glyphicon-ok"></i></button>
                            </td>
                        </tr>
                        <?php 
}
?>

                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="wmClose" class="btn btn-default" data-dismiss="modal"><?php 
echo varlang('close-2');
?>
</button>
            </div>
        </div>
    </div>
</div>

<script>
    jQuery(document).ready(function() {
        $(".btnWcom").click(function() {
            $("#viewModComutator").val($(this).attr('data-com')).trigger('chosen:updated');
            $("#viewModComutator").change();
            $(".wmClose").click();
        });
    });