<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; Theme::_('Style');
</ul> </div> </div> <div class="clear"><!-- --></div> <div id="about"> <div id="about-links"> <ul> <li><a href="<?php e($this->Producto["web"]); ?> ">Sitio Oficial</a></li> </ul> </div> <div id="about-info"> <h3>Acerca de <?php e($this->Empresa["nombre"]); ?> </h3> <p><?php e($this->Empresa["descripcion"]); ?> </p> </div> <div class="clear"><!-- --></div> </div> <?php Theme::_('footer');
fps en formato <a href="http://en.wikipedia.org/wiki/<?php e(Formats::get($this->ext)); ?> "><?php e(Formats::get($this->ext)); ?> </a>. </p> <?php if ($this->comment) { ?> <p><?php e($this->comment); ?> </p> <?php } ?> <big> <a href="/d/<?php e($this->id); ?> .html">Descargar</a> </big> <?php Theme::_('Footer');
$datos["TipoTemas"]["P"] = "problema"; $datos["Empresa"] = $empresa[0]; $datos["Productos"] = $productos; $datos["Temas"] = $temas; switch ($Tipo) { case 1: $datos["TemaId"] = "1"; $datos["Tema"] = "Preguntas"; break; case 2: $datos["TemaId"] = "2"; $datos["Tema"] = "Ideas"; break; case 3: $datos["TemaId"] = "3"; $datos["Tema"] = "Problemas"; break; default: $datos["TemaId"] = "0"; $datos["Tema"] = "Temas"; } $temp = Db::query("SELECT id FROM temas where id_empresa={$EmpresaId} and activo=1"); $datos["CountTemas"] = count($temp); $temp = Db::query("SELECT id FROM temas where id_empresa={$EmpresaId} and activo=1 and tipo=1"); $datos["CountPreguntas"] = count($temp); $temp = Db::query("SELECT id FROM temas where id_empresa={$EmpresaId} and activo=1 and tipo=2"); $datos["CountIdeas"] = count($temp); $temp = Db::query("SELECT id FROM temas where id_empresa={$EmpresaId} and activo=1 and tipo=3"); $datos["CountProblemas"] = count($temp); Theme::_('empresa', $datos);
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; $id = isset($_GET['t']) ? intval($_GET['t']) : 0; $tarjetas = Db::query("SELECT tarjetas.id\n , tarjetas.nombre\n , tarjetas.cargo\n , tarjetas.empresa\n , MD5(tarjetas.email) AS avatar\n , tarjetas.direccion1\n , tarjetas.direccion2\n , tarjetas.ciudad\n , tarjetas.estado\n , tarjetas.pais\n , tarjetas.telefono\n , tarjetas.fax\n , tarjetas.web\n , estilos.id AS estilo\n , estilos.clase\n , COUNT(abusos.id) AS abusos\n , tarjetas.vistas\n , tarjetas.listadas\n , tarjetas.descargas\n FROM tarjetas\n LEFT JOIN estilos ON estilos.id = tarjetas.estilo AND estilos.activo = 1\n LEFT JOIN abusos ON abusos.tarjeta = tarjetas.id\n WHERE tarjetas.id = '{$id}'\n GROUP BY tarjetas.id\n LIMIT 1"); if ($tarjetas) { Db::query("UPDATE tarjetas\n SET vistas = vistas + 1\n WHERE id = '{$id}'"); Theme::_('Tarjeta', array('title' => "{$tarjetas[0]['nombre']} « {$tarjetas[0]['empresa']}", 'titleH1' => "{$tarjetas[0]['nombre']}", 'tarjeta' => $tarjetas[0], 'clase' => $tarjetas[0]['clase'] ? $tarjetas[0]['clase'] : 'default')); } else { Theme::_('Tarjeta', array('title' => "Contacto Inexistente « " . Config::get('siteTagline'), 'tarjeta' => array())); }
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; Theme::_('Script');
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; $query = trim(Request::getPost('q')); if (!empty($query) && strlen($query) > 2 && Request::isPost()) { $dataQuery = strtolower($query); $dataQuery = str_replace(' ', '%', $dataQuery); $data = Db::query("SELECT s.id\n FROM subs s\n WHERE LCASE(s.filename) LIKE '%{$dataQuery}%'\n ORDER BY s.downloads DESC"); $ids = array(); foreach ((array) $data as $row) { $ids[] = $row['id']; } if (empty($data) || empty($ids)) { Theme::_('NotFound'); exit; } $search = Db::query("SELECT s.id\n FROM search s\n WHERE LCASE(s.query) = '" . strtolower($query) . "'"); if ($search) { $id = $search[0]['id']; Db::query("UPDATE search\n SET ids = '" . implode(',', $ids) . "'\n WHERE id = '{$id}'"); } else { $id = Db::insert('search', array('query' => $query, 'cant' => 0, 'ids' => implode(',', $ids))); } header("Location: /q/{$id}.html"); } else { Theme::_('NotFound'); }
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; $id = Request::getQuery('id'); if (is_numeric($id)) { $where = "empresas.id = '{$id}'"; } else { $where = "empresas.abbr = '{$id}'"; } $empresas = Db::query("SELECT empresas.id\n , empresas.nombre\n , empresas.slogan\n , empresas.logo\n , empresas.descripcion\n , empresas.web\n FROM empresas\n WHERE {$where}\n AND empresas.activo = 1\n LIMIT 1"); if (!$empresas) { Theme::_('empresas-notfound'); exit; } $styles = array('q' => 'Pregunta', 'i' => 'Idea', 'p' => 'Problema'); $style = substr(strtolower(Request::getQuery('style', 'q')), 0, 1); $styleName = $styles[$style]; $styleWhere = " AND productos.admite_" . strtolower($styleName) . "s = 1"; $productos = Db::query("SELECT productos.id\n , productos.nombre\n , productos.logo\n FROM productos\n WHERE productos.activo = 1\n {$styleWhere}\n ORDER BY productos.nombre"); Theme::_('temas-agregar', array('title' => $style == 'p' ? "Nuevo {$styleName}" : "Nueva {$styleName}", 'empresa' => $empresas[0], 'productos' => $productos));
} $file = $_FILES['sub']['name']; $frame = Request::getPost('frame'); $comment = Request::getPost('comment'); $credits = Request::getPost('credits'); if (empty($frame)) { return 'Falta el frame.'; } $format = substr($file, -3); $formatName = Formats::get($format); if (empty($formatName)) { return 'El archivo no es de un formato válido.'; } $filename = substr($file, 0, strlen($file) - 4); $id = Db::insert('subs', array('filename' => $filename, 'ext' => $format, 'frame' => $frame, 'comment' => $comment, 'credits' => $credits, 'time' => time())); $fullpath = "{$root}/upload/{$id}"; # $fullpath = "/var/www/subs/$id"; if (!@move_uploaded_file($_FILES['sub']['tmp_name'], $fullpath)) { if ($id) { Db::delete('subs', "id = '{$id}'"); } return 'No se logró subir el archivo, intente nuevamente en unos minutos.'; } header("Location: /{$id}.html"); } $msg = ''; if (Request::isPost()) { $msg = upload(); } Theme::_('Upload', array('msg' => $msg));
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; Theme::_('front');
$parts = explode('@', $buscar); $nombre = array_shift($parts); $empresa = implode('@', $parts); $title = "{$nombre} de {$empresa}"; $glue = 'AND'; $nombre = strtolower(str_replace(' ', '%', $nombre)); $empresa = strtolower(str_replace(' ', '%', $empresa)); if ($por == 'nombre' || empty($por)) { $where[] = "LOWER( tarjetas.nombre ) LIKE '%{$nombre}%'"; } if ($por == 'empresa' || empty($por)) { $where[] = "LOWER( tarjetas.empresa ) LIKE '%{$empresa}%'"; } } else { $buscar = strtolower(str_replace(' ', '%', $buscar)); if ($por == 'nombre' || empty($por)) { $where[] = "LOWER( tarjetas.nombre ) LIKE '%{$buscar}%'"; } if ($por == 'empresa' || empty($por)) { $where[] = "LOWER( tarjetas.empresa ) LIKE '%{$buscar}%'"; } } } if ($where) { $tarjetas = Db::query("SELECT tarjetas.id\n , tarjetas.nombre\n , tarjetas.empresa\n FROM tarjetas\n WHERE " . implode(" {$glue} ", $where) . "\n ORDER BY tarjetas.{$order}"); if ($tarjetas) { Db::query("UPDATE tarjetas\n SET listadas = listadas + 1\n WHERE " . implode(" {$glue} ", $where) . ""); } } Theme::_('Listar', array('title' => $title, 'tarjetas' => $tarjetas));
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; Theme::_('FrontPage');
<?php $root = realpath(dirname(__FILE__)); include_once "{$root}/config.php"; include_once "{$root}/common.php"; $id = isset($_GET['t']) ? intval($_GET['t']) : 0; $tarjetas = Db::query("SELECT tarjetas.id\n , tarjetas.nombre\n FROM tarjetas\n WHERE tarjetas.id = '{$id}'\n LIMIT 1"); if ($tarjetas) { Db::insert('abusos', array('tarjeta' => $id, 'ip' => Request::getIP(), 'fecha' => time())); } Theme::_('Reportar', array('id' => $id));
<?php $root = realpath(dirname(__FILE__)); $root = "{$root}/.."; if (!is_readable("{$root}/config.php")) { die('<pre><strong>Error</strong>: Falta config.php</pre>'); } include_once "{$root}/config.php"; include_once "{$root}/common.php"; Theme::_('install');