function visitanteSetActive($id) { $n = getTableCount("visitantes", "id_visitante = " . dbInteger($id), ""); if ($n == 0) { return false; } else { visitanteUpdateStatus($id, "A"); return true; } }
function elementoCount($tipo = "", $sexo = "", $id_delegacao = -1) { $where = ''; if ($id_delegacao !== -1) { $where .= $where == '' ? '' : ' AND '; $where .= "id_delegacao = " . dbInteger($id_delegacao); } if ($tipo !== "") { $where .= $where == '' ? '' : ' AND '; $where .= "tipo = " . dbString($tipo); } if ($sexo !== "") { $where .= $where == '' ? '' : ' AND '; $where .= "sexo = " . dbString($sexo); } $where .= $where == '' ? '' : ' AND '; $where .= "status <> " . dbString("X"); return getTableCount("elementos", $where); }
function equipaCount() { return getTableCount("equipas", "status <> 'X'"); }
include "../include/database.inc"; include "../include/common.inc"; include "../include/page.inc"; $id = $_GET['id']; $pageNo = $_GET['pageNo']; $seac_i = $_GET['seac_i']; $seac_t = $_GET['seac_t']; $page = new Page(); if ($pageNo) { $page->pageNo = $pageNo; } $page->pagename = "list.php?id={$id}&"; $menuT = getTableById("menu", $id); $seac_sql = $seac_i ? " and " . $seac_t . " like '%" . $seac_i . "%' " : ""; $list = getTableByConList("content", "menu = {$id} " . $seac_sql . " order by in_date desc limit " . $page->getBegin() . ",{$page->pageSize}"); $page->pageCount = getTableCount("content", "menu = {$id} " . $seac_sql); $menu = getTableByConList("menuset", "id = {$id} and isIndex = 1"); $menuAll = getTableByConList("menuset", "id = {$id}"); ?> <body> <div class="commonDiv"> <div class="commontop">模块【<?php echo $menuT->menuname; ?> 】</div> <table border="0" align="center" cellpadding="0" cellspacing="0" class="commonTable" > <tr> <th width="100" height="28">序号</th> <th width="150">标题</th> <?php while (list($key, $val) = each($menu)) {
function rdCheckLogin($user, $password) { $count = getTableCount("delegacoes", "login = "******" AND password = "******" AND status <> 'X'", ""); return $count == 1; }
function vsCheckLogin($user, $password) { $count = getTableCount("visitantes", "email = " . dbString($user) . " AND password = "******" AND status = 'A'", ""); return $count == 1; }
function apreciacaoExist($id_evento, $id_visitante) { $count = getTableCount("eventos_classificacoes", "id_evento = " . dbInteger($id_evento) . " AND " . "id_visitante = " . dbInteger($id_visitante)); return $count == 0 ? false : true; }
function delegacaoCount() { return getTableCount("delegacoes", "status <> 'X'"); }