Beispiel #1
0
function display_db($db)
{
    if ($db) {
        $result = $db->query('SHOW DATABASES');
        $aff = $result->fetchAll();
        foreach ($aff as $value) {
            ?>
<li>
			<a class="collapsible-header waves-effect waves-blue darken-1"><?php 
            echo $value[0];
            ?>
</a>
			<div class="collapsible-body">
				<ul>
					<li><a href=<?php 
            echo "index.php?action=new-table&db-name=" . $value[0];
            ?>
><i class="tiny material-icons">library_add</i> Modifier ...</a></li>
					<?php 
            display_table($db, $value[0]);
            ?>
				</ul>
			</div></li>
			 <?php 
        }
    }
}
Beispiel #2
0
function display_db($db)
{
    if ($db) {
        $result = $db->query('SHOW DATABASES');
        $aff = $result->fetchAll();
        foreach ($aff as $value) {
            ?>
<li>
			<a onclick="displaySelection('<?php 
            echo "{$value['0']}";
            ?>
');" class="collapsible-header waves-effect waves-blue darken-1"><?php 
            echo $value[0];
            ?>
</a>
			<div class="collapsible-body">
				<ul>
					<?php 
            display_table($db, $value[0]);
            ?>
				</ul>
			</div></li>
			 <?php 
        }
    }
}
Beispiel #3
0
    } else {
        print "<div class='alert alert-danger col-md-offset-2'><p>" . T_("Error:") . " {$error} </p><p>" . T_("Please check imported file, go back in your browser and fix the problem") . "</p></div>";
    }
    //verifiy that exactly one primary phone number is selected
    //upload to database
    xhtml_foot($js_foot);
} else {
    if (isset($_POST['import_file'])) {
        //file has been submitted
        $subtitle = T_("Select columns to import");
        xhtml_head(T_("Import sample") . ":", true, $css, $js_head, false, false, false, $subtitle);
        echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left fa-lg text-primary'></i>&emsp;" . T_("Go back") . "</a>";
        print "<form action='' method='post' class='col-md-10 form-group col-md-offset-1'>";
        $tmpfname = tempnam(TEMPORARY_DIRECTORY, "FOO");
        move_uploaded_file($_FILES['file']['tmp_name'], $tmpfname);
        display_table(get_first_row($tmpfname));
        ?>
	<input type="hidden" name="description" value="<?php 
        if (isset($_POST['description'])) {
            print $_POST['description'];
        }
        ?>
"/>
	<input type="hidden" name="filename" value="<?php 
        echo $tmpfname;
        ?>
"/>
	<div class="form-group">
		<label class="col-md-4 control-label" for="submit"></label>
		<div class="col-md-4">
			<button id="submit" type="submit" name="import_form" class="btn btn-primary"><i class="fa fa-plus-square-o fa-lg"></i>&emsp;<?php 
Beispiel #4
0
     if (file_exists("./{$goto}")) {
         include "header.inc.php";
         if (isset($zero_rows) && !empty($zero_rows)) {
             $message = $zero_rows;
         } else {
             $message = $strEmptyResultSet;
         }
         include preg_replace('/\\.\\.*/', '.', $goto);
     } else {
         $message = $zero_rows;
         Header("Location: {$goto}");
     }
     exit;
 } else {
     include "header.inc.php";
     $query = display_table($result);
     // $query = "server=$server&db=$db&table=$table&goto=$goto";
     echo "<br><li><a href=\"rep_create.php?server={$server}&db_name={$db}&rep_sql=", urlencode($sql_query), "\">{$strCreateNew} {$strReport}</a><br><br>";
     switch ($rel_type) {
         case "sequence":
             $sql_query = urlencode("SELECT SETVAL('{$sequence}', 1)");
             $goto = urlencode($QUERY_STRING);
             echo "<li><a href=\"sql.php?server={$server}&db={$db}&table={$table}&sql_query={$sql_query}&goto={$goto}\">Reset</a>";
             break;
         default:
             if ($cfgShowSQL) {
                 show_message("Your SQL statment");
             }
             if (!empty($query)) {
                 echo "<br><li><a href=\"tbl_change.php?{$query}\">{$strInsert}</a>";
             }
Beispiel #5
0
<?php

$window = new GtkWindow();
$window->set_size_request(400, 200);
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
$window->add($vbox = new GtkVBox());
// display title
$title = new GtkLabel("Display 2D Array in GtkTreeView - Part 1");
$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));
$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));
$title->set_size_request(-1, 40);
$vbox->pack_start($title, 0, 0);
$vbox->pack_start(new GtkLabel(), 0, 0);
// the 2D table
$data = array(array('row0', 'item 1', 2, 3.1), array('row1', 'item 4', 5, 6.21), array('row2', 'item 7', 8, 9.359999999999999), array('row3', 'item 10', 11, 12.4), array('row4', 'item 21', 14, 15.5), array('row5', 'item 36', 17, 18.6), array('row6', 'item 42', 20, 21.73));
display_table($vbox, $data);
// note 1
$window->show_all();
Gtk::main();
function display_table($vbox, $data)
{
    // Set up a scroll window
    $scrolled_win = new GtkScrolledWindow();
    $scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
    $vbox->pack_start($scrolled_win);
    // Creates the list store
    if (defined("GObject::TYPE_STRING")) {
        $model = new GtkListStore(GObject::TYPE_STRING, GObject::TYPE_STRING, GObject::TYPE_LONG, GObject::TYPE_DOUBLE);
        // note 2
    } else {
        $model = new GtkListStore(Gtk::TYPE_STRING, Gtk::TYPE_STRING, Gtk::TYPE_LONG, Gtk::TYPE_DOUBLE);
Beispiel #6
0
function display()
{
    global $dbh, $db_functions, $foundX_match, $reltext, $bloodreltext, $name1, $name2, $spouse, $rel_arrayspouseX;
    global $special_spouseY, $special_spouseX, $spousenameX, $spousenameY, $table, $doublespouse;
    global $rel_arrayX, $rel_arrayY, $famX, $famY, $language, $dutchtext, $searchDb, $searchDb2;
    global $sexe, $selected_language, $dirmark1, $famspouseX, $famspouseY, $reltext_nor, $reltext_nor2;
    global $fampath;
    // path to family.php for Joomla and regular. Defined above all functions
    global $person, $person2, $tree_id;
    global $tree_prefix_quoted;
    // *** Use person class ***
    $pers_cls = new person_cls();
    $language_is = ' ' . __('is') . ' ';
    if ($selected_language == "he") {
        if ($sexe == "m") {
            $language_is = ' הוא ';
        } else {
            $language_is = ' היא ';
        }
    } elseif ($selected_language == "cn") {
        $language_is = '的';
    }
    $bloodrel = '';
    search_bloodrel();
    if ($reltext) {
        //print '<table class="humo container"><tr><td>';
        print '<table class="ext"><tr><td style="padding-right:30px;vertical-align:text-top;">';
        $bloodrel = 1;
        print __('BLOOD RELATIONSHIP: ');
        echo "<br><br>";
        if ($selected_language == "cn" and strpos($reltext, "notext") !== false) {
            // don't display text if relation can't be phrased
        } else {
            if ($selected_language == "fi") {
                print 'Kuka: ';
            }
            // who
            print "&nbsp;&nbsp;<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>";
            print $name1 . "</a>";
            if ($selected_language == "fi") {
                print '&nbsp;&nbsp;' . 'Kenelle: ';
            } else {
                print $language_is . $reltext;
            }
            print "<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>" . $reltext_nor . "<p>";
            print $dutchtext;
            if ($selected_language == "fi") {
                echo 'Sukulaisuus tai muu suhde: <b>' . $reltext . '</b>';
            }
            print '<hr style="width:100%;height:0.25em;color:darkblue;background-color:darkblue;"  >';
        }
        $bloodreltext = $reltext;
        display_table();
    }
    if ($table != 1 and $table != 2 and $table != 7) {
        unset_vars();
        search_marital();
        if ($reltext) {
            // notext is used in Chinese display if relation can't be worded.
            //check if this is involves a marriage or a partnership of any kind
            $relmarriedX = 0;
            if (isset($famspouseX)) {
                $kindrel = $dbh->query("SELECT fam_kind FROM humo_families\n\t\t\t\t\tWHERE fam_tree_id='" . $tree_id . "' AND fam_gedcomnumber='" . $famspouseX . "'");
                @($kindrelDb = $kindrel->fetch(PDO::FETCH_OBJ));
                if ($kindrelDb->fam_kind != 'living together' and $kindrelDb->fam_kind != 'engaged' and $kindrelDb->fam_kind != 'homosexual' and $kindrelDb->fam_kind != 'unknown' and $kindrelDb->fam_kind != 'non-marital' and $kindrelDb->fam_kind != 'partners' and $kindrelDb->fam_kind != 'registered') {
                    $relmarriedX = 1;
                    // use: husband or wife
                } else {
                    $relmarriedX = 0;
                    // use: partner
                }
            }
            $relmarriedY = 0;
            if (isset($famspouseY)) {
                $kindrel2 = $dbh->query("SELECT fam_kind\n\t\t\t\t\tFROM humo_families WHERE fam_tree_id='" . $tree_id . "' AND fam_gedcomnumber='" . $famspouseY . "'");
                @($kindrel2Db = $kindrel2->fetch(PDO::FETCH_OBJ));
                if ($kindrel2Db->fam_kind != 'living together' and $kindrel2Db->fam_kind != 'engaged' and $kindrel2Db->fam_kind != 'homosexual' and $kindrel2Db->fam_kind != 'unknown' and $kindrel2Db->fam_kind != 'non-marital' and $kindrel2Db->fam_kind != 'partners' and $kindrel2Db->fam_kind != 'registered') {
                    $relmarriedY = 1;
                    // use: husband or wife
                } else {
                    $relmarriedY = 0;
                    // use: partner
                }
            }
            if ($bloodrel == 1) {
                if (CMS_SPECIFIC == "Joomla") {
                    print '</td></tr><tr><td>';
                    // in joomla we want blood- and marital tables one under the other for lack of space
                } else {
                    print '</td><td style="padding-left:30px;border-left:2px solid #bbbbbb;vertical-align:text-top;">';
                }
            } else {
                echo '<table class="ext"<tr><td>';
            }
            print __('MARITAL RELATIONSHIP: ');
            echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input style="font-size:110%" type="submit" name="extended" value="' . __('Use Extended Calculator') . '">';
            echo "<br><br>";
            $spousetext1 = '';
            $spousetext2 = '';
            $finnish_spouse1 = '';
            $finnish_spouse2 = '';
            if ($doublespouse == 1) {
                // X and Y are both spouses of Z
                $spouseidDb = $db_functions->get_person($rel_arrayspouseX[$foundX_match][0]);
                $name = $pers_cls->person_name($spouseidDb);
                $spousename = $name["name"];
                print "<span>&nbsp;&nbsp;<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>";
                //print $name1."</a> and ";
                print $name1 . "</a> " . __('and') . ': ';
                print "<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>";
                if ($searchDb->pers_sexe == "M") {
                    echo ' ' . __('are both husbands of') . ' ';
                } else {
                    print ' ' . __('are both wifes of') . ' ';
                }
                print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayspouseX[$foundX_match][0] . "'>" . $spousename . "</a></span><br>";
            } elseif ($reltext != "notext") {
                if ($spouse == 1 and $special_spouseX !== 1 or $spouse == 3) {
                    if ($relmarriedX == 0 and $selected_language != "cn") {
                        $spousetext1 = strtolower(__('Partner')) . __(' of ');
                        $finnish_spouse1 = strtolower(__('Partner'));
                    } else {
                        if ($searchDb->pers_sexe == 'M') {
                            $spousetext1 = ' ' . __('husband of') . ' ';
                            if ($selected_language == "fi") {
                                $finnish_spouse1 = 'mies';
                            }
                            if ($selected_language == "cn") {
                                $spousetext1 = '妻子';
                            }
                            // "A's wife is B"
                        } else {
                            $spousetext1 = ' ' . __('wife of') . ' ';
                            if ($selected_language == "fi") {
                                $finnish_spouse1 = 'vaimo';
                            }
                            if ($selected_language == "cn") {
                                $spousetext1 = '丈夫';
                            }
                            // "A's husband is B"
                        }
                    }
                }
                if (($spouse == 2 or $spouse == 3) and $special_spouseY !== 1) {
                    if ($relmarriedY == 0 and $selected_language != "cn") {
                        $spousetext2 = strtolower(__('Partner')) . __(' of ');
                        $finnish_spouse2 = strtolower(__('Partner'));
                    } else {
                        if ($searchDb2->pers_sexe == 'M') {
                            $spousetext2 = ' ' . __('wife of') . ' ';
                            if ($selected_language == "fi") {
                                $finnish_spouse2 = 'mies';
                            }
                            // yes - it's really husband cause the sentence goes differently
                            if ($selected_language == "cn") {
                                $spousetext2 = '丈夫';
                            }
                            // "A's uncle's husband is B"
                        } else {
                            $spousetext2 = ' ' . __('husband of') . ' ';
                            if ($selected_language == "fi") {
                                $finnish_spouse2 = 'vaimo';
                            }
                            // yes - it's really wife cause the sentence goes differently
                            if ($selected_language == "cn") {
                                $spousetext2 = '妻子';
                            }
                            // "A's uncle's wife is B"
                        }
                    }
                }
                if ($selected_language == "fi") {
                    // very different phrasing for correct grammar
                    print 'Kuka: ';
                    print "<span>&nbsp;&nbsp;<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>";
                    print $name1 . "</a>";
                    print '&nbsp;&nbsp;Kenelle: ';
                    print "<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a></span><br>";
                    print 'Sukulaisuus tai muu suhde: ';
                    if (!$special_spouseX and !$special_spouseY and $table != 7) {
                        if ($spousetext2 != '' and $spousetext1 == '') {
                            // X is relative of spouse of Y
                            print '(';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>" . $name1 . "</a>";
                            print ' - ' . $spousenameY . '):&nbsp;&nbsp;' . $reltext . '<br>';
                            print $spousenameY . ', ' . $finnish_spouse2 . ' ';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>";
                        } elseif ($spousetext1 != '' and $spousetext2 == '') {
                            // X is spouse of relative of Y
                            print '(' . $spousenameX . ' - ';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>";
                            print '):&nbsp;&nbsp;' . $reltext . '<br>';
                            print $spousenameX . ', ' . $finnish_spouse1 . ' ';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>" . $name1 . "</a>";
                        } else {
                            // X is spouse of relative of spouse of Y
                            print '(' . $spousenameX . ' - ' . $spousenameY . '):&nbsp;&nbsp;' . $reltext . '<br>';
                            print $spousenameX . ', ' . $finnish_spouse1 . ' ';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>" . $name1 . "</a><br>";
                            print $spousenameY . ', ' . $finnish_spouse2 . ' ';
                            print "<a href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>";
                        }
                    } elseif ($special_spouseX or $special_spouseY) {
                        // brother-in-law/sister-in-law/father-in-law/mother-in-law
                        print '<b>' . $reltext . '</b><br>';
                    } elseif ($table == 7) {
                        if ($relmarriedX == 0 or $relmarriedY == 0) {
                            print '<b>' . strtolower(__('Partner')) . '</b><br>';
                        } else {
                            print '<b>' . $finnish_spouse1 . '</b><br>';
                        }
                    }
                } else {
                    if ($spousetext2 == '') {
                        $reltext_nor2 = '';
                    } else {
                        $reltext_nor = '';
                    }
                    if ($selected_language == "cn") {
                        $language_is = '的';
                        if ($reltext == " ") {
                            // A's husband/wife is B
                            $reltext = "是";
                        } else {
                            mb_internal_encoding("UTF-8");
                            if ($spousetext1 != "" and $spousetext2 == "") {
                                $spousetext1 .= '的';
                            } elseif ($spousetext2 != "" and $spousetext1 == "") {
                                $reltext = mb_substr($reltext, 0, -1) . '的';
                                $spousetext2 .= '是';
                            } elseif ($spousetext1 != "" and $spousetext2 != "") {
                                $spousetext1 .= '的';
                                $reltext = mb_substr($reltext, 0, -1) . '的';
                                $spousetext2 .= '是';
                            }
                        }
                    }
                    if ($table == 6 or $table == 7) {
                        $reltext_nor = '';
                    }
                    print "<span>&nbsp;&nbsp;<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famX . "&amp;main_person=" . $rel_arrayX[0][0] . "'>";
                    print $name1 . "</a>" . $language_is . $spousetext1 . $reltext . $reltext_nor2 . $spousetext2;
                    print "<a class='relsearch' href='" . $fampath . "database=" . safe_text($_SESSION['tree_prefix']) . "&amp;id=" . $famY . "&amp;main_person=" . $rel_arrayY[0][0] . "'>" . $name2 . "</a>" . $reltext_nor . "</span><br>";
                }
            }
            print '<hr style="width:100%;height:0.25em;color:darkblue;background-color:darkblue;" >';
            display_table();
            /*			
            			echo '<br><br><div style="margin-left:auto;margin-right:auto;padding:3px;width:400px;background-color:#eeeeee"><input type="submit" name="next_path" value="'.__('Try to find another path').'" style="font-size:115%;">';
            			echo '<br>'.__('(With each consecutive search the path may get longer and computing time may increase!)').'</div>';
            */
        }
    }
    //if($bloodreltext=='' AND $reltext=='') {
    if ($reltext == '') {
        if ($bloodreltext == '') {
            echo '<br><table class="ext"><tr><td>';
            echo '<td style="text-align:left;border-left:0px;padding10px;vertical-align:text-top;width:800px">';
            echo "<div style='font-weight:bold'>" . __('No blood relation or direct marital relation found') . "</div>";
        } else {
            echo '<td style="width:60px">&nbsp;</td>';
            echo '<td style="padding-left:50px;padding-right:10px;vertical-align:text-top;border-left:2px solid #bbbbbb;width:350px">';
            print __('MARITAL RELATIONSHIP: ');
            echo "<br><br><div style='font-weight:bold;margin-bottom:10px'>" . __('No direct marital relation found') . "</div>";
        }
        print '<hr style="width:100%;height:0.25em;color:darkblue;background-color:darkblue;" >';
        echo __("You may wish to try finding a connection with the <span style='font-weight:bold'>Extended Marital Calculator</span> below.<br>\t\n\t\t\t\tThis will find connections that span over many marital relations and generations.<br>\t\n\t\t\t\tComputing time will vary depending on the size of the tree and the distance between the two persons.<br>\t\n\t\t\t\tFor example, in a 10,000 person tree even the most distant persons will usually be found within 1-2 seconds.<br>\t\n\t\t\t\tIn a 75,000 person tree the most distant persons may take up to 8 sec to find.<br><br>");
        echo '<input type="submit" name="extended" value="' . __('Perform extended marital calculation') . '" style="font-size:115%;">';
        echo "</td></tr></table>";
    } else {
        print '</td></tr></table>';
    }
    print '<br><br>';
}
if (isset($RegionName) && $RegionName != "All") {
    $query .= " AND region_name like '{$RegionName}%'";
}
if (isset($WineName) && !empty($WineName)) {
    $query .= " AND wine_name like '{$WineName}%'";
}
if (isset($WineryName) && !empty($WineryName)) {
    $query .= " AND winery_name like '{$WineryName}%'";
}
if (isset($GrapeVariety) && !empty($GrapeVariety)) {
    $query .= " AND variety = '{$GrapeVariety}'";
}
if (isset($StartYear) && isset($EndYear) && $StartYear < $EndYear) {
    $query .= " AND year between '{$StartYear}' and '{$EndYear}'";
}
if (isset($MinStock) && !empty($MinStock)) {
    $query .= " AND on_hand > '{$MinStock}'";
}
if (isset($MinOrder) && !empty($MinOrder)) {
    $query .= " AND qty > '{$MinOrder}'";
}
if (isset($MinCost) && !empty($MinCost) && isset($MaxCost) && !empty($MaxCost)) {
    $query .= " AND cost between '{$MinCost}' and '{$MaxCost}'";
}
$query .= " GROUP BY wine.wine_id";
$query .= " ORDER BY wine.wine_name";
display_table($connection, $query);
?>

  </body>
</html>
Beispiel #8
0
#$url = "http://localhost:8888/cgi-bin/analyze.py?q=";
#symbol = "";
if (isset($_GET["q"]) && $_GET["q"] != "") {
    $symbol = htmlspecialchars($_GET["q"]);
    $symbol = strtoupper($symbol);
    $category = "";
    if (isset($_GET["c"]) && $_GET["c"] != "") {
        $category = htmlspecialchars($_GET["c"]);
        $category = strtoupper($category);
    }
    $q = $url . "{$symbol}" . "&c=" . $category;
    $result = file_get_contents($q);
    #print_r($result);exit();
    $data = json_decode($result, true);
    display_header($symbol);
    display_table($symbol, $data);
    display_footer();
} else {
    main_page();
}
?>

<?php 
function display_company_info($symbol, $name, $fundamentals)
{
    ?>
	<div class="grid_12 alpha">
		<div class="grid_6 alpha">
			<div id="companyname"><?php 
    echo $name;
    ?>
">
                </td>
                <?php 
    if (isset($s_wt['table']) && $s_wt['table'] != '') {
        echo "<td width=\"100\">&nbsp;</td>\n";
        $url = url_session($_SERVER['PHP_SELF'] . '?wcfg=true');
        echo '<td><a href="' . $url . '" class="act">[' . $sql_strings['Config'] . "]</a></td>\n";
    }
    ?>
            </tr>
        </table>
        <table class="table table-bordered">
            <tr>
                <td>
                    <?php 
    display_table($s_wt);
    ?>
                </td>
            </tr>
        </table>
    </form>
    <div id="fk" class="fk"></div>
<?php 
    //
    // Configuration panel
    //
} elseif ($s_connected) {
    ?>
    <form method="post" action="<?php 
    echo url_session($_SERVER['PHP_SELF']);
    ?>
Beispiel #10
0
 // Defines the display mode if it wasn't passed by url
 if ($is_count) {
     $display = 'simple';
 }
 if (!isset($display)) {
     $display = eregi('^((SHOW (VARIABLES|PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS))|((CHECK|ANALYZE|REPAIR|OPTIMIZE) TABLE ))', $sql_query, $which);
     if (!empty($which[2]) && !empty($which[3])) {
         $display = 'simple';
     } else {
         if (!empty($which[4]) && !empty($which[5])) {
             $display = 'bkmOnly';
         }
     }
 }
 // Displays the results in a table
 display_table($result, $display == 'simple' || $display == 'bkmOnly');
 if ($display != 'simple') {
     // Insert a new row
     if ($display != 'bkmOnly') {
         $url_query = 'lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&table=' . urlencode($table) . '&pos=' . $pos . '&sql_query=' . urlencode($sql_query) . '&goto=' . urlencode($goto);
         echo "\n\n";
         echo '<!-- Insert a new row -->' . "\n";
         echo '<p>' . "\n";
         echo '    <a href="tbl_change.php?' . $url_query . '">' . $strInsertNewRow . '</a>' . "\n";
         echo '</p>' . "\n";
     }
     // end insert row
     // Bookmark Support
     if ($cfgBookmark['db'] && $cfgBookmark['table'] && empty($id_bookmark) && !empty($sql_query)) {
         echo "\n";
         ?>
Beispiel #11
0
$window = new GtkWindow();
$window->set_size_request(400, 200);
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
$vbox = new GtkVBox();
$window->add($vbox);
// display title
$title = new GtkLabel('Display 2D Array in Table - Part 2 (add borders)');
$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));
$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));
$title->set_size_request(-1, 40);
$vbox->pack_start($title, 0, 0);
$table = new GtkTable();
$vbox->pack_start($table);
$a = array(array('', 'header1', 'header2', 'header3'), array('row0', 1, 2, 3), array('row1', 4, 5, 6));
display_table($table, $a);
function display_table($table, $a)
{
    for ($row = 0; $row < count($a); ++$row) {
        for ($col = 0; $col < count($a[$row]); ++$col) {
            $frame = new GtkFrame();
            // note1
            $frame->add(new GtkLabel($a[$row][$col]));
            // note 2
            $table->attach($frame, $col, $col + 1, $row, $row + 1);
            // note3
        }
    }
}
$window->show_all();
Gtk::main();
Beispiel #12
0
<?php

$window = new GtkWindow();
$window->set_size_request(400, 200);
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
$vbox = new GtkVBox();
$window->add($vbox);
// display title
$title = new GtkLabel('Display 2D Array in Table - Part 1');
$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));
$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));
$title->set_size_request(-1, 40);
$vbox->pack_start($title, 0, 0);
$table = new GtkTable();
// note 1
$vbox->pack_start($table);
$data = array(array('', 'header1', 'header2', 'header3'), array('row0', 1, 2, 3), array('row1', 4, 5, 6));
display_table($table, $data);
// note 2
function display_table($table, $a)
{
    for ($row = 0; $row < count($a); ++$row) {
        for ($col = 0; $col < count($a[$row]); ++$col) {
            $table->attach(new GtkLabel($a[$row][$col]), $col, $col + 1, $row, $row + 1);
            // note 3
        }
    }
}
$window->show_all();
Gtk::main();
            width: 110px;
        }

        td:last-child {
            text-align: right;
            width: 100px;
        }
    </style>
</head>
<body>
<?php 
display_table($names[0], $phone_numbers[0], $ages[0], $addresses[0]);
?>
 <br/>
<?php 
display_table($names[1], $phone_numbers[1], $ages[1], $addresses[1]);
?>
</body>
</html>

<?php 
$names = array("Lucy", "George", "Fred");
$phone_numbers = array("0123-456-789", "0897-777-777", "0038-2-485-945");
$ages = array(27, 35, 49);
$addresses = array("Sofia", "Pravec", "London");
function display_table($name, $phone_number, $age, $address)
{
    echo "<table><tbody>";
    add_row("Name", $name);
    add_row("Phone number", $phone_number);
    add_row("Age", $age);
/*                background-color:#e5e5e5;*/
                border-radius: 10px; 
                
            }
            .transbox{
                background:rgba(0, 0, 0, .07);
                border-radius: 10px; 
                box-shadow: 1px 7px 36px -5px;
            }
            body { padding-bottom: 50px; }
            h4 {text-align: center;}
        </style>
    </head>
    <body>
             
       
        <div class="container top-container transbox">
            <div class="container text-center">
                <h1>Listings Database</h1> 
            </div>
            <?php 
display_table();
?>
<br> 
        </div>
    </body>
	<div class="footer" style="background-color: #e7e7e7; border-color: #777; width: 100%; position: fixed;bottom: 0">
		<h4>This is for demonstration purposes only. CSC648/848 San Francisco State University Team02 Milestone Properties</h4>
	</div>
</html>