コード例 #1
0
ファイル: products.php プロジェクト: ksanderpugin/fiteat
function add_product()
{
    global $sql;
    if ($_POST["parent"] != "" && $_POST["name"] != "" && $_POST["kkal"] != "" && $_POST["bel"] != "" && $_POST["zhir"] != "" && $_POST["ugl"] != "" && $_POST["sv"] != "") {
        $sql->execute("INSERT INTO products (name,parent,k,b,z,u,sv) VALUE (':name',:parent,:k,:b,:z,:u,:sv)", [["name" => ":name", "val" => $_POST["name"], "type" => SQL::PARAM_STR], ["name" => ":parent", "val" => $_POST["parent"], "type" => SQL::PARAM_INT], ["name" => ":k", "val" => $_POST["kkal"], "type" => SQL::PARAM_INT], ["name" => ":b", "val" => $_POST["bel"], "type" => SQL::PARAM_FLOAT], ["name" => ":z", "val" => $_POST["zhir"], "type" => SQL::PARAM_FLOAT], ["name" => ":u", "val" => $_POST["ugl"], "type" => SQL::PARAM_FLOAT], ["name" => ":sv", "val" => $_POST["sv"], "type" => SQL::PARAM_INT]]);
    }
    show_group();
}
コード例 #2
0
ファイル: addons.php プロジェクト: nicolas17/boincgit-test
$strip_header = $_GET['strip_header'];
if (!$strip_header) {
    page_head('BOINC add-on software');
    echo "\n<p>\nThe following programs complement or enhance BOINC.\nNote:\n<ul>\n<li>\n\nThese applications are not endorsed by BOINC and\nyou use them at your own risk.\n<li>\nWe do not provide instructions for installing these applications.\nHowever, the author may have provided some help on installing or\nuninstalling the application.\nIf this is not enough you should contact the author.\nInstructions for installing and running BOINC are\n<a href=http://boinc.berkeley.edu/wiki/User_manual>here</a>.\n<li>\nTo submit an item for inclusion in this list,\nplease email <a href=http://boinc.berkeley.edu/trac/wiki/ProjectPeople>David Anderson</a>.\n</ul>\n";
}
function show_group($name, $list, $short_name)
{
    echo "\n\t\t<h2>{$name}</h2>\n\t\t<table border=1 cellpadding=6 width=100%>\n\t\t<tr>\n\t\t\t<th>Add-on<br><font size=-2>click for info</font></th>\n\t\t\t<th>Description</th>\n\t\t</tr>\n\t";
    shuffle($list);
    foreach ($list as $item) {
        $file = $item[0];
        $itemname = $item[1];
        $desc = $item[3];
        $iname = urlencode($file);
        echo "\n\t\t\t<tr><td><a href=http://boinc.berkeley.edu/addon_item.php?platform={$short_name}&item={$iname}>{$itemname}</a></td>\n\t\t\t\t<td>{$desc}</td>\n\t\t\t</tr>\n\t\t";
    }
    echo "</table>\n\t";
}
echo "<a name=windows></a>\n";
show_group("Windows", $win, 'win');
echo "<a name=linux></a>\n";
show_group("Linux", $linux, 'linux');
echo "<a name=mac></a>\n";
show_group("Mac", $mac, 'mac');
echo "<a name=browser></a>\n";
show_group("Web browser toolbars and plugins", $browser, 'browser');
echo "<a name=web></a>\n";
show_group("Web applications", $web, 'web');
if (!$strip_header) {
    page_tail();
}