Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once("../../DataBase/Connection.php");
- include_once("../../Php/Assistant.php");
- include_once("../../Php/Smart.php");
- include_once("../../Php/Date.php");
- $Sql = "INSERT INTO `infoproduct` (name) VALUES ('".$Security->cleanMe($_POST["Name"])."')";
- $Rows = $DataBase->query($Sql);
- //$Smart->Insert("infoproduct", array("name", "family", "tell", "mobile", "fax", "emails", "website", "address_showroom", "address_factory", "categori", "add_date", "name_product", "price", "metrazh", "code_product", "description", "name_factory"), array($Security->cleanMe($_POST["Name"]), $Security->cleanMe($_POST["Family"]), $Security->cleanMe($_POST["Tell"]), $Security->cleanMe($_POST["Mobile"]), $Security->cleanMe($_POST["Fax"]), $Security->cleanMe($_POST["Email"]), $Security->cleanMe($_POST["Url"]), $Security->cleanMe($_POST["AddressShowRoom"]), $Security->cleanMe($_POST["AddressFactory"]), $Security->cleanMe($_POST["Categori"]), $date_block, $Security->cleanMe($_POST["NameProduct"]), $Security->cleanMe($_POST["Price"]), $Security->cleanMe($_POST["Metrazh"]), $Security->cleanMe($_POST["Code"]), $Security->cleanMe($_POST["Description"]), $Security->cleanMe($_POST["Factory"])), "1", "../infoproduct.php");
- $Sql = "SELECT * FROM `infoproduct` ORDER BY `id` DESC";
- $Rows = $DataBase->query($Sql);
- $NumRows = 0;
- $HeaderTitle = '<table>
- <tr>
- <th width="30"><label>ردیف</label></th>
- <th width="100"><label>نام, فامیل</label></th>
- <th width="120"><label>تلفن, موبایل, فکس</label></th>
- <th width="150"><label>ایمیل, سایت, نام کارگاه</label></th>
- <th width="230"><label>آدرس نمایشکاه, آدرس کارگاه</label></th>
- <th width="100"><label>دسته بندی, تاریخ</label></th>
- <th width="120"><label>نام محصول, قیمت,متراژ</label></th>
- <th></th>
- </tr>';
- print_r($HeaderTitle);
- foreach($Rows->fetchAll(PDO::FETCH_OBJ) as $Result)
- {
- $NumRows++;
- $Table = '<tr>
- <td style="text-align: center;"><label>'.$NumRows.'</label></td>
- <td>
- <input type="text" id="Name" style="margin-bottom: 5px;" value="'.$Result->name.'">
- <input type="text" id="Family" style="margin-bottom: 5px;" value="'.$Result->family.'">
- </td>
- <td>
- <input type="text" id="Tell" style="margin-bottom: 5px;" value="'.$Result->tell.'">
- <input type="text" id="Mobile" style="margin-bottom: 5px;" value="'.$Result->mobile.'">
- <input type="text" id="Fax" value="'.$Result->fax.'">
- </td>
- <td>
- <input type="text" id="Email" style="margin-bottom: 5px;width: 140px;" value="'.$Result->emails.'">
- <input type="text" id="Url" style="margin-bottom: 5px;width: 140px;" value="'.$Result->website.'">
- <input type="text" id="NameFactory" style="width: 140px;" value="'.$Result->name_factory.'">
- </td>
- <td>
- <input type="text" id="AddressShowRoom" style="margin-bottom: 5px;width: 220px;" value="'.$Result->address_showroom.'">
- <input type="text" id="AddressFactory" style="width: 220px;" value="'.$Result->address_factory.'">
- </td>
- <td style="text-align: center;">
- <input type="text" id="Categori" style="margin-bottom: 5px;" value="'.$Result->categori.'">
- <input type="text" id="Code" style="margin-bottom: 5px;" value="'.$Result->code_product.'">
- <label>'.$Result->add_date.'</label>
- </td>
- <td>
- <input type="text" id="Email" style="margin-bottom: 5px;" value="'.$Result->name_product.'">
- <input type="text" id="Url" style="margin-bottom: 5px;" value="'.$Result->price.'">
- <input type="text" id="NameFactory" value="'.$Result->metrazh.'">
- </td>
- <td><p class = "M" onclick="Test('.$Result->id.')">'.$Result->id.'</p></td>
- </tr>
- <tr><td colspan="8"></td></tr>
- ';
- print_r($Table);
- }
- $Table = NULL;
- print_r("</table>");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement