本文整理汇总了PHP中add_js函数的典型用法代码示例。如果您正苦于以下问题:PHP add_js函数的具体用法?PHP add_js怎么用?PHP add_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_js函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editar
public function editar()
{
add_css(array('iCheck/all'));
add_js_('//maps.google.com/maps/api/js?sensor=false&foo=bar');
add_js(array('plugins/iCheck/icheck.min', 'jqueryvalidation/dist/jquery.validate', 'jqueryvalidation/dist/additional-methods.min', 'plugins/input-mask/jquery.inputmask', 'plugins/input-mask/jquery.inputmask.extensions', 'inei.validation', 'facebox/src/facebox', 'jquery-ui.min'));
if (isset($_REQUEST['editarLocal']) && $this->input->post('local_id_local') !== '') {
$idLocal = $this->input->post('local_id_local');
$status = $this->modeloLocalAdministrativo->editar_local($this->input->post(NULL, TRUE), $idLocal);
$this->compruebaStatus($status, 'editado');
} else {
$this->load->model('ajax/ajax_model', 'modeloAjax');
$idLocal = $this->input->get('idLocal');
$datos['local'] = $this->modeloLocalAdministrativo->obtener_local($idLocal);
$datos['sedes'] = $this->modeloAjax->todas_las_sedes($this->sedeOperativa);
$datos['sede_provinciales'] = $this->modeloAjax->obtener_sede_provincial(array('sede_operativa' => $datos['local']['cod_sede_operativa']));
$datos['sede_distritales'] = $this->modeloAjax->obtener_sede_distrital_por_distrito($datos['local']['ccdi'], $datos['local']['ccpp'], $datos['local']['ccdd'], $datos['local']['cod_sede_operativa']);
$datos['departamentos'] = $this->modeloAjax->obtener_departamentos_por_sede($datos['local']['cod_sede_operativa']);
$datos['provincias'] = $this->modeloAjax->obtener_provincias_por_departamento($datos['local']['ccdd'], $datos['local']['cod_sede_operativa']);
$datos['distritos'] = $this->modeloAjax->obtener_distritos_por_provincia($datos['local']['ccpp'], $datos['local']['ccdd'], $datos['local']['cod_sede_operativa']);
$datos['titulo'] = "Editar Local de " . $this->titulo;
$datos['title'] = $this->titulo;
$datos['contenido'] = 'locales/administrativo/editar_vista';
$this->load->view('plantilla', $datos);
}
}
示例2: index
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
if ($this->session->userdata('logged_in')) {
$session_data = $this->session->userdata('logged_in');
$data['nome'] = $session_data['nome'];
$data['creditos'] = $session_data['creditos'];
$data['id'] = $session_data['id'];
add_css('jquery.modal.css');
add_js(array('jquery.modal.js', 'busca.js'));
$data['title'] = "Resultado da Busca";
$busca = $this->input->post('search');
$this->load->model('busca_model');
$data['books'] = $this->busca_model->listar_logged($busca, $session_data['id']);
$data['busca'] = $busca;
$this->load->view('master/header', $data);
$this->load->view('busca');
$this->load->view('master/footer');
} else {
add_css('jquery.modal.css');
add_js('jquery.modal.js');
$data['title'] = "Resultado da Busca";
$busca = $this->input->post('search');
$this->load->model('busca_model');
$data['books'] = $this->busca_model->listar_unlogged($busca);
$data['busca'] = $busca;
$this->load->view('master/header', $data);
$this->load->view('busca');
$this->load->view('master/footer');
}
}
示例3: nivel_tres
public function nivel_tres()
{
add_css(array('datatables/dataTables.bootstrap'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min'));
$datos['titulo'] = "Capacitación de nivel III";
$datos['contenido'] = "cobertura/niveles/nivel_tres/index_nivel_tres_vista";
$this->load->view('plantilla', $datos);
}
示例4: index
public function index()
{
add_css(array('datatables/dataTables.bootstrap'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min'));
$datos['titulo'] = "Capacitación de Directores";
$datos['contenido'] = "cobertura/director/index_director_vista";
$this->load->view('plantilla', $datos);
}
示例5: index
public function index()
{
add_css(array('datatables/dataTables.bootstrap', 'iCheck/all'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min', 'jqueryvalidation/dist/jquery.validate.min', 'jqueryvalidation/dist/additional-methods.min', 'plugins/input-mask/jquery.inputmask', 'plugins/input-mask/jquery.inputmask.extensions', 'inei.validation', 'facebox/src/facebox', 'jquery-ui.min'));
$datos['locales'] = $this->modeloLocal->todos_los_locales($this->sedeOperativa);
$datos['titulo'] = "Consecución de Locales";
$datos['contenido'] = 'locales/capacitacion/listado_vista';
$this->load->view('plantilla', $datos);
}
示例6: systeminfos
/**
*
*/
public function systeminfos()
{
if ($this->auth->is_superadmin()) {
add_js("development_systeminfos");
$this->load->view("development_systeminfos", $this->data);
return;
}
redirect($this->router->default_controller);
}
示例7: index
public function index()
{
add_css(array('datatables/dataTables.bootstrap'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min', 'jqueryvalidation/dist/jquery.validate', 'jqueryvalidation/dist/additional-methods.min', 'facebox/src/facebox', 'jquery-ui.min'));
$datos['titulo'] = "Inventario distrito";
$datos['contenido'] = 'inventario/distrito/listado_inventario_distrito_vista';
$datos['material_distrito'] = $this->modeloInventarioDistrito->lista_material_distrito();
$this->load->view('plantilla', $datos);
}
示例8: index
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/cadastro
* - or -
* http://example.com/index.php/cadastro/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/cadastro/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
add_js(array('jquery.form.validator.js', 'cadastro.js'));
$data['title'] = "Cadastro";
$data['success_message'] = $this->session->flashdata('success_message');
$this->load->view('master/header', $data);
$this->load->view('cadastro');
$this->load->view('master/footer');
}
示例9: index
public function index()
{
add_css(array('datatables/dataTables.bootstrap'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min', 'facebox/src/facebox', 'jqueryvalidation/dist/jquery.validate.min', 'jqueryvalidation/dist/additional-methods.min', 'inei.validation', 'jquery-ui.min'));
$datos['rutas'] = $this->modelRuta->todos_los_rol_rutas();
$datos['titulo'] = "Roles";
$datos['contenido'] = 'ruta/listado_vista';
$this->load->view('plantilla', $datos);
}
示例10: reporte_directorio
public function reporte_directorio()
{
add_css(array('datatables/dataTables.bootstrap', 'iCheck/all'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min'));
$this->load->model('locales/locales_administrativo_model', 'modeloLocal');
$datos['locales'] = $this->modeloLocal->todos_los_locales($this->sedeOperativa);
$datos['titulo'] = "Directorio de Locales";
$datos['contenido'] = 'locales/reportes/directorio_vista';
$this->load->view('plantilla', $datos);
}
示例11: index
public function index()
{
add_css(array('datatables/dataTables.bootstrap', 'iCheck/all'));
add_js(array('plugins/datatables/jquery.dataTables.min', 'plugins/datatables/dataTables.bootstrap.min', 'jqueryvalidation/dist/jquery.validate', 'jqueryvalidation/dist/additional-methods.min', 'facebox/src/facebox', 'jquery-ui.min'));
add_js_(array('plugins/moment/min/moment.min', 'plugins/moment/locale/es'));
//$datos['totalRol'] = $this->modeloUsuario->todos_los_roles();
$datos['totalUsuarios'] = $this->modeloUsuario->todos_los_usuarios();
$datos['titulo'] = "Lista de usuarios";
$datos['contenido'] = 'usuario/listado_usuario_vista';
$this->load->view('plantilla', $datos);
}
示例12: index
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
if ($this->session->userdata('logged_in')) {
$session_data = $this->session->userdata('logged_in');
$data['nome'] = $session_data['nome'];
$data['creditos'] = $session_data['creditos'];
}
add_js(array('jquery.cycle.min.js', 'jquery.cycle.carousel.min.js', 'inicial.js'));
$this->load->model('inicial_model');
$data['books'] = $this->inicial_model->listar();
$this->load->view('master/header', $data);
$this->load->view('inicial');
$this->load->view('master/footer');
}
示例13: paint
public function paint($page, $data = NULL)
{
$this->data['css'] = add_css($this->css);
$this->data['meta'] = add_meta($this->meta);
$this->data['js'] = add_js($this->js);
$this->data['title'] = $this->title;
$this->data['body_class'] = $this->CI->router->fetch_class();
if (!is_null($data)) {
foreach ($data as $key => $value) {
$this->data[$key] = $value;
}
}
foreach ($this->slice as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
if (method_exists($this->CI->slices, $v)) {
$result = call_user_func_array(array($this->CI->slices, $v), array());
foreach ($result as $restult_k => $result_v) {
if (!isset($this->data[$restult_k])) {
$this->data[$restult_k] = $result_v;
}
}
}
$this->data[$k] = $this->CI->load->view('slices/' . $v, $this->data, TRUE) . "\n";
}
} elseif (!is_numeric($key)) {
if (method_exists($this->CI->slices, $key)) {
$result = call_user_func_array(array($this->CI->slices, $key), array());
foreach ($result as $k => $v) {
if (!isset($this->data[$k])) {
$this->data[$k] = $v;
}
}
}
$this->data[$key] = $this->CI->load->view('slices/' . $value, $this->data, TRUE) . "\n";
} else {
if (method_exists($this->CI->slices, $value)) {
$result = call_user_func_array(array($this->CI->slices, $value), array());
foreach ($result as $restult_k => $result_v) {
if (!isset($this->data[$restult_k])) {
$this->data[$restult_k] = $result_v;
}
}
}
$this->data[$value] = $this->CI->load->view('slices/' . $value, $this->data, TRUE) . "\n";
}
}
$this->data['content'] = $this->CI->load->view('pages/' . $page, $this->data, TRUE) . "\n";
$this->CI->load->view('layouts/' . $this->layout, $this->data);
}
示例14: add_js
function add_js($script = '')
{
if (is_array($script)) {
foreach ($script as $item) {
add_js($item);
}
} else {
$CI =& get_instance();
if (is_local($script)) {
$script = base_url() . $script;
}
if (!in_array($script, $CI->vunsy->js)) {
array_push($CI->vunsy->js, $script);
}
}
}
示例15: paint
public function paint($page, $data = NULL)
{
$this->data['css'] = add_css($this->css);
$this->data['meta'] = add_meta($this->meta);
$this->data['js'] = add_js($this->js);
$this->data['title'] = $this->title;
if (!is_null($data)) {
foreach ($data as $key => $value) {
$this->data[$key] = $value;
}
}
foreach ($this->slice as $slice) {
$this->data[$slice] = $this->CI->load->view('slices/' . $slice, $this->data, TRUE) . "\n";
}
$this->data['content'] = $this->CI->load->view('pages/' . $page, $this->data, TRUE) . "\n";
$this->CI->load->view('layouts/' . $this->layout, $this->data);
}