Beispiel #1
0
/**
 * Output a page not found message.
 *
 * @access public
 * @return void
 */
function make404()
{
    // Send the HTTP header.
    header('HTTP/1.0 404 Not Found');
    // Output a header for page not found.
    commonHeader('404 Not Found');
    // Output a message telling the user the page was not found.
    echo "<H1>Not Found</H1>\n";
    echo "<P>The page <B>" . htmlspecialchars($_SERVER['REQUEST_URI']) . "</B> could not be found.</P>\n";
    // Output the footer.
    commonFooter();
}
Beispiel #2
0
    .data(causes)
    .bottom(0)
    .width(k)
    .left(function() this.index * k)
    .height(function(t, d) y(d[t]))
    .fillStyle(pv.colors("lightpink", "darkgray", "lightblue"))
    .strokeStyle(function() this.fillStyle().darker())
    .lineWidth(1);

panel.anchor("bottom").add(pv.Label)
    .visible(function() !(this.parent.index % 3))
    .textBaseline("top")
    .textMargin(5)
    .text(function(d) format(d.date));

vis.add(pv.Rule)
    .data(y.ticks())
    .bottom(y)
    .strokeStyle(function(i) i ? "rgba(255, 255, 255, .5)" : "black")
  .anchor("right").add(pv.Label)
    .visible(function() !(this.index & 1))
    .textMargin(6);

vis.render();

    </script>
  </div></div>

<?php 
commonFooter();
Beispiel #3
0
            $form_submit = "Edit";
            print "Please enter your email again for security purposes.";
            include_once "form.php";
            appFooter();
            commonFooter();
            exit;
        } else {
            print "<p><b>Unable to find app #{$app_id} for editing.</b></p>";
        }
    } else {
        if ($action == "list") {
            $email = ereg_replace("'", "", $email);
            $res = mysql_query("SELECT * FROM app WHERE status = 'A' AND submitter = '{$email}' ORDER BY name");
            $num_rows = mysql_num_rows($res);
            if ($res && $num_rows > 0) {
                print "<table border=0 cellpadding=2 cellspacing=0 width=100%>";
                while ($row = mysql_fetch_object($res)) {
                    displayApp($row, $the_cat, $the_subcat, 0, true);
                }
                print "</table>";
            } else {
                print "Unable to find any applications that you submitted.";
            }
        } else {
            print "\n\t\t<form action='edit.php' method=post>\n\t\t\t<input type=hidden name='action' value='list'>\n\n\t\t\tPlease enter your email address.\n\t\t\t<br>\n\t\t\t<br>\n\t\t\t<input type=text name='email'>\n\t\t\t<input type=submit value='Continue'>\n\t\t\t<br>\n\t\t\t<br>\n\t\t\tYour email address will be used to locate applications that you have submitted.\n\t\t</form>\n\t";
        }
    }
}
appFooter();
commonFooter(false);
Beispiel #4
0
function multi_choice($file, $lang)
{
    global $full_match;
    $request = $_GET['function'];
    $switch = (int) 0;
    if ($full_match > 1) {
        commonHeader('multiple choice');
        echo "<br><br>";
        echo "<h1>PHP-GTK 1 Manual search results for &quot;{$request}&quot;</h1>\n";
        echo "<br>";
    } elseif ($full_match < 1) {
        commonHeader('multiple choice');
        echo "<br><br>";
        echo "<h1>There is no exact match for &quot;{$request}&quot; in the PHP-GTK 1 Manual.<br>Here is a list of the nearest matches:</h1>\n";
        echo "<br>";
        $switch = 1;
    }
    for ($i = 0; $i < sizeof($file); $i++) {
        $path[$i] = str_replace("/manual1/", "", $file[$i]);
        $bits[$i][] = explode(".", $path[$i]);
        foreach ($bits[$i] as $piece) {
            $GTK = substr(strtoupper($piece[0]), strlen($lang) + 1);
            $classlink = strtolower($file[$i]);
            if (strpos($classlink, "pt_br")) {
                $classlink = str_replace("pt_br", "pt_BR", $classlink);
            }
            if (sizeof($piece) == 5 && $piece[2] == "method") {
                similar_text(strtolower($request), strtolower($piece[3]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                    /* We should have a nice clean separate function for $full_match == 1) */
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match == 0) {
                    echo "<P>&nbsp;{$piece['3']}() as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['1']} {$piece['2']}</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 5 && $piece[2] == "property") {
                $prop = strtolower(substr($piece[1], 3, strlen($piece[1])));
                if (strstr($prop, "event")) {
                    $prop = "event";
                }
                similar_text(strtolower($request), strtolower($piece[3]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match == 0) {
                    echo "<P>&nbsp;\${$prop}-&gt;{$piece['3']} as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['1']} {$piece['2']}</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 5) {
                similar_text(strtolower($request), strtolower($piece[3]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match == 0) {
                    echo "<P>&nbsp;&quot;{$piece['3']}&quot; as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['1']} {$piece['2']}</a></B>";
                    $i++;
                }
            } elseif (sizeof($piece) == 4 && $piece[1] == "enum") {
                similar_text(strtolower($request), strtolower($piece[2]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match !== 1) {
                    echo "<P>&nbsp;[{$piece['2']}Value] as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['2']} {$piece['1']}s</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 4 && $piece[2] == "constructor") {
                similar_text(strtolower($request), strtolower($piece[1]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match !== 1) {
                    echo "<P>&nbsp;{$piece['1']}() as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['1']} {$piece['2']}</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 4) {
                similar_text(strtolower($request), strtolower($piece[2]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match !== 1) {
                    echo "<P>&nbsp;{$piece['2']}() as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$GTK} function</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 3 && $piece[2] == "constructor") {
                similar_text(strtolower($request), strtolower($piece[1]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match !== 1) {
                    echo "<P>&nbsp;{$piece['1']}() as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}.php'>{$piece['1']} {$piece['2']}</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            } elseif (sizeof($piece) == 3) {
                similar_text(strtolower($request), strtolower($piece[1]), $percent);
                if ($percent == 100 && $full_match == 1) {
                    header("Location: http://{$_SERVER['HTTP_HOST']}{$classlink}");
                    exit;
                } elseif ($percent == 100 && $full_match > 1 || $percent > 50 && $full_match !== 1) {
                    echo "<P>&nbsp;{$piece['1']} as in the <B><a href = 'http://{$_SERVER['HTTP_HOST']}{$classlink}'>{$piece['1']} class</a></B>";
                    if ($switch == 0) {
                        echo "?";
                    }
                    echo "</P>";
                }
            }
        }
    }
    echo "<br><a href={$_SERVER['HTTP_REFERER']}>Back</a>";
    commonFooter();
}