$class = ""; } $sub_nastavenia .= "<li><a href=\"?vyber=nastavenia&sub=ean\"{$class}>EAN kódy</a></li>"; if ($sub == "uzivatel") { $class = " class=\"selected\""; } else { $class = ""; } $sub_nastavenia .= "<li><a href=\"?vyber=nastavenia&sub=uzivatel\"{$class}>Užívatelia</a></li>"; if ($vyber == "default_settings") { $class = " class=\"selected\""; } else { $class = ""; } $sub_nastavenia .= check_visibility("default_settings", "<li><a href=\"?vyber=default_settings\"{$class}>Základné nastavenia</a></li>"); echo check_visibility("nastavenia", "<li><a href=\"\">Nastavenia</a><ul>{$sub_nastavenia}</ul></li>\n"); echo " \r\n </ul>\r\n </div>\n"; } //die ("Ospravedlňujeme sa, objednávkový systém je na krátku chvíľu v údržbe. Do 30 minút bude opäť v prevádzke<br> Ďakujeme za pochopenie."); if ($vyber == "" or $vyber == "formular") { include_once "include/formular.php"; } else { if (!isset($_SESSION["logged"]) or $_SESSION["logged"] != 1) { echo "<form action=\"\" method=\"POST\"><br />\n"; echo "<label for=\"meno\">meno</label><input type=\"text\" value=\"{$all['meno']}\" name=\"meno\"><br />\n"; echo "<label for=\"druh\">heslo</label><input type=\"password\" value=\"{$all['meno']}\" name=\"heslo\"><br />\n"; echo "\r\n <input type=\"submit\" name=\"submit_pass\" value=\"OK\">\n\r\n </form>\r\n "; die; } else { if ($vyber != "" and $_SESSION["logged"] == 1) { //* funkcia na vyber vhodnej podstranky na zaklade premennej vyber
function display_all($page, $vyber, $search_name) { echo "<h1>Všetky objednávky</h1>"; echo "<div class=\"filter_obj clearfix\">"; echo textfield("filter_by_obj_id", $_SESSION["search_id"], "č. obj:", 5, 4); echo select("filter_by_zakaznik", "Filtruj zákazníkov:", "SELECT id, meno FROM uzivatel WHERE skupina=2 AND vymaz=0 ORDER BY meno", $_SESSION["search_zakaznik"], "- všetci -", "", ""); echo textfield("filter_by_name", $_SESSION["search_name"], "Vyhľadaj podľa mena (min. 3zn):", 10, 10); $filtbyst = array("bez_rozpracovanych" => "všetky bez rozpracovaných", "aj_rozpracovane" => "všetky + rozpracované", "iba_prijate" => "iba prijaté", "iba_rozpracovane" => "iba rozpracované"); echo check_visibility("filter_by_status", select("filter_by_status", "Filtruj objednávky:", "", $_SESSION["search_status"], "", "", "", "NO", $filtbyst)); echo "</div>"; echo "<div id=\"list_of_all\">"; $sec_code = "8975JK.!"; include_once 'searchbyname.php'; echo "<strong>kontakt </strong>(J.Vaško): 0904580149"; echo "</div>"; }
// get $id from $_POST['id'] if (is_pos_int($_POST['id'])) { $id = $_POST['id']; } else { die('Bad id value.'); } // we only update status if (isset($_POST['status'])) { $status = check_status($_POST['status']); $sql = "UPDATE experiments \n SET status = :status \n WHERE userid_creator = :userid \n AND id = :id"; $req = $bdd->prepare($sql); $result = $req->execute(array('status' => $status, 'userid' => $_SESSION['userid'], 'id' => $id)); // we only update visibility } elseif (isset($_POST['visibility'])) { // will return 'team' in case of wrong visibility $visibility = check_visibility($_POST['visibility']); $sql = "UPDATE experiments \n SET visibility = :visibility \n WHERE userid_creator = :userid \n AND id = :id"; $req = $bdd->prepare($sql); $result = $req->execute(array('visibility' => $visibility, 'userid' => $_SESSION['userid'], 'id' => $id)); // or we update date, title, and body } else { // get $title from $_POST['title'] $title = check_title($_POST['title']); // get $body from $_POST['body'] $body = check_body($_POST['body']); // get $date from $_POST['date'] $date = check_date($_POST['date']); // SQL for quicksave // we do a usercheck for experiments if ($_POST['type'] == 'experiments') { $sql = "INSERT INTO revisions(user_id, experiment_id, rev_notes, rev_body, rev_title) VALUES(:userid, :expid, :notes, :body, :title)";
$sub_nastavenia .= check_visibility("nastavenia_cp", "<li><a href=\"?vyber=nastavenia_cp\"{$class}>Cenové ponuky</a></li>"); if ($vyber == "nastavenia_do") { $class = " class=\"selected\""; } else { $class = ""; } $sub_nastavenia .= check_visibility("nastavenia_do", "<li><a href=\"?vyber=nastavenia_do\"{$class}>Naše Objednávky</a></li>"); if ($vyber == "default_settings") { $class = " class=\"selected\""; } else { $class = ""; } $sub_nastavenia .= check_visibility("default_settings", "<li><a href=\"?vyber=default_settings\"{$class}>Základné nastavenia</a></li>"); echo check_visibility("nastavenia", "<li><a href=\"\">Nastavenia</a><ul>{$sub_nastavenia}</ul></li>\n"); $sub_stats .= check_visibility("stats_users", "<li><a href=\"?vyber=stats_users\">Zákazníci</a></li>"); echo check_visibility("stats", "<li><a href=\"?vyber=stats\">Štatistiky</a><ul>{$sub_stats}</ul></li>\n"); echo " \r\n </ul>\r\n </div>\n"; } //die ("Ospravedlňujeme sa, objednávkový systém je na krátku chvíľu v údržbe. Do 30 minút bude opäť v prevádzke<br> Ďakujeme za pochopenie."); if ($vyber == "" or $vyber == "formular" or $vyber == "formular_skrine") { //df($vyber); if ($vyber == "") { $vyber = "formular"; } include_once "include/{$vyber}.php"; } else { if (!isset($_SESSION["logged"]) or $_SESSION["logged"] != 1) { echo "<form action=\"\" method=\"POST\"><br />\n"; echo "<label for=\"meno\">meno</label><input type=\"text\" value=\"{$all['meno']}\" name=\"meno\"><br />\n"; echo "<label for=\"druh\">heslo</label><input type=\"password\" value=\"{$all['meno']}\" name=\"heslo\"><br />\n"; echo "\r\n <input type=\"submit\" name=\"submit_pass\" value=\"OK\">\n\r\n </form>\r\n ";
function display_all($page, $vyber, $search_name) { echo "<h1>Všetky objednávky</h1>"; echo "<div class=\"filter_obj clearfix\">"; echo textfield("filter_by_obj_id", $_SESSION["search_id"], "č. obj:", 4, 3); echo textfield("filter_by_vlastne_cislo_obj", $_SESSION["search_vlastne_cislo_obj"], "zákaznícke č.obj:", 9, 5); $filtbyst = array("bez_rozpracovanych" => "Za posledných 30 dní - bez vymazaných", "iba_prijate" => "iba prijaté", "iba_rozpracovane" => "iba rozpracované", "aj_rozpracovane" => "Úplne všetky - aj vymazané"); echo check_visibility("filter_by_status", select("filter_by_status", "Filtruj objednávky:", "", $_SESSION["search_status"], "", "", "", "NO", $filtbyst)); echo "</div>"; echo "<div class=\"filter_obj clearfix\">"; echo select("filter_by_zakaznik", "Filtruj zákazníkov:", "SELECT id, CONCAT(meno, ', ', doruc_mesto) meno FROM uzivatel WHERE skupina=2 AND vymaz=0 ORDER BY meno", $_SESSION["search_zakaznik"], "", "", ""); $filter = array("0" => "všetky", "NR" => "áno"); echo select("filter_by_zakaznik", "Súkromné:", "", $_SESSION["search_zakaznik"], "", "", "", "NO", $filter); echo textfield("filter_by_name", $_SESSION["search_name"], "Meno (min. 3zn):", 5, 4); $filtbydeliv = array("0" => "všetky", "1" => "do 3 dní", "4" => "štandard"); echo check_visibility("filter_by_status", select("filter_by_delivery", "Filtruj dodanie:", "", $_SESSION["search_delivery"], "", "", "", "NO", $filtbydeliv)); echo "</div>"; echo "<div id=\"list_of_all\">"; $sec_code = "8975JK.!"; include_once 'searchbyname.php'; echo "<strong>kontakt </strong>(J.Vaško): 0904580149"; echo "</div>"; }
function display_all($page, $vyber, $search_name) { echo "<h1>Všetky výrobné plány</h1>"; echo "<div class=\"filter_obj clearfix\">"; echo textfield("filter_by_vp_id", $_SESSION["search_vp_id"], "č. obj:", 4, 4); echo textfield("filter_by_vp_name", $_SESSION["search_vp_name"], "Vyhľadaj podľa mena (min. 3zn):", 10, 10); $filtbyst = array("bez_rozpracovanych" => "všetky", "vo_vyrobe" => "vo výrobe", "iba_rozpracovane" => "iba rozpracované", "aj_rozpracovane" => "Úplne všetky - aj vymazané"); echo check_visibility("filter_by_status", select("filter_by_vp_status", "Stav výr. plánov:", "", $_SESSION["search_vp_status"], "", "", "", "NO", $filtbyst)); echo "</div>"; echo "<div id=\"list_of_all\">"; $sec_code = "8975JK.!"; include 'searchbyname_vyrobne_plany.php'; //echo "<strong>kontakt </strong>(J.Vaško): 0904580149"; echo "</div>"; }
function display_all($page, $vyber) { echo "<div class=\"confirm_order\">\r\n <a href=\"?vyber=formular_velkoobchod\">Vložiť novú položku</a>\r\n </div>"; echo "<div class=\"filter_obj clearfix\">"; $filtbyst = array("bez_rozpracovanych" => "všetky bez rozpracovaných", "aj_rozpracovane" => "všetky + rozpracované", "iba_prijate" => "iba prijaté", "iba_rozpracovane" => "iba rozpracované"); echo check_visibility("filter_by_status", select("filter_by_status_v", "Filtruj objednávky:", "", $_SESSION["search_status"], "", "", "", "NO", $filtbyst)); echo "</div>"; echo "<div id=\"list_of_all\">"; $sec_code = "8975JK.!"; include_once 'searchbyname_velkoobchod.php'; echo "</div>"; }