
Шустрый

Профиль
Группа: Участник
Сообщений: 94
Регистрация: 24.6.2006
Репутация: нет Всего: нет
|
| Цитата(skyboy @ 17.9.2006, 09:35) | VitaL, зачем - из javascript - на мыло? лучше из javascript -> PHP -> mail. Впрочем, я могу чего - то не знать.... Ещё вариант: эмулировать переход по ссылке "mailto:... ", вроде такого |
Да ты скорей всео прав. лучше из javascript -> PHP -> mail. за ссылку спасибо но это не то что нужно, не через аутлук. У меня есть скрипт опроса который посылает на мыло ответ опроса без аутлука. Можно ли его переделать чтоб скрипт забирал инфу с тех полей, которые указаны выше, и высылал их на мыло без. Новерно это нужно спрашивать на другом субфоруме сори но всё же | Код | <STYLE> body,table,td {font: normal 11px Verdana, Geneva, Arial, Helvetica, sans-serif; color: #216086; text-decoration: none; } </STYLE>
<DIV align="center"> <? //hi yang hacker :) $_POST[username]=strip_tags($_POST[username]); $_POST[usermail]=strip_tags($_POST[usermail]);
//Variables /* * $questions - Questions , $answer - Answers for questions * !!! Sum of questions = sum array's of answer !!! */ $questions=array( "1. Do you think that the number of employees in your company from the following groups reflects the social composition of your area (city/country….)?", "2. Do you think that the members of the following groups are offered the equal benefits for the like work and are given the equal career opportunities as other employees?", "3. Do you think that your company sales and marketing strategy and marketing materials are taking into consideration clients from the following social groups?", "4. Does your company provide child care programs and facilities and maternity leave benefits beyond legal requirements?", "5. Are your company's premises easily accessible for disabled people beyond legal requirements, and does your company provide special equipment to assist people with disabilities in their work place?", "6. Did your company remove any mandatory retirement age and does it recruit staff over 50?", "7. Does your company provide programs for improving awareness of cultural and ethnic diversity?", "8. Does your company have disciplinary procedures that deal with harassment and bulling of non-heterosexual employees at the work place?", "9. Does your company provide time off work to accommodate key religious holidays for employees from various religious groups?", <br><br> <hr><br><h2><b>hi</b></h2><hr> <br><br> "1. Is your company making every effort to minimize the generation of potentially harmful emissions or byproducts during the normal usage of your products?", "2. Are the plans and procedures for safe disposal of your products at the end of their useful lives included in your product design process?", "3. Please evaluate the efforts your company is making to design the packaging and packaging disposal in environment-friendly fashion.", "4. How would you describe your company's efforts to improve energy efficiency of your products and /or their disposal processes at the end of their useful lives?", "5. Is your company ensuring that any potential environmental hazard is clearly described on the products packaging and in its documentation, together with an instructions for energy optimal usage?", "6. When choosing a new supplier, does your company taking into consideration their environmental records and environmental compliance of their processes?", "7. Did your company make any attempts to replace potentially harmful raw material or component with safer alternatives?", "8. Do you have a program for safe disposal of all potentially environmentally harmful substances generated during your production process?", "9. Do you have environmental awareness programs / training for office and other non-production staff?", "1. Does your company have pricing policy, sales procedures and customer care service which accommodate small, possibly dependant customers with low budgets?", "2. Does your company enforce strict quality control procedures in all stages of your business cycle, combined with user friendly return policies?", "3. Is your company ensuring that every promotion and advertising output describes the product and all its features honestly and accurately beyond the legal requirements?", "4. Does your company have formal or informal measures in place to assist small, possibly dependant suppliers?", "5. Does your company publicize tender information even when not required by low and are your tender advertisements published in media easily accessible to small businesses?", "6. Does your company ensure that minority and small shareholders without board representation are kept informed or consulted on key business decisions?", "7. Did your company put in place systems and procedures to measure and control the social responsibility or lack of it in all activities of various company departments?", "8. Does your company have an employee/manager, whose duties include monitoring all company's activities for social responsibility or lack of it? ", "1. Does your company have training program, which includes financially supporting and rewarding employees who undertake courses ranging from professional training to higher degrees?", "2. Does your company have an effective, working system of employee feedback?", "3. Does your company have a policy of giving priority to the internal candidates for all vacancies whenever feasible? ", "4. Does your company exceed legal requirement when it comes to the health, safety and welfare in workplace?", "5. Does your company encourage healthy work/life balance for all staff, by offering flexible working hours, work from home or similar measures?", "6. Would you describe the remuneration packages in your company as more generous than the industry average packages for the like work?", "1. Is your company regularly working with or contributing to charitable organization?", "2. Does your company provide any financial support to local community activities and/or projects?", "3. Does your company offer work experience or training programs to the members of the local community?", "4. Does your company provide sponsorships for local sportsmen or women, museums, schools or other similar organisations?" );
$answer=array( array(//question 1 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 2 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 3 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 4 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 5 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 6 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 7 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 8 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 9 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 10 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 11 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 12 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 13 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 14 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 15 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 16 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 17 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 18 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 19 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 20 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 21 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 22 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 23 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 24 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 25 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 26 "Duties not asigned", "Part-time or occasional activity", "Full-time junior employee", "Full-time senior manager", "Full-time team" ), array(//question 27 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 28 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 29 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 30 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 31 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 32 "Not at all", "Somewhat", "Partially", "Mostly", "Completely" ), array(//question 33 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 34 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 35 "Never", "Occasionally", "Average", "Mostly", "Always" ), array(//question 36 "Never", "Occasionally", "Average", "Mostly", "Always" ) );
$email="[email protected]"; // to send email $subject="Questions"; // Title email
if($_POST["Send"]){ $headers = 'From: '.$email.'' . "\r\n" . 'Reply-To: '.$email.'' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $body="<b>Answers from $_POST[username] <$_POST[usermail]></b><br>".date("d/m/Y G:i:s")."<br><br>"; for($i=0,$end=count($questions); $i<$end ; $i++){ if(isset($_POST["answ$i"])){ $body.="<B>$questions[$i]:</B>".$_POST["answ$i"]."<br>"; } }
mail($email,$subject,$body,$headers); }else{ ?>
<TABLE> <TR> <TD> <FORM action="<?=$_SERVER['SCRIPT_NAME']?>" method="POST"> You name:<INPUT type="text" name="username"> You e-Mail:<INPUT type="text" name="usermail"> <BR><BR> <? foreach ($questions as $k=>$v){ echo "<hr><li><b>$v</b><br><br>"; if(!is_array($answer[$k])) die("Error: No answers for '$v' question !"); foreach ($answer[$k] as $kk=>$vv){ echo "<input name='answ$k' value='$vv' type='radio'>$vv<br>"; } echo "</li>"; } ?> <INPUT type="submit" name="Send" value="Submit"> </FORM> </TD> </TR> </TABLE>
<?}?> </DIV>
|
спасибо
|