Viewing file: collap.php (7.21 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<style type="text/css">
<!--
.Textogrande { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #333333}
.Textopeque { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333 }
.Titulo { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bolder; color: #FFFFFF}
.Titulo2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bolder; color: #666633}
input { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333; background-color: #E3F0F0; border: 1px #6699FF solid}
.Titulo3 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bolder; color: #333333}
select { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333; background-color: #D5EAEA; border: 1px #6699FF}
.TextopequeList { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333333 ; list-style-position: outside; list-style-image: url(fleroja.gif); list-style-type: disc; padding-left: 6px}
.TextograndeAzul { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #336699; font-weight: bold; text-decoration: none}
a { text-decoration: none; color: #333333}
a:hover { background-color: #D5EAEA; color: #6699FF}
ul.image
{
list-style-image: url(int.gif); margin-top: 1px; margin-right: 1px; margin-bottom: 1px; margin-left: 1px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px}
ul.square
{
list-style-type: square
}
.TextopequeList1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333 ; list-style-position: outside; list-style-image: url(fleroja.gif); list-style-type: disc }
-->
</style>
<?php
//////////// Si no se leyeron las variables que se activen estas ocpiones
$sapo = isset($con);
if ($sapo == false) {
$pecar = strlen($patron);
if ($pecar == 1) {
$patron = $patron . ".";
}
include('conect/conect.php');
$consul = "SELECT *
FROM cate where tema_id like '$patron%'"
. " order by tema_id";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$lenpa = strlen($patron);
$lenpa = $lenpa + 2;
$trasno = 0;
while ($myrow = mysql_fetch_array($result))
{
$tema = $myrow["tema_desc"];
$codigo = $myrow["tema_id"];
$id = $myrow["id"];
$largo = strlen($codigo);
if ($lenpa == $largo) {
$drr[$trasno] = 1;
//echo $drr[$trasno];
}else{
$drr[$trasno] = 0;
//echo $drr[$trasno];
}
$arr[$trasno] = $tema;
//echo $arr[$trasno];
$crr[$trasno] = $codigo;
//echo $crr[$trasno];
//echo "<br>";
$irr[$trasno] = $id;
$trasno++;
}
$items = $arr;
$citems = $crr;
$ditems = $drr;
$iitems = $irr;
$how = $trasno;
$primer = 1;
}
////////////////////////////////////////////////////////////////////////////
//////////// Si ya se leyeron las variables que se activen estas ocpiones
//1// Recupere las variables y conviertalas otra vez en arreglos
include('conect/conect.php');
if ($sapo == true) {
include('conect/conect.php');
$iitems = explode ("_", $isi);
$cha=0;
foreach ($iitems as $iti) {
$consul9 = "SELECT *
FROM cate where id = '$iti'";
$result9 = mysql_query($consul9,$db);
$num_filas9 = mysql_num_rows($result9);
$myrow9 = mysql_fetch_array($result9);
$gabi = $myrow9["tema_desc"];
$pabl = $myrow9["tema_id"];
$items[$cha] = $gabi;
$citems[$cha] = $pabl;
$cha++;
}
$ditems = explode ("_", $dsi);
//2// Cuentos items se recogieron en el arreglo
$how = 0;
foreach($iitems as $v) {
$how++;
}
//3// Coja el patron titi, comparelo con todos los codigos y a aquel que lo
///// contenga y ademas tenga un largo de mas 2 cambiele el item de publicacion
///// por el valor 1.
$protes = isset($titi);
if ($protes == true) {
//$titi = "1.";
$lentiti = strlen($titi);
if ($lentiti == 1) {
$titi = $titi . ".";
//echo $titi;
$lentiti = $lentiti + 1;
}
$lentiti = $lentiti + 2;
$conta = 0;
foreach($citems as $v) {
$result = strstr($v, $titi);
$lenow = strlen($result);
$lev = strlen($v);
if ($result != "" and $lenow == $lentiti) {
$ditems[$conta] = 1;
}
if ($result == "" and $lev >= $lentiti) {
$ditems[$conta] = 0;
}
//echo $conta . $result . "<br>";
$conta++;
}
$primer = 0;
//$ame = strlen($titi);
//$ame = $ame -2;
//$patron = substr($titi, 0, $ame);
$patron = $titix;
//echo $patron;
}else{
$primer = 1;
}}
////////////////////////////////////////////////////////////////////////////
//// Si se carga por primera vez, entonces coja los valores iniciales
if ($primer == 1) {
$inn = "";
$frst = 0;
foreach($irr as $v) {
if ($frst==0) {
$inn = $v;
}else{
$inn = $inn . "_" . $v;
}
$frst++;
}
$cnn = "";
$frst = 0;
foreach($crr as $v) {
if ($frst==0) {
$cnn = $v;
}else{
$cnn = $cnn . "_" . $v;
}
$frst++;
}
$dnn = "";
$frst = 0;
foreach($drr as $v) {
if ($frst==0) {
$dnn = $v;
}else{
$dnn = $dnn . "_" . $v;
}
$frst++;
}
}
////////////////////////////////////////
//// Si se carga por primera vez, entonces coja los valores iniciales
if ($primer != 1) {
$inn = "";
$frst = 0;
foreach($iitems as $v) {
if ($frst==0) {
$inn = $v;
}else{
$inn = $inn . "_" . $v;
}
$frst++;
}
$cnn = "";
$frst = 0;
foreach($citems as $v) {
if ($frst==0) {
$cnn = $v;
}else{
$cnn = $cnn . "_" . $v;
}
$frst++;
}
$dnn = "";
$frst = 0;
foreach($ditems as $v) {
if ($frst==0) {
$dnn = $v;
}else{
$dnn = $dnn . "_" . $v;
}
$frst++;
}
}
////////////////////////////////////////
/////////////////////// Modulo de publicacion
//echo "<img src=\"int1.gif\" width=\"12\" height=\"12\"><b><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"> $namepage
//</font></b><br>";
$count = 0;
echo "<ul class=\"image\">";
foreach($citems as $v) {
$consul78 = "SELECT *
FROM cate where tema_id = '$v'";
$result78 = mysql_query($consul78,$db);
$num_filas78 = mysql_num_rows($result78);
$myrow78 = mysql_fetch_array($result78);
$filesde = $myrow78["carpeta_template"];
//// Si si se puede publicar haga esto 2
if ($ditems[$count] == 1) {
$fo = "";
$len = strlen($v);
$nex = $count + 1;
/// Reemplazar
echo "<img src=\"linver.gif\" width=\"116\" height=\"1\"><br>";
//////
$gr1 = "";
$gr2 = "";
if ($len == 4) {
$gr1 = "<b>";
$gr2 = "</b>";
$fo = "int1.gif";
}
if ($len == 6) {
$gr1 = "";
$gr2 = "";
$fo = "int1.gif";
}
if ($len >= 8) {
$gr1 = "<i>";
$gr2 = "</i>";
$fo = "int.gif";
}
if ($nex < $how) {
$len1 = strlen($citems[$nex]);
if ($len < $len1) {
echo "<li>";
echo "<a href=\"$filesde?titi=$v&con=1&isi=$inn&dsi=$dnn&titix=$v\"><img src=\"cfle.gif\" width=\"7\" height=\"10\" border=\"0\"></a> ";
}else{
echo "<img src=\"$fo\" width=\"7\" height=\"10\"> ";
}
}else{
echo "<img src=\"$fo\" width=\"7\" height=\"10\"> ";
}
echo "<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><span class=\"Textopeque\"><a href=\"$filesde?titi=$v&con=1&isi=$inn&dsi=$dnn&titix=$v\">$gr1$items[$count]$gr2</a></span></font><br>";
echo "</li>";
}
///////2
$count++;
}
echo "</ul>";
?>
|