本文整理汇总了PHP中textarea函数的典型用法代码示例。如果您正苦于以下问题:PHP textarea函数的具体用法?PHP textarea怎么用?PHP textarea使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了textarea函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afficherFormulaire
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: email_contact
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: edit_form
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: AnonDL
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: options
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: page_edit_form
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: print_form
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();
}
示例8: afficherFormulaire
/**
* 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: buatcombo
<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: lang
<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> (< ' . 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: dewizowego
?>
</td></tr>
<tr><td> 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> 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> 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> 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: html_error
}
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: curl
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: label
<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: 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>";
}