Hallo! Selamat Datang di Marketplace produk digital, Freelancer terbaik di indonesia (69432 Members, 807 Products, 4726 Topic, 13078 Comments)

Code Template pada Swaarakalibata CI

Dibuat
Login Terakhir 12 Hari lalu,
Telah Dilihat 1801 Kali
Mahmud siregar Mengatakan : Sultan Account
  1. om robby mohon penjelasan code ini:
  2. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/reset.css" />
  3. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/main-stylesheet.css" />
  4. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/lightbox.css" />
  5. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/shortcode.css" />
  6. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/fonts.css" />
  7. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/gambars.css" />
  8. <link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/responsive.css" />

Ada 1 Jawaban

PHPMU.COM Support
commented on 22 Mei 2017 17:53:43
  1. Assalam, itu kode untuk me-load file css pada masing2 template mas,..
  2. <?php echo base_url(); ?>application/views/<?php echo template(); ?>/background/<?php echo background(); ?>/responsive.css
  3.  
  4. Berikut penjelasan dari URL di atas :
  5. <?php echo base_url(); ?> : Url utama/domain web
  6. application/views/ : directory yang dituju
  7. <?php echo template(); ?> : masuk ke directory template dengan status template aktif
  8. /background/ : akses directory background yang aktif,..
  9. /<?php echo background(); ?>/ : Folder background yang dituju..
  10.  
  11. <?php echo template(); ?> : kita ambil dari application/helpers/engine_helper.php :
  12. function template(){
  13. $ci = & get_instance();
  14. $query = $ci->db->query("SELECT folder FROM templates where aktif='Y'");
  15. $tmp = $query->row_array();
  16. if ($query->num_rows()>=1){
  17. return $tmp['folder'];
  18. }else{
  19. return 'errors';
  20. }
  21. }
  22.  
  23. <?php echo background(); ?> : kita ambil dari application/helpers/engine_helper.php :
  24. function background(){
  25. $ci = & get_instance();
  26. $bg = $ci->db->query("SELECT gambar FROM background ORDER BY id_background DESC LIMIT 1")->row_array();
  27. return $bg['gambar'];
  28. }
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!

Online