function print_mailer() { global $form_name, $form_header, $form_rcpt, $form_thankyou, $form_error, $form_invalid; if (form_is_posted() && form_is_valid()) { $name = $_POST['name']; $mail = $_POST['mail']; $subj = "=?UTF-8?B?" . base64_encode($form_name) . "?=\n"; $body = make_body(); $head = "From: {$name} ({$_SERVER['REMOTE_ADDR']}) <{$mail}>\n"; $head .= "Reply-To: {$name} <{$mail}>\n"; $head .= "MIME-Version: 1.0\n"; $head .= "Content-Type: text/plain; charset=UTF-8"; if (mail($form_rcpt, $subj, $body, $head)) { echo $form_thankyou; } else { echo $form_error; print_form(); } } else { if (form_is_posted()) { print_form($form_invalid); } else { print_form($form_header); } } }
function category($name, $options, $row) { global $var; $i = 0; //table name thing goes here print "<tr>"; print "<td align=center>{$name}</td>"; $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "hall_of_fame_new_detail.php"; $container["category"] = $name; $container["row"] = $row; if (isset($var["game_id"])) { $container["game_id"] = $var["game_id"]; } print_form($container); print "<td align=center valign=middle>"; foreach ($options as $print) { $i++; list($one, $two) = explode(",", $print); if (isset($two)) { print "<input type=hidden name=mod[] value=\"{$print}\">"; } print_submit($one); print " "; if ($i % 3 == 0) { print "<br>"; } //unset vars for next sub cat unset($one, $two); } print "</td></form></tr>"; }
function process_form() { //Create variables to store the input $Name = $_POST['name']; $Name = htmlspecialchars($Name); $Email = $_POST['email']; $Email = htmlspecialchars($Email); $Comments = $_POST['comments']; $Comments = htmlspecialchars($Comments); //If the user did not enter any comments, tell them that they must submit comments and reprint the form if ($Comments == NULL) { print_form(); echo "<script> contact_us_fill_fields('{$Name}', '{$Email}');</script>"; echo "<script> contact_us_applyError('textComments'); </script>"; exit; } //Email the message to aah1754@truman.edu $subject = "Arete Message"; if (!$Name == NULL) { $subject = "Arete Message from {$Name}"; } if (Email == NULL) { $message = $Comments; } else { $message = "Email: {$Email}\r\n\r\n{$Comments}"; } mail("*****@*****.**", $subject, $message); echo "\n <header>\n <nav id='navbar'>\n <div class='container'>\n <div id='navLogo' class='nav'>\n <a href='../index.html'><img id='logo' src='../images/logo.png' alt='logo'></a>\n </div>\n <div id='navLinks' class='nav'>\n <ul id='menu'>\n <li><a href='../index.html#aboutUsAnchor'>About Us</a></li>\n <li><a href='../index.html#whatWeDoAnchor'>What We Do</a></li>\n <li><a href='../index.html#resourcesAnchor'>Resources</a></li>\n <li><a href='../index.html#newsAnchor'>News</a></li>\n <li><a href='../index.html#howToHelpAnchor'>How To Help</a></li>\n <li><a href='../index.html#eventsAnchor'>Events</a></li>\n </ul>\n </div>\n <div id='navDonate' class='nav'>\n <a href='#' class='navLink'>Contact Us</a>\n <a href='../Donate/index.php' class='navLink'>Donate</a> \n </div>\n </div>\n </nav>\n </header>\n <section id='contactUsSection' class='row'>\n <h2>Contact Us</h2>\n <h3>Arete EdTech</h3>\n <p><span class='bold'>Phone</span> (314) 603-3555</p>"; if ($Name != NULL) { echo "<p>Thank you, {$Name}, for your comments! You wrote:</p>"; } else { echo "<p>Thank you for your comments! You wrote:</p>"; } echo " <p id='contactUsComments'>{$Comments}</p>\n </section>\n <footer class='gray'>\n <p id='right'>501 c3</p>\n <p>'Let's make a difference and teach children how to code!'</p>\n </footer> "; END; }
$error = true; $msg_errors[] = _("File type \"" . $_FILES['file_csv']['type'] . "\" not allowed"); } if (@move_uploaded_file($_FILES["file_csv"]["tmp_name"], $file_csv) == false && !$error) { $error = true; $msg_errors[] = empty($msg_errors) ? _("Unable to upload file") : $msg_errors; } } if ($error == false) { $res = import_assets_csv($file_csv); } @unlink($file_csv); } else { $msg_errors[] = _("Filename is empty"); } } if (isset($res['status']) && !empty($res['file_errors'])) { $msg_errors[] = $res['file_errors']; } print_form($msg_errors); if (isset($res['status']) && empty($res['file_errors'])) { print_results($res); } ?> </div> </body> </html>
<?php print_topic("Report a Bug"); print "<span style=\"font-size:75%;\">All information you can see on this page will be sent via email to the developer team!<br>"; print "Be as accurate as possible with your bug description.</span>"; print_form(create_container("bug_report_processing.php", "")); print "<table>"; print "<tr>"; print "<td style=\"font-weight:bold;\">Login:</td>"; print "<input type=\"hidden\" name=\"login\" value=\"{$account->login}\">"; print "<td>{$account->login}</td>"; print "</tr>"; print "<tr>"; print "<td style=\"font-weight:bold;\">eMail:</td>"; print "<input type=\"hidden\" name=\"email\" value=\"{$account->email}\">"; print "<td>{$account->email}</td>"; print "</tr>"; print "<tr>"; print "<td style=\"font-weight:bold;\">Account ID:</td>"; print "<input type=\"hidden\" name=\"account_id\" value=\"{$account->account_id}\">"; print "<td>{$account->account_id}</td>"; print "</tr>"; print "<tr>"; print "<td style=\"font-weight:bold;\">Subject:</td>"; print "<td><input type=\"text\" name=\"subject\" id=\"InputFields\" style=\"width:300px;\"></td>"; print "</tr>"; print "<tr>"; print "<td style=\"font-weight:bold;\" valign=\"top\">Description:</td>"; print "<td><textarea id=\"InputFields\" name=\"description\" style=\"width:300px;height:100px;\"></textarea></td>"; print "</tr>"; print "<tr>";
<?php print_topic("SEARCH TRADER"); print "<p> </p>"; print_form(create_container("skeleton.php", "trader_search_result.php")); print "<span style=\"font-size:75%;\">Player name:</span><br>"; print "<input type=\"text\" name=\"player_name\" id=\"InputFields\" style=\"width:150px\"> "; print_submit("Search"); print "<p> </p>"; print "<span style=\"font-size:75%;\">Player ID:</span><br>"; print "<input type=\"text\" name=\"player_id\" id=\"InputFields\" style=\"width:50px\"> "; print_submit("Search"); print "</form>";
if (hesk_dbNumRows($res) == 1) { /* OK, found in a merged ticket. Get info */ $ticket = hesk_dbFetchAssoc($res); /* If we require e-mail to view tickets check if it matches the one from merged ticket */ if (hesk_verifyEmailMatch($ticket['trackid'], $my_email, $ticket['email'], 0)) { hesk_process_messages(sprintf($hesklang['tme'], $trackingID, $ticket['trackid']), 'NOREDIRECT', 'NOTICE'); $trackingID = $ticket['trackid']; } else { hesk_process_messages(sprintf($hesklang['tme1'], $trackingID, $ticket['trackid']) . '<br /><br />' . sprintf($hesklang['tme2'], $ticket['trackid']), 'NOREDIRECT', 'NOTICE'); $trackingID = $ticket['trackid']; print_form(); } } else { /* Nothing found, error out */ hesk_process_messages($hesklang['ticket_not_found'], 'NOREDIRECT'); print_form(); } } else { /* We have a match, get ticket info */ $ticket = hesk_dbFetchAssoc($res); /* If we require e-mail to view tickets check if it matches the one in database */ hesk_verifyEmailMatch($trackingID, $my_email, $ticket['email']); } /* Ticket exists, clean brute force attempts */ hesk_cleanBfAttempts(); /* Remember email address? */ if ($is_form) { if (!empty($_GET['r'])) { setcookie('hesk_myemail', $my_email, strtotime('+1 year')); $do_remember = ' checked="checked" '; } elseif (isset($_COOKIE['hesk_myemail'])) {
</div> <div class="form_section" id="main" style="margin-top:250px"> <div class="inputs_style_2"> <div class="form_title"> <?php if (function_exists('print_form_title')) { print_form_title($site_id, $page_type); } ?> </div> <?php if (function_exists('print_form')) { print_form($site_id, $page_type, $site_template, '40626947764870', '2'); } ?> </div> </div> </div> <div class="decription_section"> <h1 class="description_title"><?php if (function_exists('print_description_title')) { print_description_title($site_id, $page_type); } ?> </h1>
function generate_form($data) { return print_form($data, TRUE); }
<div class="main_section"> <div class="form_section"> <div class="main_banner"> <img src="../general/images/main_banner_3.jpg" /> </div> <div class="register_form inputs_style_2"> <div class="form_title"> Aprovecha YA este descuento ¡Solo por un tiempo limitado! </div> <?php if (function_exists('print_form')) { print_form($site_id, $page_type, $site_template, '40994547169873'); } ?> </div> </div> </div> </div> <div class="px1000"><div class="decription_section"> <h1 class="description_title">Hurrycane</h1> <div class="descrption_text"><div class="col_set"> <div class="col_1_2 first">
print_errors(); print_retry(); } elseif (!check_configs()) { echo '<p>' . $lang['i_modified'] . '</p>'; print_errors(); } elseif (check_data($_REQUEST['d'])) { // check_data has sanitized all input parameters if (!store_data($_REQUEST['d'])) { echo '<p>' . $lang['i_failure'] . '</p>'; print_errors(); } else { echo '<p>' . $lang['i_success'] . '</p>'; } } else { print_errors(); print_form($_REQUEST['d']); } ?> </div> <div style="clear: both"> <a href="http://dokuwiki.org/"><img src="lib/tpl/default/images/button-dw.png" alt="driven by DokuWiki" /></a> <a href="http://www.php.net"><img src="lib/tpl/default/images/button-php.gif" alt="powered by PHP" /></a> </div> </body> </html> <?php /** * Print the input form */
} print "<br>The government will PAY for the destruction of their ships!"; } $db->query("SELECT * FROM bounty WHERE game_id = {$player->game_id} AND type = 'HQ' AND claimer_id = 0 ORDER BY amount DESC"); print "<p> </p>"; if ($db->nf()) { print "<div align=\"center\">Most Wanted by Federal Government</div><br>"; print_table(); print "<tr>"; print "<th>Player Name</th>"; print "<th>Bounty Amount</th>"; print "</tr>"; while ($db->next_record()) { $id = $db->f("account_id"); $db2->query("SELECT * FROM player WHERE game_id = {$player->game_id} AND account_id = {$id}"); if ($db2->next_record()) { $name = stripslashes($db2->f("player_name")); } $amount = $db->f("amount"); print "<tr>"; print "<td align=\"center\"><font color=yellow>{$name}</font></td>"; print "<td align=\"center\"><font color=red> " . number_format($amount) . " </font></td>"; print "</tr>"; } print "</table>"; } if ($player->alignment >= -99 && $player->alignment <= 100) { print_form(create_container("government_processing.php", "")); print_submit("Become a deputy"); print "</form>"; }
restart(); } elseif (isset($_POST['clear_base'])) { // по кнопке очистить базу очищаем куки save_for_add('NULL'); restart(); } elseif (isset($_GET['del_ad'])) { // ловим ключ del_ad в массиве $_GET $del_id = (int) $_GET['del_ad']; // присваеиваем его переменной $del_id if (isset($add[$del_id])) { // если существует объявление с таким ключом del_ad($del_id); //удаляем его save_for_add($add); // вызываем save_for_add() и сохраняем массив с объявлениями в файле restart(); // перезапускаем скрипт } } elseif (isset($_GET['click_id'])) { // действие по клику на объявление $click_id = (int) $_GET['click_id']; // присваиваем переменной $click_id номер кликнутого объявления if (isset($add[$click_id])) { // если объявление такое существует print_form($smarty, $add, $add[$click_id]); // выводим в форму } } else { print_form($smarty, $add); // иначе выводим пустую форму }
<?php print_topic("Delete Album Entry - Confirmation"); print "Are you sure you want to delete your photo album entry and all comments added to it?<br>"; print "This action can't be undone."; print_form(create_container("album_delete_processing.php", "")); print_submit("Yes"); print " "; print_submit("No"); print "</form>";
} if (strlen($sequence) > 1000000) { die("Error: sequence is too long. Download the script from biophp.org and used it localy."); } // when length of query sequence is bellow 4^oligo_len => error (to avoid a lot of 0 frequencies); if (strlen($sequence) < pow(4, $oligo_len)) { die("Error: query sequence must be at least 4^(length of oligo) to proceed."); } // when frequencies at both strands are requested, place sequence and reverse complement of sequence in one line if ($strands == 2) { $sequence .= " " . RevComp($sequence); } // compute request and save data in an array $result = find_oligos($sequence, $oligo_len); // print the form print_form($sequence); //print out results print "<p>Frequencie of oligos with length {$oligo_len}<br><textarea cols=60 rows=50>"; foreach ($result as $oligo => $frequency) { print "{$oligo}\t{$frequency}\n"; } print "\n</textarea>\n"; } // ###################################################################################################### // ##################################### FUNCTIONS ################################### // ###################################################################################################### function print_form($sequence) { print "<table bgcolor=DDDDFF cellpadding=10><tr><td>\n"; print "<form method=post action=\"" . $_SERVER["PHP_SELF"] . "\">\n"; print "<b>Copy your sequence in the textarea below</b>\n";
echo $bc_gv['images_uri']; ?> /call.png" class="form_call" /> <div class="register_form inputs_style_2"> <div class="form_title"> <?php if (function_exists('print_form_title')) { print_form_title($site_id, $page_type); } ?> </div> <?php if (function_exists('print_form')) { print_form($site_id, $page_type, $site_template, $form_id, $fields_num); } ?> </div> </div> </div> <div class="decription_section"> <h1 class="description_title"><?php if (function_exists('print_description_title')) { print_description_title($site_id, $page_type); } ?> </h1>
function init_config() { function print_form($use_tcp = TRUE, $tcp_host = 'localhost', $tcp_port = '', $unix_socket = '/var/lib/mysql/mysql.sock', $database = 'racktables_db', $username = '******', $password = '') { echo "<input type=hidden name=save_config value=1>\n"; echo '<h3>Server-side MySQL setup of the database:</h3><div align=left><pre class=trok>'; echo "mysql>\nCREATE DATABASE racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;\n"; echo "GRANT ALL PRIVILEGES ON racktables_db.* TO racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';\n</pre></div>"; echo '<table>'; echo '<tr><td><label for=conn_tcp>TCP connection</label></td>'; echo '<td><input type=radio name=conn value=conn_tcp id=conn_tcp' . ($use_tcp ? ' checked' : '') . '></td></tr>'; echo '<tr><td><label for=conn_unix>UNIX socket</label></td>'; echo '<td><input type=radio name=conn value=conn_unix id=conn_unix' . ($use_tcp ? '' : ' checked') . '></td></tr>'; echo "<tr><td><label for=mysql_host>TCP host:</label></td>"; echo "<td><input type=text name=mysql_host id=mysql_host value='{$tcp_host}'></td></tr>\n"; echo "<tr><td><label for=mysql_port>TCP port (if not 3306):</label></td>"; echo "<td><input type=text name=mysql_port id=mysql_port value='{$tcp_port}'></td></tr>\n"; echo "<tr><td><label for=mysql_socket>UNIX socket:</label></td>"; echo "<td><input type=text name=mysql_socket id=mysql_socket value='{$unix_socket}'></td></tr>\n"; echo "<tr><td><label for=mysql_db>database:</label></td>"; echo "<td><input type=text name=mysql_db id=mysql_db value='{$database}'></td></tr>\n"; echo "<tr><td><label for=mysql_username>username:</label></td>"; echo "<td><input type=text name=mysql_username id=mysql_username value='{$username}'></td></tr>\n"; echo "<tr><td><label for=mysql_password>password:</label></td>"; echo "<td><input type=password name=mysql_password id=mysql_password value='{$password}'></td></tr>\n"; echo '</table>'; } global $path_to_secret_php; if (!is_writable($path_to_secret_php)) { echo "The {$path_to_secret_php} file is not writable by web-server. Make sure it is."; echo "The following commands should suffice:<pre>touch '{$path_to_secret_php}'; chmod 666 '{$path_to_secret_php}'</pre>"; echo 'Fedora Linux with SELinux may require this file to be owned by specific user (apache) and/or executing "setenforce 0" for the time of installation. '; echo 'SELinux may be turned back on with "setenforce 1" command.<br>'; return FALSE; } if (!array_key_exists('save_config', $_REQUEST)) { print_form(); return FALSE; } if (empty($_REQUEST['mysql_db']) or empty($_REQUEST['mysql_username'])) { print_form($_REQUEST['conn'] == 'conn_tcp', $_REQUEST['mysql_host'], $_REQUEST['mysql_port'], $_REQUEST['mysql_socket'], $_REQUEST['mysql_db'], $_REQUEST['mysql_username'], $_REQUEST['mysql_password']); echo '<h2 class=trerror>Missing database/username parameter!</h2>'; return FALSE; } if ($_REQUEST['conn'] == 'conn_tcp' and empty($_REQUEST['mysql_host'])) { print_form($_REQUEST['conn'] == 'conn_tcp', $_REQUEST['mysql_host'], $_REQUEST['mysql_port'], $_REQUEST['mysql_socket'], $_REQUEST['mysql_db'], $_REQUEST['mysql_username'], $_REQUEST['mysql_password']); echo '<h2 class=trerror>Missing TCP hostname parameter!</h2>'; return FALSE; } if ($_REQUEST['conn'] == 'conn_unix' and empty($_REQUEST['mysql_socket'])) { print_form($_REQUEST['conn'] == 'conn_tcp', $_REQUEST['mysql_host'], $_REQUEST['mysql_port'], $_REQUEST['mysql_socket'], $_REQUEST['mysql_db'], $_REQUEST['mysql_username'], $_REQUEST['mysql_password']); echo '<h2 class=trerror>Missing UNIX socket parameter!</h2>'; return FALSE; } # finally OK to make a connection attempt $pdo_dsn = 'mysql:'; switch ($_REQUEST['conn']) { case 'conn_tcp': $pdo_dsn .= 'host=' . $_REQUEST['mysql_host']; if (!empty($_REQUEST['mysql_port']) and $_REQUEST['mysql_port'] != '3306') { $pdo_dsn .= ';port=' . $_REQUEST['mysql_port']; } break; case 'conn_unix': $pdo_dsn .= 'unix_socket=' . $_REQUEST['mysql_socket']; break; default: print_form(); echo '<h2 class=trerror>form error</h2>'; return FALSE; } $pdo_dsn .= ';dbname=' . $_REQUEST['mysql_db']; try { $dbxlink = new PDO($pdo_dsn, $_REQUEST['mysql_username'], $_REQUEST['mysql_password']); } catch (PDOException $e) { print_form($_REQUEST['conn'] == 'conn_tcp', $_REQUEST['mysql_host'], $_REQUEST['mysql_port'], $_REQUEST['mysql_socket'], $_REQUEST['mysql_db'], $_REQUEST['mysql_username'], $_REQUEST['mysql_password']); echo "<h2 class=trerror>Database connection failed. Check parameters and try again.</h2>\n"; echo "PDO DSN: <tt class=trwarning>{$pdo_dsn}</tt><br>"; return FALSE; } $conf = fopen($path_to_secret_php, 'w+'); if ($conf === FALSE) { echo "Error: failed to open {$path_to_secret_php} for writing"; return FALSE; } fwrite($conf, "<?php\n# This file has been generated automatically by RackTables installer.\n"); fwrite($conf, "\$pdo_dsn = '{$pdo_dsn}';\n"); fwrite($conf, "\$db_username = '******'mysql_username'] . "';\n"); fwrite($conf, "\$db_password = '******'mysql_password'] . "';\n\n"); fwrite($conf, <<<ENDOFTEXT \$user_auth_src = 'database'; \$require_local_account = TRUE; # Default setting is to authenticate users locally, but it is possible to # employ existing LDAP or Apache user accounts. Check RackTables wiki for # more information, in particular, this page for LDAP configuration details: # http://wiki.racktables.org/index.php?title=LDAP #\$LDAP_options = array #( #\t'server' => 'localhost', #\t'domain' => 'example.com', #\t'search_attr' => '', #\t'search_dn' => '', # // The following credentials will be used when searching for the user's DN: #\t'search_bind_rdn' => NULL, #\t'search_bind_password' => NULL, #\t'displayname_attrs' => '', #\t'options' => array (LDAP_OPT_PROTOCOL_VERSION => 3), #\t'use_tls' => 2, // 0 == don't attempt, 1 == attempt, 2 == require #); # This HTML banner is intended to assist users in dispatching their issues # to the local tech support service. Its text (in its verbatim form) will # be appended to assorted error messages visible in user's browser (including # "not authenticated" message). Beware of placing any sensitive information # here, it will be readable by unauthorized visitors. #\$helpdesk_banner = '<B>This RackTables instance is supported by Example Inc. IT helpdesk, dial ext. 1234 to report a problem.</B>'; ENDOFTEXT ); fwrite($conf, "?>\n"); fclose($conf); echo "The configuration file has been written successfully.<br>"; return TRUE; }
$export_device = $device; if ($config['snmp']['hide_auth']) { $params = array('snmp_community', 'snmp_authlevel', 'snmp_authname', 'snmp_authpass', 'snmp_authalgo', 'snmp_cryptopass', 'snmp_cryptoalgo'); foreach ($params as $param) { if (strlen($export_device[$param])) { $export_device[$param] = '***'; } } } if ($vars['saveas'] == 'yes' && $vars['filename']) { download_as_file(gzencode(_json_encode($export_device)), $vars['filename']); } else { if ($config['snmp']['hide_auth']) { print_warning("NOTE, <strong>\$config['snmp']['hide_auth']</strong> is set to <strong>TRUE</strong>, snmp community and snmp v3 auth hidden from output and export."); } else { print_error("WARNING, <strong>\$config['snmp']['hide_auth']</strong> is set to <strong>FALSE</strong>, snmp community and snmp v3 auth <strong>NOT hidden</strong> from output and export."); } $form = array('type' => 'rows', 'space' => '10px', 'url' => generate_url($vars)); // Filename $form['row'][0]['filename'] = array('type' => 'text', 'name' => 'Filename', 'value' => $device['hostname'] . '.json.txt.gz', 'width' => '100%', 'placeholder' => TRUE); // Compress //$form['row'][0]['compress'] = array( // 'type' => 'switch', // 'value' => 1); // Search button $form['row'][0]['saveas'] = array('type' => 'submit', 'name' => 'Export', 'icon' => 'icon-save', 'right' => TRUE, 'value' => 'yes'); print_form($form); r($export_device); } unset($export_device, $params, $param); // EOF
} if (isset($update_parent)) { $formdata['update_parent'] = array('type' => 'hidden', 'value' => 1); } $formdata['date'] = array('type' => 'datepicker', 'label' => v('CMT_DATE'), 'parent_class' => 'date', 'value' => array('date' => date('d.m.Y', $date), 'time' => date('H:i', $date))); $formdata['title'] = array('type' => 'text', 'label' => v('CMT_TITLE'), 'style' => array('class' => "col-3_of_7")); $formdata['content'] = array('type' => 'textarea', 'label' => v('CMT_CONTENT')); $formdata['c_active'] = array('type' => 'checkbox', 'label' => v('CMT_ACTIVE')); foreach ($formdata as $key => $val) { if ($formdata[$key]['type'] == 'checkbox' && !isset($formdata[$key]['settings']['data'])) { $formdata[$key]['settings']['data'] = array('1' => v('CMT_YES')); } if ($val['type'] != 'datepicker') { if (isset(${$key})) { $formdata[$key]['value'] = ${$key}; } if (isset($alert[$key])) { if (is_array($alert[$key])) { $formdata[$key]['settings']['alert']['type'] = $alert[$key]['type']; $formdata[$key]['settings']['alert']['label'] = $alert[$key]['label']; if (isset($alert[$key]['text'])) { $formdata[$key]['settings']['alert']['text'] = $alert[$key]['text']; } } else { $formdata[$key]['settings']['alert'] = $alert[$key]; } } } } print_form($formdata); print "\n\t\t\t<div class='popup-title'>\n\t\t\t\t<h3> </h3>\n\t\t\t</div><!-- /.popup-title -->\n\t\t\t<div class='form_submit'>\n\t\t\t\t<button type='submit' name='cmt_save' id='submit-form' value='" . v('CMT_BUTTON_SAVE') . "'><i class='icon-save'></i>" . v('CMT_BUTTON_SAVE') . "</button>\n\t\t\t</div>\n\t\t</form>\n\t</div><!-- /.popup-content -->\n</div><!-- /.popup -->";
function process_form() { // Read POST request params into global vars // FILL IN YOUR EMAIL //$to = "*****@*****.**"; $to = "*****@*****.**"; $from = "Notification from Ejobs Network<*****@*****.**>"; $subject = trim($_POST['subject']); $jobpostsubject = trim($_POST['jobpostsubject']); $jobpostlocationtowncity = trim($_POST['jobpostlocationtowncity']); $jobpostlocationcounty = trim($_POST['jobpostlocationcounty']); $jobpostpostcode = trim($_POST['jobpostpostcode']); $jobpostjobtype = trim($_POST['jobpostjobtype']); $jobpostsalary = trim($_POST['jobpostsalary']); $jobpostsectorindustry = trim($_POST['jobpostsectorindustry']); $jobpostdescription = trim($_POST['jobpostdescription']); $jobpostrecruiteremployer = trim($_POST['jobpostrecruiteremployer']); $jobpostrecruitercontactperson = trim($_POST['jobpostrecruitercontactperson']); $jobpostrecruiteremployeremail = trim($_POST['jobpostrecruiteremployeremail']); $jobpostcontactnumber = trim($_POST['jobpostcontactnumber']); $jobposthdyhau = trim($_POST['jobposthdyhau']); $jobposttermsagree = trim($_POST['jobposttermsagree']); $jobpostdate = trim($_POST['jobpostdate']); $jobpostrefreshdate = trim($_POST['jobpostrefreshdate']); $jobstatus = $_POST['jobstatus']; $startdate = date('Y-m-d'); $dateadded = strtotime("+28 day"); $enddate = date('Y-m-d', $dateadded); // Allowed file types. add file extensions WITHOUT the dot. $allowtypes = array("txt", "rtf", "doc", "docx", "pdf"); // Require a file to be attached: false = Do not allow attachments true = allow only 1 file to be attached $requirefile = "false"; // Maximum file size for attachments in KB NOT Bytes for simplicity. MAKE SURE your php.ini can handel it, // post_max_size, upload_max_filesize, file_uploads, max_execution_time! // 2048kb = 2MB, 200kb = 1MB, 512kb = 1/2MB etc.. $max_file_size = "200"; // Thank you message $thanksmessage = ""; $errors = array(); //Initialize error array //jobpostsubject if (empty($_POST['jobpostsubject'])) { $errors[] = 'jobpostsubject'; } //jobpostlocationtowncity if (empty($_POST['jobpostlocationtowncity'])) { $errors[] = 'jobpostlocationtowncity'; } //jobpostlocationcounty if (empty($_POST['jobpostlocationcounty'])) { $errors[] = 'jobpostlocationcounty'; } //jobpostpostcode if (empty($_POST['jobpostpostcode'])) { $errors[] = 'jobpostpostcode'; } //jobpostjobtype if (empty($_POST['jobpostjobtype'])) { $errors[] = 'jobpostjobtype'; } //jobpostsalary if (empty($_POST['jobpostsalary'])) { $errors[] = 'jobpostsalary'; } //jobpostsectorindustry if (empty($_POST['jobpostsectorindustry'])) { $errors[] = 'jobpostsectorindustry'; } //jobpostdescription if (empty($_POST['jobpostdescription'])) { $errors[] = 'jobpostdescription'; } //jobpostrecruiteremployer if (empty($_POST['jobpostrecruiteremployer'])) { $errors[] = 'jobpostrecruiteremployer'; } //jobpostrecruitercontactperson if (empty($_POST['jobpostrecruitercontactperson'])) { $errors[] = 'jobpostrecruitercontactperson'; } //jobpostcontactnumber if (empty($_POST['jobpostcontactnumber'])) { $errors[] = 'jobpostcontactnumber'; } //jobpostrecruiteremployeremail if (empty($_POST['jobpostrecruiteremployeremail'])) { $errors[] = 'jobpostrecruiteremployeremail'; } else { if (!eregi('^[[:alnum:]][a-z0-9_\\.\\-]*@[a-z0-9\\.\\-]+\\.[a-z]{2,4}$', stripslashes(trim($_POST['jobpostrecruiteremployeremail'])))) { $errors[] = 'Please provide a valid email address!'; } // if eregi // if empty email } //jobposthdyhau if (empty($_POST['jobposthdyhau'])) { $errors[] = 'jobposthdyhau'; } //jobposttermsagree if (empty($_POST['jobposttermsagree'])) { $errors[] = 'jobposttermsagree'; } //jobpostdate if (empty($_POST['jobpostdate'])) { $errors[] = 'jobpostdate'; } //jobpostrefreshdate if (empty($_POST['jobpostrefreshdate'])) { $errors[] = 'jobpostrefreshdate'; } // checks for required file if ($requirefile == "false") { if ($_FILES['attachment']['error'] == 4) { $errors[] = 'You forgot to attach your CV'; } } //checks attachment file // checks that we have a file if (!empty($_FILES["attachment"]) && $_FILES['attachment']['error'] == 0) { // basename -- Returns filename component of path $filename = basename($_FILES['attachment']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); $filesize = $_FILES['attachment']['size']; $max_bytes = $max_file_size * 200; //Check if the file type uploaded is a valid file type. if (!in_array($ext, $allowtypes)) { $errors[] = "File <strong>" . $filename . "</strong> has been rejected! Only the following CV formats are allowed: .doc, .docx, .txt, .rtf, and .pdf."; // check the size of each file } elseif ($filesize > $max_bytes) { $errors[] = "Your file: <strong>" . $filename . "</strong> is to big. Max file size is " . $max_file_size . "kb."; } } // if !empty FILES if (empty($errors)) { //If everything is OK // send an email // Obtain file upload vars $fileatt = $_FILES['attachment']['tmp_name']; $fileatt_type = $_FILES['attachment']['type']; $fileatt_name = $_FILES['attachment']['name']; // Headers $headers = "From: {$from}"; // create a boundary string. It must be unique $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // Add the headers for a file attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // Add a multipart boundary above the plain message $message = "This is a multi-part message in MIME format.\n\n"; $message .= "--{$mime_boundary}\n"; $message .= "Content-Type: text/html; charset=\"UTF-8\"\n"; $message .= "Content-Transfer-Encoding: 7bit\n\n"; $message .= "JOB TITLE: " . $jobpostsubject . " <br>\n"; $message .= "TOWN CITY: " . $jobpostlocationtowncity . " <br>\n"; $message .= "COUNTY: " . $jobpostlocationcounty . " <br>\n"; $message .= "POST CODE: " . $jobpostpostcode . " <br>\n"; $message .= "JOB TYPE: " . $jobpostjobtype . " <br>\n"; $message .= "SALARY: " . $jobpostsalary . " <br>\n"; $message .= "SECTOR/INDUSTRY: " . $jobpostsectorindustry . " <br>\n"; $message .= "JOB DESCRIPTION : " . $jobpostdescription . " <br>\n"; $message .= "RECRUITER/EMPLOYER: " . $jobpostrecruiteremployer . " <br>\n"; $message .= "CONTACT PERSON: " . $jobpostrecruitercontactperson . " <br>\n"; $message .= "CONTACT NUMBER: " . $jobpostcontactnumber . " <br>\n"; $message .= "EMAIL: " . $jobpostrecruiteremployeremail . " <br>\n"; $message .= "HOW DID YOU HEAR ABOUT US?: " . $jobposthdyhau . " <br>\n"; $message .= ": " . $jobposttermsagree . " <br>\n"; $message .= ": " . $jobpostdate . " <br>\n"; $message .= ": " . $jobpostrefreshdate . " <br>\n\n"; if (is_uploaded_file($fileatt)) { // Read the file to be attached ('rb' = read binary) $file = fopen($fileatt, 'rb'); $data = fread($file, filesize($fileatt)); fclose($file); // Base64 encode the file data $data = chunk_split(base64_encode($data)); // Add file attachment to the message $message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; } $sql = "INSERT INTO `uk_master_live_job_search` (`JobID`, `jobpostsubject`, `jobpostlocationtowncity`, `jobpostlocationcounty`, `jobpostpostcode`, `jobpostjobtype`, `jobpostsalary`, `jobpostsectorindustry`, `jobpostdescription`, `keywords`, `jobpostrecruiteremployer`, `jobpostrecruitercontactperson`, `jobpostcontactnumber`, `jobpostrecruiteremployeremail`, `jobposthdyhau`, `jobposttermsagree`, `jobpostdate`, `jobpostrefreshdate`,`postjobdatetime`,`startdate`,`enddate`,`jobstatus`,`hits`,`refresh_date`,`last_edit`) VALUES ('0', '{$jobpostsubject}', '{$jobpostlocationtowncity}', '{$jobpostlocationcounty}', '{$jobpostpostcode}', '{$jobpostjobtype}', '{$jobpostsalary}', '{$jobpostsectorindustry}', '{$jobpostdescription}', '{$keywords}', '{$jobpostrecruiteremployer}', '{$jobpostrecruitercontactperson}', '{$jobpostcontactnumber}', '{$jobpostrecruiteremployeremail}', '{$jobposthdyhau}', '{$jobposttermsagree}', '{$jobpostdate}', '{$jobpostrefreshdate}',NOW(),'{$startdate}','{$enddate}','{$jobstatus}','0', NOW(), NOW())"; $rs = mysql_query_with_throw($sql); // Send the completed message $envs = array("HTTP_USER_AGENT", "REMOTE_ADDR", "REMOTE_HOST"); foreach ($envs as $env) { $message .= "{$env}: {$_SERVER[$env]}\n"; } echo '<div id="formfeedbacktrue"><p>This job has been added to Our Network!</p></div>'; unset($_SESSION['myForm']); print_form(); // end of if !mail } else { //report the errors echo '<div id="formfeedback"><b><font size="4">WHOOPS! PLEASE REVIEW THE FOLLOWING ISSUES:</font></b>'; foreach ($errors as $msg) { //prints each error echo "<ul><li>{$msg}</li></ul>\n"; } // end of foreach echo '</div>'; print_form(); } //end of if(empty($errors)) }
<?php echo print_form('open', 'POST', '', 'edit_form'); $contentType = array('type' => 'text', 'name' => 'content_type', 'id' => 'content_type', 'value' => $oldValues['content_type'], 'placeholder' => 'Content Type', 'label' => '', 'labelFor' => '', 'labelClass' => '', 'mandatory' => TRUE, 'showError' => TRUE, 'error' => isset($errors['content_type']) ? $errors['content_type'] : ''); echo print_field($contentType); echo print_submit_buttons(array($submit)); echo print_form('close');
} $PHP_OUTPUT .= '</td>'; $PHP_OUTPUT .= '</tr></table>'; if (isset($error)) { $PHP_OUTPUT .= $error . '<br />'; } $PHP_OUTPUT .= '<table class="standard">'; $PHP_OUTPUT .= '<tr><th>Upgrade Area</th><th>Current Upgrades</th><th>Point Cost</th><th>Action</th></tr>'; foreach ($STAT_INCREASE_TYPES as $upgrade_id => $upgrade_array) { $baseAmountOfAttribute = getBaseAmountOfUpgradeAttribute($ship, $upgrade_array); $PHP_OUTPUT .= '<tr>'; $PHP_OUTPUT .= '<td>Add ' . ($upgrade_array['Static'] !== false ? '+' . $upgrade_array['Static'] . ' static' : '') . ($upgrade_array['Static'] !== false && $upgrade_array['Percent'] !== false ? ' and ' : '') . ($upgrade_array['Percent'] !== false ? '+' . $upgrade_array['Percent'] . '%' : '') . ' to ' . $upgrade_array['Name'] . ($upgrade_array['Percent'] !== false ? ' for a total of +' . floor($upgrade_array['Static'] + $baseAmountOfAttribute * $upgrade_array['Percent'] / 100) : '') . '</td>'; $current = isset($ship['Upgrades'][$upgrade_id]) ? $ship['Upgrades'][$upgrade_id] : 0; $PHP_OUTPUT .= '<td class="center">' . $current . '</td>'; $cost = getModifiedUpgradeCost($ship, $upgrade_id); $PHP_OUTPUT .= '<td class="center">' . $cost . '</td>'; $link = array(); $link['body'] = 'ship_upgrade.php'; $link['processing'] = 'ship_upgrade_processing.php'; $link['upgrade_id'] = $upgrade_id; print_form($link, $id); $PHP_OUTPUT .= '<td class="center">'; $PHP_OUTPUT .= '<input type="submit" value="Add" name="submit">'; if ($remove) { $PHP_OUTPUT .= '<br /><input type="submit" value="Remove" name="submit">'; } $PHP_OUTPUT .= '</td>'; $PHP_OUTPUT .= '</form>'; $PHP_OUTPUT .= '</tr>'; } $PHP_OUTPUT .= '</table>';
print_galactic_post_menue(); $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "galactic_post_view_members.php"; if ($action == "Remove") { $db->query("DELETE FROM galactic_post_writer WHERE game_id = {$player->game_id} AND account_id = {$var['id']}"); } $db->query("SELECT * FROM galactic_post_writer WHERE game_id = {$player->game_id} AND account_id != {$player->account_id}"); if ($db->nf()) { print_table(); print "<tr>"; print "<th align=\"center\">Player Name</th>"; print "<th align=\"center\">Last Wrote</th>"; print "<th align=\"center\">Options</th>"; print "</tr>"; while ($db->next_record()) { $curr_writter = new SMR_PLAYER($db->f("account_id"), $player->game_id); $time = $db->f("last_wrote"); print "<tr>"; print "<td align=\"center\">{$curr_writter->player_name}</td>"; print "<td align=\"center\"> " . date("n/j/Y g:i:s A", $time) . "</td>"; $container["id"] = $curr_writter->account_id; print_form($container); print "<td>"; print_submit("Remove"); print "</td>"; print "</tr>"; print "</form>"; } print "</table>"; }
<?php print_topic("LEAVE NEWBIE PROTECTION"); print_form(create_container("leave_newbie_processing.php", "")); print "Do you really want to leave Newbie Protection?<br><br>"; print_submit("Yes!"); print " "; print_submit("No!"); print "</form>";
print "</tr>"; print "<tr>"; print "<td>Turrets</td><td align=\"center\">" . $planet->construction[3] . "</td><td align=\"center\">" . $planet->accuracy() . " %</td>"; print "</tr>"; print "</table>"; print "<br />"; $db->query("SELECT * FROM player WHERE sector_id = {$player->sector_id} AND " . "game_id = " . SmrSession::$game_id . " AND " . "account_id != " . SmrSession::$old_account_id . " AND " . "land_on_planet = 'TRUE' " . "ORDER BY last_active DESC"); while ($db->next_record()) { $planet_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id); $container = array(); $container["url"] = "planet_kick_processing.php"; $container["account_id"] = $planet_player->account_id; print_form($container); $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "trader_search_result.php"; $container["player_id"] = $planet_player->player_id; print_link($container, "<span style=\"color:yellow;\">{$planet_player->player_name}</span>"); print " "; // should we be able to kick this player from our rock? if (($player->alliance_id != $planet_player->alliance_id || $player->alliance_id == 0) && $planet->owner_id == $player->account_id) { print_submit("Kick"); } print "</form>"; } if ($db->nf() > 0) { print "<br>"; } print_form(create_container("planet_launch_processing.php", "")); print_submit("Launch"); print "</form>";
$amount = $db->f("message_id") + 1; } else { $amount = 1; } $gossip_tell = $_REQUEST['gossip_tell']; if (isset($gossip_tell)) { $db->query("INSERT INTO bar_tender (game_id, message_id, message) VALUES (" . SmrSession::$game_id . ", {$amount}, " . format_string($gossip_tell, true) . " )"); } $db->query("SELECT * FROM bar_tender WHERE game_id = " . SmrSession::$game_id . " ORDER BY rand() LIMIT 1"); if ($db->next_record()) { print "I heard "; $message = stripslashes($db->f("message")); print "{$message}<br><br>"; print "Got anything else to tell me?<br>"; } else { print "I havent heard anything recently...got anything to tell me?<br><br>"; } print_form(create_container("skeleton.php", "bar_talk_bartender.php")); print "<input type=\"text\" name=\"gossip_tell\" size=\"30\" id=\"InputFields\">"; print_submit("Tell him"); print "</form><br>"; print "What else can I do for ya?"; print "<br><br>"; print_form(create_container("skeleton.php", "bar_buy_drink.php")); print_submit("Buy a drink (\$10)"); print "<br>"; print_submit("Buy some water (\$10)"); print "</form><br>"; print_form(create_container("skeleton.php", "bar_talk_bartender.php")); print_submit("Talk to bartender"); print "</form>";
$message2 = $_POST['message2']; $message3 = $_POST['message3']; $message4 = $_POST['message4']; $message5 = $_POST['message5']; $message6 = $_POST['message6']; } if (isset($_POST['save_messages']) && $error_txt != "") { print_form(1, $error_txt); } elseif (isset($_POST['save_messages']) && $error_txt == "") { try { $reseller = new Reseller(); $reseller->edit_messages($message1, $message2, $message3, $message4, $message5, $message6); echo "<img src='img/true.png' width='150' height='150' /><br/><br/>"; echo "<span style='font-size: 20px;'>" . _("MESSAGES SAVED!") . "</span><br/><br/><br/><br/>"; echo "<a href='resellers_configuration.php'><button class='b1'>" . _("Go Back") . "</button></a>"; } catch (ResellerException $e) { echo "<img src='img/false.png' width='200' height='170' /><br/><br/>"; echo "<span style='font-size: 20px; color: red;'>" . _("ERROR SAVING MESSAGES!") . "</br>" . $e->getMessage() . " </span><br/><br/><br/><br/>"; echo "<a href='resellers_configuration.php'><button class='b1'>" . _("Go Back") . "</button></a>"; } } else { print_form(0, ''); } ?> </center> </div> </body> </html>
// инициализируем переменные $purse = 12946; // sms:bank id идентификатор смс:банка $order_id = $_SESSION["bank_id"]; // operation id идентификатор операции $amount = $_SESSION["amount"]; // transaction sum сумма транзакции $clear_amount = 0; // billing algorithm алгоритм подсчета стоимости $description = "SMS PAYMENT SYSTEM"; // operation desc описание операции $submit = "Покупка Платины"; // submit label надпись на кнопке submit // printing the form // печатаем форму print_form($purse, $order_id, $amount, $clear_amount, $description, $secret_code, $submit); ##=========================================================== } else { $nomer = mysql_query("SELECT number FROM bank WHERE login='******'"); if (mysql_num_rows($nomer)) { echo "<FORM ACTION='smscoin.php' METHOD='POST'>\n\t\t\t\t\t\t\t<fieldset style='width:500px;'>\n\t\t\t\t\t\t\t<legend><b>Управление счетом №</b></legend>\n\t\t\t\t\t\t\t<table border=0 cellpadding=1 cellspacing=3 align=center>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Номер счета: </td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name='bankid' style='width:100'>"; for ($i = 0; $i < mysql_num_rows($nomer); $i++) { $num = mysql_fetch_array($nomer); echo "<option value=" . $num['number'] . ">" . $num['number']; } echo "</select> \n\t\t\t\t\t\t\t\t\t<select name='amount'>\n\t\t\t\t\t\t\t\t\t\t<option value=2>2 AZN</option>\n\t\t\t\t\t\t\t\t\t\t<option value=5>5 AZN</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td><INPUT TYPE='submit' VALUE='Выбрать Счет'></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</FIELDSET></FORM>"; } } } mysql_close(); ?>
} </style> <script type='text/javascript'> $(document).ready(function(){ //Setting all handlers bind_import_actions(); }); </script> </head> <body> <div id='container' class='<?php echo $container_class; ?> '> <?php print_form($import_type); ?> </div> <div id='sm_container'></div> </body> </html>
function check_form($fname, $lname, $email, $street, $city, $state, $zip) { if (empty(trim($fname))) { echo "<h3> O campo First Name deve ser preenchido!</h3>"; print_form($fname, $lname, $email, $street, $city, $state, $zip); } elseif (empty(trim($fname))) { echo "<h3> O campo nome deve ser preenchido!</h3>"; print_form($fname, $lname, $email, $street, $city, $state, $zip); } elseif (empty(trim($email)) || substr_count($email, '@') <= 0) { echo "<h3>Email deve ser preenchido e conter @ !</h3>"; print_form($fname, $lname, $email, $street, $city, $state, $zip); } else { confirm_form($fname, $lname, $email, $street, $city, $state, $zip); } }