$asset = new CMS_Asset(); $asset->add_themes_css('bootstrap.min.css', '{{ used_theme }}', 'default'); $asset->add_themes_css('style.css', '{{ used_theme }}', 'default'); $asset->add_themes_css('css/roboto.min.css', '{{ used_theme }}', 'default'); $asset->add_themes_css('css/material.min.css', '{{ used_theme }}', 'default'); $asset->add_themes_css('css/ripples.min.css', '{{ used_theme }}', 'default'); echo $asset->compile_css(); ?> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="{{ site_favicon }}"> <style type="text/css">{{ widget_name:section_custom_style }}</style> </head> <body> <?php echo $template['js']; $asset->add_cms_js("bootstrap/js/bootstrap.min.js"); $asset->add_themes_js('js/ripples.min.js', '{{ used_theme }}', 'default'); $asset->add_themes_js('js/material.min.js', '{{ used_theme }}', 'default'); $asset->add_themes_js('script.js', '{{ used_theme }}', 'default'); echo $asset->compile_js(); ?> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script type="text/javascript">{{ widget_name:section_custom_script }}</script> {{ widget_name:section_top_fix }} {{ widget_name:static_accessories_slideshow }} <div class="container"> <div class="row-fluid"> <div>
<?php echo $template['metadata']; ?> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="{{ site_favicon }}"> <!-- Le styles --> <?php $asset = new CMS_Asset(); $asset->add_themes_css('style.css', 'minimal', 'default'); $asset->add_themes_css('bootstrap.min.css', 'minimal', 'default'); echo $asset->compile_css(); $asset->add_cms_js("bootstrap/js/bootstrap.min.js"); $asset->add_cms_js('validate/js/number.js'); $asset->add_themes_js('script.js', 'minimal', 'default'); echo $asset->compile_js(TRUE); ?> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="{{ site_favicon }}"> </head> <body> {{ widget_name:quicklink }}
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="<?php echo $cms['site_favicon']; ?> "> <!-- Le styles --> <?php $asset = new CMS_Asset(); $asset->add_themes_css('style.css', $cms['site_theme'], 'default'); $asset->add_cms_css('bootstrap/css/bootstrap-all.min.css'); echo $asset->compile_css(); $asset->add_cms_js('nocms/js/jquery.js'); $asset->add_cms_js("bootstrap/js/bootstrap-all.min.js"); $asset->add_themes_js('script.js', $cms['site_theme'], 'default'); echo $asset->compile_js(TRUE); ?> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="<?php echo $cms['site_favicon']; ?> ">
/** * @author goFrendiAsgard * @param parent_id, max_menu_depth * @desc return navigation child if parent_id specified, else it will return root navigation */ public final function cms_widgets() { $user_name = $this->cms_username(); $user_id = $this->cms_userid(); $not_login = !$user_name ? "TRUE" : "FALSE"; $login = $user_name ? "TRUE" : "FALSE"; $super_user = $user_id == 1 ? "TRUE" : "FALSE"; $query = $this->db->query("SELECT \n \t\t\twidget_id, widget_name, is_static, title, \n \t\t\tdescription, url, slug, static_content \n FROM cms_widget AS w WHERE\n ( \n (authorization_id = 1) OR\n (authorization_id = 2 AND {$not_login}) OR\n (authorization_id = 3 AND {$login}) OR\n (\n (authorization_id = 4 AND {$login}) AND \n (\n (SELECT COUNT(*) FROM cms_group_user AS gu WHERE gu.group_id=1 AND gu.user_id ='" . addslashes($user_id) . "')>0\n OR {$super_user} OR\n (SELECT COUNT(*) FROM cms_group_widget AS gw\n WHERE \n gw.widget_id=w.widget_id AND\n gw.group_id IN \n (SELECT group_id FROM cms_group_user WHERE user_id = '" . addslashes($user_id) . "')\n )>0\n )\n )\n ) AND active=1"); $result = array(); foreach ($query->result() as $row) { // generate widget content $content = ''; if ($row->is_static == 1) { $content = $this->cms_parse_keyword($row->static_content); } else { // url $url = $row->url; if (!strpos(strtolower($url), 'http')) { $url = base_url($url); } // script $script = '$.ajax({'; $script .= 'url:"' . $url . '",'; $script .= 'data:{_only_content:true},'; $script .= 'success:function(response){'; $script .= '$("div#_cms_widget_' . $row->widget_id . '").html(response);'; $script .= '}'; $script .= '});'; // asset $asset = new CMS_Asset(); $asset->add_cms_js('nocms/js/jquery.js'); $asset->add_string_js($script); // content $content .= '<div id="_cms_widget_' . $row->widget_id . '">'; $content .= $asset->compile_js(true); $content .= '</div>'; } // make widget based on slug if (!isset($result[$row->slug])) { $result[$row->slug] = array(); } $result[$row->slug][] = array("widget_id" => $row->widget_id, "widget_name" => $row->widget_name, "title" => $this->cms_lang($row->title), "description" => $row->description, "content" => $content); } return $result; }
} foreach ($config_list as $config_name => $value) { $option_tag .= '<option value="{{ ' . $config_name . ' }}">configuration : ' . $config_name . '</option>'; $selected = ''; } // option for languages $option_language = ''; foreach ($language_list as $language) { $selected = $language == $current_language ? 'selected' : ''; $option_language .= '<option ' . $selected . ' value="' . $language . '">' . ucwords($language) . '</option>'; } $asset = new CMS_Asset(); $asset->add_cms_css('grocery_crud/css/jquery_plugins/chosen/chosen.css'); $asset->add_cms_css('grocery_crud/themes/flexigrid/css/flexigrid.css'); echo $asset->compile_css(); $asset->add_cms_js("grocery_crud/js/jquery_plugins/jquery.chosen.min.js"); $asset->add_cms_js("grocery_crud/js/jquery_plugins/config/jquery.chosen.config.js"); echo $asset->compile_js(); ?> <style type="text/css"> .text-area-section{ resize: none; white-space: nowrap; overflow: auto; min-width: 385px!important; min-height: 75px!important; margin-top: 10px!important; font-family: Courier; font-size: small; } </style>