本文整理汇总了PHP中textfield函数的典型用法代码示例。如果您正苦于以下问题:PHP textfield函数的具体用法?PHP textfield怎么用?PHP textfield使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了textfield函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: edit
function edit($table, $vyber, $id)
{
$error_msg = array();
if ($_POST[submit]) {
$meno = sec_sql(sec_input($_POST["meno"]));
$hodnota = sec_sql(sec_input($_POST["hodnota"]));
if (strlen($meno) > 30 or strlen($meno) < 3) {
$error_msg[] = "Meno môže mať od 4 do 30 znakov";
}
if (strlen($hodnota) > 30 or strlen($hodnota) < 3) {
$error_msg[] = "Hodnota môže mať od 4 do 30 znakov";
}
//var_dump($error_msg);
if (empty($error_msg)) {
echo "ok";
} else {
echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
}
}
$id = sec_sql($id);
$query = "Select id, hodnota, meno from " . PREFIX . "{$table} WHERE id={$id}";
$value = sql_query($query);
$value = $value[0];
echo "<form method=\"POST\">";
hidden("id", $value[id]);
textfield("meno", $value[meno], "Meno", 50, 20);
textfield("hodnota", $value[hodnota], "Hodnota", 40, 20);
submit("submit", "Odoslať");
echo "</form>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:30,代码来源:material.php
示例2: form_task
function form_task($minimized, $vyber, $order)
{
//var_dump($vyber);
$cls = "ghost";
if (!empty($_SESSION["username"])) {
$upozornenie_d = sql_query("Select id from dodavatel\r\n WHERE upozornenie = " . $_SESSION["username"] . " ");
}
if (count($upozornenie_d) > 0) {
$up_id = array();
foreach ($upozornenie_d as $up) {
$up_id[] = $up["id"];
}
$pocet_upozorneni = sql_query("Select count(id) as counter from do_objednavka\r\n WHERE vymaz=0 AND komplet=0 AND id_dodavatel IN (" . implode(",", $up_id) . ") ")[0]["counter"];
}
if ($pocet_upozorneni > 0) {
$cls .= " red";
} else {
$cls .= " silver";
}
echo "<div id=\"tasker\" class=\"{$cls}\">\r\n \r\n <div class=\"tasker_title\">Objednávka <span></span>\r\n <div class=\"minimize\">_</div>\r\n </div>\r\n ";
echo "<div class=\"tasker_content {$minimized}\">";
echo "<div class=\"new_task\">";
echo "<form method=\"POST\" id=\"do_objednavka\">";
echo select("task_dodavatel", "Dodávateľ", "SELECT id, meno from dodavatel \r\n WHERE vymaz=0 \r\n ORDER BY meno", "", "", "", "", "NO");
echo textfield("task_ks", "", "množstvo", 10, 2);
$jednotky = array("ks" => "ks", "m" => "m");
echo select("jednotky", "", "", "", "", "", "", "NO", $jednotky);
echo textfield("task_text", "", "Text", 150, 32);
//echo hidden("task_produkt", "");
$ord = "";
$zakaznik = "";
if ($vyber == "objednavky" && $order > 0) {
$ord = sql_query("\r\n SELECT c_obj\r\n FROM objednavka \r\n WHERE id = " . $order . "\r\n LIMIT 1\r\n ")[0]["c_obj"];
$zakaznik = sql_query("\r\n SELECT meno\r\n FROM revizia \r\n WHERE id_obj = " . $order . "\r\n ORDER BY datum DESC LIMIT 1\r\n ")[0]["meno"];
}
echo textfield("task_zakaznik", $zakaznik, "Zákazník", 100, 20);
echo textfield("task_order", $ord, "č. obj.", 15, 5);
echo select("task_from", "Zadal", "SELECT id, meno from uzivatel \r\n WHERE skupina=1 AND perm_uroven_id<=2 AND vymaz=0 \r\n ORDER BY meno", $_SESSION["username"], "", "", "", "NO");
echo submit("submit", "Odoslať");
echo "</form>";
echo "</div>";
echo "</div>";
echo "</div>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:44,代码来源:task_ajax.php
示例3: redirect
}
//echo $_SESSION["username"];
if (empty($_SESSION["username"])) {
redirect("/?vyber=login");
}
$tasks = sql_query("SELECT count(*) as count\r\n FROM task \r\n WHERE for_uzivatel_id = " . $_SESSION["username"] . "\r\n AND komplet = 0 AND vymaz = 0\r\n ")[0][count];
if ($tasks > 0) {
$cls = "red";
} else {
$cls = "silver";
}
echo "<div id=\"tasker\" class=\"{$cls}\">\r\n \r\n <div class=\"tasker_title\">Úlohy\r\n <div class=\"minimize\">_</div>\r\n </div>";
echo "<div class=\"tasker_content {$minimized}\">";
echo "<div class=\"new_task\">";
echo select("task_for", "", "SELECT id, meno from uzivatel \r\n WHERE skupina=1 AND id<>1 AND vymaz=0\r\n AND id<>" . $_SESSION["username"] . " \r\n ORDER BY meno", "", "", "", "", "NO");
echo textfield("task_text", "");
echo "</div>";
echo "<div class=\"tasker_user\">";
echo "<div class=\"tasks_from\">Doručené správy";
$tasks = sql_query("SELECT t.*, u.meno from task t\r\n INNER JOIN uzivatel u\r\n ON t.uzivatel_id = u.id\r\n WHERE t.for_uzivatel_id = " . $_SESSION["username"] . " \r\n AND (t.komplet=0 OR (t.komplet=1 AND t.datum_komplet >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)))\r\n AND t.vymaz = 0\r\n ORDER BY t.komplet ASC, t.datum");
foreach ($tasks as $task) {
echo "<div class=\"tasker_task_from\">";
echo "<div class=\"tasker_username\">" . $task["meno"] . "</div>";
if ($task["komplet"] == 0) {
echo checker("task_complete", $task["id"], "");
echo "<div class=\"task_text datum\">" . dateDate($task["datum"]) . "</div>";
} else {
echo "<div class=\"check\"></div>";
echo "<div class=\"task_text datum\">" . dateDate($task["datum_komplet"]) . "</div>";
}
echo "<div class=\"task_text\">" . $task["task"] . "</div>";
开发者ID:jozefvasko,项目名称:benap-app,代码行数:31,代码来源:task_ajax.php
示例4: textfield
$pdf->SetFontSize(8);
$pdf->Write(5, 'Ф.И.О. плательщика');
$pdf->SetXY($x + 35, $y);
$pdf->Write(5, $name);
textfield($pdf, $x + 35, $y - 1, 77, '', '');
// Адрес плательщика
$y += 5;
$pdf->SetXY($x + 2, $y);
$pdf->SetFontSize(8);
$pdf->Write(5, 'Адрес плательщика');
$pdf->SetXY($x + 35, $y);
$pdf->Write(5, $address);
textfield($pdf, $x + 35, $y - 1, 77, '', '');
// Сумма платежа
$y += 5;
$pdf->SetXY($x + 64, $y);
$pdf->SetFontSize(8);
$pdf->Write(5, 'Сумма платежа: ');
$pdf->Write(5, floor($amount) . ' ' . $banknote . ' ' . round($amount * 100 - floor($amount) * 100) . ' ' . $pence);
// Итого
$y += 5;
$pdf->SetXY($x + 76, $y);
$pdf->SetFontSize(8);
$pdf->Write(5, ' Итого: ');
$pdf->SetFontSize(9);
$pdf->Write(5, floor($amount) . ' ' . $banknote . ' ' . round($amount * 100 - floor($amount) * 100) . ' ' . $pence);
$pdf->SetFontSize(8);
// Подпись плательщика
textfield($pdf, $x + 2, $y, 30, '', '(подпись плательщика)');
//Output the document
$pdf->Output('receipt.pdf', 'I');
开发者ID:OkayCMS,项目名称:Okay,代码行数:31,代码来源:callback.php
示例5: display_all
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>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:16,代码来源:objednavky.php
示例6: textfield
if ($access == TRUE) {
$message .= "<a href=\"?vyber={$vyber}&order={$order}&revision={$revision}&sub={$value['id']}&action=close\" class=\"vyroba_close\">Výroba kompletná</a>";
}
}
$message .= "</div>";
$message .= "<div class=\"print_hlavicka clearfix\">";
$message .= "<div class=\"print_poznamky_mat\">";
if (empty($vyr_status)) {
$vyr_status = 2;
}
//var_dump($vyroba_status);
$message2 = "<form method=\"POST\">";
$message2 .= textfield("vyr_tabula", $vyr_tabula, "Počet tabúľ", 5, 3);
$message2 .= textfield("vyr_stvorak", $vyr_stvorak, "m2", 5, 3);
$message2 .= select("vyr_abs", "ABS", "SELECT id, meno from cp_abs_vyrobca", $vyr_abs, "", "", "");
$message2 .= textfield("vyr_porez", $vyr_porez, "porez", 5, 3);
$message2 .= select("vyr_status", "Stav výroby", "SELECT id, meno from revizia_vyroba_status", $vyr_status, "", "", "", "NO");
$message2 .= submit("submit", "Odoslať");
$message2 .= "</form>";
if ($access == TRUE) {
$message .= $message2;
} else {
if (!in_array("1", $vyroba_status)) {
//echo $vyr_upravil." = ".$_SESSION["username"];
if (empty($sub) or $vyr_upravil == $_SESSION["username"]) {
$message .= $message2;
}
}
}
$message .= "</div>";
if ($data_obj[id_zakaznik] > 0) {
开发者ID:jozefvasko,项目名称:benap-app,代码行数:31,代码来源:vyroba.php
示例7: formular
function formular($fieldsets_c, $form_data, $secure_key = "")
{
//print_r("==============================");
//dd($form_data);
//var_dump($form_data);
$fieldsets_c = count($form_data["ks_all"]);
if ($fieldsets_c == 0) {
$fieldsets_c = 1;
}
if (!empty($form_data)) {
foreach ($form_data as $key => $value) {
${$key} = $value;
}
}
//var_dump($vyrobny_plan_all);
//var_dump($form_data);
//var_dump($dekor);
echo "<div class=\"info_panel\">Objednávkový systém určený výhradne zmluvným partnerom.<br>\r\n * povinné údaje sú označené hviezdičkou, <span class\"bold\">systém odberateľa identifikuje v administrácii podľa platnej e-mailovej adresy\r\n a automaticky pridelí všetky ostatné údaje, vrátane adresy doručenia</span>.</div>";
echo "<div id=\"content\">";
echo "<form method=\"POST\" id=\"formular\" enctype=\"multipart/form-data\">";
echo "<div class=\"intro_text\">\r\n <fieldset class=\"\">\r\n <legend>Oznamy</legend>" . (strlen(def_value("intro_text", "hodnota")) > 350 ? substr(def_value("intro_text", "hodnota"), 0, 350) . '' : def_value("intro_text", "hodnota")) . "\r\n </fieldset>\r\n </div>";
echo "<fieldset id=\"udaje\"><legend>Vaše údaje</legend>";
if ($_SESSION["logged"] == 1 and $_SESSION["perm_uroven"] < 3) {
echo "<div class=\"form_zakaznik_text\">";
echo textfield("zakaznik", "", "Zákazník", 50, 20);
echo hidden("zakaznik", $zakaznik);
echo "</div>";
}
if ($_SESSION["logged"] == 1 and $_SESSION["perm_uroven"] > 3) {
$query = "SELECT * FROM uzivatel WHERE id=" . $_SESSION["username"] . " LIMIT 1";
$user_dates = sql_query($query)[0];
if (empty($meno)) {
$meno = $user_dates["meno"];
}
if (empty($adresa)) {
$adresa = $user_dates["adresa"];
}
if (empty($mesto)) {
$mesto = $user_dates["mesto"];
}
if (empty($psc)) {
$psc = $user_dates["psc"];
}
if (empty($ico)) {
$ico = $user_dates["ico"];
}
if (empty($dic)) {
$dic = $user_dates["dic"];
}
if (empty($telefon)) {
$telefon = $user_dates["telefon"];
}
if (empty($email)) {
$email = $user_dates["email"];
}
if (empty($doruc_meno)) {
$doruc_meno = $user_dates["doruc_meno"];
}
if (empty($doruc_adresa)) {
$doruc_adresa = $user_dates["doruc_adresa"];
}
if (empty($doruc_mesto)) {
$doruc_mesto = $user_dates["doruc_mesto"];
}
if (empty($doruc_psc)) {
$doruc_psc = $user_dates["doruc_psc"];
}
if (empty($doruc_telefon)) {
$doruc_telefon = $user_dates["doruc_telefon"];
}
}
echo textfield("meno", $meno, "Odberateľ *", 40, 20, "", "Povinný údaj:<br> vpíšte Vaše meno alebo názov firmy");
echo textfield("adresa", $adresa, "Ulica", 50, 20);
echo textfield("mesto", $mesto, "Mesto", 50, 20);
echo textfield("psc", $psc, "PSČ", 50, 20);
echo textfield("ico", $ico, "IČO", 15, 20);
echo textfield("dic", $dic, "IČ DPH", 15, 20);
echo textfield("telefon", $telefon, "telefón *", 20, 20, "", "Povinný údaj");
if ($_SESSION["logged"] == 1 and $email == "") {
$email = def_value("default_email", "hodnota");
}
echo textfield("email", $email, "email *", 50, 20, "", "Povinný údaj:<br> vpíšte Váš email na ktorý Vám bude zaslané potvrdenie objednávky");
echo textfield("vlastne_cislo_obj", $vlastne_cislo_obj, "Vaše číslo obj.", 25, 20);
echo textfield("vystavil", $vystavil, "vystavil", 18, 20);
$skryt_zakaznikom = "AND skryt_zakaznikom=0";
if ($_SESSION["logged"] == 1) {
$skryt_zakaznikom = "";
}
//echo $skryt_zakaznikom;
$csrf_key = md5(uniqid(rand(), TRUE));
$_SESSION["csrf_key"] = $csrf_key;
//$_SESSION["janko"] = microtime();
//var_dump($_SESSION);
echo hidden("secure_csrf", $csrf_key);
if (!empty($secure_key)) {
echo hidden("secure_key", $secure_key);
}
echo "</fieldset>";
echo "<fieldset id=\"doruc_udaje\"><legend>Adresa doručenia</legend>";
echo textfield("doruc_meno", $doruc_meno, "Meno", 40, 20, "", "Povinný údaj:<br> vpíšte Vaše meno alebo názov firmy");
//.........这里部分代码省略.........
开发者ID:jozefvasko,项目名称:benap-app,代码行数:101,代码来源:fnc.php
示例8: formular_velkoobchod
function formular_velkoobchod($fieldsets_c, $form_data, $secure_key = "")
{
//print_r("==============================");
//var_dump($form_data);
$fieldsets_c = count($form_data["material_all"]);
if ($fieldsets_c == 0) {
$fieldsets_c = 1;
}
if (!empty($form_data)) {
foreach ($form_data as $key => $value) {
${$key} = $value;
}
}
//var_dump($vyrobca);
//var_dump($form_data);
//var_dump($dekor);
echo "<div id=\"content\">";
echo "<form method=\"POST\" id=\"formular\" enctype=\"multipart/form-data\">";
echo "<fieldset id=\"udaje\"><legend></legend>";
echo textfield("datum", $datum, "Dátum *", 40, 20, "", "");
$skryt_zakaznikom = "AND skryt_zakaznikom=0";
if ($_SESSION["logged"] == 1) {
$skryt_zakaznikom = "";
}
//echo $skryt_zakaznikom;
if (empty($vyrobca)) {
$vyrobca = 0;
}
if (empty($dekor)) {
$dekor = 0;
}
$csrf_key = md5(uniqid(rand(), TRUE));
$_SESSION["csrf_key"] = $csrf_key;
//$_SESSION["janko"] = microtime();
//var_dump($_SESSION);
echo hidden("secure_csrf", $csrf_key);
if (!empty($secure_key)) {
echo hidden("secure_key", $secure_key);
}
echo "</fieldset>";
//var_dump($_SESSION);
for ($i = 0; $i < $fieldsets_c; $i++) {
$poradie = $i + 1;
$checked = "";
if ($duplak[$i] == 1) {
$checked = "checked";
}
echo "<fieldset class=\"narezovka\">";
echo "<div class=\"count\">{$poradie}. </div>";
$material = empty($material) ? def_value("default_material", "hodnota") : $material;
echo select("material[]", "Materiál *", "SELECT id, hodnota, meno FROM material WHERE vymaz=0", $material_all[$i], "-vyberte si-", "material_v", "Povinný údaj:<br> prosím zvoľte si jeden z materiálov", "NO");
echo select("vyrobca[]", "Výrobca", "SELECT id, hodnota, meno FROM vyrobca WHERE vymaz=0 AND id_material=\"" . $material_all[$i] . "\" {$skryt_zakaznikom} ORDER BY meno", $vyrobca_all[$i], "", "vyrobca_v");
echo select("dekor[]", "Dekor", "SELECT id, hodnota, meno FROM dekor WHERE vymaz=0 AND id_vyrobca=\"{$vyrobca_all[$i]}\" {$skryt_zakaznikom} ORDER BY meno", $dekor_all[$i], "", "dekor_v");
echo textfield("m2[]", $m2_all[$i], "ks", 5, 3, "m2", "");
echo textfield("m3[]", $m3_all[$i], "m3", 5, 3, "m3", "");
if ($dekor_all[$i] > 0) {
$cena_dekor = sql_query("SELECT cena FROM cp_dekor_ks WHERE id_dekor=" . $dekor_all[$i] . " AND id_c_hladina=4 ORDER by id DESC LIMIT 1");
$cena_dekor = $cena_dekor[0][cena];
if ($m2_all[$i] > 0) {
$m2m3 = $m2_all[$i];
} else {
$m2m3 = $m3_all[$i];
}
$sum = 0;
$sum = $cena_dekor * $m2m3;
$sum_all = $sum_all + $sum;
}
$vypocet = $dlzka_all[$i] * $sirka_all[$i] / 1000000;
$vypocet = $vypocet * $ks_all[$i];
$vypocet_sum = $vypocet_sum + $vypocet;
$vypocet_final = round($vypocet, 2) . "";
echo "<div class=\"cena\">{$cena_dekor}</div>";
echo "<div class=\"vypocet_v\">{$sum}</div>\r\n <div class=\"odstran_riadok\"><input type=\"button\" value=\"\"></div>";
echo "</fieldset>";
}
echo "<div id=\"add_more_buttons\"><div id=\"vloz_riadok_v\"><input type=\"button\" value=\"Vlož ďalší riadok\"></div></div>";
echo "<div class=\"form_vypocet_sum\">" . ($sum_all > 0 ? "" . round($sum_all, 2) . " €" : "") . "</div>";
echo "<div class=\"form_vypocet_sum_duplak\">" . ($vypocet_duplak_sum > 0 ? "Duplák spracovanie: " . round($vypocet_duplak_sum, 2) . " m2" : "") . "";
echo "</div>";
//var_dump($form_data);
//var_dump($_POST);
echo textarea("komentar", $komentar, "Váš komentár", 50, 4, "komentar");
echo submit("submit", "Pokračuj >>");
echo "</form>\r\n </div>";
}
开发者ID:jozefvasko,项目名称:benap-app,代码行数:85,代码来源:fnc_velkoobchod.php
示例9: textfield
<script src="assets/addons/raphael/raphael.min.js" type="text/javascript"></script>
<script src="assets/script/raphael-script.js" type="text/javascript"></script>
<div id="zrezanie_parent">
<?php
textfield("roh1x", $roh, "", 4, 3);
textfield("roh1y", $roh, "", 4, 3);
textfield("roh2x", $roh, "", 4, 3);
textfield("roh2y", $roh, "", 4, 3);
textfield("roh3x", $roh, "", 4, 3);
textfield("roh3y", $roh, "", 4, 3);
textfield("roh4x", $roh, "", 4, 3);
textfield("roh4y", $roh, "", 4, 3);
?>
<div id="paper"></div>
</div>
<span class="add">button</span>
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:19,代码来源:raphael.php
示例10: filter_for_email
function filter_for_email()
{
//var_dump($_POST);
if (isset($_POST["filter_by_dodavatel"])) {
$filter_dodavatel = sec_input($_POST["filter_by_dodavatel"]);
}
if (isset($_POST["filter_date_od"])) {
$filter_date_od = sec_input($_POST["filter_date_od"]);
}
if (isset($_POST["search_date_do"])) {
$search_date_do = sec_input($_POST["search_date_do"]);
}
$where[] = "komplet=0";
$where[] = "o.vymaz=0";
if (!empty($filter_dodavatel)) {
$where[] = "o.id_dodavatel = {$filter_dodavatel}";
}
if (!empty($filter_date_od)) {
$where[] = "o.datum >= \"{$filter_date_od}\"";
}
if (!empty($search_date_do)) {
$where[] = "o.datum <= \"{$search_date_do}\"";
}
$query = "SELECT * from dodavatel WHERE id={$filter_dodavatel}";
$dodavatel = sql_query($query)[0];
$query = "SELECT o.id, DATE_FORMAT(datum, '%d. %m. %Y, %H:%i:%s') AS dat_upr, komplet, dod.meno as dodavatel, o.poznamka \r\n FROM do_objednavka o\r\n INNER JOIN dodavatel dod\r\n ON o.id_dodavatel = dod.id\r\n WHERE " . implode(" AND ", $where) . " ";
$query .= "ORDER BY datum DESC";
//var_dump($query);
echo "<h1>" . $dodavatel["meno"] . "</h1>";
echo "<form method=\"POST\">";
echo "<div>" . (!empty($dodavatel["email"]) ? "<span class=\"bold\">email:</span> " . $dodavatel["email"] . "" : "") . "</div>";
echo select("send_from", "Odoslať ako:", "SELECT id, CONCAT(zobraz_meno, ', ', email) as meno from uzivatel \r\n WHERE skupina=1 AND perm_uroven_id=1 AND vymaz=0 \r\n ORDER BY meno", $_SESSION["username"], "", "", "", "NO");
hidden("dodavatel", $dodavatel["id"]);
echo "<table id=\"all_orders\">";
echo "<thead> <tr>\r\n <th></th>\r\n <th>dátum</th>\r\n <th>produkt</th> \r\n <th>zákazník</th>\r\n <th>poznámka</th>\r\n \r\n </tr></thead><tbody>";
//var_dump($where);
$objednavka = sql_query($query);
//$objednavka = $objednavka[0];
//var_dump($objednavka);
if (count($objednavka) > 0) {
foreach ($objednavka as $obj) {
$revizia = sql_query("\r\n SELECT objr.*, p.meno, p.email_meno\r\n FROM do_objednavka_row objr\r\n INNER JOIN do_produkt p\r\n ON objr.id_do_produkt = p.id\r\n WHERE objr.id_do_objednavka = " . $obj["id"] . "\r\n ORDER BY objr.datum DESC LIMIT 1\r\n ");
$revizia = $revizia[0];
echo "\r\n <tr class=\"obj_" . $obj[nastavenie] . "\">\r\n <td class=\"obj_cislo\">\r\n ";
checker("id_do_objednavka[" . $obj["id"] . "][id]", $obj["id"], "", "yes");
echo "</td>";
echo "<td class=\"obj_datum do_obj_datum\">" . $obj["dat_upr"] . " </td>\r\n <td class=\"obj_datum do_obj_produkt\"><a href=\"?vyber=do_objednavka&order=" . $obj[id] . "\">\r\n " . (!empty($revizia[ks]) ? $revizia["ks"] . $revizia["jednotka"] . " " : "") . "\r\n " . (!empty($revizia[email_meno]) ? $revizia[email_meno] : $revizia[meno]) . "\r\n </a></td>\r\n ";
//var_dump($vyroba2);
echo "<td class=\"obj_status\">" . $revizia[zakaznik] . "</td> \r\n <td class=\"do_obj_poznamka\">\r\n " . textfield("id_do_objednavka[" . $obj["id"] . "][poznamka]", $_SESSION["search_text"], "", "", 40) . "\r\n </td>\r\n </tr>\r\n ";
}
}
echo "</tbody></table>";
if (!empty($dodavatel["email"])) {
echo submit("send_email_dodavatel", "Odošli email s objednávkou");
}
echo "</form>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:57,代码来源:do_objednavka.php
示例11: edit
//.........这里部分代码省略.........
}
sql_update($query);
//echo $id_perm_uroven;
header("location: index.php?vyber=nastavenia&sub={$table}&page={$page}");
exit;
} else {
echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
}
}
$id = sec_sql($id);
$query = "Select id, hodnota, meno from " . PREFIX . "{$table} WHERE id={$id}";
if ($table == "vyrobca") {
$query = "Select id, id_material, hodnota, meno, skryt_zakaznikom from {$table} WHERE id={$id}";
}
if ($table == "cp_abs_vyrobca") {
$query = "Select id, meno from {$table} WHERE id={$id}";
}
if ($table == "dekor") {
$query = "Select id, id_material, id_vyrobca, hodnota, meno, stvorakov, skryt_zakaznikom from {$table} WHERE id={$id}";
}
if ($table == "hrana") {
$query = "Select id, hodnota, hodnota_csv, meno, zobraz_vo_formulari from {$table} WHERE id={$id}";
}
if ($table == "hrubka") {
$query = "Select id, hodnota, meno, id_material from {$table} WHERE id={$id}";
}
if ($table == "uzivatel") {
$query = "Select id, meno, adresa, ico_icdph, telefon, email, email2, skupina, id_c_hladina, perm_uroven_id from {$table} WHERE id={$id}";
}
$value = sql_query($query);
$value = $value[0];
echo "<form method=\"POST\" enctype=\"multipart/form-data\">";
hidden("id", $value[id]);
echo textfield("meno", $value[meno], "Meno", 50, 30);
if ($table != "uzivatel" and $table != "cp_abs_vyrobca") {
echo textfield("hodnota", $value[hodnota], "Hodnota", 50, 30);
//echo "hej";
}
if ($table == "vyrobca" or $table == "hrubka") {
echo select("id_material", "Materiál", "SELECT id, hodnota, meno FROM material WHERE vymaz=0", $value[id_material]);
}
if ($table == "vyrobca") {
$zobraz_vo = array(1 => "skryť", 0 => "zobraz");
echo select("skryt_zakaznikom", "zobraz zákaznikom", "", $value[skryt_zakaznikom], "", "", "", "NO", $zobraz_vo);
}
if ($table == "dekor") {
echo select("id_material", "Materiál", "SELECT id, hodnota, meno FROM material WHERE vymaz=0", $value[id_material]);
echo select("id_vyrobca", "Výrobca", "SELECT id, hodnota, meno FROM vyrobca WHERE vymaz=0", $value[id_vyrobca]);
$zobraz_vo = array(1 => "skryť", 0 => "zobraz");
echo select("skryt_zakaznikom", "zobraz zákaznikom", "", $value[skryt_zakaznikom], "", "", "", "NO", $zobraz_vo);
echo textfield("stvorakov", $value[stvorakov], "stvorakov v tab.", 20, 10);
file_upload("subor", "subor", "Príloha");
if (isset($_GET["rotate"])) {
$rotate = sec_input($_GET["rotate"]);
}
if ($rotate == 1) {
$rotateFilename = "assets/images/dekor/{$value[id]}.jpg";
// PATH
if (file_exists($rotateFilename)) {
$degrees = 90;
//header('Content-type: image/jpeg');
$source = imagecreatefromjpeg($rotateFilename);
// Rotate
$rotate = imagerotate($source, $degrees, 0);
imagejpeg($rotate, $rotateFilename, 100);
imagedestroy($source);
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:67,代码来源:nastavenia.php
示例12: top
if (strtolower(p('username')) == strtolower(schlage_username()) && p('password') == schlage_password()) {
success('Welcome back!');
s('logged_in', 1);
r('/users');
} else {
error('Invalid login');
}
}
top();
form();
func('login');
label('Username');
textfield('username');
label('Password');
password('password');
label();
submit('Log in');
spacer();
endform();
bottom();
?>
开发者ID:rishair,项目名称:schlagelink-twilio,代码行数:31,代码来源:login.php
示例13: insert
//.........这里部分代码省略.........
}
if (!empty($id)) {
$form_data = sql_query("SELECT id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
if ($sub == "cp_abs") {
$form_data = sql_query("SELECT id_hrana, id_abs_vyrobca, id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
$id_hrana = $form_data[id_hrana];
$cp_abs_vyroba = $form_data[cp_abs_vyrobca];
}
if ($sub == "cp_abs_sluzba") {
$form_data = sql_query("SELECT id_hrana, id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
$id_hrana = $form_data[id_hrana];
}
if ($sub == "cp_dekor_ks") {
$form_data = sql_query("SELECT id_dekor, id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
$id_dekor = $form_data[id_dekor];
}
if ($sub == "cp_polozka") {
$form_data = sql_query("SELECT id_polozky_cp, id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
$id_polozky_cp = $form_data[id_polozky_cp];
}
if ($sub == "cp_material_ks") {
$form_data = sql_query("SELECT id_material, id_c_hladina, id_c_hladina_typ, cena FROM {$table}\n WHERE id={$id} LIMIT 1");
$form_data = $form_data[0];
$id_material = $form_data[id_material];
}
//var_dump($form_data);
$c_hladina = $form_data[id_c_hladina];
$c_hladina_typ = $form_data[id_c_hladina_typ];
$cena = $form_data[cena];
}
echo "<form method=\"POST\">";
if (empty($id_dekor)) {
$id_dekor = sec_sql(sec_input($_GET["id_dekor"]));
}
if (empty($id_polozky_cp)) {
$id_polozky_cp = sec_sql(sec_input($_GET["id_polozky_cp"]));
}
if (empty($c_hladina)) {
$c_hladina = sec_sql(sec_input($_GET["c_hladina"]));
}
if (empty($id_material)) {
$id_material = sec_sql(sec_input($_GET["id_material"]));
}
if ($table == "cp_dekor_ks") {
echo select("id_dekor", "Dekor", "SELECT id, hodnota as meno FROM dekor WHERE vymaz=0", $id_dekor, "", "", "", "NO");
echo "<div class=\"calculator\">";
echo textfield("cp_dlzka", $dlzka, "dĺžka", 10, 5);
echo textfield("cp_sirka", $sirka, "šírka", 10, 5);
echo textfield("cp_hrubka", $hrubka, "hrúbka", 10, 5);
echo "<div class=\"m3-row\">";
echo textfield("cp_cena_m3", $cena_m3, "cena za m3", 10, 5);
echo "<span>použi</span>";
echo "</div>";
echo "<div class=\"m2-row\">";
echo textfield("cp_cena_m2", $cena_m2, "cena za m2", 10, 5);
echo "<span>použi</span>";
echo "</div>";
echo "<div class=\"ks-row\">";
echo textfield("cp_cena_ks", $cena_ks, "cena za ks", 10, 5);
echo "<span>použi</span>";
echo "</div>";
echo "<div class=\"calc-vypocet\">\n <div class=\"calc-m2\">m2: <span></span></div>\n <div class=\"calc-m3\">m3: <span></span></div>\n <div class=\"calc-ks\">ks v m3: <span></span></div>\n <div class=\"calc-m2-v-m3\">m2 v m3: <span></span></div>\n \n </div>";
echo "</div>";
}
if ($table == "cp_polozka") {
echo select("id_polozky_cp", "Položka", "SELECT id, meno FROM polozky_cp WHERE vymaz=0", $id_polozky_cp, "", "", "", "NO");
}
if ($table == "cp_material_ks") {
echo select("id_material", "Materiál ks", "SELECT id, hodnota as meno FROM material WHERE vymaz=0", $id_material, "", "", "", "NO");
}
echo select("c_hladina", "Cen. hladina", "SELECT id, meno FROM c_hladina WHERE vymaz=0", $c_hladina, "", "", "", "NO");
echo textfield("cena", $cena, "Cena *", 20, 10);
echo select("c_hladina_typ", "typ ceny", "SELECT id, meno FROM c_hladina_typ WHERE vymaz=0", $c_hladina_typ, "", "", "", "NO");
if ($table == "uzivatel") {
echo "<div class=\"help_form\">Adresa, ičo a telefon sú vyžadované iba pre \"Zákazníkov\"</div>";
echo textfield("adresa", $adresa, "adresa *", 40, 20);
echo textfield("ico_icdph", $ico_icdph, "ičo / ičdph", 40, 20);
echo textfield("telefon", $telefon, "telefón *", 40, 20);
echo textfield("email", $email, "email *", 40, 20);
echo select("skupina", "Skupina *", "SELECT id, meno FROM uzivatel_skupina WHERE vymaz=0", $skupina);
echo select("id_c_hladina", "Cen.hladina *", "SELECT id, meno FROM c_hladina WHERE vymaz=0", $id_c_hladina);
echo "<div class=\"help_form\">Heslo je povinné iba pre \"Administratorov\"</div>";
echo textfield("password", $password, "heslo", 40, 20);
echo textfield("password_confirm", "", "zopakujte heslo", 40, 20);
}
if ($table == "cp_abs") {
echo select("id_hrana", "ABS", "SELECT id, hodnota as meno FROM hrana WHERE vymaz=0", $id_hrana, "", "", "", "NO");
echo select("cp_abs_vyrobca", "Výrobca ABS", "SELECT id, meno FROM cp_abs_vyrobca WHERE vymaz=0", $cp_abs_vyrobca, "", "", "", "NO");
}
if ($table == "cp_abs_sluzba") {
echo select("id_hrana", "ABS", "SELECT id, hodnota as meno FROM hrana WHERE vymaz=0", $id_hrana, "", "", "", "NO");
}
echo submit("submit", "Odoslať");
echo "</form>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:101,代码来源:nastavenia_cp.php
示例14: Schlage
$schlage = new Schlage($u, $p);
if (!$schlage->Login()) {
error('Invalid login, try again');
} else {
schlage_username($u);
schlage_password($p);
success('Good to go!');
s('logged_in', 1);
r('/users');
}
}
}
top();
form();
func('authenticate');
label('Username');
textfield('schlage_username');
label('Password');
textfield('schlage_password');
label();
submit('Authenticate');
bottom();
?>
开发者ID:rishair,项目名称:schlagelink-twilio,代码行数:31,代码来源:start.php
示例15: defined
defined('_ROOT') or die(__FILE__);
extract($_GET);
$request = $_GET;
$request['type'] = intval($type);
$request['parentid'] = intval($parentid);
$request['query_string'] = '?' . $_SERVER['QUERY_STRING'];
$request['http_referer'] = $_SERVER['HTTP_REFERER'];
if ($_POST) {
// update main
$arr = array($_GET['code'] => $_POST['value']);
$oClass->update($arr);
//clear_cache_configure();
$oMaster->user_log('Updated value: ' . $_POST['value'] . ' for configure: ' . $_GET['code']);
clear_sql_cache();
$hook->redirect('?mod=configure&gid=' . $_GET['gid']);
}
$tpl->setfile(array('body' => 'configure.update.tpl'));
$result = $oConfigure->view(" code = '" . stripslashes($_GET['code']) . "'");
$data = $result->fetch();
$set_function = $data['set_function'];
if ($set_function) {
eval('$value = ' . $set_function . "'" . $data['value'] . "');");
} else {
$value = textfield('value', $data['value']);
}
$data['value'] = $value;
$tpl->assign($data);
$breadcrumb->assign("", "Edit");
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);
开发者ID:ngukho,项目名称:mvc-cms,代码行数:30,代码来源:action.update.php
|
请发表评论