public function childs()
 {
     if (!($parent = $this->appmodel->id($this->uri->segment(3)))) {
         show_404();
     }
     $records = array();
     $pagination = null;
     $recordCount = $this->appmodel->childCount($parent);
     if ($recordCount > 0) {
         $config = array('base_url' => clink(array($this->module, 'childs', $parent->id)), 'total_rows' => $recordCount, 'per_page' => 19);
         $this->load->library('pagination');
         $this->pagination->initialize($config);
         $records = $this->appmodel->childAll($parent, $this->pagination->per_page + 1, $this->pagination->offset);
         $pagination = $this->pagination->create_links();
     }
     // Navigasyon eklemeleri yapılır
     $parents = $this->appmodel->parents($parent->id);
     foreach ($parents as $bread) {
         $this->breadcrumb($bread['title'], $bread['url']);
     }
     $this->breadcrumb('Kayıtlar');
     $this->viewData['parent'] = $parent;
     $this->viewData['records'] = $records;
     $this->viewData['pagination'] = $pagination;
     $this->render('records');
 }
Пример #2
0
 public function widgets()
 {
     $this->load->config('widgets');
     $widgets = $this->config->item('widgets');
     $results = array();
     foreach ($widgets as $widget) {
         if (isset($widget['module'])) {
             $module = $this->db->from('modules')->where('name', $widget['module'])->get()->row();
         }
         if (!empty($module)) {
             $count = 0;
             if (isset($widget['where'])) {
                 $this->db->where($widget['where']);
                 $count = $this->db->from($module->table)->count_all_results();
             }
             $total = $this->db->from($module->table)->count_all_results();
             $widget['title'] = $module->title;
             $widget['url'] = clink(array($widget['module'], 'records'));
             $widget['count'] = $count;
             $widget['total'] = $total;
             $results[] = (object) $widget;
         }
     }
     return $results;
 }
 /**
  * @todo menuPattren linkPattern olarak değiştirilecek.
  * @todo ön yüzdeki aktif modülde linkPattern verileri kullanarak otomatik link oluşturtulacak.
  */
 public function update()
 {
     if (!($record = $this->appmodel->name($this->uri->segment(3)))) {
         show_404();
     }
     if ($this->input->post()) {
         foreach ($record->arguments as $argument) {
             if (!empty($argument->arguments)) {
                 $this->form_validation->set_rules($argument->name, "Lütfen {$argument->title} geçerli bir değer veriniz.", implode('|', array_keys($argument->arguments)));
             }
         }
         if ($this->form_validation->run() === false) {
             $this->utils->setAlert('danger', $this->form_validation->error_string('<div>&bull; ', '</div>'));
         }
         if (!$this->utils->isAlert()) {
             $success = $this->appmodel->update($record);
             if ($success) {
                 $this->utils->setAlert('success', 'Kayıt düzenlendi.');
                 redirect(clink(array($this->module, 'update', $record->name)));
             }
             $this->utils->setAlert('warning', 'Kayıt düzenlenmedi.');
         }
     }
     $this->load->vars('public', array('js' => array('../public/admin/plugin/ckeditor/ckeditor.js', '../public/admin/plugin/ckfinder/ckfinder.js')));
     $this->breadcrumb("{$record->title}: Düzenle");
     $this->viewData['record'] = $record;
     $this->render('update');
 }
Пример #4
0
 public function parents($id)
 {
     static $result = array();
     $record = $this->db->where('id', $id)->get($this->table)->row();
     if ($record) {
         array_unshift($result, array('title' => $record->title, 'url' => clink(array($this->module, 'childs', $record->id))));
         if ($record->parentId > 0) {
             $this->parents($record->parentId, false);
         }
     }
     return $result;
 }
Пример #5
0
 public function index()
 {
     $this->load->model('video');
     $videos = array();
     $pagination = null;
     $videoCount = $this->video->count();
     if ($videoCount > 0) {
         $config = array('base_url' => clink(array('@video')), 'total_rows' => $videoCount, 'per_page' => 10);
         $this->load->library('pagination');
         $this->pagination->initialize($config);
         $videos = $this->video->all($this->pagination->per_page, $this->pagination->offset);
         $pagination = $this->pagination->create_links();
     }
     $this->load->view('master', array('view' => 'video/index', 'videos' => $videos, 'pagination' => $pagination));
 }
Пример #6
0
 public function index()
 {
     $this->load->model('service');
     $this->lang->load('modules/service');
     $services = array();
     $pagination = null;
     $serviceCount = $this->service->count();
     if ($serviceCount > 0) {
         $config = array('base_url' => clink(array('@service')), 'total_rows' => $serviceCount, 'per_page' => 10);
         $this->load->library('pagination');
         $this->pagination->initialize($config);
         $services = $this->service->all($this->pagination->per_page, $this->pagination->offset);
         $pagination = $this->pagination->create_links();
     }
     $this->load->view('master', array('view' => 'service/index', 'services' => $services, 'pagination' => $pagination));
 }
Пример #7
0
 public function getDelete($id, $recovery = '')
 {
     $record = Customer::find($id);
     if (count($record) <= 0) {
         return redirect(clink('customer'));
     }
     if ($recovery == 'recovery') {
         $record->status = 'publish';
     } else {
         Work::where('customer_id', $record->id)->update(['status' => 'trash']);
         $record->status = 'trash';
     }
     $record->save();
     if ($record->save()) {
         if ($recovery == 'recovery') {
             Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'Müşteri başarıyla geri yüklenmiştir.', 'type' => 'success']);
         } else {
             Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'Müşteri başarıyla silinmiştir.', 'type' => 'success']);
         }
         return redirect()->back()->withInput();
     } else {
         Session::flash('message', ['title' => 'Hata!', 'text' => 'Müşteri silinemedi! Lütfen tekrar deneyiniz', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
 }
Пример #8
0
" title="<?php 
    echo htmlspecialchars($news->title);
    ?>
">
                                    <img class="img-responsive" src="<?php 
    echo uploadPath($news->image, 'news');
    ?>
" alt="<?php 
    echo htmlspecialchars($news->title);
    ?>
" />
                                </a>
                            </div>
                            <div class="col-md-8">
                                <p class="title"><a href="<?php 
    echo clink(array('@news', $news->slug, $news->id));
    ?>
"><?php 
    echo $news->title;
    ?>
</a></p>
                                <p class="summary"><?php 
    echo $news->summary;
    ?>
</p>
                                <p class="date"><?php 
    echo $this->date->set($news->date)->dateWithName();
    ?>
</p>
                            </div>
                        </div>
Пример #9
0
        <div class="row">
            <div class="col-md-6">
                <?php 
echo $this->module->arguments->detail;
?>
            </div>

            <div class="col-md-6">
                <div class="second-title"><?php 
echo lang('cv-form-title');
?>
</div>

                <form method="post" action="<?php 
echo clink('@cv');
?>
" accept-charset="utf-8" enctype="multipart/form-data">
                    <?php 
echo $this->site->alert();
?>

                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="control-label"><?php 
echo lang('cv-fullname');
?>
 *:</label>
                                <input type="text" class="form-control" name="fullname" required="required" value="<?php 
echo set_value('fullname');
Пример #10
0
        <div class="page-title">
            <?php 
echo $this->module->arguments->title;
?>
        </div>

        <div class="galleries">
            <div class="row">

                <?php 
foreach ($galleries as $gallery) {
    ?>
                    <div class="column col-md-3">
                        <div class="gallery">
                            <a href="<?php 
    echo clink(array('@gallery', $gallery->slug, $gallery->id));
    ?>
">
                                <img class="img-responsive" src="<?php 
    echo uploadPath($gallery->image, 'gallery');
    ?>
" alt="<?php 
    echo htmlspecialchars($gallery->title);
    ?>
" />
                                <span><?php 
    echo $gallery->title;
    ?>
</span>
                            </a>
                        </div>
Пример #11
0
 public function getDelete($id, $recovery = '')
 {
     $record = Work::find($id);
     if (count($record) <= 0) {
         return redirect(clink('work'));
     }
     if ($recovery == 'recovery') {
         $record->status = 'publish';
     } else {
         $record->status = 'trash';
     }
     $record->save();
     if ($record->save()) {
         if ($recovery == 'recovery') {
             Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'İş kaydı başarıyla geri yüklenmiştir.', 'type' => 'success']);
         } else {
             Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'İş kaydı başarıyla silinmiştir.', 'type' => 'success']);
         }
         return redirect()->back()->withInput();
     } else {
         Session::flash('message', ['title' => 'Hata!', 'text' => 'İş kaydı silinemedi! Lütfen tekrar deneyiniz', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
 }
Пример #12
0
 /**
  * Kayıt güncelleme
  */
 public function update()
 {
     if (!($record = $this->appmodel->id($this->uri->segment(3)))) {
         show_404();
     }
     if ($this->input->post()) {
         $this->callMethod('updateValidateRules');
         $this->callMethod('updateBeforeValidate', $record);
         if ($this->form_validation->run() === false) {
             $this->utils->setAlert('danger', $this->form_validation->error_string('<div>&bull; ', '</div>'));
         }
         $this->callMethod('updateAfterValidate', $record);
         if (!$this->utils->isAlert()) {
             $this->callMethod('updateBefore', $record);
             $success = $this->appmodel->update($record, $this->modelData);
             if ($success) {
                 $this->callMethod('updateAfter', $record);
                 $this->utils->setAlert('success', 'Kayıt düzenlendi.');
                 if ($this->input->post('redirect')) {
                     $redirect = $this->input->post('redirect');
                 } else {
                     $redirect = clink(array($this->module, 'update', $record->id));
                 }
                 redirect($redirect);
             }
             $this->utils->setAlert('warning', 'Kayıt düzenlenmedi.');
         }
     }
     $this->callMethod('updateRequest', $record);
     $this->breadcrumb('Kayıt Düzenle');
     $this->viewData['record'] = $record;
     $this->render('update');
 }
Пример #13
0
 public function logout()
 {
     $this->session->unset_userdata('adminlogin');
     $this->session->unset_userdata('adminuser');
     redirect(clink(array($this->module, 'login')));
 }
Пример #14
0
echo lang('contact-information');
?>
</div>
                <?php 
echo $this->module->arguments->detail;
?>
            </div>

            <div class="col-md-6">
                <div class="second-title"><?php 
echo lang('contact-form');
?>
</div>

                <form method="post" action="<?php 
echo clink('@contact');
?>
" accept-charset="utf-8">
                    <?php 
echo $this->site->alert();
?>

                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="control-label"><?php 
echo lang('contact-fullname');
?>
 *:</label>
                                <input type="text" class="form-control" name="fullname" required="required" value="<?php 
echo set_value('fullname');
 public function imageUpdate()
 {
     if (!($record = $this->appmodel->image($this->uri->segment(3)))) {
         show_404();
     }
     $parent = $this->appmodel->id($record->galleryId);
     if ($this->input->post()) {
         if ($this->form_validation->run() === false) {
             $this->utils->setAlert('danger', $this->form_validation->error_string('<div>&bull; ', '</div>'));
         }
         $this->utils->uploadInput('imageFile')->minSizes(400, 300)->addProcessSize('thumb', 400, 300, 'gallery/thumb', 'thumbnail')->addProcessSize('normal', 900, 900, 'gallery/normal', 'fit');
         if ($this->input->post('imageUrl')) {
             $this->modelData['image'] = $this->utils->imageDownload(false, $this->input->post('imageUrl'), $record->image);
         } else {
             $this->modelData['image'] = $this->utils->imageUpload(false, $record->image);
         }
         if (!$this->utils->isAlert()) {
             $success = $this->appmodel->imageUpdate($record, $this->modelData);
             if ($success) {
                 $this->utils->setAlert('success', 'Kayıt düzenlendi.');
                 redirect(clink(array($this->module, 'imageUpdate', $record->id)));
             }
             $this->utils->setAlert('warning', 'Kayıt düzenlenmedi.');
         }
     }
     $this->breadcrumb($parent->title, clink(array($this->module, 'images', $parent->id)));
     $this->breadcrumb('Kayıt Düzenle');
     $this->viewData['parent'] = $parent;
     $this->viewData['record'] = $record;
     $this->render('images/update');
 }
 public function contents()
 {
     $json = array('success' => true, 'html' => 'Kayıt bulunamadı.');
     $json['html'] = $this->load->view(clink(array($this->module, 'contents')), array('records' => $this->appmodel->contents()), true);
     echo json_encode($json);
 }
Пример #17
0
        <div class="page-title"><?php 
echo $news->title;
?>
<span></span></div>

        <?php 
echo $news->detail;
?>

        <div class="buttons clearfix">
            <a class="btn btn-xs btn-success" href="javascript:history.back();"><span class="glyphicon glyphicon-chevron-left"></span> <?php 
echo lang('news-go-back');
?>
</a>
            <a class="btn btn-xs btn-success" href="<?php 
echo clink('@news');
?>
"><?php 
echo lang('news-all-news');
?>
</a>
        </div>

        <div class="share-box">
            <p><strong><?php 
echo lang('news-share-social');
?>
</strong></p>
            <a class="facebook" href="http://facebook.com/sharer.php?u=<?php 
echo current_url();
?>
Пример #18
0
                        <div class="list-group">
                            <a class="list-group-item active" href="<?php 
        echo clink(array('@content', $content->slug, $content->id));
        ?>
" title="<?php 
        echo $content->title;
        ?>
"><?php 
        echo $content->title;
        ?>
</a>
                            <?php 
        foreach ($content->childs as $child) {
            ?>
                                <a class="list-group-item" href="<?php 
            echo clink(array('@content', $child->slug, $child->id));
            ?>
" title="<?php 
            echo $child->title;
            ?>
"><?php 
            echo $child->title;
            ?>
</a>
                            <?php 
        }
        ?>
                        </div>
                    <?php 
    }
    ?>
 public function groupUpdate()
 {
     if (!$this->isRoot()) {
         redirect('home/denied');
     }
     if (!($record = $this->appmodel->id($this->uri->segment(3)))) {
         show_404();
     }
     if ($this->input->post()) {
         $this->form_validation->set_rules('name', 'Lütfen Etiket yazınız.', 'required');
         $this->form_validation->set_rules('title', 'Lütfen Başlık yazınız.', 'required');
         if ($this->form_validation->run() === false) {
             $this->utils->setAlert('danger', $this->form_validation->error_string('<div>&bull; ', '</div>'));
         }
         if (!$this->utils->isAlert()) {
             $success = $this->appmodel->groupUpdate($record, $this->modelData);
             if ($success) {
                 $this->utils->setAlert('success', 'Kayıt düzenlendi.');
                 if ($this->input->post('redirect')) {
                     $redirect = $this->input->post('redirect');
                 } else {
                     $redirect = clink(array($this->module, 'groupUpdate', $record->id));
                 }
                 redirect($redirect);
             }
             $this->utils->setAlert('warning', 'Kayıt düzenlenmedi.');
         }
     }
     $this->breadcrumb('Menü Grubu Düzenle');
     $this->viewData['record'] = $record;
     $this->render('group/update');
 }
Пример #20
0
            <ul class="nav navbar-right">
                <li data-toggle="tooltip" data-placement="left" title="Siteyi Göster">
                    <a href="../" target="_blank"><i class="fa fa-globe"></i></a>
                </li>
                <li class="dropdown" data-toggle="tooltip" data-placement="left" title="Diller">
                    <a class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-flag"></i></a>
                    <ul class="dropdown-menu">
                        <?php 
foreach ($this->config->item('languages') as $language => $value) {
    ?>
                            <li>
                                <a href="home/language/<?php 
    echo $language;
    ?>
?ref=<?php 
    echo $this->module == 'home' ? '' : clink(array($this->module, 'records'));
    ?>
">
                                    <?php 
    echo $value;
    ?>
                                    <?php 
    if ($this->language == $language) {
        ?>
                                        <i class="fa fa-check"></i>
                                    <?php 
    }
    ?>
                                </a>
                            </li>
                        <?php 
Пример #21
0
                                <div class="title"><a href="<?php 
    echo clink(array('@service', $service->slug, $service->id));
    ?>
" title="<?php 
    echo htmlspecialchars($service->title);
    ?>
"><?php 
    echo $service->title;
    ?>
</a></div>
                                <div class="summary"><?php 
    echo $service->summary;
    ?>
</div>
                                <div class="text-right"><a class="more-button" href="<?php 
    echo clink(array('@service', $service->slug, $service->id));
    ?>
" title="<?php 
    echo htmlspecialchars($service->title);
    ?>
"><?php 
    echo lang('service-more');
    ?>
</a></div>
                            </div>
                        </div>
                    </div>
                <?php 
}
?>
            </div>
Пример #22
0
                                <img class="img-responsive" src="<?php 
    echo uploadPath($image->image, 'gallery/thumb');
    ?>
" />
                            </a>
                        </div>
                    </div>
                <?php 
}
?>

            </div>

            <div class="buttons">
                <a class="btn btn-primary btn-sm" href="javascript:history.back();"><span class="glyphicon glyphicon-circle-arrow-left"></span> <?php 
echo lang('gallery-go-back');
?>
</a>
                <a class="btn btn-primary btn-sm" href="<?php 
echo clink('@gallery');
?>
"><?php 
echo lang('gallery-all-galleries');
?>
</a>
            </div>
        </div>

    </div>
</main>