Jump to content

ssh2010

Newbie
  • Posts

    6
  • Joined

  • Last visited

ssh2010's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. )) Ну либо так не то конечно, че нужно было, но на первое время покатит
  2. чето я заработался... действительно.. .проще написать так: <th>Послугу надано на сумму: <input type="text" name="res" value=" грн"></textarea> <hr> Послугу не надано: <input type="radio" name="res" value="1">за власним бажанням клі?нта <input type="radio" name="res" value="2">некоректне обслуговування возникла новая проблемка... если нечайно был выбран элемент "radio", нам нужно было выбрать "text" и написать там чето, то в базу попадает "radio", которого нельзя отменить.
  3. ну и всю страничку могу выложить <?php $client = $HTTP_POST_VARS['client']; $tel1 = $HTTP_POST_VARS['tel1']; $tel2 = $HTTP_POST_VARS['tel2']; $tel3 = $HTTP_POST_VARS['tel3']; $ind = $HTTP_POST_VARS['ind']; $Posluga = $HTTP_POST_VARS['Posluga']; $date = $HTTP_POST_VARS['date']; $time = $HTTP_POST_VARS['time']; $res = $HTTP_POST_VARS['res']; $Number = $HTTP_POST_VARS['Number']; $tempMan = $HTTP_POST_VARS['manager']; if ( $tempMan == '1') { $man = Manager1; $manMail = man1_mail; } if ($tempMan == '2') { $man = Manager2; $manMail = man2_mail; } if ($tempMan == '3') { $man = Manager3; $manMail = man3_mail; } if ($tempMan == '4') { $man = Manager4; $manMail = man4_mail; } if ($tempMan == '5') { $man = Manager5; $manMail = man5_mail; } function connect() { $connect = mysql_connect("10.10.10.1","qqq","eee"); return $connect; } if (!connect()) { echo " <strong>Ошибка соединения!!!</strong> "; } $step2 = mysql_select_db("prepay"); if (!$step2) { echo " <strong>Невозможно соединиться с базой данных.</strong> "; } // Извлечь из базы значения и вставить их на место $Number $sQuery_A = "select * from base where Number = '".$Number."'"; $iQueryResult_A = mysql_query($sQuery_A); $oTestArray_A = array(); while ($Row = mysql_fetch_array($iQueryResult_A)) { $GorodOtd = $Row[Gorod]; $numberOtd = $Row[numberOtd]; $NameOtd = $Row[Name]; $TelephoneOtd = $Row[Telephone]; $GraphOtd = $Row[Graph]; $AdressOtd = $Row[Adress]; $DirectorOtd = $Row[Director]; $dir_mailOtd = $Row[dir_mail]; $ManagerOtd = $Row[$man]; $man1_maiOtd = $Row[$manMail]; }; $queryReg = "INSERT INTO baseOtd (client, tel1, tel2, tel3, ind, Posluga, date, time, res, GorodOtd, numberOtd, NameOtd, TelephoneOtd, GraphOtd, AdressOtd, DirectorOtd, dir_mailOtd ,ManagerOtd, man1_maiOtd) VALUES ('".$client."', '".$tel1."', '".$tel2."', '".$tel3."', '".$ind."', '".$Posluga."', '".$date."', '".$time."', '".$res."', '".$GorodOtd."', '".$numberOtd."', '".$NameOtd."', '".$TelephoneOtd."', '".$GraphOtd."', '".$AdressOtd."', '".$DirectorOtd."', '".$dir_mailOtd."', '".$ManagerOtd."', '".$man1_maiOtd."')"; $ResultReg = mysql_query($queryReg) or die ("Error: ".mysql_error()); $LastNumber = mysql_insert_id(); if (!$ResultReg) { echo 'Ошибка при пополнении базы'; } else { echo "<center><b>Данные внесены в базу </b></center>"; printf ("Last inserted record has id %dn", $LastNumber); } // Часть скрипта отвечающая за отправку исем.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! require("class.phpmailer.php"); $Subject = "PrePay"; $Body = ' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <center> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> </head> <body> <form method=post action="changeManager.php?id='.$LastNumber.'"> <table border="1" cellspacing="1" bordercolor="gray"> <tr> <th colspan="6">База PrePay по клиенту '.$LastNumber.'</th> </tr> <tr> <th>? </th> <th>П?Б клі?нта</th> <th>Телефон1</th> <th>Телефон2</th> <th>Телефон3, e-mail</th> <th>?ПН</th> </tr> <tr> <th rows="5" cols="10" >'.$numberOtd.'</th> <th rows="5" cols="10" >'.$client.'</th> <th rows="5" cols="10" >'.$tel1.'</th> <th rows="5" cols="10" >'.$tel2.'</th> <th rows="5" cols="10" >'.$tel3.'</th> <th rows="5" cols="10" >'.$ind.'</th> </tr> </table> <table border="1" cellspacing="1" bordercolor="gray"> <tr> <th>Запитувана банківська послуга</th> <th>Відділення, директор, мененджер.</th> <th>Дата події</th> <th>Час події </th> <th>Результат події</th> </tr> <tr> <th rows="5" cols="10" >'.$Posluga.'</textarea></th> <th rows="5" cols="50" >'.$GorodOtd.', '.$$AdressOtd.',телефон: '.$TelephoneOtd.', директор: '.$DirectorOtd.', '.$dir_mailOtd.', мененджер: '.$ManagerOtd.', '.$man1_maiOtd.'</textarea></th> <th rows="5" cols="10">'.$date.'</th> <th rows="5" cols="10">'.$time.'</th> <th>Послугу надано, грн<textarea wrap="soft" rows="1" cols="15" name="res">на сумму:</textarea> <hr> Послугу не надано: <input type="radio" name="res" value="1">за власним бажанням клі?нта <input type="radio" name="res" value="2">некоректне обслуговування у відділенні банку </th> </tr> </table> <p> <input type="submit" value="Применить" name="submit" id="submit"> </p> </body> </center> </html> '; $mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "host"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication //$mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "manager"; // SMTP username $mail->Password = "qqq"; // SMTP password $mail->From = "info@mail.ua"; $mail->FromName = "C"; $mail->AddAddress($man1_maiOtd); $mail->WordWrap = 50; // set word wrap to 50 characters //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name $mail->IsHTML(true); // set email format to HTML $mail->Subject = $Subject; $mail->Body = $Body; $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; // <META HTTP-EQUIV="Refresh" content ="2; URL=http://10.9.3.88/PrePay/BasecClient.php"><style>b{color:darkblue}</style> ?> <META HTTP-EQUIV="Refresh" content ="1; URL=BasecClient.php"><style>b{color:darkblue}</st </html> </body> Потом, тело письма погружается с систему Lotus Notes там форма и обрабатывается... Лотус еще и по своему на теги смотрит.
  4. Кнопка отправить находится ниже, вот она: <p> <input type="submit" value="Применить" name="submit" id="submit"> </p> А вот и форма, как обрабатываю: <?php $res = $HTTP_POST_VARS['res']; function connect() { $connect = mysql_connect("10,10,10,1","лог","пароль"); return $connect; } if (!connect()) { echo " <strong>Ошибка соединения!!!</strong> "; } $step2 = mysql_select_db("prepay"); if (!$step2) { echo " <strong>Невозможно соединиться с базой данных.</strong> "; } $queryUpdate = "UPDATE baseOtd SET res = '".$res."' WHERE Number = '".$id."' "; $ResultUpdate = mysql_query($queryUpdate) or die ("Error: ".mysql_error()); if (!$ResultUpdate) { echo 'Ошибка при пополнении базы'; } else { echo "<center><b>Данные внесены в базу</b></center>"; } ?>
  5. Варианта выбора должно быть три... или выбираем текстовое поле и в нем дописываем результат, или отдну из галочек... в любом случае, результирующая переменная, которая будет передана скрипту пхп должна быть одна из трех вариантов текстовое поле вот: на сумму: не знаю, правильно ли я написал...
  6. Добрый день! Написал я код <th>Послугу надано, грн<textarea wrap="soft" rows="1" cols="15" name="res">на сумму:</textarea> <hr> Послугу не надано: <input type="radio" name="res" value="1">за власним бажанням клі?нта <input type="radio" name="res" value="2">некоректне обслуг. </th> при отправке результата на сервер, текстовое поле не воспринимается как результат... А нужно, чтоб был один результат из тр?х.
×
×
  • 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. See more about our Guidelines and Privacy Policy