function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le libell� choisi puis validez';
    } else {
        $legende = 'Nouveau libell�';
    }
    return creerFieldset($legende, array(inputRO('Document :', 'DOCNOM', 2, 4), inputRO('No d\'ordre* :', 'ORDRE', 2, 2), sautLigne(), input('Intitul�* :', 'NOMD', 2, 4, true, 'text', '', 'input500'), input('', 'COL', 2, 4, false, 'hidden'), sautLigne(), textarea('Contenu* :', 'CONTENU', 2, 8, true, 10, 80, 'textarea800'), input('', 'DOCNO', 2, 4, false, 'hidden')));
}
Пример #2
0
function email_contact($vol)
{
    echo "\n        <p>\n        <h2>Contact {$vol->name} by email</h2>\n        <form action=help_vol.php>\n        <input type=hidden name=volid value=\"{$vol->id}\">\n    ";
    list_start();
    list_item("Your email address", input("email_addr", ""));
    list_item("Subject<br><span class=note>Include 'BOINC' in the subject so {$vol->name} will know it's not spam</span>", input("subject", ""));
    list_item("Message<br><span class=note>\n            \n        Please include a detailed description of the problem\n        you're experiencing.\n        If possible, include the contents of BOINC's message log.\n        </span>", textarea("message", ""));
    list_item("", "<input type=submit name=send_email value=OK>");
    list_end();
    echo "</form>\n    ";
}
Пример #3
0
function edit_form($file)
{
    global $PHP_SELF;
    if (@is_readable($file)) {
        $data = join('', file($file));
    } elseif (EDIT_USE_SUOPEN and $f = suopen($file, "r")) {
        while (!feof($f)) {
            $data .= fread($f, 16000);
        }
        suclose($f);
    }
    return form($PHP_SELF, textarea('data', $data) . submit('Save'));
}
Пример #4
0
 private function AnonDL()
 {
     if (empty($_POST['step']) || $_POST['step'] != '1') {
         $page = $this->GetPage($this->baseurl . '/download/start_timer/' . $this->fid, $this->cookie, 0, $this->link . "\r\nX-Requested-With: XMLHttpRequest");
         $this->cookie = GetCookiesArr($page, $this->cookie);
         $start_timer = $this->json2array($page, 'StartTimer Error');
         if (empty($start_timer) || empty($start_timer['show_timer']) && empty($start_timer['redirect_url'])) {
             if (!empty($start_timer['html'])) {
                 if (preg_match('@Delay between downloads must be not less than \\d+ minutes.\\s+Try again in \\d+ minutes@i', $page, $err)) {
                     html_error("[AnonDL] {$err[0]}");
                 }
                 html_error('Error @ StartTimer: ' . htmlspecialchars(strip_tags($start_timer['html']), ENT_QUOTES));
             } else {
                 //  if (substr($page, 9, 3) == '200')
                 textarea($start_timer);
                 html_error('Unknown error @ StartTimer');
             }
         }
         if (strpos($start_timer['redirect_url'], '://') === false) {
             $start_timer['redirect_url'] = $this->baseurl . $start_timer['redirect_url'];
         }
         if (!empty($start_timer['show_timer']) && $start_timer['timer'] > 0) {
             $this->CountDown($start_timer['timer']);
         }
         $page = $this->GetPage($start_timer['redirect_url'], $this->cookie, 0, $this->link);
         $this->cookie = GetCookiesArr($page, $this->cookie);
         if (!preg_match('@https?://api(?:-secure)?\\.solvemedia\\.com/papi/challenge\\.(?:no)?script\\?k=([\\w\\-\\.]+)@i', $page, $smKey)) {
             if (preg_match($this->DLRegexp, $page, $DL)) {
                 return $this->RedirectDownload($DL[0], urldecode(parse_url($DL[0], PHP_URL_PATH)));
             }
             html_error('CAPTCHA not found.');
         }
         $data = $this->DefaultParamArr($this->link, $this->cookie, $start_timer['redirect_url'], true);
         $data['step'] = '1';
         $data['posturl'] = urldecode(parse_url($start_timer['redirect_url'], PHP_URL_PATH));
         return $this->SolveMedia($smKey[1], $data, $start_timer['redirect_url']);
     } else {
         $post = $this->verifySolveMedia();
         $post['send'] = 'Submit';
         $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
         $page = $this->GetPage($this->baseurl . $_POST['posturl'], $this->cookie, $post);
         $this->cookie = GetCookiesArr($page, $this->cookie);
         if (preg_match("@\nLocation: (?:https?://(?:www\\.)?alfafile\\.net)?/file/{$this->fid}/?\r?\n@i", $page)) {
             $page = $this->GetPage($this->link, $this->cookie);
         }
         if (!preg_match($this->DLRegexp, $page, $DL)) {
             html_error('Download Link Not Found.');
         }
         return $this->RedirectDownload($DL[0], urldecode(parse_url($DL[0], PHP_URL_PATH)));
     }
 }
Пример #5
0
function options($self, $title, $prefix, $entityName, $withCsvOptions, $withMagmiDelete, $withEnable, $withDefaults, $pruneKeepDefaultValue, $sourceText, $plugin)
{
    $default_rows_for_sets = "attribute_set_name,attribute_code,attribute_group_name\n*,name,General\n*,description,General\n*,short_description,General\n*,sku,General\n*,weight,General\n*,news_from_date,General\n*,news_to_date,General\n*,status,General\n*,url_key,General\n*,visibility,General\n*,country_of_manufacture,General\n*,price,Prices\n*,group_price,Prices\n*,special_price,Prices\n*,special_from_date,Prices\n*,special_to_date,Prices\n*,tier_price,Prices\n*,msrp_enabled,Prices\n*,msrp_display_actual_price_type,Prices\n*,msrp,Prices\n*,tax_class_id,Prices\n*,price_view,Prices\n*,meta_title,Meta Information\n*,meta_keyword,Meta Information\n*,meta_description,Meta Information\n*,image,Images\n*,small_image,Images\n*,thumbnail,Images\n*,media_gallery,Images\n*,gallery,Images\n*,is_recurring,Recurring Profile\n*,recurring_profile,Recurring Profile\n*,custom_design,Design\n*,custom_design_from,Design\n*,custom_design_to,Design\n*,custom_layout_update,Design\n*,page_layout,Design\n*,options_container,Design\n*,gift_message_available,Gift Options";
    if (isset($title)) {
        ?>
<h3><?php 
        echo $title;
        ?>
</h3><?php 
    }
    if ($withEnable) {
        checkbox($self, $prefix, 'enable', true, "Enable {$entityName} import");
        startDiv($self, $prefix, 'enabled', $self->getParam($prefix . ":enable", "on") == "on");
    }
    if ($withCsvOptions) {
        csvOptions($self, $prefix);
    }
    ?>
    <h4>Import behavior</h4>
    <?php 
    if ($withDefaults) {
        text($self, $prefix, 'default_values', "", "Set default values for non-existing columns in {$sourceText} (JSON)");
    }
    if ($prefix == '5B5AAI') {
        textarea($self, $prefix, 'default_rows', $default_rows_for_sets, "Add these attribute associations to given CSV data, '*' for attribute set name  means 'for each attribute set from given CSV' (Format: CSV with titles, spearator ',', enclosure '\"').");
    }
    checkbox($self, $prefix, 'prune', true, "Prune {$entityName}s which are not in {$sourceText} from database");
    startDiv($self, $prefix, 'prune_opts');
    if ($prefix == '5B5ATI' || $prefix == '5B5AAI') {
        checkbox($self, $prefix, 'prune_keep_system_attributes', true, "Dont touch non-user attributes when pruning.");
    }
    text($self, $prefix, 'prune_only', '', "prune only {$entityName}s matching regexp");
    text($self, $prefix, 'prune_keep', $pruneKeepDefaultValue, "additionally, keep following {$entityName}s when pruning, even if not given in {$sourceText} (comma-separated)");
    endDiv($self);
    if ($withMagmiDelete) {
        checkbox($self, $prefix, 'magmi_delete', true, "Delete {$entityName}s marked \"magmi:delete\" = 1");
    }
    checkbox($self, $prefix, 'create', true, "Create {$entityName}s from {$sourceText} which are not in database");
    checkbox($self, $prefix, 'update', true, "Update {$entityName}s from {$sourceText} which are already in database");
    if ($prefix == '5B5ASI') {
        startDiv($self, $prefix, 'attribute_groups');
        options($self, null, '5B5AGI', 'attribute group', false, false, false, false, "General,Prices,Meta Information,Images,Recurring Profile,Design,Gift Options", '"magmi:groups"', $plugin);
        endDiv($self);
    }
    if ($withEnable) {
        endDiv($self);
    }
    javascript($self, $prefix, $withCsvOptions, $plugin);
}
Пример #6
0
function page_edit_form($name)
{
    global $step;
    if ($step == 'div_edit') {
        list($html_array, $html, $start_pos, $stop_pos) = extract_div();
        $html_array = serialize($html_array);
        $outstep = 'div_save';
    } else {
        $html = safe_field('user_html', 'txp_page', "name='{$name}'");
        $outstep = 'page_save';
    }
    $out[] = textarea('500', '600', $html, 'html') . graf(fInput('submit', 'save', gTxt('save'), 'publish') . eInput('page') . sInput($outstep) . hInput('name', $name));
    if ($step == 'div_edit') {
        $out[] = hInput('html_array', $html_array) . hInput('start_pos', $start_pos) . hInput('stop_pos', $stop_pos) . hInput('name', $name);
    } else {
        $out[] = graf(gTxt('copy_page_as') . fInput('text', 'newname', '', 'edit') . fInput('submit', 'copy', gTxt('copy'), 'smallerbox'));
    }
    return form(join('', $out));
}
Пример #7
0
function print_form($vol, $action_name)
{
    list_start();
    list_item("Name or nickname", input("volname", $vol->name));
    list_item("Email address<br><font size=-2>This won't be publicized,\n        but user email may be sent here.\n        Use a separate mailbox if you want.</font>", input("email_addr", $vol->email_addr));
    list_item("Password", password("password", $vol->password));
    list_item("Skype ID<br><font size=-2>\n        This will be publicized.\n        Use a Skype account other than\n        your primary one if you want.</font>", input("skypeid", $vol->skypeid));
    list_item("Primary language", spoken_language_list("lang1", $vol->lang1));
    list_item("Secondary language", spoken_language_list("lang2", $vol->lang2));
    list_item("Country", "<select name=country>" . country_select($vol->country) . "</select>");
    list_item("Specialties<br><font size=-2>\n        What kinds of computers (Windows/Mac/Linux)\n        and/or networking technologies (proxies, NATs)\n        are you most familiar with?</font>", textarea("specialties", $vol->specialties));
    list_item("Projects<br><font size=-2>\n        Do you specialize in any particular BOINC-based projects?</font>", textarea("projects", $vol->projects));
    list_item("What days and times are you typically available for help?\n        <br><font size=-2>Include your time zone, or use UTC</font>", textarea("availability", $vol->availability));
    list_item("Is Skype voice OK?", yesno("voice_ok", $vol->voice_ok));
    list_item("Is Skype text OK?", yesno("text_ok", $vol->text_ok));
    list_item("Hide your account?", yesno("hide", $vol->hide));
    list_item("", "<input type=submit name={$action_name} value=OK>");
    list_end();
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un projet
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le projet choisi puis validez';
        $cloture = sautLigne() . radio('Etat du projet :', 'ARCHIVE', 'Archivé', 'Encours', 2, 1, 2) . '<div class="span1"></div>';
        $dtcloture = input('Date de cloture :', 'DTCLOTURE', 3, 3, false, 'date');
        //$mission = sautLigne() . afficher('<b>MISSION</b>', '', 'span2', 'span3');
        $mission = 'MISSION';
    } else {
        $legende = 'Nouveau projet';
        $cloture = '';
        $dtcloture = '';
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    if ($_POST['action'] == 'creer') {
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    $retour = creerFieldset($legende, array(select('Client :', 'CLIENT', array() + donner_liste('CLIENT', 'CLI'), 3, 3, true), input('Nom du projet :', 'NOM', 3, 3, true), sautLigne(), select('Contact client :', 'CTC', array() + donner_liste('CONTACT_CLIENT', 'CTC'), 3, 3, false), select('Contact fournisseur (si il y en a un) :', 'CTF', array('' => '') + donner_liste('CONTACT_FOURNISSEUR', 'CTF'), 3, 3, false), sautLigne(), input('Date de démarrage :', 'DTDEBUT', 3, 3, true, 'date'), input('Numéro de cde du projet :', 'NUMCMDE', 3, 3, true), sautLigne(), select('Collaborateur :', 'COL', array() + donner_liste('COLLABORATEUR', 'COL'), 3, 3, false), select('Projet suivi par :', 'SUIVIPAR', array() + donner_liste('COMMERCIAL', 'COL'), 3, 3, false), sautLigne(), input('Durée prévisionnelle (jours) :', 'NBJOURS', 3, 3, false), input('Date de fin prévue :', 'DTFINPREVUE', 3, 3, false, 'date'), sautLigne(), textarea('Détails :', 'DETAIL', 3, 8, true, 1, 80, 'textarea800'), sautLigne(), textarea('Modalités :', 'MODALITE', 3, 8, false, 4, 80, 'textarea800'), $cloture, $dtcloture, input('', 'NO', 2, 3, true, 'hidden')));
    // Partie mission
    $retour .= creerFieldset($mission, array(input('Nom de la mission :', 'MISNOM', 3, 3, true), sautLigne(), input('Numéro de cde :', 'MISNUMCMDE', 3, 3, true), input('Date de cde :', 'MISDATECMDE', 3, 3, true, 'date'), sautLigne(), input('Début de mission :', 'MISDTDEBUT', 3, 3, true, 'date'), input('Fin de mission :', 'MISDTFIN', 3, 3, true, 'date'), sautLigne(), input('Durée prévisionnelle (jours) :', 'MISNBJOURS', 3, 3, false), sautLigne(), radio('Forfait :', 'MISFORFAIT', 'Oui', 'Non', 3, 1, 1), '<div class="span1"></div>', input('Montant du forfait :', 'MISMONTFORFAIT', 3, 3, false), sautLigne(), input('Taux journalier :', 'MISTJM', 3, 3, false), input('Prix d\'achat :', 'MISPA', 3, 3, false), sautLigne(), textarea('Commentaire :', 'MISCOMMENTAIRE', 3, 8, false, 4, 80, 'textarea800'), input('', 'MISORDRE', 2, 3, false, 'hidden'), input('', 'MISNSEQUENTIEL', 2, 3, false, 'hidden'), input('', 'MISNO', 2, 3, false, 'hidden'), input('', 'PRONO', 2, 3, false, 'hidden'), input('', 'idmission', 2, 3, false, 'hidden'), input('', 'action', 2, 3, false, 'hidden')));
    ob_start();
    ?>
<script>
    $(document).ready(function() {
        $('[name="DETAIL"]').css('width', '800px');
        $('[name="NOM"]').change(function(){
            $('[name="MISNOM"]').val($('[name="NOM"]').val());
        });
        $('[name="NUMCMDE"]').change(function(){
            $('[name="MISNUMCMDE"]').val($('[name="NUMCMDE"]').val());
        });
    });
</script>
        <?php 
    $retour .= ob_get_contents();
    ob_end_clean();
    return $retour;
}
Пример #9
0
    <td width="150">Agama ,Status Kawin</td><td>
        <?php 
echo buatcombo('agama', 'app_agama', 'col-sm-2', 'keterangan', 'agama_id', '', '');
?>
         <div class="col-sm-2">
                        <?php 
echo form_dropdown('kawin', $kawin, '', $class);
?>
                 </div>
    </td>
    </tr>
 
            <tr>
    <td width="150">Alamat</td><td>
        <?php 
echo textarea('alamat', '', 'col-sm-5', 2, '');
?>
    </td>
    </tr>
        <tr>
    <td width="150">No Hp ,Email</td><td>
        <?php 
echo inputan('text', 'hp', 'col-sm-2', 'No HP ..', 0, '', '');
?>
 
         <?php 
echo inputan('email', 'email', 'col-sm-4', 'Email ..', 0, '', '');
?>
    </td>
    </tr>
 <tr>
Пример #10
0
<form action="" method="post" enctype="multipart/form-data" id="form">
<?php 
$execute = "<input type='submit' value='" . lang('Execute') . "' title='Ctrl+Enter'>";
if (!isset($_GET["import"])) {
    $q = $_GET["sql"];
    // overwrite $q from if ($_POST) to save memory
    if ($_POST) {
        $q = $_POST["query"];
    } elseif ($_GET["history"] == "all") {
        $q = $history;
    } elseif ($_GET["history"] != "") {
        $q = $history[$_GET["history"]][0];
    }
    echo "<p>";
    textarea("query", $q, 20);
    echo $_POST ? "" : "<script type='text/javascript'>focus(document.getElementsByTagName('textarea')[0]);</script>\n";
    echo "<p>{$execute}\n";
} else {
    echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
    echo ini_bool("file_uploads") ? '<input type="file" name="sql_file[]" multiple> (&lt; ' . ini_get("upload_max_filesize") . 'B)' : lang('File uploads are disabled.');
    echo "\n{$execute}";
    echo "</div></fieldset>\n";
    echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
    echo lang('Webserver file %s', "<code>adminer.sql" . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>");
    echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
    echo "</div></fieldset>\n";
    echo "<p>";
}
echo adminer_checkbox("error_stops", 1, $_POST ? $_POST["error_stops"] : isset($_GET["import"]), lang('Stop on error')) . "\n";
echo adminer_checkbox("only_errors", 1, $_POST ? $_POST["only_errors"] : isset($_GET["import"]), lang('Show only errors')) . "\n";
Пример #11
0
            ?>
</td></tr>
<tr><td>&nbsp;Nr rachunku dewizowego (format IBAN)</td><td><?php 
            print input('c_bank_dew_c', $cID ? $X["c_bank_dew_c"] : "", 'w=250 m=30', '', 'onKeyUp="signs(this, \' \')"');
            ?>
<div id="bank_dew_info" style="display:inline; color: #ff0000;"></div></td></tr>
<tr><td>&nbsp;Kod SWIFT rachunku dewizowego</td><td><?php 
            print input('c_bank_dew_swift_c', $cID ? $X["c_bank_dew_swift_c"] : "", 'w=100 m=15');
            ?>
</td></tr>
<tr><td>&nbsp;Email</td><td><?php 
            print input('c_email_c', $cID ? $X["c_email_c"] : "", 'w=250 m=100');
            ?>
<div id="email_info" style="display:inline; color: #ff0000;"></div></td></tr>
<tr><td>&nbsp;Uwagi</td><td><?php 
            print textarea('c_notes_c', $cID ? $X["c_notes_c"] : "", 'rw=4 wp=90');
            ?>
</td></tr>
<tr><td colspan=2><center><input type="button" style="background: url('./img/button_wstecz.png'); width:119px; height: 30px; border: none; cursor: pointer; vertical-align: middle;" onClick="location.href='_client,<?php 
            print $typ;
            print $offset > 0 ? ",o," . $offset : "";
            ?>
';"> <?php 
            print $cID ? "<input type='image' id='submit' name='submit' src='./img/zmien_" . ($typ == 'd' ? 'dluznika' : 'wierzyciela') . ".gif' border=0 style='vertical-align: middle;'>" : "<input type='image' id='submit' name='submit' src='./img/dodaj_" . ($typ == 'd' ? 'dluznika' : 'wierzyciela') . ".gif' border=0 style='vertical-align: middle;'>";
            ?>
</center></td></tr>
</form>
</table>
<?php 
        }
        if ($list == 1) {
Пример #12
0
    }
    if (empty($file['upload']['posturl'])) {
        html_error('Upload URL not Found.');
    }
    // posturl		puturl
    // Uploading
    echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
    $url = parse_url($file['upload']['posturl']);
    // .'&nounce='.exports_uuid()
    $upfiles = upfile($url['host'], defport($url), $url['path'] . (!empty($url['query']) ? '?' . $url['query'] : ''), $file['getturl'], $cookie, array(), $lfile, $lname, 'blob', '', $_GET['proxy'], $pauth, 0, $url['scheme']);
    //$upfiles = putfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $file['getturl'], $cookie, $lfile, $lname, $_GET['proxy'], $pauth, 0, $url['scheme']);
    // Upload Finished
    echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
    is_page($upfiles);
    if (stripos($upfiles, 'computer says yes') === false) {
        textarea($upfiles);
        html_error('Unknown Upload Error.');
    }
    $download_link = $file['getturl'];
}
function json2array($content, $errorPrefix = 'Error')
{
    if (!function_exists('json_decode')) {
        html_error('Error: Please enable JSON in php.');
    }
    if (empty($content)) {
        return NULL;
    }
    $content = ltrim($content);
    if (($pos = strpos($content, "\r\n\r\n")) > 0) {
        $content = trim(substr($content, $pos + 4));
Пример #13
0
function curl($link, $post = 0, $cookie = 0, $follow = 1, $refer = 0, $header = 1)
{
    global $options, $debug;
    if ($follow && ($follow > 9 || $follow < 1)) {
        $follow = 1;
    }
    if ($post && is_array($post)) {
        $POST = '';
        foreach ($post as $k => $v) {
            $POST .= "{$k}={$v}&";
        }
        $post = substr($POST, 0, -1);
        unset($POST);
    }
    if ($cookie && is_array($cookie)) {
        if (count($cookie) > 0) {
            $cookies = '';
            foreach ($cookie as $k => $v) {
                $cookies .= "{$k}={$v}; ";
            }
            $cookie = substr($cookies, 0, -2);
            unset($cookies);
        } else {
            $cookie = 0;
        }
    }
    if ($options['fgc'] == 1) {
        // Using file_get_contents.
        $opt = array('method' => $post != 0 ? 'POST' : 'GET', 'content' => $post != 0 ? $post : '', 'max_redirects' => !$follow ? 1 : $follow + 1, 'header' => "Accept-language: en-us;q=0.7,en;q=0.3\r\nAccept: text/html, application/xml;q=0.9, application/xhtml+xml, */*;q=0.1\r\n" . ($refer ? "Referer: {$refer}\r\n" : "") . ($cookie ? "Cookie: {$cookie}\r\n" : "") . "User-Agent: Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.10.289 Version/12.02\r\n");
        $context = stream_context_create(array('http' => $opt));
        $page = @file_get_contents($link, false, $context);
        if ($header != 0) {
            $headers = implode("\r\n", $http_response_header);
            $page = $headers . "\r\n\r\n" . $page;
        }
    } else {
        // Using cURL.
        $ch = curl_init($link);
        curl_setopt($ch, CURLOPT_HEADER, $header);
        if ($cookie) {
            curl_setopt($ch, CURLOPT_COOKIE, $cookie);
            curl_setopt($ch, CURLOPT_COOKIEJAR, "1");
            curl_setopt($ch, CURLOPT_COOKIEFILE, "1");
        }
        if ($follow) {
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_MAXREDIRS, $follow + 1);
        }
        curl_setopt($ch, CURLOPT_USERAGENT, 'Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.10.289 Version/12.02');
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: text/html, application/xml;q=0.9, application/xhtml+xml, */*;q=0.1', 'Accept-Language: en-us;q=0.7,en;q=0.3'));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        if (!empty($refer)) {
            $arr = explode("\r\n", $refer);
            $header = array();
            if (count($arr) > 1) {
                $refer = $arr[0];
                unset($arr[0]);
                $header = array_filter(array_map('trim', $arr));
            }
            curl_setopt($ch, CURLOPT_REFERER, $refer);
            if (count($header) > 0) {
                curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
            }
        }
        if ($post != '0') {
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
        }
        $page = curl_exec($ch);
        $errz = curl_errno($ch);
        $errz2 = curl_error($ch);
        $info = curl_getinfo($ch);
        curl_close($ch);
    }
    //if ($debug == 1 && !empty($_POST['debug'])){
    if ($debug == 1) {
        $debugtxt = "Request: {$link}\n";
        if ($refer) {
            $debugtxt .= "Referer: {$refer}\n";
        }
        if ($cookie) {
            $debugtxt .= "Cookie: {$cookie}\n";
        }
        if (isset($errz) && $errz != 0) {
            $debugtxt .= "cURL({$errz}): {$errz2}\n";
        }
        if ($post) {
            $debugtxt .= 'POST: ' . print_r($post, true) . "\n";
        }
        $debugtxt .= "\n" . $page;
        textarea($debugtxt, 170, 15);
    }
    return $page;
}
Пример #14
0
			<div>
				<?php 
echo label('title', 'Title: ');
?>
				<?php 
echo input('title');
?>
			</div>
			
			<div>
				<?php 
echo label('content', 'Content: ');
?>
				<?php 
echo textarea('content');
?>
			</div>
			
			<div>
				<?php 
echo submit_tag();
?>
			</div>
			
		<?php 
echo _form();
?>
	
		<hr/>
		
Пример #15
0
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>";
}
Пример #16
0
 to return to the main page.
  </h3>
  <hr>
  <ul>
  <?php 
require "directions.php";
?>
  </ul>
  <hr>
  <?php 
echo_flags($flags);
?>
  <hr>
  <h3>Embedded Script:</h3>
  <?php 
echo textarea("embedded_script", "", "10", "50");
?>
  <br><br>
  <hr>
  <center><table width="35%"><tr>
  <td align="left"> <?php 
echo $build;
?>
 </td>
  <td align="right"> <?php 
echo $restart;
?>
</td>
  </tr></table></center>
</form>
Пример #17
0
$class = "class='form-control'";
?>
<table class="table table-bordered">
    <tr class="success"><td colspan="2">PROFILE KAMPUS</td></tr>
    <tr>
    <td width="150">Nama Kampus</td><td>
        <?php 
echo inputan('text', 'nama', 'col-sm-4', 'Nama Lengkap ..', 1, $r['nama_kampus'], '');
?>
    </td>
    </tr>
 
            <tr>
    <td width="150">Alamat</td><td>
        <?php 
echo textarea('alamat', '', 'col-sm-5', 2, $r['alamat_kampus']);
?>
    </td>
    </tr>
      <tr>
    <td width="150">No Telpon</td><td>
        <?php 
echo inputan('text', 'telpon', 'col-sm-4', 'No Telpon ..', 1, $r['telpon'], '');
?>
    </td>
    </tr>
           
         <td></td><td colspan="2"> 
            <input type="submit" name="submit" value="simpan" class="btn btn-danger  btn-sm">
            <?php 
echo anchor($this->uri->segment(1), 'kembali', array('class' => 'btn btn-danger btn-sm'));
Пример #18
0
    select("odjel", $razlog, $greska);
    ?>
                <div class="row">
                  <div class="col-md-6">
                    <?php 
    input("ime", $greska);
    ?>
                  </div>
                  <div class="col-md-6">              
                    <?php 
    inputEmail("email", $greska);
    ?>
                  </div>
                </div>
                <?php 
    textarea("poruka", $greska);
    zbroj("zbroj", $greska);
    ?>
              <br />
              <div class="btn-group btn-group-justified" role="group" aria-label="...">
                  <div class="btn-group" role="group">
                    <input type="submit" value="Pošalji" class="btn btn-default" />
                  </div>
              </div>
            </fieldset>
          </form>
          </div>
        <?php 
}
?>
        <?php 
Пример #19
0
function display_all_revisions($order)
{
    $objednavka = sql_query("SELECT id, DATE_FORMAT(datum, '%d. %m. %Y, %H:%i') AS datum, c_obj, id_zakaznik, komplet, vymaz, status, komentar_private \r\n                                 FROM objednavka \r\n                                 WHERE id=\"{$order}\" LIMIT 1");
    $objednavka = $objednavka[0];
    echo "<h1>Objednávka č. {$objednavka['c_obj']} " . (def_value("default_obj_status_spracovana", "hodnota") == $objednavka["status"] ? "<span class=\"red_text paddet\">SPRACOVANÁ</span>" : "") . "</h1>";
    echo "<div class=\"main_box_33\">";
    $access = check_access_true("objednavka_edit");
    if ($access == TRUE) {
        echo "<form method=\"POST\">";
        echo select("zakaznik", "Priradená zákazníkovi", "SELECT id, meno FROM uzivatel WHERE vymaz=0 AND skupina=2 ORDER BY meno", $objednavka[id_zakaznik], "---", "", "");
        echo submit("save_zakaznik", "Priradiť");
        echo "</form>";
    }
    echo "</div>";
    echo "<table id=\"all_revisions\">";
    $revizia = sql_query("\r\n                            SELECT revizia.id, revizia.meno, revizia.adresa, material.meno AS mat_meno,\r\n                                   DATE_FORMAT(revizia.datum, '%d. %m. %Y, %H:%i') AS dat_upr,\r\n                                   vyrobca.meno as vyr_meno, dekor.meno as dek_meno, revizia.dekor_vlastny,\r\n                                   uzivatel.meno as uziv_meno\r\n                            FROM revizia\r\n                            LEFT JOIN material\r\n                            ON revizia.id_material=material.id \r\n                            LEFT JOIN vyrobca\r\n                            ON revizia.id_vyrobca=vyrobca.id\r\n                            LEFT JOIN dekor\r\n                            ON revizia.id_dekor=dekor.id\r\n                            LEFT JOIN uzivatel\r\n                            ON revizia.upravil=uzivatel.id\r\n                            WHERE revizia.id_obj = \"" . $order . "\"\r\n                            ORDER BY revizia.datum DESC\r\n                            ");
    //var_dump($revizia);
    foreach ($revizia as $rev) {
        $is_cp = sql_query("SELECT count(id) as count FROM cp \r\n                            WHERE id_revizia = \"" . $rev[id] . "\"");
        $is_cp = $is_cp[0][count];
        $email_cp = sql_query("SELECT DATE_FORMAT(datum_email, '%d. %m. %Y, %H:%i') AS datum_email_upr FROM cp \r\n                                        WHERE id_revizia = \"" . $rev[id] . "\" AND datum_email <>0 LIMIT 1");
        //$email_cp = count($email_cp);
        //var_dump($email_cp);
        $query_vyroba = "SELECT count(status) status FROM revizia_vyroba WHERE id_obj=" . $order . " AND id_revizia=\"" . $rev[id] . "\" AND status>0";
        $query_vyroba = sql_query($query_vyroba);
        $display_rev = 1;
        if ($access == TRUE) {
            $adressto = "objednavky";
        } else {
            $adressto = "vyroba";
            $filename = "files/csv_new/obj-{$order}/rev-{$rev[id]}/*.csv";
            //var_dump(glob($filename));
            if (glob($filename) != false) {
                $display_rev = 1;
            } else {
                $display_rev = 0;
            }
        }
        //echo $display_rev;
        if ($display_rev > 0) {
            echo "\r\n        <tr>\r\n            <td class=\"obj_cislo\">" . $rev[id] . "</td>\r\n            <td class=\"obj_datum\">\r\n                " . $rev["dat_upr"] . "</td>\r\n            <td class=\"obj_meno\">\r\n                <a href=\"?vyber={$adressto}&order=" . $order . "&revision=" . $rev[id] . "\">\r\n                " . $rev[meno] . "" . (!empty($rev[adresa]) ? ", " . $rev[adresa] : "") . "</a>\r\n            </td>\r\n            <td class=\"obj_material\">\r\n                " . $rev[mat_meno] . "" . (!empty($rev[vyr_meno]) ? ", " . $rev[vyr_meno] : "") . "" . (!empty($rev[dek_meno]) ? ", " . $rev[dek_meno] : "") . "" . (!empty($rev[dekor_vlastny]) ? ", " . $rev[dekor_vlastny] : "") . "</td>\r\n            <td class=\"obj_icons\">" . ($is_cp > 0 ? "<a href=\"?vyber=cp&order={$order}&revision=" . $rev[id] . "&action=display_all\"><img src=\"assets/images/euro.png\" title=\"Objednávka má vypracované Cenové Ponuky: {$is_cp}\"></a>" : "<img src=\"assets/images/euro_no.png\" title=\"Objednávka bez Cenových ponúk\">") . "\r\n             " . (count($email_cp) > 0 ? "<img src=\"assets/images/checked.png\" title=\"CP odoslaná: " . $email_cp[0]["datum_email_upr"] . "\">" : "") . "  \r\n                 <a href=\"?vyber=vyroba&order={$order}&revision=" . $rev[id] . "\">" . ($query_vyroba[0]["status"] > 0 ? "<img src=\"assets/images/vyroba.png\" title=\"Objednávka vo výrobe\">" : "<img src=\"assets/images/vyroba_no.png\" title=\"Bez výroby\">") . "</a>\r\n             " . (!empty($rev["uziv_meno"]) ? "<span class=\"upravil\">" . $rev["uziv_meno"] . "</span>" : "") . "     \r\n            </td>  \r\n                 \r\n        </tr>\r\n        ";
        }
    }
    echo "</table>";
    // zobrazenie detailov objednávky
    echo "<div class=\"new_task_form_poznamka\">";
    echo "<form method=\"POST\" id=\"do_objednavka_poznamka\" action=\"?vyber=objednavky&order={$order}&action=komentar_private\">";
    echo textarea("komentar_private", $objednavka["komentar_private"], "Súkromný komentár k objednávke (nezveréjnene zákazníkom)", 50, 3, "komentar_private");
    echo submit("submit_poznamka", "Odoslať");
    echo "</form>";
    echo "</div>";
    echo "<div class=\"order_details\">\r\n        <div>Objednávka prijatá: {$objednavka['datum']}</div>";
    if ($access == TRUE) {
        echo "<div>" . ($objednavka[komplet] == 0 ? "Objednávka neuzavretá - <a href=\"?vyber=objednavky&order={$order}&action=close\">Uzavrieť</a>" : "Objednávka je kompletná - <a href=\"?vyber=objednavky&order={$order}&action=open\">Otvoriť</a>") . " </div>";
        echo "<div class=\"main_box_33\">";
        echo "<form method=\"POST\">";
        echo select("status", "Stav objednávky:", "SELECT id, meno FROM objednavka_status ORDER BY id", $objednavka[status], "", "", "", "NO");
        echo submit("save_status", "Uložiť stav objednávky");
        echo "</form>";
        echo "</div>";
        echo "<div>" . ($objednavka[vymaz] == 0 ? "<a href=\"?vyber=objednavky&order={$order}&action=delete\">Úplne vymazať objednávku</a>" : "<a href=\"?vyber=objednavky&order={$order}&action=delete\">Zrušiť vymazanie objednávky</a>") . "</div>       \r\n";
    }
    // zobrazenie pridaných súborov
    $files = sql_query("SELECT id_revizia, meno, meno_old, pripona, DATE_FORMAT(datum, '%d. %m. %Y, %H:%i') AS datum \r\n                                FROM subor\r\n                                WHERE id_obj=\"{$order}\"");
    echo "<div id=\"added_files\"" . (count($files) > 0 ? " class=\"attatch_exists\"" : "") . ">\r\n                <h2>Všetky nahraté súbory</h2>";
    //var_dump($files);
    for ($i = 0; $i < count($files); $i++) {
        $directory = "files/obj-{$order}/rev-{$files[$i][id_revizia]}";
        echo "revízia č. {$files[$i][id_revizia]} <a href=\"{$directory}/" . $files[$i]["meno"] . "." . $files[$i]["pripona"] . "\" target=\"_blank\">" . $files[$i]["meno_old"] . "</a><br>";
    }
    echo "</div>\r\n                \r\n            ";
    echo "</div>";
}
Пример #20
0
function formular($fieldsets_c, $form_data, $secure_key = "")
{
    //print_r("==============================");
    //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($vyrobca);
    //var_dump($form_data);
    //var_dump($dekor);
    echo "<div id=\"content\">";
    echo "<div id=\"nahlad\">\r\n        \r\n        <div class=\"boxer\">\r\n        <div class=\"nahlad_popis_sirka\"></div>\r\n        <div class=\"nahlad_popis_dlzka\"></div>    \r\n        </div>\r\n        </div>";
    echo "<form method=\"POST\" id=\"formular\" enctype=\"multipart/form-data\">";
    echo "<fieldset id=\"udaje\"><legend>Vaše údaje</legend>";
    if ($_SESSION["logged"] == 1) {
        echo "<div class=\"form_zakaznik_text\">";
        echo textfield("zakaznik", "", "Zákazník", 50, 20);
        echo "</div>";
    }
    echo textfield("meno", $meno, "Meno / Firma *", 40, 20, "", "Povinný údaj:<br> vpíšte Vaše meno alebo názov firmy");
    echo textfield("adresa", $adresa, "Adresa *", 50, 20);
    echo textfield("ico_icdph", $ico_icdph, "IČO / IČ DPH", 18, 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");
    $material = empty($material) ? def_value("default_material", "hodnota") : $material;
    echo select("material", "Materiál *", "SELECT id, hodnota, meno FROM material WHERE vymaz=0", $material, "-vyberte si-", "", "Povinný údaj:<br> prosím zvoľte si jeden z materiálov", "NO");
    $hrubka_rev = empty($hrubka_rev) ? def_value("default_hrubka", "hodnota") : $hrubka_rev;
    $query = "SELECT count(id) as counter from hrubka WHERE id_material={$material}";
    $has_hrubka = sql_query($query);
    if ($has_hrubka[0]["counter"] > 0) {
        $where = "AND id_material={$material}";
    } else {
        $where = "AND id_material=0";
    }
    echo select("hrubka_rev", "Hrúbka", "SELECT id, hodnota, meno FROM hrubka WHERE vymaz=0 {$where} ORDER BY hodnota", $hrubka_rev, "", "hrubka_rev", "", "NO");
    $skryt_zakaznikom = "AND skryt_zakaznikom=0";
    if ($_SESSION["logged"] == 1) {
        $skryt_zakaznikom = "";
    }
    //echo $skryt_zakaznikom;
    echo select("vyrobca", "Výrobca", "SELECT id, hodnota, meno FROM vyrobca WHERE vymaz=0 AND id_material=\"" . $material . "\" {$skryt_zakaznikom}", $vyrobca);
    if (empty($vyrobca)) {
        $vyrobca = 0;
    }
    if (empty($dekor)) {
        $dekor = 0;
    }
    echo select("dekor", "Dekor", "SELECT id, hodnota, meno FROM dekor WHERE vymaz=0 AND id_vyrobca=\"{$vyrobca}\" {$skryt_zakaznikom}", $dekor);
    echo textfield("dekor_vlastny", $dekor_vlastny, "Iný dekor", 25, 20, "", "Ak sa dekor o ktorý máte záujem nenachádza v zozname dekorov, vpíšte ho do tohto poľa");
    $options = ["porez" => "porez", "cp" => "cenová ponuka"];
    echo select("objednavka_typ", "Typ objednávky", "", $objednavka_typ, "", "", "", "NO", $options);
    $options = ["0" => "bez dopravy", "1" => "s dopravou"];
    echo select("objednavka_doprava", "Doprava", "", $objednavka_doprava, "", "", "", "NO", $options);
    $csrf_key = md5(uniqid(rand(), TRUE));
    $_SESSION["csrf_key"] = $csrf_key;
    //$_SESSION["janko"] = microtime();
    //var_dump($_SESSION["csrf_key"]);
    hidden("secure_csrf", $_SESSION["csrf_key"]);
    if (!empty($secure_key)) {
        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>";
        echo textfield("ks[]", $ks_all[$i], "ks *", 4, 3, "ks", "Povinný údaj: <br> počet kusov");
        echo textfield("dlzka[]", $dlzka_all[$i], "dĺžka *", 5, 3, "dlzka", "Povinný údaj: <br> maximálna povolená dĺžka je 2800mm, pre pracovné dosky 4100mm");
        echo textfield("sirka[]", $sirka_all[$i], "šírka *", 5, 3, "sirka", "Povinný údaj: <br> maximálna povolená šírka je 2070mm");
        echo textfield("nazov[]", $nazov_all[$i], "Názov", 50, 18, "nazov");
        echo textfield("poznamka[]", $poznamka_all[$i], "Poznámka", 50, 18, "poznamka");
        $hrubka_all[$i] = empty($hrubka_all[$i]) ? def_value("default_hrubka", "hodnota") : $hrubka_all[$i];
        $query = "SELECT count(id) as counter from hrubka WHERE id_material={$material}";
        $has_hrubka = sql_query($query);
        if ($has_hrubka[0]["counter"] > 0) {
            $where = "AND id_material={$material}";
        } else {
            $where = "AND id_material=0";
        }
        echo select("hrubka[]", "Hrúbka", "SELECT id, hodnota, meno FROM hrubka WHERE vymaz=0 {$where} ORDER BY hodnota", $hrubka_all[$i], "", "hrubka", "", "NO");
        $orientacia_all[$i] = empty($orientacia_all[$i]) ? def_value("default_orientacia", "hodnota") : $orientacia_all[$i];
        echo select("orientacia[]", "Orientácia", "SELECT id, hodnota, meno FROM orientacia WHERE vymaz=0", $orientacia_all[$i], "", "orientacia", "", "NO");
        echo select("hrana1[]", "dolná", "SELECT id, hodnota, meno FROM hrana WHERE vymaz=0 AND zobraz_vo_formulari=1", $hrana1_all[$i], "", "hrana1", "Dolná hrana", "");
        echo select("hrana2[]", "pravá", "SELECT id, hodnota, meno FROM hrana WHERE vymaz=0 AND zobraz_vo_formulari=1", $hrana2_all[$i], "", "hrana2", "Pravá hrana", "");
        echo select("hrana3[]", "horná", "SELECT id, hodnota, meno FROM hrana WHERE vymaz=0 AND zobraz_vo_formulari=1", $hrana3_all[$i], "", "hrana3", "Horná hrana", "");
        echo select("hrana4[]", "ľavá", "SELECT id, hodnota, meno FROM hrana WHERE vymaz=0 AND zobraz_vo_formulari=1", $hrana4_all[$i], "", "hrana4", "Ľavá hrana", "");
        $skosenie_exists = $roh1x_all[$i] + $roh1y_all[$i] + $roh2x_all[$i] + $roh2y_all[$i] + $roh3x_all[$i] + $roh3y_all[$i] + $roh4x_all[$i] + $roh4y_all[$i];
        echo "<div class=\"skosenie_riadok" . ($skosenie_exists > 0 ? " skosenie_exists" : "") . "\"><input type=\"button\" value=\"\"></div>\r\n            \r\n            <div class=\"odstran_riadok\"><input type=\"button\" value=\"\"></div>\r\n            <div class=\"skosenie_tab\">\r\n            <div class=\"zrezanie_parent\">";
        echo textfield("roh1x[]", $roh1x_all[$i], "x", 4, 3, "roh1x");
        echo textfield("roh1y[]", $roh1y_all[$i], "y", 4, 3, "roh1y");
        echo textfield("roh2x[]", $roh2x_all[$i], "x", 4, 3, "roh2x");
        echo textfield("roh2y[]", $roh2y_all[$i], "y", 4, 3, "roh2y");
        echo textfield("roh3x[]", $roh3x_all[$i], "x", 4, 3, "roh3x");
        echo textfield("roh3y[]", $roh3y_all[$i], "y", 4, 3, "roh3y");
        echo textfield("roh4x[]", $roh4x_all[$i], "x", 4, 3, "roh4x");
        echo textfield("roh4y[]", $roh4y_all[$i], "y", 4, 3, "roh4y");
        echo "</div>";
        echo "<div class=\"help_text\">";
        echo "<ul>";
        echo "<li>Pole slúži pre definovanie zrezania či zaoblenia rohov dielca.</li>";
        echo "<li>Pre zrezanie rohu \"po priamke\" je nutnú pri každom rohu zadať dve hodnoty skosenia: <strong>v horizontálnom (x) a vo vertikálnom (y) smere</strong></li>";
        echo "<li>Pre zaoblenie rohu zadajte hodnotu polomeru zaoblenia iba do políčka\r\n                          pre horizontálnu hodnotu (x) daného rohu.</li>";
        echo "</ul>";
        echo "</div>";
        echo "</div>\r\n        ";
        $vypocet = $dlzka_all[$i] * $sirka_all[$i] / 1000000;
        $vypocet = $vypocet * $ks_all[$i];
        if ($hrubka_all[$i] == def_value("default_duplak", "hodnota")) {
            $vypocet_duplak = $dlzka_all[$i] * $sirka_all[$i] / 1000000;
            $vypocet_duplak = $vypocet_duplak * $ks_all[$i];
            $vypocet = ($dlzka_all[$i] + 20) * ($sirka_all[$i] + 20) / 1000000;
            $vypocet = $vypocet * ($ks_all[$i] * 2);
            $vypocet_duplak_sum = $vypocet_duplak_sum + $vypocet_duplak;
        }
        $vypocet_sum = $vypocet_sum + $vypocet;
        $vypocet_final = round($vypocet, 2) . "";
        echo "<div class=\"vypocet\">" . ($vypocet > 0 ? $vypocet_final : "") . "</div>";
        echo "</fieldset>";
    }
    echo "<div id=\"add_more_buttons\"><div id=\"vloz_riadok\"><input type=\"button\" value=\"Vlož ďalší riadok\"></div></div>";
    echo "<div class=\"form_vypocet_sum\">" . ($vypocet_sum > 0 ? "" . round($vypocet_sum, 2) . " m2" : "") . "</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);
    textarea("komentar", $komentar, "Váš komentár", 50, 4, "komentar");
    if (!empty($form_data) and $form_data[num_files] >= 0 and !$secure_key) {
        for ($i = 1; $i <= 5 - $form_data[num_files]; $i++) {
            file_upload("subor[]", "subor", "Príloha");
        }
    } else {
        echo "<div class=\"form_vypocet_sum_duplak\">\r\n            <strong>Prílohy k objednávke môžete nahrávať v ďalšom kroku po odoslaní nárezových dielcov.</strong></div>";
    }
    echo submit("submit", "Pokračuj >>");
    echo "</form>\r\n        </div>";
}
Пример #21
0
 public function CheckBack($header)
 {
     $statuscode = (int) substr($header, 9, 3);
     if ($statuscode == 400) {
         if (stripos($header, "\nGuest-Limit: Wait") !== false) {
             html_error('[DepositFiles] FreeDL Limit Reached, try downloading again for countdown.');
         } elseif (stripos($header, "\nDownload-Error: No such voucher") !== false) {
             html_error('[DepositFiles] Expired download link.');
         } else {
             html_error('Error: 400 Bad Request');
         }
     } elseif ($statuscode == 404) {
         textarea($header);
         html_error('[DepositFiles] Your IP was banned?.');
     }
 }
Пример #22
0
         <form method=post action="web.php?code=' . $page . '&page=' . $subpage . '">
            <fieldset>
                 <label>Nouveau thème : </label>
                <input name="themes" type=text placeholder="Nom du thème" />
                <input name="newtheme" type=submit value="Créer" />
     ';
 if (isset($_GET['error']) and $_GET['error'] == 'name') {
     $web['cssEditForm'] = $web['cssEditForm'] . '
             </br><p>Ce nom de thème existe déjà.</p>
         ';
 }
 $web['cssEditForm'] = $web['cssEditForm'] . '</fieldset>
         </form></br></br>
     ' . separator() . '<form method=post action="web.php?code=' . $page . '&page=' . $subpage . '">
             <input name="newname" type=text value="' . $css_name . '" />
             </br>' . textarea($css_content, "content", 20, 100);
 if ($css_owner == $_SESSION['masterkey']) {
     $web['cssEditForm'] = $web['cssEditForm'] . '
                 <input name="name" type="hidden" value="' . $css_name . '" />
                 <input name="save_css" type=submit value="Sauvegarder" />
         ';
     if ($css_name != 'standard') {
         $web['cssEditForm'] = $web['cssEditForm'] . '
             <input name="delete" type=submit value="Supprimer"/>
          ';
     }
 }
 $web['cssEditForm'] = $web['cssEditForm'] . '
             <input name="copy" type=submit value="Copier ce thème"/>
         </form>
     ';
Пример #23
0
<tr><th><?php 
echo lang('Type');
?>
<td><?php 
echo html_select("Type", $trigger_options["Type"], $row["Type"]);
?>
</table>
<p><?php 
echo lang('Name');
?>
: <input name="Trigger" value="<?php 
echo h($row["Trigger"]);
?>
" maxlength="64">
<p><?php 
textarea("Statement", $row["Statement"]);
?>
<p>
<input type="submit" value="<?php 
echo lang('Save');
?>
">
<?php 
if ($_GET["name"] != "") {
    ?>
<input type="submit" name="drop" value="<?php 
    echo lang('Drop');
    ?>
"<?php 
    echo confirm();
    ?>
Пример #24
0
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");
    echo textfield("doruc_adresa", $doruc_adresa, "Ulica", 50, 20);
    echo textfield("doruc_mesto", $doruc_mesto, "Mesto", 50, 20);
    echo textfield("doruc_psc", $doruc_psc, "PSČ", 40, 20);
    echo textfield("doruc_telefon", $doruc_telefon, "Telefón", 40, 20);
    echo "</fieldset>";
    //var_dump($_SESSION);
    for ($i = 0; $i < $fieldsets_c; $i++) {
        $poradie = $i + 1;
        $checked = "";
        echo "<fieldset class=\"order-row\">";
        echo "<div class=\"count\">{$poradie}. </div>";
        echo hidden("vyrobny_plan[{$i}]", empty($vyrobny_plan_all[$i]) ? "0" : $vyrobny_plan_all[$i]);
        echo textfield("ks[{$i}]", $ks_all[$i], "ks *", 3, 2, "ks", "Povinný údaj: <br> počet kusov");
        $product_type = empty($material) ? def_value("default_product_type", "hodnota") : $product_type;
        echo select("product_type[{$i}]", "typ produktu *", "SELECT id, meno FROM product_type WHERE vymaz=0 {$skryt_zakaznikom} ORDER BY def DESC, meno", $product_type_all[$i], "-vyberte si-", "product_type_v", "Povinný údaj:<br> prosím zvoľte si Typ produktu", "NO");
        $skryt = "";
        if ($_SESSION["perm_uroven"] > 3) {
            $skryt = "AND skryt_prihlasenym=0";
        }
        echo select("product[{$i}]", "produkt", "SELECT id, meno FROM product WHERE vymaz=0 AND id_product_type=\"" . (empty($product_type_all[$i]) ? def_value("default_product_type", "hodnota") : $product_type_all[$i]) . "\" {$skryt_zakaznikom}{$skryt} ORDER BY def DESC, meno", $product_all[$i], "", "product_v", "", "NO");
        $query = "SELECT pa.id, pa.meno FROM `product_atribute` pa INNER JOIN product_atribute_product_types pt ON pt.id_product_atribute = pa.id\r\n                   WHERE pa.vymaz=0 AND id_product_type=" . (empty($product_type_all[$i]) ? def_value("default_product_type", "hodnota") : $product_type_all[$i]) . "\r\n                       ORDER BY pa.meno";
        $atributes = sql_query($query);
        if (empty($product_all[$i])) {
            $query = "SELECT id, meno FROM product WHERE vymaz=0 AND id_product_type=\"" . (empty($product_type_all[$i]) ? def_value("default_product_type", "hodnota") : $product_type_all[$i]) . "\" {$skryt_zakaznikom} ORDER BY def DESC, meno LIMIT 1";
            $first_product = sql_query($query)[0];
        } else {
            $first_product[id] = $product_all[$i];
        }
        $query = "SELECT id FROM product \r\n                       WHERE id = {$first_product[id]} AND skryt_atributy = \"1\" \r\n                        ";
        $producter = sql_query($query);
        echo "<div class=\"atributes\" data-key=\"{$i}\">";
        if (empty($producter)) {
            foreach ($atributes as $atribute) {
                echo "<div class=\"atribute-row\">";
                echo hidden("product_atribute[{$i}]", $atribute[id]);
                echo select("product_atribute_option[{$i}][{$atribute['id']}]", $atribute[meno], "SELECT id, meno FROM product_atribute_option WHERE id_product_atribute=" . $atribute[id] . " AND vymaz=0 ORDER BY def DESC, meno ASC", $product_atribute_options_all[$i][$atribute[id]], "-vyberte si-", "product_atribute_option_v", "", "NO");
                echo "</div>";
            }
        }
        echo "</div>";
        //dd($atributes);
        $skryt_zakaznik = "AND pd.skryt_zakaznikom=0";
        if ($_SESSION["logged"] == 1) {
            $skryt_zakaznik = "";
        }
        $cls = "";
        $checked = "checked";
        /*
        if(empty($atyp_text_all[$i])) {
            $cls = "hide";
            $checked = "";
        }
        */
        echo select("product_delivery[{$i}]", "Doprava", "SELECT pd.id, pd.meno FROM product_delivery pd \r\n                        INNER JOIN product_delivery_product_types pt ON pt.id_product_delivery = pd.id \r\n                        WHERE pd.vymaz=0 AND id_product_type=\"" . (empty($product_type_all[$i]) ? def_value("default_product_type", "hodnota") : $product_type_all[$i]) . "\" {$skryt_zakaznik} \r\n                            ORDER BY def DESC, meno", $product_delivery_all[$i], "", "product_delivery_v", "", "NO");
        if ($_SESSION["logged"] == 1) {
            echo textfield("vlastna_cena[{$i}]", $vlastna_cena_all[$i], "j. cena", 6, 5, "vlastna_cena");
        }
        //echo checker("atyp[$i]", "1", "Atyp", $checked, "atyp");
        echo textarea("atyp_text[{$i}]", $atyp_text_all[$i], "Atyp text", 18, 1, "atyp_text {$cls}", "");
        echo "<div class=\"odstran_riadok\"><input type=\"button\" value=\"\"></div>";
        echo "</fieldset>";
    }
    echo "<div id=\"add_more_buttons\"><div id=\"vloz_riadok\"><input type=\"button\" value=\"Vlož ďalší riadok\"></div></div>";
    //echo "<div class=\"form_vypocet_sum\">".( $vypocet_sum>0 ? "".round($vypocet_sum, 2)." m2" : "" )."</div>";
    echo "</div>";
    //var_dump($form_data);
    //var_dump($_POST);
    echo textarea("komentar", $komentar, "Váš komentár", 50, 4, "komentar");
    if ($_SESSION["logged"] == 1) {
        echo textarea("komentar_private", $komentar_private, "Súkromný komentár (nezveréjnene zákazníkom)", 50, 4, "komentar_private");
    }
    echo submit("submit", "Pokračuj >>");
    echo "</form>\r\n        </div>";
}
Пример #25
0
if ($_POST && !$error) {
    $link = substr(ME, 0, -1);
    if ($_POST["drop"]) {
        query_adminer_redirect("DROP TYPE " . idf_escape($TYPE), $link, lang('Type has been dropped.'));
    } else {
        query_adminer_redirect("CREATE TYPE " . idf_escape(trim($row["name"])) . " {$row['as']}", $link, lang('Type has been created.'));
    }
}
page_header($TYPE != "" ? lang('Alter type') . ": " . h($TYPE) : lang('Create type'), $error);
if (!$row) {
    $row["as"] = "AS ";
}
?>

<form action="" method="post">
<p>
<?php 
if ($TYPE != "") {
    echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
} else {
    echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
    textarea("as", $row["as"]);
    echo "<p><input type='submit' value='" . lang('Save') . "'>\n";
}
?>
<input type="hidden" name="token" value="<?php 
echo $token;
?>
">
</form>
Пример #26
0
        $postEntry['tags'] = $addedTags;
        saveEntry('posts', $post, $postEntry);
        foreach ($addedTags as $tag) {
            $tagEntry = readEntry('tags', $tag);
            $tagEntry['posts'][$post] = $post;
            saveEntry('tags', $tag, $tagEntry);
        }
        deleteEntry('drafts', $draft);
        redirect('view.php?post=' . $post);
    } else {
        $draftEntry = readEntry('drafts', $draft);
        $tagOptions = array();
        foreach (listEntry('tags') as $tag) {
            $tagEntry = readEntry('tags', $tag);
            $tagOptions[$tag] = $tagEntry['name'];
        }
        $out['title'] = $lang['publishPost'] . ': ' . $draftEntry['title'];
        $out['content'] .= '<form action="./publish.php?draft=' . $draft . '" method="post">
    <p>' . text('title', $draftEntry['title']) . '</p>
    <p>' . text('id', substr($draft, 20)) . '</p>
    <p>' . textarea('content', clean($draftEntry['content'])) . '</p>
    <p>' . select('locked', array('yes' => $lang['yes'], 'no' => $lang['no']), $postEntry['locked'] ? 'yes' : 'no') . '</p>
    <p>' . multiselect('tags', $tagOptions, $postEntry['tags']) . '</p>
    <p>' . submitAdmin($lang['confirm']) . '</p>
    </form>';
        $out['content'] .= isPOST('content') ? box(cleanMagic($_POST['content'])) : '';
    }
} else {
    home();
}
require 'templates/page.php';
Пример #27
0
        $str = str_split($str);
        $ret = '';
        for ($i = 1; $i <= $lg; $i++) {
            $ret .= $str[array_rand($str)];
        }
        return $ret;
    }
    $UID = strtoupper(base_convert(time() . rndStr(3, true), 10, 16)) . '_' . rndStr(40);
    $post = array();
    $post['MAX_FILE_SIZE'] = cut_str($page, 'name="MAX_FILE_SIZE" value="', '"');
    $post['owner'] = cut_str($page, 'name="owner" type="hidden" value="', '"');
    $post['pin'] = cut_str($page, 'name="pin" type="hidden" value="', '"');
    $post['base'] = cut_str($page, 'name="base" type="hidden" value="', '"');
    $post['host'] = cut_str($page, 'name="host" type="hidden" value="', '"');
    $up_url = "http://{$up[1]}/marker={$UID}";
    textarea($up_url, 0, 0, 1);
    ?>
<script type="text/javascript">document.getElementById('info').style.display='none';</script>
<?php 
    $url = parse_url($up_url);
    $upfiles = upfile($url["host"], $url["port"] ? $url["port"] : 80, $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), 'http://letitbit.net/', $cookie, $post, $lfile, $lname, "file0");
    ?>
<script type="text/javascript">document.getElementById('progressblock').style.display='none';</script>
<?php 
    is_page($upfiles);
    $page = geturl("letitbit.net", 80, "/acupl_proxy.php?srv={$up[1]}&uid={$UID}", 'http://letitbit.net/', $cookie, 0, 0, $_GET["proxy"], $pauth);
    is_page($page);
    if (!preg_match('@"post_result":\\s*"(http://[^\\"]+)"@i', $page, $rd)) {
        html_error("Error: Redirect not found.", 0);
    }
    $url = parse_url($rd[1]);
Пример #28
0
        $error = error();
    }
}
page_header($TABLE != "" ? lang('Alter view') : lang('Create view'), $error, array("table" => $TABLE), h($TABLE));
?>

<form action="" method="post">
<p><?php 
echo lang('Name');
?>
: <input name="name" class="form-control" value="<?php 
echo h($row["name"]);
?>
" maxlength="64" autocapitalize="off">
<p><?php 
textarea("select", $row["select"]);
?>
<p>
<input type="submit" class="btn btn-xs btn-success" value="<?php 
echo lang('Save');
?>
">
<?php 
if ($_GET["view"] != "") {
    ?>
<input type="submit" name="drop" class="btn btn-xs btn-danger" value="<?php 
    echo lang('Drop');
    ?>
"<?php 
    echo confirm();
    ?>
Пример #29
0
?>
            <?php 
echo inputan('text', 'instansi_telpon', 'col-sm-4', 'Telpon ..', 0, $r['instansi_telpon'], '');
?>
 
        </td>
    </tr>
    <tr><td>Alamat</td>
        <td><?php 
echo textarea('institusi_alamat', '', 'col-sm-02', 0, $r['institusi_alamat']);
?>
</td>
        <td>Alamat/ Mulai Bekerja</td>
        <td>
            <?php 
echo textarea('instansi_alamat', '', 'col-sm-6', 2, $r['instansi_alamat']);
?>
            <?php 
echo inputan('text', 'instansi_mulai', 'col-sm-3', 'Mulai ..', 0, $r['instansi_mulai'], '');
?>
            <?php 
echo inputan('text', 'instansi_sampai', 'col-sm-3', 'Sampai ..', 0, $r['instansi_sampai'], '');
?>
        </td>
    </tr>
         <td></td><td colspan="4"> 
            <input type="submit" name="submit" value="simpan" class="btn btn-danger  btn-sm">
            <?php 
echo anchor($this->uri->segment(1), 'kembali', array('class' => 'btn btn-danger btn-sm'));
?>
        </td></tr>
Пример #30
0
 function DisplayTemplate(&$layout)
 {
     //echo "<pre>";var_dump($this->userfld);echo "</pre>";
     foreach ($this->userfld as $field => $val) {
         insert($layout, textbr());
         insert($layout, text($this->userfld["{$field}"]["descrip"]));
         insert($layout, textbr());
         // "name" definition looks strange, but associative arrays
         // in html must not have quotes, something like
         // userfld[fieldname] which will be correctly converted by php
         if ($this->userfld["{$field}"]["type"] == "C") {
             insert($layout, input_text(array("name" => "userfld[{$field}]", "value" => isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"], "size" => $this->userfld["{$field}"]["size"], "maxlength" => $this->userfld["{$field}"]["maxlength"])));
         } elseif ($this->userfld["{$field}"]["type"] == "T") {
             insert($layout, textarea(array("name" => "userfld[{$field}]", "cols" => $this->userfld["{$field}"]["size"], "rows" => $this->userfld["{$field}"]["rows"], "maxlength" => $this->userfld["{$field}"]["maxlength"]), isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"]));
         } elseif ($this->userfld["{$field}"]["type"] == "S") {
             insert($layout, selectbox($this->userfld["{$field}"]["select"], array("name" => "userfld[{$field}]"), isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"]));
         }
         /*
         elseif ($this->userfld["$field"]["type"] == "B") {
             insert($layout,checkbox(array("name"=>"userfld[$field]",
                             "value"=>isset($this->userfld["$field"]["value"]) ? $this->userfld["$field"]["value"] : $this->userfld["$field"]["default"]), "Text"));
         
         }
         */
     }
 }