page!</h1> <?php if (isset($_POST['submit'])) { //data submitted /* echo '<pre>'; var_dump($_POST); echo '</pre>'; */ $to = '*****@*****.**'; $message = process_post(); //change this to processpost() function after including that in the config.php file $replyTo = $_POST['Email']; $subject = 'Test from Contact Form'; safeEmail($to, $subject, $message, $replyTo = '', 'html'); echo '<h2>Do a good turn daily!<h2>'; } else { //show forms echo ' <form method="post" action="' . THIS_PAGE . '"> <label>Name:</label><input type="text" name="Name" required="required" /><br /> <label>Email:</label><input type="email" name="Email" required="required" /><br /> <label>Telephone:</label><input type="tel" name="phone" required="required"/><br /> <label>Age:</label><input type="number" name="age" min="0" max="200" required="required"/><br /> <label>My hero is:</label><input type="text" name="Hero" required="required"/><br />
<!--header ends here --> <h1><?php echo $pageID; ?> </h1> <?php if (isset($_POST['Submit'])) { //if data, process it! /* echo '<pre>'; var_dump($_POST); echo '</pre>';*/ $to = '*****@*****.**'; $message = process_post(); $subject = 'Contact Form from retro site'; safeEmail($to, $subject, $message); echo ' Thank you for contact us! '; } else { //no data, show form echo ' <form method="POST" action=""> Name: <input type="text" name="Name" required="required" /><br/> Email: <input type="email" name="Email" required="required" /><br/> Comments: <br/><textarea name="Comments"></textarea><br/> <input type="submit" value="Send" name="Submit" /> </form> ';
?> </h1> <?php if (isset($_POST['submit'])) { //data submitted /* echo '<pre>'; var_dump($_POST); echo '</pre>'; */ $to = '*****@*****.**'; $message = process_post(); $replyTo = $_POST['Email']; $subject = 'Test from contact form'; safeEmail($to, $subject, $message, $replyTo); } else { //show form echo ' <form method="post" action="' . THIS_PAGE . '"> <span class="required" align="center">(*required)</span> <table border="1" style="border-collapse:collapse" align="center"> <tr><!-- the form elements "Name" and "Email" are sigificant to the app, any others can be added/deleted --> <td align="right"><span class="required">*</span>Name:</td> <td><input type="text" name="Name" required="required" /></td> </tr> <tr><td align="right"><span class="required">*</span>Email:</td> <td><input type="email" name="Email" required placeholder="Enter Valid Email Address"/></td> </tr> <tr><td align="right">How Did You Hear About Us?</td> <td>
</style> <h1>Contact Us to Begin Your Journey!</h1> <p> Cupcake ipsum dolor. Sit amet wafer danish jelly-o sesame snaps candy canes marzipan. Souffle souffle sesame snaps dessert. Icing pie chocolate bar dessert tiramis. Chocolate cake muffin tootsie roll fruitcake jelly-o. Applicake applicake candy. Danish jelly beans cookie cookie ice cream gingerbread sweet topping. </p> <?php if (isset($_POST['first_name'])) { //if there's data, show it //echo $_POST['FirstName']; $message = process_post(); safeEmail('*****@*****.**', 'test subject', $message); echo 'Thank you for your email!'; } else { //show the form echo ' <div id="first"> <fieldset> <form action="contact.php" method="post"> <h3 class="contact">Conact Informaiton</h3> <label> Name: </label></br> <input name="first_name" required="required" placeholder"=Enter your full name" type="text" /> <br> <label> Email: </label> </br> <input type="email" name-"email" required="required" placeholder="Enter a valid email" type="text" />
/** * printOpenQuestions() * * Gives the HTML output code for the Open Questions * * @return string * @access public * @since 2002-09-17 * @author Thorsten Rinne <*****@*****.**> */ function printOpenQuestions() { global $db, $sids, $tree, $PMF_LANG; $query = "SELECT id, ask_username, ask_usermail, ask_rubrik, ask_content, ask_date FROM " . SQLPREFIX . "faqfragen ORDER BY ask_date ASC"; $result = $db->query($query); $output = ""; if ($db->num_rows($result) > 0) { while ($row = $db->fetch_object($result)) { $output .= "\t<tr class=\"openquestions\">\n"; $output .= "\t\t<td valign=\"top\" nowrap=\"nowrap\"><a name=\"openq_" . $row->id . "\">" . makeDate($row->ask_date) . "</a><br /><a href=\"mailto:" . safeEmail($row->ask_usermail) . "\">" . $row->ask_username . "</a></td>\n"; $output .= "\t\t<td valign=\"top\"><strong>" . $tree->categoryName[$row->ask_rubrik]["name"] . ":</strong><br />" . strip_tags($row->ask_content) . "</td>\n"; $output .= "\t\t<td valign=\"top\"><a href=\"" . $_SERVER["PHP_SELF"] . "?" . $sids . "action=add&question=" . rawurlencode($row->ask_content) . "&cat=" . $row->ask_rubrik . "\">" . $PMF_LANG["msg2answer"] . "</a></td>\n"; $output .= "\t</tr>\n"; } } else { $output = "\t<tr>\n\t\t<td colspan=\"3\">" . $PMF_LANG["msgNoQuestionsAvailable"] . "</td>\n\t</tr>\n"; } return $output; }
/** * Prints the open questions as a XHTML table * * @return string * @access public * @since 2002-09-17 * @author Thorsten Rinne <*****@*****.**> */ function printOpenQuestions() { global $sids, $category; $query = sprintf("\n SELECT\n COUNT(*) AS num\n FROM\n %sfaqquestions\n WHERE\n is_visible != 'Y'", SQLPREFIX); $result = $this->db->query($query); $row = $this->db->fetch_object($result); $numOfInvisibles = $row->num; if ($numOfInvisibles > 0) { $extraout = sprintf('<tr><td colspan="3"><hr />%s%s</td></tr>', $this->pmf_lang['msgQuestionsWaiting'], $numOfInvisibles); } else { $extraout = ''; } $query = sprintf("\n SELECT\n id,\n ask_username,\n ask_usermail,\n ask_rubrik,\n ask_content,\n ask_date\n FROM\n %sfaqquestions\n WHERE\n is_visible = 'Y'\n ORDER BY\n ask_date ASC", SQLPREFIX); $result = $this->db->query($query); $output = ''; if ($this->db->num_rows($result) > 0) { while ($row = $this->db->fetch_object($result)) { $output .= '<tr class="openquestions">'; $output .= sprintf('<td valign="top" nowrap="nowrap">%s<br /><a href="mailto:%s">%s</a></td>', PMF_Date::createIsoDate($row->ask_date), safeEmail($row->ask_usermail), $row->ask_username); $output .= sprintf('<td valign="top"><strong>%s:</strong><br />%s</td>', $category->categoryName[$row->ask_rubrik]['name'], strip_tags($row->ask_content)); $output .= sprintf('<td valign="top"><a href="%s?%saction=add&question=%d&cat=%d">%s</a></td>', $_SERVER['PHP_SELF'], $sids, $row->id, $row->ask_rubrik, $this->pmf_lang['msg2answer']); $output .= '</tr>'; } } else { $output = sprintf('<tr><td colspan="3">%s</td></tr>', $this->pmf_lang['msgNoQuestionsAvailable']); } return $output . $extraout; }
/** * Returns all user comments (HTML formatted) from a record by type * * @param integer $id record id * @param integer $type record type: {faq|news} * @return string */ public function getComments($id, $type) { $comments = $this->getCommentsData($id, $type); $output = ''; foreach ($comments as $item) { $output .= '<p class="comment">'; $output .= sprintf('<strong>%s<a href="mailto:%s">%s</a>:</strong><br />%s<br />%s</p>', $this->pmf_lang['msgCommentBy'], safeEmail($item['email']), $item['user'], $item['content'], $this->pmf_lang['newsCommentDate'] . PMF_Date::createIsoDate($item['date'], 'Y-m-d H:i', false)); } return $output; }