当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagination::fetchNextObject方法代码示例

本文整理汇总了PHP中Pagination::fetchNextObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::fetchNextObject方法的具体用法?PHP Pagination::fetchNextObject怎么用?PHP Pagination::fetchNextObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


在下文中一共展示了Pagination::fetchNextObject方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listEnviados

 /**
  * Lista de comunicados enviados (SENT)
  */
 function listEnviados()
 {
     global $uid;
     $db = new DB();
     $sql = "SELECT consecu, fecha, asunto, tipmens, fecvence, categoria, documto_id, borrado ";
     $sql .= "FROM mensajes WHERE documto_id = '{$uid}' AND borrado = '0' ORDER BY consecu DESC ";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=comunicados&do=list');
     $res = $objpag->result;
     $data = array();
     $x = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$x]['consecu'] = $line->consecu;
         $data[$x]['fecha'] = $line->fecha;
         $data[$x]['asunto'] = $line->asunto;
         $data[$x]['tipmens'] = $line->tipmens;
         $data[$x]['fecvence'] = $line->fecvence;
         $data[$x]['categoria'] = $line->categoria;
         $x++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Erudio_Smarty();
     $tpl->assign('com', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('comunicados/comunicadosEnviados.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:35,代码来源:Tareas.php

示例2: listEncuestas

 function listEncuestas()
 {
     global $uid, $uperms;
     $where = "";
     if (!$uperms['encuestas_w']) {
         $where = "WHERE publicado = 's'";
     }
     $db = new DB();
     $sql = "SELECT  * FROM encuestas {$where}";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=encuestas&do=list');
     $res = $objpag->result;
     $data = array();
     $x = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$x]['id'] = $line->id;
         $data[$x]['titulo'] = $line->titulo;
         $data[$x]['observaciones'] = $line->observaciones;
         $data[$x]['fecha'] = $line->fecha;
         $x++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Elfic_Smarty();
     $tpl->assign('lista', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('encuestas/encuestasList.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:33,代码来源:Encuestas.php

示例3: listAll

 /**
  * @desc Construye listado de usuarios e imprime template
  * @param $search
  * @return void (imprime plantilla)
  */
 function listAll($search = "", $grupo = "")
 {
     $where = "";
     if ($search != "") {
         $where .= "AND nombres LIKE '%{$search}%' OR apellidos LIKE '%{$search}%' ";
     }
     if ($grupo != "") {
         $where .= "AND id IN (SELECT usuario_id " . "FROM usuarios_grupos_links WHERE usuarios_grupo_id = {$grupo}) ";
     }
     $db = new DB();
     $sql = "SELECT * FROM usuarios ";
     $sql .= "WHERE id > 0 " . $where;
     $sql .= " ORDER BY nombres ASC";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=usuarios&do=search');
     $res = $objpag->result;
     $data = array();
     $i = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$i]['id'] = $line->id;
         $data[$i]['nombres'] = $line->nombres;
         $data[$i]['apellidos'] = $line->apellidos;
         $data[$i]['email'] = $line->email;
         $data[$i]['creado'] = $line->creado;
         $data[$i]['modificado'] = $line->modificado;
         $data[$i]['ultimoingreso'] = $line->ultimoingreso;
         $data[$i]['activo'] = $this->getIcon($line->activo);
         $data[$i]['esadmin'] = $this->getIcon($line->esadmin);
         $i++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Elfic_Smarty();
     $g = new Grupos();
     $tpl->assign('grupos', $g->getGruposArray());
     $tpl->assign('grupo_id', $grupo);
     $tpl->assign('u', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('usuarios/usuariosList.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:50,代码来源:Usuarios.php

示例4: IN

 function _buildReport($mid = "", $full = 0)
 {
     if ($mid != "") {
         $and = "AND u.municipio_id = {$mid} ";
     }
     $sql = "SELECT u.id, u.name, u.username, u.email, u.usertype, u.block, u.sendEmail, ";
     $sql .= "u.gid, u.registerDate, u.lastvisitDate, u.cedula, u.perfil, u.pais, ";
     $sql .= "u.departamento, u.id_municipio, vereda, u.direccion, u.info_dir, ";
     $sql .= "u.telefono, u.celular, u.fax, u.visito, u.aprobo, m.municipio, d.departamento ";
     $sql .= "FROM mmb_users u ";
     $sql .= "INNER JOIN municipio m ON m.id_municipio = u.id_municipio ";
     $sql .= "INNER JOIN departamento d ON d.id_departamento = u.departamento ";
     $sql .= "WHERE u.perfil IN(2,4,6,7) " . $and;
     $sql .= " ORDER BY u.registerDate DESC";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 100, 'index2.php?com=reportes&do=usuarios');
     $res = $objpag->result;
     if ($full == 1) {
         $db = new DB();
         $res = $db->query($sql);
     }
     $d = array();
     $x = 0;
     $line = "";
     while ($line = $objpag->fetchNextObject($res)) {
         $d[$x]['id'] = $line->id;
         $d[$x]['name'] = $line->name;
         $d[$x]['username'] = $line->username;
         $d[$x]['perfil'] = Usuarios::getNombrePerfil($line->perfil);
         $d[$x]['municipio'] = $line->municipio;
         $d[$x]['departamento'] = $line->departamento;
         $d[$x]['productos'] = $this->getProductos($line->id);
         $d[$x]['registerDate'] = $line->registerDate;
         $x++;
     }
     $this->anchors = $objpag->anchors;
     $this->total = $objpag->total;
     return $d;
 }
开发者ID:peterweck,项目名称:catman,代码行数:43,代码来源:Reportes_Usuarios_List.php

示例5: listAsistenciaFuncionarios

 function listAsistenciaFuncionarios($funcionario = "")
 {
     global $uid, $uperms;
     $and = "";
     if (!$uperms['asistencia_w']) {
         $and = "AND usuario_id = {$uid} ";
     }
     if ($funcionario != '') {
         $and .= "AND a.usuario_id = {$funcionario} ";
     }
     $db = new DB();
     $sql = "SELECT  a.id, a.usuario_id, a.entrada, a.salida, a.comentarios, " . "CONCAT(u.nombres, ' ', u.apellidos) AS funcionario " . "FROM " . TBL_ASISTENCIA . " a INNER JOIN " . TBL_USUARIOS . " u ON u.id = a.usuario_id " . "WHERE a.id > 0 {$and} AND a.id NOT IN (SELECT asistencias_id FROM asistencias_tutores " . "WHERE asistencias_id = a.id)";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=asistencia&do=list_fun');
     $res = $objpag->result;
     $data = array();
     $x = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$x]['id'] = $line->id;
         $data[$x]['usuario_id'] = $line->usuario_id;
         $data[$x]['funcionario'] = $line->funcionario;
         $data[$x]['entrada'] = $line->entrada;
         $data[$x]['salida'] = $line->salida;
         $data[$x]['comentarios'] = $line->comentarios;
         $x++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Elfic_Smarty();
     $tpl->assign('funcionarios', Grupos::getUsuariosGrupo(3));
     $tpl->assign('sel_func', $funcionario);
     $tpl->assign('lista', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('asistencia/asistenciaFuncionariosList.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:40,代码来源:Asistencia.php

示例6: listar

 public function listar($curso = "", $tutor = "")
 {
     global $uid, $uperms, $starting;
     $and = "";
     if (!$uperms['evaluacion_w']) {
         $and .= "AND e.estudiante_id = '{$uid}'";
     }
     if ($curso != "") {
         $and .= "AND ct.nombre LIKE  '%{$curso}%' ";
     }
     if ($tutor != "") {
         $and .= "AND t.nombres LIKE  '%{$tutor}%' OR t.apellidos LIKE '%{$tutor}%' ";
     }
     $db = new DB();
     $sql = "SELECT e.id, e.estudiante_id, e.tutor_id, e.curso_id, e.concepto_tutor, " . "CONCAT(u.nombres, ' ', u.apellidos) AS estudiante, ct.nombre, ct.nombre AS catedra, " . "CONCAT(t.nombres, ' ', t.apellidos) AS tutor " . "FROM  eval_tutores_estu e " . "INNER JOIN usuarios u ON e.estudiante_id = u.id " . "INNER JOIN usuarios t ON e.tutor_id = t.id " . "INNER JOIN cursos c ON e.curso_id = c.id " . "INNER JOIN catedra ct ON c.catedra_id = ct.id " . $and . " ORDER BY e.id DESC";
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=evaluacion');
     $res = $objpag->result;
     $data = array();
     $x = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$x]['id'] = $line->id;
         $data[$x]['estudiante_id'] = $line->estudiante_id;
         $data[$x]['estudiante'] = $line->estudiante;
         $data[$x]['curso_id'] = $line->curso_id;
         $data[$x]['curso'] = $line->catedra;
         $data[$x]['tutor_id'] = $line->tutor_id;
         $data[$x]['tutor'] = Utils::getNombreUsuario($line->tutor_id);
         $data[$x]['concepto'] = $line->concepto_tutor;
         $x++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Elfic_Smarty();
     $tpl->assign('data', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('evaluacion' . DS . 'evaluacionList.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:38,代码来源:Evaluacion.php

示例7: listAll

 public function listAll($curso = "")
 {
     global $uid, $uperms;
     $and = "";
     if (!$uperms['cursos_w']) {
         $and .= "AND c.tutor_id = '{$uid}' ";
     }
     if ($curso != "") {
         $and .= "AND ct.nombre LIKE '%{$curso}%' ";
     }
     $db = new DB();
     $sql = "SELECT c.id, c.grupo, c.dia, c.hora, c.estado, ct.nombre, c.tutor_id, " . "CONCAT(p.anio,'-',p.semestre) AS periodo, " . "pr.programa, CONCAT(u.nombres, ' ', u.apellidos) AS tutor FROM cursos c " . "INNER JOIN catedra ct ON c.catedra_id = ct.id " . "INNER JOIN periodos p ON c.periodo_id = p.id " . "INNER JOIN programas pr ON ct.programas_id = pr.id " . "INNER JOIN usuarios u ON c.tutor_id = u.id " . "WHERE c.id > 0 {$and}";
     if (isset($_GET['starting'])) {
         $starting = $_GET['starting'];
     } else {
         $starting = 0;
     }
     $objpag = new Pagination($sql, $starting, 20, 'index2.php?com=cursos&do=search');
     $res = $objpag->result;
     $data = array();
     $x = 0;
     while ($line = $objpag->fetchNextObject($res)) {
         $data[$x]['id'] = $line->id;
         $data[$x]['programa'] = $line->programa;
         $data[$x]['grupo'] = $line->grupo;
         $data[$x]['curso'] = $line->nombre;
         $data[$x]['periodo'] = $line->periodo;
         $data[$x]['tutor'] = $line->tutor;
         $data[$x]['tutor_id'] = $line->tutor_id;
         $data[$x]['dia'] = CatManUtils::getDiaNombre($line->dia);
         $data[$x]['hora'] = $line->hora;
         $data[$x]['agenda'] = $this->siTieneAgenda($line->id);
         $data[$x]['estado'] = Elfic::getBlockIcon($line->estado);
         $x++;
     }
     $anchors = $objpag->anchors;
     $total = $objpag->total;
     $tpl = new Elfic_Smarty();
     $tpl->assign('data', $data);
     $tpl->assign('anchors', $anchors);
     $tpl->assign('total', $total);
     $tpl->display('cursos/cursosList.tpl');
 }
开发者ID:peterweck,项目名称:catman,代码行数:43,代码来源:Cursos.php


注:本文中的Pagination::fetchNextObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。