示例#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
 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
 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
 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
                           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
<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
<?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
<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
<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
 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
    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
        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
<?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
<?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
                    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
    <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
<h2><?php 
echo varlang('filemanager');
?>
</h2>

<iframe src="<?php 
echo res('assets/lib/fileman/index.html');
?>
" style="width: 100%;height: 700px;border:0;"></iframe>
<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
    </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
    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
 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
<?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
                                <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
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
<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
                            <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();
        });
    });