PHP . SU
Программирование на PHP, MySQL и другие веб-технологии
Страниц (9): [1] 2 3 4 5 6 7 8 9 »
Найдено сообщений: 135
mclord
Отправлено: 25 Сентября, 2011 - 21:13:12 • Тема: помогите css не коректно читает исправте • Форум: Напишите за меня, пожалуйста
Ответов: 3 Просмотров: 57
в общем вот этот код не читается в ие думаю что остальной тоже
CODE (
htmlphp ):
скопировать код в буфер обмена
td. mx1
{
background- color: #9ACD32;
font- size: 11px;
font- family: Verdana, Arial, Helvetica, sans- serif;
color: #ffffff;
font- weight: bold;
}
td. mx
{
font- size: 11px;
font- family: Verdana, Arial, Helvetica, sans- serif;
color: #000000;
}
. row { height: 26px;
cursor: pointer;
cursor: hand;
background- color: #FFFFFF;
}
. row: hover { height: 26px;
background- color: #FFD365;
}
. caption { height: 26px;
background- color: #74b3ef;
color: #ffffff;
font- weight: bold;
}
. caption a { height: 26px;
color: #555;
text- decoration: none;
}
. caption a: hover { height: 26px;
color: #555;
text- decoration: underline;
}
. caption td { height: 26px;
padding: 4px 6px 4px 6px;
}
mclord
Отправлено: 25 Сентября, 2011 - 20:53:38 • Тема: помогите css не коректно читает исправте • Форум: Напишите за меня, пожалуйста
Ответов: 3 Просмотров: 57
CODE (
htmlphp ):
скопировать код в буфер обмена
td. mx1
{
background- color: #9ACD32;
font- size: 11px;
font- family: Verdana, Arial, Helvetica, sans- serif;
color: #ffffff;
font- weight: bold;
}
td. mx
{
font- size: 11px;
font- family: Verdana, Arial, Helvetica, sans- serif;
color: #000000;
}
. row { height: 26px;
cursor: pointer;
cursor: hand;
background- color: #FFFFFF;
}
. row: hover { height: 26px;
background- color: #FFD365;
}
. caption { height: 26px;
background- color: #74b3ef;
color: #ffffff;
font- weight: bold;
}
. caption a { height: 26px;
color: #555;
text- decoration: none;
}
. caption a: hover { height: 26px;
color: #555;
text- decoration: underline;
}
. caption td { height: 26px;
padding: 4px 6px 4px 6px;
}
html, body { margin: 0 ; padding: 0 ; background: #fff url(../images/base-bg.gif);width:100%;height:100%; font-family:Arial, Helvetica, sans-serif;}
* html #wrap{height: 100%;}
p, td { font- family: Arial, Helvetica, sans- serif; margin- top: 0px; }
a img{ border: 0 ; }
a{
color: #000000;
text- decoration: underline;
}
a: hover{
color: #1a60e1;
text- decoration: none;
}
a. hidden { text- decoration: none; color: #000;cursor:default;}
form { margin: 0 ; padding: 0 ; }
ul { margin- left: 20px; margin- top: 0px; padding: 1px; list- style- type: square; line- height: 16px; }
h1 { font- size: 16px; font- weight: bold; color: #000;margin: 0 0 5px 0; font-style:oblique;}
. bottom_addr { font- size: 11px; color: #000000;padding: 2px 0 13px 0; text-align:center;}
. bottom_addr a { text- decoration: none; color: #000000}
. bottom_addr a: hover { text- decoration: underline; color: #000000}
. bottom_menu { color: #000;text-align: center;padding-top: 14px;padding-bottom: 4px; font-size:11px;}
. bottom_menu a { color: #000;text-decoration: none;}
. bottom_menu a: hover { color: #000;text-decoration: underline;}
#menu {color: #000;font-weight: bold;padding: 0;white-space: nowrap; background:url(../images/menu-bg.gif) no-repeat; width:650px; margin:0 auto; height:39px;}
#menu td{ font-size:13px; font-family:"trebuchet MS"; text-align:center; padding:5px 14px 0 14px;}
#menu a{text-decoration:underline;color: #000;}
#menu a:hover {color: #6a6862;text-decoration: underline;}
. body_txt { color: #000;text-align: justify;padding: 5px 15px 0 5px;vertical-align: top; font-size:12px;}
#body{margin:9px 0 15px 0;}
. login_form { background- image: url( ../ images/ login- form- bg. gif) ; background- repeat: repeat- x; height: 20px; width: 110px; border- width: 1px; border- style: solid; font- size: 11px; padding- top: 3px; padding- left: 1px; }
#wrap{position:relative; min-height:100%; margin:0 auto; width:100%;}
#page{width:720px;margin:0 auto; padding: 0 1px 1px 1px; border: 1px solid #009900; border-top:none; background:#FFF;}
#footer{width:720px; background-color:#89d43f;}
#header{}
#logo{position:absolute; margin: 122px 0 0 63px;}
#company_name {font-size: 24px;font-style:oblique;color:#000; font-family:"trebuchet MS"; position:absolute; margin:162px 0 0 160px;}
. right- block{ background: url( ../ images/ right- block- bg. gif) repeat- y; font- size: 11px; padding: 0 10px 0 10px; }
. right- block ul{ margin: 0 0 0 17px; }
. right- block p{ margin: 0 0 3px 0 ; }
mclord
Отправлено: 25 Сентября, 2011 - 18:16:46 • Тема: помогите скрипт работает не коректно в ie • Форум: Напишите за меня, пожалуйста
Ответов: 4 Просмотров: 48
PHP:
скопировать код в буфер обмена
<? @ include ( "templates/head.inc.php" ) ; ?>
<script language="JavaScript" type="text/javascript">
var select1 = 0;
var select2 = 0;
var temp1 = 0;
var temp2 = 0;
function goto_list() {
document.location='index.php?c1='+document.select_currency.from.value+'&c2='+document.select_currency.to.value;
}
function auto_direct(select1, select2) {
if (select1 == 1) {
temp1 = select1;
}
if (select2 == 1) {
temp2 = select2;
}
if ((temp1 == 1)&&(temp2 == 1)) {
goto_list();
}
}
nr = false;
function f_cl(url) {
if (nr) {
nr = false;
return false;
}
window.open('go.php?'+url);
}
</script>
<?PHP
include ( 'db.php' ) ;
function itfalse( $x )
{
global $se ; $ok = 0 ;
for ( $j = 3 ; $j < 15 ; $j ++ )
{
if ( $se [ $x ] [ $j ] == 40) { $ok ++; }
} return $ok ;
}
function iscount2( $x , $y )
{
if ( ( $x == 7) and ( $y == 7) ) { return 0 ; }
if ( ( $x == 1) and ( $y == 0) ) { return 1 ; }
if ( ( $x == 3) ) { return 2 ; }
if ( ( $x == 2) and ( $y == 6) ) { return 3 ; }
if ( ( $x == 2) and ( $y == 1) ) { return 4 ; }
if ( ( $x == 6) and ( $y == 5) ) { return 5 ; }
if ( ( $x == 7) and ( $y == 4) ) { return 6 ; }
if ( ( $x == 1) and ( $y == 2) ) { return 7 ; }
if ( ( $x == 6) and ( $y == 6) ) { return 8 ; }
if ( ( $x == 4) ) { return 9 ; }
}
function iscount( $x , $y ) //1 2 digit
{
if ( ( $x == 1) and ( $y == 0) ) { return 1 ; }
if ( ( $x == 5) and ( $y == 4) ) { return 2 ; }
if ( ( $x == 2) and ( $y == 7) ) { return 3 ; }
if ( ( $x == 2) and ( $y == 10) ) { return 4 ; }
if ( ( $x == 7) and ( $y == 5) ) { return 5 ; }
if ( ( $x == 8) and ( $y == 5) ) { return 6 ; }
if ( ( $x == 1) and ( $y == 3) ) { return 7 ; }
if ( ( $x == 7) and ( $y == 7) ) { return 8 ; }
if ( ( $x == 5) and ( $y == 8) ) { return 9 ; }
if ( ( $x == 8) and ( $y == 8) ) { return 0 ; }
}
function curl_redir_exec( $ch )
{
static $curl_loops = 0 ;
static $curl_max_loops = 20 ;
if ( $curl_loops ++ >= $curl_max_loops )
{
$curl_loops = 0 ;
return FALSE ;
}
if ( $http_code == 301 || $http_code == 302)
{
preg_match ( '/Location:(.*?)\n/' , $header , $matches ) ; if ( ! $url )
{
//couldn't process the url to redirect to
$curl_loops = 0 ;
return $data ;
}
if ( ! $url [ 'scheme' ] )
$url [ 'scheme' ] = $last_url [ 'scheme' ] ;
if ( ! $url [ 'host' ] )
$url [ 'host' ] = $last_url [ 'host' ] ;
if ( ! $url [ 'path' ] )
$url [ 'path' ] = $last_url [ 'path' ] ;
$new_url = $url [ 'scheme' ] . '://' . $url [ 'host' ] . $url [ 'path' ] . ( $url [ 'query' ] ?'?' . $url [ 'query' ] : '' ) ;
//debug('Redirecting to', $new_url);
return curl_redir_exec( $ch ) ;
} else {
$curl_loops = 0 ;
return $data ;
}
}
function getPage( $url )
{
curl_setopt ( $ch , CURLOPT_USERAGENT
, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" ) ; return $result ;
}
?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" align="left" width="100%">
<tr>
<td width="100%" style='padding-top: 7px; padding-bottom: 7px; padding-left: 10px; padding-right: 10px; '>
<br><br>
<center><form action="index.php" method="get" name="select_currency">
<select name="from" onchange="auto_direct(1, 0)">
<?PHP
$c1 = $_GET [ "c1" ] ;
$c2 = $_GET [ "c2" ] ;
if ( $c1 == "" && $c2 == "" )
{ $c1 = 1 ; $c2 = 2 ; }
foreach ( $decode as $i => $value )
{ if ( $decode [ $i ] <> "" ) { echo "<option value=" . $i ;
if ( $i == $c1 ) { echo " selected" ; }
echo ">" . $decode [ $i ] . "</option>" ; }
}
?>
</select> на <select name="to" onchange="auto_direct(0, 1)">
<?PHP
$i = 0 ;
foreach ( $decode as $i => $value )
{ if ( $decode [ $i ] <> "" ) { echo "<option value=" . $i ;
if ( $i == $c2 ) { echo " selected" ; }
echo ">" . $decode [ $i ] . "</option>" ; }
}
?>
</select> <script language="JavaScript" type="text/javascript">
document.write('<a href="javascript:goto_list()"><b>Найти</b><'+'/a>');
</script>
<noscript>
<input type="submit" style="margin-top: 12px; margin-bottom: 2px" value="Найти курсы">
</noscript>
</form></center>
</td>
</tr>
</table>
<br><br>
<center><hr><h2>Обмен <?PHP echo $decode [ $c1 ] ; ?> на <?PHP echo $decode [ $c2 ] ; ?> </h2><hr></center><br><br>
<div class="exchvar">
<a href="index.php?c1=<?PHP echo $c2 ; ?> &c2=<?PHP echo $c1 ; ?> "><b>Обратный обмен</a></b> | <a href="index.php?c1=1&c2=20"><b>Обмен WMZ на WMU</b></a> | <a href="index.php?c1=2&c2=20"><b>Обмен WMR на WMU</b></a></div><br>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#0B8D0B" width="100%" id="AutoNumber4">
<thead>
<tr class="caption"><td> Обменник</td><td width="90">Отдаете</td><td width="90">Получаете</td><td width="90" class="alignright">Резерв</td><td class="alignright" width="35">BL </td></tr>
</thead>
<tbody>
<?PHP
foreach ( $obmennik as $k => $valueo )
{ $file = @ getpage ( $obmennik [ $k ] [ "kurs_url" ] ) ;
if ( $obmennik [ $k ] <> "" && ( ! $file ) == false )
{
foreach ( $file as $line_num => $file )
{
if ( $c1 == $array [ 0] && $c2 == $array [ 1] )
{
$kursy [ $k ] [ 1] = $array [ 2] ;
$kursy [ $k ] [ 2] = $array [ 3] ;
if ( $kursy [ $k ] [ 1 ] <> "" ) { $nn = 1 ; }
}
}
}
}
//if(is_array($kursy) && isset($kursy[1][1]))
//foreach ($kursy as $kurs => $kursy) {
//if ($kursy[$kurs][1]<>"" && $kursy[$kurs][2]<>"")
// {$nn=1;}
//}
//if ($kursy[0][1]<>"")
if ( $nn == 1)
{
$sum = 0 ;
$sk = 0 ;
$n = 0 ;
foreach ( $kursy as $key => $val )
{
$res = $kursy [ $key ] [ 2] ;
$print1 = 1 ;
$print = $kursy [ $key ] [ 1] ;
if ( $print < 1) { $print1 = ( 1/ $print ) ;
$print = 1 ;
}
if ( $reserve <= 0) { $reserve = 0 ; }
$wmid = @ getpage( 'http://stats.wmtransfer.com/Levels/pWMIDLevel.aspx?wmid=' . $obmennik [ $key ] [ "wmid" ] . '&w=35&h=18&bg=0XDBE2E9' ) ;
for ( $i = 4 ; $i < 35 ; $i ++ )
{
for ( $j = 3 ; $j < 15 ; $j ++ )
{
}
}
$is = false ;
$w = '' ;
if ( ( itfalse( 4) == 6 ) and ( itfalse( 5) == 7 ) and ( itfalse( 6) == 1 ) and ( itfalse( 7) == 2 ) and ( itfalse( 8) == 7 ) )
{
$is = true ;
$w = 'no' ;
}
if ( ! ( itfalse( 18) or itfalse( 20) or itfalse( 19) or ( $is ) ) )
{
//one digit
$p1 = itfalse( 23, $se ) ;
$p2 = itfalse( 28, $se ) ;
$w = ( iscount( $p1 , $p2 ) ) ;
$is = true ;
}
if ( ! ( itfalse( 13) or itfalse( 14) or itfalse( 12) or ( $is ) ) )
{
//two digit
$p1 = itfalse( 17, $se ) ;
$p2 = itfalse( 22, $se ) ;
$w = ( iscount( $p1 , $p2 ) ) ;
$p1 = itfalse( 25, $se ) ;
$p2 = itfalse( 30, $se ) ;
$w .= ( iscount( $p1 , $p2 ) ) ;
$is = true ;
}
if ( ! ( itfalse( 7) or itfalse( 8) or itfalse( 6) or ( $is ) ) )
{
//tree digit
$p1 = itfalse( 11, $se ) ;
$p2 = itfalse( 16, $se ) ;
$w = ( iscount2( $p1 , $p2 ) ) ;
$p1 = itfalse( 18, $se ) ;
$p2 = itfalse( 23, $se ) ;
$w .= ( iscount2( $p1 , $p2 ) ) ;
$p1 = itfalse( 25, $se ) ;
$p2 = itfalse( 30, $se ) ;
$w .= ( iscount2( $p1 , $p2 ) ) ;
$is = true ;
}
if ( $is == false )
{
$p1 = itfalse( 6, $se ) ;
$p2 = itfalse( 11, $se ) ;
$w = ( iscount2( $p1 , $p2 ) ) ;
$p1 = itfalse( 13, $se ) ;
$p2 = itfalse( 18, $se ) ;
$w .= ( iscount2( $p1 , $p2 ) ) ;
$p1 = itfalse( 20, $se ) ;
$p2 = itfalse( 25, $se ) ;
$w .= ( iscount2( $p1 , $p2 ) ) ;
$p1 = itfalse( 27, $se ) ;
$p2 = itfalse( 32, $se ) ;
$w .= ( iscount2( $p1 , $p2 ) ) ;
}
echo '
<tr class="row" onClick="f_cl(' . $key . ')">
<td> ' . $obmennik [ $key ] [ "name" ] . '</td>
<td class="alignright">' . $w . '</td>
</tr>' ;
$sum2 = $sum2 + $reserve ;
if ( $print1 == 1) {
$sum1 = $print * $reserve ;
}
else {
$sum1 = $print1 * $reserve ;
}
$n = $n + 1 ;
$sum = $sum + $sum1 ;
}
echo '</tbody></table><br><br>' ;
echo ( '<HR><h2>Статистика</h2><HR><br><br>' ) ;
echo ( 'Всего обменных пунктов: <b>' . $n . '</b><br><br>' ) ;
echo ( 'Всего резервов: <b>' . number_format ( round ( $sum2 , 2 ) , 2 ) . ' ' . $decode [ $c2 ] . '</b><br><br>' ) ; echo ( 'Cредний курс <b>' . $decode [ $c1 ] . '/' . $decode [ $c2 ] . '</b> с учетом резервов: <b>' . number_format ( round ( ( $sum / $sum2 ) , 4 ) , 2 ) . '</b><br><br>' ) ; echo ( 'Обновление: <b>' . $time . '</b> ( По Москве )<br><br>' ) ;
echo ( 'Время выполнения скрипта: <b>' . ( round ( $end - $start , 4 ) ) . ' c</b><br><br>' ) ; }
else { echo '<tr><td></td></tr></tbody></table><br><b>Обмен в данном направлении не производится ни одним из имеющихся в базе обменных пунктов</b><br><br>' ; } ;
?>
<br>
</body>
</html>
<? @ include ( "templates/foot.inc.php" ) ; ?>
mclord
Отправлено: 22 Сентября, 2011 - 18:29:01 • Тема: помогите дописать скрипт • Форум: Напишите за меня, пожалуйста
Ответов: 10 Просмотров: 91
<input type=text name=length size=5 value=1 name=length maxlength="1"> (max: 9)<br>
а мне надо чтобы максимум симовлов можно было вводить ну 50
бывший код каторый изночально был
<input type=text name=length size=5 value=10><br>
mclord
Отправлено: 20 Сентября, 2011 - 07:41:31 • Тема: помощь в обратных связях разделах • Форум: Напишите за меня, пожалуйста
Ответов: 1 Просмотров: 35
надо сделать чтобы в меню можно было выбирать кому посылать суппорт админ и тд
PHP:
скопировать код в буфер обмена
<html>
<head>
<title>Написать нам</title>
<style type="text/css">
textarea {
background-color: #FEEFE7;
border: 3px double #004F00;
color: #420F88;
}
input{
background-color: #FEEFE7;
border: 3px double #004F00;
color: #420F88;
}
.button{
background-color: #FEEFE7;
border: 3px double #004F00;
color: #307438;
font-weight: bold;
}
</style>
</head>
<body>
<!-- Ниже Javasccript, который проверяет форму перед отправкой на заполненность -->
<script language="JavaScript">
<!--
required = new Array("imya", "email", "tema", "text", "zkod");
required_show = new Array("Ваше Имя", "Ваш E-mail", "Тема", "Сообщение", "Каптча");
function sendm () {
var i, j;
for(j=0; j<required.length; j++) {
for (i=0; i<document.forms[0].length; i++) {
if (document.forms[0].elements[i].name == required[j] && document.forms[0].elements[i].value == "" ) {
alert('Пожалуйста, заполните поле ' + required_show[j]);
document.forms[0].elements[i].focus();
return false;
}
}
}
return true;
}
-->
</script><p>
<?
$vmylo = 'simanovskiy.grigoriy@gmail.com' ; //Здесь впишите свой е-мэил, на который хотите получать письма
$s_imya = $_POST [ 'imya' ] ;
$s_email = $_POST [ 'email' ] ;
$s_tema = $_POST [ 'tema' ] ;
$s_text = $_POST [ 'text' ] ;
if ( isset ( $_POST [ 'send' ] ) ) { if ( $s_imya == "" or $s_email == "" or $s_tema == "" or $s_text == "" ) {
echo '<center><img src="' . $ns . '/images/error.png" alt="ошибка"></center>' ;
echo '<center><font color="red"><strong>Пожалуйста, заполните все поля!</strong></font></center>' ;
print '<center><a href="' . $ns . '/index.php?send">Вернуться назад</a></center>' ;
include ( 'engine/templates/foot.inc.php' ) ;
}
if ( ! preg_match ( '/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/' , $s_email ) ) {
echo '<center><img src="' . $ns . '/images/error.png" alt="ошибка"></center>' ;
echo '<center><font color="red"><strong>Введён некорректный e-mail адрес!</strong></font></center>' ;
print '<center><a href="' . $ns . '/index.php?send">Вернуться назад</a></center>' ;
include ( 'engine/templates/foot.inc.php' ) ;
}
if ( $_SESSION [ 'secpic' ] != strtolower ( $_POST [ 'zkod' ] ) ) { echo '<center><img src="' . $ns . '/images/error.png" alt="ошибка"></center>' ;
print '<center><font color="red"><strong>Неверный защитный код!</strong></font></center>' ;
print '<center><a href="' . $ns . '/index.php?send">Вернуться назад</a></center>' ;
include ( 'engine/templates/foot.inc.php' ) ;
}
$to = '' . $vmylo . '' ;
$subject = '' . $s_tema . '' ;
$msg = '<html>
<head>
<title>Письмо с Вашего сайта</title>
</head>
<body>
<p>Здравствуйте! С вашего сайта пришло следующее сообщение:<br /> ' . $s_text . '<br /> Имя отправителя: ' . $s_imya . ' Ip отправителя: ' . $_SERVER [ 'REMOTE_ADDR' ] . ' Домен Вашего сайта: ' . $_SERVER [ 'SERVER_NAME' ] . '
</p>
</body>
</html>' ;
$mailheaders = "Content-type: text/html; charset=windows-1251 \r \n " ;
$mailheaders .= "From: $s_email \n " ;
mail ( $to , $subject , $msg , $mailheaders ) ; echo '<center><img src="' . $ns . '/images/ok.png" alt="ok"></center>' ;
echo '<center><font color="green"><b>Спасибо, Ваше сообщение отправлено!</b></font></center>' ;
echo '<center><font color="green"><b>Буквально через 4 секунды, Вас автоматически перенаправит на главную страницу...</b></font></center>' ;
unset ( $_SESSION [ 'secpic' ] ) ; include ( 'engine/templates/foot.inc.php' ) ;
echo <<<HTML
<script language="JavaScript">
setTimeout("document.location=\"$ns\";",4000);
</script>
HTML ;
}
?>
<table align="center" border="0">
<form name="sendmaksik" action="<?= $ns ; ?> /index.php?send" method="POST" onSubmit="return sendm();">
<tr><td><b>Ваше Имя:</b><br /><input type="text" name="imya" size="35" maxlength="20" /></td></tr>
<tr><td><b>Ваш E-mail:</b><br /><input type="text" name="email" size="35" maxlength="25" /></td></tr>
<tr><td><b>Тема:</b><br /><input type="text" name="tema" size="35" maxlength="45" /></td></tr>
<tr><td><b>Сообщение:</b><br /><textarea name="text" rows="5" cols="27">
</textarea></td></tr>
<tr><td><img src="<?= $ns ; ?> /system/kapcha.php" alt="капча" /></td></tr>
<tr><td><b>Каптча:</b><br /><input type="text" name="zkod" size="35" maxlength="5" /></td></tr>
<tr><td></td></tr>
<tr><td><input type="submit" name="send" value="Отправить письмо" class="button" /></td></tr>
</form>
</table></p>
</body>
</html>
Страниц (9): [1] 2 3 4 5 6 7 8 9 »
Powered by ExBB FM 1.0 RC1. InvisionExBB