function loadView() { setLimitRows(15000); $this->searchResults = $this->select("usuario_id={$this->usuario_id} AND vista='{$this->vista}'"); resetLimitRows(); if ($this->nRes > 0) { $this->ID = $this->searchResults[0]->ID; $visibility = unserialize($this->searchResults[0]->campos_ser); $script = "<script type=\"text/javascript\" language=\"JavaScript1.3\">\n"; $script .= "function loadView(){\n"; foreach ($visibility as $key => $value) { if ($value != 'none') { $value = ""; } $script .= "\tvar x = document.getElementsByName('{$key}');\n"; $script .= "\tfor ( i=0 ; i < x.length ; i++ ){\n"; $script .= "\t\tx[i].style.display = '{$value}';\n"; $script .= "\t}\n"; } $script .= "}\n \tloadView();\n"; $script .= "</script>\n"; } echo $script; }
function inGroup($name = '') { $g = newObject("group"); setLimitRows(32); $a = $g->select("(code&{$this->grupos}=code) AND active='Si' and groupname='{$name}'"); resetLimitRows(); if (sizeof($a) > 0) { return True; } else { return False; } }
<?php /*********************** Extended URI featuring MODULE APP ACTION ************************/ require_once "coreg2.php"; set_include_dir(dirname(__FILE__) . "/local/Tmpl/-"); require_once "Bilo/API_exports.php"; set_include_dir(dirname(__FILE__) . "/Bilo/-"); require_once "Lib/lib_session.php"; setLimitRows(20); $up = newobject("user_pref"); $up->getPrefByUser(BILO_uid()); $up->setPrefs(); if (!$isLoginScreen && !$SYS["GLOBAL"]["void_login"]) { if (BILO_isLogged() == false) { PlantHTML(array("location" => $SYS["ROOT"] . "/Login/login.php"), "opener"); die; } else { if (BILO_isOperator() || BILO_isAdmin()) { echo ''; } else { PlantHTML(array("location" => $SYS["ROOT"] . "/Login/login.php"), "opener"); die; } } }
<?php require_once "Biblio.php"; $libro = newObject("b_libro"); setLimitRows(15); $libro->searchResults = $libro->selectAll($offset, $sort); $extk = array(); listList($libro, $extk, "listadolibro"); resetLimitRows();
function listAll($field, $addVoidValue = True, $more = "") { if (empty($more)) { $all = $this->selectAll(); } else { setLimitRows(50); $all = $this->select($more); resetLimitRows(); } if ($addVoidValue) { $list[1] = "--"; } foreach ($all as $k => $o) { if (method_exists($o, $field)) { debug("Llamada listAll tiene argumento a funcion", "red"); $list[$o->ID] = $o->{$field}(); } else { $list[$o->ID] = $o->{$field}; } } return $list; }
$ID = isset($ID) ? $ID : 1; $max = 4; $p = newObject("post", $ID); $origen = $p->traeOrigen(); $url = $p->traeUrl(); echo $SESSION['fecha']; if ($origen != $url) { $p->visitas++; $p->save(); } $f = newObject("foro", $foro_id); $padre = $ID; $s = newObject("post", $padre); $defpost = "Foro: <b><a href=\"index.php\">Foros</a> --> <a href=\"index2.php?foro_id={$foro_id}\">{$f->title}</a> --> {$s->title}</b>"; $p->bread = $defpost; plantHTML($p, "view"); $u = newObject("post"); setLimitRows($max); $u->searchResults = $u->select("p_id={$ID}", $offset, $sort); $filas = _affected_rows(); if ($filas == 0) { $offset = 0; } setNavVars(array("ID", "foro_id")); $u->p_id = $ID; $u->foro_id = $foro_id; $external_data = array("nuevo3" => 'code#if ($object->fecha >= ' . $_SESSION['fecha'] . ') { $_SESSION["nuevo"]="verdadero"; return "N U E V O";}'); listList($u, $external_data, "list_children");
set_include_dir(dirname(__FILE__) . "/../{$ONEAPP}/-"); } $magic = array(); $ID = isset($ID) ? $ID : 1; $id_curso = isset($id_curso) ? $id_curso : 1; $u = newObject("report", $ID); $u->id_curso = $id_curso; if ($u->tipo == 'HardCoded') { if ($print_mode != "yes") { $dummy = 1; } else { if (!ini_get("output_buffering")) { ob_start(); } } setLimitRows(5000); require_once "reports/{$u->url}.php"; if ($print_mode != "yes") { $dummy = 1; } else { $data = ob_get_contents(); ob_clean(); require_once "Lib/lib_PDF.php"; if ($SYS["GLOBAL"]["spooler"] == "ASPooler") { $cdata = urlencode($data); jsAction("location.href='http://" . $SYS["GLOBAL"]["ip_spooler"] . ":9090?{$cdata}'"); } else { PDF_html_2_pdf($data); } } } else {
<?php require_once "Bilo.php"; if (BILO_isOperator()) { $g = newObject("group"); $u = newObject("user"); $g->isAdmin = BILO_isAdmin(); setLimitRows(30); $g->searchResults = $g->select("active='Si'", $offset, $sort); listList($g, array(), "list_group"); resetLimitRows(); } else { echo "<h4 align=\"center\">PRIVILEGIOS INSUFICIENTES</h4>"; } ?>
if ($SYS["bcompiler_extension"]) { require_once "Lib/lib_list_ng.php.phb"; $example = new DataGrid(); for ($i = 1; $i <= $M; $i += $M / 3) { $bm = getmicrotime(); setLimitRows($i); $a->searchResults = $a->selectAll(); ob_start(); $example->listList($a, array(), $tmpl); ob_end_clean(); $plist_time_ellapsed[$i] = getmicrotime() - $bm; } } for ($i = 1; $i <= $M; $i += $M / 3) { $bm = getmicrotime(); setLimitRows($i); $a->searchResults = $a->selectAll(); ob_start(); listList($a, array(), $tmpl); ob_end_clean(); $cplist_time_ellapsed[$i] = getmicrotime() - $bm; } $totaltime = getmicrotime() - $abm; $a->deletes("1=1"); $db_tg = new graph(500, 400); if ($SYS["bcompiler_extension"]) { $db_tg->y_data["barras"] = array_values($plist_time_ellapsed); } $db_tg->y_data["mbarras"] = array_values($cplist_time_ellapsed); $db_tg->x_data = array_keys($cplist_time_ellapsed); $db_tg->parameter["file_name"] = $SYS["BASE"] . "/Data/Img/Tmp/render";
<?php require_once "JasperReports.php"; $u = newObject("jasperreport"); $u->isAdmin = BILO_isAdmin(); $d = array("isPrint" => "fref#report|ID|Is_Print"); setLimitRows(15000); $u->searchResults = $u->selectAll($offset, $sort); resetLimitRows(); listList($u, $d, "list_reports"); ?>
<?php require_once "Noticias.php"; $myclase = newObject("notice"); //$myclase->titulo="Otra y Otra"; //$myclase->save(); setLimitRows(10); $myclase->searchResults = $myclase->selectAll($offset, $sort); $referencias_externas = array("id_cat" => 'code#if ($object->id_cat==10) return time();'); listList($myclase, $referencias_externas, "listado_ejemplo"); debug("#########################\nHola debug", "cyan");
<?php require_once "Bilo.php"; plantHTML(array(), "f_menu"); setLimitRows(50); $r = newObject("registro"); if (empty($sort)) { $sort = "dia DESC "; } $r->searchResults = $r->selectAll($offset, $sort); listList($r, array("usuario" => "xref#user|user_id|username"), "registros"); resetLimitRows(); HTML("footer");