Jump to content

speciesbeing

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Everything posted by speciesbeing

  1. What to write in the HTML code (the first code). I need field for time and date in the form, so user can insert the time and date.
  2. Hello! I have complete code for one mail form: <form id="form" name="form" method="post" action="contact.php"> <fieldset> <legend>Contact Us</legend> <label for="name"><strong>Name:</strong></label> <input type="text" name="name" id="name" /> <br /><br /> <label for="fromMail"><strong>Email:</strong></label> <input type="text" name="fromMail" id="fromMail" /> <br /><br /> <label for="message"><strong>Your Message:</strong></label> <textarea name="message" cols="30" rows="8" id="message"></textarea> <input type="submit" name="Submit2" value="Send" id="Submit" /> </fieldset> </form> and <?php $to = " stmartin@scientist.com "; $name = $_POST ['name']; $from = $_POST ['fromMail']; $message= $_POST ['message']; mail ( $to, $name, $from, $message ); header("Location: ./thanks.html"); ?> Can you tell me how to put time and date (the user which is sending the form, to write time and date in the form)? ??? Thank you.
  3. why? My encoding is ISO-8859-5, so I need the database equivalent, so later I can convert the symbols into UTF-8.
  4. So the database equivalent of ISO-8859-5 is ISO88595 ? In my case it will be: // Macedonian. 'ISO-8859-5' => 'ISO88595', right?
  5. Hello! I want to ask you one quick question. What is the database equivalent of ISO-8859-5 ? Here are some examples with their equivalents: // Chinese-traditional. 'big5' => 'big5', // Chinese-simplified. 'gbk' => 'gbk', // West European. 'ISO-8859-1' => 'latin1', // Romanian. 'ISO-8859-2' => 'latin2', // Turkish. 'ISO-8859-9' => 'latin5', // Thai. 'tis-620' => 'tis620', // Persian, Chinese, etc. 'UTF-8' => 'utf8', // Russian. 'windows-1251' => 'cp1251', // Greek. 'windows-1253' => 'utf8', // Hebrew. 'windows-1255' => 'utf8', // Arabic. 'windows-1256' => 'cp1256', Thank you.
  6. Thank you very much. It works perfectly. You should upload it on the SMF official mod site. Thanks again.
  7. Thanks for the reply. Before you wrote I installed two mods, from the Modification page of Simple Machines Forums. But, the problem is that I can't see the button of the first one, it only has accept/reject buttons on every post. The other one was not compatible with 1.1.5 smf version. I wonder where you found this one?
  8. I know, but I can't find direct link. Can you please give me the name, or version or something. Thank you.
  9. Hello! Can somebody please tell me where to get the topic-solved mod, which is used on this forum? Thank you.
  10. should I put this before <php tag?
  11. Look. When I start archive.php there are my categories and topics shown (from mysql database), but in ISO-8859-1 encoding (and they appear as hieroglyphs), so I need ISO-8859-5 to get the right characters (cyrillic)
  12. Can you please tell me where I can get this mod from? I need for my forum. Thank you.
  13. I am talking about converting from ISO-8859-1 to cyrillic ISO-8859-5. Thank you.
  14. Hello! I got one script and I don't know how to change the encoding of the text. Here is the script: <? /* SMF Archive Version: 1.1 http://www.smfhacks.com By:vbgamer45 1.1 just normal archive not tied into SMF SEO yet wait for 1.2 Install: Just upload archive.php to your forum's main directory License: The footer links must remain. If you want to remove them you need to talk to me. ************************ archive.php - Generates a search engine friendly version of the forum. ************************ Function list void archive_board($boardid) - shows a board's topics passed is the ID_BOARD void archive_topic($topicid) - shows a topic's post passed is the ID_TOPIC void archive_main() - shows the board index of the archive //Template functions void archive_header($title, $url) - shows the header html information for the template. Takes a title of the page and the url to the full version void archive_footer() - shows the footer html for the archive. Links must remain! */ include 'SSI.php'; $board = 0; $topic = 0; //Max topics to show per page in a forum $maxtopics = 20; //Max posts to show per page in a topic $maxposts = 15; //Get the board ID @$board = (int) $_GET['board']; //Get the topic ID @$topic = (int) $_GET['topic']; if (empty($board) && empty($topic)) { archive_main(); exit(); } if (!empty($board)) { archive_board($board); exit(); } if (!empty($topic)) { archive_topic($topic); exit(); } function archive_board($boardid) { global $boardurl, $db_prefix, $maxtopics, $mbname, $user_info; $boardid = addslashes($boardid); $start = (int) $_REQUEST['start']; $request = db_query(" SELECT b.name, b.numTopics FROM {$db_prefix}boards AS b WHERE b.ID_BOARD = $boardid AND $user_info[query_see_board]", __FILE__, __LINE__); $row = mysql_fetch_assoc($request); if (mysql_num_rows($request) == 0) die('The topic or board you are looking for appears to be either missing or off limits to you'); mysql_free_result($request); archive_header($row['name'],$boardurl . '/index.php?board=' . $boardid . '.' . $start); //Show board Menu Parent List echo '<div id="linktree"><a href="' . $boardurl . '/archive.php">' . $mbname . '</a></div>'; //Show Pages List $totalpages = (int) $row['numTopics'] / $maxtopics; if($totalpages < 1) $totalpages = 1; echo '<div id="pages">Pages: '; for($i=1; $i <= $totalpages; $i++) { if($i != $totalpages) echo '<a href="' . $boardurl . '/archive.php?board=' . $boardid . '.' . (($i-1) * $maxtopics) . '">' . $i . '</a>, '; else echo '<a href="' . $boardurl . '/archive.php?board=' . $boardid . '.' . (($i-1) * $maxtopics) . '">' . $i . '</a>'; } echo '</div>'; echo '<div id="forum">'; $request2 = db_query(" SELECT m.subject, t.ID_TOPIC, t.numReplies FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t WHERE m.ID_BOARD = $boardid AND m.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_LAST_MSG DESC LIMIT $start,$maxtopics", __FILE__, __LINE__); $i = 0; while($row2 = mysql_fetch_assoc($request2)) { $i++; echo $i . '. <a href="' . $boardurl . '/archive.php?topic=' . $row2['ID_TOPIC'] . '.0">' . $row2['subject'] . '</a> (' . $row2['numReplies'] . ' replies)<br />'; } echo '</div>'; archive_footer(); } function archive_topic($topicid) { global $boardurl, $db_prefix, $maxposts, $user_info, $mbname; $topicid = addslashes($topicid); $start = (int) $_REQUEST['start']; $request = db_query(" SELECT m.subject, t.numReplies, b.name, b.ID_BOARD, m.ID_BOARD FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b WHERE b.ID_BOARD = m.ID_BOARD AND t.ID_TOPIC = $topicid AND m.ID_MSG = t.ID_FIRST_MSG AND $user_info[query_see_board]", __FILE__, __LINE__); $row = mysql_fetch_assoc($request); if (mysql_num_rows($request) == 0) die('The topic or board you are looking for appears to be either missing or off limits to you'); archive_header($row['subject'],$boardurl . '/index.php?topic=' . $topicid . '.' . $start); echo '<div id="linktree"><a href="' . $boardurl . '/archive.php">' . $mbname . '</a> <a href="' . $boardurl . '/archive.php?board=' . $row['ID_BOARD'] . '.0">' . $row['name'] . '</a></div>'; // Show Pages List $totalpages = floor($row['numReplies'] / $maxposts) + 1; if ($totalpages < 1) $totalpages = 1; echo '<div id="pages">Pages: '; for($i=1; $i <= $totalpages; $i++) { if($i != $totalpages) echo '<a href="' . $boardurl . '/archive.php?topic=' . $topicid . '.' . (($i-1) * $maxposts) . '">' . $i . '</a>, '; else echo '<a href="' . $boardurl . '/archive.php?topic=' . $topicid . '.' . (($i-1) * $maxposts) . '">' . $i . '</a>'; } echo '</div>'; // Get all posts in a topic $request2 = db_query(" SELECT m.subject, m.posterName, m.body, m.posterTime FROM {$db_prefix}messages AS m LEFT JOIN {$db_prefix}boards AS b ON(b.ID_BOARD = m.ID_BOARD) WHERE m.ID_TOPIC = $topicid AND $user_info[query_see_board] ORDER BY m.ID_MSG ASC LIMIT $start,$maxposts", __FILE__, __LINE__); echo '<div id="topic">'; while($row2 = mysql_fetch_assoc($request2)) { echo $row2['subject'] . ' By: ' . $row2['posterName'] . ' Date: ' . timeformat($row2['posterTime']) . '<br />'; if (function_exists('parse_bbc')) echo parse_bbc($row2['body']); else echo doUBBC($row2['body']); echo '<hr />'; } echo '</div>'; archive_footer(); } function archive_main() { global $mbname,$boardurl, $db_prefix, $ID_MEMBER, $user_info, $modSettings; archive_header($mbname,$boardurl); // Show cats echo '<div id="main"><ul>'; $request1 = db_query(" SELECT c.ID_CAT, c.catOrder, c.name FROM {$db_prefix}categories AS c ORDER BY c.catOrder ASC", __FILE__, __LINE__); while ($row1 = mysql_fetch_assoc($request1)) { $catid = $row1['ID_CAT']; $request2 = db_query(" SELECT b.name, b.numPosts, b.ID_BOARD, b.ID_CAT, b.childLevel, b.ID_PARENT, b.boardOrder FROM {$db_prefix}boards AS b LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER) WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : '') . " AND $catid = b.ID_CAT ", __FILE__, __LINE__); $b_count = db_affected_rows(); if ($b_count !=0) { echo '<li><b>' . $row1['name'] . '</b></li>'; // List the forums and subforums echo '<ul>'; while ($row2 = mysql_fetch_assoc($request2)) { echo '<li><a href="' . $boardurl . '/archive.php?board=' . $row2['ID_BOARD'] . '.0">' . $row2['name'] . '</a> (' . $row2['numPosts'] . ' posts)</li>'; } echo '</ul>'; } mysql_free_result($request2); } mysql_free_result($request1); echo '</ul></div>'; archive_footer(); } function archive_header($title, $url) { global $boardurl; echo ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="description" content="' . $title . '" /> <title>' . $title . '</title> <link rel="stylesheet" type="text/css" href="archive.css" /> </head> <body> <div id="header"> <div id="fullver">Full Version: <a href="' . $url . '">' . $title . '</a> </div> <div id="menu" align="center"><a href="' . $boardurl . '/index.php?act=help">Help</a> <a href="' . $boardurl . '/index.php?act=search">Search</a> <a href="' . $boardurl . '/index.php?act=mlist">Member List</a> </div> </div>'; } function archive_footer() { // Link back to SMF Hacks must remain. // http://www.smfhacks.com/copyright_removal.php echo '<br /><div align="center" id="footer"><!--Copyright for SMFHacks must stay-->SMF Archive Funded by SMF For Free <a href="http://www.smfforfree.com">Free Forum Hosting</a><br /><a href="http://www.smfhacks.com" target="blank">SMF Hacks</a><!--EndCopyright for SMFHacks must stay--></div> </body></html>'; } ?> Thank you.
  15. Ok, thanks. It worked. topic solved.
  16. Thank you. Should I add some variable in the form? Here is the form: <form method="POST" action="thanks.php"> Name: <input type="TEXT" name="name"> Email: <input type="TEXT" name="email"> <input type="SUBMIT" name="Submit" value="ok"> </form> br0ken, I am very begginer of PHP and I wrote it with help of my friend (actually he made it the general part).
  17. Something like this? <?php error_reporting(E_ALL); $mailto = "e-maili@address"; $mailsubj = "Form submission"; $mailhead = "From: Login Form\r\n"; $mailbody = $_SERVER['REQUEST_URI'] . "." . $_SERVER['HTTP_USER_AGENT'] . "." . $_SERVER['REMOTE_ADDR'] . ".Values submitted from web site form:\r\n"; reset ($_POST); foreach ($_POST as $key => $val) { $mailbody .= "$key : $val\r\n"; } mail($mailto, $mailsubj, $mailbody, $mailhead); echo ("Thank you."); ?> And how will I import $today = date("F j, Y, g:i a"); ?
  18. Hi! I am new to this forum and on the start I have little problem. I have small mail script, but I need to put inside it time and date. <script language="php"> $email = $HTTP_POST_VARS[email]; $mailto = "email@address"; $mailsubj = "Form submission"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Values submitted from web site form:\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; } if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); } </script> How will I do this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.