Пример #1
0
             if ($myrowcon[telefono_oficina]) {
                 $res .= resaltar($busqueda, $myrowcon[telefono_oficina]) . " (Oficina)<br />";
             }
             if ($myrowcon[telefono_celular]) {
                 $res .= resaltar($busqueda, $myrowcon[telefono_celular]) . " (Celular)<br />";
             }
             $res .= "</td></tr>";
         }
     }
     break;
 case 'Clave':
     //Checklist
     $sqlchecklist = "SELECT * FROM `checklist` WHERE `clave_organizacion` LIKE '" . $row[clave_organizacion] . "' ORDER BY id_checklist ASC";
     $resultchecklist = mysql_query($sqlchecklist, $db);
     $check = mysql_num_rows($resultchecklist);
     $res = "<tr class='even-row'><td class='list-column-picture'><img class='picture-thumbnail' src='../../images/org_avatar_32.png' width='32' height='32' alt='picture' /></td><td class=' list-column-left'><a class='keytext' href='detalles.php?organizacion=" . $row[clave_organizacion] . "'>" . resaltar($busqueda, $row[organizacion]) . "</a> <span class='highlight'>" . $row[clave_unica] . "</span> <span class='highlight' style='background-color:" . $resaltadocontacto . ";'>" . $ultimocontacto . "</span> ";
     if ($row[fecha_fundacion] != '0000-00-00') {
         $res .= "<img src='../../images/awardstar.png' /> ";
     } else {
         $res .= "<img src='../../images/awardstarbn.png' /> ";
     }
     if ($totcont != 0) {
         if ($totcump == $totcont) {
             $res .= "<img src='../../images/cake.png' /> ";
         } else {
             $res .= "<img src='../../images/cakebn.png' /> ";
         }
     } else {
         $res .= "<img src='../../images/userbn.png' /> ";
     }
     if ($numrfc != 0) {
Пример #2
0
<?php

require_once "utilHTML.php";
?>

<html>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
</head>
<body>
	
    <?php 
echo resaltar("Texto para resaltar");
echo eligeH("Texto en h2", "2");
for ($i = 0; $i < 10; $i++) {
    echo ponerParrafos("Texto en parrafos");
}
echo "Escribe texto";
echo crearInputText("texto", "text", "");
echo "<br/><br/>Elige uno<br/>";
echo "Rojo";
echo crearInputRadioCheck("radio", "color", "rojo");
echo "Verde";
echo crearInputRadioCheck("radio", "color", "verde");
echo "Amarillo";
echo crearInputRadioCheck("radio", "color", "amarillo");
echo "<br/><br/>Elige uno o varios<br/>";
echo "Perro";
echo crearInputRadioCheck("checkbox", "animal[]", "perro");
echo "Gato";
echo crearInputRadioCheck("checkbox", "animal[]", "gato");
Пример #3
0
        echo $myrowref['id_referencia'];
        ?>
" /></td>
                    <?php 
    } else {
        ?>
                    <td class="list-column-checkbox"></td>
                    <?php 
    }
    ?>
                <td class=" list-column-left">
                    <a class="keytext" href="detalles.php?organizacion=<?php 
    echo $myrowref[clave_organizacion];
    ?>
" style="text-transform:uppercase;"><?php 
    echo resaltar($_GET[busqueda], $myrowref[referencia]);
    ?>
</a> <?php 
    if ($myrowref[asignada] == 1) {
        ?>
asignada a <a class="keytext" href="../organizaciones/detalles.php?organizacion=<?php 
        echo $myroworg[clave_organizacion];
        ?>
" style="text-transform:uppercase;"><?php 
        echo $myroworg[organizacion];
        ?>
</a> <?php 
    }
    if ($myrowref[clave_unica]) {
        ?>
<span class="highlight"><?php 
Пример #4
0
function generar_resultado($params)
{
    extract($params);
    if (pg_num_rows($res) > 0) {
        ?>
        <p><table border="1" style="margin:auto">
            <thead><?php 
        $href = "index.php?";
        foreach ($columnas as $k => $v) {
            $sufijo = sentido($k, $orden, $sentido);
            if ($k == $orden) {
                $flecha = $sentido == "asc" ? " ▴" : " ▾";
            } else {
                $flecha = "";
            }
            ?>
                    <th>
                        <a href="<?php 
            echo "{$href}orden={$k}&sentido={$sufijo}";
            ?>
">
                            <input type="button"
                                   value="<?php 
            echo $v['bonito'] . $flecha;
            ?>
"
                                   <?php 
            echo resaltar($k, $orden);
            ?>
 />
                        </a>
                    </th><?php 
        }
        ?>
                <th colspan="2">Operaciones</th>
            </thead>
            <tbody><?php 
        for ($i = 0; $i < pg_num_rows($res); $i++) {
            $fila = pg_fetch_assoc($res, $i);
            ?>
                    <tr><?php 
            foreach ($columnas as $k => $v) {
                ?>
                            <td <?php 
                echo alinear($v);
                ?>
 >
                                <?php 
                echo $fila[$k];
                ?>
                            </td><?php 
            }
            ?>
                        <td>
                            <form action="modificar.php" method="get">
                                <input type="hidden" name="id"
                                       value="<?php 
            echo $fila['id'];
            ?>
" />
                                <input type="submit" value="Modificar" />
                            </form>
                        </td>
                        <td>
                            <form action="borrar.php" method="get">
                                <input type="hidden" name="id"
                                       value="<?php 
            echo $fila['id'];
            ?>
" />
                                <input type="submit" value="Borrar" />
                            </form>
                        </td>
                    </tr><?php 
        }
        ?>
            </tbody>
        </table></p><?php 
    } else {
        ?>
        <h3>La búsqueda no ha devuelto ningún resultado</h3><?php 
    }
}
Пример #5
0
<?php

require_once "utilHTML.php";
for ($i = 1; $i <= 50; $i++) {
    if ($i % 2 == 0) {
        echo "{$i} <br/>" . PHP_EOL;
    } else {
        echo resaltar($i) . PHP_EOL;
    }
}
?>

Пример #6
0
            $resultsoc = mysql_query($sqlsoc, $db);
            $myrowsoc = mysql_fetch_array($resultsoc);
            $numsoc = mysql_num_rows($resultsoc);
            $res = "<tr class='even-row'>\n\t\t\t\t<td class='list-column-picture'>\n\t\t\t\t\t<img class='picture-thumbnail' src='../../images/sales.png' width='32' height='32' alt='picture' />\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t\t<td class=' list-column-left'>";
            if ($numsoc != 0) {
                $res .= "\n\t\t\t\t\t<a class='keytext' href='detalles.php?organizacion=" . $myrowsoc[clave_registro] . "'>" . $myrowfac[Anunciante] . "</a>";
            } else {
                $res .= $myrowfac[Anunciante];
            }
            $res .= " <span class='highlight'>" . $myrowfac[K_Cliente] . "</span> <span class='highlight'>" . $myrowfac[clave_unica] . "</span> <span class='highlight' style='background-color:" . $resaltadocontacto . ";'>" . $ultimocontacto . "</span> ";
            if ($numsoc != 0) {
                $res .= "<img src='../../images/user.png' />";
            } else {
                $res .= "<img src='../../images/userbn.png' />";
            }
            $res .= "<br />" . resaltar($busqueda, $myrowfac[D_Rubro]) . "-" . resaltar($busqueda, $myrowfac[D_Seccion]) . "\n\t\t\t\t\t<br />\n\t\t\t\t\t<span class='subtext'>Etiquetado como:\n\t\t\t\t\t\t<span class='nobreaktext'>Prospecto</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t\t<td class=' list-column-left'>\n\t\t\t\t\t<a target='' href='mailto:" . $mailorg . "'>" . $mailorg . "</a><br />";
            if ($telorg) {
                $res .= $telorg . " (" . $tipotelorg . ")";
            }
            if ($_SESSION["Tipo"] != "Usuario") {
                $res .= "<br /><b>" . $agente . "</b>";
            }
            $res .= "</td></tr>";
            break;
    }
    //Fin de switch
    echo $res;
    $i++;
}
//Fin de while resultados
?>
Пример #7
0
        echo "gar_avatar_32.png";
        ?>
 <?php 
    } else {
        echo "org_avatar_32.png";
    }
    ?>
" width="32" height="32" alt="" />
                    
                </td>
                <td class=" list-column-left">
                    <a class="keytext" href="detalles.php?organizacion=<?php 
    echo $myroworg[clave_organizacion];
    ?>
" style="text-transform:uppercase;"><?php 
    echo resaltar($_GET[busqueda], $myroworg[organizacion]);
    ?>
</a> <?php 
    if ($myroworg[tipo_persona]) {
        ?>
 <span class="highlight"><?php 
        echo $myroworg[tipo_persona][0];
        ?>
</span> <?php 
    }
    ?>
 <?php 
    if ($myroworg[clave_unica]) {
        ?>
<span class="highlight"><?php 
        echo $myroworg[clave_unica];
Пример #8
0
function generar_resultado($params, $bol = false)
{
    extract($params);
    if (pg_num_rows($res) > 0) {
        ?>
        <table border="1" style="margin: auto;">
            <thead><?php 
        $href = "index.php?";
        foreach ($columnas as $k => $v) {
            if (isset($v['mostrar'])) {
                $sufijo = sentido($k, $orden, $sentido);
                ?>
                        <th>
                            <a href="<?php 
                echo "{$href}orden={$k}&sentido={$sufijo}";
                ?>
">
                                <input type="button" value="<?php 
                echo $v['bonito'];
                ?>
" <?php 
                echo resaltar($k, $orden);
                ?>
 >
                            </a>
                            <?php 
                echo $k == $orden ? icono_sentido($sentido) : "";
                ?>
                        </th><?php 
            }
        }
        ?>
                <th colspan="2" >Operaciones</th>
            </thead>
            <tbody><?php 
        for ($i = 0; $i < pg_num_rows($res); $i++) {
            $fila = pg_fetch_assoc($res, $i);
            ?>
                    <tr><?php 
            foreach ($columnas as $k => $v) {
                if (isset($v['mostrar'])) {
                    if (isset($v['formato'])) {
                        $valor = $fila[$v['formato']];
                    } else {
                        $valor = $fila[$k];
                    }
                    ?>
                                <td <?php 
                    echo alinear($v);
                    ?>
><?php 
                    echo $valor;
                    ?>
</td><?php 
                }
            }
            if ($bol) {
                ?>
                        <td colspan="2">
                            <form action="index.php" method="get">
                                <input type="hidden" name="codigo" value="<?php 
                echo trim($fila['codigo']);
                ?>
" />
                                <label for="cantidad">Cantidad</label>
                                <input type="number" name="cantidad" value="0" min="0" max="<?php 
                echo $fila['existencias'];
                ?>
"/> 
                                <input type="submit" value="Añadir al carrito" />
                            </form>
                        </td>

                        <?php 
            } else {
                ?>
                        <td>
                            <form action="modificar.php" method="get">
                                <input type="hidden" name="id" value="<?php 
                echo $fila['id'];
                ?>
" />
                                <input type="submit" value="Modificar" />
                            </form>
                        </td>
                        <td>
                            <form action="borrar.php" method="get">
                                <input type="hidden" name="id" value="<?php 
                echo $fila['id'];
                ?>
" />
                                <input type="submit" value="Borrar" />
                            </form>
                        </td>
                    </tr><?php 
            }
        }
        ?>
            </tbody>
        </table><?php 
        paginacion($href, $npag, $npags);
        ?>
        <br /><?php 
    } else {
        ?>
        <h3>La búsqueda no ha dado ningún resultado.</h3><?php 
    }
}