Exemple #1
0
function uploadFile()
{
    if (isset($_POST) && isset($_FILES['file']) && is_uploaded_file($_FILES['file']['tmp_name'])) {
        $file = $_FILES['file'];
        checkErrors($file);
        $fileData = fopen($_FILES['file']['tmp_name'], 'r');
        $menuData = getMenuData($fileData);
        importMenuData($menuData);
        header('Location: index.php');
        die("Redirected to: index.php");
    }
}
Exemple #2
0
<?php

require_once "functions.php";
//kas kustutame
//?delete = vastav id mida kustutada
if (isset($_GET["delete"])) {
    echo "Kustutame id" . $_GET["delete"];
    deleteFood($_GET["delete"]);
}
if (isset($_POST["save"])) {
    updateFood($_POST["id"], $_POST["title"], $_POST["price"]);
}
$array_of_menus = getMenuData();
//trükin välja esimese auto
//echo $array_of_menus[0]->id. " ".$array_of_menus[0]->plate;
?>

<h2>Tabel</h2>




<table border=1>
	<tr>
		<th>id</th>
		<th>Title</th>
		<th>Price</th>
		<th>X</th>
		<th>edit</th>
		<th>Lisa menüüsse</th>
	</tr>
Exemple #3
0
</head>

<body>
<div class="logobox"><span><A HREF="login.php?out=yes"><input title="登出" class="topbut01" name="logout" type="button" value="" /></a><A HREF="../" target="_blank"><input class="topbut02" name="front" title="前臺主頁" type="button" value="" /></a></span></div>
<div class="centerbox">
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" width="209px">
        <div><img src="style/images/leftpic_03.jpg" width="209" height="51" /></div>
        <div class="leftbox">
              <div style="min-height:500px;">
                   <div id="leftmenubox">
                   	<?php 
// get_group_id_by_admin_id($_SESSION["ADMIN_ID"]);
echo createmenu(getMenuData($_SESSION["ADMIN_ID"]), "", "admin");
?>
		              	
		              	<div style="margin-left:15px;"><A HREF="login.php?out=yes"><div style="float:left"><img src="style/images/main_r1_c35.gif" width="16" border="0" title="登出"></div><div style="height:40px;float:left;margin-top:13px;">登出</div></A></div>                
                   </div>
             </div>
             <div><img src="style/images/leftpic_10.jpg" width="190" height="5" /></div>
        </div>
        
    </td>
    <td valign="top" class="rightbox">
       <div id="right">
		<div style="clear:both;"></div>
		<div class="content rightmainbox">
			
            <?php