/** *###################################################################### *# takeaway heading *###################################################################### */ function takeaway_heading($atts) { if (isset($atts['type'])) { switch ($atts['type']) { case 'h1': return h1($atts); break; case 'h2': return h2($atts); break; case 'h3': return h3($atts); break; case 'h4': return h4($atts); break; case 'h5': return h5($atts); break; } } return ''; }
function mostrar_informacion() { global $d, $t, $pk, $pki, $con, $meta; echo h3("Tabla {$t}"); echo h4("Clave primaria: {$pk} con index {$pki}"); echo h4("Claves forraneas:"); $fka = db_getFK($meta, $d, $t); if ($fka[0]) { foreach ($fka[1] as $fk) { echo h5($fk[0] . " hace referencia a " . link_table($fk[1]) . "(" . $fk[2] . ")"); } } echo h4("Referencias a esta tabla:"); $rfka = db_getrFK($meta, $d, $t); if ($rfka[0]) { foreach ($rfka[1] as $rfk) { echo h5(link_table($rfk[1]) . "(" . $rfk[2] . ") hace referencia a " . $rfk[0]); } } }
$positional_text = ''; if ($positional) { $positional_text = ", " . $positional; } echo li($planet, "- house ", $relationship_calculator->relative_houses[$planet], $positional_text); } echo end_ul(); echo h4("Deeper Synastry Analysis of each other's Ascendant, Sun, Moon and Venus."), h5("Influences to ", $female_data['report_name'], "'s Planets in ", $male_data['report_name'], "'s chart."); foreach (array('Ascendant', 'Sun', 'Moon', 'Venus') as $planet) { echo h5($planet), ul($relationship_calculator->female_male_influences[$planet]); } echo h5("Influences to ", $male_data['report_name'], "'s Planets in ", $female_data['report_name'], "'s chart."); foreach (array('Ascendant', 'Sun', 'Moon', 'Venus') as $planet) { echo h5($planet), ul($relationship_calculator->male_female_influences[$planet]); } echo h4("Marriage Compatibility Based on Indian Astrology"); echo "Male Nakshatra: "; echo $kuta_calculator->male_nakshatra, br(); echo "Female Nakshatra: "; echo $kuta_calculator->female_nakshatra, br(), br(); echo "Nadi Kuta Score: "; echo $kuta_calculator->nadiKutaScore; echo "/8", br(); echo "Male Dosha: "; echo $kuta_calculator->male_dosha, br(); echo "Female Dosha: "; echo $kuta_calculator->female_dosha, br(), br(); echo "Rashi Kuta Score: "; echo $kuta_calculator->rashiKutaScore; echo "/7", br(); echo "Male Moon Sign Lord: ";
function bootStrapModal($header, $body, $footer, $closeCode = "", $icon = "", $modalsize = "") { $headericon = ""; $size = $modalsize !== "" ? $modalsize : "lg"; if ($icon !== "") { $headericon = span(["class" => "{$icon}"]); } $html = style(".modal {\n overflow: scroll;\n }"); $html .= div(["class" => "modal show", "role" => "dialog", "aria-hidden" => "false"], div(["class" => "modal-dialog modal-{$size}"], div(["class" => "modal-content"], div(["class" => "modal-header"], button(["type" => "button", "class" => "close", "onclick" => "{$closeCode}", "aria-label" => "Close"], span(["aria-hidden" => "true"], "×")), h4($headericon . " " . $header)), div(["class" => "modal-body", "id" => "modal-body"], $body), div(["class" => "modal-footer"], $footer)))); return $html; }
<?php function h4() { $x = array(1, 2, 3, 4); end($x); next($x); $y = $x; unset($y[2]); var_dump(current($x)); var_dump(current($y)); } h4();
if ($fma_figura) { // si ya tenemos datos echo "quiere calcular {$fma_funcion} de {$fma_figura} con parametro(s) {$fma_n1} {$fma_n2} {$fma_n3} ..." . br(); $f = $funciones[$fma_figura][$fma_funcion]; // buscamos la funcion (usar array_key_exists() mejor) if ($f !== null) { // la hemos encontrado echo "{$fma_funcion} de {$fma_figura} de {$fma_n1} {$fma_n2} {$fma_n3}: " . $f($fma_n1, $fma_n2, $fma_n3); } else { echo "lo siento, no se como se hace esto todavía", br(), "sé calcular estos:", br(); foreach ($funciones as $fig => $funcs) { echo implode(array_keys($funcs), ","), " de {$fig}", br(); } } } echo h4("Que desea?"); echo form([lnvinput("figura", $fma_figura, ["autofocus" => ""]), lnvinput("funcion", $fma_funcion), lnvinput("n1", $fma_n1 + 1), lnvinput("n2", $fma_n2), lnvinput("n3", $fma_n3), hidden("action", $fma_action), submit("enviar")]); // FIN PAGINA FUNCIONES MATEMATICAS } else { if ($fma_action == $adm_label) { // INICIO PAGINA FUNCIONES ADMINISTRATIVAS echo h3("Funciones {$adm_label}"); echo calcular_factura($na = adm_add($fma_articulos, $fma_articulo), $np = adm_add($fma_precios, $fma_precio), $nc = adm_add($fma_cantidades, $fma_cantidad), $ni = $fma_iva); echo form([lninput("articulo", ["autofocus" => ""]), lninput("precio"), lninput("cantidad"), lnvinput("iva", $ni), submit("afactura", "Añadir"), hidden("articulos", $na), hidden("precios", $np), hidden("cantidades", $nc), hidden("action", $fma_action)]); // FIN PAGINA FUNCIONES ADMINISTRATIVAS } else { echo h3("se me ha perdido la acción por el camino, tengo esto: {$fma_action}"); } } } #'; eval($code); echo gpp($code);