Example #1
0
 public function __construct()
 {
     parent::__construct();
     //mobile ayarı
     if ($this->agent->is_mobile()) {
         $this->setIsMobil(true);
         $this->setSiteTheme(ayar_getir('site_mobile_tema'));
     } else {
         $this->setIsMobil(false);
         $this->setSiteTheme(ayar_getir('sitetheme'));
     }
     //db cache
     if (ayar_getir('db_cache') == 'on') {
         $this->db->cache_on();
     }
     //page cache
     $this->setPageCache(ayar_getir('cache_status'));
     $this->setPageCacheTime(ayar_getir('cache_time'));
     //aile filitresi
     if (!$this->session->userdata('ailefilitresi')) {
         $this->setFamilyFiltre(ayar_getir('ailefilitresi'));
     } else {
         $this->setFamilyFiltre($this->session->userdata('ailefilitresi'));
     }
     //header ve footer
     $this->setSiteLayout('main');
     $this->setHeader('header');
     $this->setFooter('footer');
 }
 function video_render($_player, $_videoURL, $_thumbURL = NULL)
 {
     $CI =& get_instance();
     $CI->load->helper('file');
     $_read = read_file("./others/players/" . $_player . ".php");
     $_read = str_replace('{player_path}', $CI->config->base_url("players"), $_read);
     $_read = str_replace('{video_path}', $_videoURL, $_read);
     $_read = str_replace('{thumb_path}', $_thumbURL, $_read);
     $_rand = substr(md5(rand(0, 9999999)), 0, 5);
     $_read = str_replace('{video_div}', $_rand, $_read);
     $CI->load->helper('ayarlar');
     $_read = preg_replace('#^width=\\"(.*?)\\"$#i', 'width="' . ayar_getir('video_width') . '"', $_read);
     $_read = preg_replace('#^height=\\"(.*?)\\"$#i', 'height="' . ayar_getir('video_height') . '"', $_read);
     $_read = preg_replace('#\\{width\\}#i', 'width="' . ayar_getir('video_width') . '"', $_read);
     $_read = preg_replace('#\\{height\\}#i', 'height="' . ayar_getir('video_height') . '"', $_read);
     return html_entity_decode($_read);
 }
Example #3
0
 public function genelayarlarkaydet()
 {
     $result = array();
     $kayitlar = array();
     $kayitlar[] = array('siteadi', $this->input->post('frmSiteAdi'), 'Site Adı Ayarı Güncellendi.', 'Site Adı Ayarı Güncellenemedi');
     $kayitlar[] = array('sitetheme', $this->input->post('frmTemalar'), 'Site Tema Ayarı Güncellendi.', 'Site Tema Ayarı Güncellenemedi');
     $kayitlar[] = array('index_turu', $this->input->post('frmIndexTuru'), 'Site Anasayfa Görünümü Güncellendi.', 'Site Anasayfa Görünümü Güncellenemedi');
     $kayitlar[] = array('header_html', $this->input->post('frmHeaderHTML'), 'Header Kodları Güncellendi.', 'Header Kodları Güncellenemedi');
     $kayitlar[] = array('footer_html', $this->input->post('frmFooterHTML'), 'Footer Kodları Güncellendi.', 'Footer Kodları Güncellenemedi');
     $kayitlar[] = array('anasayfa_kayit_sayisi', $this->input->post('frmAnasayfaFilmAdedi'), 'Anasayfada Gösterilecek Film Sayısı Güncellendi.', 'Anasayfada Gösterilecek Film Sayısı Güncellenemedi');
     $kayitlar[] = array('filmler_kayit_sayisi', $this->input->post('frmFilmKayitSayisi'), 'Filmler Sayfasında Gösterilecek Film Sayısı Güncellendi.', 'Filmler Sayfasında Gösterilecek Film Sayısı Güncellenemedi');
     $kayitlar[] = array('aktivasyonMaili', $this->input->post('frmAktivasyonMaili'), 'Aktivasyon Maili Ayarı Güncellendi.', 'Aktivasyon Maili Ayarı Güncellenemedi');
     $kayitlar[] = array('ailefilitresi', $this->input->post('frmAileFilitresi'), 'Aile Filitresi Güncellendi.', 'Aile Filitresi Güncellenemedi');
     foreach ($kayitlar as $r) {
         //ayar varsa güncellesin
         if (false != ayar_getir($r[0])) {
             if (ayar_guncelle($r[0], $r[1])) {
                 $result[] = $r[2];
             } else {
                 $result[] = $r[3];
             }
         } else {
             //ayar yoksa eklesin
             if (ayar_ekle($r[0], $r[1])) {
                 $result[] = $r[2];
             } else {
                 $result[] = $r[3];
             }
         }
     }
     if (count($result) > 0) {
         array_push($result, '<b><a href="' . base_url("admin/settings") . '">Geri Dön</a></b>');
         $_data['e'] = (object) array('durum' => 'ok', 'type' => 'dizi', 'mesaj' => $result);
         $this->render('errorpage', $_data);
     } else {
         $_data['e'] = (object) array('durum' => 'hata', 'type' => 'normal', 'mesaj' => 'Kayıtlar Güncellenemedi..! <b><a href="' . base_url("admin/settings") . '">Geri Dön</a></b>');
         $this->render('errorpage', $_data);
     }
 }
Example #4
0
 function facebook_send_item($params = array())
 {
     //super user
     $ci =& get_instance();
     if (count($params) <= 0) {
         log_message('error', 'facebook_send_item için yeterli veri girilmemiş..!');
         return FALSE;
     }
     //helperler
     $ci->load->helper('file');
     //önce tokenı alıyoruz..
     $token = ayar_getir('facebook_access_token');
     if ($token) {
         //param'a token'ı ekleyelim
         $params['access_token'] = $token;
         //facebook clasını load ettik
         include APPPATH . '../facebook/facebook.php';
         $fb_config = $ci->config->item('facebook');
         //ayarlar
         $config = array('appId' => $fb_config['app_id'], 'secret' => $fb_config['app_secret'], 'allowSignedRequest' => false);
         //class
         $facebook = new Facebook($config);
         $ci->load->library('Curl');
         $status = $ci->curl->getir('https://graph.facebook.com/' . $fb_config['page_id'] . '/feed', $params);
         if ($status) {
             log_message('error', 'facebook_send_item durum mesajı: ' . $status);
             return TRUE;
         } else {
             log_message('error', 'facebook_send_item durum mesajı: ' . $status);
             return $status;
         }
     } else {
         log_message('error', 'facebook_send_item access token hatası: ' . $token);
         return FALSE;
     }
 }
Example #5
0
                    <div class="form-group">
                        <label class="col-sm-2">Aktivasyon Maili Gönderilsin mi ?</label>
                        <div class="col-sm-10">
                            <?php 
$options = array('Evet' => 'Evet', 'Hayir' => 'Hayir');
echo form_dropdown('frmAktivasyonMaili', $options, ayar_getir('aktivasyonMaili'), 'class="form-control"');
?>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">Anasayfa Görünümü: </label>
                        <div class="col-sm-10">
                            <?php 
$options = array('normal' => 'Normal', 'afis_gorunum' => 'Afiş Görünüm');
echo form_dropdown('frmIndexTuru', $options, ayar_getir('index_turu'), 'class="form-control"');
?>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2">Önbellek Süresi (Dakika):</label>
                    <div class="col-sm-10">
                        <?php 
echo form_input('frmCacheTime', ayar_getir('cache_time'), 'class="form-control"');
?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2">Veritabanı Önbellekleme Durumu:</label>
                    <div class="col-sm-10">
                        <?php 
$options = array('ON' => 'Açık', 'OFF' => 'Kapalı');
echo form_dropdown('frmCacheStatus', $options, ayar_getir('cache_status'), 'class="form-control"');
?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                    </div>
                </div>
                <?php 
echo form_close();
?>
            </div>
        </div>
    </div>
</div>
Example #7
0
 function partkaydet()
 {
     $this->form_validation->set_rules('film', 'Film Adı', 'required');
     if ($this->form_validation->run() == FALSE) {
         $_data['e'] = (object) array('durum' => 'hata', 'type' => 'formvalidation', 'mesaj' => '');
         $this->render('errorpage', $_data);
     } else {
         $filmID = $this->input->post('film');
         $alternatif = $this->input->post('frmAlternatif');
         $partBaslik = $this->input->post('partbaslik');
         $partEmbed = $this->input->post('partembed');
         $ekle = $this->input->post('frmEkle');
         $width = $this->input->post('width');
         $height = $this->input->post('height');
         $get = $this->db->get_where('filmler', array('id' => $filmID));
         $kayit = 0;
         if ($get->num_rows() > 0) {
             foreach ($partBaslik as $k => $v) {
                 if ($ekle[$k] == 'ekle') {
                     $embed = $partEmbed[$k];
                     if (!empty($height)) {
                         $embed = preg_replace('/height="(.*?)"/', 'height="' . $height . '"', $embed);
                     }
                     if (!empty($width)) {
                         $embed = preg_replace('/width="(.*?)"/', 'width="' . $width . '"', $embed);
                     }
                     $insert = $this->db->insert('partlar', array('film_id' => $filmID, 'baslik' => $partBaslik[$k], 'url' => $embed, 'player' => 'html', 'aciklama' => ayar_getir('siteadi') . ' İyi Seyirler Diler..!', 'alternatif' => $alternatif[$k]));
                     if ($insert) {
                         $kayit++;
                     }
                 }
             }
             if ($kayit <= 0) {
                 $_data['e'] = (object) array('durum' => 'hata', 'type' => 'mesaj', 'mesaj' => 'Partlar Eklenemedi. <a href="' . base_url('admin/filmbotu') . '">Geri Dön</a>');
                 $this->render('errorpage', $_data);
             } else {
                 $_data['e'] = (object) array('durum' => 'ok', 'type' => 'mesaj', 'mesaj' => 'Partlar Eklendi. <a href="' . base_url('admin/filmbotu') . '">Geri Dön</a>');
                 $this->render('errorpage', $_data);
             }
         } else {
             $_data['e'] = (object) array('durum' => 'hata', 'type' => 'mesaj', 'mesaj' => 'Film Bulunamadı. <a href="' . base_url('admin/filmbotu') . '">Geri Dön</a>');
             $this->render('errorpage', $_data);
         }
     }
 }
echo form_open(site_url("admin/ayarlar/facebookayarkaydet"), array('class' => 'form-horizontal', 'method' => 'post', 'role' => 'form'));
?>
                    <div class="form-group">
                        <label class="col-sm-2">Eklenen Filmler Twitter'ta Paylaşılsın mı?:</label>
                        <div class="col-sm-10">
                            <?php 
$options = array('Evet' => 'Evet', 'Hayir' => 'Hayir');
echo form_dropdown('twitter_paylasim', $options, ayar_getir('twitter_paylasim'), 'class="form-control"');
?>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">Twitter:</label>
                        <div class="col-sm-7">
                            <?php 
echo form_input('facebook_access_token', ayar_getir('facebook_access_token'), 'class="form-control" id="facebook_access_token"');
?>
                        </div>
                        <a href="#" onclick="getAccessToken();" class="btn btn-danger">Access Token Al</a>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                        </div>
                    </div>
                    <?php 
echo form_close();
?>
                </div>
Example #9
0
<div class="row">
    <div class="col-sm-6 col-md-6 col-lg-12">
        <div class="block-flat">
            <div class="header">
                <h3>Önbellekleme Ayarları</h3>
            </div>
            <div class="content">

                <?php 
echo form_open(site_url("admin/ayarlar/yasaluyarikaydet"), array('class' => 'form-horizontal', 'method' => 'post', 'role' => 'form'));
?>
                <div class="form-group">
                    <label class="col-sm-2">Yasal Uyarı Metni:</label>
                    <div class="col-sm-10">
                        <?php 
echo form_textarea('frmYasalUyari', ayar_getir('yasal_uyari'), 'class="form-control" id="ckeditor"');
?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                    </div>
                </div>
                <?php 
echo form_close();
?>

            </div>
        </div>
    </div>
Example #10
0
 function swo_head()
 {
     $CI =& get_instance();
     //kütüphaneler yükleniyor...
     $CI->load->helper('ayarlar');
     $CI->load->library('header');
     //panelden eklenen html kodları
     $headerHtml = ayar_getir('header_html');
     //sabit js dosyaları
     $script = array();
     //header oluşturuluyor...
     $header = '';
     //js'ler header'a ekleniyor...
     if (count($script) > 0) {
         foreach ($script as $sc) {
             $header .= "<script src=\"{$sc}\"></script>\n";
         }
     }
     //clastan gelen headerlar ekleniyor..
     $render_head = $CI->header->render_head();
     //tüm veriler aktarılıyor...
     $header .= $headerHtml . "\n" . $render_head;
     return $header;
 }
            </div>
            <div class="form-group">
                <label class="col-sm-2">Üye Olmayanlar Yorum Yapsın mı?</label>
                <div class="col-sm-10">
                    <?php 
$options = array('Evet' => 'Evet', 'Hayir' => 'Hayir');
echo form_dropdown('frmPublicComment', $options, ayar_getir('publicComment'), 'class="form-control"');
?>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2">Yorum İçin Onay Gerekli Mi?</label>
                <div class="col-sm-10">
                    <?php 
$options = array('Evet' => 'Evet', 'Hayir' => 'Hayir');
echo form_dropdown('frmYorumOnay', $options, ayar_getir('yorumOnay'), 'class="form-control"');
?>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                </div>
            </div>
            <?php 
echo form_close();
?>
            </div>
        </div>
    </div>
</div>
Example #12
0
?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2">Site Anahtar Kelimeleri</label>
                    <div class="col-sm-10">
                        <?php 
echo form_textarea('frmSiteKeywords', ayar_getir('sitekeywords'), 'class="form-control"');
?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2">Site Açıklaması (Description)</label>
                    <div class="col-sm-10">
                        <?php 
echo form_textarea('frmSiteDescription', ayar_getir('sitedescription'), 'class="form-control"');
?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary">Ayarları Kaydet</button>
                    </div>
                </div>
                <?php 
echo form_close();
?>

            </div>
        </div>
    </div>